fix: add missing command buffer header translation for WSL in WDDM2.3 case

Related-To: NEO-12648
Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2024-09-24 12:16:20 +00:00
committed by Compute-Runtime-Automation
parent c53393152a
commit 658a0667d4

View File

@@ -156,8 +156,18 @@ bool WddmInterface23::submit(uint64_t commandBuffer, size_t size, void *commandH
submitCommand.CommandBuffer = commandBuffer;
submitCommand.CommandLength = static_cast<UINT>(size);
submitCommand.pPrivateDriverData = commandHeader;
submitCommand.PrivateDriverDataSize = sizeof(COMMAND_BUFFER_HEADER);
COMMAND_BUFFER_HEADER *pHeader = reinterpret_cast<COMMAND_BUFFER_HEADER *>(commandHeader);
UmKmDataTempStorage<COMMAND_BUFFER_HEADER> internalRepresentation;
if (wddm.getHwDeviceId()->getUmKmDataTranslator()->enabled()) {
internalRepresentation.resize(wddm.getHwDeviceId()->getUmKmDataTranslator()->getSizeForCommandBufferHeaderDataInternalRepresentation());
bool translated = wddm.getHwDeviceId()->getUmKmDataTranslator()->translateCommandBufferHeaderDataToInternalRepresentation(internalRepresentation.data(), internalRepresentation.size(), *pHeader);
UNRECOVERABLE_IF(false == translated);
submitCommand.pPrivateDriverData = internalRepresentation.data();
submitCommand.PrivateDriverDataSize = static_cast<uint32_t>(internalRepresentation.size());
} else {
submitCommand.pPrivateDriverData = pHeader;
submitCommand.PrivateDriverDataSize = sizeof(COMMAND_BUFFER_HEADER);
}
if (!debugManager.flags.UseCommandBufferHeaderSizeForWddmQueueSubmission.get()) {
submitCommand.PrivateDriverDataSize = MemoryConstants::pageSize;