Changeset 27091 in vbox for trunk/src/VBox/HostServices/SharedOpenGL/unpacker
- Timestamp:
- Mar 5, 2010 2:13:31 PM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 58419
- Location:
- trunk/src/VBox/HostServices/SharedOpenGL/unpacker
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_drawpixels.c
r27088 r27091 14 14 GLenum format = READ_DATA( sizeof( int ) + 8, GLenum ); 15 15 GLenum type = READ_DATA( sizeof( int ) + 12, GLenum ); 16 GLvoid *pixels = DATA_POINTER( sizeof( int ) + 16, GLvoid ); 16 GLint noimagedata = READ_DATA( sizeof( int ) + 16, GLint ); 17 GLvoid *pixels; 18 19 if (noimagedata) 20 pixels = (void*) READ_DATA( sizeof( int ) + 20, uintptr_t); 21 else 22 pixels = DATA_POINTER( sizeof( int ) + 24, GLvoid ); 17 23 18 24 cr_unpackDispatch.PixelStorei( GL_UNPACK_ROW_LENGTH, 0 ); … … 34 40 GLfloat xmove = READ_DATA( sizeof( int ) + 16, GLfloat ); 35 41 GLfloat ymove = READ_DATA( sizeof( int ) + 20, GLfloat ); 36 GLuint is_null= READ_DATA( sizeof( int ) + 24, GLuint );37 GLubyte *bitmap = NULL;42 GLuint noimagedata = READ_DATA( sizeof( int ) + 24, GLuint ); 43 GLubyte *bitmap; 38 44 39 if ( !is_null)40 {41 bitmap = DATA_POINTER( sizeof(int) + 28, GLubyte );42 }45 if (noimagedata) 46 bitmap = (void*) READ_DATA(sizeof(int) + 28, uintptr_t); 47 else 48 bitmap = DATA_POINTER( sizeof(int) + 32, GLubyte ); 43 49 44 50 cr_unpackDispatch.PixelStorei( GL_UNPACK_ROW_LENGTH, 0 ); -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_misc.c
r21845 r27091 9 9 void crUnpackExtendChromiumParametervCR( void ) 10 10 { 11 12 13 14 11 GLenum target = READ_DATA( 8, GLenum ); 12 GLenum type = READ_DATA( 12, GLenum ); 13 GLsizei count = READ_DATA( 16, GLsizei ); 14 GLvoid *values = DATA_POINTER( 20, GLvoid ); 15 15 16 16 cr_unpackDispatch.ChromiumParametervCR(target, type, count, values); 17 17 18 18 19 20 21 19 /* 20 INCR_VAR_PTR(); 21 */ 22 22 } 23 23 24 24 void crUnpackExtendDeleteQueriesARB(void) 25 25 { 26 26 GLsizei n = READ_DATA( 8, GLsizei ); 27 27 const GLuint *ids = DATA_POINTER(12, GLuint); 28 28 cr_unpackDispatch.DeleteQueriesARB(n, ids); 29 29 } 30 31 void crUnpackExtendGetPolygonStipple(void) 32 { 33 GLubyte *mask; 34 35 SET_RETURN_PTR( 8 ); 36 SET_WRITEBACK_PTR( 16 ); 37 mask = DATA_POINTER(8, GLubyte); 38 39 cr_unpackDispatch.GetPolygonStipple( mask ); 40 } 41 42 void crUnpackExtendGetPixelMapfv(void) 43 { 44 GLenum map = READ_DATA( 8, GLenum ); 45 GLfloat *values; 46 47 SET_RETURN_PTR( 12 ); 48 SET_WRITEBACK_PTR( 20 ); 49 values = DATA_POINTER(12, GLfloat); 50 51 cr_unpackDispatch.GetPixelMapfv( map, values ); 52 } 53 54 void crUnpackExtendGetPixelMapuiv(void) 55 { 56 GLenum map = READ_DATA( 8, GLenum ); 57 GLuint *values; 58 59 SET_RETURN_PTR( 12 ); 60 SET_WRITEBACK_PTR( 20 ); 61 values = DATA_POINTER(12, GLuint); 62 63 cr_unpackDispatch.GetPixelMapuiv( map, values ); 64 } 65 66 void crUnpackExtendGetPixelMapusv(void) 67 { 68 GLenum map = READ_DATA( 8, GLenum ); 69 GLushort *values; 70 71 SET_RETURN_PTR( 12 ); 72 SET_WRITEBACK_PTR( 20 ); 73 values = DATA_POINTER(12, GLushort); 74 75 cr_unpackDispatch.GetPixelMapusv( map, values ); 76 } -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_pixelmap.c
r27074 r27091 11 11 GLenum map = READ_DATA( sizeof( int ) + 0, GLenum ); 12 12 GLsizei mapsize = READ_DATA( sizeof( int ) + 4, GLsizei ); 13 GLfloat *values = DATA_POINTER( sizeof( int ) + 8, GLfloat ); 13 int nodata = READ_DATA( sizeof(int) + 8, int); 14 GLfloat *values; 15 16 if (nodata) 17 values = (GLfloat*) READ_DATA(sizeof(int) + 12, uintptr_t); 18 else 19 values = DATA_POINTER( sizeof( int ) + 16, GLfloat ); 14 20 15 21 cr_unpackDispatch.PixelMapfv( map, mapsize, values ); … … 21 27 GLenum map = READ_DATA( sizeof( int ) + 0, GLenum ); 22 28 GLsizei mapsize = READ_DATA( sizeof( int ) + 4, GLsizei ); 23 GLuint *values = DATA_POINTER( sizeof( int ) + 8, GLuint ); 29 int nodata = READ_DATA( sizeof(int) + 8, int); 30 GLuint *values; 31 32 if (nodata) 33 values = (GLuint*) READ_DATA(sizeof(int) + 12, uintptr_t); 34 else 35 values = DATA_POINTER( sizeof( int ) + 16, GLuint ); 24 36 25 37 cr_unpackDispatch.PixelMapuiv( map, mapsize, values ); … … 31 43 GLenum map = READ_DATA( sizeof( int ) + 0, GLenum ); 32 44 GLsizei mapsize = READ_DATA( sizeof( int ) + 4, GLsizei ); 33 GLushort *values = DATA_POINTER( sizeof( int ) + 8, GLushort ); 45 int nodata = READ_DATA( sizeof(int) + 8, int); 46 GLushort *values; 47 48 if (nodata) 49 values = (GLushort*) READ_DATA(sizeof(int) + 12, uintptr_t); 50 else 51 values = DATA_POINTER( sizeof( int ) + 16, GLushort ); 34 52 35 53 cr_unpackDispatch.PixelMapusv( map, mapsize, values ); -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_readpixels.c
r15532 r27091 43 43 cr_unpackDispatch.ReadPixels( x, y, width, height, format, type, pixels); 44 44 45 INCR_ VAR_PTR();45 INCR_DATA_PTR(48+sizeof(CRNetworkPointer)); 46 46 } -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_stipple.c
r15532 r27091 9 9 void crUnpackPolygonStipple( void ) 10 10 { 11 GLubyte *mask = DATA_POINTER( 0, GLubyte ); 11 int nodata = READ_DATA(0, int); 12 GLubyte *mask; 12 13 13 cr_unpackDispatch.PolygonStipple( mask ); 14 INCR_DATA_PTR( 32*32/8 ); 14 if (nodata) 15 mask = (void*) READ_DATA(4, uintptr_t); 16 else 17 mask = DATA_POINTER( 4, GLubyte ); 18 19 cr_unpackDispatch.PolygonStipple(mask); 20 21 if (nodata) 22 INCR_DATA_PTR(8); 23 else 24 INCR_DATA_PTR(4 + 32*32/8); 15 25 } -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_texture.c
r27088 r27091 23 23 GLenum format = READ_DATA( sizeof( int ) + 28, GLenum ); 24 24 GLenum type = READ_DATA( sizeof( int ) + 32, GLenum ); 25 int is_null = READ_DATA( sizeof( int ) + 36, int ); 26 GLvoid *pixels; 27 28 if ( is_null ) 29 pixels = NULL; 30 else 31 pixels = DATA_POINTER( sizeof( int ) + 40, GLvoid ); 25 int noimagedata = READ_DATA( sizeof( int ) + 36, int ); 26 GLvoid *pixels; 27 28 /*If there's no imagedata send, it's either that passed pointer was NULL or 29 there was GL_PIXEL_UNPACK_BUFFER_ARB bound, in both cases 4bytes of passed 30 pointer would convert to either NULL or offset in the bound buffer. 31 */ 32 if ( noimagedata ) 33 pixels = (void*) READ_DATA(sizeof(int)+40, uintptr_t); 34 else 35 pixels = DATA_POINTER( sizeof( int ) + 44, GLvoid ); 32 36 33 37 cr_unpackDispatch.TexImage3DEXT(target, level, internalformat, width, … … 50 54 GLenum format = READ_DATA( sizeof( int ) + 28, GLenum ); 51 55 GLenum type = READ_DATA( sizeof( int ) + 32, GLenum ); 52 int is_null= READ_DATA( sizeof( int ) + 36, int );56 int noimagedata = READ_DATA( sizeof( int ) + 36, int ); 53 57 GLvoid *pixels; 54 58 55 if ( is_null)56 pixels = NULL;57 else 58 pixels = DATA_POINTER( sizeof( int ) + 4 0, GLvoid );59 if ( noimagedata ) 60 pixels = (void*) READ_DATA(sizeof(int)+40, uintptr_t); 61 else 62 pixels = DATA_POINTER( sizeof( int ) + 44, GLvoid ); 59 63 60 64 cr_unpackDispatch.TexImage3D( target, level, internalformat, width, height, … … 74 78 GLenum format = READ_DATA( sizeof( int ) + 24, GLenum ); 75 79 GLenum type = READ_DATA( sizeof( int ) + 28, GLenum ); 76 int is_null= READ_DATA( sizeof( int ) + 32, int );77 GLvoid *pixels; 78 79 if ( is_null)80 pixels = NULL;80 int noimagedata = READ_DATA( sizeof( int ) + 32, int ); 81 GLvoid *pixels; 82 83 if ( noimagedata ) 84 pixels = (void*) READ_DATA(sizeof(int)+36, uintptr_t); 81 85 else 82 pixels = DATA_POINTER( sizeof( int ) + 36, GLvoid );86 pixels = DATA_POINTER( sizeof( int ) + 40, GLvoid ); 83 87 84 88 cr_unpackDispatch.TexImage2D( target, level, internalformat, width, height, … … 96 100 GLenum format = READ_DATA( sizeof( int ) + 20, GLenum ); 97 101 GLenum type = READ_DATA( sizeof( int ) + 24, GLenum ); 98 int is_null= READ_DATA( sizeof( int ) + 28, int );99 GLvoid *pixels; 100 101 if ( is_null)102 pixels = NULL;102 int noimagedata = READ_DATA( sizeof( int ) + 28, int ); 103 GLvoid *pixels; 104 105 if ( noimagedata ) 106 pixels = (void*) READ_DATA(sizeof(int)+32, uintptr_t); 103 107 else 104 pixels = DATA_POINTER( sizeof( int ) + 3 2, GLvoid );108 pixels = DATA_POINTER( sizeof( int ) + 36, GLvoid ); 105 109 106 110 cr_unpackDispatch.TexImage1D( target, level, internalformat, width, border, … … 183 187 GLenum format = READ_DATA( sizeof( int ) + 32, GLenum ); 184 188 GLenum type = READ_DATA( sizeof( int ) + 36, GLenum ); 185 GLvoid *pixels = DATA_POINTER( sizeof( int ) + 40, GLvoid ); 189 int noimagedata = READ_DATA( sizeof( int ) + 40, int ); 190 GLvoid *pixels; 191 192 if ( noimagedata ) 193 pixels = (void*) READ_DATA(sizeof(int)+44, uintptr_t); 194 else 195 pixels = DATA_POINTER( sizeof( int ) + 48, GLvoid ); 186 196 187 197 cr_unpackDispatch.PixelStorei( GL_UNPACK_ROW_LENGTH, 0 ); … … 206 216 GLenum format = READ_DATA( sizeof( int ) + 24, GLenum ); 207 217 GLenum type = READ_DATA( sizeof( int ) + 28, GLenum ); 208 GLvoid *pixels = DATA_POINTER( sizeof( int ) + 32, GLvoid ); 218 int noimagedata = READ_DATA( sizeof( int ) + 32, int ); 219 GLvoid *pixels; 220 221 if ( noimagedata ) 222 pixels = (void*) READ_DATA(sizeof(int)+36, uintptr_t); 223 else 224 pixels = DATA_POINTER( sizeof( int ) + 40, GLvoid ); 209 225 210 226 cr_unpackDispatch.PixelStorei( GL_UNPACK_ROW_LENGTH, 0 ); … … 226 242 GLenum format = READ_DATA( sizeof( int ) + 16, GLenum ); 227 243 GLenum type = READ_DATA( sizeof( int ) + 20, GLenum ); 228 GLvoid *pixels = DATA_POINTER( sizeof( int ) + 24, GLvoid ); 244 int noimagedata = READ_DATA( sizeof( int ) + 24, int ); 245 GLvoid *pixels; 246 247 if ( noimagedata ) 248 pixels = (void*) READ_DATA(sizeof(int)+28, uintptr_t); 249 else 250 pixels = DATA_POINTER( sizeof( int ) + 32, GLvoid ); 229 251 230 252 cr_unpackDispatch.PixelStorei( GL_UNPACK_ROW_LENGTH, 0 ); … … 317 339 GLint border = READ_DATA( 4 + sizeof(int) + 24, GLint ); 318 340 GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 28, GLsizei ); 319 int is_null= READ_DATA( 4 + sizeof(int) + 32, int );341 int noimagedata = READ_DATA( 4 + sizeof(int) + 32, int ); 320 342 GLvoid *pixels; 321 343 322 if( is_null)323 pixels = NULL;324 else 325 pixels = DATA_POINTER( 4 + sizeof(int) + 36, GLvoid );344 if( noimagedata ) 345 pixels = (void*) READ_DATA(4+sizeof(int)+36, uintptr_t); 346 else 347 pixels = DATA_POINTER( 4 + sizeof(int) + 40, GLvoid ); 326 348 327 349 cr_unpackDispatch.CompressedTexImage3DARB(target, level, internalformat, … … 340 362 GLint border = READ_DATA( 4 + sizeof( int ) + 20, GLint ); 341 363 GLsizei imagesize = READ_DATA( 4 + sizeof( int ) + 24, GLsizei ); 342 int is_null= READ_DATA( 4 + sizeof( int ) + 28, int );343 GLvoid *pixels; 344 345 if ( is_null)346 pixels = NULL;347 else 348 pixels = DATA_POINTER( 4 + sizeof( int ) + 3 2, GLvoid );364 int noimagedata = READ_DATA( 4 + sizeof( int ) + 28, int ); 365 GLvoid *pixels; 366 367 if ( noimagedata ) 368 pixels = (void*) READ_DATA(4+sizeof(int)+32, uintptr_t); 369 else 370 pixels = DATA_POINTER( 4 + sizeof( int ) + 36, GLvoid ); 349 371 350 372 cr_unpackDispatch.CompressedTexImage2DARB( target, level, internalformat, … … 362 384 GLint border = READ_DATA( 4 + sizeof(int) + 16, GLint ); 363 385 GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 20, GLsizei ); 364 int is_null= READ_DATA( 4 + sizeof(int) + 24, int );386 int noimagedata = READ_DATA( 4 + sizeof(int) + 24, int ); 365 387 GLvoid *pixels; 366 388 367 if( is_null)368 pixels = NULL;369 else 370 pixels = DATA_POINTER( 4 + sizeof(int) + 28, GLvoid );389 if( noimagedata ) 390 pixels = (void*) READ_DATA(4+sizeof(int)+28, uintptr_t); 391 else 392 pixels = DATA_POINTER( 4 + sizeof(int) + 32, GLvoid ); 371 393 372 394 cr_unpackDispatch.CompressedTexImage1DARB(target, level, internalformat, … … 387 409 GLenum format = READ_DATA( 4 + sizeof(int) + 32, GLenum ); 388 410 GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 36, GLsizei ); 389 int is_null= READ_DATA( 4 + sizeof(int) + 40, int );411 int noimagedata = READ_DATA( 4 + sizeof(int) + 40, int ); 390 412 GLvoid *pixels; 391 413 392 if( is_null)393 pixels = NULL;394 else 395 pixels = DATA_POINTER( 4 + sizeof(int) + 4 4, GLvoid );414 if( noimagedata ) 415 pixels = (void*) READ_DATA(4+sizeof(int)+44, uintptr_t); 416 else 417 pixels = DATA_POINTER( 4 + sizeof(int) + 48, GLvoid ); 396 418 397 419 cr_unpackDispatch.CompressedTexSubImage3DARB(target, level, xoffset, … … 412 434 GLenum format = READ_DATA( 4 + sizeof(int) + 24, GLenum ); 413 435 GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 28, GLsizei ); 414 int is_null= READ_DATA( 4 + sizeof(int) + 32, int );436 int noimagedata = READ_DATA( 4 + sizeof(int) + 32, int ); 415 437 GLvoid *pixels; 416 438 417 if( is_null)418 pixels = NULL;419 else 420 pixels = DATA_POINTER( 4 + sizeof(int) + 36, GLvoid );439 if( noimagedata ) 440 pixels = (void*) READ_DATA(4+sizeof(int)+36, uintptr_t); 441 else 442 pixels = DATA_POINTER( 4 + sizeof(int) + 40, GLvoid ); 421 443 422 444 cr_unpackDispatch.CompressedTexSubImage2DARB(target, level, xoffset, … … 434 456 GLenum format = READ_DATA( 4 + sizeof(int) + 16, GLenum ); 435 457 GLsizei imagesize = READ_DATA( 4 + sizeof(int) + 20, GLsizei ); 436 int is_null= READ_DATA( 4 + sizeof(int) + 24, int );458 int noimagedata = READ_DATA( 4 + sizeof(int) + 24, int ); 437 459 GLvoid *pixels; 438 460 439 if( is_null)440 pixels = NULL;441 else 442 pixels = DATA_POINTER( 4 + sizeof(int) + 28, GLvoid );461 if( noimagedata ) 462 pixels = (void*) READ_DATA(4+sizeof(int)+28, uintptr_t); 463 else 464 pixels = DATA_POINTER( 4 + sizeof(int) + 32, GLvoid ); 443 465 444 466 cr_unpackDispatch.CompressedTexSubImage1DARB(target, level, xoffset, width, 445 467 format, imagesize, pixels); 446 468 } 469 470 void crUnpackExtendGetTexImage(void) 471 { 472 GLenum target = READ_DATA( 8, GLenum ); 473 GLint level = READ_DATA( 12, GLint ); 474 GLenum format = READ_DATA( 16, GLenum ); 475 GLenum type = READ_DATA( 20, GLenum ); 476 GLvoid *pixels; 477 478 SET_RETURN_PTR(24); 479 SET_WRITEBACK_PTR(32); 480 pixels = DATA_POINTER(24, GLvoid); 481 482 cr_unpackDispatch.GetTexImage(target, level, format, type, pixels); 483 } 484 485 void crUnpackExtendGetCompressedTexImageARB(void) 486 { 487 GLenum target = READ_DATA( 8, GLenum ); 488 GLint level = READ_DATA( 12, GLint ); 489 GLvoid *img; 490 491 SET_RETURN_PTR( 16 ); 492 SET_WRITEBACK_PTR( 24 ); 493 img = DATA_POINTER(16, GLvoid); 494 495 cr_unpackDispatch.GetCompressedTexImageARB( target, level, img ); 496 } -
trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpacker_special
r23399 r27091 169 169 UnlockArraysEXT 170 170 GetUniformsLocations 171 GetTexImage 172 GetCompressedTexImageARB 173 GetPolygonStipple 174 GetPixelMapfv 175 GetPixelMapuiv 176 GetPixelMapusv
Note:
See TracChangeset
for help on using the changeset viewer.