Skip to content

Commit 5e715f8

Browse files
committed
Remove isROV from VulkanBuffer type.
1 parent 34dbed3 commit 5e715f8

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

llvm/docs/SPIRVUsage.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ using target extension types and are represented as follows:
255255
OpTypeQueue ``spirv.Queue`` (none)
256256
OpTypePipe ``spirv.Pipe`` access qualifier
257257
OpTypePipeStorage ``spirv.PipeStorage`` (none)
258-
NA ``spirv.VulkanBuffer`` ElementType, StorageClass, IsWriteable, IsROV
258+
NA ``spirv.VulkanBuffer`` ElementType, StorageClass, IsWriteable
259259
================== ======================= ===========================================================================================
260260

261261
All integer arguments take the same value as they do in their `corresponding

llvm/lib/Target/SPIRV/SPIRVBuiltins.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3046,9 +3046,9 @@ static SPIRVType *getVulkanBufferType(const TargetExtType *ExtensionType,
30463046
SPIRVGlobalRegistry *GR) {
30473047
assert(ExtensionType->getNumTypeParameters() == 1 &&
30483048
"Vulkan buffers have exactly one type for the type of the buffer.");
3049-
assert(ExtensionType->getNumIntParameters() == 3 &&
3050-
"Vulkan buffer have 3 integer parameters: storage class, is writable, "
3051-
"and is rov");
3049+
assert(ExtensionType->getNumIntParameters() == 2 &&
3050+
"Vulkan buffer have 2 integer parameters: storage class and is "
3051+
"writable.");
30523052

30533053
auto *T = StructType::create(ExtensionType->getTypeParameter(0));
30543054
auto *BlockType = GR->getOrCreateSPIRVType(

llvm/test/CodeGen/SPIRV/hlsl-resources/StructuredBuffer.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1"
55

66
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(none)
7-
declare target("spirv.VulkanBuffer", [0 x i32], 12, 0, 0) @llvm.spv.resource.handlefrombinding.tspirv.VulkanBuffer_a0i32_12_0_0t(i32, i32, i32, i32, i1) #0
7+
declare target("spirv.VulkanBuffer", [0 x i32], 12, 0) @llvm.spv.resource.handlefrombinding.tspirv.VulkanBuffer_a0i32_12_0t(i32, i32, i32, i32, i1) #0
88

99
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(none)
1010
declare target("spirv.Image", i32, 5, 2, 0, 0, 2, 0) @llvm.spv.resource.handlefrombinding.tspirv.Image_i32_5_2_0_0_2_0t(i32, i32, i32, i32, i1) #0
@@ -31,12 +31,12 @@ declare target("spirv.Image", i32, 5, 2, 0, 0, 2, 0) @llvm.spv.resource.handlefr
3131
define void @main() local_unnamed_addr #1 {
3232
entry:
3333
; CHECK: [[BufferHandle:%.+]] = OpCopyObject [[BufferPtrType]] [[BufferVar]]
34-
%i_h.i.i = tail call target("spirv.VulkanBuffer", [0 x i32], 12, 0, 0) @llvm.spv.resource.handlefrombinding.tspirv.VulkanBuffer_a0i32_12_0_0t(i32 0, i32 0, i32 1, i32 0, i1 false)
34+
%i_h.i.i = tail call target("spirv.VulkanBuffer", [0 x i32], 12, 0) @llvm.spv.resource.handlefrombinding.tspirv.VulkanBuffer_a0i32_12_0t(i32 0, i32 0, i32 1, i32 0, i1 false)
3535

3636
%o_h.i.i = tail call target("spirv.Image", i32, 5, 2, 0, 0, 2, 0) @llvm.spv.resource.handlefrombinding.tspirv.Image_i32_5_2_0_0_2_0t(i32 0, i32 1, i32 1, i32 0, i1 false)
3737

3838
; CHECK: [[AC:%.+]] = OpAccessChain {{.*}} [[BufferHandle]] [[zero]] [[one]]
39-
%0 = tail call noundef align 4 dereferenceable(4) ptr addrspace(11) @llvm.spv.resource.getpointer.p11.tspirv.VulkanBuffer_a0i32_12_0_0t(target("spirv.VulkanBuffer", [0 x i32], 12, 0, 0) %i_h.i.i, i32 1)
39+
%0 = tail call noundef align 4 dereferenceable(4) ptr addrspace(11) @llvm.spv.resource.getpointer.p11.tspirv.VulkanBuffer_a0i32_12_0t(target("spirv.VulkanBuffer", [0 x i32], 12, 0) %i_h.i.i, i32 1)
4040

4141
; CHECK: [[LD:%.+]] = OpLoad [[int]] [[AC]] Aligned 4
4242
%1 = load i32, ptr addrspace(11) %0, align 4, !tbaa !3
@@ -53,7 +53,7 @@ entry:
5353
declare ptr addrspace(11) @llvm.spv.resource.getpointer.p11.tspirv.Image_i32_5_2_0_0_2_0t(target("spirv.Image", i32, 5, 2, 0, 0, 2, 0), i32) #0
5454

5555
; Function Attrs: mustprogress nocallback nofree nosync nounwind willreturn memory(none)
56-
declare ptr addrspace(11) @llvm.spv.resource.getpointer.p11.tspirv.VulkanBuffer_a0i32_12_0_0t(target("spirv.VulkanBuffer", [0 x i32], 12, 0, 0), i32) #0
56+
declare ptr addrspace(11) @llvm.spv.resource.getpointer.p11.tspirv.VulkanBuffer_a0i32_12_0t(target("spirv.VulkanBuffer", [0 x i32], 12, 0), i32) #0
5757

5858
attributes #0 = { mustprogress nocallback nofree nosync nounwind willreturn memory(none) }
5959
attributes #1 = { mustprogress nofree noinline norecurse nosync nounwind willreturn memory(readwrite, inaccessiblemem: none) "approx-func-fp-math"="false" "frame-pointer"="all" "hlsl.numthreads"="1,1,1" "hlsl.shader"="compute" "no-infs-fp-math"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="true" "stack-protector-buffer-size"="8" }

0 commit comments

Comments
 (0)