VirtualBox

Ignore:
Timestamp:
Aug 18, 2009 11:12:15 AM (15 years ago)
Author:
vboxsync
Message:

crOpenGL: partial fix for crashing java apps with d3d support in guest

File:
1 edited

Legend:

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

    r15532 r22319  
    8686    crFree( local_progs );
    8787}
     88
     89void SERVER_DISPATCH_APIENTRY
     90crServerDispatchCopyTexImage2D(GLenum target, GLint level, GLenum internalFormat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border)
     91{
     92    GLsizei tw, th;
     93
     94    cr_server.head_spu->dispatch_table.GetTexLevelParameteriv(target, level, GL_TEXTURE_WIDTH, &width);
     95    cr_server.head_spu->dispatch_table.GetTexLevelParameteriv(target, level, GL_TEXTURE_HEIGHT, &height);
     96
     97    /* Workaround for a wine or ati bug. Host drivers crash unless we first provide texture bounds. */
     98    if (((tw!=width) || (th!=height)) && (internalFormat==GL_DEPTH_COMPONENT24))
     99    {
     100        crServerDispatchTexImage2D(target, level, internalFormat, width, height, border, GL_DEPTH_COMPONENT, GL_UNSIGNED_BYTE, NULL);
     101    }
     102
     103    cr_server.head_spu->dispatch_table.CopyTexImage2D(target, level, internalFormat, x, y, width, height, border);
     104}
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