VirtualBox

Changeset 40962 in vbox


Ignore:
Timestamp:
Apr 17, 2012 2:01:03 PM (13 years ago)
Author:
vboxsync
Message:

wined3d: more work-arounds for intel graphics rendering issues

Location:
trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d
Files:
3 edited

Legend:

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

    r40647 r40962  
    906906#endif
    907907
     908static BOOL match_intel(const struct wined3d_gl_info *gl_info, const char *gl_renderer,
     909        enum wined3d_gl_vendor gl_vendor, enum wined3d_pci_vendor card_vendor, enum wined3d_pci_device device)
     910{
     911    if (card_vendor == HW_VENDOR_INTEL) return TRUE;
     912    if (gl_vendor == HW_VENDOR_INTEL) return TRUE;
     913    return FALSE;
     914}
     915
     916static void quirk_force_blit(struct wined3d_gl_info *gl_info)
     917{
     918    gl_info->quirks |= WINED3D_QUIRK_FORCE_BLIT;
     919}
     920
    908921struct driver_quirk
    909922{
     
    9971010#ifdef VBOX_WITH_WDDM
    9981011    {
    999             match_mesa_nvidia,
    1000             quirk_no_shader_3,
    1001             "disable shader 3 support"
     1012        match_mesa_nvidia,
     1013        quirk_no_shader_3,
     1014        "disable shader 3 support"
    10021015    },
    10031016#endif
     1017    {
     1018        match_intel,
     1019        quirk_force_blit,
     1020        "force framebuffer blit when possible"
     1021    }
    10041022};
    10051023
     
    12621280            || strstr(gl_renderer, "Intel(R)")
    12631281            || strstr(gl_vendor_string, "Intel Inc."))
     1282    {
     1283        if (strstr(gl_renderer, "Mesa"))
     1284            return GL_VENDOR_MESA;
    12641285        return GL_VENDOR_INTEL;
     1286    }
    12651287
    12661288    if (strstr(gl_vendor_string, "Mesa")
     
    19832005}
    19842006
     2007static enum wined3d_pci_device select_card_intel_cmn(const struct wined3d_gl_info *gl_info,
     2008        const char *gl_renderer, unsigned int *vidmem)
     2009{
     2010    if (strstr(gl_renderer, "HD Graphics")
     2011            || strstr(gl_renderer, "Sandybridge"))
     2012        return CARD_INTEL_SBHD;
     2013    FIXME_(d3d_caps)("Card selection not handled for Windows Intel driver\n");
     2014    return CARD_INTEL_I915G;
     2015}
     2016
    19852017static enum wined3d_pci_device select_card_intel_mesa(const struct wined3d_gl_info *gl_info,
    19862018        const char *gl_renderer, unsigned int *vidmem)
    19872019{
    1988     FIXME_(d3d_caps)("Card selection not handled for Mesa Intel driver\n");
    1989     return CARD_INTEL_I915G;
    1990 }
    1991 
     2020    return select_card_intel_cmn(gl_info, gl_renderer, vidmem);
     2021}
    19922022
    19932023struct vendor_card_selection
     
    20092039    {GL_VENDOR_MESA,   HW_VENDOR_ATI,     "Mesa AMD/ATI driver",      select_card_ati_mesa},
    20102040    {GL_VENDOR_MESA,   HW_VENDOR_NVIDIA,  "Mesa Nouveau driver",      select_card_nvidia_mesa},
    2011     {GL_VENDOR_MESA,   HW_VENDOR_INTEL,   "Mesa Intel driver",        select_card_intel_mesa}
     2041    {GL_VENDOR_MESA,   HW_VENDOR_INTEL,   "Mesa Intel driver",        select_card_intel_mesa},
     2042    {GL_VENDOR_INTEL,  HW_VENDOR_INTEL,   "Windows Intel binary driver",  select_card_intel_cmn}
    20122043};
    20132044
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/surface.c

    r40481 r40962  
    39253925           )
    39263926        {
    3927             /* blit framebuffer might be buggy for some GPUs, try if fb_copy_to_texture_direct can do it quickly */
    3928             if (!fb_copy_to_texture_direct(This, SrcSurface, &src_rect, &dst_rect, Filter, TRUE /* fast only */))
     3927            /* blit framebuffer might be buggy for some NVIDIA GPUs,
     3928             * on the contrary some Intel GPUs fail glCopyTexSubImage2D for some reason,
     3929             * check if we can use fb_copy_to_texture_direct and try if it can do it quickly */
     3930            if ((myDevice->adapter->gl_info.quirks & WINED3D_QUIRK_FORCE_BLIT)
     3931                    || !fb_copy_to_texture_direct(This, SrcSurface, &src_rect, &dst_rect, Filter, TRUE /* fast only */))
    39293932            {
    39303933                TRACE("fb_copy_to_texture_direct can not do it fast, use stretch_rect_fbo\n");
     
    53815384        }
    53825385
    5383         IWineD3DBaseTexture_Release(texture);
     5386        IWineD3DBaseTexture_Release((IWineD3DBaseTexture*)texture);
    53845387    }
    53855388
  • trunk/src/VBox/Additions/WINNT/Graphics/Wine/wined3d/wined3d_private.h

    r40647 r40962  
    8181#define WINED3D_QUIRK_FBO_TEX_UPDATE            0x00000020
    8282#define WINED3D_QUIRK_FULLSIZE_BLIT             0x00000040
     83#define WINED3D_QUIRK_FORCE_BLIT                0x00000080
    8384
    8485/* Texture format fixups */
     
    14411442    CARD_INTEL_I945GM               = 0x27a2, /* Same as GMA 950? */
    14421443    CARD_INTEL_X3100                = 0x2a02, /* Found in Macs. Same as GMA 965? */
     1444    CARD_INTEL_SBHD                 = 0x0126, /* SundyBridge HD */
    14431445};
    14441446
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