mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 17:41:26 +08:00
Copy command buffer into ring buffer
Resolves: NEO-7422 Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
6e39b98094
commit
2f5be7a48d
@@ -15,7 +15,7 @@ namespace NEO {
|
||||
void CommandEncodeStatesFixture::setUp() {
|
||||
DeviceFixture::setUp();
|
||||
cmdContainer = std::make_unique<MyMockCommandContainer>();
|
||||
cmdContainer->initialize(pDevice, nullptr, true);
|
||||
cmdContainer->initialize(pDevice, nullptr, true, false);
|
||||
cmdContainer->setDirtyStateForAllHeaps(false);
|
||||
const auto &hwInfo = pDevice->getHardwareInfo();
|
||||
auto &productHelper = pDevice->getProductHelper();
|
||||
|
||||
@@ -38,16 +38,20 @@ struct DirectSubmissionFixture : public DeviceFixture {
|
||||
|
||||
struct DirectSubmissionDispatchBufferFixture : public DirectSubmissionFixture {
|
||||
void setUp() {
|
||||
DebugManager.flags.DirectSubmissionFlatRingBuffer.set(0);
|
||||
DirectSubmissionFixture::setUp();
|
||||
MemoryManager *memoryManager = pDevice->getExecutionEnvironment()->memoryManager.get();
|
||||
const AllocationProperties commandBufferProperties{pDevice->getRootDeviceIndex(), 0x1000,
|
||||
AllocationType::COMMAND_BUFFER, pDevice->getDeviceBitfield()};
|
||||
commandBuffer = memoryManager->allocateGraphicsMemoryWithProperties(commandBufferProperties);
|
||||
stream = std::make_unique<LinearStream>(commandBuffer);
|
||||
stream->getSpace(0x40);
|
||||
|
||||
batchBuffer.endCmdPtr = &bbStart[0];
|
||||
batchBuffer.commandBufferAllocation = commandBuffer;
|
||||
batchBuffer.usedSize = 0x40;
|
||||
batchBuffer.taskStartAddress = 0x881112340000;
|
||||
batchBuffer.stream = stream.get();
|
||||
}
|
||||
|
||||
void tearDown() {
|
||||
@@ -60,4 +64,6 @@ struct DirectSubmissionDispatchBufferFixture : public DirectSubmissionFixture {
|
||||
BatchBuffer batchBuffer;
|
||||
uint8_t bbStart[64];
|
||||
GraphicsAllocation *commandBuffer;
|
||||
DebugManagerStateRestore restorer;
|
||||
std::unique_ptr<LinearStream> stream;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user