Changeset 78875 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/unpacker
- Timestamp:
- May 30, 2019 11:39:41 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_texture.cpp
r78820 r78875 38 38 else 39 39 { 40 size_t cbImg = cr ImageSize(format, type, width, height);40 size_t cbImg = crTextureSize(format, type, width, height, depth); 41 41 if (RT_UNLIKELY(cbImg == 0)) 42 42 { … … 77 77 else 78 78 { 79 size_t cbImg = cr ImageSize(format, type, width, height);79 size_t cbImg = crTextureSize(format, type, width, height, depth); 80 80 if (RT_UNLIKELY(cbImg == 0)) 81 81 { … … 322 322 else 323 323 { 324 size_t cbImg = crImageSize(format, type, width, height); 325 if (RT_UNLIKELY(cbImg == 0)) 324 /* 325 * Specifying a sub texture with zero width, height or depth is not an 326 * error but has no effect. 327 * See: https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTexSubImage3D.xml 328 */ 329 size_t cbImg = crTextureSize(format, type, width, height, depth); 330 if (RT_UNLIKELY( cbImg == 0 331 && width != 0 332 && height != 0 333 && depth != 0)) 326 334 { 327 335 pState->rcUnpack = VERR_INVALID_PARAMETER; … … 366 374 else 367 375 { 376 /* 377 * Specifying a sub texture with zero width, height or depth is not an 378 * error but has no effect. 379 * See: https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTexSubImage2D.xml 380 */ 368 381 size_t cbImg = crImageSize(format, type, width, height); 369 if (RT_UNLIKELY(cbImg == 0)) 382 if (RT_UNLIKELY( cbImg == 0 383 && width != 0 384 && height != 0)) 370 385 { 371 386 pState->rcUnpack = VERR_INVALID_PARAMETER; … … 404 419 else 405 420 { 421 /* 422 * Specifying a sub texture with zero width, height or depth is not an 423 * error but has no effect. 424 * See: https://www.khronos.org/registry/OpenGL-Refpages/gl2.1/xhtml/glTexSubImage1D.xml 425 */ 406 426 size_t cbImg = crImageSize(format, type, width, 1); 407 if (RT_UNLIKELY(cbImg == 0)) 427 if (RT_UNLIKELY( cbImg == 0 428 && width != 0)) 408 429 { 409 430 pState->rcUnpack = VERR_INVALID_PARAMETER;
Note:
See TracChangeset
for help on using the changeset viewer.