wined3d: Pass a wined3d_context_gl structure to nvts_activate_dimensions().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Henri Verbeet 2019-07-04 16:28:01 +04:30 committed by Alexandre Julliard
parent 14f1cc73e7
commit 2e49b85f97
1 changed files with 8 additions and 11 deletions

View File

@ -30,9 +30,10 @@ WINE_DEFAULT_DEBUG_CHANNEL(d3d);
/* Context activation for state handlers is done by the caller. */
static void nvts_activate_dimensions(const struct wined3d_state *state, DWORD stage, struct wined3d_context *context)
static void nvts_activate_dimensions(const struct wined3d_state *state,
unsigned int stage, struct wined3d_context_gl *context_gl)
{
const struct wined3d_gl_info *gl_info = context->gl_info;
const struct wined3d_gl_info *gl_info = context_gl->c.gl_info;
struct wined3d_texture *texture;
BOOL bumpmap = FALSE;
@ -41,11 +42,11 @@ static void nvts_activate_dimensions(const struct wined3d_state *state, DWORD st
|| state->texture_states[stage - 1][WINED3D_TSS_COLOR_OP] == WINED3D_TOP_BUMPENVMAP))
{
bumpmap = TRUE;
context->texShaderBumpMap |= (1u << stage);
context_gl->c.texShaderBumpMap |= (1u << stage);
}
else
{
context->texShaderBumpMap &= ~(1u << stage);
context_gl->c.texShaderBumpMap &= ~(1u << stage);
}
if ((texture = state->textures[stage]))
@ -550,13 +551,9 @@ static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_s
if (tex_used)
{
if (gl_info->supported[NV_TEXTURE_SHADER2])
{
nvts_activate_dimensions(state, stage, context);
}
nvts_activate_dimensions(state, stage, context_gl);
else
{
texture_activate_dimensions(state->textures[stage], gl_info);
}
}
}
@ -580,7 +577,7 @@ static void nvrc_colorop(struct wined3d_context *context, const struct wined3d_s
if (usesBump != usedBump)
{
wined3d_context_gl_active_texture(context_gl, gl_info, mapped_stage + 1);
nvts_activate_dimensions(state, stage + 1, context);
nvts_activate_dimensions(state, stage + 1, context_gl);
wined3d_context_gl_active_texture(context_gl, gl_info, mapped_stage);
}
}
@ -620,7 +617,7 @@ static void nvts_texdim(struct wined3d_context *context, const struct wined3d_st
if (isStateDirty(context, STATE_TEXTURESTAGE(sampler, WINED3D_TSS_COLOR_OP)))
return;
nvts_activate_dimensions(state, sampler, context);
nvts_activate_dimensions(state, sampler, context_gl);
}
static void nvts_bumpenvmat(struct wined3d_context *context, const struct wined3d_state *state, DWORD state_id)