From: Axel Davy Date: Sat, 22 Sep 2018 08:51:20 +0000 (+0200) Subject: st/nine: Print transform matrices in debug X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=59aaeeb730859242f7c201976b05500a6af41544;p=mesa.git st/nine: Print transform matrices in debug This is useful to see the matrices content in the log to debug. Signed-off-by: Axel Davy --- 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)) {