by dpJudas » Tue Jun 04, 2019 9:14 am
I found the reason for why removing the discard keyword made a difference.
According to
PPFXAA::Render the output is a new frame buffer - not the original. The discard therefore leaves a gap in the new one.
As an optimization, the vulkan backend tells the driver it can safely discard the old contents when doing the image transition as we will be overwriting it anyway. I strongly suspect most image transitions do nothing on NVidia, which means the original contents were probably just the contents from last render (like with the OpenGL backend). AMD, on the other hand, took advantage of the hint and decided not to transition the image, leaving more chaotic pixels behind.
In other words: the rendering glitch is technically there also on NVidia and OpenGL - we just never noticed it as the old pixels were correct enough.
I found the reason for why removing the discard keyword made a difference.
According to [url=https://github.com/coelckers/gzdoom/blob/master/src/rendering/hwrenderer/postprocessing/hw_postprocess.cpp#L332]PPFXAA::Render[/url] the output is a new frame buffer - not the original. The discard therefore leaves a gap in the new one.
As an optimization, the vulkan backend tells the driver it can safely discard the old contents when doing the image transition as we will be overwriting it anyway. I strongly suspect most image transitions do nothing on NVidia, which means the original contents were probably just the contents from last render (like with the OpenGL backend). AMD, on the other hand, took advantage of the hint and decided not to transition the image, leaving more chaotic pixels behind.
In other words: the rendering glitch is technically there also on NVidia and OpenGL - we just never noticed it as the old pixels were correct enough.