Module: wine Branch: master Commit: b186455cfad2ecd041da231af354f0f9a4a841cd URL: https://gitlab.winehq.org/wine/wine/-/commit/b186455cfad2ecd041da231af354f0f...
Author: Zebediah Figura zfigura@codeweavers.com Date: Thu Mar 9 18:55:52 2023 -0600
wined3d: Remove the no longer used "sampler" field of struct wined3d_texture.
---
dlls/wined3d/cs.c | 21 ++------------------- dlls/wined3d/wined3d_private.h | 1 - 2 files changed, 2 insertions(+), 20 deletions(-)
diff --git a/dlls/wined3d/cs.c b/dlls/wined3d/cs.c index 96207bcc525..6822f467276 100644 --- a/dlls/wined3d/cs.c +++ b/dlls/wined3d/cs.c @@ -1498,8 +1498,7 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
if (op->texture) { - if (InterlockedIncrement(&op->texture->resource.bind_count) == 1) - op->texture->sampler = op->stage; + InterlockedIncrement(&op->texture->resource.bind_count);
if (texture_binding_might_invalidate_ps(op->texture, prev, d3d_info)) device_invalidate_state(cs->c.device, STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL)); @@ -1519,23 +1518,7 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
if (prev) { - if (InterlockedDecrement(&prev->resource.bind_count) && prev->sampler == op->stage) - { - unsigned int i; - - /* Search for other stages the texture is bound to. Shouldn't - * happen if applications bind textures to a single stage only. */ - TRACE("Searching for other stages the texture is bound to.\n"); - for (i = 0; i < WINED3D_MAX_COMBINED_SAMPLERS; ++i) - { - if (cs->state.textures[i] == prev) - { - TRACE("Texture is also bound to stage %u.\n", i); - prev->sampler = i; - break; - } - } - } + InterlockedDecrement(&prev->resource.bind_count);
if (!op->texture && op->stage < d3d_info->ffp_fragment_caps.max_blend_stages) { diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 10b9d3c3a73..4f7cacda858 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -3329,7 +3329,6 @@ struct wined3d_texture unsigned int sysmem_count; float pow2_matrix[16]; unsigned int lod; - DWORD sampler; uint32_t flags; DWORD update_map_binding;