mirror of
https://github.com/reactos/wine.git
synced 2025-02-21 05:11:57 +00:00
wined3d: Directly pass the texture to texture_activate_dimensions().
This commit is contained in:
parent
67b7a573b9
commit
23e286613f
@ -838,7 +838,7 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, st
|
|||||||
{
|
{
|
||||||
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
|
GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + mapped_stage));
|
||||||
checkGLcall("glActiveTextureARB");
|
checkGLcall("glActiveTextureARB");
|
||||||
texture_activate_dimensions(i, stateblock, context);
|
texture_activate_dimensions(stateblock->state.textures[i], gl_info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -532,7 +532,7 @@ static void nvrc_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
texture_activate_dimensions(stage, stateblock, context);
|
texture_activate_dimensions(stateblock->state.textures[stage], gl_info);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3146,12 +3146,10 @@ static void tex_colorop(DWORD state, IWineD3DStateBlockImpl *stateblock, struct
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* The sampler will also activate the correct texture dimensions, so no need to do it here
|
/* The sampler will also activate the correct texture dimensions, so no
|
||||||
* if the sampler for this stage is dirty
|
* need to do it here if the sampler for this stage is dirty. */
|
||||||
*/
|
if (!isStateDirty(context, STATE_SAMPLER(stage)) && tex_used)
|
||||||
if(!isStateDirty(context, STATE_SAMPLER(stage))) {
|
texture_activate_dimensions(stateblock->state.textures[stage], gl_info);
|
||||||
if (tex_used) texture_activate_dimensions(stage, stateblock, context);
|
|
||||||
}
|
|
||||||
|
|
||||||
set_tex_op(gl_info, &stateblock->state, FALSE, stage,
|
set_tex_op(gl_info, &stateblock->state, FALSE, stage,
|
||||||
stateblock->state.texture_states[stage][WINED3DTSS_COLOROP],
|
stateblock->state.texture_states[stage][WINED3DTSS_COLOROP],
|
||||||
|
@ -2979,13 +2979,11 @@ void add_ffp_frag_shader(struct wine_rb_tree *shaders, struct ffp_frag_desc *des
|
|||||||
* Requires the caller to activate the correct unit before
|
* Requires the caller to activate the correct unit before
|
||||||
*/
|
*/
|
||||||
/* GL locking is done by the caller (state handler) */
|
/* GL locking is done by the caller (state handler) */
|
||||||
void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, struct wined3d_context *context)
|
void texture_activate_dimensions(IWineD3DBaseTextureImpl *texture, const struct wined3d_gl_info *gl_info)
|
||||||
{
|
{
|
||||||
const struct wined3d_gl_info *gl_info = context->gl_info;
|
if (texture)
|
||||||
|
|
||||||
if (stateblock->state.textures[stage])
|
|
||||||
{
|
{
|
||||||
switch (stateblock->state.textures[stage]->baseTexture.target)
|
switch (texture->baseTexture.target)
|
||||||
{
|
{
|
||||||
case GL_TEXTURE_2D:
|
case GL_TEXTURE_2D:
|
||||||
glDisable(GL_TEXTURE_3D);
|
glDisable(GL_TEXTURE_3D);
|
||||||
@ -3079,7 +3077,7 @@ void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock, struct wine
|
|||||||
if (sampler >= stateblock->state.lowest_disabled_stage) return;
|
if (sampler >= stateblock->state.lowest_disabled_stage) return;
|
||||||
if (isStateDirty(context, STATE_TEXTURESTAGE(sampler, WINED3DTSS_COLOROP))) return;
|
if (isStateDirty(context, STATE_TEXTURESTAGE(sampler, WINED3DTSS_COLOROP))) return;
|
||||||
|
|
||||||
texture_activate_dimensions(sampler, stateblock, context);
|
texture_activate_dimensions(stateblock->state.textures[sampler], context->gl_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
void *wined3d_rb_alloc(size_t size)
|
void *wined3d_rb_alloc(size_t size)
|
||||||
|
@ -2646,8 +2646,8 @@ void set_tex_op_nvrc(const struct wined3d_gl_info *gl_info, const struct wined3d
|
|||||||
INT texture_idx, DWORD dst) DECLSPEC_HIDDEN;
|
INT texture_idx, DWORD dst) DECLSPEC_HIDDEN;
|
||||||
void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords,
|
void set_texture_matrix(const float *smat, DWORD flags, BOOL calculatedCoords,
|
||||||
BOOL transformed, enum wined3d_format_id coordtype, BOOL ffp_can_disable_proj) DECLSPEC_HIDDEN;
|
BOOL transformed, enum wined3d_format_id coordtype, BOOL ffp_can_disable_proj) DECLSPEC_HIDDEN;
|
||||||
void texture_activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock,
|
void texture_activate_dimensions(IWineD3DBaseTextureImpl *texture,
|
||||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
const struct wined3d_gl_info *gl_info) DECLSPEC_HIDDEN;
|
||||||
void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock,
|
void sampler_texdim(DWORD state, IWineD3DStateBlockImpl *stateblock,
|
||||||
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
struct wined3d_context *context) DECLSPEC_HIDDEN;
|
||||||
void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock,
|
void tex_alphaop(DWORD state, IWineD3DStateBlockImpl *stateblock,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user