Module: wine
Branch: master
Commit: a0127f2e1fe819fbe78cece3636c77cff559dce8
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a0127f2e1fe819fbe78cece36…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Fri Nov 23 14:17:21 2007 +0100
wined3d: Allow using a different internal format for fbos.
OpenGL drivers do not support some low precision internal formats
like GL_RGB5 for fbo color targets. Direct3D application depend on them,
so provide a fallback format for render targets if the requested format
itself is not supported.
---
dlls/wined3d/surface.c | 9 ++-
dlls/wined3d/utils.c | 168 ++++++++++++++++++++++++++++-----------------
include/wine/wined3d_gl.h | 2 +-
3 files changed, 113 insertions(+), 66 deletions(-)
Diff: http://source.winehq.org/git/wine.git/?a=commitdiff;h=a0127f2e1fe819fbe78ce…
Module: wine
Branch: master
Commit: c66a3be49b755c8e881f8a2405ed63b272022848
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c66a3be49b755c8e881f8a240…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Thu Nov 22 22:18:53 2007 +0100
wined3d: Work around nvidia beta driver bug.
---
dlls/wined3d/glsl_shader.c | 18 +++++++++---------
1 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/dlls/wined3d/glsl_shader.c b/dlls/wined3d/glsl_shader.c
index d9e525b..0dd306f 100644
--- a/dlls/wined3d/glsl_shader.c
+++ b/dlls/wined3d/glsl_shader.c
@@ -3005,6 +3005,15 @@ static void set_glsl_shader_program(IWineD3DDevice *iface, BOOL use_ps, BOOL use
int max_attribs = 16; /* TODO: Will this always be the case? It is at the moment... */
char tmp_name[10];
+ reorder_shader_id = generate_param_reorder_function(vshader, pshader, gl_info);
+ TRACE("Attaching GLSL shader object %u to program %u\n", reorder_shader_id, programId);
+ GL_EXTCALL(glAttachObjectARB(programId, reorder_shader_id));
+ checkGLcall("glAttachObjectARB");
+ /* Flag the reorder function for deletion, then it will be freed automatically when the program
+ * is destroyed
+ */
+ GL_EXTCALL(glDeleteObjectARB(reorder_shader_id));
+
TRACE("Attaching GLSL shader object %u to program %u\n", vshader_id, programId);
GL_EXTCALL(glAttachObjectARB(programId, vshader_id));
checkGLcall("glAttachObjectARB");
@@ -3027,15 +3036,6 @@ static void set_glsl_shader_program(IWineD3DDevice *iface, BOOL use_ps, BOOL use
checkGLcall("glBindAttribLocationARB");
list_add_head(&((IWineD3DBaseShaderImpl *)vshader)->baseShader.linked_programs, &entry->vshader_entry);
-
- reorder_shader_id = generate_param_reorder_function(vshader, pshader, gl_info);
- TRACE("Attaching GLSL shader object %u to program %u\n", reorder_shader_id, programId);
- GL_EXTCALL(glAttachObjectARB(programId, reorder_shader_id));
- checkGLcall("glAttachObjectARB");
- /* Flag the reorder function for deletion, then it will be freed automatically when the program
- * is destroyed
- */
- GL_EXTCALL(glDeleteObjectARB(reorder_shader_id));
}
/* Attach GLSL pshader */
Module: wine
Branch: master
Commit: b91c19af874f8d2a340995d26dfa8e4b8bb0290f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=b91c19af874f8d2a340995d26…
Author: Stefan Dösinger <stefan(a)codeweavers.com>
Date: Tue Nov 27 23:43:11 2007 +0100
wined3d: Inform the texture about filtering changes.
The surface_blt_to_drawable function changes the filtering settings of
the texture object, but without informing the container about this
change. This patch makes sure that the basetexture knows about this and
reapplies the changed states to the settings chosen by the app.
---
dlls/wined3d/surface.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/dlls/wined3d/surface.c b/dlls/wined3d/surface.c
index df617dd..34a32c2 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3510,6 +3510,7 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT
struct coords coords[4];
RECT rect;
IWineD3DSwapChain *swapchain = NULL;
+ IWineD3DBaseTexture *texture = NULL;
HRESULT hr;
IWineD3DDeviceImpl *device = This->resource.wineD3DDevice;
@@ -3640,6 +3641,17 @@ static inline void surface_blt_to_drawable(IWineD3DSurfaceImpl *This, const RECT
glFlush();
IWineD3DSwapChain_Release(swapchain);
+ } else {
+ /* We changed the filtering settings on the texture. Inform the container about this to get the filters
+ * reset properly next draw
+ */
+ hr = IWineD3DSurface_GetContainer((IWineD3DSurface*)This, &IID_IWineD3DBaseTexture, (void **) &texture);
+ if(hr == WINED3D_OK && texture) {
+ ((IWineD3DBaseTextureImpl *) texture)->baseTexture.states[WINED3DTEXSTA_MAGFILTER] = WINED3DTEXF_POINT;
+ ((IWineD3DBaseTextureImpl *) texture)->baseTexture.states[WINED3DTEXSTA_MINFILTER] = WINED3DTEXF_POINT;
+ ((IWineD3DBaseTextureImpl *) texture)->baseTexture.states[WINED3DTEXSTA_MIPFILTER] = WINED3DTEXF_NONE;
+ IWineD3DBaseTexture_Release(texture);
+ }
}
LEAVE_GL();
}