[6/n] Internal 4GB allocator

-Use GPU address to program command buffer in WDMM.

Change-Id: Iea6e423ccb18a09b4969a10cf2bd44d7a6af6629
This commit is contained in:
Mrozek, Michal
2018-03-01 16:21:18 +01:00
committed by sys_ocldev
parent 5c8cd51fc8
commit b2f964dcf2
5 changed files with 21 additions and 8 deletions

View File

@@ -729,12 +729,12 @@ bool Wddm::destroyContext(D3DKMT_HANDLE context) {
return status == STATUS_SUCCESS ? true : false;
}
bool Wddm::submit(void *commandBuffer, size_t size, void *commandHeader) {
bool Wddm::submit(uint64_t commandBuffer, size_t size, void *commandHeader) {
D3DKMT_SUBMITCOMMAND SubmitCommand = {0};
NTSTATUS status = STATUS_SUCCESS;
bool success = true;
SubmitCommand.Commands = reinterpret_cast<D3DGPU_VIRTUAL_ADDRESS>(commandBuffer);
SubmitCommand.Commands = commandBuffer;
SubmitCommand.CommandLength = static_cast<UINT>(size);
SubmitCommand.BroadcastContextCount = 1;
SubmitCommand.BroadcastContext[0] = context;

View File

@@ -91,7 +91,7 @@ class Wddm {
MOCKABLE_VIRTUAL bool destroyContext(D3DKMT_HANDLE context);
MOCKABLE_VIRTUAL bool queryAdapterInfo();
MOCKABLE_VIRTUAL bool submit(void *commandBuffer, size_t size, void *commandHeader);
MOCKABLE_VIRTUAL bool submit(uint64_t commandBuffer, size_t size, void *commandHeader);
MOCKABLE_VIRTUAL bool waitOnGPU();
MOCKABLE_VIRTUAL bool waitFromCpu(uint64_t lastFenceValue);

View File

@@ -88,7 +88,7 @@ WddmCommandStreamReceiver<GfxFamily>::~WddmCommandStreamReceiver() {
template <typename GfxFamily>
FlushStamp WddmCommandStreamReceiver<GfxFamily>::flush(BatchBuffer &batchBuffer,
EngineType engineType, ResidencyContainer *allocationsForResidency) {
void *commandStreamAddress = ptrOffset(batchBuffer.commandBufferAllocation->getUnderlyingBuffer(), batchBuffer.startOffset);
auto commandStreamAddress = ptrOffset(batchBuffer.commandBufferAllocation->getGpuAddress(), batchBuffer.startOffset);
if (this->dispatchMode == DispatchMode::ImmediateDispatch) {
makeResident(*batchBuffer.commandBufferAllocation);