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:
parent
80ebe35aa7
commit
86db5b601f
@ -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};
|
float size[4] = {(float) surface->pow2Width, (float) surface->pow2Height, 1.0f, 1.0f};
|
||||||
struct arbfp_blit_priv *priv = blit_priv;
|
struct arbfp_blit_priv *priv = blit_priv;
|
||||||
enum complex_fixup fixup;
|
enum complex_fixup fixup;
|
||||||
GLenum textype = surface->texture_target;
|
|
||||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
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)
|
if (surface->flags & SFLAG_CONVERTED)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user