VirtualBox

Ignore:
Timestamp:
Jan 16, 2018 4:26:58 PM (7 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
120311
Message:

3D: SharedOpenGL code cleanup, bugref:9043

Location:
trunk/src/VBox/HostServices/SharedOpenGL/unpacker
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_stipple.c

    r69390 r70601  
    1010{
    1111    int nodata = READ_DATA(0, int);
    12     GLubyte *mask;
    1312
    1413    if (nodata)
    15         mask = (void*) (uintptr_t) READ_DATA(4, GLint);
     14    {
     15        crError("crUnpackPolygonStipple: GL_PIXEL_UNPACK_BUFFER is not supported");
     16        INCR_DATA_PTR(8);
     17    }
    1618    else
    17         mask = DATA_POINTER( 4, GLubyte );
     19    {
     20        GLubyte *mask;
    1821
    19     cr_unpackDispatch.PolygonStipple(mask);
    20 
    21     if (nodata)
    22         INCR_DATA_PTR(8);
    23     else
    24         INCR_DATA_PTR(4 + 32*32/8);
     22        mask = DATA_POINTER(4, GLubyte);
     23        cr_unpackDispatch.PolygonStipple(mask);
     24        // Stipple mask consists of 32 * 32 bits
     25        INCR_DATA_PTR(4 + 32 * 32 / 8);
     26    }
    2527}
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_texture.c

    r69390 r70601  
    290290    unsigned int n_param = READ_DATA( 0, int ) - ( sizeof(int) + 8 );
    291291
    292     if ( n_param > sizeof(params) )
    293         crError( "crUnpackTexGendv: n_param=%d, expected <= %d\n", n_param,
    294                  (unsigned int)sizeof(params) );
     292    if (n_param > sizeof(params))
     293    {
     294        crError("crUnpackTexGendv: n_param=%d, expected <= %d\n", n_param,
     295            (unsigned int)sizeof(params));
     296        return;
     297    }
     298
    295299    crMemcpy( params, DATA_POINTER( sizeof( int ) + 8, GLdouble ), n_param );
    296300
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette