Am Freitag, 11. April 2008 01:06:54 schrieb Stefan Dösinger: > Hi, > I just tried 3DMark2001, and I can confirm the black textures in the high > car test, so it is not your different card. I am pretty sure this used to > work though... Can you try the attached hack? If fixes the black textures in 3DMark 2001 for me.
diff --git a/dlls/wined3d/ati_fragment_shader.c b/dlls/wined3d/ati_fragment_shader.c index 0e0a528..3fb67b9 100644 --- a/dlls/wined3d/ati_fragment_shader.c +++ b/dlls/wined3d/ati_fragment_shader.c @@ -782,6 +782,7 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, Wi struct atifs_ffp_desc *desc; struct texture_stage_op op[MAX_TEXTURES]; struct atifs_private_data *priv = (struct atifs_private_data *) This->shader_priv; + int i; gen_ffp_op(stateblock, op); desc = (struct atifs_ffp_desc *) find_ffp_shader(&priv->fragment_shaders, op); @@ -797,6 +798,13 @@ static void set_tex_op_atifs(DWORD state, IWineD3DStateBlockImpl *stateblock, Wi TRACE("Allocated fixed function replacement shader descriptor %p\n", desc); } + for(i = 0; i < GL_LIMITS(textures); i++) { + GL_EXTCALL(glActiveTextureARB(GL_TEXTURE0_ARB + i)); + if(!isStateDirty(context, STATE_SAMPLER(i))) { + activate_dimensions(i, stateblock, context); + } + } + GL_EXTCALL(glBindFragmentShaderATI(desc->shader)); } diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c index 25c64f5..cd5e7d3 100644 --- a/dlls/wined3d/state.c +++ b/dlls/wined3d/state.c @@ -1798,7 +1798,7 @@ static void state_ckeyblend(DWORD state, IWineD3DStateBlockImpl *stateblock, Win * Does not care for the colorop or correct gl texture unit(when using nvrc) * Requires the caller to activate the correct unit before */ -static void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { +void activate_dimensions(DWORD stage, IWineD3DStateBlockImpl *stateblock, WineD3DContext *context) { BOOL bumpmap = FALSE; if(stage > 0 && (stateblock->textureState[stage - 1][WINED3DTSS_COLOROP] == WINED3DTOP_BUMPENVMAPLUMINANCE ||