summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/TextureConversionShader.cpp
diff options
context:
space:
mode:
authordegasus <wickmarkus@web.de>2013-01-02 16:56:08 +0100
committerdegasus <wickmarkus@web.de>2013-01-02 16:56:08 +0100
commitb38b62afc60fa00f2456daf292cb2c1339ad7340 (patch)
tree8dcb83dc92747c22c1ffd4460a23a2e8ee25a121 /Source/Core/VideoCommon/Src/TextureConversionShader.cpp
parentc2898748ac210305185d0b7db0ac48001329453c (diff)
remove glsl binding support. convert every shader to version 130
Diffstat (limited to 'Source/Core/VideoCommon/Src/TextureConversionShader.cpp')
-rw-r--r--Source/Core/VideoCommon/Src/TextureConversionShader.cpp22
1 files changed, 6 insertions, 16 deletions
diff --git a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp
index 871043da5d..87c2f51329 100644
--- a/Source/Core/VideoCommon/Src/TextureConversionShader.cpp
+++ b/Source/Core/VideoCommon/Src/TextureConversionShader.cpp
@@ -93,7 +93,7 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
// [1] width and height of destination texture in pixels
// Two were merged for GLSL
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
- WRITE(p, "layout(std140%s) uniform PSBlock {\n", g_ActiveConfig.backend_info.bSupportsGLSLBinding ? ", binding = 1" : "");
+ WRITE(p, "layout(std140) uniform PSBlock {\n");
WRITE(p, "%sfloat4 " I_COLORS"[2] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_COLORS));
@@ -105,8 +105,6 @@ void WriteSwizzler(char*& p, u32 format, API_TYPE ApiType)
float samples = (float)GetEncodedSampleCount(format);
if (ApiType == API_OPENGL)
{
- if (g_ActiveConfig.backend_info.bSupportsGLSLBinding)
- WRITE(p, "layout(binding = 0) ");
WRITE(p, "uniform sampler2DRect samp0;\n");
}
else if (ApiType & API_D3D9)
@@ -181,7 +179,7 @@ void Write32BitSwizzler(char*& p, u32 format, API_TYPE ApiType)
// [1] width and height of destination texture in pixels
// Two were merged for GLSL
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
- WRITE(p, "layout(std140%s) uniform PSBlock {\n", g_ActiveConfig.backend_info.bSupportsGLSLBinding ? ", binding = 1" : "");
+ WRITE(p, "layout(std140) uniform PSBlock {\n");
WRITE(p, "%sfloat4 " I_COLORS"[2] %s;\n", WriteLocation(ApiType), WriteRegister(ApiType, "c", C_COLORS));
if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
WRITE(p, "};\n");
@@ -192,8 +190,6 @@ void Write32BitSwizzler(char*& p, u32 format, API_TYPE ApiType)
// 32 bit textures (RGBA8 and Z24) are store in 2 cache line increments
if (ApiType == API_OPENGL)
{
- if (g_ActiveConfig.backend_info.bSupportsGLSLBinding)
- WRITE(p, "layout(binding = 0) ");
WRITE(p, "uniform sampler2DRect samp0;\n");
}
else if (ApiType & API_D3D9)
@@ -848,16 +844,10 @@ const char *GenerateEncodingShader(u32 format,API_TYPE ApiType)
if (ApiType == API_OPENGL)
{
// A few required defines and ones that will make our lives a lot easier
- if (g_ActiveConfig.backend_info.bSupportsGLSLBinding || g_ActiveConfig.backend_info.bSupportsGLSLUBO)
- {
- WRITE(p, "#version 130\n");
- if (g_ActiveConfig.backend_info.bSupportsGLSLBinding)
- WRITE(p, "#extension GL_ARB_shading_language_420pack : enable\n");
- if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
- WRITE(p, "#extension GL_ARB_uniform_buffer_object : enable\n");
- }
- else
- WRITE(p, "#version 120\n");
+ WRITE(p, "#version 130\n");
+ if (g_ActiveConfig.backend_info.bSupportsGLSLUBO)
+ WRITE(p, "#extension GL_ARB_uniform_buffer_object : enable\n");
+
// Silly differences
WRITE(p, "#define float2 vec2\n");
WRITE(p, "#define float3 vec3\n");