godot icon indicating copy to clipboard operation
godot copied to clipboard

Optimize ANGLE on D3D11 to remove an extra blit

Open alvinhochun opened this issue 1 year ago • 1 comments

Support the extension EGL_ANGLE_surface_orientation, which allows ANGLE to skip an extra blit from an intermediate buffer to the D3D11 swap chain back buffer for inverting the Y axis due to the difference in coordinate systems. Instead we do our inverting in RasterizerGLES3.


When running with --rendering-driver opengl3_angle --verbose you should see these in the output:

EGL: EGL_ANGLE_surface_orientation is supported.
EGL: Using optimal surface orientation: Invert Y

I have verified with RenderDoc that this replaces two Draw calls (one for glBlitFramebuffer from the render target FBO to the "screen" which is ANGLE's intermediate buffer with inverted Y, another for drawing ANGLE's intermediate buffer to the swap chain's back buffer) with one CopySubresourceRegion call (glBlitFramebuffer from the render target FBO to the swap chain's back buffer).

alvinhochun avatar Jul 30 '24 16:07 alvinhochun

@bruvzg Can you review this?

alvinhochun avatar Aug 28 '24 09:08 alvinhochun

Thanks!

Repiteo avatar Oct 10 '24 23:10 Repiteo