[Mesa-dev] [PATCH 02/22] st/nine: Print transform matrices in debug
Axel Davy
davyaxel0 at gmail.com
Sun Sep 23 17:00:07 UTC 2018
This is useful to see the matrices content
in the log to debug.
Signed-off-by: Axel Davy <davyaxel0 at gmail.com>
---
src/gallium/state_trackers/nine/device9.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/gallium/state_trackers/nine/device9.c b/src/gallium/state_trackers/nine/device9.c
index 150f5e3e05e..293f63bd7b7 100644
--- a/src/gallium/state_trackers/nine/device9.c
+++ b/src/gallium/state_trackers/nine/device9.c
@@ -1967,6 +1967,19 @@ NineDevice9_Clear( struct NineDevice9 *This,
return D3D_OK;
}
+static void
+nine_D3DMATRIX_print(const D3DMATRIX *M)
+{
+ DBG("\n(%f %f %f %f)\n"
+ "(%f %f %f %f)\n"
+ "(%f %f %f %f)\n"
+ "(%f %f %f %f)\n",
+ M->m[0][0], M->m[0][1], M->m[0][2], M->m[0][3],
+ M->m[1][0], M->m[1][1], M->m[1][2], M->m[1][3],
+ M->m[2][0], M->m[2][1], M->m[2][2], M->m[2][3],
+ M->m[3][0], M->m[3][1], M->m[3][2], M->m[3][3]);
+}
+
HRESULT NINE_WINAPI
NineDevice9_SetTransform( struct NineDevice9 *This,
D3DTRANSFORMSTATETYPE State,
@@ -1978,6 +1991,7 @@ NineDevice9_SetTransform( struct NineDevice9 *This,
DBG("This=%p State=%d pMatrix=%p\n", This, State, pMatrix);
user_assert(M, D3DERR_INVALIDCALL);
+ nine_D3DMATRIX_print(pMatrix);
*M = *pMatrix;
if (unlikely(This->is_recording)) {
--
2.18.0
More information about the mesa-dev
mailing list