VirtualBox

Ignore:
Timestamp:
Oct 26, 2010 5:23:54 PM (14 years ago)
Author:
vboxsync
Message:

crOpenGL/wddm: multithreading fix

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/GuestHost/OpenGL/packer/pack_matrices.c

    r33457 r33475  
    1010void PACK_APIENTRY crPackMultMatrixd( const GLdouble *m )
    1111{
    12     GET_PACKER_CONTEXT(pc);
    13     unsigned char *data_ptr;
    14     int packet_length = 16*sizeof( *m );
    15     GET_BUFFERED_POINTER(pc, packet_length );
     12    CR_GET_PACKER_CONTEXT(pc);
     13    unsigned char *data_ptr;
     14    int packet_length = 16*sizeof( *m );
     15    CR_GET_BUFFERED_POINTER(pc, packet_length );
    1616    WRITE_DOUBLE( 0*sizeof(double), m[ 0] );
    1717    WRITE_DOUBLE( 1*sizeof(double), m[ 1] );
     
    3131    WRITE_DOUBLE( 15*sizeof(double), m[15] );
    3232    WRITE_OPCODE( pc, CR_MULTMATRIXD_OPCODE );
     33    CR_UNLOCK_PACKER_CONTEXT(pc);
    3334}
    3435
    3536void PACK_APIENTRY crPackMultMatrixf( const GLfloat *m )
    3637{
    37     GET_PACKER_CONTEXT(pc);
    38     unsigned char *data_ptr;
    39     int packet_length = 16*sizeof( *m );
    40     GET_BUFFERED_POINTER(pc, packet_length );
     38    CR_GET_PACKER_CONTEXT(pc);
     39    unsigned char *data_ptr;
     40    int packet_length = 16*sizeof( *m );
     41    CR_GET_BUFFERED_POINTER(pc, packet_length );
    4142    WRITE_DATA( 0*sizeof(GLfloat), GLfloat, m[ 0] );
    4243    WRITE_DATA( 1*sizeof(GLfloat), GLfloat, m[ 1] );
     
    5657    WRITE_DATA( 15*sizeof(GLfloat), GLfloat, m[15] );
    5758    WRITE_OPCODE( pc, CR_MULTMATRIXF_OPCODE );
     59    CR_UNLOCK_PACKER_CONTEXT(pc);
    5860}
    5961
    6062void PACK_APIENTRY crPackLoadMatrixd( const GLdouble *m )
    6163{
    62     GET_PACKER_CONTEXT(pc);
    63     unsigned char *data_ptr;
    64     int packet_length = 16*sizeof( *m );
    65     GET_BUFFERED_POINTER(pc, packet_length );
     64    CR_GET_PACKER_CONTEXT(pc);
     65    unsigned char *data_ptr;
     66    int packet_length = 16*sizeof( *m );
     67    CR_GET_BUFFERED_POINTER(pc, packet_length );
    6668    WRITE_DOUBLE( 0*sizeof(double), m[ 0] );
    6769    WRITE_DOUBLE( 1*sizeof(double), m[ 1] );
     
    8183    WRITE_DOUBLE( 15*sizeof(double), m[15] );
    8284    WRITE_OPCODE( pc, CR_LOADMATRIXD_OPCODE );
     85    CR_UNLOCK_PACKER_CONTEXT(pc);
    8386}
    8487
    8588void PACK_APIENTRY crPackLoadMatrixf( const GLfloat *m )
    8689{
    87     GET_PACKER_CONTEXT(pc);
    88     unsigned char *data_ptr;
    89     int packet_length = 16*sizeof( *m );
    90     GET_BUFFERED_POINTER(pc, packet_length );
     90    CR_GET_PACKER_CONTEXT(pc);
     91    unsigned char *data_ptr;
     92    int packet_length = 16*sizeof( *m );
     93    CR_GET_BUFFERED_POINTER(pc, packet_length );
    9194    WRITE_DATA( 0*sizeof(GLfloat), GLfloat, m[ 0] );
    9295    WRITE_DATA( 1*sizeof(GLfloat), GLfloat, m[ 1] );
     
    106109    WRITE_DATA( 15*sizeof(GLfloat), GLfloat, m[15] );
    107110    WRITE_OPCODE( pc, CR_LOADMATRIXF_OPCODE );
     111    CR_UNLOCK_PACKER_CONTEXT(pc);
    108112}
    109113
    110114void PACK_APIENTRY crPackMultTransposeMatrixdARB( const GLdouble *m )
    111115{
    112     GET_PACKER_CONTEXT(pc);
    113     unsigned char *data_ptr;
    114     int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum);
    115     GET_BUFFERED_POINTER(pc, packet_length );
     116    CR_GET_PACKER_CONTEXT(pc);
     117    unsigned char *data_ptr;
     118    int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum);
     119    CR_GET_BUFFERED_POINTER(pc, packet_length );
    116120    WRITE_DATA( 0, GLint, packet_length );
    117121    WRITE_DATA( 4, GLenum, CR_MULTTRANSPOSEMATRIXDARB_EXTEND_OPCODE );
     
    133137    WRITE_DOUBLE( 8 + 15*sizeof(double), m[15] );
    134138    WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
     139    CR_UNLOCK_PACKER_CONTEXT(pc);
    135140}
    136141
    137142void PACK_APIENTRY crPackMultTransposeMatrixfARB( const GLfloat *m )
    138143{
    139     GET_PACKER_CONTEXT(pc);
    140     unsigned char *data_ptr;
    141     int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum);
    142     GET_BUFFERED_POINTER(pc, packet_length );
     144    CR_GET_PACKER_CONTEXT(pc);
     145    unsigned char *data_ptr;
     146    int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum);
     147    CR_GET_BUFFERED_POINTER(pc, packet_length );
    143148    WRITE_DATA( 0, GLint, packet_length );
    144149    WRITE_DATA( 4, GLenum, CR_MULTTRANSPOSEMATRIXFARB_EXTEND_OPCODE );
     
    160165    WRITE_DATA( 8 + 15*sizeof(GLfloat), GLfloat, m[15] );
    161166    WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
     167    CR_UNLOCK_PACKER_CONTEXT(pc);
    162168}
    163169
    164170void PACK_APIENTRY crPackLoadTransposeMatrixdARB( const GLdouble *m )
    165171{
    166     GET_PACKER_CONTEXT(pc);
    167     unsigned char *data_ptr;
    168     int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum);
    169     GET_BUFFERED_POINTER(pc, packet_length );
     172    CR_GET_PACKER_CONTEXT(pc);
     173    unsigned char *data_ptr;
     174    int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum);
     175    CR_GET_BUFFERED_POINTER(pc, packet_length );
    170176    WRITE_DATA( 0, GLint, packet_length );
    171177    WRITE_DATA( 4, GLenum, CR_LOADTRANSPOSEMATRIXDARB_EXTEND_OPCODE );
     
    187193    WRITE_DOUBLE( 8 + 15*sizeof(double), m[15] );
    188194    WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
     195    CR_UNLOCK_PACKER_CONTEXT(pc);
    189196}
    190197
    191198void PACK_APIENTRY crPackLoadTransposeMatrixfARB( const GLfloat *m )
    192199{
    193     GET_PACKER_CONTEXT(pc);
    194     unsigned char *data_ptr;
    195     int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum);
    196     GET_BUFFERED_POINTER(pc, packet_length );
     200    CR_GET_PACKER_CONTEXT(pc);
     201    unsigned char *data_ptr;
     202    int packet_length = 16*sizeof( *m ) + sizeof(GLint) + sizeof(GLenum);
     203    CR_GET_BUFFERED_POINTER(pc, packet_length );
    197204    WRITE_DATA( 0, GLint, packet_length );
    198205    WRITE_DATA( 4, GLenum, CR_LOADTRANSPOSEMATRIXFARB_EXTEND_OPCODE );
     
    214221    WRITE_DATA( 8 + 15*sizeof(GLfloat), GLfloat, m[15] );
    215222    WRITE_OPCODE( pc, CR_EXTEND_OPCODE );
    216 }
     223    CR_UNLOCK_PACKER_CONTEXT(pc);
     224}
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