zink: emit SpvCapabilityDemoteToHelperInvocation for IsHelperInvocation

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31228>
(cherry picked from commit b4f3136fea)
This commit is contained in:
Mike Blumenkrantz 2025-01-29 12:41:06 -05:00 committed by Eric Engestrom
parent 845a60dc35
commit 3be9a52a1a
2 changed files with 2 additions and 1 deletions

View file

@ -1344,7 +1344,7 @@
"description": "zink: emit SpvCapabilityDemoteToHelperInvocation for IsHelperInvocation",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null,
"notes": null

View file

@ -3165,6 +3165,7 @@ emit_is_helper_invocation(struct ntv_context *ctx, nir_intrinsic_instr *intr)
{
spirv_builder_emit_extension(&ctx->builder,
"SPV_EXT_demote_to_helper_invocation");
spirv_builder_emit_cap(&ctx->builder, SpvCapabilityDemoteToHelperInvocation);
SpvId result = spirv_is_helper_invocation(&ctx->builder);
store_def(ctx, intr->def.index, result, nir_type_bool);
}