}
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
* 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;
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);
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);
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);
}