[Android] Fix Adreno v53 development drivers rotating framebuffer

Older Qualcomm drivers rotated the framebuffer 90 degrees and this fix didn't work.
Now for some obscene reason it rotates a full 180 degrees.
This can at least be worked around by flipping around the image on our end.
This commit is contained in:
Ryan Houdek
2014-01-29 16:15:10 -06:00
parent 5df958fe23
commit 99b6c82ac3
3 changed files with 19 additions and 4 deletions

View File

@ -1299,10 +1299,15 @@ void Renderer::Swap(u32 xfbAddr, u32 fbWidth, u32 fbHeight,const EFBRectangle& r
UpdateDrawRectangle(s_backbuffer_width, s_backbuffer_height);
TargetRectangle flipped_trc = GetTargetRectangle();
// Flip top and bottom for some reason; TODO: Fix the code to suck less?
int tmp = flipped_trc.top;
flipped_trc.top = flipped_trc.bottom;
flipped_trc.bottom = tmp;
if (DriverDetails::HasBug(DriverDetails::BUG_ROTATEDFRAMEBUFFER))
{
std::swap(flipped_trc.left, flipped_trc.right);
}
else
{
// Flip top and bottom for some reason; TODO: Fix the code to suck less?
std::swap(flipped_trc.top, flipped_trc.bottom);
}
GL_REPORT_ERRORD();