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
31namespace vkt
32{
33namespace pipeline
34{
35namespace multisample
36{
37
38class MSCaseBaseResolveAndPerSampleFetch : public MultisampleCaseBase
39{
40public:
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
49class MSInstanceBaseResolveAndPerSampleFetch : public MultisampleInstanceBase
50{
51public:
52							MSInstanceBaseResolveAndPerSampleFetch					(Context&											context,
53																					 const ImageMSParams&								imageMSParams);
54
55protected:
56
57	tcu::TestStatus										iterate						(void);
58
59	virtual vk::VkPipelineMultisampleStateCreateInfo	getMSStateCreateInfo		(const ImageMSParams&								imageMSParams) const;
60
61	virtual const vk::VkDescriptorSetLayout*			createMSPassDescSetLayout	(const ImageMSParams&								imageMSParams);
62
63	virtual const vk::VkDescriptorSet*					createMSPassDescSet			(const ImageMSParams&								imageMSParams,
64																					 const vk::VkDescriptorSetLayout*					descSetLayout);
65
66	virtual tcu::TestStatus								verifyImageData				(const vk::VkImageCreateInfo&						imageMSInfo,
67																					 const vk::VkImageCreateInfo&						imageRSInfo,
68																					 const std::vector<tcu::ConstPixelBufferAccess>&	dataPerSample,
69																					 const tcu::ConstPixelBufferAccess&					dataRS) const = 0;
70};
71
72} // multisample
73} // pipeline
74} // vkt
75
76#endif // _VKTPIPELINEMULTISAMPLEBASERESOLVEANDPERSAMPLEFETCH_HPP
77