From 3f1f20185cd4176312dd348eaa635554420310d3 Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Thu, 12 Mar 2026 00:54:14 -0400 Subject: [PATCH] Revert "[vulkan] simplify numeric type determination" --- src/shader_recompiler/ir_opt/texture_pass.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp index 45149a7e80..a1405b225f 100644 --- a/src/shader_recompiler/ir_opt/texture_pass.cpp +++ b/src/shader_recompiler/ir_opt/texture_pass.cpp @@ -39,7 +39,9 @@ NumericType GetNumericType(TexturePixelFormat format) { if (!VideoCore::Surface::IsPixelFormatInteger(pixel_format)) { return NumericType::Float; } - return NumericType::UnsignedInt; + return VideoCore::Surface::IsPixelFormatSignedInteger(pixel_format) + ? NumericType::SignedInt + : NumericType::UnsignedInt; } IR::Opcode IndexedInstruction(const IR::Inst& inst) { @@ -448,9 +450,7 @@ public: u32 Add(const ImageBufferDescriptor& desc) { const u32 index{Add(image_buffer_descriptors, desc, [&desc](const auto& existing) { - return desc.format == existing.format && - desc.numeric_type == existing.numeric_type && - desc.cbuf_index == existing.cbuf_index && + return desc.format == existing.format && desc.cbuf_index == existing.cbuf_index && desc.cbuf_offset == existing.cbuf_offset && desc.count == existing.count && desc.size_shift == existing.size_shift; })}; @@ -480,7 +480,6 @@ public: u32 Add(const ImageDescriptor& desc) { const u32 index{Add(image_descriptors, desc, [&desc](const auto& existing) { return desc.type == existing.type && desc.format == existing.format && - desc.numeric_type == existing.numeric_type && desc.cbuf_index == existing.cbuf_index && desc.cbuf_offset == existing.cbuf_offset && desc.count == existing.count && desc.size_shift == existing.size_shift;