Changeset 41424 in vbox for trunk/src/VBox/Additions/WINNT
- Timestamp:
- May 23, 2012 7:31:16 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/device.c
r41109 r41424 3032 3032 iface, srcData, start, count); 3033 3033 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 } 3035 3039 3036 3040 memcpy(&This->updateStateBlock->vertexShaderConstantB[start], srcData, cnt * sizeof(BOOL)); … … 3060 3064 3061 3065 if (dstData == NULL || cnt < 0) 3066 { 3067 ERR("incorrect vertex shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count); 3062 3068 return WINED3DERR_INVALIDCALL; 3069 } 3063 3070 3064 3071 memcpy(dstData, &This->stateBlock->vertexShaderConstantB[start], cnt * sizeof(BOOL)); … … 3078 3085 iface, srcData, start, count); 3079 3086 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 } 3081 3092 3082 3093 memcpy(&This->updateStateBlock->vertexShaderConstantI[start * 4], srcData, cnt * sizeof(int) * 4); … … 3107 3118 3108 3119 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); 3109 3122 return WINED3DERR_INVALIDCALL; 3123 } 3110 3124 3111 3125 memcpy(dstData, &This->stateBlock->vertexShaderConstantI[start * 4], cnt * sizeof(int) * 4); … … 3127 3141 /* Specifically test start > limit to catch MAX_UINT overflows when adding start + count */ 3128 3142 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); 3129 3145 return WINED3DERR_INVALIDCALL; 3146 } 3130 3147 3131 3148 memcpy(&This->updateStateBlock->vertexShaderConstantF[start * 4], srcData, count * sizeof(float) * 4); … … 3161 3178 3162 3179 if (dstData == NULL || cnt < 0) 3180 { 3181 ERR("incorrect vertex shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count); 3163 3182 return WINED3DERR_INVALIDCALL; 3183 } 3164 3184 3165 3185 memcpy(dstData, &This->stateBlock->vertexShaderConstantF[start * 4], cnt * sizeof(float) * 4); … … 3430 3450 iface, srcData, start, count); 3431 3451 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 } 3433 3457 3434 3458 memcpy(&This->updateStateBlock->pixelShaderConstantB[start], srcData, cnt * sizeof(BOOL)); … … 3458 3482 3459 3483 if (dstData == NULL || cnt < 0) 3484 { 3485 ERR("incorrect pixel shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count); 3460 3486 return WINED3DERR_INVALIDCALL; 3487 } 3461 3488 3462 3489 memcpy(dstData, &This->stateBlock->pixelShaderConstantB[start], cnt * sizeof(BOOL)); … … 3476 3503 iface, srcData, start, count); 3477 3504 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 } 3479 3510 3480 3511 memcpy(&This->updateStateBlock->pixelShaderConstantI[start * 4], srcData, cnt * sizeof(int) * 4); … … 3505 3536 3506 3537 if (dstData == NULL || cnt < 0) 3538 { 3539 ERR("incorrect pixel shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count); 3507 3540 return WINED3DERR_INVALIDCALL; 3541 } 3508 3542 3509 3543 memcpy(dstData, &This->stateBlock->pixelShaderConstantI[start * 4], cnt * sizeof(int) * 4); … … 3525 3559 /* Specifically test start > limit to catch MAX_UINT overflows when adding start + count */ 3526 3560 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); 3527 3563 return WINED3DERR_INVALIDCALL; 3564 } 3528 3565 3529 3566 memcpy(&This->updateStateBlock->pixelShaderConstantF[start * 4], srcData, count * sizeof(float) * 4); … … 3559 3596 3560 3597 if (dstData == NULL || cnt < 0) 3598 { 3599 ERR("incorrect pixel shader const data: start(%u), dstData(0x%p), count(%u)", start, dstData, count); 3561 3600 return WINED3DERR_INVALIDCALL; 3601 } 3562 3602 3563 3603 memcpy(dstData, &This->stateBlock->pixelShaderConstantF[start * 4], cnt * sizeof(float) * 4);
Note:
See TracChangeset
for help on using the changeset viewer.