mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-26 15:03:02 +08:00
Correct programComputeMode function
Reset all fields of StreamProperties when compute mode command is being programmed. Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f5998b15fc
commit
cdc064f478
@@ -293,10 +293,8 @@ GEN12LPTEST_F(Gen12LpCoherencyRequirements, givenCoherencyRequirementWithSharedH
|
||||
for (auto it = hwParser.cmdList.begin(); it != hwParser.cmdList.end(); it++) {
|
||||
auto cmd = genCmdCast<STATE_COMPUTE_MODE *>(*it);
|
||||
if (cmd) {
|
||||
if (valueChanged) {
|
||||
EXPECT_EQ(expectedCoherentValue, cmd->getForceNonCoherent());
|
||||
}
|
||||
EXPECT_EQ(valueChanged ? expectedCoherentMask : 0u, cmd->getMaskBits());
|
||||
EXPECT_EQ(expectedCoherentValue, cmd->getForceNonCoherent());
|
||||
EXPECT_EQ(expectedCoherentMask, cmd->getMaskBits());
|
||||
EXPECT_FALSE(foundOne);
|
||||
foundOne = true;
|
||||
auto pc = genCmdCast<PIPE_CONTROL *>(*(++it));
|
||||
|
||||
@@ -184,12 +184,14 @@ PVCTEST_F(PvcComputeModeRequirements, giventhreadArbitrationPolicyWithoutSharedH
|
||||
hwParser.parseCommands<FamilyType>(getCsrHw<FamilyType>()->commandStream, startOffset);
|
||||
bool foundOne = false;
|
||||
|
||||
uint32_t expectedCoherentMask = FamilyType::stateComputeModeEuThreadSchedulingModeOverrideMask;
|
||||
uint32_t expectedCoherentMask = FamilyType::stateComputeModeEuThreadSchedulingModeOverrideMask |
|
||||
FamilyType::stateComputeModeLargeGrfModeMask |
|
||||
FamilyType::stateComputeModeForceNonCoherentMask;
|
||||
|
||||
for (auto it = hwParser.cmdList.begin(); it != hwParser.cmdList.end(); it++) {
|
||||
auto cmd = genCmdCast<STATE_COMPUTE_MODE *>(*it);
|
||||
if (cmd) {
|
||||
EXPECT_EQ(expectToBeProgrammed ? expectedCoherentMask : 0u, cmd->getMaskBits());
|
||||
EXPECT_EQ(expectedCoherentMask, cmd->getMaskBits());
|
||||
EXPECT_FALSE(foundOne);
|
||||
foundOne = true;
|
||||
auto pc = genCmdCast<PIPE_CONTROL *>(*(++it));
|
||||
|
||||
@@ -26,7 +26,9 @@ void CommandStreamReceiverHw<GfxFamily>::programComputeMode(LinearStream &stream
|
||||
addPipeControlPriorToNonPipelinedStateCommand(stream, args);
|
||||
}
|
||||
|
||||
EncodeComputeMode<GfxFamily>::programComputeModeCommand(stream, this->streamProperties.stateComputeMode, hwInfo);
|
||||
StreamProperties streamProperties{};
|
||||
streamProperties.stateComputeMode.setProperties(this->streamProperties.stateComputeMode);
|
||||
EncodeComputeMode<GfxFamily>::programComputeModeCommand(stream, streamProperties.stateComputeMode, hwInfo);
|
||||
|
||||
if (csrSizeRequestFlags.hasSharedHandles) {
|
||||
auto pc = stream.getSpaceForCmd<PIPE_CONTROL>();
|
||||
|
||||
Reference in New Issue
Block a user