Zebediah Figura : wined3d: Introduce wined3d_stateblock_multiply_transform().
Alexandre Julliard
julliard at winehq.org
Fri Dec 6 16:06:39 CST 2019
Module: wine
Branch: master
Commit: 77a6fa4fa26193c3a6ee969ab9caebc70e098c40
URL: https://source.winehq.org/git/wine.git/?a=commit;h=77a6fa4fa26193c3a6ee969ab9caebc70e098c40
Author: Zebediah Figura <z.figura12 at gmail.com>
Date: Tue Dec 3 22:23:22 2019 -0600
wined3d: Introduce wined3d_stateblock_multiply_transform().
Signed-off-by: Zebediah Figura <z.figura12 at gmail.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/wined3d/stateblock.c | 14 ++++++++++++++
dlls/wined3d/wined3d.spec | 1 +
include/wine/wined3d.h | 2 ++
3 files changed, 17 insertions(+)
diff --git a/dlls/wined3d/stateblock.c b/dlls/wined3d/stateblock.c
index 24134b8f3e..f6d36f8c25 100644
--- a/dlls/wined3d/stateblock.c
+++ b/dlls/wined3d/stateblock.c
@@ -1505,6 +1505,20 @@ void CDECL wined3d_stateblock_set_transform(struct wined3d_stateblock *statebloc
stateblock->changed.transform[d3dts >> 5] |= 1u << (d3dts & 0x1f);
}
+void CDECL wined3d_stateblock_multiply_transform(struct wined3d_stateblock *stateblock,
+ enum wined3d_transform_state d3dts, const struct wined3d_matrix *matrix)
+{
+ struct wined3d_matrix *mat = &stateblock->stateblock_state.transforms[d3dts];
+
+ TRACE("stateblock %p, state %s, matrix %p.\n", stateblock, debug_d3dtstype(d3dts), matrix);
+ TRACE("%.8e %.8e %.8e %.8e\n", matrix->_11, matrix->_12, matrix->_13, matrix->_14);
+ TRACE("%.8e %.8e %.8e %.8e\n", matrix->_21, matrix->_22, matrix->_23, matrix->_24);
+ TRACE("%.8e %.8e %.8e %.8e\n", matrix->_31, matrix->_32, matrix->_33, matrix->_34);
+ TRACE("%.8e %.8e %.8e %.8e\n", matrix->_41, matrix->_42, matrix->_43, matrix->_44);
+
+ multiply_matrix(mat, mat, matrix);
+}
+
HRESULT CDECL wined3d_stateblock_set_clip_plane(struct wined3d_stateblock *stateblock,
UINT plane_idx, const struct wined3d_vec4 *plane)
{
diff --git a/dlls/wined3d/wined3d.spec b/dlls/wined3d/wined3d.spec
index 716b902f31..e03c57055b 100644
--- a/dlls/wined3d/wined3d.spec
+++ b/dlls/wined3d/wined3d.spec
@@ -262,6 +262,7 @@
@ cdecl wined3d_stateblock_get_state(ptr)
@ cdecl wined3d_stateblock_incref(ptr)
@ cdecl wined3d_stateblock_init_contained_states(ptr)
+@ cdecl wined3d_stateblock_multiply_transform(ptr long ptr)
@ cdecl wined3d_stateblock_reset(ptr)
@ cdecl wined3d_stateblock_set_base_vertex_index(ptr long)
@ cdecl wined3d_stateblock_set_clip_plane(ptr long ptr)
diff --git a/include/wine/wined3d.h b/include/wine/wined3d.h
index fd8c56bf78..4b5d4e02f9 100644
--- a/include/wine/wined3d.h
+++ b/include/wine/wined3d.h
@@ -2724,6 +2724,8 @@ ULONG __cdecl wined3d_stateblock_decref(struct wined3d_stateblock *stateblock);
const struct wined3d_stateblock_state * __cdecl wined3d_stateblock_get_state(const struct wined3d_stateblock *stateblock);
ULONG __cdecl wined3d_stateblock_incref(struct wined3d_stateblock *stateblock);
void __cdecl wined3d_stateblock_init_contained_states(struct wined3d_stateblock *stateblock);
+void __cdecl wined3d_stateblock_multiply_transform(struct wined3d_stateblock *stateblock,
+ enum wined3d_transform_state state, const struct wined3d_matrix *matrix);
void __cdecl wined3d_stateblock_reset(struct wined3d_stateblock *stateblock);
void __cdecl wined3d_stateblock_set_base_vertex_index(struct wined3d_stateblock *stateblock, INT base_index);
HRESULT __cdecl wined3d_stateblock_set_clip_plane(struct wined3d_stateblock *stateblock,
More information about the wine-cvs
mailing list