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>
(cherry picked from commit 6ddfc5087c)
This commit is contained in:
Mike Blumenkrantz 2023-04-19 13:32:32 -04:00 committed by Eric Engestrom
parent 6f9c1af4a0
commit 31170a8586
2 changed files with 2 additions and 1 deletions

View file

@ -355,7 +355,7 @@
"description": "zink: emit demote cap when using demote",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

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;