mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
GPU: Move swtransform flippedY to params.
This commit is contained in:
parent
030bfb1fb6
commit
3730460bc5
6 changed files with 7 additions and 4 deletions
|
@ -555,8 +555,6 @@ void SoftwareTransform::BuildDrawingParams(int prim, int vertexCount, u32 vertTy
|
|||
FramebufferManagerCommon *fbman = params_.fbman;
|
||||
bool useBufferedRendering = fbman->UseBufferedRendering();
|
||||
|
||||
bool flippedY = g_Config.iGPUBackend == (int)GPUBackend::OPENGL && !useBufferedRendering;
|
||||
|
||||
if (prim != GE_PRIM_RECTANGLES) {
|
||||
// We can simply draw the unexpanded buffer.
|
||||
numTrans = vertexCount;
|
||||
|
@ -570,7 +568,7 @@ void SoftwareTransform::BuildDrawingParams(int prim, int vertexCount, u32 vertTy
|
|||
if (!throughmode) {
|
||||
memcpy(&flippedMatrix, gstate.projMatrix, 16 * sizeof(float));
|
||||
|
||||
const bool invertedY = flippedY ? (gstate_c.vpHeight < 0) : (gstate_c.vpHeight > 0);
|
||||
const bool invertedY = params_.flippedY ? (gstate_c.vpHeight < 0) : (gstate_c.vpHeight > 0);
|
||||
if (invertedY) {
|
||||
flippedMatrix[1] = -flippedMatrix[1];
|
||||
flippedMatrix[5] = -flippedMatrix[5];
|
||||
|
@ -640,7 +638,7 @@ void SoftwareTransform::BuildDrawingParams(int prim, int vertexCount, u32 vertTy
|
|||
if (!gstate.isDepthClampEnabled() && (tlOutside || brOutside))
|
||||
continue;
|
||||
|
||||
RotateUV(trans, tl, br, flippedY);
|
||||
RotateUV(trans, tl, br, params_.flippedY);
|
||||
}
|
||||
|
||||
// Triangle: BR-TR-TL
|
||||
|
|
|
@ -56,6 +56,7 @@ struct SoftwareTransformParams {
|
|||
bool allowClear;
|
||||
bool allowSeparateAlphaClear;
|
||||
bool provokeFlatFirst;
|
||||
bool flippedY;
|
||||
};
|
||||
|
||||
class SoftwareTransform {
|
||||
|
|
|
@ -586,6 +586,7 @@ rotateVBO:
|
|||
params.allowClear = true;
|
||||
params.allowSeparateAlphaClear = false; // D3D11 doesn't support separate alpha clears
|
||||
params.provokeFlatFirst = true;
|
||||
params.flippedY = false;
|
||||
|
||||
int maxIndex = indexGen.MaxIndex();
|
||||
SoftwareTransform swTransform(params);
|
||||
|
|
|
@ -555,6 +555,7 @@ rotateVBO:
|
|||
params.allowClear = true;
|
||||
params.allowSeparateAlphaClear = false;
|
||||
params.provokeFlatFirst = true;
|
||||
params.flippedY = false;
|
||||
|
||||
int maxIndex = indexGen.MaxIndex();
|
||||
SoftwareTransform swTransform(params);
|
||||
|
|
|
@ -563,6 +563,7 @@ void DrawEngineGLES::DoFlush() {
|
|||
params.allowClear = true;
|
||||
params.allowSeparateAlphaClear = true;
|
||||
params.provokeFlatFirst = false;
|
||||
params.flippedY = !framebufferManager_->UseBufferedRendering();
|
||||
|
||||
int maxIndex = indexGen.MaxIndex();
|
||||
int vertexCount = indexGen.VertexCount();
|
||||
|
|
|
@ -909,6 +909,7 @@ void DrawEngineVulkan::DoFlush() {
|
|||
params.allowClear = framebufferManager_->UseBufferedRendering();
|
||||
params.allowSeparateAlphaClear = false;
|
||||
params.provokeFlatFirst = true;
|
||||
params.flippedY = false;
|
||||
|
||||
// We need to update the viewport early because it's checked for flipping in SoftwareTransform.
|
||||
// We don't have a "DrawStateEarly" in vulkan, so...
|
||||
|
|
Loading…
Add table
Reference in a new issue