VirtualBox

Changeset 22319 in vbox


Ignore:
Timestamp:
Aug 18, 2009 11:12:15 AM (16 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
51204
Message:

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

Location:
trunk/src/VBox
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/context.c

    r21731 r22319  
    305305        FIXME("FBO status %s (%#x)\n", debug_fbostatus(status), status);
    306306
    307         /* Dump the FBO attachments */
    308         for (i = 0; i < GL_LIMITS(buffers); ++i)
    309         {
    310             attachment = (IWineD3DSurfaceImpl *)context->current_fbo->render_targets[i];
     307        if (context->current_fbo)
     308        {
     309            /* Dump the FBO attachments */
     310            for (i = 0; i < GL_LIMITS(buffers); ++i)
     311            {
     312                attachment = (IWineD3DSurfaceImpl *)context->current_fbo->render_targets[i];
     313                if (attachment)
     314                {
     315                    FIXME("\tColor attachment %d: (%p) %s %ux%u\n",
     316                            i, attachment, debug_d3dformat(attachment->resource.format_desc->format),
     317                            attachment->pow2Width, attachment->pow2Height);
     318                }
     319            }
     320            attachment = (IWineD3DSurfaceImpl *)context->current_fbo->depth_stencil;
    311321            if (attachment)
    312322            {
    313                 FIXME("\tColor attachment %d: (%p) %s %ux%u\n",
    314                         i, attachment, debug_d3dformat(attachment->resource.format_desc->format),
     323                FIXME("\tDepth attachment: (%p) %s %ux%u\n",
     324                        attachment, debug_d3dformat(attachment->resource.format_desc->format),
    315325                        attachment->pow2Width, attachment->pow2Height);
    316326            }
    317         }
    318         attachment = (IWineD3DSurfaceImpl *)context->current_fbo->depth_stencil;
    319         if (attachment)
    320         {
    321             FIXME("\tDepth attachment: (%p) %s %ux%u\n",
    322                     attachment, debug_d3dformat(attachment->resource.format_desc->format),
    323                     attachment->pow2Width, attachment->pow2Height);
    324327        }
    325328    }
  • 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