mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
intel/elk: Use pixel_z for gl_FragCoord.z on pre-gen6.
Unless I've seriously missed something, we have the Z in the payload (which we can always request if we need access to it and it's not already passed to us due other WM IZ settings). total instructions in shared programs: 4408303 -> 4408186 (<.01%) instructions in affected programs: 1164 -> 1047 (-10.05%) total cycles in shared programs: 142485036 -> 142484566 (<.01%) cycles in affected programs: 26820 -> 26350 (-1.75%) Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25190>
This commit is contained in:
parent
dc55b47a58
commit
269fbcb144
1 changed files with 1 additions and 7 deletions
|
|
@ -3920,13 +3920,7 @@ fs_nir_emit_fs_intrinsic(nir_to_elk_state &ntb,
|
|||
break;
|
||||
|
||||
case nir_intrinsic_load_frag_coord_z:
|
||||
if (devinfo->ver >= 6) {
|
||||
bld.MOV(dest, s.pixel_z);
|
||||
} else {
|
||||
bld.emit(ELK_FS_OPCODE_LINTERP, dest,
|
||||
s.delta_xy[ELK_BARYCENTRIC_PERSPECTIVE_PIXEL],
|
||||
s.interp_reg(bld, VARYING_SLOT_POS, 2, 0));
|
||||
}
|
||||
bld.MOV(dest, s.pixel_z);
|
||||
break;
|
||||
|
||||
case nir_intrinsic_load_frag_coord_w:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue