intel/fs/gen12: Implement gl_FrontFacing on gen12+.
The bit moved on gen12 in order to prepare for dual-SIMD8 dispatch. This implementation isn't an entirely complete as it only works on SIMD8 and SIMD16 and not dual-SIMD8. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
This commit is contained in:
committed by
Francisco Jerez
parent
ceb123befa
commit
c92fb60007
@@ -1326,7 +1326,13 @@ fs_visitor::emit_frontfacing_interpolation()
|
||||
{
|
||||
fs_reg *reg = new(this->mem_ctx) fs_reg(vgrf(glsl_type::bool_type));
|
||||
|
||||
if (devinfo->gen >= 6) {
|
||||
if (devinfo->gen >= 12) {
|
||||
fs_reg g1 = fs_reg(retype(brw_vec1_grf(1, 1), BRW_REGISTER_TYPE_W));
|
||||
|
||||
fs_reg tmp = bld.vgrf(BRW_REGISTER_TYPE_W);
|
||||
bld.ASR(tmp, g1, brw_imm_d(15));
|
||||
bld.NOT(*reg, tmp);
|
||||
} else if (devinfo->gen >= 6) {
|
||||
/* Bit 15 of g0.0 is 0 if the polygon is front facing. We want to create
|
||||
* a boolean result from this (~0/true or 0/false).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user