From 5f7ed91e18472f3508734dd09f0f4e75551fe52d Mon Sep 17 00:00:00 2001 From: David Neto Date: Thu, 12 Nov 2015 15:44:25 -0500 Subject: [PATCH] Support capabilities StorageImageReadWithoutFormat Also add capability StorageImageWriteWithoutFormat. They only affect validation rules. --- readme.md | 4 ++-- source/operand.cpp | 2 ++ source/spirv_definition.h | 2 +- test/OperandCapabilities.cpp | 2 ++ 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/readme.md b/readme.md index a005277..49506eb 100644 --- a/readme.md +++ b/readme.md @@ -27,6 +27,8 @@ information. ## CHANGES (for tools hackers) * Update to 1.0 Rev2 headers, syntax tables. + * Support new capabilities `GeometryStream`, `StorageImageReadWithoutFormat`, + and `StorageImageWriteWithoutFormat`. * Update some capabilities to 1.0 Rev2 rules. * Support `OpSpecConstantOp`. The opcode operand uses the opcode name, but without the `Op` prefix. @@ -313,8 +315,6 @@ done so previously, CMake will detect the existence of Required to complete 1.0 support: * Changes related to capabilities: * Check changes in dependencies on capabilities since 0.99 Rev32. - * `GeometryStream`. - * `StorageImageReadWithoutFormat`, `StorageImageWriteWithoutFormat`. * Update values related to the Generator Magic Number. Its meaning has changed. diff --git a/source/operand.cpp b/source/operand.cpp index 9bb3f5f..e58cde2 100644 --- a/source/operand.cpp +++ b/source/operand.cpp @@ -1002,6 +1002,8 @@ static const spv_operand_desc_t capabilityInfoEntries[] = { CASE_CAP(InterpolationFunction, Shader), CASE_CAP(TransformFeedback, Shader), CASE_CAP(GeometryStreams, Geometry), + CASE_CAP(StorageImageReadWithoutFormat, Shader), + CASE_CAP(StorageImageWriteWithoutFormat, Shader), }; #undef CASE #undef CASE_CAP diff --git a/source/spirv_definition.h b/source/spirv_definition.h index 0517a86..e6efb6b 100644 --- a/source/spirv_definition.h +++ b/source/spirv_definition.h @@ -28,7 +28,7 @@ #define LIBSPIRV_SPIRV_DEFINITION_H_ // A bit mask representing a set of capabilities. -// Currently there are 54 distinct capabilities, so 64 bits +// Currently there are 57 distinct capabilities, so 64 bits // should be enough. typedef uint64_t spv_capability_mask_t; diff --git a/test/OperandCapabilities.cpp b/test/OperandCapabilities.cpp index f983e92..b367579 100644 --- a/test/OperandCapabilities.cpp +++ b/test/OperandCapabilities.cpp @@ -608,6 +608,8 @@ INSTANTIATE_TEST_CASE_P( CASE1(CAPABILITY, CapabilityInterpolationFunction, Shader), CASE1(CAPABILITY, CapabilityTransformFeedback, Shader), CASE1(CAPABILITY, CapabilityGeometryStreams, Geometry), + CASE1(CAPABILITY, CapabilityStorageImageReadWithoutFormat, Shader), + CASE1(CAPABILITY, CapabilityStorageImageWriteWithoutFormat, Shader), })); #undef CASE0 -- 2.7.4