diff options
author | Kenneth Graunke <[email protected]> | 2014-05-13 21:21:21 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-05-18 23:35:18 -0700 |
commit | c76e6db05f9256711a226de8562124a5f14aae2d (patch) | |
tree | 047f54c1a9f7afb5d7f6e55d08b6f4c2ff286b37 /src/mesa/drivers | |
parent | 5cd7cf58e66ebb4e87a7fe6bba3b43f062ace47f (diff) |
i965/fs: Simplify gl_SampleMaskIn handling.
As far as I can tell, there's no point in allocating an extra register
and generating a MOV---we can just use the copy provided as part of our
thread payload directly. It's already in the right format.
Of course, there are zero Piglit tests for this. We don't actually ship
the extension (GL_ARB_gpu_shader5) that exposes this functionality
either.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa/drivers')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 10 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 1 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 4 |
3 files changed, 3 insertions, 12 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index ac257d6821a..336b8e608fc 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1331,16 +1331,6 @@ fs_visitor::emit_sampleid_setup(ir_variable *ir) return reg; } -fs_reg * -fs_visitor::emit_samplemaskin_setup(ir_variable *ir) -{ - assert(brw->gen >= 7); - this->current_annotation = "compute gl_SampleMaskIn"; - fs_reg *reg = new(this->mem_ctx) fs_reg(this, ir->type); - emit(MOV(*reg, fs_reg(retype(brw_vec8_grf(c->sample_mask_in_reg, 0), BRW_REGISTER_TYPE_D)))); - return reg; -} - fs_reg fs_visitor::fix_math_operand(fs_reg src) { diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index 4c8ed72aef8..dac2d8ad36b 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -397,7 +397,6 @@ public: fs_reg *emit_frontfacing_interpolation(ir_variable *ir); fs_reg *emit_samplepos_setup(ir_variable *ir); fs_reg *emit_sampleid_setup(ir_variable *ir); - fs_reg *emit_samplemaskin_setup(ir_variable *ir); fs_reg *emit_general_interpolation(ir_variable *ir); void emit_interpolation_setup_gen4(); void emit_interpolation_setup_gen6(); diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index 307d07bb6e6..eff762975ae 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -138,7 +138,9 @@ fs_visitor::visit(ir_variable *ir) } else if (ir->data.location == SYSTEM_VALUE_SAMPLE_ID) { reg = emit_sampleid_setup(ir); } else if (ir->data.location == SYSTEM_VALUE_SAMPLE_MASK_IN) { - reg = emit_samplemaskin_setup(ir); + assert(brw->gen >= 7); + reg = new(mem_ctx) fs_reg(retype(brw_vec8_grf(c->sample_mask_in_reg, 0), + BRW_REGISTER_TYPE_D)); } } |