diff options
| author | Chris Forbes <chrisforbes@google.com> | 2017-06-16 17:56:01 -0700 |
|---|---|---|
| committer | Chris Forbes <chrisf@ijw.co.nz> | 2017-06-19 10:49:28 -0700 |
| commit | 246248b4d6f96a3a2b543f5394c23c0a933a074d (patch) | |
| tree | 6a7d9e047da123e85c9d591db439eb13cff4b475 /layers/core_validation.cpp | |
| parent | 1b03ebbab1791b4669d50343a59f8fa07fb62209 (diff) | |
| download | usermoji-246248b4d6f96a3a2b543f5394c23c0a933a074d.tar.xz | |
layers: Further removal of CMD_TYPE plumbing
Diffstat (limited to 'layers/core_validation.cpp')
| -rw-r--r-- | layers/core_validation.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp index 5e59f4f2..075e5f7f 100644 --- a/layers/core_validation.cpp +++ b/layers/core_validation.cpp @@ -5613,16 +5613,14 @@ static bool ValidateCmdDrawType(layer_data *dev_data, VkCommandBuffer cmd_buffer } // Generic function to handle state update for all CmdDraw* and CmdDispatch* type functions -static void UpdateStateCmdDrawDispatchType(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point, - CMD_TYPE cmd_type) { +static void UpdateStateCmdDrawDispatchType(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point) { UpdateDrawState(dev_data, cb_state, bind_point); MarkStoreImagesAndBuffersAsWritten(dev_data, cb_state); } // Generic function to handle state update for all CmdDraw* type functions -static void UpdateStateCmdDrawType(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point, - CMD_TYPE cmd_type) { - UpdateStateCmdDrawDispatchType(dev_data, cb_state, bind_point, cmd_type); +static void UpdateStateCmdDrawType(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point) { + UpdateStateCmdDrawDispatchType(dev_data, cb_state, bind_point); updateResourceTrackingOnDraw(cb_state); cb_state->hasDrawCmd = true; } @@ -5634,7 +5632,7 @@ static bool PreCallValidateCmdDraw(layer_data *dev_data, VkCommandBuffer cmd_buf } static void PostCallRecordCmdDraw(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point) { - UpdateStateCmdDrawType(dev_data, cb_state, bind_point, CMD_DRAW); + UpdateStateCmdDrawType(dev_data, cb_state, bind_point); } VKAPI_ATTR void VKAPI_CALL CmdDraw(VkCommandBuffer commandBuffer, uint32_t vertexCount, uint32_t instanceCount, @@ -5659,7 +5657,7 @@ static bool PreCallValidateCmdDrawIndexed(layer_data *dev_data, VkCommandBuffer } static void PostCallRecordCmdDrawIndexed(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point) { - UpdateStateCmdDrawType(dev_data, cb_state, bind_point, CMD_DRAWINDEXED); + UpdateStateCmdDrawType(dev_data, cb_state, bind_point); } VKAPI_ATTR void VKAPI_CALL CmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount, @@ -5693,7 +5691,7 @@ static bool PreCallValidateCmdDrawIndirect(layer_data *dev_data, VkCommandBuffer static void PostCallRecordCmdDrawIndirect(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point, BUFFER_STATE *buffer_state) { - UpdateStateCmdDrawType(dev_data, cb_state, bind_point, CMD_DRAWINDIRECT); + UpdateStateCmdDrawType(dev_data, cb_state, bind_point); AddCommandBufferBindingBuffer(dev_data, cb_state, buffer_state); } @@ -5730,7 +5728,7 @@ static bool PreCallValidateCmdDrawIndexedIndirect(layer_data *dev_data, VkComman static void PostCallRecordCmdDrawIndexedIndirect(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point, BUFFER_STATE *buffer_state) { - UpdateStateCmdDrawType(dev_data, cb_state, bind_point, CMD_DRAWINDEXEDINDIRECT); + UpdateStateCmdDrawType(dev_data, cb_state, bind_point); AddCommandBufferBindingBuffer(dev_data, cb_state, buffer_state); } @@ -5758,7 +5756,7 @@ static bool PreCallValidateCmdDispatch(layer_data *dev_data, VkCommandBuffer cmd } static void PostCallRecordCmdDispatch(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point) { - UpdateStateCmdDrawDispatchType(dev_data, cb_state, bind_point, CMD_DISPATCH); + UpdateStateCmdDrawDispatchType(dev_data, cb_state, bind_point); } VKAPI_ATTR void VKAPI_CALL CmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z) { @@ -5789,7 +5787,7 @@ static bool PreCallValidateCmdDispatchIndirect(layer_data *dev_data, VkCommandBu static void PostCallRecordCmdDispatchIndirect(layer_data *dev_data, GLOBAL_CB_NODE *cb_state, VkPipelineBindPoint bind_point, BUFFER_STATE *buffer_state) { - UpdateStateCmdDrawDispatchType(dev_data, cb_state, bind_point, CMD_DISPATCHINDIRECT); + UpdateStateCmdDrawDispatchType(dev_data, cb_state, bind_point); AddCommandBufferBindingBuffer(dev_data, cb_state, buffer_state); } |
