diff options
author | Eric Anholt <[email protected]> | 2019-06-20 10:18:41 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2019-07-01 11:12:15 -0700 |
commit | 52a39a332fec1e5a8d686558b9a71e42bcfcbb0f (patch) | |
tree | 188067a80775d690eed12d88827bb69d521ca2dc /src/mesa/math/m_vector.c | |
parent | 1738b38ce8ef5fec6146225306bd70690a269afa (diff) |
mesa: Replace gen_matypes with a simple header for V4F/mat layout.
We can greatly simplify our builds by just hardcoding GLvector4f and
GLmatrix's layouts.
Reviewed-by: Matt Turner <[email protected]>
Reviewed-by: Eric Engestrom <[email protected]>
Diffstat (limited to 'src/mesa/math/m_vector.c')
-rw-r--r-- | src/mesa/math/m_vector.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/mesa/math/m_vector.c b/src/mesa/math/m_vector.c index 831f953d655..0f7c52a4ff1 100644 --- a/src/mesa/math/m_vector.c +++ b/src/mesa/math/m_vector.c @@ -79,6 +79,13 @@ static const GLubyte size_bits[5] = { void _mesa_vector4f_init( GLvector4f *v, GLbitfield flags, GLfloat (*storage)[4] ) { + STATIC_ASSERT(V4F_DATA == offsetof(GLvector4f, data)); + STATIC_ASSERT(V4F_START == offsetof(GLvector4f, start)); + STATIC_ASSERT(V4F_COUNT == offsetof(GLvector4f, count)); + STATIC_ASSERT(V4F_STRIDE == offsetof(GLvector4f, stride)); + STATIC_ASSERT(V4F_SIZE == offsetof(GLvector4f, size)); + STATIC_ASSERT(V4F_FLAGS == offsetof(GLvector4f, flags)); + v->stride = 4 * sizeof(GLfloat); v->size = 2; /* may change: 2-4 for vertices and 1-4 for texcoords */ v->data = storage; |