diff options
author | Rob Clark <[email protected]> | 2018-02-26 18:01:02 -0500 |
---|---|---|
committer | Karol Herbst <[email protected]> | 2019-01-21 20:36:41 +0100 |
commit | fa737042adb02d83c24d6578c294264881e18334 (patch) | |
tree | 31fe193264dc06f1c2425da9a86843c6a8190d50 /src/compiler/spirv/spirv_to_nir.c | |
parent | ce08e5f39cdf5d224eacfe573c567c7083dfa8bf (diff) |
nir/vtn: add caps for some cl related capabilities
vtn supports these, so don't squalk if user is happy with enabling
these.
v2: add new members sorted
Signed-off-by: Karol Herbst <[email protected]>
Reviewed-by: Jason Ekstrand <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/compiler/spirv/spirv_to_nir.c')
-rw-r--r-- | src/compiler/spirv/spirv_to_nir.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c index 4e5be79c9d7..19e4319bd24 100644 --- a/src/compiler/spirv/spirv_to_nir.c +++ b/src/compiler/spirv/spirv_to_nir.c @@ -820,8 +820,10 @@ struct_member_decoration_cb(struct vtn_builder *b, case SpvDecorationFPRoundingMode: case SpvDecorationFPFastMathMode: case SpvDecorationAlignment: - vtn_warn("Decoration only allowed for CL-style kernels: %s", - spirv_decoration_to_string(dec->decoration)); + if (b->shader->info.stage != MESA_SHADER_KERNEL) { + vtn_warn("Decoration only allowed for CL-style kernels: %s", + spirv_decoration_to_string(dec->decoration)); + } break; case SpvDecorationHlslSemanticGOOGLE: @@ -3521,7 +3523,6 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, case SpvCapabilityVector16: case SpvCapabilityFloat16Buffer: case SpvCapabilityFloat16: - case SpvCapabilityInt8: case SpvCapabilitySparseResidency: vtn_warn("Unsupported SPIR-V capability: %s", spirv_capability_to_string(cap)); @@ -3555,6 +3556,9 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, case SpvCapabilityInt64Atomics: spv_check_supported(int64_atomics, cap); + + case SpvCapabilityInt8: + spv_check_supported(int8, cap); break; case SpvCapabilityStorageImageMultisample: @@ -3562,7 +3566,13 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode, break; case SpvCapabilityAddresses: + spv_check_supported(address, cap); + break; + case SpvCapabilityKernel: + spv_check_supported(kernel, cap); + break; + case SpvCapabilityImageBasic: case SpvCapabilityImageReadWrite: case SpvCapabilityImageMipmap: |