Don't use nested struct definitions in tnl_clipspace_fastpath.

Make attr_type into a top-level type: tnl_attr_type
See bug 7340.
This commit is contained in:
Brian Paul
2006-06-27 20:11:00 +00:00
parent 4063b1730d
commit 7a7aa2aabb
2 changed files with 9 additions and 7 deletions

View File

@@ -533,17 +533,19 @@ typedef void (*tnl_setup_func)( GLcontext *ctx,
GLuint new_inputs); GLuint new_inputs);
struct tnl_attr_type {
GLuint format;
GLuint size;
GLuint stride;
GLuint offset;
};
struct tnl_clipspace_fastpath { struct tnl_clipspace_fastpath {
GLuint vertex_size; GLuint vertex_size;
GLuint attr_count; GLuint attr_count;
GLboolean match_strides; GLboolean match_strides;
struct attr_type { struct tnl_attr_type *attr;
GLuint format;
GLuint size;
GLuint stride;
GLuint offset;
} *attr;
tnl_emit_func func; tnl_emit_func func;
struct tnl_clipspace_fastpath *next; struct tnl_clipspace_fastpath *next;

View File

@@ -87,7 +87,7 @@ void _tnl_register_fastpath( struct tnl_clipspace *vtx,
fastpath->attr_count = vtx->attr_count; fastpath->attr_count = vtx->attr_count;
fastpath->match_strides = match_strides; fastpath->match_strides = match_strides;
fastpath->func = vtx->emit; fastpath->func = vtx->emit;
fastpath->attr = (struct attr_type *) fastpath->attr = (struct tnl_attr_type *)
_mesa_malloc(vtx->attr_count * sizeof(fastpath->attr[0])); _mesa_malloc(vtx->attr_count * sizeof(fastpath->attr[0]));
for (i = 0; i < vtx->attr_count; i++) { for (i = 0; i < vtx->attr_count; i++) {