
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
22 lines
906 B
LLVM
22 lines
906 B
LLVM
; We use llc for this test so that we don't abort after the first error.
|
|
; RUN: not llc %s -o /dev/null 2>&1 | FileCheck %s
|
|
|
|
target triple = "dxil-pc-shadermodel6.6-compute"
|
|
|
|
; CHECK: error:
|
|
; CHECK-SAME: in function storetoomany
|
|
; CHECK-SAME: Buffer store data must have at most 4 elements
|
|
define void @storetoomany(<5 x float> %data, i32 %index) "hlsl.export" {
|
|
%buffer = call target("dx.TypedBuffer", <4 x float>, 1, 0, 0)
|
|
@llvm.dx.resource.handlefrombinding.tdx.TypedBuffer_v4f32_1_0_0(
|
|
i32 0, i32 0, i32 1, i32 0, i1 false, ptr null)
|
|
|
|
call void @llvm.dx.resource.store.typedbuffer.tdx.TypedBuffer_v4f32_1_0_0t.v5f32(
|
|
target("dx.TypedBuffer", <4 x float>, 1, 0, 0) %buffer,
|
|
i32 %index, <5 x float> %data)
|
|
|
|
ret void
|
|
}
|
|
|
|
declare void @llvm.dx.resource.store.typedbuffer.tdx.TypedBuffer_v4f32_1_0_0t.v5f32(target("dx.TypedBuffer", <4 x float>, 1, 0, 0), i32, <5 x float>)
|