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_lights.c

    r33457 r33475  
    1010static GLboolean __handleLightData( GLenum light, GLenum pname, const GLfloat *params )
    1111{
    12     GET_PACKER_CONTEXT(pc);
     12    CR_GET_PACKER_CONTEXT(pc);
    1313    unsigned int packet_length = sizeof( int ) + sizeof( light ) + sizeof( pname );
    1414    unsigned int params_length = 0;
     
    3838    }
    3939    packet_length += params_length;
    40     GET_BUFFERED_POINTER(pc, packet_length );
     40    CR_GET_BUFFERED_POINTER(pc, packet_length );
    4141    WRITE_DATA( 0, int, packet_length );
    4242    WRITE_DATA( sizeof( int ) + 0, GLenum, light );
     
    5757void PACK_APIENTRY crPackLightfv (GLenum light, GLenum pname, const GLfloat *params)
    5858{
    59     GET_PACKER_CONTEXT(pc);
     59    CR_GET_PACKER_CONTEXT(pc);
    6060    if (__handleLightData( light, pname, params ))
    6161        WRITE_OPCODE( pc, CR_LIGHTFV_OPCODE );
     62    CR_UNLOCK_PACKER_CONTEXT(pc);
    6263}
    6364
     
    6566{
    6667    /* floats and ints are the same size, so the packing should be the same */
    67     GET_PACKER_CONTEXT(pc);
     68    CR_GET_PACKER_CONTEXT(pc);
    6869    if (__handleLightData( light, pname, (const GLfloat *) params ))
    6970        WRITE_OPCODE( pc, CR_LIGHTIV_OPCODE );
     71    CR_UNLOCK_PACKER_CONTEXT(pc);
    7072}
    7173
    7274static GLboolean __handleLightModelData( GLenum pname, const GLfloat *params )
    7375{
    74     GET_PACKER_CONTEXT(pc);
     76    CR_GET_PACKER_CONTEXT(pc);
    7577    unsigned int packet_length = sizeof( int ) + sizeof( pname );
    7678    unsigned int params_length = 0;
     
    9193    }
    9294    packet_length += params_length;
    93     GET_BUFFERED_POINTER(pc, packet_length );
     95    CR_GET_BUFFERED_POINTER(pc, packet_length );
    9496    WRITE_DATA( 0, int, packet_length );
    9597    WRITE_DATA( sizeof( int ) + 0, GLenum, pname );
     
    106108void PACK_APIENTRY crPackLightModelfv (GLenum pname, const GLfloat *params)
    107109{
    108     GET_PACKER_CONTEXT(pc);
     110    CR_GET_PACKER_CONTEXT(pc);
    109111    if (__handleLightModelData( pname, params ))
    110112        WRITE_OPCODE( pc, CR_LIGHTMODELFV_OPCODE );
     113    CR_UNLOCK_PACKER_CONTEXT(pc);
    111114}
    112115
     
    114117{
    115118    /* floats and ints are the same size, so the packing should be the same */
    116     GET_PACKER_CONTEXT(pc);
     119    CR_GET_PACKER_CONTEXT(pc);
    117120    if (__handleLightModelData( pname, (const GLfloat *) params ))
    118121        WRITE_OPCODE( pc, CR_LIGHTMODELIV_OPCODE );
     122    CR_UNLOCK_PACKER_CONTEXT(pc);
    119123}
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