summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2013-05-29 23:27:45 -0700
committerKenneth Graunke <[email protected]>2013-05-29 23:31:09 -0700
commit60f9b722ef80c499a94b4e5ab7304dcd739ea569 (patch)
tree2aa8cf45e1253913e61d377b9da6392fe9393035 /src/mesa
parent8b1c9de166129086ff73a3ed0378e3feb06dda15 (diff)
Revert "i965: fix problem with constant out of bounds access (v2)"
This reverts commit 98dfd59a0445666060c97b0dccaf0e9f030b547a. The patch was clearly not Piglit tested, as it caused at least 225 tests to start crashing with assertion failures. That was before my desktop tanked and the test run died completely.
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp
index 9efdfc8e485..baaa25c1347 100644
--- a/src/mesa/drivers/dri/i965/brw_fs.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs.cpp
@@ -1504,13 +1504,7 @@ fs_visitor::remove_dead_constants()
if (inst->src[i].file != UNIFORM)
continue;
- /* if we get a negative constant nr or one greater than we can
- * handle, this can cause an overflow, we can't just refuse to
- * build, so just go undefined and alias everyone to constant 0.
- */
- if (constant_nr < 0 || constant_nr >= (int)c->prog_data.nr_params) {
- constant_nr = 0;
- }
+ assert(constant_nr < (int)c->prog_data.nr_params);
/* For now, set this to non-negative. We'll give it the
* actual new number in a moment, in order to keep the
@@ -1558,10 +1552,6 @@ fs_visitor::remove_dead_constants()
if (inst->src[i].file != UNIFORM)
continue;
- /* as above alias to 0 */
- if (constant_nr < 0 || constant_nr >= (int)c->prog_data.nr_params) {
- constant_nr = 0;
- }
assert(this->params_remap[constant_nr] != -1);
inst->src[i].reg = this->params_remap[constant_nr];
inst->src[i].reg_offset = 0;