VirtualBox

Ignore:
Timestamp:
Jan 27, 2010 4:30:34 PM (15 years ago)
Author:
vboxsync
Message:

wddm: more impl

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r26069 r26077  
    1919
    2020#include <VBox/VBoxGuestLib.h>
     21#include <VBox/VBoxVideo.h>
    2122
    2223#define VBOXWDDM_MEMTAG 'MDBV'
     
    413414    dfprintf(("==> "__FUNCTION__ ", context(0x%x)\n", hAdapter));
    414415    NTSTATUS Status = STATUS_SUCCESS;
     416    PDEVICE_EXTENSION pContext = (PDEVICE_EXTENSION)hAdapter;
    415417
    416418    switch (pQueryAdapterInfo->Type)
     
    456458        case DXGKQAITYPE_QUERYSEGMENT:
    457459        {
    458             DXGK_QUERYSEGMENTIN *pQsIn = (DXGK_QUERYSEGMENTIN*)pQueryAdapterInfo->pInputData;
     460            /* no need for DXGK_QUERYSEGMENTIN as it contains AGP aperture info, which (AGP aperture) we do not support
     461             * DXGK_QUERYSEGMENTIN *pQsIn = (DXGK_QUERYSEGMENTIN*)pQueryAdapterInfo->pInputData; */
    459462            DXGK_QUERYSEGMENTOUT *pQsOut = (DXGK_QUERYSEGMENTOUT*)pQueryAdapterInfo->pOutputData;
     463            if (!pQsOut->pSegmentDescriptor)
     464            {
     465                /* we are requested to provide the number of segments we support */
     466                pQsOut->NbSegment = 1;
     467            }
     468            else if (pQsOut->NbSegment != 1)
     469            {
     470                AssertBreakpoint();
     471                drprintf((__FUNCTION__ " NbSegment (%d) != 1\n", pQsOut->NbSegment));
     472                Status = STATUS_INVALID_PARAMETER;
     473            }
     474            else
     475            {
     476                /* we are requested to provide segment information */
     477                pQsOut->pSegmentDescriptor->BaseAddress.QuadPart = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
     478                pQsOut->pSegmentDescriptor->CpuTranslatedAddress.QuadPart = VBE_DISPI_LFB_PHYSICAL_ADDRESS;
     479                /* make sure the size is page aligned */
     480                pQsOut->pSegmentDescriptor->Size = (pContext->u.primary.cbVRAM - VBVA_ADAPTER_INFORMATION_SIZE - pContext->u.primary.cbMiniportHeap) & (~0xfffUL);
     481                pQsOut->pSegmentDescriptor->NbOfBanks = 0;
     482                pQsOut->pSegmentDescriptor->pBankRangeTable = 0;
     483                pQsOut->pSegmentDescriptor->CommitLimit = pQsOut->pSegmentDescriptor->Size;
     484                pQsOut->pSegmentDescriptor->Flags.Value = 0;
     485                pQsOut->pSegmentDescriptor->Flags.CpuVisible = 1;
     486            }
     487            pQsOut->PagingBufferSegmentId = 0;
     488            pQsOut->PagingBufferSize = 1024; /* @todo: ??*/
     489            pQsOut->PagingBufferPrivateDataSize = 0; /* @todo: ??*/
    460490            break;
    461491        }
    462492        case DXGKQAITYPE_UMDRIVERPRIVATE:
    463             drprintf((""__FUNCTION__ ": we do not support DXGKQAITYPE_UMDRIVERPRIVATE\n"));
     493            drprintf((__FUNCTION__ ": we do not support DXGKQAITYPE_UMDRIVERPRIVATE\n"));
    464494            Status = STATUS_NOT_SUPPORTED;
    465495            break;
    466496        default:
    467             drprintf((""__FUNCTION__ ": unsupported Type (%d)\n", pQueryAdapterInfo->Type));
     497            drprintf((__FUNCTION__ ": unsupported Type (%d)\n", pQueryAdapterInfo->Type));
    468498            Status = STATUS_NOT_SUPPORTED;
    469499            break;
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