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
44 lines
2.3 KiB
HLSL
44 lines
2.3 KiB
HLSL
// RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -finclude-default-header -verify %s
|
|
|
|
Texture2D<float4> t;
|
|
|
|
float4 test_too_few_args() {
|
|
return t.Load(); // expected-error {{no matching member function for call to 'Load'}}
|
|
// expected-note@*:* {{candidate function not viable: requires single argument 'Location', but no arguments were provided}}
|
|
// expected-note@*:* {{candidate function not viable: requires 2 arguments, but 0 were provided}}
|
|
}
|
|
|
|
float4 test_too_many_args(int2 loc) {
|
|
return t.Load(int3(loc, 0), int2(1, 1), 1); // expected-error {{no matching member function for call to 'Load'}}
|
|
// expected-note@*:* {{candidate function not viable: requires 2 arguments, but 3 were provided}}
|
|
// expected-note@*:* {{candidate function not viable: requires single argument 'Location', but 3 arguments were provided}}
|
|
}
|
|
|
|
float4 test_invalid_coord_type(float2 loc) {
|
|
return t.Load(float3(loc, 0)); // expected-warning {{implicit conversion turns floating-point number into integer: 'float3' (aka 'vector<float, 3>') to 'vector<int, 3>'}}
|
|
}
|
|
|
|
float4 test_invalid_offset_type(int2 loc, float2 offset) {
|
|
return t.Load(int3(loc, 0), offset); // expected-warning {{implicit conversion turns floating-point number into integer: 'float2' (aka 'vector<float, 2>') to 'vector<int, 2>'}}
|
|
}
|
|
|
|
float4 test_invalid_location_count(int2 loc) {
|
|
return t.Load(loc); // expected-error {{no matching member function for call to 'Load'}}
|
|
// expected-note@*:* {{candidate function not viable: no known conversion from 'int2' (aka 'vector<int, 2>') to 'vector<int, 3>' (vector of 3 'int' values) for 1st argument}}
|
|
// expected-note@*:* {{candidate function not viable: requires 2 arguments, but 1 was provided}}
|
|
}
|
|
|
|
float4 test_truncated_location_count(int4 loc) {
|
|
return t.Load(loc); // expected-warning {{implicit conversion truncates vector: 'int4' (aka 'vector<int, 4>') to 'vector<int, 3>' (vector of 3 'int' values)}}
|
|
}
|
|
|
|
float4 test_splatted_offset_count(int3 loc, int offset) {
|
|
// No errors expected. The vector will be generated by splatting `offset`.
|
|
return t.Load(loc, offset);
|
|
}
|
|
|
|
|
|
float4 test_truncated_offset_count(int2 loc, int3 offset) {
|
|
return t.Load(int3(loc, 0), offset); // expected-warning {{implicit conversion truncates vector: 'int3' (aka 'vector<int, 3>') to 'vector<int, 2>' (vector of 2 'int' values)}}
|
|
}
|