mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-03-12 06:39:14 +01:00
VideoCommon: Only use interface blocks when geometry shaders are supported.
This commit is contained in:
parent
1af3d8447a
commit
69df23f725
@ -88,8 +88,6 @@ void GeometryShaderManager::SetTexCoordChanged(u8 texmapid)
|
|||||||
|
|
||||||
void GeometryShaderManager::DoState(PointerWrap &p)
|
void GeometryShaderManager::DoState(PointerWrap &p)
|
||||||
{
|
{
|
||||||
p.Do(dirty);
|
|
||||||
|
|
||||||
if (p.GetMode() == PointerWrap::MODE_READ)
|
if (p.GetMode() == PointerWrap::MODE_READ)
|
||||||
{
|
{
|
||||||
// Reload current state from global GPU state
|
// Reload current state from global GPU state
|
||||||
|
@ -317,13 +317,20 @@ static inline void GeneratePixelShader(T& out, DSTALPHA_MODE dstAlphaMode, API_T
|
|||||||
// is always inside the primitive.
|
// is always inside the primitive.
|
||||||
// Without MSAA, this flag is defined to have no effect.
|
// Without MSAA, this flag is defined to have no effect.
|
||||||
uid_data->stereo = g_ActiveConfig.iStereoMode > 0;
|
uid_data->stereo = g_ActiveConfig.iStereoMode > 0;
|
||||||
out.Write("in VertexData {\n");
|
if (g_ActiveConfig.backend_info.bSupportsGeometryShaders)
|
||||||
out.Write("\tcentroid VS_OUTPUT o;\n");
|
{
|
||||||
|
out.Write("in VertexData {\n");
|
||||||
|
out.Write("\tcentroid VS_OUTPUT o;\n");
|
||||||
|
|
||||||
if (g_ActiveConfig.iStereoMode > 0)
|
if (g_ActiveConfig.iStereoMode > 0)
|
||||||
out.Write("\tflat int layer;\n");
|
out.Write("\tflat int layer;\n");
|
||||||
|
|
||||||
out.Write("};\n");
|
out.Write("};\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
out.Write("centroid in VS_OUTPUT o;\n");
|
||||||
|
}
|
||||||
|
|
||||||
out.Write("void main()\n{\n");
|
out.Write("void main()\n{\n");
|
||||||
|
|
||||||
|
@ -72,9 +72,16 @@ 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);
|
out.Write("in float%d tex%d; // ATTR%d,\n", hastexmtx ? 3 : 2, i, SHADER_TEXTURE0_ATTRIB + i);
|
||||||
}
|
}
|
||||||
|
|
||||||
out.Write("out VertexData {\n"
|
if (g_ActiveConfig.backend_info.bSupportsGeometryShaders)
|
||||||
"\tcentroid VS_OUTPUT o;\n"
|
{
|
||||||
"};\n");
|
out.Write("out VertexData {\n"
|
||||||
|
"\tcentroid VS_OUTPUT o;\n"
|
||||||
|
"};\n");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
out.Write("centroid out VS_OUTPUT o; \n");
|
||||||
|
}
|
||||||
|
|
||||||
out.Write("void main()\n{\n");
|
out.Write("void main()\n{\n");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user