summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/nv50/nv50_tex.c
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2014-01-16 17:08:19 +0000
committerEmil Velikov <[email protected]>2014-01-18 19:17:34 +0000
commit6a53b81086bd80ad5a5e79939e0aeb208253026a (patch)
tree7cbb229d7415f3ed857af46f5e083f52b07cde46 /src/gallium/drivers/nouveau/nv50/nv50_tex.c
parent19069803bed95e64bf43185e7f02550ebbf92dde (diff)
nv50: assert before trying to out-of-bounds access textures
Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/nv50/nv50_tex.c')
-rw-r--r--src/gallium/drivers/nouveau/nv50/nv50_tex.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/nv50/nv50_tex.c b/src/gallium/drivers/nouveau/nv50/nv50_tex.c
index f7284fa50ce..f2325cff920 100644
--- a/src/gallium/drivers/nouveau/nv50/nv50_tex.c
+++ b/src/gallium/drivers/nouveau/nv50/nv50_tex.c
@@ -222,6 +222,7 @@ nv50_validate_tic(struct nv50_context *nv50, int s)
unsigned i;
boolean need_flush = FALSE;
+ assert(nv50->num_textures[s] <= PIPE_MAX_SAMPLERS);
for (i = 0; i < nv50->num_textures[s]; ++i) {
struct nv50_tic_entry *tic = nv50_tic_entry(nv50->textures[s][i]);
struct nv04_resource *res;