Changeset 83578 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video
- Timestamp:
- Apr 6, 2020 12:04:45 AM (5 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/Svga.cpp
r83222 r83578 62 62 pSvga->u32MaxTextureHeight = 8192; 63 63 } 64 65 /* 1 + floor(log2(max(u32MaxTextureWidth, u32MaxTextureHeight))): 66 * In Direct3D the next mipmap level size is floor(prev_size / 2), for example 5 -> 2 -> 1 67 * Therefore we only need to know the position of the highest non-zero bit. And since 68 * ASMBitLastSetU32 returns a 1 based index, there is no need to add 1. 69 */ 70 pSvga->u32MaxTextureLevels = ASMBitLastSetU32(RT_MAX(pSvga->u32MaxTextureWidth, pSvga->u32MaxTextureHeight)); 64 71 65 72 NTSTATUS Status = SvgaFifoInit(pSvga); -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/Svga.h
r83222 r83578 83 83 uint32_t u32MaxTextureWidth; /** SVGA3D_DEVCAP_MAX_TEXTURE_WIDTH */ 84 84 uint32_t u32MaxTextureHeight; /** SVGA3D_DEVCAP_MAX_TEXTURE_HEIGHT */ 85 86 uint32_t u32MaxTextureLevels; /** 1 + floor(log2(max(u32MaxTextureWidth, u32MaxTextureHeight))) */ 85 87 86 88 /** Fifo state. */ -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/SvgaHostObjects.cpp
r83222 r83578 319 319 AssertReturn(Status == STATUS_SUCCESS, Status); 320 320 321 AssertReturn(cSizes <= pSvga->u32MaxTextureLevels, STATUS_INVALID_PARAMETER); 322 321 323 SURFACEOBJECT *pSO = (SURFACEOBJECT *)GaMemAllocZero(sizeof(SURFACEOBJECT)); 322 324 if (pSO) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaExt.h
r83222 r83578 77 77 78 78 #define GAFENCE_F_WAITED 0x1 /* KEVENT is initialized and there is(are) waiter(s). */ 79 #define GAFENCE_F_DELETED 0x2 /* The user mode driver deleted this fence. */ 79 80 80 81 NTSTATUS GaFenceCreate(PVBOXWDDM_EXT_GA pGaDevExt, … … 89 90 uint32_t u32FenceHandle, 90 91 uint32_t u32TimeoutUS); 91 NTSTATUS GaFence Unref(PVBOXWDDM_EXT_GA pGaDevExt,92 uint32_t u32FenceHandle);92 NTSTATUS GaFenceDelete(PVBOXWDDM_EXT_GA pGaDevExt, 93 uint32_t u32FenceHandle); 93 94 94 95 DECLINLINE(void) gaFenceObjectsLock(VBOXWDDM_EXT_GA *pGaDevExt) -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaFence.cpp
r82968 r83578 249 249 } 250 250 251 NTSTATUS GaFence Unref(PVBOXWDDM_EXT_GA pGaDevExt,252 uint32_t u32FenceHandle)251 NTSTATUS GaFenceDelete(PVBOXWDDM_EXT_GA pGaDevExt, 252 uint32_t u32FenceHandle) 253 253 { 254 254 gaFenceObjectsLock(pGaDevExt); … … 257 257 AssertReturnStmt(pFO, gaFenceObjectsUnlock(pGaDevExt), STATUS_INVALID_PARAMETER); 258 258 259 if (RT_BOOL(pFO->fu32FenceFlags & GAFENCE_F_DELETED)) 260 { 261 /* Undo GaFenceLookup ref. */ 262 GaFenceUnrefLocked(pGaDevExt, pFO); 263 264 gaFenceObjectsUnlock(pGaDevExt); 265 return STATUS_INVALID_PARAMETER; 266 } 267 268 pFO->fu32FenceFlags |= GAFENCE_F_DELETED; 269 259 270 if (RT_BOOL(pFO->fu32FenceFlags & GAFENCE_F_WAITED)) 260 271 { … … 263 274 } 264 275 276 /* Undo GaFenceLookup ref. */ 277 GaFenceUnrefLocked(pGaDevExt, pFO); 278 279 /* Undo the GaFenceCreate ref. */ 280 GaFenceUnrefLocked(pGaDevExt, pFO); 281 265 282 gaFenceObjectsUnlock(pGaDevExt); 266 283 267 284 GALOG(("u32FenceHandle = %d, pFO %p\n", u32FenceHandle, pFO)); 268 285 269 /* Undo GaFenceLookup ref. */270 gaFenceUnref(pGaDevExt, pFO);271 272 /* Undo the GaFenceCreate ref. */273 gaFenceUnref(pGaDevExt, pFO);274 275 286 return STATUS_SUCCESS; 276 287 } -
trunk/src/VBox/Additions/WINNT/Graphics/Video/mp/wddm/gallium/VBoxMPGaWddm.cpp
r83222 r83578 1741 1741 GASURFSIZE *paSizes = (GASURFSIZE *)&pCreateParms[1]; 1742 1742 1743 /// @todo verify the data1744 1743 Status = gaSurfaceDefine(pDevExt->pGa, pCreateParms, paSizes, pGaSurfaceDefine->cSizes, &pGaSurfaceDefine->u32Sid); 1745 1744 break; … … 1829 1828 1830 1829 VBOXDISPIFESCAPE_GAFENCEUNREF *pFenceUnref = (VBOXDISPIFESCAPE_GAFENCEUNREF *)pEscapeHdr; 1831 Status = GaFence Unref(pDevExt->pGa, pFenceUnref->u32FenceHandle);1830 Status = GaFenceDelete(pDevExt->pGa, pFenceUnref->u32FenceHandle); 1832 1831 break; 1833 1832 }
Note:
See TracChangeset
for help on using the changeset viewer.