mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-28 00:03:14 +08:00
refactor: remove not needed code
Signed-off-by: Michal Mrozek <michal.mrozek@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
231cfdc472
commit
68d01f398f
@@ -263,7 +263,7 @@ class CommandStreamReceiverHw : public CommandStreamReceiver {
|
||||
const IndirectHeap *ssh,
|
||||
DispatchFlags &dispatchFlags,
|
||||
Device &device, LinearStream &commandStreamCSR,
|
||||
bool force32BitAllocations, bool sshDirty, bool bindingTablePoolCommandNeeded);
|
||||
bool sshDirty, bool bindingTablePoolCommandNeeded);
|
||||
inline void programStateBaseAddressCommon(const IndirectHeap *dsh,
|
||||
const IndirectHeap *ioh,
|
||||
const IndirectHeap *ssh,
|
||||
|
||||
@@ -1687,14 +1687,12 @@ inline void CommandStreamReceiverHw<GfxFamily>::programStateBaseAddress(const In
|
||||
surfaceStateBaseAddress, surfaceStateSize);
|
||||
}
|
||||
|
||||
auto force32BitAllocations = getMemoryManager()->peekForce32BitAllocations();
|
||||
stateBaseAddressDirty |= ((gsbaFor32BitProgrammed ^ dispatchFlags.gsba32BitRequired) && force32BitAllocations);
|
||||
bool isStateBaseAddressDirty = dshDirty || iohDirty || sshDirty || stateBaseAddressDirty;
|
||||
handleStateBaseAddressStateTransition(dispatchFlags, isStateBaseAddressDirty);
|
||||
|
||||
// reprogram state base address command if required
|
||||
if (isStateBaseAddressDirty) {
|
||||
reprogramStateBaseAddress(dsh, ioh, ssh, dispatchFlags, device, commandStreamCSR, force32BitAllocations, sshDirty, bindingTablePoolCommandNeeded);
|
||||
reprogramStateBaseAddress(dsh, ioh, ssh, dispatchFlags, device, commandStreamCSR, sshDirty, bindingTablePoolCommandNeeded);
|
||||
}
|
||||
|
||||
if (hasDsh) {
|
||||
@@ -1718,16 +1716,12 @@ inline void CommandStreamReceiverHw<GfxFamily>::programStateBaseAddress(const In
|
||||
}
|
||||
|
||||
template <typename GfxFamily>
|
||||
inline void CommandStreamReceiverHw<GfxFamily>::reprogramStateBaseAddress(const IndirectHeap *dsh, const IndirectHeap *ioh, const IndirectHeap *ssh, DispatchFlags &dispatchFlags, Device &device, LinearStream &commandStreamCSR, bool force32BitAllocations, bool sshDirty, bool bindingTablePoolCommandNeeded) {
|
||||
inline void CommandStreamReceiverHw<GfxFamily>::reprogramStateBaseAddress(const IndirectHeap *dsh, const IndirectHeap *ioh, const IndirectHeap *ssh, DispatchFlags &dispatchFlags, Device &device, LinearStream &commandStreamCSR, bool sshDirty, bool bindingTablePoolCommandNeeded) {
|
||||
|
||||
uint64_t newGshBase = 0;
|
||||
gsbaFor32BitProgrammed = false;
|
||||
if (is64bit && scratchSpaceController->getScratchSpaceSlot0Allocation() && !force32BitAllocations) {
|
||||
if (is64bit && scratchSpaceController->getScratchSpaceSlot0Allocation()) {
|
||||
newGshBase = scratchSpaceController->calculateNewGSH();
|
||||
} else if (is64bit && force32BitAllocations && dispatchFlags.gsba32BitRequired) {
|
||||
bool useLocalMemory = scratchSpaceController->getScratchSpaceSlot0Allocation() ? scratchSpaceController->getScratchSpaceSlot0Allocation()->isAllocatedInLocalMemoryPool() : false;
|
||||
newGshBase = getMemoryManager()->getExternalHeapBaseAddress(rootDeviceIndex, useLocalMemory);
|
||||
gsbaFor32BitProgrammed = true;
|
||||
}
|
||||
|
||||
uint64_t indirectObjectStateBaseAddress = getMemoryManager()->getInternalHeapBaseAddress(rootDeviceIndex, ioh->getGraphicsAllocation()->isAllocatedInLocalMemoryPool());
|
||||
|
||||
@@ -39,8 +39,7 @@ void ScratchSpaceControllerBase::setRequiredScratchSpace(void *sshBaseAddress,
|
||||
}
|
||||
createScratchSpaceAllocation();
|
||||
vfeStateDirty = true;
|
||||
force32BitAllocation = getMemoryManager()->peekForce32BitAllocations();
|
||||
if (is64bit && !force32BitAllocation) {
|
||||
if (is64bit) {
|
||||
stateBaseAddressDirty = true;
|
||||
}
|
||||
}
|
||||
@@ -64,10 +63,11 @@ uint64_t ScratchSpaceControllerBase::getScratchPatchAddress() {
|
||||
// and "0 + scratchSpaceOffsetFor64bit" is being programmed in Media VFE state
|
||||
uint64_t scratchAddress = 0;
|
||||
if (scratchSlot0Allocation) {
|
||||
scratchAddress = scratchSlot0Allocation->getGpuAddressToPatch();
|
||||
if (is64bit && !getMemoryManager()->peekForce32BitAllocations()) {
|
||||
if (is64bit) {
|
||||
// this is to avoid scratch allocation offset "0"
|
||||
scratchAddress = ScratchSpaceConstants::scratchSpaceOffsetFor64Bit;
|
||||
} else {
|
||||
scratchAddress = scratchSlot0Allocation->getGpuAddressToPatch();
|
||||
}
|
||||
}
|
||||
return scratchAddress;
|
||||
|
||||
Reference in New Issue
Block a user