VirtualBox

Ignore:
Timestamp:
Jan 9, 2014 4:13:28 PM (11 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
91522
Message:

crOpenGL: crOpenGL: 1. workaround point sprite driver bugs; 2. workaround multi-string shader source driver bug; 3. proper GLhandle for OSX; 4. extended dumping; 5. misc fixes

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/src/VBox

  • trunk/src/VBox/HostServices/SharedOpenGL/unpacker/unpack_shaders.c

    r44529 r50041  
    4040    GLint hasNonLocalLen = READ_DATA(16, GLsizei);
    4141    GLint *pLocalLength = DATA_POINTER(20, GLint);
    42     const char **ppStrings = NULL;
    43     GLsizei i;
     42    char **ppStrings = NULL;
     43    GLsizei i, j, jUpTo;
    4444    int pos=20+count*sizeof(*pLocalLength);
    4545
     
    6161            pLocalLength[i] -= 1;
    6262        }
     63
     64        Assert(pLocalLength[i] > 0);
     65        jUpTo = i == count -1 ? pLocalLength[i] - 1 : pLocalLength[i];
     66        for (j = 0; j < jUpTo; ++j)
     67        {
     68            char *pString = ppStrings[i];
     69
     70            if (pString[j] == '\0')
     71            {
     72                Assert(j == jUpTo - 1);
     73                pString[j] = '\n';
     74            }
     75        }
    6376    }
    6477
    65     cr_unpackDispatch.ShaderSource(shader, count, ppStrings, length ? length : pLocalLength);
     78//    cr_unpackDispatch.ShaderSource(shader, count, ppStrings, length ? length : pLocalLength);
     79    cr_unpackDispatch.ShaderSource(shader, 1, ppStrings, 0);
     80
    6681    crFree(ppStrings);
    6782}
     
    250265void crUnpackExtendGetAttachedObjectsARB(void)
    251266{
    252         GLhandleARB containerObj = READ_DATA(8, GLhandleARB);
     267        VBoxGLhandleARB containerObj = READ_DATA(8, VBoxGLhandleARB);
    253268        GLsizei maxCount = READ_DATA(12, GLsizei);
    254269        SET_RETURN_PTR(16);
     
    259274void crUnpackExtendGetInfoLogARB(void)
    260275{
    261         GLhandleARB obj = READ_DATA(8, GLhandleARB);
     276        VBoxGLhandleARB obj = READ_DATA(8, VBoxGLhandleARB);
    262277        GLsizei maxLength = READ_DATA(12, GLsizei);
    263278        SET_RETURN_PTR(16);
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