diff options
author | Kenneth Graunke <[email protected]> | 2014-10-17 12:59:18 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-10-17 13:03:18 -0700 |
commit | ffe582aa2076bc06f9d06e36287bdded45ab5b98 (patch) | |
tree | edf08f0835fb4a41cc1cf493d7ab4ecbc0134a5f /src/mesa/drivers/dri | |
parent | 9ebfb3014ea6d2bde9d4322f2537f21be97b280b (diff) |
i965/fs: Don't pass ir_variable * to emit_sampleid_setup().
gl_SampleID is a built-in variable that always is of type "int".
Suggested by Connor Abbott.
Signed-off-by: Kenneth Graunke <[email protected]>
Reviewed-by: Connor Abbott <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 4 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.h | 2 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_visitor.cpp | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 8d470f2e858..e941c58a36d 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1505,14 +1505,14 @@ fs_visitor::emit_samplepos_setup() } fs_reg * -fs_visitor::emit_sampleid_setup(ir_variable *ir) +fs_visitor::emit_sampleid_setup() { assert(stage == MESA_SHADER_FRAGMENT); brw_wm_prog_key *key = (brw_wm_prog_key*) this->key; assert(brw->gen >= 6); this->current_annotation = "compute sample id"; - fs_reg *reg = new(this->mem_ctx) fs_reg(this, ir->type); + fs_reg *reg = new(this->mem_ctx) fs_reg(this, glsl_type::int_type); if (key->compute_sample_id) { fs_reg t1 = fs_reg(this, glsl_type::int_type); diff --git a/src/mesa/drivers/dri/i965/brw_fs.h b/src/mesa/drivers/dri/i965/brw_fs.h index c62c1eb866f..67956bc3113 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -464,7 +464,7 @@ public: bool is_centroid, bool is_sample); fs_reg *emit_frontfacing_interpolation(); fs_reg *emit_samplepos_setup(); - fs_reg *emit_sampleid_setup(ir_variable *ir); + fs_reg *emit_sampleid_setup(); 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 8a11b04c0fa..033255ed5d3 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -137,7 +137,7 @@ fs_visitor::visit(ir_variable *ir) if (ir->data.location == SYSTEM_VALUE_SAMPLE_POS) { reg = emit_samplepos_setup(); } else if (ir->data.location == SYSTEM_VALUE_SAMPLE_ID) { - reg = emit_sampleid_setup(ir); + reg = emit_sampleid_setup(); } else if (ir->data.location == SYSTEM_VALUE_SAMPLE_MASK_IN) { assert(brw->gen >= 7); reg = new(mem_ctx) |