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