Limit changes by xor to upper 8 bits in mixed atomic tests am: 6bc3c7a634 am: eef2e71...
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / pipeline / vktPipelineMultisampleBaseResolveAndPerSampleFetch.hpp
1 #ifndef _VKTPIPELINEMULTISAMPLEBASERESOLVEANDPERSAMPLEFETCH_HPP
2 #define _VKTPIPELINEMULTISAMPLEBASERESOLVEANDPERSAMPLEFETCH_HPP
3 /*------------------------------------------------------------------------
4  * Vulkan Conformance Tests
5  * ------------------------
6  *
7  * Copyright (c) 2016 The Khronos Group Inc.
8  *
9  * Licensed under the Apache License, Version 2.0 (the "License");
10  * you may not use this file except in compliance with the License.
11  * You may obtain a copy of the License at
12  *
13  *      http://www.apache.org/licenses/LICENSE-2.0
14  *
15  * Unless required by applicable law or agreed to in writing, software
16  * distributed under the License is distributed on an "AS IS" BASIS,
17  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18  * See the License for the specific language governing permissions and
19  * limitations under the License.
20  *
21  *//*!
22  * \file vktPipelineMultisampleBaseResolveAndPerSampleFetch.hpp
23  * \brief Base class for tests that check results of multisample resolve
24  *                and/or values of individual samples
25  *//*--------------------------------------------------------------------*/
26
27 #include "vktPipelineMultisampleBase.hpp"
28 #include "vktTestCase.hpp"
29 #include "tcuVector.hpp"
30
31 namespace vkt
32 {
33 namespace pipeline
34 {
35 namespace multisample
36 {
37
38 class MSCaseBaseResolveAndPerSampleFetch : public MultisampleCaseBase
39 {
40 public:
41                 MSCaseBaseResolveAndPerSampleFetch      (tcu::TestContext&              testCtx,
42                                                                                          const std::string&             name,
43                                                                                          const ImageMSParams&   imageMSParams)
44                 : MultisampleCaseBase(testCtx, name, imageMSParams) {}
45
46         void initPrograms                                               (vk::SourceCollections& programCollection) const;
47 };
48
49 class MSInstanceBaseResolveAndPerSampleFetch : public MultisampleInstanceBase
50 {
51 public:
52                                                         MSInstanceBaseResolveAndPerSampleFetch                                  (Context&                                                                                       context,
53                                                                                                                                                                          const ImageMSParams&                                                           imageMSParams)
54                                                         : MultisampleInstanceBase(context, imageMSParams) {}
55
56 protected:
57
58         tcu::TestStatus                                                                         iterate                                         (void);
59
60         virtual vk::VkPipelineMultisampleStateCreateInfo        getMSStateCreateInfo            (const ImageMSParams&                                                           imageMSParams) const;
61
62         virtual const vk::VkDescriptorSetLayout*                        createMSPassDescSetLayout       (const ImageMSParams&                                                           imageMSParams);
63
64         virtual const vk::VkDescriptorSet*                                      createMSPassDescSet                     (const ImageMSParams&                                                           imageMSParams,
65                                                                                                                                                                          const vk::VkDescriptorSetLayout*                                       descSetLayout);
66
67         virtual tcu::TestStatus                                                         verifyImageData                         (const vk::VkImageCreateInfo&                                           imageMSInfo,
68                                                                                                                                                                          const vk::VkImageCreateInfo&                                           imageRSInfo,
69                                                                                                                                                                          const std::vector<tcu::ConstPixelBufferAccess>&        dataPerSample,
70                                                                                                                                                                          const tcu::ConstPixelBufferAccess&                                     dataRS) const = 0;
71 };
72
73 } // multisample
74 } // pipeline
75 } // vkt
76
77 #endif // _VKTPIPELINEMULTISAMPLEBASERESOLVEANDPERSAMPLEFETCH_HPP