Skip to content

Commit b808f95

Browse files
committed
Fix R_ClearBModelInstanceClaims race
1 parent 414ee7c commit b808f95

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Quake/gl_rmain.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -371,6 +371,11 @@ R_SetupViewBeforeMark
371371
*/
372372
static void R_SetupViewBeforeMark (void *unused)
373373
{
374+
// must happen here: in indirect mode draw_world only depends on this task, latching
375+
// bmodel_instances_index any later would race the read in R_DrawIndirectBrushes
376+
if (indirect)
377+
R_ClearBModelInstanceClaims ();
378+
374379
// Need to do those early because we now update dynamic light maps during R_MarkSurfaces
375380
if (!r_gpulightmapupdate.value)
376381
R_PushDlights ();

Quake/r_world.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -969,9 +969,6 @@ static void R_MarkSurfacesPrepare (void *unused)
969969

970970
r_visframecount++;
971971

972-
if (indirect)
973-
R_ClearBModelInstanceClaims ();
974-
975972
// set all chains to null
976973
for (i = 0; i < cl.worldmodel->numtextures; i++)
977974
if (cl.worldmodel->textures[i])

0 commit comments

Comments
 (0)