xref: /aosp_15_r20/external/deqp/external/vulkancts/modules/vulkan/texture/vktTextureSubgroupLodTests.cpp (revision 35238bce31c2a825756842865a792f8cf7f89930)
1 /*------------------------------------------------------------------------
2  * Vulkan Conformance Tests
3  * ------------------------
4  *
5  * Copyright (c) 2019 The Khronos Group Inc.
6  * Copyright (c) 2019 Google Inc.
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  *//*!
21  * \file
22  * \brief Subgroup LOD tests.
23  *//*--------------------------------------------------------------------*/
24 
25 #include "vktTextureSubgroupLodTests.hpp"
26 #include "vktAmberTestCase.hpp"
27 #include "vktTestGroupUtil.hpp"
28 
29 using namespace vk;
30 
31 namespace vkt
32 {
33 namespace texture
34 {
35 namespace
36 {
37 
populateSubgroupLodTests(tcu::TestCaseGroup * group)38 void populateSubgroupLodTests(tcu::TestCaseGroup *group)
39 {
40 #ifndef CTS_USES_VULKANSC
41     tcu::TestContext &testCtx = group->getTestContext();
42     cts_amber::AmberTestCase *testCaseLod =
43         cts_amber::createAmberTestCase(testCtx, "texturelod", "texture/subgroup_lod", "texture_lod.amber");
44     cts_amber::AmberTestCase *testCaseGrad =
45         cts_amber::createAmberTestCase(testCtx, "texturegrad", "texture/subgroup_lod", "texture_grad.amber");
46     cts_amber::AmberTestCase *testCaseFetch =
47         cts_amber::createAmberTestCase(testCtx, "texelfetch", "texture/subgroup_lod", "texel_fetch.amber");
48 
49     group->addChild(testCaseLod);
50     group->addChild(testCaseGrad);
51     group->addChild(testCaseFetch);
52 #else
53     DE_UNREF(group);
54 #endif
55 }
56 
57 } // namespace
58 
createTextureSubgroupLodTests(tcu::TestContext & testCtx)59 tcu::TestCaseGroup *createTextureSubgroupLodTests(tcu::TestContext &testCtx)
60 {
61     return createTestGroup(testCtx, "subgroup_lod", populateSubgroupLodTests);
62 }
63 
64 } // namespace texture
65 } // namespace vkt
66