Browse Source

[spirv] CheckAccessFullyMapped unsupported error (#824)

Ehsan 7 years ago
parent
commit
06aadc4789

+ 4 - 0
docs/SPIR-V.rst

@@ -2248,6 +2248,8 @@ either because of no Vulkan equivalents at the moment, or because of deprecation
   emit a warning and ignore it.
 * ``abort()`` intrinsic function: no Vulkan equivalent. The compiler will emit
   an error.
+* ``CheckAccessFullyMapped()`` intrinsic function: no Vulkan equivalent.
+  The compiler will emit an error.
 * ``GetRenderTargetSampleCount()`` intrinsic function: no Vulkan equivalent.
   (Its GLSL counterpart is ``gl_NumSamples``, which is not available in GLSL for
   Vulkan.) The compiler will emit an error.
@@ -2265,3 +2267,5 @@ either because of no Vulkan equivalents at the moment, or because of deprecation
 * ``.GetSamplePosition()`` intrinsic method: no Vulkan equivalent.
   (``gl_SamplePosition`` provides similar functionality but it's only for the
   sample currently being processed.) The compiler will emit an error.
+* ``SV_InnerCoverage`` semantic does not have a Vulkan equivalent. The compiler
+  will emit an error.

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

@@ -4345,6 +4345,7 @@ SpirvEvalInfo SPIRVEmitter::processIntrinsicCallExpr(const CallExpr *callExpr) {
     retVal = processIntrinsicF32ToF16(callExpr);
     break;
   case hlsl::IntrinsicOp::IOP_abort:
+  case hlsl::IntrinsicOp::IOP_CheckAccessFullyMapped:
   case hlsl::IntrinsicOp::IOP_GetRenderTargetSampleCount:
   case hlsl::IntrinsicOp::IOP_GetRenderTargetSamplePosition: {
     emitError("no equivalent for %0 intrinsic function in Vulkan",

+ 8 - 0
tools/clang/test/CodeGenSPIRV/intrinsics.check-access-fully-mapped.hlsl

@@ -0,0 +1,8 @@
+// Run: %dxc -T ps_6_0 -E main
+
+void main() {
+  uint status;
+  bool fullyMapped = CheckAccessFullyMapped(status);
+}
+
+// CHECK: error: no equivalent for CheckAccessFullyMapped intrinsic function in Vulkan

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

@@ -794,6 +794,9 @@ TEST_F(FileTest, IntrinsicsAtan2) { runFileTest("intrinsics.atan2.hlsl"); }
 TEST_F(FileTest, IntrinsicsAbort) {
   runFileTest("intrinsics.abort.hlsl", Expect::Failure);
 }
+TEST_F(FileTest, IntrinsicsCheckAccessFullyMapped) {
+  runFileTest("intrinsics.check-access-fully-mapped.hlsl", Expect::Failure);
+}
 TEST_F(FileTest, IntrinsicsGetRenderTargetSampleCount) {
   runFileTest("intrinsics.get-render-target-sample-count.hlsl",
               Expect::Failure);