Module: wine Branch: master Commit: fecb3b608b4c8ad1f4b40f46ff48117affacf599 URL: https://gitlab.winehq.org/wine/wine/-/commit/fecb3b608b4c8ad1f4b40f46ff48117...
Author: Zebediah Figura zfigura@codeweavers.com Date: Sat Dec 31 15:59:03 2022 -0600
wined3d: Check the wined3d resource type and usage instead of the GL target in texture_binding_might_invalidate_ps().
---
dlls/wined3d/cs.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 44739fc0ac7..96207bcc525 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1457,13 +1457,17 @@ void wined3d_device_context_emit_set_constant_buffers(struct wined3d_device_cont static bool texture_binding_might_invalidate_ps(struct wined3d_texture *texture, struct wined3d_texture *prev, const struct wined3d_d3d_info *d3d_info) { + unsigned int old_usage, new_usage, old_caps, new_caps; const struct wined3d_format *old_format, *new_format; - unsigned int old_caps, new_caps;
if (!prev) return true;
- if (wined3d_texture_gl(texture)->target != wined3d_texture_gl(prev)->target) + /* 1.x pixel shaders need to be recompiled based on the resource type. */ + old_usage = prev->resource.usage; + new_usage = texture->resource.usage; + if (texture->resource.type != prev->resource.type + || ((old_usage & WINED3DUSAGE_LEGACY_CUBEMAP) != (new_usage & WINED3DUSAGE_LEGACY_CUBEMAP))) return true;
old_format = prev->resource.format;