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.
This commit is contained in:
Henri Verbeet 2012-07-17 11:40:34 +02:00 committed by Alexandre Julliard
parent 80ebe35aa7
commit 86db5b601f
1 changed files with 6 additions and 1 deletions

View File

@ -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)
{