Henri Verbeet : wined3d: Use the proper texture target in arbfp_blit_set().
Module: wine Branch: master Commit: 86db5b601f77e41d2fedbdf81759b87dc9250f33 URL: http://source.winehq.org/git/wine.git/?a=commit;h=86db5b601f77e41d2fedbdf817... Author: Henri Verbeet <hverbeet(a)codeweavers.com> Date: Tue Jul 17 11:40:34 2012 +0200 wined3d: Use the proper texture target in arbfp_blit_set(). For cube maps, texture->target is GL_TEXTURE_CUBE_MAP and would be used for calls that apply to the entire texture, like glTexParameter(). surface->texture_target refers to individual faces like GL_TEXTURE_CUBE_MAP_POSITIVE_X, etc., and would be used for calls like glTexImage2D(). What makes this a bit ugly is the fact that surfaces don't always have an associated texture. --- dlls/wined3d/arb_program_shader.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletions(-) diff --git a/dlls/wined3d/arb_program_shader.c b/dlls/wined3d/arb_program_shader.c index db1d812..a85e6fd 100644 --- a/dlls/wined3d/arb_program_shader.c +++ b/dlls/wined3d/arb_program_shader.c @@ -7196,8 +7196,13 @@ static HRESULT arbfp_blit_set(void *blit_priv, struct wined3d_context *context, float size[4] = {(float) surface->pow2Width, (float) surface->pow2Height, 1.0f, 1.0f}; struct arbfp_blit_priv *priv = blit_priv; enum complex_fixup fixup; - GLenum textype = surface->texture_target; const struct wined3d_gl_info *gl_info = context->gl_info; + GLenum textype; + + if (surface->container.type == WINED3D_CONTAINER_TEXTURE) + textype = surface->container.u.texture->target; + else + textype = surface->texture_target; if (surface->flags & SFLAG_CONVERTED) {
participants (1)
-
Alexandre Julliard