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
2.1 KiB
C
55 lines
2.1 KiB
C
// RUN: %clang_cc1 %s -triple spirv-pc-vulkan-compute -verify
|
|
|
|
typedef float float2 __attribute__((ext_vector_type(2)));
|
|
typedef float float3 __attribute__((ext_vector_type(3)));
|
|
|
|
float2 test_no_second_arg(float2 p0) {
|
|
return __builtin_spirv_smoothstep(p0);
|
|
// expected-error@-1 {{too few arguments to function call, expected 3, have 1}}
|
|
}
|
|
|
|
float2 test_no_third_arg(float2 p0) {
|
|
return __builtin_spirv_smoothstep(p0, p0);
|
|
// expected-error@-1 {{too few arguments to function call, expected 3, have 2}}
|
|
}
|
|
|
|
float2 test_too_many_arg(float2 p0) {
|
|
return __builtin_spirv_smoothstep(p0, p0, p0, p0);
|
|
// expected-error@-1 {{too many arguments to function call, expected 3, have 4}}
|
|
}
|
|
|
|
int test_int_scalar_inputs(int p0) {
|
|
return __builtin_spirv_smoothstep(p0, p0, p0);
|
|
// expected-error@-1 {{1st argument must be a scalar or vector of floating-point types (was 'int')}}
|
|
}
|
|
|
|
float test_int_scalar_inputs2(float p0, int p1) {
|
|
return __builtin_spirv_smoothstep(p0, p1, p1);
|
|
// expected-error@-1 {{all arguments to '__builtin_spirv_smoothstep' must have the same type}}
|
|
}
|
|
|
|
float test_int_scalar_inputs3(float p0, int p1) {
|
|
return __builtin_spirv_smoothstep(p0, p0, p1);
|
|
// expected-error@-1 {{all arguments to '__builtin_spirv_smoothstep' must have the same type}}
|
|
}
|
|
|
|
float test_mismatched_arg(float p0, float2 p1) {
|
|
return __builtin_spirv_smoothstep(p0, p1, p1);
|
|
// expected-error@-1 {{all arguments to '__builtin_spirv_smoothstep' must have the same type}}
|
|
}
|
|
|
|
float test_mismatched_arg2(float p0, float2 p1) {
|
|
return __builtin_spirv_smoothstep(p0, p0, p1);
|
|
// expected-error@-1 {{all arguments to '__builtin_spirv_smoothstep' must have the same type}}
|
|
}
|
|
|
|
float test_mismatched_return(float2 p0) {
|
|
return __builtin_spirv_smoothstep(p0, p0, p0);
|
|
// expected-error@-1 {{returning 'float2' (vector of 2 'float' values) from a function with incompatible result type 'float'}}
|
|
}
|
|
|
|
float3 test_mismatched_return2(float2 p0) {
|
|
return __builtin_spirv_smoothstep(p0, p0, p0);
|
|
// expected-error@-1 {{returning 'float2' (vector of 2 'float' values) from a function with incompatible result type 'float3' (vector of 3 'float' values)}}
|
|
}
|