Просмотр исходного кода

[spirv] Update Spriv-tools and Spriv-Headers (#1764)

* Update spirv-tools and spirv-headers.

Update the submodules.  There is no particular commit that is needed, but
it is good to not fall too far behind.

* Remove AtomicCounter bit on atomic operations.

The bit is ignored in the vulkan environment.  It does nothing.

* Update tests.
Steven Perron 6 лет назад
Родитель
Сommit
00554fc8ab

+ 1 - 1
external/SPIRV-Headers

@@ -1 +1 @@
-Subproject commit d5b2e1255f706ce1f88812217e9a554f299848af
+Subproject commit 17da9f8231f78cf519b4958c2229463a63ead9e2

+ 1 - 1
external/SPIRV-Tools

@@ -1 +1 @@
-Subproject commit 6e85d1a6fc75c4d37ccf7772fbb05e11b4fd69b0
+Subproject commit 248debf55ad6de4a80f6d4a128ef195b6ed05a30

+ 1 - 1
tools/clang/lib/SPIRV/InstBuilderAuto.cpp

@@ -16,7 +16,7 @@
 namespace clang {
 namespace spirv {
 
-static_assert(spv::Version == 0x00010300 && spv::Revision == 1,
+static_assert(spv::Version == 0x00010300 && spv::Revision == 6,
               "Needs to regenerate outdated InstBuilder");
 
 namespace {

+ 0 - 1
tools/clang/lib/SPIRV/SPIRVEmitter.cpp

@@ -7864,7 +7864,6 @@ uint32_t SPIRVEmitter::processIntrinsicMemoryBarrier(const CallExpr *callExpr,
       spv::MemorySemanticsMask::ImageMemory |
       spv::MemorySemanticsMask::UniformMemory |
       spv::MemorySemanticsMask::WorkgroupMemory |
-      spv::MemorySemanticsMask::AtomicCounterMemory |
       spv::MemorySemanticsMask::AcquireRelease;
 
   // Get <result-id> for execution scope.

+ 2 - 2
tools/clang/test/CodeGenSPIRV/intrinsics.allmemorybarrier.hlsl

@@ -1,9 +1,9 @@
 // Run: %dxc -T cs_6_0 -E main
 
 // Memory scope : Device = 0x1 = 1
-// Semantics: ImageMemory | AtomicCounterMemory | UniformMemory | WorkgroupMemory | AcquireRelease = 0x800 | 0x400 | 0x40 | 0x100 | 0x8 = 3400
+// Semantics: ImageMemory | UniformMemory | WorkgroupMemory | AcquireRelease = 0x800 | 0x40 | 0x100 | 0x8 = 2376
 
 void main() {
-// CHECK: OpMemoryBarrier %uint_1 %uint_3400
+// CHECK: OpMemoryBarrier %uint_1 %uint_2376
   AllMemoryBarrier();
 }

+ 2 - 2
tools/clang/test/CodeGenSPIRV/intrinsics.allmemorybarrierwithgroupsync.hlsl

@@ -2,9 +2,9 @@
 
 // Execution scope : Workgroup = 0x2 = 2
 // Memory scope : Device = 0x1 = 1
-// Semantics: ImageMemory | AtomicCounterMemory | UniformMemory | WorkgroupMemory | AcquireRelease = 0x800 | 0x400 | 0x40 | 0x100 | 0x8 = 3400
+// Semantics: ImageMemory | UniformMemory | WorkgroupMemory | AcquireRelease = 0x800 | 0x40 | 0x100 | 0x8 = 2376
 
 void main() {
-// CHECK: OpControlBarrier %uint_2 %uint_1 %uint_3400
+// CHECK: OpControlBarrier %uint_2 %uint_1 %uint_2376
   AllMemoryBarrierWithGroupSync();
 }

+ 1 - 0
tools/clang/unittests/SPIRV/CodeGenSPIRVTest.cpp

@@ -88,6 +88,7 @@ TEST_F(FileTest, StructuredBufferType) {
   runFileTest("type.structured-buffer.hlsl");
 }
 TEST_F(FileTest, StructuredByteBufferArray) {
+  setRelaxLogicalPointer();
   runFileTest("type.structured-buffer.array.hlsl");
 }
 TEST_F(FileTest, StructuredByteBufferArrayError) {