mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 19:32:25 +08:00
Update programming STATE_COMPUTE_MODE
Remove function clearComputeModePropertiesIfNeeded. If a field has to be programmed unconditionally, ignore isDirty flag. Related-To: NEO-6728 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
3905fa7540
commit
0f54a57910
@@ -25,20 +25,13 @@ GEN12LPTEST_F(CommandEncodeGen12LpTest, whenProgrammingStateComputeModeThenPrope
|
||||
auto pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer));
|
||||
EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties, *defaultHwInfo);
|
||||
auto pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase());
|
||||
EXPECT_EQ(0u, pScm->getMaskBits());
|
||||
EXPECT_EQ(STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_DISABLED, pScm->getForceNonCoherent());
|
||||
EXPECT_EQ(FamilyType::stateComputeModeForceNonCoherentMask, pScm->getMaskBits());
|
||||
EXPECT_EQ(STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_GPU_NON_COHERENT, pScm->getForceNonCoherent());
|
||||
|
||||
properties.isCoherencyRequired.value = 0;
|
||||
pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer));
|
||||
EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties, *defaultHwInfo);
|
||||
pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase());
|
||||
EXPECT_EQ(0u, pScm->getMaskBits());
|
||||
EXPECT_EQ(STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_DISABLED, pScm->getForceNonCoherent());
|
||||
|
||||
properties.isCoherencyRequired.isDirty = true;
|
||||
properties.isCoherencyRequired.value = 1;
|
||||
pLinearStream = std::make_unique<LinearStream>(buffer, sizeof(buffer));
|
||||
EncodeComputeMode<FamilyType>::programComputeModeCommand(*pLinearStream, properties, *defaultHwInfo);
|
||||
pScm = reinterpret_cast<STATE_COMPUTE_MODE *>(pLinearStream->getCpuBase());
|
||||
EXPECT_EQ(FamilyType::stateComputeModeForceNonCoherentMask, pScm->getMaskBits());
|
||||
EXPECT_EQ(STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_GPU_NON_COHERENT, pScm->getForceNonCoherent());
|
||||
EXPECT_EQ(STATE_COMPUTE_MODE::FORCE_NON_COHERENT_FORCE_DISABLED, pScm->getForceNonCoherent());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user