Henri Verbeet : wined3d: Swap the container's texture name in flip_surface( ).
Alexandre Julliard
julliard at winehq.org
Fri Nov 22 10:23:07 CST 2013
Module: wine
Branch: master
Commit: caf9ad6c2ca60c50492ab1218428e08702899819
URL: http://source.winehq.org/git/wine.git/?a=commit;h=caf9ad6c2ca60c50492ab1218428e08702899819
Author: Henri Verbeet <hverbeet at codeweavers.com>
Date: Fri Nov 22 16:22:16 2013 +0100
wined3d: Swap the container's texture name in flip_surface().
---
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 6f6b5de..f456bb9 100644
--- a/dlls/wined3d/surface.c
+++ b/dlls/wined3d/surface.c
@@ -3997,6 +3997,10 @@ static HRESULT d3dfmt_convert_surface(const BYTE *src, BYTE *dst, UINT pitch, UI
void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
{
+ if (front->container->level_count != 1 || front->container->layer_count != 1
+ || back->container->level_count != 1 || back->container->layer_count != 1)
+ ERR("Flip between surfaces %p and %p not supported.\n", front, back);
+
/* Flip the surface contents */
/* Flip the DC */
{
@@ -4041,6 +4045,14 @@ void flip_surface(struct wined3d_surface *front, struct wined3d_surface *back)
{
GLuint tmp;
+ tmp = back->container->texture_rgb.name;
+ back->container->texture_rgb.name = front->container->texture_rgb.name;
+ front->container->texture_rgb.name = tmp;
+
+ tmp = back->container->texture_srgb.name;
+ back->container->texture_srgb.name = front->container->texture_srgb.name;
+ front->container->texture_srgb.name = tmp;
+
tmp = back->rb_multisample;
back->rb_multisample = front->rb_multisample;
front->rb_multisample = tmp;
More information about the wine-cvs
mailing list