CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
55 lines
1.7 KiB
HLSL
55 lines
1.7 KiB
HLSL
// RUN: %clang_cc1 -finclude-default-header -x hlsl -triple dxil-pc-shadermodel6.3-library %s -emit-llvm -disable-llvm-passes -o - | FileCheck %s
|
|
|
|
// Make sure cbuffer inside namespace works.
|
|
|
|
// CHECK: %"n0::n1::__cblayout_A" = type <{ float }>
|
|
// CHECK: %"n0::__cblayout_B" = type <{ float }>
|
|
// CHECK: %"n0::n2::__cblayout_C" = type <{ float, target("dx.Padding", 12), %"n0::Foo" }>
|
|
// CHECK: %"n0::Foo" = type <{ float }>
|
|
|
|
// CHECK: @A.cb = global target("dx.CBuffer", %"n0::n1::__cblayout_A")
|
|
// CHECK: @_ZN2n02n11aE = external hidden addrspace(2) global float, align 4
|
|
|
|
// CHECK: @B.cb = global target("dx.CBuffer", %"n0::__cblayout_B")
|
|
// CHECK: @_ZN2n01aE = external hidden addrspace(2) global float, align 4
|
|
|
|
// CHECK: @C.cb = global target("dx.CBuffer", %"n0::n2::__cblayout_C")
|
|
// CHECK: @_ZN2n02n21aE = external hidden addrspace(2) global float, align 4
|
|
// CHECK: external hidden addrspace(2) global %"n0::Foo", align 1
|
|
|
|
namespace n0 {
|
|
struct Foo {
|
|
float f;
|
|
};
|
|
|
|
namespace n1 {
|
|
cbuffer A {
|
|
float a;
|
|
}
|
|
}
|
|
cbuffer B {
|
|
float a;
|
|
}
|
|
namespace n2 {
|
|
cbuffer C {
|
|
float a;
|
|
Foo b;
|
|
}
|
|
}
|
|
}
|
|
|
|
float foo() {
|
|
// CHECK: load float, ptr addrspace(2) @_ZN2n02n11aE, align 4
|
|
// CHECK: load float, ptr addrspace(2) @_ZN2n01aE, align 4
|
|
// CHECK: load float, ptr addrspace(2) @_ZN2n02n21aE, align 4
|
|
return n0::n1::a + n0::a + n0::n2::a;
|
|
}
|
|
|
|
[numthreads(4,1,1)]
|
|
void main() {}
|
|
|
|
// CHECK: !hlsl.cbs = !{![[A:[0-9]+]], ![[B:[0-9]+]], ![[C:[0-9]+]]}
|
|
// CHECK: [[A]] = !{ptr @A.cb, ptr addrspace(2) @_ZN2n02n11aE}
|
|
// CHECK: [[B]] = !{ptr @B.cb, ptr addrspace(2) @_ZN2n01aE}
|
|
// CHECK: [[C]] = !{ptr @C.cb, ptr addrspace(2) @_ZN2n02n21aE, ptr addrspace(2) @_ZN2n02n21bE}
|