VirtualBox

Ignore:
Timestamp:
Apr 7, 2010 8:00:22 AM (15 years ago)
Author:
vboxsync
Message:

wddm: more correct visible VRAM size reporting + some cleaning

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoShgsmi.h

    r27307 r28031  
    1919#include <iprt/cdefs.h>
    2020#include <VBox/VBoxVideo.h>
     21#include "../VBoxVideo.h"
    2122
    2223typedef DECLCALLBACK(void) FNVBOXSHGSMICMDCOMPLETION(struct _HGSMIHEAP * pHeap, void *pvCmd, void *pvContext);
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVdma.h

    r27383 r28031  
    1919#include <iprt/cdefs.h>
    2020#include <VBox/VBoxVideo.h>
     21#include "../VBoxVideo.h"
    2122
    2223/* DMA commands are currently submitted over HGSMI */
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVidPn.h

    r28011 r28031  
    1616#ifndef ___VBoxVideoVidPn_h___
    1717#define ___VBoxVideoVidPn_h___
     18
     19#include "../VBoxVideo.h"
    1820
    1921#define VBOXVDPN_C_DISPLAY_HBLANK_SIZE 200
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r28011 r28031  
    143143        pView->u32ViewIndex     = pPrimaryInfo->VidPnSourceId;
    144144        pView->u32ViewOffset    = (uint32_t)offVram;
    145         pView->u32ViewSize      = vboxWddmVramReportedSegmentSize(pDevExt)/pDevExt->cSources;
     145        pView->u32ViewSize      = vboxWddmVramCpuVisibleSegmentSize(pDevExt)/pDevExt->cSources;
    146146
    147147        pView->u32MaxScreenSize = pView->u32ViewSize;
     
    11691169             * DXGK_QUERYSEGMENTIN *pQsIn = (DXGK_QUERYSEGMENTIN*)pQueryAdapterInfo->pInputData; */
    11701170            DXGK_QUERYSEGMENTOUT *pQsOut = (DXGK_QUERYSEGMENTOUT*)pQueryAdapterInfo->pOutputData;
     1171#ifdef VBOXWDDM_WITH_FAKE_SEGMENT
     1172# define VBOXWDDM_SEGMENTS_COUNT 2
     1173#else
     1174# define VBOXWDDM_SEGMENTS_COUNT 1
     1175#endif
    11711176            if (!pQsOut->pSegmentDescriptor)
    11721177            {
    11731178                /* we are requested to provide the number of segments we support */
    1174                 pQsOut->NbSegment = 2;
    1175             }
    1176             else if (pQsOut->NbSegment != 2)
     1179                pQsOut->NbSegment = VBOXWDDM_SEGMENTS_COUNT;
     1180            }
     1181            else if (pQsOut->NbSegment != VBOXWDDM_SEGMENTS_COUNT)
    11771182            {
    11781183                AssertBreakpoint();
     
    11881193                /* make sure the size is page aligned */
    11891194                /* @todo: need to setup VBVA buffers and adjust the mem size here */
    1190                 pDr->Size = vboxWddmVramReportedSegmentSize(pContext);
     1195                pDr->Size = vboxWddmVramCpuVisibleSegmentSize(pContext);
    11911196                pDr->NbOfBanks = 0;
    11921197                pDr->pBankRangeTable = 0;
     
    11941199                pDr->Flags.Value = 0;
    11951200                pDr->Flags.CpuVisible = 1;
    1196 
     1201#ifdef VBOXWDDM_WITH_FAKE_SEGMENT
    11971202                ++pDr;
    11981203                /* create cpu-invisible segment of the same size */
     
    12011206                /* make sure the size is page aligned */
    12021207                /* @todo: need to setup VBVA buffers and adjust the mem size here */
    1203                 pDr->Size = vboxWddmVramReportedSegmentSize(pContext);
     1208                pDr->Size = vboxWddmVramCpuInvisibleSegmentSize(pContext);
    12041209                pDr->NbOfBanks = 0;
    12051210                pDr->pBankRangeTable = 0;
    12061211                pDr->CommitLimit = pDr->Size;
    12071212                pDr->Flags.Value = 0;
     1213#endif
    12081214
    12091215                pQsOut->PagingBufferSegmentId = 0;
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.h

    r27997 r28031  
    1717#define ___VBoxVideoWddm_h___
    1818
     19#include "../VBoxVideo.h"
     20
    1921/* one page size */
    2022#define VBOXWDDM_C_DMA_BUFFER_SIZE         0x1000
     
    2426#define VBOXWDDM_C_POINTER_MAX_WIDTH  64
    2527#define VBOXWDDM_C_POINTER_MAX_HEIGHT 64
     28
     29#define VBOXWDDM_C_VDMA_BUFFER_SIZE   (64*_1K)
     30
     31//#define VBOXWDDM_WITH_FAKE_SEGMENT
    2632
    2733#define VBOXWDDM_ROUNDBOUND(_v, _b) (((_v) + ((_b) - 1)) & ~((_b) - 1))
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