OpenXR foveation removed

This commit is contained in:
Lubos 2022-04-30 14:10:27 +02:00
parent 61b3192bce
commit 405ca571ad
4 changed files with 1 additions and 77 deletions

View file

@ -16,11 +16,7 @@ const char* const requiredExtensionNames[] = {
XR_EXT_PERFORMANCE_SETTINGS_EXTENSION_NAME,
XR_KHR_ANDROID_THREAD_SETTINGS_EXTENSION_NAME,
XR_KHR_COMPOSITION_LAYER_CYLINDER_EXTENSION_NAME,
XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME,
XR_FB_SWAPCHAIN_UPDATE_STATE_EXTENSION_NAME,
XR_FB_SWAPCHAIN_UPDATE_STATE_OPENGL_ES_EXTENSION_NAME,
XR_FB_FOVEATION_EXTENSION_NAME,
XR_FB_FOVEATION_CONFIGURATION_EXTENSION_NAME};
XR_FB_DISPLAY_REFRESH_RATE_EXTENSION_NAME};
const uint32_t numRequiredExtensions =
sizeof(requiredExtensionNames) / sizeof(requiredExtensionNames[0]);

View file

@ -270,14 +270,6 @@ void VR_InitRenderer( engine_t* engine ) {
&engine->appState.Renderer,
engine->appState.ViewConfigurationView[0].recommendedImageRectWidth,
engine->appState.ViewConfigurationView[0].recommendedImageRectHeight);
ovrRenderer_SetFoveation(
&engine->appState.Instance,
&engine->appState.Session,
&engine->appState.Renderer,
XR_FOVEATION_LEVEL_HIGH_FB,
0,
XR_FOVEATION_DYNAMIC_DISABLED_FB);
}
void VR_DestroyRenderer( engine_t* engine )

View file

@ -73,12 +73,6 @@ bool ovrFramebuffer_Create(
swapChainCreateInfo.arraySize = 2;
swapChainCreateInfo.mipCount = 1;
// Enable Foveation on this swapchain
XrSwapchainCreateInfoFoveationFB swapChainFoveationCreateInfo;
memset(&swapChainFoveationCreateInfo, 0, sizeof(swapChainFoveationCreateInfo));
swapChainFoveationCreateInfo.type = XR_TYPE_SWAPCHAIN_CREATE_INFO_FOVEATION_FB;
swapChainCreateInfo.next = &swapChainFoveationCreateInfo;
frameBuffer->ColorSwapChain.Width = swapChainCreateInfo.width;
frameBuffer->ColorSwapChain.Height = swapChainCreateInfo.height;
@ -226,57 +220,6 @@ void ovrRenderer_Destroy(ovrRenderer* renderer) {
ovrFramebuffer_Destroy(&renderer->FrameBuffer);
}
void ovrRenderer_SetFoveation(
XrInstance* instance,
XrSession* session,
ovrRenderer* renderer,
XrFoveationLevelFB level,
float verticalOffset,
XrFoveationDynamicFB dynamic) {
PFN_xrCreateFoveationProfileFB pfnCreateFoveationProfileFB;
OXR(xrGetInstanceProcAddr(
*instance,
"xrCreateFoveationProfileFB",
(PFN_xrVoidFunction*)(&pfnCreateFoveationProfileFB)));
PFN_xrDestroyFoveationProfileFB pfnDestroyFoveationProfileFB;
OXR(xrGetInstanceProcAddr(
*instance,
"xrDestroyFoveationProfileFB",
(PFN_xrVoidFunction*)(&pfnDestroyFoveationProfileFB)));
PFN_xrUpdateSwapchainFB pfnUpdateSwapchainFB;
OXR(xrGetInstanceProcAddr(
*instance, "xrUpdateSwapchainFB", (PFN_xrVoidFunction*)(&pfnUpdateSwapchainFB)));
XrFoveationLevelProfileCreateInfoFB levelProfileCreateInfo;
memset(&levelProfileCreateInfo, 0, sizeof(levelProfileCreateInfo));
levelProfileCreateInfo.type = XR_TYPE_FOVEATION_LEVEL_PROFILE_CREATE_INFO_FB;
levelProfileCreateInfo.level = level;
levelProfileCreateInfo.verticalOffset = verticalOffset;
levelProfileCreateInfo.dynamic = dynamic;
XrFoveationProfileCreateInfoFB profileCreateInfo;
memset(&profileCreateInfo, 0, sizeof(profileCreateInfo));
profileCreateInfo.type = XR_TYPE_FOVEATION_PROFILE_CREATE_INFO_FB;
profileCreateInfo.next = &levelProfileCreateInfo;
XrFoveationProfileFB foveationProfile;
pfnCreateFoveationProfileFB(*session, &profileCreateInfo, &foveationProfile);
XrSwapchainStateFoveationFB foveationUpdateState;
memset(&foveationUpdateState, 0, sizeof(foveationUpdateState));
foveationUpdateState.type = XR_TYPE_SWAPCHAIN_STATE_FOVEATION_FB;
foveationUpdateState.profile = foveationProfile;
pfnUpdateSwapchainFB(
renderer->FrameBuffer.ColorSwapChain.Handle,
(XrSwapchainStateBaseHeaderFB*)(&foveationUpdateState));
pfnDestroyFoveationProfileFB(foveationProfile);
}
/*
================================================================================

View file

@ -173,13 +173,6 @@ void ovrRenderer_Create(
int suggestedEyeTextureWidth,
int suggestedEyeTextureHeight);
void ovrRenderer_Destroy(ovrRenderer* renderer);
void ovrRenderer_SetFoveation(
XrInstance* instance,
XrSession* session,
ovrRenderer* renderer,
XrFoveationLevelFB level,
float verticalOffset,
XrFoveationDynamicFB dynamic);
void ovrTrackedController_Clear(ovrTrackedController* controller);