mirror of
https://github.com/KytyPS5/KytyPS5.git
synced 2026-10-20 10:56:58 +02:00
shader: clear unused sampler bits after constant folding
Co-authored-by: Çağatay Güçlü <33038942+defektu@users.noreply.github.com>
This commit is contained in:
@@ -77,6 +77,8 @@ Value CanonicalizeSampleAdjustDword3(Value value) {
|
||||
value = value.Resolve();
|
||||
const auto* inst = value.TryInstruction();
|
||||
if (inst == nullptr || inst->GetOpcode() != ValueOpcode::BitwiseOr32) {
|
||||
if ((PossibleU32Bits(value) & ~SamplerDword3ReservedMask) == 0)
|
||||
return Value(0u);
|
||||
return value;
|
||||
}
|
||||
const auto left = inst->Arg(0).Resolve();
|
||||
|
||||
Reference in New Issue
Block a user