Render 3D: Handle RenderFinish() more consistently. Fixes 3D flushing issues when running single-threaded SoftRasterizer.
This commit is contained in:
parent
e5694abd63
commit
6680577146
|
@ -4717,11 +4717,15 @@ Render3DError OpenGLRenderer_1_2::Reset()
|
|||
|
||||
Render3DError OpenGLRenderer_1_2::RenderFinish()
|
||||
{
|
||||
if (!this->_renderNeedsFinish || !this->_pixelReadNeedsFinish)
|
||||
if (!this->_renderNeedsFinish)
|
||||
{
|
||||
return OGLERROR_NOERR;
|
||||
}
|
||||
|
||||
if (this->_pixelReadNeedsFinish)
|
||||
{
|
||||
this->_pixelReadNeedsFinish = false;
|
||||
|
||||
if(!BEGINGL())
|
||||
{
|
||||
return OGLERROR_BEGINGL_FAILED;
|
||||
|
@ -4737,8 +4741,8 @@ Render3DError OpenGLRenderer_1_2::RenderFinish()
|
|||
}
|
||||
|
||||
ENDGL();
|
||||
}
|
||||
|
||||
this->_pixelReadNeedsFinish = false;
|
||||
this->_renderNeedsFlushMain = true;
|
||||
this->_renderNeedsFlush16 = true;
|
||||
|
||||
|
@ -5036,11 +5040,15 @@ Render3DError OpenGLRenderer_2_0::SetupTexture(const POLY &thePoly, size_t polyR
|
|||
|
||||
Render3DError OpenGLRenderer_2_1::RenderFinish()
|
||||
{
|
||||
if (!this->_renderNeedsFinish || !this->_pixelReadNeedsFinish)
|
||||
if (!this->_renderNeedsFinish)
|
||||
{
|
||||
return OGLERROR_NOERR;
|
||||
}
|
||||
|
||||
if (this->_pixelReadNeedsFinish)
|
||||
{
|
||||
this->_pixelReadNeedsFinish = false;
|
||||
|
||||
if(!BEGINGL())
|
||||
{
|
||||
return OGLERROR_BEGINGL_FAILED;
|
||||
|
@ -5049,8 +5057,8 @@ Render3DError OpenGLRenderer_2_1::RenderFinish()
|
|||
this->_mappedFramebuffer = (FragmentColor *__restrict)glMapBuffer(GL_PIXEL_PACK_BUFFER, GL_READ_ONLY);
|
||||
|
||||
ENDGL();
|
||||
}
|
||||
|
||||
this->_pixelReadNeedsFinish = false;
|
||||
this->_renderNeedsFlushMain = true;
|
||||
this->_renderNeedsFlush16 = true;
|
||||
|
||||
|
|
|
@ -2226,11 +2226,13 @@ Render3DError SoftRasterizerRenderer::EndRender(const u64 frameCount)
|
|||
|
||||
Render3DError SoftRasterizerRenderer::RenderFinish()
|
||||
{
|
||||
if (!this->_renderNeedsFinish || !this->_renderGeometryNeedsFinish)
|
||||
if (!this->_renderNeedsFinish)
|
||||
{
|
||||
return RENDER3DERROR_NOERR;
|
||||
}
|
||||
|
||||
if (this->_renderGeometryNeedsFinish)
|
||||
{
|
||||
// Allow for the geometry rendering to finish.
|
||||
this->_renderGeometryNeedsFinish = false;
|
||||
for (size_t i = 0; i < rasterizerCores; i++)
|
||||
|
@ -2260,6 +2262,7 @@ Render3DError SoftRasterizerRenderer::RenderFinish()
|
|||
rasterizerUnitTask[i].finish();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
this->_renderNeedsFlushMain = true;
|
||||
this->_renderNeedsFlush16 = true;
|
||||
|
|
Loading…
Reference in New Issue