layers: Move CommandBuffer state objects to separate files
This is the last of the deck chair rearranging for a while. As of this
change core_validation_types.h is no more. Instead, in state_tracker.h
there's some forward declarations in state and *minimal* includes of
other state object headers. This greatly reduces the changes of hitting
the 'change one small thing and rebuild the universe' problem.
diff --git a/layers/synchronization_validation.cpp b/layers/synchronization_validation.cpp
index e96f454..f4fb0a4 100644
--- a/layers/synchronization_validation.cpp
+++ b/layers/synchronization_validation.cpp
@@ -1759,7 +1759,7 @@
bool skip = false;
const PIPELINE_STATE *pipe = nullptr;
const std::vector<LAST_BOUND_STATE::PER_SET> *per_sets = nullptr;
- GetCurrentPipelineAndDesriptorSetsFromCommandBuffer(*cb_state_.get(), pipelineBindPoint, &pipe, &per_sets);
+ cb_state_->GetCurrentPipelineAndDesriptorSets(pipelineBindPoint, &pipe, &per_sets);
if (!pipe || !per_sets) {
return skip;
}
@@ -1891,7 +1891,7 @@
const ResourceUsageTag &tag) {
const PIPELINE_STATE *pipe = nullptr;
const std::vector<LAST_BOUND_STATE::PER_SET> *per_sets = nullptr;
- GetCurrentPipelineAndDesriptorSetsFromCommandBuffer(*cb_state_.get(), pipelineBindPoint, &pipe, &per_sets);
+ cb_state_->GetCurrentPipelineAndDesriptorSets(pipelineBindPoint, &pipe, &per_sets);
if (!pipe || !per_sets) {
return;
}
@@ -1973,7 +1973,7 @@
bool CommandBufferAccessContext::ValidateDrawVertex(uint32_t vertexCount, uint32_t firstVertex, const char *func_name) const {
bool skip = false;
- const auto *pipe = GetCurrentPipelineFromCommandBuffer(*cb_state_.get(), VK_PIPELINE_BIND_POINT_GRAPHICS);
+ const auto *pipe = cb_state_->GetCurrentPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS);
if (!pipe) {
return skip;
}
@@ -2004,7 +2004,7 @@
}
void CommandBufferAccessContext::RecordDrawVertex(uint32_t vertexCount, uint32_t firstVertex, const ResourceUsageTag &tag) {
- const auto *pipe = GetCurrentPipelineFromCommandBuffer(*cb_state_.get(), VK_PIPELINE_BIND_POINT_GRAPHICS);
+ const auto *pipe = cb_state_->GetCurrentPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS);
if (!pipe) {
return;
}
@@ -2117,7 +2117,7 @@
const char *func_name) const {
bool skip = false;
const auto &sync_state = ex_context.GetSyncState();
- const auto *pipe = GetCurrentPipelineFromCommandBuffer(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS);
+ const auto *pipe = cmd.GetCurrentPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS);
if (!pipe ||
(pipe->graphicsPipelineCI.pRasterizationState && pipe->graphicsPipelineCI.pRasterizationState->rasterizerDiscardEnable)) {
return skip;
@@ -2209,7 +2209,7 @@
}
void RenderPassAccessContext::RecordDrawSubpassAttachment(const CMD_BUFFER_STATE &cmd, const ResourceUsageTag &tag) {
- const auto *pipe = GetCurrentPipelineFromCommandBuffer(cmd, VK_PIPELINE_BIND_POINT_GRAPHICS);
+ const auto *pipe = cmd.GetCurrentPipeline(VK_PIPELINE_BIND_POINT_GRAPHICS);
if (!pipe ||
(pipe->graphicsPipelineCI.pRasterizationState && pipe->graphicsPipelineCI.pRasterizationState->rasterizerDiscardEnable)) {
return;