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

Natalie Chouinard via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 13:47:20 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")]
----------------
sudonatalie wrote:

Meeting follow-up: It was suggested that instead of this LLVM IR test, we could instead have a RUN line that references a `.hlsl` test file from frontend tests so that it would also catch changes in the HLSL->LLVM IR path, since this backend tests is so dependent on that translation.

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


More information about the llvm-commits mailing list