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

Clarify Vulkan-specific items #1443

Merged

Conversation

MarkY-LunarG
Copy link
Contributor

Since GFXR started as a Vulkan project, many of the items have no clear identifier in their name. But now that GFXR supports DX and may support other APIs in the future, we should clarify Vulkan-specific items.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 148599.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3853 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3853 passed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 149400.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3864 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3864 passed.

@@ -78,7 +78,7 @@ class ParameterEncoder
void EncodeFunctionPtr(T value) { EncodeValue(reinterpret_cast<format::AddressEncodeType>(value)); }

template<typename Wrapper>
void EncodeHandleValue(typename Wrapper::HandleType value) { EncodeHandleIdValue(GetWrappedId<Wrapper>(value)); }
void EncodeHandleValue(typename Wrapper::HandleType value) { EncodeHandleIdValue(GetVulkanWrappedId<Wrapper>(value)); }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add Vulkan to the parameter encoder name as well? e.g., EncodeHandleValue -> EncodeVulkanHandleValue

@@ -164,7 +164,7 @@ static void EncodeDescriptorUpdateTemplateInfo(VulkanCaptureManager* manager
{
size_t offset = entry_info.offset + (entry_info.stride * i);
const VkBufferView* entry = reinterpret_cast<const VkBufferView*>(bytes + offset);
encoder->EncodeHandleValue<BufferViewWrapper>(*entry);
encoder->EncodeHandleValue<vulkan_wrappers::BufferViewWrapper>(*entry);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if there is another solution for delineating these Vulkan wrappers that doesn't require the vulkan_wrappers:: prefix on every object. Some potential ideas:

  1. Add a Vulkan-specific namespace (e.g., gfxrecon::encode::vulkan or gfxrecon::encode::vk) for all Vulkan-specific encode files. A Vulkan-specific namespace could also be added for gfxrecon::decode, e.g., gfxrecon::decode::vulkan
  2. Adopt the DX12 wrapper naming pattern [DX12 object name]_Wrapper, so vulkan_wrappers::BufferViewWrapper becomes VkBufferView_Wrapper

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your idea of the full name might work, but doing additional namespaces was much more involved than I wanted to go down.

MarkY-LunarG and others added 5 commits March 26, 2024 13:54
Vulkan Instance and Device functions (and tables) were only identified
by the Instance or Device label and not clearly identified as being
Vulkan-specific.  Add "Vulkan" to each to clarify their usage so
that they do not conflict with other Khronos-related API items.
Update Vulkan-specific wrappers in the encoder to have a "Vulkan"
identifier to differentiate it from other Khronos API related items.
Move a number of Vulkan-specific items into a few namespaces so that
it is clear which items are Vulkan in the future when other APIs
have been added into the standard layer.
@bradgrantham-lunarg bradgrantham-lunarg force-pushed the marky_separate_vulkan_items branch from 8253c30 to d16973b Compare March 26, 2024 21:36
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 157704.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3926 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3926 passed.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 158183.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3930 running.

Copy link
Contributor

@bradgrantham-lunarg bradgrantham-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll merge when CI succeeds

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 3930 passed.

@bradgrantham-lunarg bradgrantham-lunarg merged commit 1e17297 into LunarG:dev Mar 27, 2024
8 checks passed
@MarkY-LunarG MarkY-LunarG deleted the marky_separate_vulkan_items branch May 15, 2024 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants