blob: ecd9486b8d39e1f6a95b9e5e293179864d5085fb [file] [log] [blame]
Tobin Ehlis246ba4d2014-11-18 16:38:08 -07001/*
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -06002 * Vulkan
Tobin Ehlis246ba4d2014-11-18 16:38:08 -07003 *
4 * Copyright (C) 2014 LunarG, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
23 */
Tobin Ehlis0c6f9ee2015-07-03 09:42:57 -060024#include "vk_layer.h"
Tobin Ehlis10ae8c12015-03-17 16:24:32 -060025#include <vector>
Tobin Ehlis257d9742015-07-08 17:08:02 -060026#include "layer_common.h"
Tobin Ehlis10ae8c12015-03-17 16:24:32 -060027
28using namespace std;
29
Tobin Ehlis246ba4d2014-11-18 16:38:08 -070030// Draw State ERROR codes
31typedef enum _DRAW_STATE_ERROR
32{
Tobin Ehlis7265e832015-01-19 08:42:29 -070033 DRAWSTATE_NONE, // Used for INFO & other non-error messages
Tobin Ehlis04178d72015-01-22 10:45:21 -070034 DRAWSTATE_INTERNAL_ERROR, // Error with DrawState internal data structures
Tobin Ehlis7265e832015-01-19 08:42:29 -070035 DRAWSTATE_NO_PIPELINE_BOUND, // Unable to identify a bound pipeline
Tobin Ehlis793ad302015-04-03 12:01:11 -060036 DRAWSTATE_INVALID_POOL, // Invalid DS pool
Tobin Ehlisa3a693e2015-02-10 15:35:23 -070037 DRAWSTATE_INVALID_SET, // Invalid DS
Tobin Ehlis04178d72015-01-22 10:45:21 -070038 DRAWSTATE_INVALID_LAYOUT, // Invalid DS layout
Tobin Ehlis75283bf2015-06-18 15:59:33 -060039 DRAWSTATE_INVALID_PIPELINE, // Invalid Pipeline handle referenced
40 DRAWSTATE_INVALID_PIPELINE_CREATE_STATE, // Attempt to create a pipeline with invalid state
Tobin Ehlisd01f7d62015-02-13 10:26:14 -070041 DRAWSTATE_INVALID_CMD_BUFFER, // Invalid CmdBuffer referenced
Courtney Goeltzenleuchterd8e229c2015-04-08 15:36:08 -060042 DRAWSTATE_VTX_INDEX_OUT_OF_BOUNDS, // binding in vkCmdBindVertexData() too large for PSO's pVertexBindingDescriptions array
Tobin Ehlisc4c23182015-09-17 12:24:13 -060043 DRAWSTATE_VTX_INDEX_ALIGNMENT_ERROR, // binding offset in vkCmdBindIndexBuffer() out of alignment based on indexType
Tobin Ehlis12d4c6a2015-08-31 12:42:38 -060044 //DRAWSTATE_MISSING_DOT_PROGRAM, // No "dot" program in order to generate png image
Tobin Ehlis04178d72015-01-22 10:45:21 -070045 DRAWSTATE_OUT_OF_MEMORY, // malloc failed
46 DRAWSTATE_DESCRIPTOR_TYPE_MISMATCH, // Type in layout vs. update are not the same
Tobin Ehlisa3a693e2015-02-10 15:35:23 -070047 DRAWSTATE_DESCRIPTOR_UPDATE_OUT_OF_BOUNDS, // Descriptors set for update out of bounds for corresponding layout section
Tobin Ehlis297b9852015-02-23 16:09:58 -070048 DRAWSTATE_INVALID_UPDATE_INDEX, // Index of requested update is invalid for specified descriptors set
Tobin Ehliseba312c2015-04-01 08:40:34 -060049 DRAWSTATE_INVALID_UPDATE_STRUCT, // Struct in DS Update tree is of invalid type
Tobin Ehlisa9f3d762015-05-22 12:38:16 -060050 DRAWSTATE_NUM_SAMPLES_MISMATCH, // Number of samples in bound PSO does not match number in FB of current RenderPass
51 DRAWSTATE_NO_END_CMD_BUFFER, // Must call vkEndCommandBuffer() before QueueSubmit on that cmdBuffer
Tobin Ehlis9c536442015-06-19 13:00:59 -060052 DRAWSTATE_NO_BEGIN_CMD_BUFFER, // Binding cmds or calling End on CB that never had vkBeginCommandBuffer() called on it
Tobin Ehlis59278bf2015-08-18 07:10:58 -060053 DRAWSTATE_CMD_BUFFER_SINGLE_SUBMIT_VIOLATION, // Cmd Buffer created with VK_CMD_BUFFER_OPTIMIZE_ONE_TIME_SUBMIT_BIT flag is submitted multiple times
Tobin Ehlis4b34ddc2015-09-17 14:18:16 -060054 DRAWSTATE_INVALID_SECONDARY_CMD_BUFFER, // vkCmdExecuteCommands() called with a primary cmdBuffer in pCmdBuffers array
Tobin Ehlise382c5a2015-06-10 12:57:07 -060055 DRAWSTATE_VIEWPORT_NOT_BOUND, // Draw submitted with no viewport state object bound
Cody Northrop271ba752015-08-26 10:01:32 -060056 DRAWSTATE_LINE_WIDTH_NOT_BOUND, // Draw submitted with no line width state object bound
57 DRAWSTATE_DEPTH_BIAS_NOT_BOUND, // Draw submitted with no depth bias state object bound
58 DRAWSTATE_BLEND_NOT_BOUND, // Draw submitted with no blend state object bound when color write enabled
59 DRAWSTATE_DEPTH_BOUNDS_NOT_BOUND, // Draw submitted with no depth bounds state object bound when depth enabled
Cody Northrop82485a82015-08-18 15:21:16 -060060 DRAWSTATE_STENCIL_NOT_BOUND, // Draw submitted with no stencil state object bound when stencil enabled
Tobin Ehlisce132d82015-06-19 15:07:05 -060061 DRAWSTATE_INDEX_BUFFER_NOT_BOUND, // Draw submitted with no depth-stencil state object bound when depth write enabled
Tobin Ehlis429b91d2015-06-22 17:20:50 -060062 DRAWSTATE_PIPELINE_LAYOUT_MISMATCH, // Draw submitted PSO Pipeline layout that doesn't match layout from BindDescriptorSets
Tobin Ehlis259730a2015-06-23 16:13:03 -060063 DRAWSTATE_INVALID_RENDERPASS, // Use of a NULL or otherwise invalid RenderPass object
Tobin Ehlisd1fe4ec2015-06-23 11:22:55 -060064 DRAWSTATE_INVALID_RENDERPASS_CMD, // Invalid cmd submitted while a RenderPass is active
65 DRAWSTATE_NO_ACTIVE_RENDERPASS, // Rendering cmd submitted without an active RenderPass
Tobin Ehlis502480b2015-06-24 15:53:07 -060066 DRAWSTATE_DESCRIPTOR_SET_NOT_UPDATED, // DescriptorSet bound but it was never updated. This is a warning code.
Tobin Ehlis53eddda2015-07-01 16:46:13 -060067 DRAWSTATE_CLEAR_CMD_BEFORE_DRAW, // Clear cmd issued before any Draw in CmdBuffer, should use RenderPass Ops instead
Mark Lobodzinskid9139a62015-08-04 16:24:20 -060068 DRAWSTATE_BEGIN_CB_INVALID_STATE, // Primary/Secondary CB created with mismatched FB/RP information
Tobin Ehlis75283bf2015-06-18 15:59:33 -060069 DRAWSTATE_INVALID_EXTENSION,
Tobin Ehlis246ba4d2014-11-18 16:38:08 -070070} DRAW_STATE_ERROR;
Tobin Ehlis5742e772014-11-20 09:49:17 -070071
72typedef enum _DRAW_TYPE
73{
74 DRAW = 0,
75 DRAW_INDEXED = 1,
76 DRAW_INDIRECT = 2,
77 DRAW_INDEXED_INDIRECT = 3,
78 DRAW_BEGIN_RANGE = DRAW,
79 DRAW_END_RANGE = DRAW_INDEXED_INDIRECT,
80 NUM_DRAW_TYPES = (DRAW_END_RANGE - DRAW_BEGIN_RANGE + 1),
81} DRAW_TYPE;
Tobin Ehlis83562882014-11-27 15:43:39 -070082
Tobin Ehlis7265e832015-01-19 08:42:29 -070083typedef struct _SHADER_DS_MAPPING {
84 uint32_t slotCount;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -060085 VkDescriptorSetLayoutCreateInfo* pShaderMappingSlot;
Tobin Ehlis7265e832015-01-19 08:42:29 -070086} SHADER_DS_MAPPING;
87
Tobin Ehlis04178d72015-01-22 10:45:21 -070088typedef struct _GENERIC_HEADER {
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -060089 VkStructureType sType;
Tobin Ehlis7265e832015-01-19 08:42:29 -070090 const void* pNext;
Tobin Ehlis04178d72015-01-22 10:45:21 -070091} GENERIC_HEADER;
Tobin Ehlis7265e832015-01-19 08:42:29 -070092
93typedef struct _PIPELINE_NODE {
Tony Barbourdd6e32e2015-07-10 15:29:03 -060094 VkPipeline pipeline;
95 VkGraphicsPipelineCreateInfo graphicsPipelineCI;
96 VkPipelineVertexInputStateCreateInfo vertexInputCI;
97 VkPipelineInputAssemblyStateCreateInfo iaStateCI;
98 VkPipelineTessellationStateCreateInfo tessStateCI;
99 VkPipelineViewportStateCreateInfo vpStateCI;
100 VkPipelineRasterStateCreateInfo rsStateCI;
101 VkPipelineMultisampleStateCreateInfo msStateCI;
102 VkPipelineColorBlendStateCreateInfo cbStateCI;
103 VkPipelineDepthStencilStateCreateInfo dsStateCI;
104 VkPipelineShaderStageCreateInfo vsCI;
105 VkPipelineShaderStageCreateInfo tcsCI;
106 VkPipelineShaderStageCreateInfo tesCI;
107 VkPipelineShaderStageCreateInfo gsCI;
108 VkPipelineShaderStageCreateInfo fsCI;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600109 // Compute shader is include in VkComputePipelineCreateInfo
Mark Lobodzinskid5732f32015-06-23 15:11:57 -0600110 VkComputePipelineCreateInfo computePipelineCI;
Tobin Ehlisa85167d2015-06-18 11:02:59 -0600111 // Flag of which shader stages are active for this pipeline
Mark Lobodzinskid5732f32015-06-23 15:11:57 -0600112 uint32_t active_shaders;
113 VkGraphicsPipelineCreateInfo* pCreateTree; // Ptr to shadow of data in create tree
Tobin Ehlis7265e832015-01-19 08:42:29 -0700114 // Vtx input info (if any)
Mark Lobodzinskid5732f32015-06-23 15:11:57 -0600115 uint32_t vtxBindingCount; // number of bindings
116 VkVertexInputBindingDescription* pVertexBindingDescriptions;
117 uint32_t vtxAttributeCount; // number of attributes
118 VkVertexInputAttributeDescription* pVertexAttributeDescriptions;
119 uint32_t attachmentCount; // number of CB attachments
Tony Barbourdd6e32e2015-07-10 15:29:03 -0600120 VkPipelineColorBlendAttachmentState* pAttachments;
Tobin Ehlis7265e832015-01-19 08:42:29 -0700121} PIPELINE_NODE;
122
123typedef struct _SAMPLER_NODE {
Tobin Ehlisce132d82015-06-19 15:07:05 -0600124 VkSampler sampler;
125 VkSamplerCreateInfo createInfo;
Tobin Ehlis7265e832015-01-19 08:42:29 -0700126} SAMPLER_NODE;
127
Tobin Ehlis04178d72015-01-22 10:45:21 -0700128typedef struct _BUFFER_NODE {
Tobin Ehlisce132d82015-06-19 15:07:05 -0600129 VkBufferView buffer;
Courtney Goeltzenleuchter95487bc2015-04-14 18:48:46 -0600130 VkBufferViewCreateInfo createInfo;
Tobin Ehlisce132d82015-06-19 15:07:05 -0600131 VkDescriptorInfo descriptorInfo;
Tobin Ehlis04178d72015-01-22 10:45:21 -0700132} BUFFER_NODE;
133
Tobin Ehlis7265e832015-01-19 08:42:29 -0700134// Descriptor Data structures
Tobin Ehlis04178d72015-01-22 10:45:21 -0700135// Layout Node has the core layout data
Tobin Ehlis7265e832015-01-19 08:42:29 -0700136typedef struct _LAYOUT_NODE {
Tobin Ehlisce132d82015-06-19 15:07:05 -0600137 VkDescriptorSetLayout layout;
138 VkDescriptorType* pTypes; // Dynamic array that will be created to verify descriptor types
139 VkDescriptorSetLayoutCreateInfo createInfo;
140 uint32_t startIndex; // 1st index of this layout
141 uint32_t endIndex; // last index of this layout
Tobin Ehlis7265e832015-01-19 08:42:29 -0700142} LAYOUT_NODE;
Tobin Ehlis7265e832015-01-19 08:42:29 -0700143typedef struct _SET_NODE {
Tobin Ehlisce132d82015-06-19 15:07:05 -0600144 VkDescriptorSet set;
145 VkDescriptorPool pool;
146 VkDescriptorSetUsage setUsage;
Tobin Ehlis481ec712015-02-19 09:55:18 -0700147 // Head of LL of all Update structs for this set
Tobin Ehlisce132d82015-06-19 15:07:05 -0600148 GENERIC_HEADER* pUpdateStructs;
Tobin Ehlis04178d72015-01-22 10:45:21 -0700149 // Total num of descriptors in this set (count of its layout plus all prior layouts)
Tobin Ehlisce132d82015-06-19 15:07:05 -0600150 uint32_t descriptorCount;
151 GENERIC_HEADER** ppDescriptors; // Array where each index points to update node for its slot
152 LAYOUT_NODE* pLayout; // Layout for this set
153 struct _SET_NODE* pNext;
Tobin Ehlis7265e832015-01-19 08:42:29 -0700154} SET_NODE;
155
Tobin Ehlis793ad302015-04-03 12:01:11 -0600156typedef struct _POOL_NODE {
Tobin Ehlisce132d82015-06-19 15:07:05 -0600157 VkDescriptorPool pool;
158 VkDescriptorPoolUsage poolUsage;
159 uint32_t maxSets;
160 VkDescriptorPoolCreateInfo createInfo;
161 SET_NODE* pSets; // Head of LL of sets for this Pool
Tobin Ehlis793ad302015-04-03 12:01:11 -0600162} POOL_NODE;
Tobin Ehlis7265e832015-01-19 08:42:29 -0700163
Tobin Ehlisd01f7d62015-02-13 10:26:14 -0700164// Cmd Buffer Tracking
165typedef enum _CMD_TYPE
166{
167 CMD_BINDPIPELINE,
168 CMD_BINDPIPELINEDELTA,
Courtney Goeltzenleuchter49c73082015-09-17 15:06:17 -0600169 CMD_SETVIEWPORTSTATE,
Courtney Goeltzenleuchter078f8172015-09-21 11:44:06 -0600170 CMD_SETSCISSORSTATE,
Courtney Goeltzenleuchter49c73082015-09-17 15:06:17 -0600171 CMD_SETLINEWIDTHSTATE,
172 CMD_SETDEPTHBIASSTATE,
173 CMD_SETBLENDSTATE,
174 CMD_SETDEPTHBOUNDSSTATE,
175 CMD_SETSTENCILREADMASKSTATE,
176 CMD_SETSTENCILWRITEMASKSTATE,
177 CMD_SETSTENCILREFERENCESTATE,
Tobin Ehlis793ad302015-04-03 12:01:11 -0600178 CMD_BINDDESCRIPTORSETS,
Tobin Ehlisd01f7d62015-02-13 10:26:14 -0700179 CMD_BINDINDEXBUFFER,
180 CMD_BINDVERTEXBUFFER,
181 CMD_DRAW,
182 CMD_DRAWINDEXED,
183 CMD_DRAWINDIRECT,
184 CMD_DRAWINDEXEDINDIRECT,
185 CMD_DISPATCH,
186 CMD_DISPATCHINDIRECT,
187 CMD_COPYBUFFER,
188 CMD_COPYIMAGE,
Tobin Ehlis793ad302015-04-03 12:01:11 -0600189 CMD_BLITIMAGE,
Tobin Ehlisd01f7d62015-02-13 10:26:14 -0700190 CMD_COPYBUFFERTOIMAGE,
191 CMD_COPYIMAGETOBUFFER,
192 CMD_CLONEIMAGEDATA,
193 CMD_UPDATEBUFFER,
194 CMD_FILLBUFFER,
195 CMD_CLEARCOLORIMAGE,
Tobin Ehlis53eddda2015-07-01 16:46:13 -0600196 CMD_CLEARCOLORATTACHMENT,
197 CMD_CLEARDEPTHSTENCILIMAGE,
198 CMD_CLEARDEPTHSTENCILATTACHMENT,
Tobin Ehlisd01f7d62015-02-13 10:26:14 -0700199 CMD_RESOLVEIMAGE,
200 CMD_SETEVENT,
201 CMD_RESETEVENT,
202 CMD_WAITEVENTS,
203 CMD_PIPELINEBARRIER,
204 CMD_BEGINQUERY,
205 CMD_ENDQUERY,
206 CMD_RESETQUERYPOOL,
207 CMD_WRITETIMESTAMP,
208 CMD_INITATOMICCOUNTERS,
209 CMD_LOADATOMICCOUNTERS,
210 CMD_SAVEATOMICCOUNTERS,
211 CMD_BEGINRENDERPASS,
Chia-I Wu08accc62015-07-07 11:50:03 +0800212 CMD_NEXTSUBPASS,
Tobin Ehlis67449422015-03-02 10:16:40 -0700213 CMD_ENDRENDERPASS,
Chia-I Wu0b50a1c2015-06-26 15:34:39 +0800214 CMD_EXECUTECOMMANDS,
Tobin Ehlis67449422015-03-02 10:16:40 -0700215 CMD_DBGMARKERBEGIN,
216 CMD_DBGMARKEREND,
Tobin Ehlisd01f7d62015-02-13 10:26:14 -0700217} CMD_TYPE;
218// Data structure for holding sequence of cmds in cmd buffer
219typedef struct _CMD_NODE {
Tobin Ehlisd01f7d62015-02-13 10:26:14 -0700220 CMD_TYPE type;
221 uint64_t cmdNumber;
222} CMD_NODE;
223
224typedef enum _CB_STATE
225{
226 CB_NEW, // Newly created CB w/o any cmds
227 CB_UPDATE_ACTIVE, // BeginCB has been called on this CB
228 CB_UPDATE_COMPLETE // EndCB has been called on this CB
229} CB_STATE;
Tobin Ehlise382c5a2015-06-10 12:57:07 -0600230// CB Status -- used to track status of various bindings on cmd buffer objects
231typedef VkFlags CBStatusFlags;
232typedef enum _CBStatusFlagBits
233{
234 CBSTATUS_NONE = 0x00000000, // No status is set
Courtney Goeltzenleuchter49c73082015-09-17 15:06:17 -0600235 CBSTATUS_VIEWPORT_SET = 0x00000001, // Viewport has been set
236 CBSTATUS_LINE_WIDTH_SET = 0x00000002, // Line width has been set
237 CBSTATUS_DEPTH_BIAS_SET = 0x00000004, // Depth bias has been set
238 CBSTATUS_COLOR_BLEND_WRITE_ENABLE = 0x00000008, // PSO w/ CB Enable set has been set
239 CBSTATUS_BLEND_SET = 0x00000010, // Blend state object has been set
240 CBSTATUS_DEPTH_WRITE_ENABLE = 0x00000020, // PSO w/ Depth Enable set has been set
241 CBSTATUS_STENCIL_TEST_ENABLE = 0x00000040, // PSO w/ Stencil Enable set has been set
242 CBSTATUS_DEPTH_BOUNDS_SET = 0x00000080, // Depth bounds state object has been set
243 CBSTATUS_STENCIL_READ_MASK_SET = 0x00000100, // Stencil read mask has been set
244 CBSTATUS_STENCIL_WRITE_MASK_SET = 0x00000200, // Stencil write mask has been set
245 CBSTATUS_STENCIL_REFERENCE_SET = 0x00000400, // Stencil reference has been set
246 CBSTATUS_INDEX_BUFFER_BOUND = 0x00000800, // Index buffer has been set
Courtney Goeltzenleuchter078f8172015-09-21 11:44:06 -0600247 CBSTATUS_SCISSOR_SET = 0x00001000, // Scissor has been set
Tobin Ehlise382c5a2015-06-10 12:57:07 -0600248} CBStatusFlagBits;
Tobin Ehlis60a9b4f2015-07-07 10:42:20 -0600249
Courtney Goeltzenleuchter49c73082015-09-17 15:06:17 -0600250typedef struct stencil_data {
251 uint32_t stencilCompareMask;
252 uint32_t stencilWriteMask;
253 uint32_t stencilReference;
254} CBStencilData;
255
Tobin Ehlis10ae8c12015-03-17 16:24:32 -0600256// Cmd Buffer Wrapper Struct
Tobin Ehlisd01f7d62015-02-13 10:26:14 -0700257typedef struct _GLOBAL_CB_NODE {
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600258 VkCmdBuffer cmdBuffer;
Tobin Ehlis59278bf2015-08-18 07:10:58 -0600259 VkCmdBufferCreateInfo createInfo;
260 VkCmdBufferBeginInfo beginInfo;
Tobin Ehlisa9f3d762015-05-22 12:38:16 -0600261 VkFence fence; // fence tracking this cmd buffer
262 uint64_t numCmds; // number of cmds in this CB
263 uint64_t drawCount[NUM_DRAW_TYPES]; // Count of each type of draw in this CB
Tobin Ehlise382c5a2015-06-10 12:57:07 -0600264 CB_STATE state; // Track cmd buffer update state
Tobin Ehlis59278bf2015-08-18 07:10:58 -0600265 uint64_t submitCount; // Number of times CB has been submitted
Tobin Ehlise382c5a2015-06-10 12:57:07 -0600266 CBStatusFlags status; // Track status of various bindings on cmd buffer
Tobin Ehlisa9f3d762015-05-22 12:38:16 -0600267 vector<CMD_NODE*> pCmds;
Tobin Ehlisd01f7d62015-02-13 10:26:14 -0700268 // Currently storing "lastBound" objects on per-CB basis
269 // long-term may want to create caches of "lastBound" states and could have
270 // each individual CMD_NODE referencing its own "lastBound" state
Tobin Ehlisa9f3d762015-05-22 12:38:16 -0600271 VkPipeline lastBoundPipeline;
272 uint32_t lastVtxBinding;
Courtney Goeltzenleuchter49c73082015-09-17 15:06:17 -0600273 vector<VkViewport> viewports;
274 vector<VkRect2D> scissors;
275 float lineWidth;
276 float depthBias;
277 float depthBiasClamp;
278 float slopeScaledDepthBias;
279 float blendConst[4];
280 float minDepthBounds;
281 float maxDepthBounds;
282 CBStencilData front;
283 CBStencilData back;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600284 VkDescriptorSet lastBoundDescriptorSet;
Tobin Ehlis429b91d2015-06-22 17:20:50 -0600285 VkPipelineLayout lastBoundPipelineLayout;
Courtney Goeltzenleuchterfb4efc62015-04-10 08:34:15 -0600286 VkRenderPass activeRenderPass;
Chia-I Wu08accc62015-07-07 11:50:03 +0800287 uint32_t activeSubpass;
Tobin Ehlisa9f3d762015-05-22 12:38:16 -0600288 VkFramebuffer framebuffer;
Mark Lobodzinskid9139a62015-08-04 16:24:20 -0600289 VkCmdBufferLevel level;
Tobin Ehlisa9f3d762015-05-22 12:38:16 -0600290 vector<VkDescriptorSet> boundDescriptorSets;
Tobin Ehlisd01f7d62015-02-13 10:26:14 -0700291} GLOBAL_CB_NODE;