Is your feature request related to a problem? Please describe.
I've been trying to compile and run some OpenCL C kernels in wgpu as SPIR-V modules and have run into the following validation error within wgpu:
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: UnsupportedInstruction(Type, SpecConstantComposite)', /Users/nicksarten/.cargo/registry/src/github.com-1ecc6299db9ec823/wgpu-0.12.0/src/backend/direct.rs:1022:45
I've had a quick search around to see if anyone else has run into a similar issue, but the closest I found was this issue in naga which seems to suggest that OpConstantComposite is supported by naga at least, but there's no mention of OpSpecConstantComposite.
clspv seems to be using this instruction to define the workgroup size variable, which is a v3uint.
Describe the solution you'd like
I'd like to be able to run this kernel with validation turned on and not get an UnsupportedInstruction error for SpecConstantComposite.
Describe alternatives you've considered
I'm going to attempt to run the kernel using SPIRV-passthrough.
I've attempted tweaking my clspv invocation to change how the work group size is specified. Using --vec3-to-vec4 to force lowering of vec3 to vec4 didn't seem to have any effect on the SPIR-V at all.
Additional context
I've attached the SPIRV disassembly for the relevant kernel.
resize.txt
Is your feature request related to a problem? Please describe.
I've been trying to compile and run some OpenCL C kernels in
wgpu
as SPIR-V modules and have run into the following validation error withinwgpu
:I've had a quick search around to see if anyone else has run into a similar issue, but the closest I found was this issue in
naga
which seems to suggest thatOpConstantComposite
is supported bynaga
at least, but there's no mention ofOpSpecConstantComposite
.clspv
seems to be using this instruction to define the workgroup size variable, which is av3uint
.Describe the solution you'd like I'd like to be able to run this kernel with validation turned on and not get an
UnsupportedInstruction
error forSpecConstantComposite
.Describe alternatives you've considered I'm going to attempt to run the kernel using SPIRV-passthrough.
I've attempted tweaking my
clspv
invocation to change how the work group size is specified. Using--vec3-to-vec4
to force lowering ofvec3
tovec4
didn't seem to have any effect on the SPIR-V at all.Additional context I've attached the SPIRV disassembly for the relevant kernel. resize.txt