Cosmetics.

This commit is contained in:
Jules Blok 2014-10-30 15:13:31 +01:00
parent 9b4185ffdf
commit 4d9589b35f
6 changed files with 14 additions and 10 deletions

View File

@ -36,7 +36,8 @@ static char s_vertex_shader[] =
" uv0 = rawpos * src_rect.zw + src_rect.xy;\n"
"}\n";
OpenGLPostProcessing::OpenGLPostProcessing() : m_initialized(false)
OpenGLPostProcessing::OpenGLPostProcessing()
: m_initialized(false)
{
CreateHeader();

View File

@ -468,7 +468,7 @@ Renderer::Renderer()
glClearDepthf = ClearDepthf;
}
if (!(GLExtensions::Version() >= 320))
if (GLExtensions::Version() < 320)
{
glFramebufferTexture = FramebufferTexture;
}

View File

@ -9,6 +9,7 @@ set(SRCS BoundingBox.cpp
Fifo.cpp
FPSCounter.cpp
FramebufferManagerBase.cpp
GeometryShaderGen.cpp
HiresTextures.cpp
ImageWrite.cpp
IndexGenerator.cpp
@ -38,8 +39,7 @@ set(SRCS BoundingBox.cpp
VideoConfig.cpp
VideoState.cpp
XFMemory.cpp
XFStructs.cpp
GeometryShaderGen.cpp)
XFStructs.cpp)
set(LIBS core png)
if(_M_X86)

View File

@ -70,23 +70,30 @@ static inline void GenerateGeometryShader(T& out, u32 components, API_TYPE ApiTy
out.Write("flat out int layer;\n");
out.Write("void main()\n{\n");
if (g_ActiveConfig.backend_info.bSupportsGSInstancing)
out.Write("\tlayer = gl_InvocationID;\n");
else
out.Write("\tfor (layer = 0; layer < %d; ++layer) {\n", g_ActiveConfig.bStereo ? 2 : 1);
out.Write("\tgl_Layer = layer;\n");
out.Write("\tvec4 stereoproj = "I_PROJECTION"[0];\n");
out.Write("\tstereoproj[2] += "I_STEREOOFFSET"[layer] * stereoproj[0];\n");
out.Write("\tfor (int i = 0; i < gl_in.length(); ++i) {\n");
out.Write("\t\to = v[i];\n");
if (g_ActiveConfig.bStereo)
out.Write("\t\to.pos = float4(dot(stereoproj, v[i].rawpos), dot(" I_PROJECTION"[1], v[i].rawpos), dot(" I_PROJECTION"[2], v[i].rawpos), dot(" I_PROJECTION"[3], v[i].rawpos)); \n");
out.Write("\t\tgl_Position = o.pos;\n");
out.Write("\t\tEmitVertex();\n");
out.Write("\t}\n");
out.Write("\tEndPrimitive();\n");
if (!g_ActiveConfig.backend_info.bSupportsGSInstancing)
out.Write("\t}\n");
out.Write("}\n");
if (is_writing_shadercode)

View File

@ -452,7 +452,7 @@ TextureCache::TCacheEntryBase* TextureCache::Load(unsigned int const stage,
(entry->type == TCET_EC_DYNAMIC &&
entry->native_width == width &&
entry->native_height == height)) &&
entry->num_layers == 1)
entry->num_layers == 1)
{
// reuse the texture
}

View File

@ -125,11 +125,7 @@ static inline void GenerateVertexShader(T& out, u32 components, API_TYPE api_typ
out.Write("in float%d tex%d; // ATTR%d,\n", hastexmtx ? 3 : 2, i, SHADER_TEXTURE0_ATTRIB + i);
}
if (g_ActiveConfig.bStereo)
out.Write("centroid out VS_OUTPUT v;\n");
else
out.Write("centroid out VS_OUTPUT o;\n");
out.Write("centroid out VS_OUTPUT %s;\n", (g_ActiveConfig.bStereo) ? "v" : "o");
out.Write("void main()\n{\n");