VirtualBox

Changeset 39569 in vbox


Ignore:
Timestamp:
Dec 9, 2011 1:56:36 PM (13 years ago)
Author:
vboxsync
Message:

wine/xpdm: backport WDDM postfixup realloc fix

File:
1 edited

Legend:

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

    r39130 r39569  
    127127    UINT                        constant_version;
    128128    const struct wined3d_context *context;
    129 #ifdef VBOX_WITH_WDDM
    130129    UINT                        inp2Fixup_info;
    131 #else
    132     const struct ps_np2fixup_info *np2Fixup_info;
    133 #endif
    134130};
    135131
    136 #ifdef VBOX_WITH_WDDM
    137132#define WINEFIXUPINFO_NOINDEX (~0UL)
    138133#define WINEFIXUPINFO_GET(_p) get_fixup_info((const IWineD3DPixelShaderImpl*)(_p)->pshader, (_p)->inp2Fixup_info)
    139134#define WINEFIXUPINFO_ISVALID(_p) ((_p)->inp2Fixup_info != WINEFIXUPINFO_NOINDEX)
    140135#define WINEFIXUPINFO_INIT(_p) ((_p)->inp2Fixup_info == WINEFIXUPINFO_NOINDEX)
    141 #else
    142 #define WINEFIXUPINFO_GET(_p) ((_p)->np2Fixup_info)
    143 #define WINEFIXUPINFO_ISVALID(_p) (!!(_p)->np2Fixup_info)
    144 #define WINEFIXUPINFO_INIT(_p) ((_p)->np2Fixup_info == NULL)
    145 #endif
    146136
    147137typedef struct {
     
    734724}
    735725
    736 #ifdef VBOX_WITH_WDDM
    737726static const struct ps_np2fixup_info * get_fixup_info(const IWineD3DPixelShaderImpl *shader, UINT inp2fixup_info)
    738727{
     
    757746    return &shader_data->gl_shaders[inp2fixup_info].np2fixup;
    758747}
    759 #endif
    760748
    761749/**
     
    42854273        struct wined3d_shader_buffer *buffer, IWineD3DPixelShaderImpl *shader,
    42864274        const struct ps_compile_args *args,
    4287 #ifdef VBOX_WITH_WDDM
    42884275        UINT *inp2fixup_info
    4289 #else
    4290         const struct ps_np2fixup_info **np2fixup_info
    4291 #endif
    42924276        )
    42934277{
     
    43184302           && memcmp(&shader_data->gl_shaders[i].args, args, sizeof(*args)) == 0) {
    43194303            if(args->np2_fixup) {
    4320 #ifdef VBOX_WITH_WDDM
    43214304                *inp2fixup_info = i;
    4322 #else
    4323                 *np2fixup_info = &shader_data->gl_shaders[i].np2fixup;
    4324 #endif
    43254305            }
    43264306            return shader_data->gl_shaders[i].prgId;
     
    43594339    shader_buffer_clear(buffer);
    43604340    ret = shader_glsl_generate_pshader(context, buffer, shader, args, np2fixup);
    4361 #ifdef VBOX_WITH_WDDM
    43624341    *inp2fixup_info = shader_data->num_gl_shaders;
    4363 #else
    4364     *np2fixup_info = np2fixup;
    4365 #endif
    43664342    shader_data->gl_shaders[shader_data->num_gl_shaders++].prgId = ret;
    43674343
     
    45414517        GLhandleARB pshader_id = find_glsl_pshader(context, &priv->shader_buffer,
    45424518                (IWineD3DPixelShaderImpl *)pshader, &ps_compile_args,
    4543 #ifdef VBOX_WITH_WDDM
    45444519                &entry->inp2Fixup_info
    4545 #else
    4546                 &entry->np2Fixup_info
    4547 #endif
    45484520                );
    45494521        TRACE("Attaching GLSL shader object %u to program %u\n", pshader_id, programId);
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