summaryrefslogtreecommitdiff
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorAxel Davy <davyaxel0@gmail.com>2018-03-10 14:21:52 +0100
committerAxel Davy <davyaxel0@gmail.com>2018-03-18 22:53:32 +0100
commit76fa1f730b7ee232021bb20bae0ead6779941cf1 (patch)
tree5458062676a9e88b0e8ef7a685785878ae8eac69 /src/gallium/state_trackers
parente1b2e5667c48c3863fd84c1e903c9aa6bf30a137 (diff)
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 <davyaxel0@gmail.com> Reviewed-by: Patrick Rudolph <siro@das-labor.org> Tested-by: Dieter Nützel <Dieter@nuetzel-hh.de>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/nine/nine_state.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/nine_state.c b/src/gallium/state_trackers/nine/nine_state.c
index 26b2dea3bd..c81a05a952 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);