mirror of
https://github.com/blawar/GLideN64.git
synced 2024-07-04 10:03:36 +00:00
Minor optimization in CombinerProgramUniformFactory::buildUniforms
This commit is contained in:
parent
8d9b44b90f
commit
8544673e96
|
@ -778,15 +778,29 @@ void CombinerProgramUniformFactory::buildUniforms(GLuint _program,
|
|||
if (!m_glInfo.isGLES2)
|
||||
_uniforms.emplace_back(new UDepthTex(_program));
|
||||
|
||||
if (_inputs.usesTexture())
|
||||
if (_inputs.usesTexture()) {
|
||||
_uniforms.emplace_back(new UTextures(_program));
|
||||
|
||||
if (config.video.multisampling != 0)
|
||||
_uniforms.emplace_back(new UMSAATextures(_program));
|
||||
if (config.video.multisampling != 0)
|
||||
_uniforms.emplace_back(new UMSAATextures(_program));
|
||||
|
||||
if (_inputs.usesTexture())
|
||||
_uniforms.emplace_back(new UFrameBufferInfo(_program));
|
||||
|
||||
if (_inputs.usesLOD()) {
|
||||
_uniforms.emplace_back(new UMipmap1(_program));
|
||||
if (config.generalEmulation.enableLOD != 0)
|
||||
_uniforms.emplace_back(new UMipmap2(_program));
|
||||
}
|
||||
|
||||
_uniforms.emplace_back(new UTexturePersp(_program));
|
||||
|
||||
if (m_glInfo.isGLES2)
|
||||
_uniforms.emplace_back(new UTextureSize(_program, _inputs.usesTile(0), _inputs.usesTile(1)));
|
||||
|
||||
if (!_key.isRectKey())
|
||||
_uniforms.emplace_back(new UTextureParams(_program, _inputs.usesTile(0), _inputs.usesTile(1)));
|
||||
}
|
||||
|
||||
_uniforms.emplace_back(new UFog(_program));
|
||||
|
||||
if (config.generalEmulation.enableLegacyBlending == 0) {
|
||||
|
@ -804,14 +818,6 @@ void CombinerProgramUniformFactory::buildUniforms(GLuint _program,
|
|||
|
||||
_uniforms.emplace_back(new UScreenScale(_program));
|
||||
|
||||
if (_inputs.usesLOD()) {
|
||||
_uniforms.emplace_back(new UMipmap1(_program));
|
||||
if (config.generalEmulation.enableLOD != 0)
|
||||
_uniforms.emplace_back(new UMipmap2(_program));
|
||||
}
|
||||
|
||||
_uniforms.emplace_back(new UTexturePersp(_program));
|
||||
|
||||
if (config.texture.bilinearMode == BILINEAR_3POINT)
|
||||
_uniforms.emplace_back(new UTextureFilterMode(_program));
|
||||
|
||||
|
@ -831,13 +837,6 @@ void CombinerProgramUniformFactory::buildUniforms(GLuint _program,
|
|||
|
||||
_uniforms.emplace_back(new UColors(_program));
|
||||
|
||||
if (_inputs.usesTexture()) {
|
||||
if (m_glInfo.isGLES2)
|
||||
_uniforms.emplace_back(new UTextureSize(_program, _inputs.usesTile(0), _inputs.usesTile(1)));
|
||||
if (!_key.isRectKey())
|
||||
_uniforms.emplace_back(new UTextureParams(_program, _inputs.usesTile(0), _inputs.usesTile(1)));
|
||||
}
|
||||
|
||||
if (_inputs.usesHwLighting())
|
||||
_uniforms.emplace_back(new ULights(_program));
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user