[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

@@ -143,8 +143,13 @@ class TextureCache {
if (!binding) {
return false;
}
return (binding->texture && binding->texture->IsResolved()) ||
(binding->texture_signed && binding->texture_signed->IsResolved());
// Check if the texture is a resolution-scaled resolve target, not just
// any resolved texture. Only scaled textures need coordinate adjustment.
// Must check the texture's key, not binding->key, because scaled_resolve
// is set in FindOrCreateTexture which takes the key by value.
return (binding->texture && binding->texture->key().scaled_resolve) ||
(binding->texture_signed &&
binding->texture_signed->key().scaled_resolve);
}
template <swcache::PrefetchTag tag>
void PrefetchTextureBinding(uint32_t fetch_constant_index) const {