Merge branch '286-extend-device-feature-limit-validation' into 'master'
[platform/upstream/VK-GL-CTS.git] / external / vulkancts / modules / vulkan / draw / vktDrawCreateInfoUtil.hpp
1 #ifndef _VKTDRAWCREATEINFOUTIL_HPP
2 #define _VKTDRAWCREATEINFOUTIL_HPP
3 /*------------------------------------------------------------------------
4  * Vulkan Conformance Tests
5  * ------------------------
6  *
7  * Copyright (c) 2015 The Khronos Group Inc.
8  * Copyright (c) 2015 Intel Corporation
9  *
10  * Permission is hereby granted, free of charge, to any person obtaining a
11  * copy of this software and/or associated documentation files (the
12  * "Materials"), to deal in the Materials without restriction, including
13  * without limitation the rights to use, copy, modify, merge, publish,
14  * distribute, sublicense, and/or sell copies of the Materials, and to
15  * permit persons to whom the Materials are furnished to do so, subject to
16  * the following conditions:
17  *
18  * The above copyright notice(s) and this permission notice shall be included
19  * in all copies or substantial portions of the Materials.
20  *
21  * THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
22  * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
23  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
24  * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
25  * CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
26  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
27  * MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
28  *
29  *//*!
30  * \file
31  * \brief CreateInfo utilities
32  *//*--------------------------------------------------------------------*/
33
34 #include "vkDefs.hpp"
35 #include "tcuVector.hpp"
36 #include "deSharedPtr.hpp"
37 #include <vector>
38
39 namespace vkt
40 {
41 namespace Draw
42 {
43
44 class ImageSubresourceRange : public vk::VkImageSubresourceRange
45 {
46 public:
47         ImageSubresourceRange           (vk::VkImageAspectFlags aspectMask,
48                                                                  deUint32                               baseMipLevel    = 0,
49                                                                  deUint32                               levelCount              = 1,
50                                                                  deUint32                               baseArrayLayer  = 0,
51                                                                  deUint32                               layerCount              = 1);
52 };
53
54 class ComponentMapping : public vk::VkComponentMapping
55 {
56 public:
57         ComponentMapping                        (vk::VkComponentSwizzle r = vk::VK_COMPONENT_SWIZZLE_R,
58                                                                  vk::VkComponentSwizzle g = vk::VK_COMPONENT_SWIZZLE_G,
59                                                                  vk::VkComponentSwizzle b = vk::VK_COMPONENT_SWIZZLE_B,
60                                                                  vk::VkComponentSwizzle a = vk::VK_COMPONENT_SWIZZLE_A);
61 };
62
63 class ImageViewCreateInfo : public vk::VkImageViewCreateInfo
64 {
65 public:
66         ImageViewCreateInfo                     (vk::VkImage                                            image,
67                                                                  vk::VkImageViewType                            viewType,
68                                                                  vk::VkFormat                                           format,
69                                                                  const vk::VkImageSubresourceRange&     subresourceRange,
70                                                                  const vk::VkComponentMapping&          components                      = ComponentMapping(),
71                                                                  vk::VkImageViewCreateFlags                     flags                           = 0);
72
73         ImageViewCreateInfo                     (vk::VkImage                                            image,
74                                                                  vk::VkImageViewType                            viewType,
75                                                                  vk::VkFormat                                           format,
76                                                                  const vk::VkComponentMapping&          components                      = ComponentMapping(),
77                                                                  vk::VkImageViewCreateFlags                     flags                           = 0);
78 };
79
80 class BufferViewCreateInfo : public vk::VkBufferViewCreateInfo
81 {
82 public:
83         BufferViewCreateInfo             (vk::VkBuffer          buffer,
84                                                                   vk::VkFormat          format,
85                                                                   vk::VkDeviceSize      offset,
86                                                                   vk::VkDeviceSize      range);
87 };
88
89 class BufferCreateInfo : public vk::VkBufferCreateInfo
90 {
91 public:
92         BufferCreateInfo                        (vk::VkDeviceSize                       size,
93                                                                  vk::VkBufferCreateFlags        usage,
94                                                                  vk::VkSharingMode                      sharingMode                             = vk::VK_SHARING_MODE_EXCLUSIVE,
95                                                                  deUint32                                       queueFamilyIndexCount   = 0,
96                                                                  const deUint32*                        pQueueFamilyIndices             = DE_NULL,
97                                                                  vk::VkBufferCreateFlags        flags                                   = 0);
98
99         BufferCreateInfo                        (const BufferCreateInfo&        other);
100         BufferCreateInfo& operator=     (const BufferCreateInfo&        other);
101
102 private:
103         std::vector<deUint32> m_queueFamilyIndices;
104 };
105
106 class ImageCreateInfo : public vk::VkImageCreateInfo
107 {
108 public:
109         ImageCreateInfo                         (vk::VkImageType                        imageType,
110                                                                  vk::VkFormat                           format,
111                                                                  vk::VkExtent3D                         extent,
112                                                                  deUint32                                       mipLevels,
113                                                                  deUint32                                       arrayLayers,
114                                                                  vk::VkSampleCountFlagBits      samples,
115                                                                  vk::VkImageTiling                      tiling,
116                                                                  vk::VkImageUsageFlags          usage,
117                                                                  vk::VkSharingMode                      sharingMode                             = vk::VK_SHARING_MODE_EXCLUSIVE,
118                                                                  deUint32                                       queueFamilyIndexCount   = 0,
119                                                                  const deUint32*                        pQueueFamilyIndices             = DE_NULL,
120                                                                  vk::VkImageCreateFlags         flags                                   = 0,
121                                                                  vk::VkImageLayout                      initialLayout                   = vk::VK_IMAGE_LAYOUT_UNDEFINED);
122
123 private:
124         ImageCreateInfo                         (const ImageCreateInfo&         other);
125         ImageCreateInfo& operator=      (const ImageCreateInfo&         other);
126
127         std::vector<deUint32> m_queueFamilyIndices;
128 };
129
130 class FramebufferCreateInfo : public vk::VkFramebufferCreateInfo
131 {
132 public:
133         FramebufferCreateInfo           (vk::VkRenderPass                                               renderPass,
134                                                                  const std::vector<vk::VkImageView>&    attachments,
135                                                                  deUint32                                                               width,
136                                                                  deUint32                                                               height,
137                                                                  deUint32                                                               layers);
138 };
139
140 class AttachmentDescription : public vk::VkAttachmentDescription
141 {
142 public:
143         AttachmentDescription   (vk::VkFormat                           format,
144                                                          vk::VkSampleCountFlagBits      samples,
145                                                          vk::VkAttachmentLoadOp         loadOp,
146                                                          vk::VkAttachmentStoreOp        storeOp,
147                                                          vk::VkAttachmentLoadOp         stencilLoadOp,
148                                                          vk::VkAttachmentStoreOp        stencilStoreOp,
149                                                          vk::VkImageLayout                      initialLayout,
150                                                          vk::VkImageLayout                      finalLayout);
151
152         AttachmentDescription   (const vk::VkAttachmentDescription &);
153 };
154
155 class AttachmentReference : public vk::VkAttachmentReference
156 {
157 public:
158         AttachmentReference             (deUint32 attachment, vk::VkImageLayout layout);
159         AttachmentReference             (void);
160 };
161
162 class SubpassDescription : public vk::VkSubpassDescription
163 {
164 public:
165         SubpassDescription                              (vk::VkPipelineBindPoint                        pipelineBindPoint,
166                                                                          vk::VkSubpassDescriptionFlags          flags,
167                                                                          deUint32                                                       inputAttachmentCount,
168                                                                          const vk::VkAttachmentReference*       inputAttachments,
169                                                                          deUint32                                                       colorAttachmentCount,
170                                                                          const vk::VkAttachmentReference*       colorAttachments,
171                                                                          const vk::VkAttachmentReference*       resolveAttachments,
172                                                                          vk::VkAttachmentReference                      depthStencilAttachment,
173                                                                          deUint32                                                       preserveAttachmentCount,
174                                                                          const deUint32*                                        preserveAttachments);
175
176         SubpassDescription                              (const vk::VkSubpassDescription&        other);
177         SubpassDescription                              (const SubpassDescription&                      other);
178         SubpassDescription& operator=   (const SubpassDescription&                      other);
179
180 private:
181         std::vector<vk::VkAttachmentReference>  m_inputAttachments;
182         std::vector<vk::VkAttachmentReference>  m_colorAttachments;
183         std::vector<vk::VkAttachmentReference>  m_resolveAttachments;
184         std::vector<deUint32>                                   m_preserveAttachments;
185
186         vk::VkAttachmentReference                               m_depthStencilAttachment;
187 };
188
189 class SubpassDependency : public vk::VkSubpassDependency
190 {
191 public:
192         SubpassDependency (     deUint32                                        srcSubpass,
193                                                 deUint32                                        dstSubpass,
194                                                 vk::VkPipelineStageFlags        srcStageMask,
195                                                 vk::VkPipelineStageFlags        dstStageMask,
196                                                 vk::VkAccessFlags                       srcAccessMask,
197                                                 vk::VkAccessFlags                       dstAccessMask,
198                                                 vk::VkDependencyFlags           dependencyFlags);
199
200         SubpassDependency (const vk::VkSubpassDependency& other);
201 };
202
203 class RenderPassCreateInfo : public vk::VkRenderPassCreateInfo
204 {
205 public:
206         RenderPassCreateInfo (const std::vector<vk::VkAttachmentDescription>&   attachments,
207                                                   const std::vector<vk::VkSubpassDescription>&          subpasses,
208                                                   const std::vector<vk::VkSubpassDependency>&           dependiences            = std::vector<vk::VkSubpassDependency>());
209
210         RenderPassCreateInfo (deUint32                                                                                  attachmentCount = 0,
211                                                   const vk::VkAttachmentDescription*                            pAttachments    = DE_NULL,
212                                                   deUint32                                                                                      subpassCount    = 0,
213                                                   const vk::VkSubpassDescription*                                       pSubpasses              = DE_NULL,
214                                                   deUint32                                                                                      dependencyCount = 0,
215                                                   const vk::VkSubpassDependency*                                        pDependiences   = DE_NULL);
216
217         void addAttachment      (vk::VkAttachmentDescription                                            attachment);
218         void addSubpass         (vk::VkSubpassDescription                                                       subpass);
219         void addDependency      (vk::VkSubpassDependency                                                        dependency);
220
221 private:
222         std::vector<AttachmentDescription>                      m_attachments;
223         std::vector<SubpassDescription>                         m_subpasses;
224         std::vector<SubpassDependency>                          m_dependiences;
225
226         std::vector<vk::VkAttachmentDescription>        m_attachmentsStructs;
227         std::vector<vk::VkSubpassDescription>           m_subpassesStructs;
228         std::vector<vk::VkSubpassDependency>            m_dependiencesStructs;
229
230         RenderPassCreateInfo                    (const RenderPassCreateInfo &other); //Not allowed!
231         RenderPassCreateInfo& operator= (const RenderPassCreateInfo &other); //Not allowed!
232 };
233
234 class RenderPassBeginInfo : public vk::VkRenderPassBeginInfo
235 {
236 public:
237         RenderPassBeginInfo (vk::VkRenderPass                                           renderPass,
238                                                  vk::VkFramebuffer                                              framebuffer,
239                                                  vk::VkRect2D                                                   renderArea,
240                                                  const std::vector<vk::VkClearValue>&   clearValues = std::vector<vk::VkClearValue>());
241
242 private:
243         std::vector<vk::VkClearValue> m_clearValues;
244
245         RenderPassBeginInfo                             (const RenderPassBeginInfo&     other); //Not allowed!
246         RenderPassBeginInfo& operator=  (const RenderPassBeginInfo&     other); //Not allowed!
247 };
248
249 class CmdPoolCreateInfo : public vk::VkCommandPoolCreateInfo
250 {
251 public:
252         CmdPoolCreateInfo (deUint32                                             queueFamilyIndex,
253                                            vk::VkCommandPoolCreateFlags flags                           = vk::VK_COMMAND_POOL_CREATE_RESET_COMMAND_BUFFER_BIT);
254 };
255
256 class CmdBufferBeginInfo : public vk::VkCommandBufferBeginInfo
257 {
258 public:
259         CmdBufferBeginInfo (vk::VkCommandBufferUsageFlags               flags                                   = 0);
260 };
261
262 class DescriptorPoolSize : public vk::VkDescriptorPoolSize
263 {
264 public:
265         DescriptorPoolSize (vk::VkDescriptorType _type, deUint32 _descriptorCount)
266         {
267                 type                    = _type;
268                 descriptorCount = _descriptorCount;
269         }
270 };
271
272 class DescriptorPoolCreateInfo : public vk::VkDescriptorPoolCreateInfo
273 {
274 public:
275         DescriptorPoolCreateInfo (const std::vector<vk::VkDescriptorPoolSize>&  poolSizeCounts,
276                                                           vk::VkDescriptorPoolCreateFlags                               flags,
277                                                           deUint32                                                                              maxSets);
278
279         DescriptorPoolCreateInfo& addDescriptors (vk::VkDescriptorType type, deUint32 count);
280
281 private:
282         std::vector<vk::VkDescriptorPoolSize> m_poolSizeCounts;
283 };
284
285 class DescriptorSetLayoutCreateInfo : public vk::VkDescriptorSetLayoutCreateInfo
286 {
287 public:
288         DescriptorSetLayoutCreateInfo (deUint32 bindingCount, const vk::VkDescriptorSetLayoutBinding* pBindings);
289 };
290
291 class PipelineLayoutCreateInfo : public vk::VkPipelineLayoutCreateInfo
292 {
293 public:
294         PipelineLayoutCreateInfo (deUint32                                                                              descriptorSetCount,
295                                                           const vk::VkDescriptorSetLayout*                              pSetLayouts,
296                                                                           deUint32                                                                              pushConstantRangeCount  = 0,
297                                                           const vk::VkPushConstantRange*                                pPushConstantRanges             = DE_NULL);
298
299         PipelineLayoutCreateInfo (const std::vector<vk::VkDescriptorSetLayout>& setLayouts                              = std::vector<vk::VkDescriptorSetLayout>(),
300                                                           deUint32                                                                              pushConstantRangeCount  = 0,
301                                                           const vk::VkPushConstantRange*                                pPushConstantRanges             = DE_NULL);
302
303 private:
304         std::vector<vk::VkDescriptorSetLayout>  m_setLayouts;
305         std::vector<vk::VkPushConstantRange>    m_pushConstantRanges;
306 };
307
308 class PipelineCreateInfo : public vk::VkGraphicsPipelineCreateInfo
309 {
310 public:
311         class VertexInputState : public vk::VkPipelineVertexInputStateCreateInfo
312         {
313         public:
314                 VertexInputState (deUint32                                                                              vertexBindingDescriptionCount   = 0,
315                                                   const vk::VkVertexInputBindingDescription*    pVertexBindingDescriptions              = NULL,
316                                                   deUint32                                                                              vertexAttributeDescriptionCount = 0,
317                                                   const vk::VkVertexInputAttributeDescription*  pVertexAttributeDescriptions    = NULL);
318         };
319
320         class InputAssemblerState : public vk::VkPipelineInputAssemblyStateCreateInfo
321         {
322         public:
323                 InputAssemblerState (vk::VkPrimitiveTopology topology, vk::VkBool32 primitiveRestartEnable = false);
324         };
325
326         class TessellationState : public vk::VkPipelineTessellationStateCreateInfo
327         {
328         public:
329                 TessellationState (deUint32 patchControlPoints = 0);
330         };
331
332         class ViewportState : public vk::VkPipelineViewportStateCreateInfo
333         {
334         public:
335                 ViewportState                           (deUint32                                               viewportCount,
336                                                                          std::vector<vk::VkViewport>    viewports               = std::vector<vk::VkViewport>(0),
337                                                                          std::vector<vk::VkRect2D>              scissors                = std::vector<vk::VkRect2D>(0));
338
339                 ViewportState                           (const ViewportState&                   other);
340                 ViewportState& operator=        (const ViewportState&                   other);
341
342                 std::vector<vk::VkViewport> m_viewports;
343                 std::vector<vk::VkRect2D>       m_scissors;
344         };
345
346         class RasterizerState : public vk::VkPipelineRasterizationStateCreateInfo
347         {
348         public:
349                 RasterizerState (vk::VkBool32                   depthClampEnable                = false,
350                                                  vk::VkBool32                   rasterizerDiscardEnable = false,
351                                                  vk::VkPolygonMode              polygonMode                             = vk::VK_POLYGON_MODE_FILL,
352                                                  vk::VkCullModeFlags    cullMode                                = vk::VK_CULL_MODE_NONE,
353                                                  vk::VkFrontFace                frontFace                               = vk::VK_FRONT_FACE_CLOCKWISE,
354                                                  vk::VkBool32                   depthBiasEnable                 = true,
355                                                  float                                  depthBiasConstantFactor = 0.0f,
356                                                  float                                  depthBiasClamp                  = 0.0f,
357                                                  float                                  depthBiasSlopeFactor    = 0.0f,
358                                                  float                                  lineWidth                               = 1.0f);
359         };
360
361         class MultiSampleState : public vk::VkPipelineMultisampleStateCreateInfo
362         {
363         public:
364                 MultiSampleState                        (vk::VkSampleCountFlagBits                              rasterizationSamples            = vk::VK_SAMPLE_COUNT_1_BIT,
365                                                                          vk::VkBool32                                                   sampleShadingEnable                     = false,
366                                                                          float                                                                  minSampleShading                        = 0.0f,
367                                                                          const std::vector<vk::VkSampleMask>&   sampleMask                                      = std::vector<vk::VkSampleMask>(1, 0xffffffff),
368                                                                          bool                                                                   alphaToCoverageEnable           = false,
369                                                                          bool                                                                   alphaToOneEnable                        = false);
370
371                 MultiSampleState                        (const MultiSampleState&                                other);
372                 MultiSampleState& operator= (const MultiSampleState&                            other);
373
374         private:
375                 std::vector<vk::VkSampleMask> m_sampleMask;
376         };
377
378         class ColorBlendState : public vk::VkPipelineColorBlendStateCreateInfo
379         {
380         public:
381                 class Attachment : public vk::VkPipelineColorBlendAttachmentState
382                 {
383                 public:
384                         Attachment (vk::VkBool32                blendEnable                     = false,
385                                                 vk::VkBlendFactor       srcColorBlendFactor     = vk::VK_BLEND_FACTOR_SRC_COLOR,
386                                                 vk::VkBlendFactor       dstColorBlendFactor     = vk::VK_BLEND_FACTOR_DST_COLOR,
387                                                 vk::VkBlendOp           colorBlendOp            = vk::VK_BLEND_OP_ADD,
388                                                 vk::VkBlendFactor       srcAlphaBlendFactor     = vk::VK_BLEND_FACTOR_SRC_COLOR,
389                                                 vk::VkBlendFactor       dstAlphaBlendFactor     = vk::VK_BLEND_FACTOR_DST_COLOR,
390                                                 vk::VkBlendOp           alphaBlendOp            = vk::VK_BLEND_OP_ADD,
391                                                 deUint8                         colorWriteMask          = 0xff);
392                 };
393
394                 ColorBlendState (const std::vector<vk::VkPipelineColorBlendAttachmentState>&    attachments,
395                                                  vk::VkBool32                                                                                                   alphaToCoverageEnable   = false,
396                                                  vk::VkLogicOp                                                                                                  logicOp                                 = vk::VK_LOGIC_OP_COPY);
397
398                 ColorBlendState (deUint32                                                                                                               attachmentCount,
399                                                  const vk::VkPipelineColorBlendAttachmentState*                                 attachments,
400                                                  vk::VkBool32                                                                                                   logicOpEnable                   = false,
401                                                  vk::VkLogicOp                                                                                                  logicOp                                 = vk::VK_LOGIC_OP_COPY);
402
403                 ColorBlendState (const vk::VkPipelineColorBlendStateCreateInfo&                                 createInfo);
404                 ColorBlendState (const ColorBlendState&                                                                                 createInfo,
405                                                  std::vector<float>                                                                                             blendConstants                  = std::vector<float>(4));
406
407         private:
408                 std::vector<vk::VkPipelineColorBlendAttachmentState> m_attachments;
409         };
410
411         class DepthStencilState : public vk::VkPipelineDepthStencilStateCreateInfo
412         {
413         public:
414                 class StencilOpState : public vk::VkStencilOpState
415                 {
416                 public:
417                         StencilOpState (vk::VkStencilOp failOp                                  = vk::VK_STENCIL_OP_REPLACE,
418                                                         vk::VkStencilOp passOp                                  = vk::VK_STENCIL_OP_REPLACE,
419                                                         vk::VkStencilOp depthFailOp                             = vk::VK_STENCIL_OP_REPLACE,
420                                                         vk::VkCompareOp compareOp                               = vk::VK_COMPARE_OP_ALWAYS,
421                                                         deUint32                compareMask                             = 0xffffffffu,
422                                                         deUint32                writeMask                               = 0xffffffffu,
423                                                         deUint32                reference                               = 0);
424                 };
425
426                 DepthStencilState (vk::VkBool32         depthTestEnable                 = false,
427                                                    vk::VkBool32         depthWriteEnable                = false,
428                                                    vk::VkCompareOp      depthCompareOp                  = vk::VK_COMPARE_OP_ALWAYS,
429                                                    vk::VkBool32         depthBoundsTestEnable   = false,
430                                                    vk::VkBool32         stencilTestEnable               = false,
431                                                    StencilOpState       front                                   = StencilOpState(),
432                                                    StencilOpState       back                                    = StencilOpState(),
433                                                    float                        minDepthBounds                  = -1.0f,
434                                                    float                        maxDepthBounds                  = 1.0f);
435         };
436
437         class PipelineShaderStage : public vk::VkPipelineShaderStageCreateInfo
438         {
439         public:
440                 PipelineShaderStage (vk::VkShaderModule shaderModule, const char* pName, vk::VkShaderStageFlagBits stage);
441         };
442
443         class DynamicState : public vk::VkPipelineDynamicStateCreateInfo
444         {
445         public:
446                 DynamicState                    (const std::vector<vk::VkDynamicState>& dynamicStates = std::vector<vk::VkDynamicState>(0));
447
448                 DynamicState                    (const DynamicState& other);
449                 DynamicState& operator= (const DynamicState& other);
450
451                 std::vector<vk::VkDynamicState> m_dynamicStates;
452         };
453
454         PipelineCreateInfo                              (vk::VkPipelineLayout                                                           layout,
455                                                                      vk::VkRenderPass                                                                   renderPass,
456                                                                          int                                                                                            subpass,
457                                                                          vk::VkPipelineCreateFlags                                                      flags);
458
459         PipelineCreateInfo& addShader   (const vk::VkPipelineShaderStageCreateInfo&                     shader);
460
461         PipelineCreateInfo& addState    (const vk::VkPipelineVertexInputStateCreateInfo&        state);
462         PipelineCreateInfo& addState    (const vk::VkPipelineInputAssemblyStateCreateInfo&      state);
463         PipelineCreateInfo& addState    (const vk::VkPipelineColorBlendStateCreateInfo&         state);
464         PipelineCreateInfo& addState    (const vk::VkPipelineViewportStateCreateInfo&           state);
465         PipelineCreateInfo& addState    (const vk::VkPipelineDepthStencilStateCreateInfo&       state);
466         PipelineCreateInfo& addState    (const vk::VkPipelineTessellationStateCreateInfo&       state);
467         PipelineCreateInfo& addState    (const vk::VkPipelineRasterizationStateCreateInfo&      state);
468         PipelineCreateInfo& addState    (const vk::VkPipelineMultisampleStateCreateInfo&        state);
469         PipelineCreateInfo& addState    (const vk::VkPipelineDynamicStateCreateInfo&            state);
470
471 private:
472         std::vector<vk::VkPipelineShaderStageCreateInfo>                m_shaders;
473
474         vk::VkPipelineVertexInputStateCreateInfo                                m_vertexInputState;
475         vk::VkPipelineInputAssemblyStateCreateInfo                              m_inputAssemblyState;
476         std::vector<vk::VkPipelineColorBlendAttachmentState>    m_colorBlendStateAttachments;
477         vk::VkPipelineColorBlendStateCreateInfo                                 m_colorBlendState;
478         vk::VkPipelineViewportStateCreateInfo                                   m_viewportState;
479         vk::VkPipelineDepthStencilStateCreateInfo                               m_dynamicDepthStencilState;
480         vk::VkPipelineTessellationStateCreateInfo                               m_tessState;
481         vk::VkPipelineRasterizationStateCreateInfo                              m_rasterState;
482         vk::VkPipelineMultisampleStateCreateInfo                                m_multisampleState;
483         vk::VkPipelineDynamicStateCreateInfo                                    m_dynamicState;
484
485         std::vector<vk::VkDynamicState>                                                 m_dynamicStates;
486
487         std::vector<vk::VkViewport>                                                             m_viewports;
488         std::vector<vk::VkRect2D>                                                               m_scissors;
489
490         std::vector<vk::VkSampleMask>                                                   m_multisampleStateSampleMask;
491 };
492
493 class SamplerCreateInfo : public vk::VkSamplerCreateInfo
494 {
495 public:
496         SamplerCreateInfo (vk::VkFilter                         magFilter                               = vk::VK_FILTER_NEAREST,
497                                            vk::VkFilter                         minFilter                               = vk::VK_FILTER_NEAREST,
498                                            vk::VkSamplerMipmapMode      mipmapMode                              = vk::VK_SAMPLER_MIPMAP_MODE_NEAREST,
499                                            vk::VkSamplerAddressMode     addressU                                = vk::VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT,
500                                            vk::VkSamplerAddressMode     addressV                                = vk::VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT,
501                                            vk::VkSamplerAddressMode     addressW                                = vk::VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT,
502                                            float                                        mipLodBias                              = 0.0f,
503                                            vk::VkBool32                         anisotropyEnable                = vk::VK_FALSE,
504                                            float                                        maxAnisotropy                   = 1.0f,
505                                            vk::VkBool32                         compareEnable                   = false,
506                                            vk::VkCompareOp                      compareOp                               = vk::VK_COMPARE_OP_ALWAYS,
507                                            float                                        minLod                                  = 0.0f,
508                                            float                                        maxLod                                  = 16.0f,
509                                            vk::VkBorderColor            borderColor                             = vk::VK_BORDER_COLOR_FLOAT_OPAQUE_WHITE,
510                                            vk::VkBool32                         unnormalizedCoordinates = false);
511 };
512
513 } // Draw
514 } // vkt
515
516 #endif // _VKTDRAWCREATEINFOUTIL_HPP