mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-11-29 17:23:40 +01:00
OpenXR - Move VR passes count calculation
This commit is contained in:
1 parent
1a6180583e
commit
be2613d495
4 files changed
+12
-12
No files matched your search
@@ -5,8 +5,6 @@
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/VR/PPSSPPVR.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
|
||||
#include "Common/Log.h"
|
||||
#include "Common/MemoryUtil.h"
|
||||
#include "Common/Math/math_util.h"
|
||||
@@ -580,10 +578,7 @@ void GLRenderManager::Run(int frame) {
|
||||
}
|
||||
|
||||
if (IsVRBuild()) {
|
||||
int passes = 1;
|
||||
if (!IsMultiviewSupported() && g_Config.bEnableStereo) {
|
||||
passes = 2;
|
||||
}
|
||||
int passes = GetVRPassesCount();
|
||||
for (int i = 0; i < passes; i++) {
|
||||
PreVRFrameRender(i);
|
||||
queueRunner_.RunSteps(stepsOnThread, skipGLCalls_, i < passes - 1);
|
||||
|
||||
@@ -14,8 +14,6 @@
|
||||
#include "Common/Thread/ThreadUtil.h"
|
||||
#include "Common/VR/PPSSPPVR.h"
|
||||
|
||||
#include "Core/Config.h"
|
||||
|
||||
#if 0 // def _DEBUG
|
||||
#define VLOG(...) NOTICE_LOG(G3D, __VA_ARGS__)
|
||||
#else
|
||||
@@ -1282,10 +1280,7 @@ void VulkanRenderManager::Run(VKRRenderThreadTask &task) {
|
||||
frameData.skipSwap = true;
|
||||
//queueRunner_.LogSteps(stepsOnThread, false);
|
||||
if (IsVRBuild()) {
|
||||
int passes = 1;
|
||||
if (!IsMultiviewSupported() && g_Config.bEnableStereo) {
|
||||
passes = 2;
|
||||
}
|
||||
int passes = GetVRPassesCount();
|
||||
for (int i = 0; i < passes; i++) {
|
||||
PreVRFrameRender(i);
|
||||
queueRunner_.RunSteps(task.steps, frameData, frameDataShared_, i < passes - 1);
|
||||
|
||||
@@ -339,6 +339,14 @@ int GetVRFBOIndex() {
|
||||
return VR_GetConfig(VR_CONFIG_CURRENT_FBO);
|
||||
}
|
||||
|
||||
int GetVRPassesCount() {
|
||||
if (!IsMultiviewSupported() && g_Config.bEnableStereo) {
|
||||
return 2;
|
||||
} else {
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
bool IsMultiviewSupported() {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -38,6 +38,7 @@ void FinishVRRender();
|
||||
void PreVRFrameRender(int fboIndex);
|
||||
void PostVRFrameRender();
|
||||
int GetVRFBOIndex();
|
||||
int GetVRPassesCount();
|
||||
bool IsMultiviewSupported();
|
||||
bool IsFlatVRScene();
|
||||
bool Is2DVRObject(float* projMatrix, bool ortho);
|
||||
@@ -65,6 +66,7 @@ inline void FinishVRRender() {}
|
||||
inline void PreVRFrameRender(int fboIndex) {}
|
||||
inline void PostVRFrameRender() {}
|
||||
inline int GetVRFBOIndex() { return 0; }
|
||||
inline int GetVRPassesCount() { return 1; }
|
||||
inline bool IsMultiviewSupported() { return false; }
|
||||
inline bool IsFlatVRScene() { return true; }
|
||||
inline bool Is2DVRObject(float* projMatrix, bool ortho) { return false; }
|
||||
|
||||
Reference in new issue
Block a user