GeometryShader: Disable the geometry shader stage if it is a pass-through shader.

This commit is contained in:
Jules Blok
2014-12-16 17:28:35 +01:00
parent f2e52b46c3
commit bd6d229733
5 changed files with 20 additions and 2 deletions

View File

@ -281,3 +281,9 @@ void GenerateGeometryShaderCode(ShaderCode& object, u32 primitive_type, API_TYPE
{
GenerateGeometryShader<ShaderCode>(object, primitive_type, ApiType);
}
bool IsPassthroughGeometryShader(GeometryShaderUid& object)
{
geometry_shader_uid_data* uid_data = object.GetUidData<geometry_shader_uid_data>();
return uid_data->primitive_type == PRIMITIVE_TRIANGLES && !uid_data->stereo;
}