Skip to content

Commit a6b2a20

Browse files
committed
Add 2 missing glTextureBarrier()
1 parent 310ed75 commit a6b2a20

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/engine/renderer/tr_backend.cpp

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,6 +1227,12 @@ static void RenderDepthTiles()
12271227
return;
12281228
}
12291229

1230+
// Assume depth is dirty since we just rendered depth pass
1231+
if ( glConfig2.textureBarrierAvailable ) {
1232+
glTextureBarrier();
1233+
backEnd.dirtyDepthBuffer = false;
1234+
}
1235+
12301236
// 1st step
12311237
R_BindFBO( tr.depthtile1FBO );
12321238
GL_Viewport( 0, 0, tr.depthtile1FBO->width, tr.depthtile1FBO->height );
@@ -1508,6 +1514,13 @@ void RB_RenderMotionBlur()
15081514

15091515
GLIMP_LOGCOMMENT( "--- RB_RenderMotionBlur ---" );
15101516

1517+
/* Assume depth is dirty since we just rendered depth pass and everything opaque,
1518+
unless we have already rendered post-depth lighttile, which does this as well */
1519+
if ( glConfig2.textureBarrierAvailable && backEnd.dirtyDepthBuffer ) {
1520+
glTextureBarrier();
1521+
backEnd.dirtyDepthBuffer = false;
1522+
}
1523+
15111524
GL_State( GLS_DEPTHTEST_DISABLE );
15121525
GL_Cull( cullType_t::CT_TWO_SIDED );
15131526

0 commit comments

Comments
 (0)