summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorMatt Turner <[email protected]>2016-01-15 13:38:46 -0800
committerMatt Turner <[email protected]>2016-01-19 12:08:59 -0800
commite734fb0326e61470d4341cc7bda52a25c96e1a72 (patch)
treeb244f816fdd0fdc9e813cfb81729fada47a80c83 /src/mesa
parenta439788c59ae8e09854cebc7d8e4edd0eee6d391 (diff)
i965: Inform compiler of variable range to silence warning.
Extends commit 6531ccb70 to silence the warning in release builds as well. Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vue_map.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vue_map.c b/src/mesa/drivers/dri/i965/brw_vue_map.c
index fea24368e8c..b66c209b24d 100644
--- a/src/mesa/drivers/dri/i965/brw_vue_map.c
+++ b/src/mesa/drivers/dri/i965/brw_vue_map.c
@@ -248,6 +248,8 @@ brw_compute_tess_vue_map(struct brw_vue_map *vue_map,
static const char *
varying_name(brw_varying_slot slot)
{
+ assume(slot < BRW_VARYING_SLOT_COUNT);
+
if (slot < VARYING_SLOT_MAX)
return gl_varying_slot_name(slot);
@@ -257,7 +259,6 @@ varying_name(brw_varying_slot slot)
[BRW_VARYING_SLOT_PNTC - VARYING_SLOT_MAX] = "BRW_VARYING_SLOT_PNTC",
};
- assert(slot < BRW_VARYING_SLOT_COUNT);
return brw_names[slot - VARYING_SLOT_MAX];
}