[4/10] WineD3D: Add a viewport state to the state table
Stefan Dösinger
stefandoesinger at gmx.at
Tue Jan 2 14:40:59 CST 2007
For now only used to perform a projection matrix update. A patch that
moves the full viewport applying to the state table will follow after
these 10 patches.
-------------- next part --------------
From 12cc1b64f369fca37f6d7b4373cfdab20c0adf5b Mon Sep 17 00:00:00 2001
From: =?utf-8?q?Stefan_D=C3=B6singer?= <stefan at imac.local>
Date: Tue, 2 Jan 2007 19:24:29 +0100
Subject: [PATCH] WineD3D: Add a viewport state to the state table
---
dlls/wined3d/device.c | 2 ++
dlls/wined3d/state.c | 1 +
dlls/wined3d/wined3d_private.h | 5 ++++-
3 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 29279a0..c7da5c8 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -3095,6 +3095,8 @@ static HRESULT WINAPI IWineD3DDeviceImpl
LEAVE_GL();
+ /* Todo: move the gl code too */
+ IWineD3DDeviceImpl_MarkStateDirty(This, STATE_VIEWPORT);
return WINED3D_OK;
}
diff --git a/dlls/wined3d/state.c b/dlls/wined3d/state.c
index fcb42a8..67869e8 100644
--- a/dlls/wined3d/state.c
+++ b/dlls/wined3d/state.c
@@ -2909,5 +2909,6 @@ const struct StateEntry StateTable[] =
{ /* , STATE_STREAMSRC */ STATE_VDECL, vertexdeclaration },
{ /* , STATE_VDECL */ STATE_VDECL, vertexdeclaration },
{ /* , STATE_VSHADER */ STATE_VDECL, vertexdeclaration },
+ { /* , STATE_VIEWPORT */ STATE_VDECL, vertexdeclaration },
};
diff --git a/dlls/wined3d/wined3d_private.h b/dlls/wined3d/wined3d_private.h
index 15958f3..8088b70 100644
--- a/dlls/wined3d/wined3d_private.h
+++ b/dlls/wined3d/wined3d_private.h
@@ -433,7 +433,10 @@ #define STATE_IS_VDECL(a) ((a) == STATE_
#define STATE_VSHADER (STATE_VDECL + 1)
#define STATE_IS_VSHADER(a) ((a) == STATE_VSHADER)
-#define STATE_HIGHEST (STATE_VSHADER)
+#define STATE_VIEWPORT (STATE_VSHADER + 1)
+#define STATE_IS_VIEWPORT(a) ((a) == STATE_VIEWPORT)
+
+#define STATE_HIGHEST (STATE_VIEWPORT)
struct StateEntry
{
--
1.4.2.4
More information about the wine-patches
mailing list