mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 22:20:09 +01:00
nir_to_tgsi: Add support for demote, is_helper_invocation, and subgroup ops.
Found to be missing when testing on nvc0. Acked-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15932>
This commit is contained in:
parent
44217b7760
commit
d3b1579a1f
2 changed files with 36 additions and 0 deletions
|
|
@ -2399,6 +2399,7 @@ ntt_emit_intrinsic(struct ntt_compile *c, nir_intrinsic_instr *instr)
|
|||
case nir_intrinsic_load_subgroup_ge_mask:
|
||||
case nir_intrinsic_load_subgroup_gt_mask:
|
||||
case nir_intrinsic_load_subgroup_lt_mask:
|
||||
case nir_intrinsic_load_subgroup_le_mask:
|
||||
ntt_emit_load_sysval(c, instr);
|
||||
break;
|
||||
|
||||
|
|
@ -2418,6 +2419,10 @@ ntt_emit_intrinsic(struct ntt_compile *c, nir_intrinsic_instr *instr)
|
|||
ntt_emit_load_output(c, instr);
|
||||
break;
|
||||
|
||||
case nir_intrinsic_demote:
|
||||
ntt_DEMOTE(c);
|
||||
break;
|
||||
|
||||
case nir_intrinsic_discard:
|
||||
ntt_KILL(c);
|
||||
break;
|
||||
|
|
@ -2436,6 +2441,29 @@ ntt_emit_intrinsic(struct ntt_compile *c, nir_intrinsic_instr *instr)
|
|||
break;
|
||||
}
|
||||
|
||||
case nir_intrinsic_is_helper_invocation:
|
||||
ntt_READ_HELPER(c, ntt_get_dest(c, &instr->dest));
|
||||
break;
|
||||
|
||||
case nir_intrinsic_vote_all:
|
||||
ntt_VOTE_ALL(c, ntt_get_dest(c, &instr->dest), ntt_get_src(c,instr->src[0]));
|
||||
return;
|
||||
case nir_intrinsic_vote_any:
|
||||
ntt_VOTE_ANY(c, ntt_get_dest(c, &instr->dest), ntt_get_src(c, instr->src[0]));
|
||||
return;
|
||||
case nir_intrinsic_vote_ieq:
|
||||
ntt_VOTE_EQ(c, ntt_get_dest(c, &instr->dest), ntt_get_src(c, instr->src[0]));
|
||||
return;
|
||||
case nir_intrinsic_ballot:
|
||||
ntt_BALLOT(c, ntt_get_dest(c, &instr->dest), ntt_get_src(c, instr->src[0]));
|
||||
return;
|
||||
case nir_intrinsic_read_first_invocation:
|
||||
ntt_READ_FIRST(c, ntt_get_dest(c, &instr->dest), ntt_get_src(c, instr->src[0]));
|
||||
return;
|
||||
case nir_intrinsic_read_invocation:
|
||||
ntt_READ_INVOC(c, ntt_get_dest(c, &instr->dest), ntt_get_src(c, instr->src[0]), ntt_get_src(c, instr->src[1]));
|
||||
return;
|
||||
|
||||
case nir_intrinsic_load_ssbo:
|
||||
case nir_intrinsic_store_ssbo:
|
||||
case nir_intrinsic_ssbo_atomic_add:
|
||||
|
|
|
|||
|
|
@ -73,7 +73,15 @@ OP11(DDX)
|
|||
OP11(DDY)
|
||||
OP11(DDX_FINE)
|
||||
OP11(DDY_FINE)
|
||||
OP00(DEMOTE)
|
||||
OP00(KILL)
|
||||
OP10(READ_HELPER)
|
||||
OP11(VOTE_ALL)
|
||||
OP11(VOTE_ANY)
|
||||
OP11(VOTE_EQ)
|
||||
OP11(BALLOT)
|
||||
OP11(READ_FIRST)
|
||||
OP12(READ_INVOC)
|
||||
OP11(PK2H)
|
||||
OP11(PK2US)
|
||||
OP11(PK4B)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue