2020* OTHER DEALINGS IN THE SOFTWARE.
2121*/
2222
23+ #include " runtime/memory_manager/memory_constants.h"
2324#include " runtime/os_interface/windows/gdi_interface.h"
2425#include " runtime/os_interface/windows/wddm/wddm_interface.h"
2526#include " runtime/os_interface/windows/wddm/wddm.h"
2627#include " runtime/os_interface/windows/os_context_win.h"
2728
28- bool OCLRT::WddmInterface20::createHwQueue (PreemptionMode preemptionMode, OsContextWin &osContext) {
29+ using namespace OCLRT ;
30+
31+ bool WddmInterface20::createHwQueue (PreemptionMode preemptionMode, OsContextWin &osContext) {
2932 return false ;
3033}
31- void OCLRT:: WddmInterface20::destroyHwQueue (D3DKMT_HANDLE hwQueue) {}
34+ void WddmInterface20::destroyHwQueue (D3DKMT_HANDLE hwQueue) {}
3235
33- bool OCLRT::WddmInterface20 ::createMonitoredFence (OsContextWin &osContext) {
36+ bool WddmInterface ::createMonitoredFence (OsContextWin &osContext) {
3437 NTSTATUS Status;
3538 D3DKMT_CREATESYNCHRONIZATIONOBJECT2 CreateSynchronizationObject = {0 };
3639 CreateSynchronizationObject.hDevice = wddm.getDevice ();
@@ -48,11 +51,11 @@ bool OCLRT::WddmInterface20::createMonitoredFence(OsContextWin &osContext) {
4851 return Status == STATUS_SUCCESS;
4952}
5053
51- const bool OCLRT:: WddmInterface20::hwQueuesSupported () {
54+ const bool WddmInterface20::hwQueuesSupported () {
5255 return false ;
5356}
5457
55- bool OCLRT:: WddmInterface20::submit (uint64_t commandBuffer, size_t size, void *commandHeader, OsContextWin &osContext) {
58+ bool WddmInterface20::submit (uint64_t commandBuffer, size_t size, void *commandHeader, OsContextWin &osContext) {
5659 D3DKMT_SUBMITCOMMAND SubmitCommand = {0 };
5760 NTSTATUS status = STATUS_SUCCESS;
5861
@@ -77,7 +80,7 @@ bool OCLRT::WddmInterface20::submit(uint64_t commandBuffer, size_t size, void *c
7780 return STATUS_SUCCESS == status;
7881}
7982
80- bool OCLRT:: WddmInterface23::createHwQueue (PreemptionMode preemptionMode, OsContextWin &osContext) {
83+ bool WddmInterface23::createHwQueue (PreemptionMode preemptionMode, OsContextWin &osContext) {
8184 D3DKMT_CREATEHWQUEUE createHwQueue = {};
8285
8386 if (!wddm.getGdi ()->setupHwQueueProcAddresses ()) {
@@ -93,14 +96,10 @@ bool OCLRT::WddmInterface23::createHwQueue(PreemptionMode preemptionMode, OsCont
9396 UNRECOVERABLE_IF (status != STATUS_SUCCESS);
9497 osContext.setHwQueue (createHwQueue.hHwQueue );
9598
96- osContext.resetMonitoredFenceParams (createHwQueue.hHwQueueProgressFence ,
97- reinterpret_cast <uint64_t *>(createHwQueue.HwQueueProgressFenceCPUVirtualAddress ),
98- createHwQueue.HwQueueProgressFenceGPUVirtualAddress );
99-
10099 return status == STATUS_SUCCESS;
101100}
102101
103- void OCLRT:: WddmInterface23::destroyHwQueue (D3DKMT_HANDLE hwQueue) {
102+ void WddmInterface23::destroyHwQueue (D3DKMT_HANDLE hwQueue) {
104103 if (hwQueue) {
105104 D3DKMT_DESTROYHWQUEUE destroyHwQueue = {};
106105 destroyHwQueue.hHwQueue = hwQueue;
@@ -110,15 +109,11 @@ void OCLRT::WddmInterface23::destroyHwQueue(D3DKMT_HANDLE hwQueue) {
110109 }
111110}
112111
113- bool OCLRT::WddmInterface23::createMonitoredFence (OsContextWin &osContext) {
114- return true ;
115- }
116-
117- const bool OCLRT::WddmInterface23::hwQueuesSupported () {
112+ const bool WddmInterface23::hwQueuesSupported () {
118113 return true ;
119114}
120115
121- bool OCLRT:: WddmInterface23::submit (uint64_t commandBuffer, size_t size, void *commandHeader, OsContextWin &osContext) {
116+ bool WddmInterface23::submit (uint64_t commandBuffer, size_t size, void *commandHeader, OsContextWin &osContext) {
122117 auto monitoredFence = osContext.getMonitoredFence ();
123118
124119 D3DKMT_SUBMITCOMMANDTOHWQUEUE submitCommand = {};
@@ -132,7 +127,7 @@ bool OCLRT::WddmInterface23::submit(uint64_t commandBuffer, size_t size, void *c
132127 pHeader->MonitorFenceValue = monitoredFence.currentFenceValue ;
133128
134129 submitCommand.pPrivateDriverData = commandHeader;
135- submitCommand.PrivateDriverDataSize = sizeof (COMMAND_BUFFER_HEADER) ;
130+ submitCommand.PrivateDriverDataSize = MemoryConstants::pageSize ;
136131
137132 auto status = wddm.getGdi ()->submitCommandToHwQueue (&submitCommand);
138133 UNRECOVERABLE_IF (status != STATUS_SUCCESS);
0 commit comments