Skip to content
This repository has been archived by the owner on Jul 29, 2021. It is now read-only.

preTransform set error in android-Q #258

Open
raochp opened this issue Sep 20, 2019 · 0 comments
Open

preTransform set error in android-Q #258

raochp opened this issue Sep 20, 2019 · 0 comments

Comments

@raochp
Copy link

raochp commented Sep 20, 2019

in init_swap_chain
.......................
if (surfCapabilities.supportedTransforms & VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR) {
preTransform = VK_SURFACE_TRANSFORM_IDENTITY_BIT_KHR;
} else {
preTransform = surfCapabilities.currentTransform;
}
...............................
preTransform must set with surfCapabilities.currentTransform, because vkQueuePresentKHR has new calibration.
....................................................
int window_transform_hint;
err = window->query(window, NATIVE_WINDOW_TRANSFORM_HINT,
&window_transform_hint);
if (err != 0) {
ALOGE("NATIVE_WINDOW_TRANSFORM_HINT query failed: %s (%d)",
strerror(-err), err);
swapchain_result = WorstPresentResult(
swapchain_result, VK_ERROR_SURFACE_LOST_KHR);
}
if (swapchain.pre_transform != window_transform_hint) {
ALOGE("patch vkQueuePresentKHR transform failed: pre %d, window %d",
swapchain.pre_transform, window_transform_hint);
swapchain_result =
WorstPresentResult(swapchain_result, VK_SUBOPTIMAL_KHR);
}

.............................................

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant