mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-24 08:28:16 +02:00
jay, nir: Make a dispatch_mask_intel intrinsic
jay is trying to use the fragment shader dispatch mask for helper invocation lowering, but it was using load_sample_mask_in for that (now load_coverage_mask_intel). But this isn't the MSAA coverage mask, the two are different payload fields. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41688>
This commit is contained in:
parent
0f3a311591
commit
35622f165f
4 changed files with 6 additions and 2 deletions
|
|
@ -1012,6 +1012,7 @@ visit_intrinsic(nir_intrinsic_instr *instr, struct divergence_state *state)
|
|||
case nir_intrinsic_dpas_intel:
|
||||
case nir_intrinsic_convert_cmat_intel:
|
||||
case nir_intrinsic_load_coverage_mask_intel:
|
||||
case nir_intrinsic_load_dispatch_mask_intel:
|
||||
case nir_intrinsic_isberd_nv:
|
||||
case nir_intrinsic_isbewr_nv:
|
||||
case nir_intrinsic_vild_nv:
|
||||
|
|
|
|||
|
|
@ -2646,6 +2646,9 @@ system_value("simd_width_intel", 1)
|
|||
# IndirectDataStartAddress
|
||||
system_value("indirect_address_intel", 1)
|
||||
|
||||
# The dispatch mask as provided in the FS payload.
|
||||
system_value("dispatch_mask_intel", 1)
|
||||
|
||||
# The raw coverage mask as provided in the FS payload.
|
||||
# The semantics of it depend on the HW state.
|
||||
system_value("coverage_mask_intel", 1)
|
||||
|
|
|
|||
|
|
@ -1327,7 +1327,7 @@ jay_emit_intrinsic(struct nir_to_jay_state *nj, nir_intrinsic_instr *intr)
|
|||
JAY_TYPE_U32;
|
||||
break;
|
||||
|
||||
case nir_intrinsic_load_coverage_mask_intel: {
|
||||
case nir_intrinsic_load_dispatch_mask_intel: {
|
||||
jay_def mask = jay_extract(nj->payload.u0, 15);
|
||||
|
||||
if (nj->s->dispatch_width == 32) {
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ lower_helper_invocation(nir_builder *b, nir_intrinsic_instr *intr, void *_)
|
|||
/* TODO: Is this right for multisampling? */
|
||||
b->cursor = nir_before_instr(&intr->instr);
|
||||
nir_def *active =
|
||||
nir_inot(b, nir_inverse_ballot(b, nir_load_coverage_mask_intel(b)));
|
||||
nir_inot(b, nir_inverse_ballot(b, nir_load_dispatch_mask_intel(b)));
|
||||
|
||||
nir_def_replace(&intr->def, active);
|
||||
return true;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue