mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
fix: program RenderTargetCacheFlush in PC prior to PIPELINE_SELECT
- fix code by removing csStallOnly that skipped seeting RTCF flag Related-To: NEO-9194 Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
e690217227
commit
31265edfee
@@ -432,6 +432,7 @@ using PipelineSelectTest = ::testing::Test;
|
||||
|
||||
HWTEST2_F(PipelineSelectTest, WhenProgramPipelineSelectThenProperMaskIsSet, IsWithinXeGfxFamily) {
|
||||
using PIPELINE_SELECT = typename FamilyType::PIPELINE_SELECT;
|
||||
using PIPE_CONTROL = typename FamilyType::PIPE_CONTROL;
|
||||
|
||||
MockExecutionEnvironment mockExecutionEnvironment{};
|
||||
auto &rootDeviceEnvironment = *mockExecutionEnvironment.rootDeviceEnvironments[0];
|
||||
@@ -439,10 +440,7 @@ HWTEST2_F(PipelineSelectTest, WhenProgramPipelineSelectThenProperMaskIsSet, IsWi
|
||||
std::vector<uint8_t> linearStreamBackingMemory;
|
||||
size_t sizeNeededForCommandSream = 0;
|
||||
if (MemorySynchronizationCommands<FamilyType>::isBarrierPriorToPipelineSelectWaRequired(rootDeviceEnvironment)) {
|
||||
PipeControlArgs args;
|
||||
args.csStallOnly = true;
|
||||
args.renderTargetCacheFlushEnable = true;
|
||||
sizeNeededForCommandSream += MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier(args.tlbInvalidation);
|
||||
sizeNeededForCommandSream += MemorySynchronizationCommands<FamilyType>::getSizeForSingleBarrier(false);
|
||||
}
|
||||
|
||||
sizeNeededForCommandSream += sizeof(PIPELINE_SELECT);
|
||||
@@ -468,4 +466,23 @@ HWTEST2_F(PipelineSelectTest, WhenProgramPipelineSelectThenProperMaskIsSet, IsWi
|
||||
}
|
||||
|
||||
EXPECT_EQ(expectedMask, cmd->getMaskBits());
|
||||
|
||||
HardwareParse hwParser;
|
||||
hwParser.parsePipeControl = true;
|
||||
hwParser.parseCommands<FamilyType>(pipelineSelectStream, 0);
|
||||
hwParser.findHardwareCommands<FamilyType>();
|
||||
|
||||
if (MemorySynchronizationCommands<FamilyType>::isBarrierPriorToPipelineSelectWaRequired(rootDeviceEnvironment)) {
|
||||
bool pcWithRenderFlushFound = false;
|
||||
|
||||
auto itorPipeControl = hwParser.pipeControlList.begin();
|
||||
if (itorPipeControl != hwParser.pipeControlList.end()) {
|
||||
auto pipeControl = reinterpret_cast<PIPE_CONTROL *>(*itorPipeControl);
|
||||
if (pipeControl->getRenderTargetCacheFlushEnable()) {
|
||||
pcWithRenderFlushFound = true;
|
||||
}
|
||||
}
|
||||
|
||||
EXPECT_TRUE(pcWithRenderFlushFound);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
* Copyright (C) 2023-2024 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -27,7 +27,6 @@ void PreambleHelper<Family>::programPipelineSelect(LinearStream *pCommandStream,
|
||||
|
||||
if (MemorySynchronizationCommands<Family>::isBarrierPriorToPipelineSelectWaRequired(rootDeviceEnvironment)) {
|
||||
PipeControlArgs args;
|
||||
args.csStallOnly = true;
|
||||
args.renderTargetCacheFlushEnable = true;
|
||||
MemorySynchronizationCommands<Family>::addSingleBarrier(*pCommandStream, args);
|
||||
}
|
||||
|
||||
@@ -66,6 +66,9 @@ HWTEST2_F(PreambleTest, givenSpecificDeviceWhenProgramPipelineSelectIsCalledThen
|
||||
auto numPipeControl = hwParser.getCommandsList<PIPE_CONTROL>().size();
|
||||
EXPECT_EQ(1u, numPipeControl);
|
||||
|
||||
auto pipeControl = hwParser.getCommand<PIPE_CONTROL>();
|
||||
EXPECT_TRUE(pipeControl->getRenderTargetCacheFlushEnable());
|
||||
|
||||
auto numPipelineSelect = hwParser.getCommandsList<PIPELINE_SELECT>().size();
|
||||
EXPECT_EQ(1u, numPipelineSelect);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user