Changeset 80488 in vbox for trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.h
- Timestamp:
- Aug 28, 2019 9:00:02 PM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.h
r80372 r80488 29 29 30 30 #define VBOXWDDMDISP_MAX_VERTEX_STREAMS 16 31 #define VBOXWDDMDISP_MAX_SWAPCHAIN_SIZE 1632 31 #define VBOXWDDMDISP_MAX_TEX_SAMPLERS 16 33 32 #define VBOXWDDMDISP_TOTAL_SAMPLERS VBOXWDDMDISP_MAX_TEX_SAMPLERS + 5 … … 141 140 } VBOXWDDMDISP_RENDERTGT, *PVBOXWDDMDISP_RENDERTGT; 142 141 143 #define VBOXWDDMDISP_INDEX_UNDEFINED (~0U)144 typedef struct VBOXWDDMDISP_SWAPCHAIN_FLAGS145 {146 union147 {148 struct149 {150 UINT bChanged : 1;151 UINT bRtReportingPresent : 1; /* use VBox extension method for performing present */152 UINT bSwitchReportingPresent : 1; /* switch to use VBox extension method for performing present on next present */153 UINT Reserved : 29;154 };155 uint32_t Value;156 };157 }VBOXWDDMDISP_SWAPCHAIN_FLAGS;158 159 typedef struct VBOXWDDMDISP_SWAPCHAIN160 {161 RTLISTNODE ListEntry;162 UINT iBB; /* Backbuffer index */163 UINT cRTs; /* Number of render targets in the swapchain */164 VBOXWDDMDISP_SWAPCHAIN_FLAGS fFlags;165 #ifndef VBOXWDDM_WITH_VISIBLE_FB166 IDirect3DSurface9 *pRenderTargetFbCopy;167 BOOL bRTFbCopyUpToDate;168 #endif169 IDirect3DSwapChain9 *pSwapChainIf;170 /* a read-only hWnd we receive from wine171 * we use it for visible region notifications only,172 * it MUST NOT be destroyed on swapchain destruction,173 * wine will handle that for us */174 HWND hWnd;175 VBOXDISP_KMHANDLE hSwapchainKm;176 VBOXWDDMDISP_RENDERTGT aRTs[VBOXWDDMDISP_MAX_SWAPCHAIN_SIZE];177 } VBOXWDDMDISP_SWAPCHAIN, *PVBOXWDDMDISP_SWAPCHAIN;178 179 142 typedef struct VBOXWDDMDISP_DEVICE *PVBOXWDDMDISP_DEVICE; 180 143 typedef HRESULT FNVBOXWDDMCREATEDIRECT3DDEVICE(PVBOXWDDMDISP_DEVICE pDevice); … … 191 154 PFNVBOXWDDMCREATESHAREDPRIMARY pfnCreateSharedPrimary; 192 155 IDirect3DDevice9 *pDevice9If; 193 RTLISTANCHOR SwapchainList;194 156 UINT u32IfVersion; 195 157 UINT uRtVersion; … … 272 234 VBOXWDDM_DIRTYREGION DirtyRegion; /* <- dirty region to notify host about */ 273 235 VBOXWDDM_SURFACE_DESC SurfDesc; 274 PVBOXWDDMDISP_SWAPCHAIN pSwapchain;275 236 #ifdef VBOX_WITH_MESA3D 276 237 uint32_t hostID; … … 313 274 #define VBOXDISP_CUBEMAP_INDEX_TO_LEVEL(pRc, idx) ((idx)%VBOXDISP_CUBEMAP_LEVELS_COUNT(pRc)) 314 275 315 DECLINLINE(PVBOXWDDMDISP_SWAPCHAIN) vboxWddmSwapchainForAlloc(PVBOXWDDMDISP_ALLOCATION pAlloc)316 {317 return pAlloc->pSwapchain;318 }319 320 DECLINLINE(UINT) vboxWddmSwapchainIdxFb(PVBOXWDDMDISP_SWAPCHAIN pSwapchain)321 {322 return (pSwapchain->iBB + pSwapchain->cRTs - 1) % pSwapchain->cRTs;323 }324 325 /* if swapchain contains only one surface returns this surface */326 DECLINLINE(PVBOXWDDMDISP_RENDERTGT) vboxWddmSwapchainGetBb(PVBOXWDDMDISP_SWAPCHAIN pSwapchain)327 {328 if (pSwapchain->cRTs)329 {330 Assert(pSwapchain->iBB < pSwapchain->cRTs);331 return &pSwapchain->aRTs[pSwapchain->iBB];332 }333 return NULL;334 }335 336 DECLINLINE(PVBOXWDDMDISP_RENDERTGT) vboxWddmSwapchainGetFb(PVBOXWDDMDISP_SWAPCHAIN pSwapchain)337 {338 if (pSwapchain->cRTs)339 {340 UINT iFb = vboxWddmSwapchainIdxFb(pSwapchain);341 return &pSwapchain->aRTs[iFb];342 }343 return NULL;344 }345 346 276 void vboxWddmResourceInit(PVBOXWDDMDISP_RESOURCE pRc, UINT cAllocs); 347 277
Note:
See TracChangeset
for help on using the changeset viewer.