VirtualBox

Changeset 23399 in vbox for trunk/src/VBox/HostServices


Ignore:
Timestamp:
Sep 29, 2009 5:04:38 AM (15 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
52936
Message:

crOpenGL: cache uniforms info

Location:
trunk/src/VBox/HostServices/SharedOpenGL
Files:
4 edited

Legend:

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

    r23275 r23399  
    177177        crServerReturnValue(&zero, sizeof(zero));
    178178    }
    179     cr_server.head_spu->dispatch_table.GetShaderSource(crStateGetShaderHWID(shader), bufSize, pLocal, (char*)pLocal+1);
    180     crServerReturnValue(pLocal, (*pLocal)+1+sizeof(GLsizei));
     179    cr_server.head_spu->dispatch_table.GetShaderSource(crStateGetShaderHWID(shader), bufSize, pLocal, (char*)&pLocal[1]);
     180    crServerReturnValue(pLocal, (*pLocal)+1+sizeof(GLsizei));
     181    crFree(pLocal);
     182}
     183
     184void SERVER_DISPATCH_APIENTRY
     185crServerDispatchGetUniformsLocations(GLuint program, GLsizei maxcbData, GLsizei * cbData, GLvoid * pData)
     186{
     187    GLsizei *pLocal;
     188
     189    (void) cbData;
     190    (void) pData;
     191
     192    pLocal = (GLsizei*) crAlloc(maxcbData+sizeof(GLsizei));
     193    if (!pLocal)
     194    {
     195        GLsizei zero=0;
     196        crServerReturnValue(&zero, sizeof(zero));
     197    }
     198   
     199    crStateGLSLProgramCacheUniforms(program, maxcbData, pLocal, (char*)&pLocal[1]);
     200
     201    crServerReturnValue(pLocal, (*pLocal)+sizeof(GLsizei));
    181202    crFree(pLocal);
    182203}
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_special

    r23274 r23399  
    219219BindAttribLocation
    220220DeleteObjectARB
     221GetUniformsLocations
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c

    r22535 r23399  
    262262    cr_unpackDispatch.GetUniformLocation(program, name);
    263263}
     264
     265void crUnpackExtendGetUniformsLocations(void)
     266{
     267        GLuint program = READ_DATA(8, GLuint);
     268        GLsizei maxcbData = READ_DATA(12, GLsizei);
     269        SET_RETURN_PTR(16);
     270        SET_WRITEBACK_PTR(24);
     271        cr_unpackDispatch.GetUniformsLocations(program, maxcbData, NULL, NULL);
     272}
  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpacker_special

    r22284 r23399  
    168168LockArraysEXT
    169169UnlockArraysEXT
     170GetUniformsLocations
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