mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-25 15:10:10 +01:00
i965/fs: don't pass ir_variable * to emit_frontfacing_interpolation()
We were only using it to get at its type, which we already know because it's a builtin variable. v2 (Ken): Rebase on Matt's optimized gl_FrontFacing calculations. Signed-off-by: Connor Abbott <connor.abbott@intel.com> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
parent
70691f0c28
commit
ec3d06f591
4 changed files with 6 additions and 6 deletions
|
|
@ -1185,9 +1185,9 @@ fs_visitor::emit_general_interpolation(ir_variable *ir)
|
|||
}
|
||||
|
||||
fs_reg *
|
||||
fs_visitor::emit_frontfacing_interpolation(ir_variable *ir)
|
||||
fs_visitor::emit_frontfacing_interpolation()
|
||||
{
|
||||
fs_reg *reg = new(this->mem_ctx) fs_reg(this, ir->type);
|
||||
fs_reg *reg = new(this->mem_ctx) fs_reg(this, glsl_type::bool_type);
|
||||
|
||||
if (brw->gen >= 6) {
|
||||
/* Bit 15 of g0.0 is 0 if the polygon is front facing. We want to create
|
||||
|
|
@ -1217,7 +1217,7 @@ fs_visitor::emit_frontfacing_interpolation(ir_variable *ir)
|
|||
* Instead, use ASR (which will give ~0/true or 0/false) followed by an
|
||||
* AND 1.
|
||||
*/
|
||||
fs_reg asr = fs_reg(this, ir->type);
|
||||
fs_reg asr = fs_reg(this, glsl_type::bool_type);
|
||||
fs_reg g1_6 = fs_reg(retype(brw_vec1_grf(1, 6), BRW_REGISTER_TYPE_D));
|
||||
g1_6.negate = true;
|
||||
|
||||
|
|
|
|||
|
|
@ -365,7 +365,7 @@ public:
|
|||
fs_inst *emit_linterp(const fs_reg &attr, const fs_reg &interp,
|
||||
glsl_interp_qualifier interpolation_mode,
|
||||
bool is_centroid, bool is_sample);
|
||||
fs_reg *emit_frontfacing_interpolation(ir_variable *ir);
|
||||
fs_reg *emit_frontfacing_interpolation();
|
||||
fs_reg *emit_samplepos_setup(ir_variable *ir);
|
||||
fs_reg *emit_sampleid_setup(ir_variable *ir);
|
||||
fs_reg *emit_general_interpolation(ir_variable *ir);
|
||||
|
|
|
|||
|
|
@ -609,7 +609,7 @@ fs_visitor::setup_fp_regs()
|
|||
fp_input_regs[i] = *emit_fragcoord_interpolation(ir);
|
||||
break;
|
||||
case VARYING_SLOT_FACE:
|
||||
fp_input_regs[i] = *emit_frontfacing_interpolation(ir);
|
||||
fp_input_regs[i] = *emit_frontfacing_interpolation();
|
||||
break;
|
||||
default:
|
||||
fp_input_regs[i] = *emit_general_interpolation(ir);
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ fs_visitor::visit(ir_variable *ir)
|
|||
if (!strcmp(ir->name, "gl_FragCoord")) {
|
||||
reg = emit_fragcoord_interpolation(ir);
|
||||
} else if (!strcmp(ir->name, "gl_FrontFacing")) {
|
||||
reg = emit_frontfacing_interpolation(ir);
|
||||
reg = emit_frontfacing_interpolation();
|
||||
} else {
|
||||
reg = emit_general_interpolation(ir);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue