[llvm] [HLSL][SPIR-V] Add SV_DispatchThreadID semantic support (PR #82536)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 16:24:22 PST 2024


================
@@ -0,0 +1,76 @@
+; RUN: llc -O0 -mtriple=spirv-vulkan-unknown %s -o - | FileCheck %s
+; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-vulkan-unknown %s -o - -filetype=obj | spirv-val %}
+
+; This file generated from the following HLSL:
+; clang -cc1 -triple spirv-vulkan-library -x hlsl -emit-llvm -disable-llvm-passes -finclude-default-header -o - DispatchThreadID.hlsl
+;
+; [shader("compute")]
----------------
llvm-beanz wrote:

I don't know the context of that discussion, but I think the change made here is a backend change transforming IR to SPIR-V. It seems to me that the test should be IR->SPIR-V as well.

LLVM's test suite does not depend on building clang, so you can't use a clang run line in an LLVM test, and this code (as an LLVM change) should have a test in LLVM.

https://github.com/llvm/llvm-project/pull/82536


More information about the llvm-commits mailing list