VirtualBox

Ignore:
Timestamp:
Sep 26, 2020 3:26:55 PM (4 years ago)
Author:
vboxsync
Message:

WDDM: cleanup. bugref:9830

Location:
trunk/src/VBox/Additions/3D/win/VBoxSVGA/winsys
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/3D/win/VBoxSVGA/winsys/vmw_screen_ioctl.c

    r82972 r86307  
    127127    createParms.usage = (uint32_t) usage;
    128128
    129     assert(numFaces * numMipLevels < GA_MAX_SURFACE_FACES*
    130            GA_MAX_MIP_LEVELS);
     129    if (numFaces * numMipLevels >= GA_MAX_SURFACE_FACES*GA_MAX_MIP_LEVELS) {
     130        return (uint32_t)-1;
     131    }
    131132    cur_size = sizes;
    132133    for (iFace = 0; iFace < numFaces; ++iFace) {
     
    170171{
    171172    RT_NOREF10(vws, flags, format, usage, size, numFaces, numMipLevels, sampleCount, buffer_handle, p_region);
    172     ASMBreakpoint();
    173173    // guest-backed surface
    174174    // DeviceCallbacks.pfnAllocateCb(pDevice->hDevice, pDdiAllocate);
    175     return 0;
     175    return (uint32_t)-1;
    176176}
    177177
     
    196196{
    197197    RT_NOREF4(vws, whandle, req, needs_unref);
    198     ASMBreakpoint();
    199198    // ???
    200199    return -1;
     
    225224{
    226225    RT_NOREF7(vws, whandle, flags, format, numMipLevels, handle, p_region);
    227     ASMBreakpoint();
    228226    // ??? DeviceCallbacks.pfnLockCb(pDevice->hDevice, );
    229227    return -1;
     
    301299
    302300    if (ret) {
    303        ASMBreakpoint();
    304301       vmw_error("IOCTL failed %d: %s\n", ret, strerror(-ret));
    305302       goto out_err1;
     
    347344    if (region->data == NULL)
    348345    {
    349        ASMBreakpoint(); /* Should not get here. */
     346       /* Should not get here. */
    350347       return NULL;
    351348    }
     
    385382{
    386383    RT_NOREF4(region, dont_block, readonly, allow_cs);
    387     ASMBreakpoint();
    388384    // ???
    389385    return -1;
     
    403399{
    404400    RT_NOREF3(region, readonly, allow_cs);
    405     ASMBreakpoint();
    406401    // ???
    407402    return;
     
    477472{
    478473    RT_NOREF3(vws, type, code_len);
    479     ASMBreakpoint();
    480474    // DeviceCallbacks.pfnAllocateCb(pDevice->hDevice, pDdiAllocate);
    481475    return 0;
     
    486480{
    487481    RT_NOREF2(vws, shid);
    488     ASMBreakpoint();
    489482    // ??? DeviceCallbacks.pfnDeallocateCb(pDevice->hDevice, pDdiAllocate);
    490483    return;
     
    516509      for (offset = 0; capsBlock[offset] != 0; offset += capsBlock[offset]) {
    517510         const SVGA3dCapsRecord *record;
    518          assert(offset < SVGA_FIFO_3D_CAPS_SIZE);
     511         if (offset >= SVGA_FIFO_3D_CAPS_SIZE)
     512            break;
    519513         record = (const SVGA3dCapsRecord *) (capsBlock + offset);
    520514         if ((record->header.type >= SVGA3DCAPS_RECORD_DEVCAPS_MIN) &&
     
    602596            break;
    603597        case DRM_VMW_PARAM_VGPU10:
    604             gp_arg->value = 1;
     598            gp_arg->value = 0;
    605599            break;
    606600        default: return -1;
     
    613607{
    614608    /* DRM_VMW_GET_3D_CAP */
    615     /// @todo HwInfo.au32Caps if SVGA_CAP_GBOBJECTS is set.
    616609    memcpy(pvCap, &vws_wddm->HwInfo.au32Fifo[SVGA_FIFO_3D_CAPS], cbCap);
    617610    return 0;
     
    659652   vws->ioctl.hwversion = gp_arg.value;
    660653
    661    memset(&gp_arg, 0, sizeof(gp_arg));
    662    gp_arg.param = DRM_VMW_PARAM_HW_CAPS;
    663    ret = vboxGetParam(vws_wddm, &gp_arg);
    664    if (ret)
    665       vws->base.have_gb_objects = FALSE;
    666    else
    667       vws->base.have_gb_objects =
    668          !!(gp_arg.value & (uint64_t) SVGA_CAP_GBOBJECTS);
     654   //memset(&gp_arg, 0, sizeof(gp_arg));
     655   //gp_arg.param = DRM_VMW_PARAM_HW_CAPS;
     656   //ret = vboxGetParam(vws_wddm, &gp_arg);
     657   //if (ret)
     658   //   vws->base.have_gb_objects = FALSE;
     659   //else
     660   //   vws->base.have_gb_objects =
     661   //      !!(gp_arg.value & (uint64_t) SVGA_CAP_GBOBJECTS);
     662   /* The driver does not support this feature. */
     663   vws->base.have_gb_objects = FALSE;
    669664   
    670665   if (vws->base.have_gb_objects && !drm_gb_capable)
  • trunk/src/VBox/Additions/3D/win/VBoxSVGA/winsys/vmw_screen_wddm.c

    r82972 r86307  
    107107{
    108108    RT_NOREF3(sws, whandle, format);
    109     ASMBreakpoint();
    110109    return 0;
    111110}
     
    117116{
    118117    RT_NOREF3(sws, whandle, format);
    119     ASMBreakpoint();
    120118    return 0;
    121119}
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