[llvm] [SPIRV] Implement handle_fromBinding intrinsic. (PR #111052)
Steven Perron via llvm-commits
llvm-commits at lists.llvm.org
Fri Oct 4 07:09:04 PDT 2024
================
@@ -0,0 +1,28 @@
+; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv-vulkan-library %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-library %s -o - -filetype=obj | spirv-val %}
+
+; CHECK-DAG: OpDecorate [[BufferVar:%[0-9]+]] DescriptorSet 16
+; CHECK-DAG: OpDecorate [[BufferVar]] Binding 7
+
+; CHECK: [[float:%[0-9]+]] = OpTypeFloat 32
+; CHECK: [[RWBufferType:%[0-9]+]] = OpTypeImage [[float]] Buffer 2 0 0 2 R32i {{$}}
+; CHECK: [[BufferPtrType:%[0-9]+]] = OpTypePointer UniformConstant [[RWBufferType]]
----------------
s-perron wrote:
In this case, they have to be in that order because they depend on each other. The pointer uses the image, which uses the float.
https://github.com/llvm/llvm-project/pull/111052
More information about the llvm-commits
mailing list