diff options
author | Connor Abbott <[email protected]> | 2014-08-05 11:10:07 -0700 |
---|---|---|
committer | Kenneth Graunke <[email protected]> | 2014-09-01 00:12:15 -0700 |
commit | cbfcb1b06992e4310683bb54a67d011b08010ec7 (patch) | |
tree | 8e3e63dff519d67c25747405f3be279c5a46bf79 /src | |
parent | ec3d06f591f9561289f7bc64a543a1e8a625faee (diff) |
i965/fs: don't pass ir_variable * to emit_samplepos_setup()
We were only using it to get at its type, which we already know because
it's a builtin variable.
Signed-off-by: Connor Abbott <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs.cpp | 5 | ||||
-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, 5 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs.cpp b/src/mesa/drivers/dri/i965/brw_fs.cpp index 410c441e2d1..268f52891c2 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs.cpp @@ -1250,13 +1250,12 @@ fs_visitor::compute_sample_position(fs_reg dst, fs_reg int_sample_pos) } fs_reg * -fs_visitor::emit_samplepos_setup(ir_variable *ir) +fs_visitor::emit_samplepos_setup() { assert(brw->gen >= 6); - assert(ir->type == glsl_type::vec2_type); this->current_annotation = "compute sample position"; - fs_reg *reg = new(this->mem_ctx) fs_reg(this, ir->type); + fs_reg *reg = new(this->mem_ctx) fs_reg(this, glsl_type::vec2_type); fs_reg pos = *reg; fs_reg int_sample_x = fs_reg(this, glsl_type::int_type); fs_reg int_sample_y = 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 f8f38e00bb2..02435b7d1d8 100644 --- a/src/mesa/drivers/dri/i965/brw_fs.h +++ b/src/mesa/drivers/dri/i965/brw_fs.h @@ -366,7 +366,7 @@ public: glsl_interp_qualifier interpolation_mode, bool is_centroid, bool is_sample); fs_reg *emit_frontfacing_interpolation(); - fs_reg *emit_samplepos_setup(ir_variable *ir); + fs_reg *emit_samplepos_setup(); fs_reg *emit_sampleid_setup(ir_variable *ir); fs_reg *emit_general_interpolation(ir_variable *ir); void emit_interpolation_setup_gen4(); diff --git a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp index df65e5e8b1d..a6b0aefd100 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_visitor.cpp @@ -134,7 +134,7 @@ fs_visitor::visit(ir_variable *ir) } else if (ir->data.mode == ir_var_system_value) { if (ir->data.location == SYSTEM_VALUE_SAMPLE_POS) { - reg = emit_samplepos_setup(ir); + reg = emit_samplepos_setup(); } else if (ir->data.location == SYSTEM_VALUE_SAMPLE_ID) { reg = emit_sampleid_setup(ir); } else if (ir->data.location == SYSTEM_VALUE_SAMPLE_MASK_IN) { |