Skip to content

Comments

Expose GetBlockIndexGFXR() from capture layer#1128

Merged
panos-lunarg merged 1 commit intoLunarG:devfrom
panos-lunarg:panos_GetBlockIndexGFXR
Jul 12, 2023
Merged

Expose GetBlockIndexGFXR() from capture layer#1128
panos-lunarg merged 1 commit intoLunarG:devfrom
panos-lunarg:panos_GetBlockIndexGFXR

Conversation

@panos-lunarg
Copy link
Contributor

GetBlockIndexGFXR() returns the current block index being processed by the capture manager.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build queued with queue ID 2998.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 2793 running.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 2793 passed.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build queued with queue ID 3620.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 2797 running.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 2797 passed.

@panos-lunarg panos-lunarg force-pushed the panos_GetBlockIndexGFXR branch from a60a58c to dfceb87 Compare May 22, 2023 08:21
@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build queued with queue ID 4671.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 2798 running.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 2798 failed.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build queued with queue ID 6312.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 2809 running.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 2809 passed.

@locke-lunarg
Copy link
Contributor

locke-lunarg commented May 25, 2023

The code looks good to me. Could you please give me some examples of where we will need the capture block index? How is the purpose different from the decoder block index? Thank you.

Plus, this capture block index is different from the decoder block index since the capture includes system code, but the decoder has only Vulkan code. Should we care about it? My consideration is if the difference will confuse users or not.
Sorry. The decoder also includes system code, so it looks the capture block index matches the decoder block index. Right?

@panos-lunarg
Copy link
Contributor Author

This change is needed for the perfetto layer (https://github.com/panos-lunarg/GFXR_layers). The perfetto layer is basically a vulkan layer that queries the current block id (by calling the GetBlockIndexGFXR function from the capture layer) and emits it to perfetto.

I am not sure what you mean with system code but with this change the vulkan capture manager should generate the same block ids as the file processor as it parses the file. So the block ID should be the same when capturing and when replaying

@locke-lunarg
Copy link
Contributor

System code I mean something aren't Vulkan function calls. It doesn't matter. LGTM.

@locke-lunarg locke-lunarg self-requested a review May 26, 2023 06:58
@locke-lunarg
Copy link
Contributor

locke-lunarg commented May 26, 2023

I'm thinking that could we write this block index to the file? So the decoder could just read the block index to ensure both have the same block index. The decoder won't count it by itself.

@panos-lunarg
Copy link
Contributor Author

I am not sure if it's worth it. We can't store the id in the block header without breaking backward compatibility, so we'll have to store it as a metadata? This would essentially double the blocks written to the file.
Can you think of a better way?

@locke-lunarg
Copy link
Contributor

locke-lunarg commented May 26, 2023

You are right. We shouldn't break backward compatibility.

@locke-lunarg locke-lunarg self-requested a review May 27, 2023 06:26
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.

This looks pretty good to me. Later we can consider whether this should be exposed through some kind of "LUNARG" Vulkan extension, maybe even make it generic like VK_LUNARG_get_tooling_marker or some such.

GetBlockIndexGFXR() returns the current block index being processed by
the capture manager.
@panos-lunarg panos-lunarg force-pushed the panos_GetBlockIndexGFXR branch from dfceb87 to 09a641c Compare July 12, 2023 03:33
@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build queued with queue ID 4799.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 2963 running.

@ci-tester-lunarg
Copy link
Collaborator

CI gfxreconstruct build # 2963 passed.

@panos-lunarg panos-lunarg merged commit 0495c58 into LunarG:dev Jul 12, 2023
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