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
62 lines
2.3 KiB
HLSL
62 lines
2.3 KiB
HLSL
// RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -fnative-int16-type -disable-llvm-passes -verify
|
|
|
|
void test_too_few_arg()
|
|
{
|
|
return cross();
|
|
// expected-error@-1 {{no matching function for call to 'cross'}}
|
|
// expected-note@hlsl/hlsl_alias_intrinsics_gen.inc:* {{candidate function not viable: requires 2 arguments, but 0 were provided}}
|
|
// expected-note@hlsl/hlsl_alias_intrinsics_gen.inc:* {{candidate function not viable: requires 2 arguments, but 0 were provided}}
|
|
}
|
|
|
|
void test_too_few_arg_f32()
|
|
{
|
|
return __builtin_hlsl_crossf32();
|
|
// expected-error@-1 {{too few arguments to function call, expected 2, have 0}}
|
|
}
|
|
|
|
void test_too_few_arg_f16()
|
|
{
|
|
return __builtin_hlsl_crossf16();
|
|
// expected-error@-1 {{too few arguments to function call, expected 2, have 0}}
|
|
}
|
|
|
|
void test_too_many_arg(float3 p0)
|
|
{
|
|
return cross(p0, p0, p0);
|
|
// expected-error@-1 {{no matching function for call to 'cross'}}
|
|
// expected-note@hlsl/hlsl_alias_intrinsics_gen.inc:* {{candidate function not viable: requires 2 arguments, but 3 were provided}}
|
|
// expected-note@hlsl/hlsl_alias_intrinsics_gen.inc:* {{candidate function not viable: requires 2 arguments, but 3 were provided}}
|
|
}
|
|
|
|
void test_too_many_arg_f32(float3 p0)
|
|
{
|
|
return __builtin_hlsl_crossf32(p0, p0, p0);
|
|
// expected-error@-1 {{too many arguments to function call, expected 2, have 3}}
|
|
}
|
|
|
|
void test_too_many_arg_f16(half3 p0)
|
|
{
|
|
return __builtin_hlsl_crossf16(p0, p0, p0);
|
|
// expected-error@-1 {{too many arguments to function call, expected 2, have 3}}
|
|
}
|
|
|
|
bool2 builtin_cross_int2_to_float2_promotion(int2 p1)
|
|
{
|
|
return __builtin_hlsl_crossf32(p1, p1);
|
|
// expected-error@-1 {{cannot initialize a parameter of type 'vector<float, 3>' (vector of 3 'float' values) with an lvalue of type 'int2' (aka 'vector<int, 2>')}}
|
|
}
|
|
|
|
float2 builtin_cross_float2(float2 p1, float2 p2)
|
|
{
|
|
return __builtin_hlsl_crossf32(p1, p2);
|
|
// expected-error@-1 {{cannot initialize a parameter of type 'vector<float, 3>' (vector of 3 'float' values) with an lvalue of type 'float2' (aka 'vector<float, 2>')}}
|
|
}
|
|
|
|
void test_ambiguous(int p0)
|
|
{
|
|
return cross(p0,p0);
|
|
// expected-error@-1 {{call to 'cross' is ambiguous}}
|
|
// expected-note@hlsl/hlsl_alias_intrinsics_gen.inc:* {{candidate function}}
|
|
// expected-note@hlsl/hlsl_alias_intrinsics_gen.inc:* {{candidate function}}
|
|
}
|