Commit 86db5b60 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

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.
parent 80ebe35a
......@@ -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)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment