Revert "ac/nir: Export clip distances according to clip_cull_mask"

This reverts commit b38c776690.

This commit seems to offend radeonsi-raven-piglit and radeonsi-stoney-gl.

Signed-off-by: Sergi Blanch Torne <sergi.blanch.torne@collabora.com>
Signed-off-by: David Heidelberg <david.heidelberg@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26941>
This commit is contained in:
Sergi Blanch Torne 2024-01-08 14:59:08 +01:00 committed by Marge Bot
parent e0eea5ea4e
commit ab6f7170e0

View file

@ -352,19 +352,10 @@ ac_nir_export_position(nir_builder *b,
}
for (int i = 0; i < 2; i++) {
/* Do not check outputs_written to prevent unwritten clip/cull
* distance outputs by the shader, and export zero instead.
*/
if (clip_cull_mask & BITFIELD_RANGE(i * 4, 4)) {
nir_def *clip_dist[4];
for (int j = 0; j < 4; j++) {
if (outputs[VARYING_SLOT_CLIP_DIST0 + i][j])
clip_dist[j] = nir_u2uN(b, outputs[VARYING_SLOT_CLIP_DIST0 + i][j], 32);
else
clip_dist[j] = nir_imm_zero(b, 1, 32);
}
if ((outputs_written & (VARYING_BIT_CLIP_DIST0 << i)) &&
(clip_cull_mask & BITFIELD_RANGE(i * 4, 4))) {
exp[exp_num] = export(
b, nir_vec(b, clip_dist, ARRAY_SIZE(clip_dist)), row,
b, get_export_output(b, outputs[VARYING_SLOT_CLIP_DIST0 + i]), row,
V_008DFC_SQ_EXP_POS + exp_num + exp_pos_offset, 0,
(clip_cull_mask >> (i * 4)) & 0xf);
exp_num++;