Skip to content

Commit

Permalink
Add pipeline creation attempt annotation (LunarG#1559)
Browse files Browse the repository at this point in the history
* Add pipeline creation attempt annotation

* Fix formatting

* Formatting
  • Loading branch information
beau-lunarg authored Jul 5, 2024
1 parent 068a548 commit f37bb05
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
8 changes: 8 additions & 0 deletions framework/encode/custom_vulkan_api_call_encoders.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateGraphicsPipelines(VkDevice
{
if (pCreateInfos[i].flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT)
{
VulkanCaptureManager::Get()->WriteAnnotation(
format::AnnotationType::kText, format::kAnnotationPipelineCreationAttempt, "");
GFXRECON_LOG_WARNING(
"VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT isn't suppported. Skip dispatch "
"CreateGraphicsPipelines and not record the call. Force to return VK_PIPELINE_COMPILE_REQUIRED.");
Expand Down Expand Up @@ -503,6 +505,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateComputePipelines(VkDevice
{
if (pCreateInfos[i].flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT)
{
VulkanCaptureManager::Get()->WriteAnnotation(
format::AnnotationType::kText, format::kAnnotationPipelineCreationAttempt, "");
GFXRECON_LOG_WARNING(
"VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT isn't suppported. Skip dispatch "
"CreateComputePipelines and not record the call. Force to return VK_PIPELINE_COMPILE_REQUIRED.");
Expand Down Expand Up @@ -592,6 +596,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesNV(VkDevice
{
if (pCreateInfos[i].flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT)
{
VulkanCaptureManager::Get()->WriteAnnotation(
format::AnnotationType::kText, format::kAnnotationPipelineCreationAttempt, "");
GFXRECON_LOG_WARNING(
"VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT isn't suppported. Skip dispatch "
"CreateRayTracingPipelinesNV and not record the call. Force to return "
Expand Down Expand Up @@ -684,6 +690,8 @@ VKAPI_ATTR VkResult VKAPI_CALL CreateRayTracingPipelinesKHR(VkDevice
{
if (pCreateInfos[i].flags & VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT)
{
VulkanCaptureManager::Get()->WriteAnnotation(
format::AnnotationType::kText, format::kAnnotationPipelineCreationAttempt, "");
GFXRECON_LOG_WARNING(
"VK_PIPELINE_CREATE_FAIL_ON_PIPELINE_COMPILE_REQUIRED_BIT isn't suppported. Skip dispatch "
"CreateRayTracingPipelinesKHR and not record the call. Force to return "
Expand Down
7 changes: 4 additions & 3 deletions framework/format/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,9 +67,10 @@ const int8_t kNoneIndex = -1;

/// Label for operation annotation, which captures parameters used by tools
/// operating on a capture file.
const char* const kAnnotationLabelOperation = "operation";
const char* const kAnnotationLabelReplayOptions = "replayopts";
const char* const kAnnotationLabelRemovedResource = "removed-resource";
const char* const kAnnotationLabelOperation = "operation";
const char* const kAnnotationLabelReplayOptions = "replayopts";
const char* const kAnnotationLabelRemovedResource = "removed-resource";
const char* const kAnnotationPipelineCreationAttempt = "pipelinecreationattempt";

const char* const kOperationAnnotationGfxreconstructVersion = "gfxrecon-version";
const char* const kOperationAnnotationVulkanVersion = "vulkan-version";
Expand Down

0 comments on commit f37bb05

Please sign in to comment.