Stefan Dösinger : wined3d: Make the texture stage mapping nvrc independent.
Alexandre Julliard
julliard at winehq.org
Wed Aug 27 08:24:49 CDT 2008
Module: wine
Branch: master
Commit: 462ddaa25404cd1a07135f5d7acdd2e298d7dfad
URL: http://source.winehq.org/git/wine.git/?a=commit;h=462ddaa25404cd1a07135f5d7acdd2e298d7dfad
Author: Stefan Dösinger <stefan at codeweavers.com>
Date: Thu Aug 21 13:23:38 2008 -0500
wined3d: Make the texture stage mapping nvrc independent.
---
dlls/wined3d/device.c | 3 ++-
dlls/wined3d/directx.c | 1 +
dlls/wined3d/wined3d_private.h | 2 +-
3 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 98b1910..a569e96 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 c897e70..53ea543 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 8daee2d..fdb56b5 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 */
More information about the wine-cvs
mailing list