Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce number of blits required in stereo 3D by tracking current eye... #774

Merged
merged 1 commit into from Mar 4, 2019

Conversation

cmbruns
Copy link
Contributor

@cmbruns cmbruns commented Mar 3, 2019

...to improve efficiency. Each postprocessing pass will now begin its work on whichever eye the previous pass finished on.

@coelckers
Copy link
Member

This needs to be checked by dpJudas, especially if this has any bearing on porting the code to Vulkan.

@coelckers coelckers requested a review from dpjudas March 3, 2019 18:13
@cmbruns
Copy link
Contributor Author

cmbruns commented Mar 3, 2019

@dpjudas Please note that this change is closely related to #760 which is already merged into master. In that previous pull request, I replaced most of the framebuffer swaps used for stereo 3D, with blits, because I felt it was easier to reason about; especially in the context of the framebuffer swapping used for postprocessing. This pull request is a follow on to that one, and reduces the total number of blits, by reducing the number of eye context switches. Thus each loop-over-the-eyes loop begins with the eye that the previous one finished on. The first such loop, the regular 3D scene render, always begins at eye number zero, in case the stereo mode changed since the previous frame.

Copy link
Contributor

@dpjudas dpjudas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably okay to merge as-is, given the other PR is already merged in.

There are a lot of subtle differences between OpenGL and Vulkan framebuffers. Most important one being that the vulkan ones are tied to a specific render pass. The concept of renderbuffers also no longer exists in Vulkan. The Vulkan vkCmdBlitImage command is also far more restrictive than its OpenGL counterpart and requires image transition operations which could negatively affect performance.

For all those reasons I won't be trying to move more of FGLRenderBuffers to the hwrenderer layer as the differences are just too great.

@coelckers coelckers merged commit 0fb9406 into ZDoom:master Mar 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants