summaryrefslogtreecommitdiffstats
path: root/src/gallium/state_trackers
diff options
context:
space:
mode:
authorAxel Davy <[email protected]>2018-03-10 18:49:59 +0100
committerAxel Davy <[email protected]>2018-03-18 22:53:46 +0100
commitdbc24835d75466951a44b391b42e39461a6ac5a2 (patch)
tree3f37c50512b19d06407799b8ce5ecb6218a351ce /src/gallium/state_trackers
parentf61e9a958bd8d61cb7ca575ca987caefc6edbffd (diff)
st/nine: Fix non inversible matrix check
There was a missing absolute value when checking if the determinant was big enough. Fixes: https://github.com/iXit/Mesa-3D/issues/292 Signed-off-by: Axel Davy <[email protected]> Reviewed-by: Patrick Rudolph <[email protected]> Tested-by: Dieter Nützel <[email protected]> CC: "17.3 18.0" <[email protected]>
Diffstat (limited to 'src/gallium/state_trackers')
-rw-r--r--src/gallium/state_trackers/nine/nine_ff.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gallium/state_trackers/nine/nine_ff.c b/src/gallium/state_trackers/nine/nine_ff.c
index 6c30839b29b..d7b697caeed 100644
--- a/src/gallium/state_trackers/nine/nine_ff.c
+++ b/src/gallium/state_trackers/nine/nine_ff.c
@@ -2474,7 +2474,7 @@ nine_d3d_matrix_inverse(D3DMATRIX *D, const D3DMATRIX *M)
M->m[2][0] * D->m[0][2] +
M->m[3][0] * D->m[0][3];
- if (det < 1e-30) {/* non inversible */
+ if (fabsf(det) < 1e-30) {/* non inversible */
*D = *M; /* wine tests */
return;
}