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