Skip to content

Implement PushBuffer #1684

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

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open

Conversation

VReaperV
Copy link
Contributor

@VReaperV VReaperV commented Jun 23, 2025

Requires #1683

Add PushBuffer, update uniforms to have an updateType. The CONST and FRAME uniforms are written into a uniform buffer after the map is loaded/at the start of a frame. This allows skipping some of the glUniform*() calls to decrease the amount of overhead.

This largely re-uses the existing functionality added for the material system.

This will also be needed for #1587

VReaperV added 9 commits June 24, 2025 10:00
This will be required for PushBuffer.
Will be required for PushBuffer. Also added back `_isTexture` to `GLUniform` because it will also be needed for PushBuffer.
Needed for `PushBuffer`.
…stem

Deleting the buffer automatically unmaps it.
Adds `PushBuffer` class, `pushBuffer` global, and the supporting code for `glconfig2`.
Also adds `GLShader.pushSkip` and `GLShader._pushUniforms`. Add `padding` back to the `GLShader` size calculations in material system.
Will be required for `PushBuffer` to set global uniform values outside of their shaders.
VReaperV added 3 commits June 24, 2025 10:16
This will set `GLShaderManager.globalUniformBlock` to the struct + defines text, which will be the same for all shaders.
This will be required for `PushBuffer` to correctly sort uniforms. Also updates `GLShader.WriteUniformsToBuffer()` to use `mode` and `filter` arguments to select the correct uniforms.
Post-process shaders to actually add the `globalUniformBlock`, add `SetConstUniforms()` and `SetFrameUniforms()` functions to the core and material system renderers, and add the supporting glsl code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-Renderer T-Feature-Request Proposed new feature T-Improvement Improvement for an existing feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant