
Adds resource name argument to `llvm.dx.handlefrombinding` and `llvm.dx.handlefromimplicitbinding` intrinsics. SPIR-V currently does not seem to need the resource names so this change only affects DirectX binding intrinsics. Part 2/4 of https://github.com/llvm/llvm-project/issues/105059
35 lines
1.1 KiB
LLVM
35 lines
1.1 KiB
LLVM
; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
|
|
|
|
; This test makes sure that resource arrays only add 1 to the count of the
|
|
; number of UAVs for setting the shader flag '64 UAV slots' when the validator
|
|
; version is < 1.6
|
|
|
|
target triple = "dxil-pc-shadermodel6.7-library"
|
|
|
|
; CHECK: Combined Shader Flags for Module
|
|
; CHECK-NEXT: Shader Flags Value: 0x00010000
|
|
|
|
; CHECK: Note: shader requires additional functionality:
|
|
; CHECK: UAVs at every shader stage
|
|
; CHECK-NOT: 64 UAV slots
|
|
|
|
; CHECK: Function test : 0x00010000
|
|
define void @test() "hlsl.export" {
|
|
; RWBuffer<float> Buf : register(u0, space0)
|
|
%buf0 = call target("dx.TypedBuffer", float, 1, 0, 1)
|
|
@llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0t(
|
|
i32 0, i32 0, i32 1, i32 0, i1 false, ptr null)
|
|
|
|
; RWBuffer<float> Buf[8] : register(u1, space0)
|
|
%buf1 = call target("dx.TypedBuffer", float, 1, 0, 1)
|
|
@llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0t(
|
|
i32 0, i32 1, i32 8, i32 0, i1 false, ptr null)
|
|
ret void
|
|
}
|
|
|
|
!dx.valver = !{!1}
|
|
!1 = !{i32 1, i32 5}
|
|
|
|
!llvm.module.flags = !{!0}
|
|
!0 = !{i32 1, !"dx.resmayalias", i32 1}
|