Skip to content

Commit

Permalink
Followup to #17471: Fix Lubos' VR sky clearing hack
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Jun 4, 2023
1 parent 27b8d27 commit 75dd318
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
5 changes: 2 additions & 3 deletions Common/GPU/OpenGL/GLQueueRunner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -711,9 +711,8 @@ void GLQueueRunner::RunSteps(const std::vector<GLRStep *> &steps, GLFrameData &f
case GLRStepType::RENDER:
renderCount++;
if (IsVREnabled()) {
GLRStep &vrStep = step;
PreprocessStepVR(&vrStep);
PerformRenderPass(vrStep, renderCount == 1, renderCount == totalRenderCount, frameData.profile);
PreprocessStepVR(&step);
PerformRenderPass(step, renderCount == 1, renderCount == totalRenderCount, frameData.profile);
} else {
PerformRenderPass(step, renderCount == 1, renderCount == totalRenderCount, frameData.profile);
}
Expand Down
8 changes: 6 additions & 2 deletions Common/VR/PPSSPPVR.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -561,10 +561,14 @@ void PreprocessSkyplane(GLRStep* step) {
// Clear sky with the fog color.
if (!vrCompat[VR_COMPAT_FBO_CLEAR]) {
GLRRenderData &skyClear = step->commands.insert(step->commands.begin());
skyClear.cmd = GLRRenderCommand::CLEAR; // intentional zero-initialize
skyClear.cmd = GLRRenderCommand::CLEAR;
skyClear.clear.colorMask = 0xF;
skyClear.clear.clearMask = GL_COLOR_BUFFER_BIT;
skyClear.clear.clearMask = GL_COLOR_BUFFER_BIT; // don't need to initialize clearZ, clearStencil
skyClear.clear.clearColor = vrCompat[VR_COMPAT_FOG_COLOR];
skyClear.clear.scissorX = 0;
skyClear.clear.scissorY = 0;
skyClear.clear.scissorW = 0; // signal no scissor
skyClear.clear.scissorH = 0;
vrCompat[VR_COMPAT_FBO_CLEAR] = true;
}

Expand Down

0 comments on commit 75dd318

Please sign in to comment.