Support capabilities StorageImageReadWithoutFormat
authorDavid Neto <dneto@google.com>
Thu, 12 Nov 2015 20:44:25 +0000 (15:44 -0500)
committerDavid Neto <dneto@google.com>
Thu, 12 Nov 2015 21:27:51 +0000 (16:27 -0500)
Also add capability StorageImageWriteWithoutFormat.

They only affect validation rules.

readme.md
source/operand.cpp
source/spirv_definition.h
test/OperandCapabilities.cpp

index a005277..49506eb 100644 (file)
--- 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.
 
index 9bb3f5f..e58cde2 100644 (file)
@@ -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
index 0517a86..e6efb6b 100644 (file)
@@ -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;
 
index f983e92..b367579 100644 (file)
@@ -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