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:
nmzik
2026-10-04 22:29:05 +04:00
parent b0bbaef1eb
commit b7d3c572c1
2 changed files with 15 additions and 0 deletions
@@ -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();