Set Uncached MOCS for List only given stateless uncached args

Signed-off-by: Spruit, Neil R <neil.r.spruit@intel.com>
This commit is contained in:
Spruit, Neil R
2021-11-17 23:20:00 +00:00
committed by Compute-Runtime-Automation
parent a2401299a0
commit 6d8502847e
13 changed files with 21 additions and 21 deletions

View File

@@ -35,7 +35,7 @@ struct CommandQueueHw : public CommandQueueImp {
void dispatchTaskCountWrite(NEO::LinearStream &commandStream, bool flushDataCache) override;
void programStateBaseAddress(uint64_t gsba, bool useLocalMemoryForIndirectHeap, NEO::LinearStream &commandStream);
void programStateBaseAddress(uint64_t gsba, bool useLocalMemoryForIndirectHeap, NEO::LinearStream &commandStream, bool cachedMOCSAllowed);
size_t estimateStateBaseAddressCmdSize();
MOCKABLE_VIRTUAL void programFrontEnd(uint64_t scratchAddress, uint32_t perThreadScratchSpaceSize, NEO::LinearStream &commandStream);

View File

@@ -82,7 +82,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
auto anyCommandListWithCooperativeKernels = false;
auto anyCommandListWithoutCooperativeKernels = false;
cachedMOCSAllowed = true;
bool cachedMOCSAllowed = true;
for (auto i = 0u; i < numCommandLists; i++) {
auto commandList = CommandList::fromHandle(phCommandLists[i]);
@@ -100,7 +100,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
anyCommandListWithoutCooperativeKernels = true;
}
// If the Command List has commands that require uncached MOCS, then any changes to the commands in the queue requires the uncached MOCS
if (commandList->requiresUncachedMOCS && cachedMOCSAllowed == true) {
if (commandList->requiresQueueUncachedMocs && cachedMOCSAllowed == true) {
cachedMOCSAllowed = false;
}
}
@@ -314,7 +314,7 @@ ze_result_t CommandQueueHw<gfxCoreFamily>::executeCommandLists(
if (gsbaStateDirty) {
auto indirectHeap = CommandList::fromHandle(phCommandLists[0])->commandContainer.getIndirectHeap(NEO::HeapType::INDIRECT_OBJECT);
programStateBaseAddress(scratchSpaceController->calculateNewGSH(), indirectHeap->getGraphicsAllocation()->isAllocatedInLocalMemoryPool(), child);
programStateBaseAddress(scratchSpaceController->calculateNewGSH(), indirectHeap->getGraphicsAllocation()->isAllocatedInLocalMemoryPool(), child, cachedMOCSAllowed);
}
if (initialPreemptionMode) {

View File

@@ -30,7 +30,7 @@
namespace L0 {
template <GFXCORE_FAMILY gfxCoreFamily>
void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool useLocalMemoryForIndirectHeap, NEO::LinearStream &commandStream) {
void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool useLocalMemoryForIndirectHeap, NEO::LinearStream &commandStream, bool cachedMOCSAllowed) {
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
using STATE_BASE_ADDRESS = typename GfxFamily::STATE_BASE_ADDRESS;

View File

@@ -81,7 +81,6 @@ struct CommandQueueImp : public CommandQueue {
ze_command_queue_mode_t getSynchronousMode() const;
virtual void dispatchTaskCountWrite(NEO::LinearStream &commandStream, bool flushDataCache) = 0;
virtual bool getPreemptionCmdProgramming() = 0;
bool cachedMOCSAllowed = true;
protected:
MOCKABLE_VIRTUAL int submitBatchBuffer(size_t offset, NEO::ResidencyContainer &residencyContainer, void *endingCmdPtr,

View File

@@ -21,7 +21,7 @@
namespace L0 {
template <GFXCORE_FAMILY gfxCoreFamily>
void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool useLocalMemoryForIndirectHeap, NEO::LinearStream &commandStream) {
void CommandQueueHw<gfxCoreFamily>::programStateBaseAddress(uint64_t gsba, bool useLocalMemoryForIndirectHeap, NEO::LinearStream &commandStream, bool cachedMOCSAllowed) {
using GfxFamily = typename NEO::GfxFamilyMapper<gfxCoreFamily>::GfxFamily;
using STATE_BASE_ADDRESS = typename GfxFamily::STATE_BASE_ADDRESS;
if (NEO::ApiSpecificConfig::getBindlessConfiguration()) {