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 <caio.oliveira@intel.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31592>
This commit is contained in:
Adam Jackson 2024-10-10 11:47:27 -04:00 committed by Marge Bot
parent f87072f5b0
commit 605d6aaf13

View file

@ -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)",