brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · e83ea60 Raw
35 lines · plain
1; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s2 3; This test makes sure that resource arrays only add 1 to the count of the4; number of UAVs for setting the shader flag '64 UAV slots' when the validator5; version is < 1.66 7target triple = "dxil-pc-shadermodel6.7-library"8 9; CHECK:      Combined Shader Flags for Module10; CHECK-NEXT: Shader Flags Value: 0x0001000011 12; CHECK: Note: shader requires additional functionality:13; CHECK:    UAVs at every shader stage14; CHECK-NOT:    64 UAV slots15 16; CHECK: Function test : 0x0001000017define void @test() "hlsl.export" {18  ; RWBuffer<float> Buf : register(u0, space0)19  %buf0 = call target("dx.TypedBuffer", float, 1, 0, 1)20       @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0t(21           i32 0, i32 0, i32 1, i32 0, ptr null)22 23  ; RWBuffer<float> Buf[8] : register(u1, space0)24  %buf1 = call target("dx.TypedBuffer", float, 1, 0, 1)25       @llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_f32_1_0t(26           i32 0, i32 1, i32 8, i32 0, ptr null)27  ret void28}29 30!dx.valver = !{!1}31!1 = !{i32 1, i32 5}32 33!llvm.module.flags = !{!0}34!0 = !{i32 1, !"dx.resmayalias", i32 1}35