Skip to content

Commit 88ac29b

Browse files
committed
PushBuffer fixes
1 parent 98fe727 commit 88ac29b

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

src/engine/renderer/GLMemory.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ class GLBuffer {
5151
std::string name;
5252
const GLuint64 SYNC_TIMEOUT = 10000000000; // 10 seconds
5353

54-
GLuint id;
54+
GLuint id = 0;
5555

5656
GLBuffer( const char* newName, const GLuint newBindingPoint, const GLbitfield newFlags, const GLbitfield newMapFlags ) :
5757
name( newName ),

src/engine/renderer/Material.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,8 +1669,9 @@ void MaterialSystem::DepthReduction() {
16691669
uint32_t globalWorkgroupX = ( width + 7 ) / 8;
16701670
uint32_t globalWorkgroupY = ( height + 7 ) / 8;
16711671

1672-
// FIXME: u_DepthMap object on the shader is not actually used
1673-
GL_Bind( tr.currentDepthImage );
1672+
gl_depthReductionShader->SetUniform_DepthMapBindless(
1673+
GL_BindToTMU( 0, tr.currentDepthImage )
1674+
);
16741675
glBindImageTexture( 2, depthImage->texnum, 0, GL_FALSE, 0, GL_WRITE_ONLY, GL_R32F );
16751676

16761677
gl_depthReductionShader->SetUniform_InitialDepthLevel( true );

src/engine/renderer/tr_bsp.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4659,9 +4659,11 @@ static void SetConstUniforms() {
46594659
globalUBOProxy->SetUniform_ColorMap3DBindless( GL_BindToTMU( 3, tr.colorGradeImage ) );
46604660
}
46614661

4662-
globalUBOProxy->SetUniform_DepthMapBindless( GL_BindToTMU( 1, tr.currentDepthImage ) );
4662+
globalUBOProxy->SetUniform_DepthMapBindless( GL_BindToTMU( 1, tr.depthSamplerImage ) );
46634663

4664-
globalUBOProxy->SetUniform_PortalMapBindless( GL_BindToTMU( 1, tr.portalRenderImage ) );
4664+
if ( r_liquidMapping->integer ) {
4665+
globalUBOProxy->SetUniform_PortalMapBindless( GL_BindToTMU( 1, tr.portalRenderImage ) );
4666+
}
46654667

46664668
if ( glConfig.realtimeLighting ) {
46674669
globalUBOProxy->SetUniform_DepthTile1Bindless(

0 commit comments

Comments
 (0)