-
Notifications
You must be signed in to change notification settings - Fork 65
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
base: master
Are you sure you want to change the base?
Implement PushBuffer #1684
Conversation
1e2423c to
1bd0d74
Compare
|
This can be rebased now. |
1bd0d74 to
1b41cd4
Compare
Done. |
|
Some issues found with testing:
|
Now I found a way. Set |
4b840fd to
3e2071b
Compare
Fixed. |
Also fixed. |
|
I confirm the 2 previous bugs are fixed. But I get the depth fade issue from #1676 again with this branch when enabling material system. It happens with any depth fade regardless of alpha tests, polygon offset etc. The bug reappears as of the first usable commit |
The comment there says it was already broken on material system? On my end it was working fine so I can't confirm if there's any issue with it on master right now. |
|
It was broken but #1704 fixed it. It works on master. |
Not sure what the issue is. I can't reproduce it on my end, and there don't seem to be any depth writes after |
|
The depth texture is all garbage all the time, as if it's not hooked up properly. It's still garbage if I set By the way, I realized you can make a depth texture visualization with just a q3shader, no GLSL required: |
|
Hmm, the only thing I could think of is it has something to do with the textures being bindless. This is on AMD + Mesa, right? It might have the same cause as the broken occlusion culling reported there ~1 year ago. |
Yes
On master if I turn on occlusion culling, it segfaults immediately. |
Is the segfault coming from daemon? I don't get any on master. |
|
I have provided a stack trace in #1724 |
That's true, just |
Even with the fix from #1725? |
|
It might that the driver recognises that the depth map handle is in the buffer (which is interfaced in all shaders) and that breaks |
|
Actually no, there is a missing texture barrier, before depthtile. |
51ef20c to
a6b2a20
Compare
|
Added a fix for that now. |
|
I see. One more possible workaround is to special-case the depth map, so it never goes into the buffer on AMD + Mesa. |
a6b2a20 to
4ef781c
Compare
39318b7 to
dd4890f
Compare
|
CI failure is unrelated. |
|
Now there is a weird bug where polygons with depth fade are drawn back-faced or with reverse culling. So for example rifle smoke and acid tube acid are invisible. You can see it by using |
This happens iff bindless textures are used. |
f379ba1 to
49064fc
Compare
Works fine for me. You can report it to Mesa, I don't see where the issue might be. |
|
If we implement #1783 we could try activating it for drivers/hardware affected by depth texture problems as a workaround. |
d1cd6ce to
64f48dd
Compare
|
I wanted to see if the changes from #1814 had any effect on the issues here. So I made an attempt to rebase the PR so that each commits builds and runs - see the I still get the problem that when bindless textures are enabled, depth fade and motion blur shaders produce noise. However, there is now an available workaround in setting I also uncovered another issue: when disabling |
Adds `PushBuffer` class, `pushBuffer` global, and the supporting code for `glconfig2`.
- Generalise uniform post-processing - Add `GLShader.pushSkip` and `GLShader._pushUniforms`. Add `padding` back to the `GLShader` size calculations in material system. - Add GlobalUBOProxy, required for `PushBuffer` to set global uniform values outside of their shaders. - Add `PostProcessGlobalUniforms()`: set `GLShaderManager.globalUniformBlock` to the struct + defines text, which will be the same for all shaders. - GLUniform._global -> _updateType: required for `PushBuffer` to correctly sort uniforms. Also updates `GLShader.WriteUniformsToBuffer()` to use `mode` and `filter` arguments to select the correct uniforms. - Add global UBO in PushBuffer - 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. - Fix quake3 fog with material system
64f48dd to
03de480
Compare
Fixed. |
|
I've removed the previous workaround commit since it's not working. |



Requires #1683
Add
PushBuffer, update uniforms to have anupdateType. TheCONSTandFRAMEuniforms are written into a uniform buffer after the map is loaded/at the start of a frame. This allows skipping some of theglUniform*()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