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

Some dynamic buffer-related clean-up and fixes #1528

Merged
merged 4 commits into from
Feb 5, 2025

Conversation

VReaperV
Copy link
Contributor

  • NUKED useless GL_ARB_buffer_storage and GL_ARB_sync macro checks.
  • Fix bogus checks for SHADER_MAX_VERTEXES and SHADER_MAX_INDEXES for cases where the dynamic buffers are not being used by adding a check for r_vboModels. Also changed it to a new-style cvar.
  • Some small clean-up of Ringbuffer functions and more stuff in logs.

@VReaperV VReaperV force-pushed the cleanup-dynamic-buffers branch 2 times, most recently from 5d7425c to 6b1428c Compare January 30, 2025 03:07
Copy link
Member

@slipher slipher left a comment

Choose a reason for hiding this comment

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

LGTM modulo comment

src/engine/renderer/tr_vbo.cpp Outdated Show resolved Hide resolved
while( glClientWaitSync( rb->syncs[ rb->activeSegment ], GL_SYNC_FLUSH_COMMANDS_BIT,
10000000 ) == GL_TIMEOUT_EXPIRED ) {
Log::Warn("long wait for GL buffer" );
// wait until next segment is ready in 10ms intervals
Copy link
Member

Choose a reason for hiding this comment

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

Heh, I've seen that warning occasionally. Maybe the timeout should be longer. (non-blocking comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmm, I don't think I've ever actually seen that one. I've got some further in-progress changes to these dynamic VBOs/IBOs to fix navedit performance, it might fix the warn too.

These are already inherently a part of `glConfig2.bufferStorageAvailable` and `glConfig2.syncAvailable`, the macros do nothing.
These make no sense when static VBOs are used, so only do those checks if `r_vboModels` is disabled.
@VReaperV VReaperV force-pushed the cleanup-dynamic-buffers branch from 6b1428c to 81d27cf Compare February 5, 2025 18:24
@VReaperV VReaperV merged commit e5022d3 into DaemonEngine:master Feb 5, 2025
9 checks passed
@VReaperV VReaperV deleted the cleanup-dynamic-buffers branch February 5, 2025 19:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants