From 125b4c8c05851e48faa73fda2a593f0629c5f7df Mon Sep 17 00:00:00 2001 From: "Herman S." <429230+has207@users.noreply.github.com> Date: Sat, 17 Jan 2026 22:41:48 +0900 Subject: [PATCH] [GPU] Ensure force_special_view checks swizzle signs before using signed This was causing unnecessary logspam in Blue Dragon due to incorrectly trying to request signed when the fetch constants are unsigned --- src/xenia/gpu/d3d12/d3d12_texture_cache.cc | 5 ++++- src/xenia/gpu/vulkan/vulkan_texture_cache.cc | 7 +++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/xenia/gpu/d3d12/d3d12_texture_cache.cc b/src/xenia/gpu/d3d12/d3d12_texture_cache.cc index 2a7315d5f..18ba18476 100644 --- a/src/xenia/gpu/d3d12/d3d12_texture_cache.cc +++ b/src/xenia/gpu/d3d12/d3d12_texture_cache.cc @@ -708,8 +708,11 @@ uint32_t D3D12TextureCache::GetActiveTextureBindlessSRVIndex( if (force_special_view) { // Determine which texture object to use + // Respect swizzled_signs from fetch constant, not just shader request Texture* texture = nullptr; - if (host_shader_binding.is_signed) { + bool use_signed = host_shader_binding.is_signed && + texture_util::IsAnySignSigned(binding->swizzled_signs); + if (use_signed) { texture = IsSignedVersionSeparateForFormat(binding->key) ? binding->texture_signed : binding->texture; diff --git a/src/xenia/gpu/vulkan/vulkan_texture_cache.cc b/src/xenia/gpu/vulkan/vulkan_texture_cache.cc index cc1b5b4f8..155358546 100644 --- a/src/xenia/gpu/vulkan/vulkan_texture_cache.cc +++ b/src/xenia/gpu/vulkan/vulkan_texture_cache.cc @@ -616,8 +616,11 @@ VkImageView VulkanTextureCache::GetActiveBindingOrNullImageView( if (force_special_view) { // Get the appropriate texture for signed/unsigned. + // Respect swizzled_signs from fetch constant, not just shader request. Texture* texture = nullptr; - if (is_signed && IsSignedVersionSeparateForFormat(binding->key)) { + bool use_signed = + is_signed && texture_util::IsAnySignSigned(binding->swizzled_signs); + if (use_signed && IsSignedVersionSeparateForFormat(binding->key)) { texture = binding->texture_signed; } else { texture = binding->texture; @@ -625,7 +628,7 @@ VkImageView VulkanTextureCache::GetActiveBindingOrNullImageView( if (texture) { image_view = static_cast(texture)->GetOrCreate3DAs2DImageView( - is_signed, binding->host_swizzle); + use_signed, binding->host_swizzle); } } else { const VulkanTextureBinding& vulkan_binding =