[GPU] Properly handle scaled textures and weights

Fix d3d12 logic wrt scaling weights, add vulkan impelementation for using
scaled texture offsets and fix resolution-scaled texture detection
This commit is contained in:
Herman S.
2025-12-13 08:50:29 +09:00
parent 55f0333182
commit cd7b47235d
6 changed files with 126 additions and 54 deletions

View File

@@ -4151,6 +4151,21 @@ void VulkanCommandProcessor::UpdateSystemConstantValues(
}
}
// Textures resolved - which textures are from resolve operations (scaled).
{
uint32_t textures_resolved = 0;
uint32_t textures_remaining = used_texture_mask;
uint32_t texture_index;
while (xe::bit_scan_forward(textures_remaining, &texture_index)) {
textures_remaining &= ~(UINT32_C(1) << texture_index);
textures_resolved |=
uint32_t(texture_cache_->IsActiveTextureResolved(texture_index))
<< texture_index;
}
dirty |= system_constants_.textures_resolved != textures_resolved;
system_constants_.textures_resolved = textures_resolved;
}
// Alpha test.
dirty |= system_constants_.alpha_test_reference != rb_alpha_ref;
system_constants_.alpha_test_reference = rb_alpha_ref;