pvr: calculate framebuffer size when TA context is dequeued
Config can change after the TA context has been queued (upscaling, full framebuffer emu, etc.) which can make the calculated framebuffer size wrong during render, leading to crashes in renderers. Fix for MINIDUMP-35
This commit is contained in:
parent
659d21680b
commit
3441a9ccf0
|
@ -170,6 +170,13 @@ private:
|
|||
if (_pvrrc == nullptr)
|
||||
return;
|
||||
|
||||
if (!_pvrrc->rend.isRTT)
|
||||
{
|
||||
int width, height;
|
||||
getScaledFramebufferSize(_pvrrc->rend, width, height);
|
||||
_pvrrc->rend.framebufferWidth = width;
|
||||
_pvrrc->rend.framebufferHeight = height;
|
||||
}
|
||||
bool renderToScreen = !_pvrrc->rend.isRTT && !config::EmulateFramebuffer;
|
||||
#ifdef LIBRETRO
|
||||
if (renderToScreen)
|
||||
|
@ -384,14 +391,6 @@ void rend_start_render()
|
|||
ctx->rend.fog_clamp_min = FOG_CLAMP_MIN;
|
||||
ctx->rend.fog_clamp_max = FOG_CLAMP_MAX;
|
||||
|
||||
if (!ctx->rend.isRTT)
|
||||
{
|
||||
int width, height;
|
||||
getScaledFramebufferSize(ctx->rend, width, height);
|
||||
ctx->rend.framebufferWidth = width;
|
||||
ctx->rend.framebufferHeight = height;
|
||||
}
|
||||
|
||||
if (QueueRender(ctx))
|
||||
{
|
||||
palette_update();
|
||||
|
|
Loading…
Reference in New Issue