this patch updates the shader flags to account for 0 being used to represent unbounded arrays. This was a missed updated from the previous pr #186022. This change is required to make sure the following offload test pass dxv validation: ``` OffloadTest-clang-d3d12 :: Feature/ResourceArrays/multi-dim-unbounded-array-nuri.test OffloadTest-clang-d3d12 :: Feature/ResourceArrays/multi-dim-unbounded-array.test OffloadTest-clang-d3d12 :: Feature/ResourceArrays/unbounded-array-nuri.test OffloadTest-clang-d3d12 :: Feature/ResourceArrays/unbounded-array.test ``` --------- Co-authored-by: Joao Saffran <jderezende@microsoft.com>
37 lines
1.2 KiB
LLVM
37 lines
1.2 KiB
LLVM
; RUN: opt -S --passes="print-dx-shader-flags" 2>&1 %s | FileCheck %s
|
|
; RUN: llc %s --filetype=obj -o - | obj2yaml | FileCheck %s --check-prefix=OBJ
|
|
|
|
; This test makes sure that no overflow is happening when a resource is followed
|
|
; by an unbounded array of UAVs.
|
|
|
|
target triple = "dxil-pc-shadermodel6.7-library"
|
|
|
|
; CHECK: Combined Shader Flags for Module
|
|
; CHECK-NEXT: Shader Flags Value: 0x200018000
|
|
|
|
; CHECK: Note: shader requires additional functionality:
|
|
; CHECK: UAVs at every shader stage
|
|
; CHECK: 64 UAV slots
|
|
|
|
; CHECK: Function test : 0x200018000
|
|
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, ptr null)
|
|
|
|
; RWBuffer<float> Buf[] : 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 0, i32 0, ptr null)
|
|
ret void
|
|
}
|
|
|
|
!dx.valver = !{!1}
|
|
!1 = !{i32 1, i32 6}
|
|
|
|
; OBJ: - Name: SFI0
|
|
; OBJ-NEXT: Size: 8
|
|
; OBJ-NEXT: Flags:
|
|
; OBJ: Max64UAVs: true
|