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 <chrisf@ijw.co.nz>
Cc: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
Chris Forbes
2014-06-04 21:06:31 +12:00
parent 3642ee846a
commit 3c77d2a113
+1 -1
View File
@@ -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