VirtualBox

Ignore:
Timestamp:
Jul 15, 2010 8:56:09 PM (14 years ago)
Author:
vboxsync
Message:

wddm/3d: more debugging

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

Legend:

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

    r30566 r30865  
    231231AssertCompile((sizeof (VBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD) & 7) == 0);
    232232AssertCompile(RT_OFFSETOF(VBOXDISPIFESCAPE_GETVBOXVIDEOCMCMD, EscapeHdr) == 0);
     233
     234typedef struct VBOXDISPIFESCAPE_DBGPRINT
     235{
     236    VBOXDISPIFESCAPE EscapeHdr;
     237    /* null-terminated string to DbgPrint including \0 */
     238    char aStringBuf[1];
     239} VBOXDISPIFESCAPE_DBGPRINT, *PVBOXDISPIFESCAPE_DBGPRINT;
     240AssertCompile(RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, EscapeHdr) == 0);
    233241
    234242/* query info func */
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoVdma.cpp

    r30795 r30865  
    146146        {
    147147            vboxVideoLeDetach(&pPipe->CmdListHead, pDetachHead);
    148             bListEmpty = IsListEmpty(pDetachHead);
     148            bListEmpty = !!(IsListEmpty(pDetachHead));
    149149            pPipe->bNeedNotify = bListEmpty;
    150150        }
  • trunk/src/VBox/Additions/WINNT/Graphics/Miniport/wddm/VBoxVideoWddm.cpp

    r30720 r30865  
    27842784                Status = STATUS_SUCCESS;
    27852785                break;
     2786            case VBOXESC_DBGPRINT:
     2787            {
     2788                /* use RT_OFFSETOF instead of sizeof since sizeof will give an aligned size that might
     2789                 * be bigger than the VBOXDISPIFESCAPE_DBGPRINT with a data containing just a few chars */
     2790                Assert(pEscape->PrivateDriverDataSize >= RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1]));
     2791                /* only do DbgPrint when pEscape->PrivateDriverDataSize > RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1])
     2792                 * since == RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1]) means the buffer contains just \0,
     2793                 * i.e. no need to print it */
     2794                if (pEscape->PrivateDriverDataSize > RT_OFFSETOF(VBOXDISPIFESCAPE_DBGPRINT, aStringBuf[1]))
     2795                {
     2796                    PVBOXDISPIFESCAPE_DBGPRINT pDbgPrint = (PVBOXDISPIFESCAPE_DBGPRINT)pEscapeHdr;
     2797                    /* ensure the last char is \0*/
     2798                    *((uint8_t*)pDbgPrint + pEscape->PrivateDriverDataSize - 1) = '\0';
     2799                    DbgPrint(pDbgPrint->aStringBuf);
     2800                }
     2801                Status = STATUS_SUCCESS;
     2802                break;
     2803            }
    27862804            default:
     2805                Assert(0);
    27872806                drprintf((__FUNCTION__": unsupported escape code (0x%x)\n", pEscapeHdr->escapeCode));
    27882807                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