From 804b28cdc461043bba18f1b2b914ef61b9773192 Mon Sep 17 00:00:00 2001 From: Axel Davy Date: Sun, 6 Nov 2016 12:05:50 +0100 Subject: st/nine: Simplify the logic to bind textures This makes the code more readable. Signed-off-by: Axel Davy --- src/gallium/state_trackers/nine/device9.c | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/gallium/state_trackers/nine/device9.c') diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c index 5b720cc06dd..101761f0816 100644 --- a/src/gallium/state_trackers/nine/device9.c +++ b/src/gallium/state_trackers/nine/device9.c @@ -2486,19 +2486,10 @@ NineDevice9_SetTexture( struct NineDevice9 *This, if (old == tex) return D3D_OK; - if (tex) { - if ((tex->managed.dirty | tex->dirty_mip) && LIST_IS_EMPTY(&tex->list)) - list_add(&tex->list, &This->update_textures); - - tex->bind_count++; - } - if (old) - old->bind_count--; + NineBindTextureToDevice(This, &state->texture[Stage], tex); nine_context_set_texture(This, Stage, tex); - nine_bind(&state->texture[Stage], pTexture); - return D3D_OK; } -- cgit v1.2.3