summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Forbes <[email protected]>2014-06-04 21:06:31 +1200
committerChris Forbes <[email protected]>2014-06-05 06:53:43 +1200
commit3c77d2a113171bf18879664884a9fa0976d02f29 (patch)
tree338068db3d3642a3fa2e967ef6e70f167f9219f2
parent3642ee846a0eadd8c0554c66dc8d9114307f9d34 (diff)
i965/fs: Allow array dereference of HW_REG.
When dereferencing an element of gl_SampleMaskIn[], the source register here will be a HW_REG rather than a VGRF because the payload slot is now exposed directly. Fixes an assertion failure in the Piglit test: tests/spec/arb_gpu_shader5/execution/samplemaskin-basic Signed-off-by: Chris Forbes <[email protected]> Cc: Kenneth Graunke <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
-rw-r--r--src/mesa/drivers/dri/i965/brw_fs_visitor.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
index 04b9f21b84f..0b4fbb7b00a 100644
--- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
+++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp
@@ -189,7 +189,7 @@ fs_visitor::visit(ir_dereference_array *ir)
src.type = brw_type_for_base_type(ir->type);
if (constant_index) {
- assert(src.file == UNIFORM || src.file == GRF);
+ assert(src.file == UNIFORM || src.file == GRF || src.file == HW_REG);
src.reg_offset += constant_index->value.i[0] * element_size;
} else {
/* Variable index array dereference. We attach the variable index