From 7a7aa2aabb90a2f6833f582ff4701f3840d399f7 Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Tue, 27 Jun 2006 20:11:00 +0000 Subject: Don't use nested struct definitions in tnl_clipspace_fastpath. Make attr_type into a top-level type: tnl_attr_type See bug 7340. --- src/mesa/tnl/t_context.h | 14 ++++++++------ src/mesa/tnl/t_vertex.c | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/mesa/tnl/t_context.h b/src/mesa/tnl/t_context.h index 537e9ab214..e0415c4333 100644 --- a/src/mesa/tnl/t_context.h +++ b/src/mesa/tnl/t_context.h @@ -533,17 +533,19 @@ typedef void (*tnl_setup_func)( GLcontext *ctx, GLuint new_inputs); +struct tnl_attr_type { + GLuint format; + GLuint size; + GLuint stride; + GLuint offset; +}; + struct tnl_clipspace_fastpath { GLuint vertex_size; GLuint attr_count; GLboolean match_strides; - struct attr_type { - GLuint format; - GLuint size; - GLuint stride; - GLuint offset; - } *attr; + struct tnl_attr_type *attr; tnl_emit_func func; struct tnl_clipspace_fastpath *next; diff --git a/src/mesa/tnl/t_vertex.c b/src/mesa/tnl/t_vertex.c index b532a20142..c666b38742 100644 --- a/src/mesa/tnl/t_vertex.c +++ b/src/mesa/tnl/t_vertex.c @@ -87,7 +87,7 @@ void _tnl_register_fastpath( struct tnl_clipspace *vtx, fastpath->attr_count = vtx->attr_count; fastpath->match_strides = match_strides; fastpath->func = vtx->emit; - fastpath->attr = (struct attr_type *) + fastpath->attr = (struct tnl_attr_type *) _mesa_malloc(vtx->attr_count * sizeof(fastpath->attr[0])); for (i = 0; i < vtx->attr_count; i++) { -- cgit v1.2.3