radeonsi: support 8 instead of 6 clip planes with gl_ClipVertex

Reviewed-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35392>
This commit is contained in:
Marek Olšák 2025-05-26 05:52:23 -04:00 committed by Marge Bot
parent 8ea7d32570
commit de9eee7700
2 changed files with 2 additions and 6 deletions

View file

@ -75,11 +75,7 @@ bool si_nir_kill_outputs(nir_shader *nir, const union si_shader_key *key)
break;
case VARYING_SLOT_CLIP_VERTEX:
/* TODO: We should only kill specific clip planes as required by kill_clip_distance,
* not whole gl_ClipVertex. Lower ClipVertex in NIR.
*/
if ((key->ge.opt.kill_clip_distances & SI_USER_CLIP_PLANE_MASK) ==
SI_USER_CLIP_PLANE_MASK)
if (key->ge.opt.kill_clip_distances == SI_USER_CLIP_PLANE_MASK)
progress |= nir_remove_sysval_output(intr, MESA_SHADER_FRAGMENT);
break;

View file

@ -129,7 +129,7 @@ struct nir_instr;
#define SI_MAX_ATTRIBS 16
#define SI_MAX_VS_OUTPUTS 40
#define SI_USER_CLIP_PLANE_MASK 0x3F
#define SI_USER_CLIP_PLANE_MASK BITFIELD_MASK(8)
#define INTERP_MODE_COLOR INTERP_MODE_COUNT