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
123 lines
3.4 KiB
HLSL
123 lines
3.4 KiB
HLSL
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.3-library -fnative-half-type -verify %s
|
|
|
|
// expected-warning@+1{{cannot mix packoffset elements with nonpackoffset elements in a cbuffer}}
|
|
cbuffer Mix
|
|
{
|
|
float4 M1 : packoffset(c0);
|
|
float M2;
|
|
float M3 : packoffset(c1.y);
|
|
}
|
|
|
|
// expected-warning@+1{{cannot mix packoffset elements with nonpackoffset elements in a cbuffer}}
|
|
cbuffer Mix2
|
|
{
|
|
float4 M4;
|
|
float M5 : packoffset(c1.y);
|
|
float M6 ;
|
|
}
|
|
|
|
// expected-error@+1{{attribute 'packoffset' only applies to shader constant in a constant buffer}}
|
|
float4 g : packoffset(c0);
|
|
|
|
cbuffer IllegalOffset
|
|
{
|
|
// expected-error@+1{{invalid resource class specifier 't2' for packoffset, expected 'c'}}
|
|
float4 i1 : packoffset(t2);
|
|
// expected-error@+1{{invalid component 'm' used; expected 'x', 'y', 'z', or 'w'}}
|
|
float i2 : packoffset(c1.m);
|
|
}
|
|
|
|
cbuffer Overlap
|
|
{
|
|
float4 o1 : packoffset(c0);
|
|
// expected-error@+1{{packoffset overlap between 'o2', 'o1'}}
|
|
float2 o2 : packoffset(c0.z);
|
|
}
|
|
|
|
cbuffer CrossReg
|
|
{
|
|
// expected-error@+1{{packoffset cannot cross register boundary}}
|
|
float4 c1 : packoffset(c0.y);
|
|
// expected-error@+1{{packoffset cannot cross register boundary}}
|
|
float2 c2 : packoffset(c1.w);
|
|
}
|
|
|
|
struct ST {
|
|
float s;
|
|
};
|
|
|
|
cbuffer Aggregate
|
|
{
|
|
// expected-error@+1{{register or packoffset bind is not valid}}
|
|
ST A1 : packoffset(c0.y);
|
|
// expected-error@+1{{register or packoffset bind is not valid}}
|
|
float A2[2] : packoffset(c1.w);
|
|
}
|
|
|
|
cbuffer Double {
|
|
// expected-error@+1{{packoffset at 'y' does not match alignment 64 required by 'double'}}
|
|
double d : packoffset(c.y);
|
|
// expected-error@+1{{packoffset cannot cross register boundary}}
|
|
double2 d2 : packoffset(c.z);
|
|
// expected-error@+1{{packoffset cannot cross register boundary}}
|
|
double3 d3 : packoffset(c.z);
|
|
}
|
|
|
|
cbuffer ParsingFail {
|
|
// expected-error@+1{{expected identifier}}
|
|
float pf0 : packoffset();
|
|
// expected-error@+1{{expected identifier}}
|
|
float pf1 : packoffset((c0));
|
|
// expected-error@+1{{expected ')'}}
|
|
float pf2 : packoffset(c0, x);
|
|
// expected-error@+1{{invalid component 'X' used}}
|
|
float pf3 : packoffset(c.X);
|
|
// expected-error@+1{{expected '(' after ''}}
|
|
float pf4 : packoffset;
|
|
// expected-error@+1{{expected identifier}}
|
|
float pf5 : packoffset(;
|
|
// expected-error@+1{{expected '(' after '}}
|
|
float pf6 : packoffset);
|
|
// expected-error@+1{{expected '(' after '}}
|
|
float pf7 : packoffset c0.x;
|
|
|
|
// expected-error@+1{{invalid component 'xy' used}}
|
|
float pf8 : packoffset(c0.xy);
|
|
// expected-error@+1{{invalid component 'rg' used}}
|
|
float pf9 : packoffset(c0.rg);
|
|
// expected-error@+1{{invalid component 'yes' used}}
|
|
float pf10 : packoffset(c0.yes);
|
|
// expected-error@+1{{invalid component 'woo'}}
|
|
float pf11 : packoffset(c0.woo);
|
|
// expected-error@+1{{invalid component 'xr' used}}
|
|
float pf12 : packoffset(c0.xr);
|
|
}
|
|
|
|
struct ST2 {
|
|
float a;
|
|
float2 b;
|
|
};
|
|
|
|
cbuffer S {
|
|
float S0 : packoffset(c0.y);
|
|
ST2 S1[2] : packoffset(c1);
|
|
// expected-error@+1{{packoffset overlap between 'S2', 'S1'}}
|
|
half2 S2 : packoffset(c1.w);
|
|
half2 S3 : packoffset(c2.w);
|
|
}
|
|
|
|
struct ST23 {
|
|
float s0;
|
|
ST2 s1;
|
|
};
|
|
|
|
cbuffer S2 {
|
|
float S20 : packoffset(c0.y);
|
|
ST2 S21 : packoffset(c1);
|
|
half2 S22 : packoffset(c2.w);
|
|
double S23[2] : packoffset(c3);
|
|
// expected-error@+1{{packoffset overlap between 'S24', 'S23'}}
|
|
float S24 : packoffset(c3.z);
|
|
float S25 : packoffset(c4.z);
|
|
}
|