From: Axel Davy Date: Sat, 10 Mar 2018 13:21:52 +0000 (+0100) Subject: st/nine: Fix bad tracking of bound vs textures X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=76fa1f730b7ee232021bb20bae0ead6779941cf1;p=mesa.git st/nine: Fix bad tracking of bound vs textures An incorrect formula was used to compute bound_samplers_mask_vs. Since s is above always 8 for vs and the variable is encoded on 8 bits, it was always 0. This resulted in commiting the samplers every call when there was at least one texture read in the vs shader. Signed-off-by: Axel Davy Reviewed-by: Patrick Rudolph Tested-by: Dieter Nützel --- diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c index 26b2dea3bd5..c81a05a952b 100644 --- a/src/gallium/state_trackers/nine/nine_state.c +++ b/src/gallium/state_trackers/nine/nine_state.c @@ -980,7 +980,7 @@ update_textures_and_samplers(struct NineDevice9 *device) context->changed.sampler[s] = ~0; } - context->bound_samplers_mask_vs |= (1 << s); + context->bound_samplers_mask_vs |= (1 << i); } cso_set_sampler_views(context->cso, PIPE_SHADER_VERTEX, num_textures, view);