-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
low priorityA minor issue that we can live withA minor issue that we can live with
Description
Diffusion/client/render/r_misc.cpp
Lines 2072 to 2073 in b4ab276
| if( num_glsl_programs >= (MAX_GLSL_PROGRAMS * 0.75f) ) | |
| GL_FreeUberShaders(); |
This code, supposedly, is freeing shaders while loading a new map, if their count exceeds a defined value (512 but actually 384). The next step is, supposedly, that the shaders will be recompiled again. But instead the game crashes. You can test this code by setting num_glsl_programs >= 5 for example.
If these lines are moved earlier, into HUD_BuildLightmaps for example, the code seems to work without crashing, and shaders will recompile.
However, num_glsl_programs never resets, which doesn't seem right. Resetting it manually after this procedure just breaks everything.
For now, I have increased MAX_GLSL_PROGRAMS in this commit: 187fb09
1024 (actually we are looking at 1024 * 0.9 = 921) is a huge number which is unlikely to be hit during a full playthrough, so it's low priority for now.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
low priorityA minor issue that we can live withA minor issue that we can live with