Restructure parameters to TetxureConverterShaderGen/TextureConversionShader

This will be used for later refactoring for increased accuracy.
This commit is contained in:
Pokechu22
2022-02-07 13:37:28 -08:00
parent d20094efa2
commit 791bd16b28
7 changed files with 89 additions and 76 deletions

View File

@ -25,7 +25,9 @@ struct UidData
u32 is_depth_copy : 1;
u32 is_intensity : 1;
u32 scale_by_half : 1;
u32 copy_filter : 1;
u32 all_copy_filter_coefs_needed : 1;
u32 copy_filter_can_overflow : 1;
u32 apply_gamma : 1;
};
#pragma pack()
@ -35,7 +37,8 @@ ShaderCode GenerateVertexShader(APIType api_type);
ShaderCode GeneratePixelShader(APIType api_type, const UidData* uid_data);
TCShaderUid GetShaderUid(EFBCopyFormat dst_format, bool is_depth_copy, bool is_intensity,
bool scale_by_half, bool copy_filter);
bool scale_by_half, float gamma_rcp,
const std::array<u32, 3>& filter_coefficients);
} // namespace TextureConversionShaderGen
@ -53,8 +56,10 @@ struct fmt::formatter<TextureConversionShaderGen::UidData>
dst_format = fmt::to_string(uid.dst_format);
return fmt::format_to(ctx.out(),
"dst_format: {}, efb_has_alpha: {}, is_depth_copy: {}, is_intensity: {}, "
"scale_by_half: {}, copy_filter: {}",
"scale_by_half: {}, all_copy_filter_coefs_needed: {}, "
"copy_filter_can_overflow: {}, apply_gamma: {}",
dst_format, uid.efb_has_alpha, uid.is_depth_copy, uid.is_intensity,
uid.scale_by_half, uid.copy_filter);
uid.scale_by_half, uid.all_copy_filter_coefs_needed,
uid.copy_filter_can_overflow, uid.apply_gamma);
}
};