VirtualBox

Ignore:
Timestamp:
Mar 13, 2013 6:17:40 PM (12 years ago)
Author:
vboxsync
Message:

crOpenGL: shader/program state fixes; glDrawXxx-based blitting fixes, etc.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_glsl.c

    r44529 r45027  
    3030{
    3131    /*@todo?crStateShaderSource(shader...);*/
     32#ifdef DEBUG_misha
     33    GLenum err = cr_server.head_spu->dispatch_table.GetError();
     34#endif
    3235    cr_server.head_spu->dispatch_table.ShaderSource(crStateGetShaderHWID(shader), count, string, length);
     36#ifdef DEBUG_misha
     37    err = cr_server.head_spu->dispatch_table.GetError();
     38    CRASSERT(err == GL_NO_ERROR);
     39#endif
    3340}
    3441
    3542void SERVER_DISPATCH_APIENTRY crServerDispatchCompileShader(GLuint shader)
    3643{
     44#ifdef DEBUG_misha
     45    GLint iCompileStatus = GL_FALSE;
     46#endif
    3747    crStateCompileShader(shader);
    3848    cr_server.head_spu->dispatch_table.CompileShader(crStateGetShaderHWID(shader));
     49#ifdef DEBUG_misha
     50    cr_server.head_spu->dispatch_table.GetShaderiv(crStateGetShaderHWID(shader), GL_COMPILE_STATUS, &iCompileStatus);
     51    Assert(iCompileStatus == GL_TRUE);
     52#endif
    3953}
    4054
     
    97111void SERVER_DISPATCH_APIENTRY crServerDispatchDeleteObjectARB(GLhandleARB obj)
    98112{
    99     GLuint hwid = crStateGetProgramHWID(obj);
    100 
    101     if (!hwid)
    102     {
    103         hwid = crStateGetShaderHWID(obj);
    104         CRASSERT(hwid);
    105         crStateDeleteShader(obj);
    106     }
    107     else
    108     {
    109         crStateDeleteProgram(obj);
    110     }
     113    GLuint hwid =  crStateDeleteObjectARB(obj);
    111114
    112115    if (hwid)
    113116        cr_server.head_spu->dispatch_table.DeleteObjectARB(hwid);
     117    else
     118        crWarning("zero hwid for object %d", obj);
    114119}
    115120
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