[llvm] Set shader analysis flag EnableRawAndStructuredBuffers for RawBuffer and StructuredBuffer resource types (PR #114449)
Tex Riddell via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 6 17:10:12 PST 2024
================
@@ -0,0 +1,23 @@
+; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
+
+target triple = "dxil-pc-shadermodel6.3-compute"
+
+ at G = external constant <4 x float>, align 4
+
+define void @test_bufferflags() {
+
+ ; ByteAddressBuffer Buf : register(t8, space1)
+ %srv0 = call target("dx.RawBuffer", i8, 0, 0)
+ @llvm.dx.handle.fromBinding.tdx.RawBuffer_i8_0_0t(
+ i32 1, i32 8, i32 1, i32 0, i1 false)
+
+ ret void
+}
+
+attributes #0 = { nocallback nofree nosync nounwind willreturn memory(none) }
+
+; CHECK: ; Shader Flags Value: 0x00000010
+; CHECK: ; Note: shader requires additional functionality:
+; CHECK-NEXT: ; Note: extra DXIL module flags:
+; CHECK-NEXT: ; D3D11_SB_GLOBAL_FLAG_ENABLE_RAW_AND_STRUCTURED_BUFFERS
----------------
tex3d wrote:
I've opened https://github.com/microsoft/DirectXShaderCompiler/issues/7003 to track removal for validation.
https://github.com/llvm/llvm-project/pull/114449
More information about the llvm-commits
mailing list