VirtualBox

Changeset 41424 in vbox for trunk/src/VBox/Additions/WINNT


Ignore:
Timestamp:
May 23, 2012 7:31:16 PM (13 years ago)
Author:
vboxsync
Message:

wined3d: more logging

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c

    r41109 r41424  
    30323032            iface, srcData, start, count);
    30333033
    3034     if (!srcData || start >= MAX_CONST_B) return WINED3DERR_INVALIDCALL;
     3034    if (!srcData || start >= MAX_CONST_B)
     3035    {
     3036        ERR("incorrect vertex shader const data: start(%u), srcData(0x%p), count(%u)", start, srcData, count);
     3037        return WINED3DERR_INVALIDCALL;
     3038    }
    30353039
    30363040    memcpy(&This->updateStateBlock->vertexShaderConstantB[start], srcData, cnt * sizeof(BOOL));
     
    30603064
    30613065    if (dstData == NULL || cnt < 0)
     3066    {
     3067        ERR("incorrect vertex shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count);
    30623068        return WINED3DERR_INVALIDCALL;
     3069    }
    30633070
    30643071    memcpy(dstData, &This->stateBlock->vertexShaderConstantB[start], cnt * sizeof(BOOL));
     
    30783085            iface, srcData, start, count);
    30793086
    3080     if (!srcData || start >= MAX_CONST_I) return WINED3DERR_INVALIDCALL;
     3087    if (!srcData || start >= MAX_CONST_I)
     3088    {
     3089        ERR("incorrect vertex shader const data: start(%u), srcData(0x%p), count(%u)", start, srcData, count);
     3090        return WINED3DERR_INVALIDCALL;
     3091    }
    30813092
    30823093    memcpy(&This->updateStateBlock->vertexShaderConstantI[start * 4], srcData, cnt * sizeof(int) * 4);
     
    31073118
    31083119    if (dstData == NULL || ((signed int) MAX_CONST_I - (signed int) start) <= 0)
     3120    {
     3121        ERR("incorrect vertex shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count);
    31093122        return WINED3DERR_INVALIDCALL;
     3123    }
    31103124
    31113125    memcpy(dstData, &This->stateBlock->vertexShaderConstantI[start * 4], cnt * sizeof(int) * 4);
     
    31273141    /* Specifically test start > limit to catch MAX_UINT overflows when adding start + count */
    31283142    if (srcData == NULL || start + count > This->d3d_vshader_constantF || start > This->d3d_vshader_constantF)
     3143    {
     3144        ERR("incorrect vertex shader const data: start(%u), srcData(0x%p), count(%u)", start, srcData, count);
    31293145        return WINED3DERR_INVALIDCALL;
     3146    }
    31303147
    31313148    memcpy(&This->updateStateBlock->vertexShaderConstantF[start * 4], srcData, count * sizeof(float) * 4);
     
    31613178
    31623179    if (dstData == NULL || cnt < 0)
     3180    {
     3181        ERR("incorrect vertex shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count);
    31633182        return WINED3DERR_INVALIDCALL;
     3183    }
    31643184
    31653185    memcpy(dstData, &This->stateBlock->vertexShaderConstantF[start * 4], cnt * sizeof(float) * 4);
     
    34303450            iface, srcData, start, count);
    34313451
    3432     if (!srcData || start >= MAX_CONST_B) return WINED3DERR_INVALIDCALL;
     3452    if (!srcData || start >= MAX_CONST_B)
     3453    {
     3454        ERR("incorrect pixel shader const data: start(%u), srcData(0x%p), count(%u)", start, srcData, count);
     3455        return WINED3DERR_INVALIDCALL;
     3456    }
    34333457
    34343458    memcpy(&This->updateStateBlock->pixelShaderConstantB[start], srcData, cnt * sizeof(BOOL));
     
    34583482
    34593483    if (dstData == NULL || cnt < 0)
     3484    {
     3485        ERR("incorrect pixel shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count);
    34603486        return WINED3DERR_INVALIDCALL;
     3487    }
    34613488
    34623489    memcpy(dstData, &This->stateBlock->pixelShaderConstantB[start], cnt * sizeof(BOOL));
     
    34763503            iface, srcData, start, count);
    34773504
    3478     if (!srcData || start >= MAX_CONST_I) return WINED3DERR_INVALIDCALL;
     3505    if (!srcData || start >= MAX_CONST_I)
     3506    {
     3507        ERR("incorrect pixel shader const data: start(%u), srcData(0x%p), count(%u)", start, srcData, count);
     3508        return WINED3DERR_INVALIDCALL;
     3509    }
    34793510
    34803511    memcpy(&This->updateStateBlock->pixelShaderConstantI[start * 4], srcData, cnt * sizeof(int) * 4);
     
    35053536
    35063537    if (dstData == NULL || cnt < 0)
     3538    {
     3539        ERR("incorrect pixel shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count);
    35073540        return WINED3DERR_INVALIDCALL;
     3541    }
    35083542
    35093543    memcpy(dstData, &This->stateBlock->pixelShaderConstantI[start * 4], cnt * sizeof(int) * 4);
     
    35253559    /* Specifically test start > limit to catch MAX_UINT overflows when adding start + count */
    35263560    if (srcData == NULL || start + count > This->d3d_pshader_constantF || start > This->d3d_pshader_constantF)
     3561    {
     3562        ERR("incorrect pixel shader const data: start(%u), srcData(0x%p), count(%u)", start, srcData, count);
    35273563        return WINED3DERR_INVALIDCALL;
     3564    }
    35283565
    35293566    memcpy(&This->updateStateBlock->pixelShaderConstantF[start * 4], srcData, count * sizeof(float) * 4);
     
    35593596
    35603597    if (dstData == NULL || cnt < 0)
     3598    {
     3599        ERR("incorrect pixel shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count);
    35613600        return WINED3DERR_INVALIDCALL;
     3601    }
    35623602
    35633603    memcpy(dstData, &This->stateBlock->pixelShaderConstantF[start * 4], cnt * sizeof(float) * 4);
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