From 4755ec7a59072fedc6043976e7d70238ea6d00ef Mon Sep 17 00:00:00 2001 From: CamilleLaVey Date: Tue, 10 Mar 2026 02:46:35 -0400 Subject: [PATCH] [vulkan] simplify numeric type determination --- src/shader_recompiler/ir_opt/texture_pass.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/shader_recompiler/ir_opt/texture_pass.cpp b/src/shader_recompiler/ir_opt/texture_pass.cpp index a1405b225f..45149a7e80 100644 --- a/src/shader_recompiler/ir_opt/texture_pass.cpp +++ b/src/shader_recompiler/ir_opt/texture_pass.cpp @@ -39,9 +39,7 @@ NumericType GetNumericType(TexturePixelFormat format) { if (!VideoCore::Surface::IsPixelFormatInteger(pixel_format)) { return NumericType::Float; } - return VideoCore::Surface::IsPixelFormatSignedInteger(pixel_format) - ? NumericType::SignedInt - : NumericType::UnsignedInt; + return NumericType::UnsignedInt; } IR::Opcode IndexedInstruction(const IR::Inst& inst) { @@ -450,7 +448,9 @@ public: u32 Add(const ImageBufferDescriptor& desc) { const u32 index{Add(image_buffer_descriptors, desc, [&desc](const auto& existing) { - return desc.format == existing.format && desc.cbuf_index == existing.cbuf_index && + return 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; })}; @@ -480,6 +480,7 @@ 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;