Skip to content

Commit

Permalink
gpuav: Rename UpdateCommandCount
Browse files Browse the repository at this point in the history
To IncrementCommandCount
  • Loading branch information
arno-lunarg authored and spencer-lunarg committed Dec 7, 2024
1 parent d84bbba commit b3f08e9
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
46 changes: 23 additions & 23 deletions layers/gpu/core/gpuav_record.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ void Validator::PostCallRecordCmdDraw(VkCommandBuffer commandBuffer, uint32_t ve
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uint32_t drawCount,
Expand Down Expand Up @@ -361,7 +361,7 @@ void Validator::PostCallRecordCmdDrawMultiEXT(VkCommandBuffer commandBuffer, uin
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawIndexed(VkCommandBuffer commandBuffer, uint32_t indexCount, uint32_t instanceCount,
Expand Down Expand Up @@ -390,7 +390,7 @@ void Validator::PostCallRecordCmdDrawIndexed(VkCommandBuffer commandBuffer, uint
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuffer, uint32_t drawCount,
Expand Down Expand Up @@ -424,7 +424,7 @@ void Validator::PostCallRecordCmdDrawMultiIndexedEXT(VkCommandBuffer commandBuff
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset, uint32_t count,
Expand Down Expand Up @@ -452,7 +452,7 @@ void Validator::PostCallRecordCmdDrawIndirect(VkCommandBuffer commandBuffer, VkB
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawIndexedIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
Expand Down Expand Up @@ -480,7 +480,7 @@ void Validator::PostCallRecordCmdDrawIndexedIndirect(VkCommandBuffer commandBuff
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
Expand Down Expand Up @@ -527,7 +527,7 @@ void Validator::PostCallRecordCmdDrawIndirectCount(VkCommandBuffer commandBuffer
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawIndirectByteCountEXT(VkCommandBuffer commandBuffer, uint32_t instanceCount,
Expand Down Expand Up @@ -558,7 +558,7 @@ void Validator::PostCallRecordCmdDrawIndirectByteCountEXT(VkCommandBuffer comman
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawIndexedIndirectCountKHR(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
Expand Down Expand Up @@ -607,7 +607,7 @@ void Validator::PostCallRecordCmdDrawIndexedIndirectCount(VkCommandBuffer comman
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer, uint32_t taskCount, uint32_t firstTask,
Expand All @@ -632,7 +632,7 @@ void Validator::PostCallRecordCmdDrawMeshTasksNV(VkCommandBuffer commandBuffer,
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawMeshTasksIndirectNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
Expand Down Expand Up @@ -660,7 +660,7 @@ void Validator::PostCallRecordCmdDrawMeshTasksIndirectNV(VkCommandBuffer command
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
Expand Down Expand Up @@ -695,7 +695,7 @@ void Validator::PostCallRecordCmdDrawMeshTasksIndirectCountNV(VkCommandBuffer co
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer, uint32_t groupCountX, uint32_t groupCountY,
Expand All @@ -720,7 +720,7 @@ void Validator::PostCallRecordCmdDrawMeshTasksEXT(VkCommandBuffer commandBuffer,
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawMeshTasksIndirectEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
Expand Down Expand Up @@ -748,7 +748,7 @@ void Validator::PostCallRecordCmdDrawMeshTasksIndirectEXT(VkCommandBuffer comman
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
Expand Down Expand Up @@ -783,7 +783,7 @@ void Validator::PostCallRecordCmdDrawMeshTasksIndirectCountEXT(VkCommandBuffer c
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDispatch(VkCommandBuffer commandBuffer, uint32_t x, uint32_t y, uint32_t z,
Expand All @@ -810,7 +810,7 @@ void Validator::PostCallRecordCmdDispatch(VkCommandBuffer commandBuffer, uint32_
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_COMPUTE;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDispatchIndirect(VkCommandBuffer commandBuffer, VkBuffer buffer, VkDeviceSize offset,
Expand Down Expand Up @@ -838,7 +838,7 @@ void Validator::PostCallRecordCmdDispatchIndirect(VkCommandBuffer commandBuffer,
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_COMPUTE;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDispatchBase(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY,
Expand Down Expand Up @@ -869,7 +869,7 @@ void Validator::PostCallRecordCmdDispatchBase(VkCommandBuffer commandBuffer, uin
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_COMPUTE;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdDispatchBaseKHR(VkCommandBuffer commandBuffer, uint32_t baseGroupX, uint32_t baseGroupY,
Expand Down Expand Up @@ -928,7 +928,7 @@ void Validator::PostCallRecordCmdTraceRaysNV(VkCommandBuffer commandBuffer, VkBu
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdTraceRaysKHR(VkCommandBuffer commandBuffer,
Expand Down Expand Up @@ -965,7 +965,7 @@ void Validator::PostCallRecordCmdTraceRaysKHR(VkCommandBuffer commandBuffer,
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuffer,
Expand Down Expand Up @@ -1005,7 +1005,7 @@ void Validator::PostCallRecordCmdTraceRaysIndirectKHR(VkCommandBuffer commandBuf
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBuffer, VkDeviceAddress indirectDeviceAddress,
Expand All @@ -1032,7 +1032,7 @@ void Validator::PostCallRecordCmdTraceRaysIndirect2KHR(VkCommandBuffer commandBu
}
const VkPipelineBindPoint bind_point = VK_PIPELINE_BIND_POINT_RAY_TRACING_KHR;
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

void Validator::PreCallRecordCmdExecuteGeneratedCommandsEXT(VkCommandBuffer commandBuffer, VkBool32 isPreprocessed,
Expand Down Expand Up @@ -1062,7 +1062,7 @@ void Validator::PostCallRecordCmdExecuteGeneratedCommandsEXT(VkCommandBuffer com
}
const VkPipelineBindPoint bind_point = ConvertToPipelineBindPoint(pGeneratedCommandsInfo->shaderStages);
PostCallSetupShaderInstrumentationResources(*this, *cb_state, bind_point, record_obj.location);
cb_state->UpdateCommandCount(bind_point);
cb_state->IncrementCommandCount(bind_point);
}

} // namespace gpuav
2 changes: 1 addition & 1 deletion layers/gpu/resources/gpuav_state_trackers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -419,7 +419,7 @@ void CommandBuffer::ClearCmdErrorsCountsBuffer(const Location &loc) const {
cmd_errors_counts_buffer_.UnmapMemory();
}

void CommandBuffer::UpdateCommandCount(VkPipelineBindPoint bind_point) {
void CommandBuffer::IncrementCommandCount(VkPipelineBindPoint bind_point) {
action_command_count++;
if (bind_point == VK_PIPELINE_BIND_POINT_GRAPHICS) {
draw_index++;
Expand Down
2 changes: 1 addition & 1 deletion layers/gpu/resources/gpuav_state_trackers.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class CommandBuffer : public vvl::CommandBuffer {
const vko::Buffer &GetBdaRangesSnapshot() const { return bda_ranges_snapshot_; }

void ClearCmdErrorsCountsBuffer(const Location &loc) const;
void UpdateCommandCount(VkPipelineBindPoint bind_point);
void IncrementCommandCount(VkPipelineBindPoint bind_point);

void Destroy() final;
void Reset(const Location &loc) final;
Expand Down

0 comments on commit b3f08e9

Please sign in to comment.