Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve layer_gpu_timeline #31

Merged
merged 3 commits into from
Dec 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@ VKAPI_ATTR void VKAPI_CALL layer_vkCmdTraceRaysIndirectKHR<user_tag>(
lock.unlock();
emitStartTag(layer, commandBuffer, tagID);
layer->driver.vkCmdTraceRaysIndirectKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, indirectDeviceAddress);
layer->driver.vkCmdEndDebugUtilsLabelEXT(commandBuffer);
}

/* See Vulkan API for documentation. */
Expand All @@ -125,4 +126,5 @@ VKAPI_ATTR void VKAPI_CALL layer_vkCmdTraceRaysKHR<user_tag>(
lock.unlock();
emitStartTag(layer, commandBuffer, tagID);
layer->driver.vkCmdTraceRaysKHR(commandBuffer, pRaygenShaderBindingTable, pMissShaderBindingTable, pHitShaderBindingTable, pCallableShaderBindingTable, width, height, depth);
layer->driver.vkCmdEndDebugUtilsLabelEXT(commandBuffer);
}
39 changes: 9 additions & 30 deletions source_common/trackers/layer_command_stream.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,7 @@ LCSRenderPass::LCSRenderPass(

/* See header for details. */
std::string LCSRenderPass::getBeginMetadata(
const std::string* debugLabel,
uint64_t submitID) const
const std::string* debugLabel) const
{
// Draw count for a multi-submit command buffer cannot be reliably
// associated with a single tagID if restartable across command buffer
Expand All @@ -96,11 +95,6 @@ std::string LCSRenderPass::getBeginMetadata(
{ "drawCallCount", drawCount }
};

if (submitID != 0)
{
metadata["sid"] = submitID;
}

if (debugLabel && debugLabel->size())
{
metadata["label"] = *debugLabel;
Expand Down Expand Up @@ -147,8 +141,7 @@ std::string LCSRenderPass::getBeginMetadata(
/* See header for details. */
std::string LCSRenderPass::getContinuationMetadata(
const std::string* debugLabel,
uint64_t tagIDContinuation,
uint64_t submitID) const
uint64_t tagIDContinuation) const
{
json metadata = {
{ "type", "renderpass" },
Expand All @@ -161,28 +154,22 @@ std::string LCSRenderPass::getContinuationMetadata(
metadata["label"] = *debugLabel;
}

if (submitID != 0)
{
metadata["sid"] = submitID;
}

return metadata.dump();
}

/* See header for details. */
std::string LCSRenderPass::getMetadata(
const std::string* debugLabel,
uint64_t tagIDContinuation,
uint64_t submitID) const
uint64_t tagIDContinuation) const
{
if (tagID)
{
assert(tagIDContinuation == 0);
return getBeginMetadata(debugLabel, submitID);
return getBeginMetadata(debugLabel);
}

assert(tagIDContinuation != 0);
return getContinuationMetadata(debugLabel, tagIDContinuation, submitID);
return getContinuationMetadata(debugLabel, tagIDContinuation);
}

/* See header for details. */
Expand All @@ -203,11 +190,9 @@ LCSDispatch::LCSDispatch(
/* See header for details. */
std::string LCSDispatch::getMetadata(
const std::string* debugLabel,
uint64_t tagIDContinuation,
uint64_t submitID
uint64_t tagIDContinuation
) const {
UNUSED(tagIDContinuation);
UNUSED(submitID);

json metadata = {
{ "type", "dispatch" },
Expand Down Expand Up @@ -243,11 +228,9 @@ LCSTraceRays::LCSTraceRays(
/* See header for details. */
std::string LCSTraceRays::getMetadata(
const std::string* debugLabel,
uint64_t tagIDContinuation,
uint64_t submitID
uint64_t tagIDContinuation
) const {
UNUSED(tagIDContinuation);
UNUSED(submitID);

json metadata = {
{ "type", "tracerays" },
Expand Down Expand Up @@ -281,11 +264,9 @@ LCSImageTransfer::LCSImageTransfer(
/* See header for details. */
std::string LCSImageTransfer::getMetadata(
const std::string* debugLabel,
uint64_t tagIDContinuation,
uint64_t submitID
uint64_t tagIDContinuation
) const {
UNUSED(tagIDContinuation);
UNUSED(submitID);

json metadata = {
{ "type", "imagetransfer" },
Expand Down Expand Up @@ -318,11 +299,9 @@ LCSBufferTransfer::LCSBufferTransfer(
/* See header for details. */
std::string LCSBufferTransfer::getMetadata(
const std::string* debugLabel,
uint64_t tagIDContinuation,
uint64_t submitID
uint64_t tagIDContinuation
) const {
UNUSED(tagIDContinuation);
UNUSED(submitID);

json metadata = {
{ "type", "buffertransfer" },
Expand Down
Loading