From cbfcb1b06992e4310683bb54a67d011b08010ec7 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Tue, 5 Aug 2014 11:10:07 -0700 Subject: [PATCH] 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 Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_fs.cpp | 5 ++--- src/mesa/drivers/dri/i965/brw_fs.h | 2 +- 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) { -- 2.30.2