diff options
author | Jason Ekstrand <[email protected]> | 2016-06-02 13:43:19 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2016-06-03 19:29:28 -0700 |
commit | 5a1e56f344c0007f877ada78721c33d4fe61419a (patch) | |
tree | 8c2884aa4f50123b386e29a1affa6a9beb12808b /src/compiler/spirv/spirv_to_nir.c | |
parent | 9fa958e95b9ffd61283d20d5d14a0ac007c1def7 (diff) |
nir/spirv: Complete the list of capabilities
Previously we supported a subset of capabilities and just left a default
case for the others. It's time to stop being lazy and actually audit the
capabilities. This should bring them up-to-date with reality.
Signed-off-by: Jason Ekstrand <[email protected]>
Cc: "12.0" <[email protected]>
Diffstat (limited to 'src/compiler/spirv/spirv_to_nir.c')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 48 |
1 files changed, 45 insertions, 3 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index cece645c6bc..d51089f3c88 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -2266,7 +2266,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, case SpvCapabilityMatrix: case SpvCapabilityShader: case SpvCapabilityGeometry: - case SpvCapabilityTessellationPointSize: case SpvCapabilityGeometryPointSize: case SpvCapabilityUniformBufferArrayDynamicIndexing: case SpvCapabilitySampledImageArrayDynamicIndexing: @@ -2280,14 +2279,57 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, case SpvCapabilitySampledBuffer: case SpvCapabilityImageBuffer: case SpvCapabilityImageQuery: + case SpvCapabilityDerivativeControl: + case SpvCapabilityInterpolationFunction: + case SpvCapabilityMultiViewport: break; case SpvCapabilityClipDistance: case SpvCapabilityCullDistance: case SpvCapabilityGeometryStreams: + /* glslang sometimes throws these at us even though it doesn't + * actually use the associated variable. + */ fprintf(stderr, "WARNING: Unsupported SPIR-V Capability\n"); break; - default: - assert(!"Unsupported capability"); + case SpvCapabilityTessellation: + case SpvCapabilityTessellationPointSize: + case SpvCapabilityLinkage: + case SpvCapabilityVector16: + case SpvCapabilityFloat16Buffer: + case SpvCapabilityFloat16: + case SpvCapabilityFloat64: + case SpvCapabilityInt64: + case SpvCapabilityInt64Atomics: + case SpvCapabilityAtomicStorage: + case SpvCapabilityInt16: + case SpvCapabilityImageGatherExtended: + case SpvCapabilityStorageImageMultisample: + case SpvCapabilityImageCubeArray: + case SpvCapabilitySampleRateShading: + case SpvCapabilityInt8: + case SpvCapabilityInputAttachment: + case SpvCapabilitySparseResidency: + case SpvCapabilityMinLod: + case SpvCapabilityImageMSArray: + case SpvCapabilityStorageImageExtendedFormats: + case SpvCapabilityTransformFeedback: + case SpvCapabilityStorageImageReadWithoutFormat: + case SpvCapabilityStorageImageWriteWithoutFormat: + unreachable("Unsupported SPIR-V Capability"); + break; + + case SpvCapabilityAddresses: + case SpvCapabilityKernel: + case SpvCapabilityImageBasic: + case SpvCapabilityImageReadWrite: + case SpvCapabilityImageMipmap: + case SpvCapabilityPipes: + case SpvCapabilityGroups: + case SpvCapabilityDeviceEnqueue: + case SpvCapabilityLiteralSampler: + case SpvCapabilityGenericPointer: + unreachable("Unsupported OpenCL-style Capability"); + break; } break; } |