Show a bit of information when using GLSL shaders.
This commit is contained in:
parent
bcb2abbcf1
commit
16b58a8825
|
@ -31,6 +31,8 @@
|
||||||
#include "ProgramShaderCache.h"
|
#include "ProgramShaderCache.h"
|
||||||
#include "PixelShaderCache.h"
|
#include "PixelShaderCache.h"
|
||||||
#include "PixelShaderManager.h"
|
#include "PixelShaderManager.h"
|
||||||
|
#include "OnScreenDisplay.h"
|
||||||
|
#include "StringUtil.h"
|
||||||
#include "FileUtil.h"
|
#include "FileUtil.h"
|
||||||
#include "Debugger.h"
|
#include "Debugger.h"
|
||||||
|
|
||||||
|
@ -74,25 +76,28 @@ void PixelShaderCache::Init()
|
||||||
|
|
||||||
if(g_ActiveConfig.bUseGLSL)
|
if(g_ActiveConfig.bUseGLSL)
|
||||||
{
|
{
|
||||||
pSetPSConstant4f = SetGLSLPSConstant4f;
|
pSetPSConstant4f = SetGLSLPSConstant4f;
|
||||||
pSetPSConstant4fv = SetGLSLPSConstant4fv;
|
pSetPSConstant4fv = SetGLSLPSConstant4fv;
|
||||||
pSetMultiPSConstant4fv = SetMultiGLSLPSConstant4fv;
|
pSetMultiPSConstant4fv = SetMultiGLSLPSConstant4fv;
|
||||||
pCompilePixelShader = CompileGLSLPixelShader;
|
pCompilePixelShader = CompileGLSLPixelShader;
|
||||||
// Should this be set here?
|
// Should this be set here?
|
||||||
if (strstr((const char*)glGetString(GL_EXTENSIONS), "GL_ARB_shading_language_420pack") != NULL)
|
if (strstr((const char*)glGetString(GL_EXTENSIONS), "GL_ARB_shading_language_420pack") != NULL)
|
||||||
g_Config.backend_info.bSupportsGLSLBinding = true;
|
g_Config.backend_info.bSupportsGLSLBinding = true;
|
||||||
if (strstr((const char*)glGetString(GL_EXTENSIONS), "GL_ARB_uniform_buffer_object") != NULL)
|
if (strstr((const char*)glGetString(GL_EXTENSIONS), "GL_ARB_uniform_buffer_object") != NULL)
|
||||||
g_Config.backend_info.bSupportsGLSLUBO = true;
|
g_Config.backend_info.bSupportsGLSLUBO = true;
|
||||||
|
|
||||||
UpdateActiveConfig();
|
UpdateActiveConfig();
|
||||||
|
OSD::AddMessage(StringFromFormat("Using GLSL. Supports Binding: %s UBOs: %s",
|
||||||
|
g_ActiveConfig.backend_info.bSupportsGLSLBinding ? "True" : "False",
|
||||||
|
g_ActiveConfig.backend_info.bSupportsGLSLUBO ? "True" : "False").c_str(), 5000);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
pSetPSConstant4f = SetCGPSConstant4f;
|
pSetPSConstant4f = SetCGPSConstant4f;
|
||||||
pSetPSConstant4fv = SetCGPSConstant4fv;
|
pSetPSConstant4fv = SetCGPSConstant4fv;
|
||||||
pSetMultiPSConstant4fv = SetMultiCGPSConstant4fv;
|
pSetMultiPSConstant4fv = SetMultiCGPSConstant4fv;
|
||||||
pCompilePixelShader = CompileCGPixelShader;
|
pCompilePixelShader = CompileCGPixelShader;
|
||||||
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
glEnable(GL_FRAGMENT_PROGRAM_ARB);
|
||||||
}
|
}
|
||||||
|
|
||||||
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, (GLint *)&s_nMaxPixelInstructions);
|
glGetProgramivARB(GL_FRAGMENT_PROGRAM_ARB, GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB, (GLint *)&s_nMaxPixelInstructions);
|
||||||
|
|
Loading…
Reference in New Issue