Skip to content

Commit 0f31a4f

Browse files
bcheng0127igcbot
authored andcommitted
Fix read suppression WA
Apply the WA to sampler instruction
1 parent 8201e09 commit 0f31a4f

File tree

1 file changed

+9
-4
lines changed

1 file changed

+9
-4
lines changed

visa/GraphColor.cpp

+9-4
Original file line numberDiff line numberDiff line change
@@ -3076,7 +3076,9 @@ bool Augmentation::updateDstMaskForGatherRaw(G4_INST *inst,
30763076
vISA_ASSERT(curEMBit <= 32, "Illegal mask channel");
30773077
}
30783078
}
3079-
curEMBit = (unsigned char)inst->getMaskOffset();
3079+
if (curEMBit != NOMASK_BYTE) {
3080+
curEMBit = (unsigned char)inst->getMaskOffset();
3081+
}
30803082
}
30813083
return true;
30823084
} break;
@@ -3108,7 +3110,9 @@ bool Augmentation::updateDstMaskForGatherRaw(G4_INST *inst,
31083110
vISA_ASSERT(curEMBit <= 32, "Illegal mask channel");
31093111
}
31103112
}
3111-
curEMBit = (unsigned char)inst->getMaskOffset();
3113+
if (curEMBit != NOMASK_BYTE) {
3114+
curEMBit = (unsigned char)inst->getMaskOffset();
3115+
}
31123116
}
31133117
return true;
31143118
}
@@ -3142,7 +3146,6 @@ bool Augmentation::updateDstMaskForGatherRaw(G4_INST *inst,
31423146
mask[i] = NOMASK_BYTE;
31433147
return true;
31443148
}
3145-
unsigned char curEMBit = (unsigned char)inst->getMaskOffset();
31463149
elemSize = msgDesc->is16BitReturn() ? 2 : 4;
31473150
unsigned warpNum =
31483151
respLength * kernel.numEltPerGRF<Type_UB>() / (execSize * elemSize);
@@ -3159,7 +3162,9 @@ bool Augmentation::updateDstMaskForGatherRaw(G4_INST *inst,
31593162
vISA_ASSERT(curEMBit <= 32, "Illegal mask channel");
31603163
}
31613164
}
3162-
curEMBit = (unsigned char)inst->getMaskOffset();
3165+
if (curEMBit != NOMASK_BYTE) {
3166+
curEMBit = (unsigned char)inst->getMaskOffset();
3167+
}
31633168
}
31643169
return true;
31653170
}

0 commit comments

Comments
 (0)