mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
[6/n] Internal 4GB allocator
-Use GPU address to program command buffer in WDMM. Change-Id: Iea6e423ccb18a09b4969a10cf2bd44d7a6af6629
This commit is contained in:
committed by
sys_ocldev
parent
5c8cd51fc8
commit
b2f964dcf2
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user