VirtualBox

Ignore:
Timestamp:
Aug 28, 2019 9:00:02 PM (5 years ago)
Author:
vboxsync
Message:

WDDM: removed obsolete swapchain related code. bugref:9529

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Video/disp/wddm/VBoxDispD3D.h

    r80372 r80488  
    2929
    3030#define VBOXWDDMDISP_MAX_VERTEX_STREAMS 16
    31 #define VBOXWDDMDISP_MAX_SWAPCHAIN_SIZE 16
    3231#define VBOXWDDMDISP_MAX_TEX_SAMPLERS 16
    3332#define VBOXWDDMDISP_TOTAL_SAMPLERS VBOXWDDMDISP_MAX_TEX_SAMPLERS + 5
     
    141140} VBOXWDDMDISP_RENDERTGT, *PVBOXWDDMDISP_RENDERTGT;
    142141
    143 #define VBOXWDDMDISP_INDEX_UNDEFINED (~0U)
    144 typedef struct VBOXWDDMDISP_SWAPCHAIN_FLAGS
    145 {
    146     union
    147     {
    148         struct
    149         {
    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_SWAPCHAIN
    160 {
    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_FB
    166     IDirect3DSurface9 *pRenderTargetFbCopy;
    167     BOOL bRTFbCopyUpToDate;
    168 #endif
    169     IDirect3DSwapChain9 *pSwapChainIf;
    170     /* a read-only hWnd we receive from wine
    171      * 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 
    179142typedef struct VBOXWDDMDISP_DEVICE *PVBOXWDDMDISP_DEVICE;
    180143typedef HRESULT FNVBOXWDDMCREATEDIRECT3DDEVICE(PVBOXWDDMDISP_DEVICE pDevice);
     
    191154    PFNVBOXWDDMCREATESHAREDPRIMARY pfnCreateSharedPrimary;
    192155    IDirect3DDevice9 *pDevice9If;
    193     RTLISTANCHOR SwapchainList;
    194156    UINT u32IfVersion;
    195157    UINT uRtVersion;
     
    272234    VBOXWDDM_DIRTYREGION DirtyRegion; /* <- dirty region to notify host about */
    273235    VBOXWDDM_SURFACE_DESC SurfDesc;
    274     PVBOXWDDMDISP_SWAPCHAIN pSwapchain;
    275236#ifdef VBOX_WITH_MESA3D
    276237    uint32_t hostID;
     
    313274#define VBOXDISP_CUBEMAP_INDEX_TO_LEVEL(pRc, idx) ((idx)%VBOXDISP_CUBEMAP_LEVELS_COUNT(pRc))
    314275
    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 
    346276void vboxWddmResourceInit(PVBOXWDDMDISP_RESOURCE pRc, UINT cAllocs);
    347277
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette