Changeset 95290 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video
- Timestamp:
- Jun 15, 2022 3:15:06 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 151873
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/VBoxMPWddm.cpp
r95234 r95290 2158 2158 { 2159 2159 case VBOXWDDM_ALLOC_TYPE_STD_SHAREDPRIMARYSURFACE: 2160 if (SvgaIsDXSupported(pDevExt)) 2161 { 2162 pAllocationInfo->PreferredSegment.Value = 0; 2163 pAllocationInfo->SupportedReadSegmentSet = 1; /* VRAM */ 2164 pAllocationInfo->SupportedWriteSegmentSet = 1; /* VRAM */ 2165 /// @todo Required? pAllocationInfo->Flags.CpuVisible = 1; 2166 } 2160 2167 break; 2161 2168 case VBOXWDDM_ALLOC_TYPE_UMD_RC_GENERIC: … … 2224 2231 case VBOXWDDM_ALLOC_TYPE_STD_SHADOWSURFACE: 2225 2232 case VBOXWDDM_ALLOC_TYPE_STD_STAGINGSURFACE: 2233 if (SvgaIsDXSupported(pDevExt)) 2234 { 2235 pAllocationInfo->PreferredSegment.Value = 0; 2236 pAllocationInfo->SupportedReadSegmentSet = 1; /* VRAM */ 2237 pAllocationInfo->SupportedWriteSegmentSet = 1; /* VRAM */ 2238 } 2226 2239 pAllocationInfo->Flags.CpuVisible = 1; 2227 2240 break; -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/Svga.cpp
r95250 r95290 1007 1007 case SVGA_3D_CMD_DEFINE_GB_SURFACE: 1008 1008 case SVGA_3D_CMD_DESTROY_GB_SURFACE: 1009 case SVGA_3D_CMD_BIND_GB_SURFACE:1010 case SVGA_3D_CMD_BIND_GB_SURFACE_WITH_PITCH:1011 case SVGA_3D_CMD_COND_BIND_GB_SURFACE:1012 1009 case SVGA_3D_CMD_READBACK_GB_SURFACE: 1013 1010 case SVGA_3D_CMD_READBACK_GB_IMAGE: … … 1021 1018 AssertFailed(); 1022 1019 break; 1020 case SVGA_3D_CMD_BIND_GB_SURFACE: 1021 case SVGA_3D_CMD_BIND_GB_SURFACE_WITH_PITCH: 1022 case SVGA_3D_CMD_COND_BIND_GB_SURFACE: 1023 1023 case SVGA_3D_CMD_UPDATE_GB_IMAGE: 1024 1024 case SVGA_3D_CMD_UPDATE_GB_SURFACE: -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPDX.cpp
r95234 r95290 63 63 if (NT_SUCCESS(Status)) 64 64 { 65 if (pAllocation->dx.SegmentId == 3) 65 if ( pAllocation->dx.SegmentId == 3 66 || pAllocation->dx.desc.fPrimary) 66 67 { 67 68 pvCmd = SvgaCmdBuf3dCmdReserve(pSvga, SVGA_3D_CMD_BIND_GB_SURFACE, sizeof(SVGA3dCmdBindGBSurface), SVGA3D_INVALID_ID); … … 88 89 static void svgaFreeGBMobForAllocation(VBOXWDDM_EXT_VMSVGA *pSvga, PVBOXWDDM_ALLOCATION pAllocation) 89 90 { 90 AssertReturnVoid(pAllocation->dx.SegmentId == 3 );91 AssertReturnVoid(pAllocation->dx.SegmentId == 3 || pAllocation->dx.desc.fPrimary); 91 92 92 93 void *pvCmd = SvgaCmdBuf3dCmdReserve(pSvga, SVGA_3D_CMD_DESTROY_GB_MOB, sizeof(SVGA3dCmdDestroyGBMob), SVGA3D_INVALID_ID); … … 116 117 static NTSTATUS svgaCreateGBMobForAllocation(VBOXWDDM_EXT_VMSVGA *pSvga, PVBOXWDDM_ALLOCATION pAllocation) 117 118 { 118 AssertReturn(pAllocation->dx.SegmentId == 3 , STATUS_INVALID_PARAMETER);119 AssertReturn(pAllocation->dx.SegmentId == 3 || pAllocation->dx.desc.fPrimary, STATUS_INVALID_PARAMETER); 119 120 120 121 uint32_t const cbGB = RT_ALIGN_32(pAllocation->dx.desc.cbAllocation, PAGE_SIZE); … … 172 173 { 173 174 /* USAGE_DEFAULT */ 174 /// @todo Might need to put primaries in a CPU visible segment for readback. 175 // if (pAllocation->dx.desc.fPrimary) 176 // { 177 // /* Put primaries to the CPU visible segment. */ 178 // pAllocationInfo->PreferredSegment.Value = 0; 179 // pAllocationInfo->SupportedReadSegmentSet = 1; /* VRAM */ 180 // pAllocationInfo->SupportedWriteSegmentSet = 1; /* VRAM */ 181 // pAllocationInfo->Flags.CpuVisible = 1; 182 // 183 // pAllocation->dx.SegmentId = 1; 184 // } 185 // else 175 if (pAllocation->dx.desc.fPrimary) 176 { 177 /* Put primaries to the CPU visible segment. Because VidPn code currently assumes that they are there. */ 178 pAllocationInfo->PreferredSegment.Value = 0; 179 pAllocationInfo->SupportedReadSegmentSet = 1; /* VRAM */ 180 pAllocationInfo->SupportedWriteSegmentSet = 1; /* VRAM */ 181 pAllocationInfo->Flags.CpuVisible = 1; 182 183 pAllocation->dx.SegmentId = 1; 184 } 185 else 186 186 { 187 187 pAllocationInfo->PreferredSegment.Value = 0; … … 226 226 /* Allocations in the host VRAM still need guest backing. */ 227 227 NTSTATUS Status; 228 if (pAllocation->dx.SegmentId == 3 )228 if (pAllocation->dx.SegmentId == 3 || pAllocation->dx.desc.fPrimary) 229 229 { 230 230 Status = svgaCreateGBMobForAllocation(pSvga, pAllocation); … … 270 270 { 271 271 void *pvCmd; 272 if (pAllocation->dx.SegmentId == 3 )272 if (pAllocation->dx.SegmentId == 3 || pAllocation->dx.desc.fPrimary) 273 273 { 274 274 pvCmd = SvgaCmdBuf3dCmdReserve(pSvga, SVGA_3D_CMD_BIND_GB_SURFACE, sizeof(SVGA3dCmdBindGBSurface), SVGA3D_INVALID_ID); … … 292 292 Status = SvgaSurfaceIdFree(pSvga, pAllocation->dx.sid); 293 293 294 if (pAllocation->dx.SegmentId == 3 )294 if (pAllocation->dx.SegmentId == 3 || pAllocation->dx.desc.fPrimary) 295 295 svgaFreeGBMobForAllocation(pSvga, pAllocation); 296 296 … … 358 358 Status = STATUS_INVALID_PARAMETER; 359 359 AssertReturnStmt(NT_SUCCESS(Status), GaMemFree(pAllocation), Status); 360 361 /* Legacy fields for VidPn code. */ 362 pAllocation->AllocData.SurfDesc.VidPnSourceId = pAllocation->dx.desc.fPrimary 363 ? pAllocation->dx.desc.PrimaryDesc.VidPnSourceId 364 : 0; 365 pAllocation->AllocData.hostID = pAllocation->dx.sid; 366 pAllocation->AllocData.Addr.SegmentId = pAllocation->dx.SegmentId; 367 pAllocation->AllocData.Addr.offVram = VBOXVIDEOOFFSET_VOID; 360 368 361 369 return Status; … … 598 606 case 1: /* VRAM */ 599 607 { 600 uint64_t const offVRAM = pBuildPagingBuffer->Fill.Destination.SegmentAddress.QuadPart; 601 AssertReturn( offVRAM < pDevExt->cbVRAMCpuVisible 602 && pBuildPagingBuffer->Fill.FillSize <= pDevExt->cbVRAMCpuVisible - offVRAM, STATUS_INVALID_PARAMETER); 603 ASMMemFill32((uint8_t *)pDevExt->pvVisibleVram + offVRAM, pBuildPagingBuffer->Fill.FillSize, pBuildPagingBuffer->Fill.FillPattern); 604 break; 605 } 608 if (!pAllocation->dx.desc.fPrimary) 609 { 610 uint64_t const offVRAM = pBuildPagingBuffer->Fill.Destination.SegmentAddress.QuadPart; 611 AssertReturn( offVRAM < pDevExt->cbVRAMCpuVisible 612 && pBuildPagingBuffer->Fill.FillSize <= pDevExt->cbVRAMCpuVisible - offVRAM, STATUS_INVALID_PARAMETER); 613 ASMMemFill32((uint8_t *)pDevExt->pvVisibleVram + offVRAM, pBuildPagingBuffer->Fill.FillSize, pBuildPagingBuffer->Fill.FillPattern); 614 break; 615 } 616 } 617 RT_FALL_THRU(); 606 618 case 2: /* Aperture */ 607 619 case 3: /* Host */ … … 611 623 612 624 void *pvDst; 613 if (pBuildPagingBuffer->Fill.Destination.SegmentId == 3 )625 if (pBuildPagingBuffer->Fill.Destination.SegmentId == 3 || pAllocation->dx.desc.fPrimary) 614 626 { 615 627 AssertReturn(pAllocation->dx.gb.hMemObjGB != NIL_RTR0MEMOBJ, STATUS_INVALID_PARAMETER); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaUtils.cpp
r93115 r95290 25 25 #ifdef DEBUG 26 26 | GALOG_GROUP_TEST 27 | GALOG_GROUP_HOSTOBJECTS27 // | GALOG_GROUP_HOSTOBJECTS 28 28 // | GALOG_GROUP_PRESENT 29 29 // | GALOG_GROUP_DXGK -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaWddm.cpp
r95234 r95290 1276 1276 SvgaFlush(pDevExt->pGa->hw.pSvga); 1277 1277 1278 GALOG(("pDmaBuffer %p, cbDmaBuffer %u, PatchStart %u, cPatches %u, Flags 0x x, context type %d\n",1278 GALOG(("pDmaBuffer %p, cbDmaBuffer %u, PatchStart %u, cPatches %u, Flags 0x%x, context type %d\n", 1279 1279 pPatch->pDmaBuffer, pPatch->DmaBufferSubmissionEndOffset - pPatch->DmaBufferSubmissionStartOffset, 1280 1280 pPatch->PatchLocationListSubmissionStart, pPatch->PatchLocationListSubmissionLength, pPatch->Flags.Value,
Note:
See TracChangeset
for help on using the changeset viewer.