From 605d6aaf13aeb4fd9e8f388f6d22f654b8032d0a Mon Sep 17 00:00:00 2001 From: Adam Jackson Date: Thu, 10 Oct 2024 11:47:27 -0400 Subject: [PATCH] vtn: Handle SPV_INTEL_optnone We don't advertise this in rusticl (and probably shouldn't, at least until we can honor the request) but DPC++ emits this regardless so we may as well ignore it. Reviewed-by: Caio Oliveira Reviewed-by: Faith Ekstrand Part-of: --- src/compiler/spirv/spirv_to_nir.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 094f3c89074..3b0f74c5c8e 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -128,6 +128,7 @@ static const struct spirv_capabilities implemented_capabilities = { .MinLod = true, .MultiView = true, .MultiViewport = true, + .OptNoneINTEL = true, // FIXME: make codegen emit the EXT name .PerViewAttributesNV = true, .PhysicalStorageBufferAddresses = true, .QuadControlKHR = true, @@ -4913,6 +4914,15 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, spirv_capability_to_string(cap)); break; + case SpvCapabilityOptNoneEXT: + /* This is a "strong request" not to optimize a function, usually + * because it's a compute shader and the workgroup size etc is + * manually tuned and we shouldn't risk undoing it. Someday! + */ + vtn_info("Not fully supported capability: %s", + spirv_capability_to_string(cap)); + break; + default: vtn_fail_if(!spirv_capabilities_get(&implemented_capabilities, cap), "Unimplemented SPIR-V capability: %s (%u)",