Commit 7859509f authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Get rid of the SFLAG_INTEXTURE / SFLAG_INSRGBTEX check in surface_set_texture_name().

parent 137590be
......@@ -1709,36 +1709,15 @@ static const struct wined3d_surface_ops gdi_surface_ops =
gdi_surface_unmap,
};
void surface_set_texture_name(struct wined3d_surface *surface, GLuint new_name, BOOL srgb)
void surface_set_texture_name(struct wined3d_surface *surface, GLuint name, BOOL srgb)
{
GLuint *name;
DWORD flag;
TRACE("surface %p, name %u, srgb %#x.\n", surface, name, srgb);
TRACE("surface %p, new_name %u, srgb %#x.\n", surface, new_name, srgb);
if(srgb)
{
name = &surface->texture_name_srgb;
flag = SFLAG_INSRGBTEX;
}
if (srgb)
surface->texture_name_srgb = name;
else
{
name = &surface->texture_name;
flag = SFLAG_INTEXTURE;
}
if (!*name && new_name)
{
/* FIXME: We shouldn't need to remove SFLAG_INTEXTURE if the
* surface has no texture name yet. See if we can get rid of this. */
if (surface->flags & flag)
{
ERR("Surface has %s set, but no texture name.\n", debug_surflocation(flag));
surface_modify_location(surface, flag, FALSE);
}
}
surface->texture_name = name;
*name = new_name;
surface_force_reload(surface);
}
......
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