summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Forbes <chrisforbes@google.com>2017-04-24 18:38:50 -0700
committerChris Forbes <chrisf@ijw.co.nz>2017-04-26 07:55:08 +1200
commit12b7fc342b53fbdd399aae4a85959e37685936ac (patch)
tree694947d6b00a174f17580997095bff6650021583
parent2c81be6aa02b10d9e225329977fa108ceda890a2 (diff)
layers: Drop layer_data from some leaf funcs that dont use it
-rw-r--r--layers/core_validation.cpp17
1 files changed, 8 insertions, 9 deletions
diff --git a/layers/core_validation.cpp b/layers/core_validation.cpp
index 0692b941..376137a7 100644
--- a/layers/core_validation.cpp
+++ b/layers/core_validation.cpp
@@ -1285,8 +1285,8 @@ static std::map<location_t, interface_var> collect_interface_by_location(shader_
return out;
}
-static std::vector<std::pair<uint32_t, interface_var>> collect_interface_by_input_attachment_index(
- debug_report_data *report_data, shader_module const *src, std::unordered_set<uint32_t> const &accessible_ids) {
+static vector<std::pair<uint32_t, interface_var>> collect_interface_by_input_attachment_index(
+ shader_module const *src, std::unordered_set<uint32_t> const &accessible_ids) {
std::vector<std::pair<uint32_t, interface_var>> out;
for (auto insn : *src) {
@@ -2083,7 +2083,7 @@ static bool verify_renderpass_compatibility(const layer_data *dev_data, const Vk
// For given cvdescriptorset::DescriptorSet, verify that its Set is compatible w/ the setLayout corresponding to
// pipelineLayout[layoutIndex]
-static bool verify_set_layout_compatibility(layer_data *dev_data, const cvdescriptorset::DescriptorSet *descriptor_set,
+static bool verify_set_layout_compatibility(const cvdescriptorset::DescriptorSet *descriptor_set,
PIPELINE_LAYOUT_NODE const *pipeline_layout, const uint32_t layoutIndex,
string &errorMsg) {
auto num_sets = pipeline_layout->set_layouts.size();
@@ -2522,7 +2522,7 @@ static bool validate_pipeline_shader_stage(
// Validate use of input attachments against subpass structure
if (pStage->stage == VK_SHADER_STAGE_FRAGMENT_BIT) {
- auto input_attachment_uses = collect_interface_by_input_attachment_index(report_data, module, accessible_ids);
+ auto input_attachment_uses = collect_interface_by_input_attachment_index(module, accessible_ids);
auto rpci = pipeline->render_pass_ci.ptr();
auto subpass = pipeline->graphicsPipelineCI.subpass;
@@ -2815,7 +2815,7 @@ static bool ValidateDrawState(layer_data *dev_data, GLOBAL_CB_NODE *cb_node, con
dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT, VK_DEBUG_REPORT_OBJECT_TYPE_COMMAND_BUFFER_EXT,
reinterpret_cast<uint64_t>(cb_node->commandBuffer), __LINE__, DRAWSTATE_DESCRIPTOR_SET_NOT_BOUND, "DS",
"VkPipeline 0x%" PRIxLEAST64 " uses set #%u but that set is not bound.", (uint64_t)pPipe->pipeline, setIndex);
- } else if (!verify_set_layout_compatibility(dev_data, state.boundDescriptorSets[setIndex], &pipeline_layout, setIndex,
+ } else if (!verify_set_layout_compatibility(state.boundDescriptorSets[setIndex], &pipeline_layout, setIndex,
errorString)) {
// Set is bound but not compatible w/ overlapping pipeline_layout from PSO
VkDescriptorSet setHandle = state.boundDescriptorSets[setIndex]->GetSet();
@@ -7126,7 +7126,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer,
(uint64_t)pDescriptorSets[set_idx]);
}
// Verify that set being bound is compatible with overlapping setLayout of pipelineLayout
- if (!verify_set_layout_compatibility(dev_data, descriptor_set, pipeline_layout, set_idx + firstSet, error_string)) {
+ if (!verify_set_layout_compatibility(descriptor_set, pipeline_layout, set_idx + firstSet, error_string)) {
skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_ERROR_BIT_EXT,
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, (uint64_t)pDescriptorSets[set_idx], __LINE__,
VALIDATION_ERROR_00974, "DS",
@@ -7204,7 +7204,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer,
if (firstSet > 0) { // Check set #s below the first bound set
for (uint32_t i = 0; i < firstSet; ++i) {
if (cb_state->lastBound[pipelineBindPoint].boundDescriptorSets[i] &&
- !verify_set_layout_compatibility(dev_data, cb_state->lastBound[pipelineBindPoint].boundDescriptorSets[i],
+ !verify_set_layout_compatibility(cb_state->lastBound[pipelineBindPoint].boundDescriptorSets[i],
pipeline_layout, i, error_string)) {
skip |= log_msg(
dev_data->report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT,
@@ -7220,8 +7220,7 @@ VKAPI_ATTR void VKAPI_CALL CmdBindDescriptorSets(VkCommandBuffer commandBuffer,
// Check if newly last bound set invalidates any remaining bound sets
if ((cb_state->lastBound[pipelineBindPoint].boundDescriptorSets.size() - 1) > (last_set_index)) {
if (old_final_bound_set &&
- !verify_set_layout_compatibility(dev_data, old_final_bound_set, pipeline_layout, last_set_index,
- error_string)) {
+ !verify_set_layout_compatibility(old_final_bound_set, pipeline_layout, last_set_index, error_string)) {
auto old_set = old_final_bound_set->GetSet();
skip |= log_msg(dev_data->report_data, VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT,
VK_DEBUG_REPORT_OBJECT_TYPE_DESCRIPTOR_SET_EXT, reinterpret_cast<uint64_t &>(old_set), __LINE__,