mirror of
https://github.com/shadps4-emu/shadPS4.git
synced 2024-11-26 20:50:40 +00:00
Specialize normalization component number
This commit is contained in:
parent
1fbc89be4b
commit
d25b91117c
@ -26,7 +26,7 @@ struct TextureBufferSpecialization {
|
||||
};
|
||||
|
||||
struct ImageSpecialization {
|
||||
enum class Normalization : u8 {
|
||||
enum class NormalizationSign : u8 {
|
||||
None,
|
||||
Signed,
|
||||
Unsigned,
|
||||
@ -34,7 +34,8 @@ struct ImageSpecialization {
|
||||
|
||||
AmdGpu::ImageType type = AmdGpu::ImageType::Color2D;
|
||||
bool is_integer = false;
|
||||
Normalization normalization = Normalization::None;
|
||||
NormalizationSign normalization = NormalizationSign::None;
|
||||
u32 normalized_components = 0;
|
||||
|
||||
auto operator<=>(const ImageSpecialization&) const = default;
|
||||
};
|
||||
@ -88,8 +89,9 @@ struct StageSpecialization {
|
||||
|
||||
if (sharp.NeedsNormalizationPatch()) {
|
||||
spec.normalization = sharp.GetNumberFmt() == AmdGpu::NumberFormat::Snorm
|
||||
? ImageSpecialization::Normalization::Signed
|
||||
: ImageSpecialization::Normalization::Unsigned;
|
||||
? ImageSpecialization::NormalizationSign::Signed
|
||||
: ImageSpecialization::NormalizationSign::Unsigned;
|
||||
spec.normalized_components = AmdGpu::NumComponents(sharp.GetDataFmt());
|
||||
}
|
||||
});
|
||||
ForEachSharp(binding, fmasks, info->fmasks,
|
||||
|
Loading…
Reference in New Issue
Block a user