summaryrefslogtreecommitdiffstats
path: root/src/gpu.rs
diff options
context:
space:
mode:
authors-ol <s+removethis@s-ol.nu>2026-05-05 16:28:46 +0000
committers-ol <s+removethis@s-ol.nu>2026-05-14 15:00:13 +0000
commit06db91ce8e8c9dd5993077423c1400d9e81d6ad0 (patch)
treecc89f5f2ecc5e32f1d610aaf64b2729477188ad6 /src/gpu.rs
parenttsv-video-*: share code (diff)
downloadwgsl-view-main.tar.gz
wgsl-view-main.zip
fix SRGB failHEADmain
Diffstat (limited to 'src/gpu.rs')
-rw-r--r--src/gpu.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gpu.rs b/src/gpu.rs
index 38c39f3..7f44354 100644
--- a/src/gpu.rs
+++ b/src/gpu.rs
@@ -129,14 +129,14 @@ pub const TSV_FORMAT: ImgFormat = ImgFormat::R8G8B8A8;
/// Convert a TSV ImgFormat to a wgpu TextureFormat.
pub fn img_format_to_wgpu(fmt: ImgFormat) -> wgpu::TextureFormat {
match fmt {
- ImgFormat::R8G8B8A8 => wgpu::TextureFormat::Rgba8UnormSrgb,
- ImgFormat::R8G8B8 => wgpu::TextureFormat::Rgba8UnormSrgb,
- ImgFormat::B8G8R8A8 => wgpu::TextureFormat::Bgra8UnormSrgb,
- ImgFormat::B8G8R8 => wgpu::TextureFormat::Bgra8UnormSrgb,
+ ImgFormat::R8G8B8A8 => wgpu::TextureFormat::Rgba8Unorm,
+ ImgFormat::R8G8B8 => wgpu::TextureFormat::Rgba8Unorm,
+ ImgFormat::B8G8R8A8 => wgpu::TextureFormat::Bgra8Unorm,
+ ImgFormat::B8G8R8 => wgpu::TextureFormat::Bgra8Unorm,
ImgFormat::BC1_RGBA => wgpu::TextureFormat::Bc1RgbaUnorm,
ImgFormat::BC3_RGBA => wgpu::TextureFormat::Bc3RgbaUnorm,
ImgFormat::BC7_RGBA => wgpu::TextureFormat::Bc7RgbaUnorm,
- ImgFormat::Undefined => wgpu::TextureFormat::Rgba8UnormSrgb,
+ ImgFormat::Undefined => wgpu::TextureFormat::Rgba8Unorm,
}
}