mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-15 12:02:04 +00:00
wined3d: Check the wined3d resource type and usage instead of the GL target in texture_binding_might_invalidate_ps().
This commit is contained in:
parent
1e968480eb
commit
fecb3b608b
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue