wined3d: Use the correct texture limit.

We have to use the texture limit of the fragment pipeline in use here,
not the fixed function GL texture limit.
This commit is contained in:
Stefan Dösinger 2008-08-17 23:46:47 +02:00 committed by Alexandre Julliard
parent 8fc2cfe432
commit 9a6bc683e1
3 changed files with 8 additions and 1 deletions

View File

@ -3750,7 +3750,7 @@ 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 <= GL_LIMITS(textures)) {
if (!GL_SUPPORT(NV_REGISTER_COMBINERS) || 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;

View File

@ -3545,6 +3545,7 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
WINED3DDISPLAYMODE mode;
const struct fragment_pipeline *frag_pipeline = NULL;
int i;
struct fragment_caps ffp_caps;
/* Validate the adapter number. If no adapters are available(no GL), ignore the adapter
* number and create a device without a 3D adapter for 2D only operation.
@ -3597,10 +3598,14 @@ static HRESULT WINAPI IWineD3DImpl_CreateDevice(IWineD3D *iface, UINT Adapter,
select_shader_mode(&GLINFO_LOCATION, DeviceType, &object->ps_selected_mode, &object->vs_selected_mode);
object->shader_backend = select_shader_backend(Adapter, DeviceType);
memset(&ffp_caps, 0, sizeof(ffp_caps));
frag_pipeline = select_fragment_implementation(Adapter, DeviceType);
object->frag_pipe = frag_pipeline;
frag_pipeline->get_caps(DeviceType, &GLINFO_LOCATION, &ffp_caps);
object->max_ffp_textures = ffp_caps.MaxSimultaneousTextures;
compile_state_table(object->StateTable, object->multistate_funcs, &GLINFO_LOCATION,
ffp_vertexstate_template, frag_pipeline, misc_state_template);
object->blitter = select_blit_implementation(Adapter, DeviceType);
/* Prefer the vtable with functions optimized for single dirtifyable objects if the shader

View File

@ -859,6 +859,8 @@ struct IWineD3DDeviceImpl
const struct fragment_pipeline *frag_pipe;
const struct blit_shader *blitter;
unsigned int max_ffp_textures;
/* To store */
BOOL view_ident; /* true iff view matrix is identity */
BOOL untransformed;