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

Align capture and replay swapchain transformations #2025

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

panos-lunarg
Copy link
Contributor

No description provided.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 373200.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6073 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6073 passed.

@@ -3302,10 +3302,13 @@ VkResult VulkanReplayConsumerBase::OverrideGetPhysicalDeviceSurfaceCapabilitiesK
VkSurfaceKHR surface = surface_info->handle;
auto replay_surface_capabilities = pSurfaceCapabilities->GetOutputPointer();

auto meta = pSurfaceCapabilities->GetMetaStructPointer();
surface_info->capture_surface_capabilities[physical_device] = *meta->decoded_value;
Copy link
Contributor

Choose a reason for hiding this comment

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

At this line, *meta->decoded_value is the captured surface capabilities but physical_device is the replay handle. This mapped a replay handle to captured data and I was confused (I guess I think capture data to replay data) until I traced this with a debugger. Can capture_surface_capabilities be keyed off the capture PD handleID or physical_device_info through the captured surface handleID or something like that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Apologies but I took (yet) another approach for this. The logic of the new change is in OverrideCreateSwapchain:

#if defined(VK_USE_PLATFORM_ANDROID_KHR)
            // On Android, SetSwapchainWindowSize will take care of non identity transformations by requesting the
            // appropriate orientation with setRequestedOrientation
            modified_create_info.preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
#endif

The changes in generated_vulkan_replay_consumer.cpp are still valid (although now kind of unrelated) because the check if (pSurfaceInfo->GetPointer()->surface == VK_NULL_HANDLE) { return; } was done before the call to MapStructHandles so the surface handle was always null

@panos-lunarg panos-lunarg force-pushed the align_capture_and_replay_swapchain_transform branch from 18484a2 to 29c451e Compare February 19, 2025 10:17
@ci-tester-lunarg
Copy link

CI gfxreconstruct build queued with queue ID 375058.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6095 running.

@ci-tester-lunarg
Copy link

CI gfxreconstruct build # 6095 passed.

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.

3 participants