ShaderGen: Omit some unused varyings when possible

Removes the clipPos varying unless slow-depth is used, and the
clipDistance varyings if geometry shaders are not used.
This commit is contained in:
Stenzek
2019-01-23 18:11:17 +10:00
parent 3627ef8a04
commit 68cb24172b
7 changed files with 107 additions and 74 deletions

View File

@ -167,7 +167,7 @@ typedef ShaderUid<pixel_shader_uid_data> PixelShaderUid;
ShaderCode GeneratePixelShaderCode(APIType ApiType, const ShaderHostConfig& host_config,
const pixel_shader_uid_data* uid_data);
void WritePixelShaderCommonHeader(ShaderCode& out, APIType ApiType, u32 num_texgens,
bool per_pixel_lighting, bool bounding_box);
const ShaderHostConfig& host_config, bool bounding_box);
void ClearUnusedPixelShaderUidBits(APIType ApiType, const ShaderHostConfig& host_config,
PixelShaderUid* uid);
PixelShaderUid GetPixelShaderUid();