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: MSCaseBaseResolveAndPerSampleFetch(tcu::TestContext & testCtx,const std::string & name,const ImageMSParams & imageMSParams)41 MSCaseBaseResolveAndPerSampleFetch(tcu::TestContext &testCtx, const std::string &name, 42 const ImageMSParams &imageMSParams) 43 : MultisampleCaseBase(testCtx, name, imageMSParams) 44 { 45 } 46 47 void initPrograms(vk::SourceCollections &programCollection) const; 48 }; 49 50 class MSInstanceBaseResolveAndPerSampleFetch : public MultisampleInstanceBase 51 { 52 public: 53 MSInstanceBaseResolveAndPerSampleFetch(Context &context, const ImageMSParams &imageMSParams); 54 55 protected: 56 tcu::TestStatus iterate(void); 57 58 virtual vk::VkPipelineMultisampleStateCreateInfo getMSStateCreateInfo(const ImageMSParams &imageMSParams) const; 59 60 virtual const vk::VkDescriptorSetLayout *createMSPassDescSetLayout(const ImageMSParams &imageMSParams); 61 62 virtual const vk::VkDescriptorSet *createMSPassDescSet(const ImageMSParams &imageMSParams, 63 const vk::VkDescriptorSetLayout *descSetLayout); 64 65 virtual tcu::TestStatus verifyImageData(const vk::VkImageCreateInfo &imageMSInfo, 66 const vk::VkImageCreateInfo &imageRSInfo, 67 const std::vector<tcu::ConstPixelBufferAccess> &dataPerSample, 68 const tcu::ConstPixelBufferAccess &dataRS) const = 0; 69 }; 70 71 } // namespace multisample 72 } // namespace pipeline 73 } // namespace vkt 74 75 #endif // _VKTPIPELINEMULTISAMPLEBASERESOLVEANDPERSAMPLEFETCH_HPP 76