Skip to content

Commit 39318b7

Browse files
committed
Fix glconfig2 occurences
1 parent 4ef781c commit 39318b7

File tree

5 files changed

+30
-30
lines changed

5 files changed

+30
-30
lines changed

src/engine/renderer/gl_shader.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1607,7 +1607,7 @@ void GLShaderManager::PostProcessGlobalUniforms() {
16071607
GLuint padding;
16081608
std::vector<GLUniform*>* uniforms = &( ( GLShader* ) globalUBOProxy )->_uniforms;
16091609
std::vector<GLUniform*> constUniforms =
1610-
ProcessUniforms( GLUniform::CONST, GLUniform::CONST, !glConfig2.usingBindlessTextures, *uniforms, size, padding );
1610+
ProcessUniforms( GLUniform::CONST, GLUniform::CONST, !glConfig.usingBindlessTextures, *uniforms, size, padding );
16111611

16121612
GenerateUniformStructDefinesText( constUniforms, padding, 0, "globalUniforms", uniformStruct, uniformDefines );
16131613

@@ -1616,7 +1616,7 @@ void GLShaderManager::PostProcessGlobalUniforms() {
16161616
pushBuffer.constUniformsSize = size + padding;
16171617

16181618
std::vector<GLUniform*> frameUniforms =
1619-
ProcessUniforms( GLUniform::FRAME, GLUniform::FRAME, !glConfig2.usingBindlessTextures, *uniforms, size, padding );
1619+
ProcessUniforms( GLUniform::FRAME, GLUniform::FRAME, !glConfig.usingBindlessTextures, *uniforms, size, padding );
16201620

16211621
GenerateUniformStructDefinesText( frameUniforms, padding, paddingCount, "globalUniforms", uniformStruct, uniformDefines );
16221622

@@ -2249,10 +2249,10 @@ void GLShader::PostProcessUniforms() {
22492249
true, _uniforms, std430Size, padding );
22502250
}
22512251

2252-
if ( glConfig2.pushBufferAvailable && !pushSkip ) {
2252+
if ( glConfig.pushBufferAvailable && !pushSkip ) {
22532253
GLuint unused;
22542254
_pushUniforms = gl_shaderManager.ProcessUniforms( GLUniform::CONST, GLUniform::FRAME,
2255-
!glConfig2.usingBindlessTextures, _uniforms, unused, unused );
2255+
!glConfig.usingBindlessTextures, _uniforms, unused, unused );
22562256
}
22572257
}
22582258

src/engine/renderer/gl_shader.h

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -521,8 +521,8 @@ class GLShaderManager {
521521
class GLUniformSampler : protected GLUniform {
522522
protected:
523523
GLUniformSampler( GLShader* shader, const char* name, const char* type, const UpdateType updateType ) :
524-
GLUniform( shader, name, type, glConfig2.bindlessTexturesAvailable ? 2 : 1,
525-
glConfig2.bindlessTexturesAvailable ? 2 : 1, updateType, 0, true ) {
524+
GLUniform( shader, name, type, glConfig.bindlessTexturesAvailable ? 2 : 1,
525+
glConfig.bindlessTexturesAvailable ? 2 : 1, updateType, 0, true ) {
526526
}
527527

528528
inline GLint GetLocation() {
@@ -616,7 +616,7 @@ class GLUniform1i : protected GLUniform
616616
ShaderProgramDescriptor *p = _shader->GetProgram();
617617

618618
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
619-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
619+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
620620
currentValue = value;
621621
return;
622622
}
@@ -660,7 +660,7 @@ class GLUniform1ui : protected GLUniform {
660660
ShaderProgramDescriptor* p = _shader->GetProgram();
661661

662662
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
663-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
663+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
664664
currentValue = value;
665665
return;
666666
}
@@ -703,7 +703,7 @@ class GLUniform1Bool : protected GLUniform {
703703
ShaderProgramDescriptor* p = _shader->GetProgram();
704704

705705
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
706-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
706+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
707707
currentValue = value;
708708
return;
709709
}
@@ -749,7 +749,7 @@ class GLUniform1f : protected GLUniform
749749
ShaderProgramDescriptor *p = _shader->GetProgram();
750750

751751
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
752-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
752+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
753753
currentValue = value;
754754
return;
755755
}
@@ -797,7 +797,7 @@ class GLUniform1fv : protected GLUniform
797797
ShaderProgramDescriptor *p = _shader->GetProgram();
798798

799799
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
800-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
800+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
801801
memcpy( currentValue.data(), f, numFloats * sizeof( float ) );
802802
return;
803803
}
@@ -831,7 +831,7 @@ class GLUniform2f : protected GLUniform
831831
ShaderProgramDescriptor *p = _shader->GetProgram();
832832

833833
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
834-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
834+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
835835
Vector2Copy( v, currentValue );
836836
return;
837837
}
@@ -882,7 +882,7 @@ class GLUniform3f : protected GLUniform
882882
ShaderProgramDescriptor *p = _shader->GetProgram();
883883

884884
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
885-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
885+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
886886
VectorCopy( v, currentValue );
887887
return;
888888
}
@@ -933,7 +933,7 @@ class GLUniform4f : protected GLUniform
933933
ShaderProgramDescriptor *p = _shader->GetProgram();
934934

935935
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
936-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
936+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
937937
Vector4Copy( v, currentValue );
938938
return;
939939
}
@@ -981,7 +981,7 @@ class GLUniform4fv : protected GLUniform
981981
ShaderProgramDescriptor *p = _shader->GetProgram();
982982

983983
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
984-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
984+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
985985
memcpy( currentValue.data(), v, numV * sizeof( vec4_t ) );
986986
return;
987987
}
@@ -1015,7 +1015,7 @@ class GLUniformMatrix4f : protected GLUniform
10151015
ShaderProgramDescriptor *p = _shader->GetProgram();
10161016

10171017
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
1018-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
1018+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
10191019
MatrixCopy( m, currentValue );
10201020
return;
10211021
}
@@ -1059,7 +1059,7 @@ class GLUniformMatrix32f : protected GLUniform {
10591059
ShaderProgramDescriptor* p = _shader->GetProgram();
10601060

10611061
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
1062-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
1062+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
10631063
memcpy( currentValue, m, 6 * sizeof( float ) );
10641064
return;
10651065
}
@@ -1096,7 +1096,7 @@ class GLUniformMatrix4fv : protected GLUniform
10961096
ShaderProgramDescriptor *p = _shader->GetProgram();
10971097

10981098
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
1099-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
1099+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
11001100
memcpy( currentValue.data(), m, numMatrices * sizeof( matrix_t ) );
11011101
return;
11021102
}
@@ -1129,7 +1129,7 @@ class GLUniformMatrix34fv : protected GLUniform
11291129
ShaderProgramDescriptor *p = _shader->GetProgram();
11301130

11311131
if ( ( _shader->UseMaterialSystem() && _updateType == MATERIAL_OR_PUSH )
1132-
|| ( glConfig2.pushBufferAvailable && _updateType <= FRAME ) ) {
1132+
|| ( glConfig.pushBufferAvailable && _updateType <= FRAME ) ) {
11331133
memcpy( currentValue.data(), m, numMatrices * sizeof( matrix_t ) );
11341134
return;
11351135
}

src/engine/renderer/tr_backend.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1228,7 +1228,7 @@ static void RenderDepthTiles()
12281228
}
12291229

12301230
// Assume depth is dirty since we just rendered depth pass
1231-
if ( glConfig2.textureBarrierAvailable ) {
1231+
if ( glConfig.textureBarrierAvailable ) {
12321232
glTextureBarrier();
12331233
backEnd.dirtyDepthBuffer = false;
12341234
}
@@ -1516,7 +1516,7 @@ void RB_RenderMotionBlur()
15161516

15171517
/* Assume depth is dirty since we just rendered depth pass and everything opaque,
15181518
unless we have already rendered post-depth lighttile, which does this as well */
1519-
if ( glConfig2.textureBarrierAvailable && backEnd.dirtyDepthBuffer ) {
1519+
if ( glConfig.textureBarrierAvailable && backEnd.dirtyDepthBuffer ) {
15201520
glTextureBarrier();
15211521
backEnd.dirtyDepthBuffer = false;
15221522
}
@@ -2815,7 +2815,7 @@ static void SetFrameUniforms() {
28152815
globalUBOProxy->SetUniform_ColorModulate( tr.viewParms.gradingWeights );
28162816
globalUBOProxy->SetUniform_InverseGamma( 1.0f / r_gamma->value );
28172817

2818-
const bool tonemap = r_toneMapping.Get() && r_highPrecisionRendering.Get() && glConfig2.textureFloatAvailable;
2818+
const bool tonemap = r_toneMapping.Get() && r_highPrecisionRendering.Get() && glConfig.textureFloatAvailable;
28192819
if ( tonemap ) {
28202820
vec4_t tonemapParms{ r_toneMappingContrast.Get(), r_toneMappingHighlightsCompressionSpeed.Get() };
28212821
ComputeTonemapParams( tonemapParms[0], tonemapParms[1], r_toneMappingHDRMax.Get(),
@@ -2825,7 +2825,7 @@ static void SetFrameUniforms() {
28252825
}
28262826
globalUBOProxy->SetUniform_Tonemap( tonemap );
28272827

2828-
if ( glConfig2.usingMaterialSystem ) {
2828+
if ( glConfig.usingMaterialSystem ) {
28292829
materialSystem.SetFrameUniforms();
28302830
}
28312831

@@ -3833,7 +3833,7 @@ void RB_ExecuteRenderCommands( const void *data )
38333833

38343834
materialSystem.frameStart = true;
38353835

3836-
if ( glConfig2.pushBufferAvailable ) {
3836+
if ( glConfig.pushBufferAvailable ) {
38373837
SetFrameUniforms();
38383838
}
38393839

src/engine/renderer/tr_bsp.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4648,8 +4648,8 @@ static void SetConstUniforms() {
46484648

46494649
globalUBOProxy->SetUniform_ProfilerZero();
46504650

4651-
if ( glConfig2.usingBindlessTextures ) {
4652-
if ( glConfig2.colorGrading ) {
4651+
if ( glConfig.usingBindlessTextures ) {
4652+
if ( glConfig.colorGrading ) {
46534653
globalUBOProxy->SetUniform_ColorMap3DBindless( GL_BindToTMU( 3, tr.colorGradeImage ) );
46544654
}
46554655

@@ -4661,7 +4661,7 @@ static void SetConstUniforms() {
46614661
GL_BindToTMU( 0, tr.fogImage )
46624662
);
46634663

4664-
if ( glConfig2.realtimeLighting ) {
4664+
if ( glConfig.realtimeLighting ) {
46654665
globalUBOProxy->SetUniform_DepthTile1Bindless(
46664666
GL_BindToTMU( 0, tr.depthtile1RenderImage )
46674667
);
@@ -4679,7 +4679,7 @@ static void SetConstUniforms() {
46794679
globalUBOProxy->SetUniform_LightGrid2Bindless( GL_BindToTMU( BIND_LIGHTGRID2, tr.lightGrid2Image ) );
46804680
}
46814681

4682-
if ( glConfig2.usingMaterialSystem ) {
4682+
if ( glConfig.usingMaterialSystem ) {
46834683
materialSystem.SetConstUniforms();
46844684
}
46854685

src/engine/renderer/tr_vbo.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -760,7 +760,7 @@ void R_InitVBOs()
760760
stagingBuffer.InitGLBuffer();
761761
}
762762

763-
if ( glConfig2.pushBufferAvailable ) {
763+
if ( glConfig.pushBufferAvailable ) {
764764
pushBuffer.InitGLBuffers();
765765
}
766766

@@ -841,7 +841,7 @@ void R_ShutdownVBOs()
841841
stagingBuffer.FreeGLBuffer();
842842
}
843843

844-
if ( glConfig2.pushBufferAvailable ) {
844+
if ( glConfig.pushBufferAvailable ) {
845845
pushBuffer.FreeGLBuffers();
846846
}
847847

0 commit comments

Comments
 (0)