Commit 52c5abb3 authored by Henri Verbeet's avatar Henri Verbeet Committed by Alexandre Julliard

wined3d: Move the "active_texture" field from struct wined3d_context to struct wined3d_context_gl.

parent 899e4c7a
......@@ -2520,7 +2520,7 @@ void wined3d_context_gl_active_texture(struct wined3d_context_gl *context_gl,
{
GL_EXTCALL(glActiveTexture(GL_TEXTURE0 + unit));
checkGLcall("glActiveTexture");
context_gl->c.active_texture = unit;
context_gl->active_texture = unit;
}
void context_bind_bo(struct wined3d_context *context, GLenum binding, GLuint name)
......@@ -2545,7 +2545,7 @@ void wined3d_context_gl_bind_texture(struct wined3d_context_gl *context_gl, GLen
else
target = GL_NONE;
unit = context_gl->c.active_texture;
unit = context_gl->active_texture;
old_texture_type = context_gl->texture_type[unit];
if (old_texture_type != target)
{
......
......@@ -1061,9 +1061,9 @@ void wined3d_texture_gl_bind_and_dirtify(struct wined3d_texture_gl *texture_gl,
* called from sampler() in state.c. This means we can't touch anything
* other than whatever happens to be the currently active texture, or we
* would risk marking already applied sampler states dirty again. */
if (context_gl->c.active_texture < ARRAY_SIZE(context_gl->rev_tex_unit_map))
if (context_gl->active_texture < ARRAY_SIZE(context_gl->rev_tex_unit_map))
{
unsigned int active_sampler = context_gl->rev_tex_unit_map[context_gl->c.active_texture];
unsigned int active_sampler = context_gl->rev_tex_unit_map[context_gl->active_texture];
if (active_sampler != WINED3D_UNMAPPED_STAGE)
context_invalidate_state(&context_gl->c, STATE_SAMPLER(active_sampler));
}
......
......@@ -858,9 +858,9 @@ void wined3d_shader_resource_view_gl_bind(struct wined3d_shader_resource_view_gl
static void shader_resource_view_gl_bind_and_dirtify(struct wined3d_shader_resource_view_gl *view_gl,
struct wined3d_context_gl *context_gl)
{
if (context_gl->c.active_texture < ARRAY_SIZE(context_gl->rev_tex_unit_map))
if (context_gl->active_texture < ARRAY_SIZE(context_gl->rev_tex_unit_map))
{
unsigned int active_sampler = context_gl->rev_tex_unit_map[context_gl->c.active_texture];
unsigned int active_sampler = context_gl->rev_tex_unit_map[context_gl->active_texture];
if (active_sampler != WINED3D_UNMAPPED_STAGE)
context_invalidate_state(&context_gl->c, STATE_SAMPLER(active_sampler));
}
......@@ -912,7 +912,7 @@ void shader_resource_view_generate_mipmaps(struct wined3d_shader_resource_view *
}
if (gl_info->supported[ARB_SAMPLER_OBJECTS])
GL_EXTCALL(glBindSampler(context->active_texture, 0));
GL_EXTCALL(glBindSampler(context_gl->active_texture, 0));
gl_tex = wined3d_texture_gl_get_gl_texture(texture_gl, srgb);
if (context->d3d_info->wined3d_creation_flags & WINED3D_SRGB_READ_WRITE_CONTROL)
{
......
......@@ -1946,7 +1946,6 @@ struct wined3d_context
GLenum untracked_materials[2];
UINT blit_w, blit_h;
enum fogsource fog_source;
DWORD active_texture;
UINT instance_count;
......@@ -1983,6 +1982,8 @@ struct wined3d_context_gl
uint32_t default_attrib_value_set;
unsigned int active_texture;
GLenum *texture_type;
/* The WGL context. */
......
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