remove (ATTR|VARY)(IN|OUT) macros

This commit is contained in:
degasus
2014-02-25 15:52:22 +01:00
parent 1d0b6a1156
commit aaaa5af0b2
7 changed files with 34 additions and 40 deletions

View File

@ -452,12 +452,6 @@ void ProgramShaderCache::CreateHeader ( void )
// Precision defines for GLSLES3
"%s\n"
"\n"// A few required defines and ones that will make our lives a lot easier
"#define ATTRIN in\n"
"#define ATTROUT out\n"
"#define VARYIN %s\n"
"#define VARYOUT %s\n"
// Silly differences
"#define float2 vec2\n"
"#define float3 vec3\n"
@ -472,6 +466,7 @@ void ProgramShaderCache::CreateHeader ( void )
// Terrible hack, look at DriverDetails.h
"%s\n"
"%s\n"
, v==GLSLES3 ? "#version 300 es" : v==GLSL_130 ? "#version 130" : v==GLSL_140 ? "#version 140" : "#version 150"
, v<GLSL_140 ? "#extension GL_ARB_uniform_buffer_object : enable" : ""
@ -480,9 +475,8 @@ void ProgramShaderCache::CreateHeader ( void )
, v==GLSLES3 ? "precision highp float;" : ""
, DriverDetails::HasBug(DriverDetails::BUG_BROKENCENTROID) ? "in" : "centroid in"
, DriverDetails::HasBug(DriverDetails::BUG_BROKENCENTROID) ? "out" : "centroid out"
, DriverDetails::HasBug(DriverDetails::BUG_BROKENTEXTURESIZE) ? "#define textureSize(x, y) ivec2(1, 1)" : ""
, DriverDetails::HasBug(DriverDetails::BUG_BROKENCENTROID) ? "#define centroid" : ""
);
}

View File

@ -115,9 +115,9 @@ const u8 rasters[char_count][char_height] = {
static const char *s_vertexShaderSrc =
"uniform vec2 charSize;\n"
"ATTRIN vec2 rawpos;\n"
"ATTRIN vec2 tex0;\n"
"VARYOUT vec2 uv0;\n"
"in vec2 rawpos;\n"
"in vec2 tex0;\n"
"out vec2 uv0;\n"
"void main(void) {\n"
" gl_Position = vec4(rawpos,0,1);\n"
" uv0 = tex0 * charSize;\n"
@ -126,7 +126,7 @@ static const char *s_vertexShaderSrc =
static const char *s_fragmentShaderSrc =
"uniform sampler2D samp8;\n"
"uniform vec4 color;\n"
"VARYIN vec2 uv0;\n"
"in vec2 uv0;\n"
"out vec4 ocol0;\n"
"void main(void) {\n"
" ocol0 = texture(samp8,uv0) * color;\n"

View File

@ -652,14 +652,14 @@ void Renderer::Init()
s_pfont = new RasterFont();
ProgramShaderCache::CompileShader(s_ShowEFBCopyRegions,
"ATTRIN vec2 rawpos;\n"
"ATTRIN vec3 color0;\n"
"VARYOUT vec4 c;\n"
"in vec2 rawpos;\n"
"in vec3 color0;\n"
"out vec4 c;\n"
"void main(void) {\n"
" gl_Position = vec4(rawpos, 0.0, 1.0);\n"
" c = vec4(color0, 1.0);\n"
"}\n",
"VARYIN vec4 c;\n"
"in vec4 c;\n"
"out vec4 ocol0;\n"
"void main(void) {\n"
" ocol0 = c;\n"

View File

@ -346,7 +346,7 @@ TextureCache::TextureCache()
const char *pColorMatrixProg =
"uniform sampler2D samp9;\n"
"uniform vec4 colmat[7];\n"
"VARYIN vec2 uv0;\n"
"in vec2 uv0;\n"
"out vec4 ocol0;\n"
"\n"
"void main(){\n"
@ -358,7 +358,7 @@ TextureCache::TextureCache()
const char *pDepthMatrixProg =
"uniform sampler2D samp9;\n"
"uniform vec4 colmat[5];\n"
"VARYIN vec2 uv0;\n"
"in vec2 uv0;\n"
"out vec4 ocol0;\n"
"\n"
"void main(){\n"
@ -369,7 +369,7 @@ TextureCache::TextureCache()
"}\n";
const char *VProgram =
"VARYOUT vec2 uv0;\n"
"out vec2 uv0;\n"
"uniform sampler2D samp9;\n"
"uniform vec4 copy_position;\n" // left, top, right, bottom
"void main()\n"

View File

@ -68,7 +68,7 @@ void CreatePrograms()
*/
// Output is BGRA because that is slightly faster than RGBA.
const char *VProgramRgbToYuyv =
"VARYOUT vec2 uv0;\n"
"out vec2 uv0;\n"
"uniform vec4 copy_position;\n" // left, top, right, bottom
"uniform sampler2D samp9;\n"
"void main()\n"
@ -79,7 +79,7 @@ void CreatePrograms()
"}\n";
const char *FProgramRgbToYuyv =
"uniform sampler2D samp9;\n"
"VARYIN vec2 uv0;\n"
"in vec2 uv0;\n"
"out vec4 ocol0;\n"
"void main()\n"
"{\n"
@ -110,7 +110,7 @@ void CreatePrograms()
"}\n";
const char *FProgramYuyvToRgb =
"uniform sampler2D samp9;\n"
"VARYIN vec2 uv0;\n"
"in vec2 uv0;\n"
"out vec4 ocol0;\n"
"void main()\n"
"{\n"