summaryrefslogtreecommitdiffstats
path: root/src/mesa/math
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2015-07-11 22:46:19 -0700
committerMatt Turner <mattst88@gmail.com>2015-07-29 09:34:51 -0700
commitf8a647883a14694f1b758c12187b3f35b9d039a7 (patch)
treecd11148549da4b67e6a9a3f1b941b3dfaa27295c /src/mesa/math
parentecc559218d0a544f8a5f878c500f125c2d588d82 (diff)
downloadexternal_mesa3d-f8a647883a14694f1b758c12187b3f35b9d039a7.zip
external_mesa3d-f8a647883a14694f1b758c12187b3f35b9d039a7.tar.gz
external_mesa3d-f8a647883a14694f1b758c12187b3f35b9d039a7.tar.bz2
mesa: Use floats for viewport bounds.
ARB_viewport_array specifies that DEPTH_RANGE consists of double- precision parameters (corresponding commit d4dc35987), and a preparatory commit (6340e609a) added _mesa_get_viewport_xform() which returned double-precision scale[3] and translate[3] vectors, even though X, Y, Width, and Height were still floats. All users of _mesa_get_viewport_xform() immediately convert the double scale and translation vectors into floats (which were floats originally, but were converted to doubles in _mesa_get_viewport_xform(), sigh). i965 at least cannot consume doubles (see SF_CLIP_VIEWPORT). If we want to pass doubles to hardware, we should have a different function that does that. Acked-by: Mathias Froehlich <Mathias.Froehlich@web.de>
Diffstat (limited to 'src/mesa/math')
-rw-r--r--src/mesa/math/m_matrix.c4
-rw-r--r--src/mesa/math/m_matrix.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mesa/math/m_matrix.c b/src/mesa/math/m_matrix.c
index ecf564c..6a42c6c 100644
--- a/src/mesa/math/m_matrix.c
+++ b/src/mesa/math/m_matrix.c
@@ -1111,8 +1111,8 @@ _math_matrix_translate( GLmatrix *mat, GLfloat x, GLfloat y, GLfloat z )
* Transforms Normalized Device Coords to window/Z values.
*/
void
-_math_matrix_viewport(GLmatrix *m, const double scale[3],
- const double translate[3], double depthMax)
+_math_matrix_viewport(GLmatrix *m, const float scale[3],
+ const float translate[3], double depthMax)
{
m->m[MAT_SX] = scale[0];
m->m[MAT_TX] = translate[0];
diff --git a/src/mesa/math/m_matrix.h b/src/mesa/math/m_matrix.h
index 778d716..c34d9e3 100644
--- a/src/mesa/math/m_matrix.h
+++ b/src/mesa/math/m_matrix.h
@@ -122,8 +122,8 @@ _math_matrix_frustum( GLmatrix *mat,
GLfloat nearval, GLfloat farval );
extern void
-_math_matrix_viewport( GLmatrix *m, const double scale[3],
- const double translate[3], double depthMax );
+_math_matrix_viewport( GLmatrix *m, const float scale[3],
+ const float translate[3], double depthMax );
extern void
_math_matrix_set_identity( GLmatrix *dest );