Commit b186455c authored by Zebediah Figura's avatar Zebediah Figura Committed by Alexandre Julliard

wined3d: Remove the no longer used "sampler" field of struct wined3d_texture.

parent 17542e9f
...@@ -1498,8 +1498,7 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data) ...@@ -1498,8 +1498,7 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
if (op->texture) if (op->texture)
{ {
if (InterlockedIncrement(&op->texture->resource.bind_count) == 1) InterlockedIncrement(&op->texture->resource.bind_count);
op->texture->sampler = op->stage;
if (texture_binding_might_invalidate_ps(op->texture, prev, d3d_info)) if (texture_binding_might_invalidate_ps(op->texture, prev, d3d_info))
device_invalidate_state(cs->c.device, STATE_SHADER(WINED3D_SHADER_TYPE_PIXEL)); 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) ...@@ -1519,23 +1518,7 @@ static void wined3d_cs_exec_set_texture(struct wined3d_cs *cs, const void *data)
if (prev) if (prev)
{ {
if (InterlockedDecrement(&prev->resource.bind_count) && prev->sampler == op->stage) InterlockedDecrement(&prev->resource.bind_count);
{
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;
}
}
}
if (!op->texture && op->stage < d3d_info->ffp_fragment_caps.max_blend_stages) if (!op->texture && op->stage < d3d_info->ffp_fragment_caps.max_blend_stages)
{ {
......
...@@ -3329,7 +3329,6 @@ struct wined3d_texture ...@@ -3329,7 +3329,6 @@ struct wined3d_texture
unsigned int sysmem_count; unsigned int sysmem_count;
float pow2_matrix[16]; float pow2_matrix[16];
unsigned int lod; unsigned int lod;
DWORD sampler;
uint32_t flags; uint32_t flags;
DWORD update_map_binding; DWORD update_map_binding;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment