zink: emit demote cap when using demote

VUID-VkShaderModuleCreateInfo-pCode-01377(ERROR / SPEC): msgNum: 1478567243 - Validation Error: [ VUID-VkShaderModuleCreateInfo-pCode-01377 ] Object 0: handle = 0x55f304e851c0, type = VK_OBJECT_TYPE_DEVICE; | MessageID = 0x5821254b | SPIR-V module not valid: Opcode DemoteToHelperInvocation requires one of these capabilities: DemoteToHelperInvocation

cc: mesa-stable

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22582>
This commit is contained in:
Mike Blumenkrantz 2023-04-19 13:32:32 -04:00 committed by Marge Bot
parent 421d3e3c8e
commit 6ddfc5087c

View file

@ -3240,6 +3240,7 @@ emit_intrinsic(struct ntv_context *ctx, nir_intrinsic_instr *intr)
break;
case nir_intrinsic_demote:
spirv_builder_emit_cap(&ctx->builder, SpvCapabilityDemoteToHelperInvocation);
spirv_builder_emit_demote(&ctx->builder);
break;