diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 98b1910e72a..a569e96d831 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -3750,7 +3750,8 @@ static void device_map_fixed_function_samplers(IWineD3DDeviceImpl *This) { device_update_fixed_function_usage_map(This); - if (!GL_SUPPORT(NV_REGISTER_COMBINERS) || This->stateBlock->lowest_disabled_stage <= This->max_ffp_textures) { + if (This->max_ffp_textures == This->max_ffp_texture_stages || + This->stateBlock->lowest_disabled_stage <= This->max_ffp_textures) { for (i = 0; i < This->stateBlock->lowest_disabled_stage; ++i) { if (!This->fixed_function_usage_map[i]) continue; diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index c897e701724..53ea543168b 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -3608,6 +3608,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter, object->frag_pipe = frag_pipeline; frag_pipeline->get_caps(DeviceType, &GLINFO_LOCATION, &ffp_caps); object->max_ffp_textures = ffp_caps.MaxSimultaneousTextures; + object->max_ffp_texture_stages = ffp_caps.MaxTextureBlendStages; compile_state_table(object->StateTable, object->multistate_funcs, &GLINFO_LOCATION, ffp_vertexstate_template, frag_pipeline, misc_state_template); diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h index 8daee2d45b5..fdb56b54433 100644 --- a/dlls/wined3d/wined3d_private.h +++ b/dlls/wined3d/wined3d_private.h @@ -859,7 +859,7 @@ struct IWineD3DDeviceImpl const struct fragment_pipeline *frag_pipe; const struct blit_shader *blitter; - unsigned int max_ffp_textures; + unsigned int max_ffp_textures, max_ffp_texture_stages; /* To store */ BOOL view_ident; /* true iff view matrix is identity */