Mesa (main): microsoft/clc: Add a unit test for unused image kernel args

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon Jun 27 17:04:33 UTC 2022


Module: Mesa
Branch: main
Commit: 59944831a794e3797839fd7066e34c802c69d43e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=59944831a794e3797839fd7066e34c802c69d43e

Author: Jesse Natalie <jenatali at microsoft.com>
Date:   Sun Jun 26 21:09:07 2022 -0700

microsoft/clc: Add a unit test for unused image kernel args

Reviewed-by: Bill Kristiansen <billkris at microsoft.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17246>

---

 src/microsoft/clc/clc_compiler_test.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/microsoft/clc/clc_compiler_test.cpp b/src/microsoft/clc/clc_compiler_test.cpp
index 7172894ac0b..19ec352d931 100644
--- a/src/microsoft/clc/clc_compiler_test.cpp
+++ b/src/microsoft/clc/clc_compiler_test.cpp
@@ -1558,6 +1558,16 @@ TEST_F(ComputeTest, image_two_reads)
    validate(shader);
 }
 
+TEST_F(ComputeTest, image_unused)
+{
+   const char* kernel_source =
+   "__kernel void main_test(read_only image2d_t input, write_only image2d_t output)\n\
+   {\n\
+   }\n";
+   Shader shader = compile(std::vector<const char*>({ kernel_source }));
+   validate(shader);
+}
+
 TEST_F(ComputeTest, image_read_write)
 {
    const char *kernel_source =



More information about the mesa-commit mailing list