projects
/
mesa.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'mesa_7_5_branch' into mesa_7_6_branch
[mesa.git]
/
src
/
gallium
/
auxiliary
/
draw
/
draw_vertex.h
diff --git
a/src/gallium/auxiliary/draw/draw_vertex.h
b/src/gallium/auxiliary/draw/draw_vertex.h
index c143cf237230391c2990e8a00f2afbc983336e8e..554f4ac3c18eb81ef764dbb600d1e3df1b8abc6f 100644
(file)
--- a/
src/gallium/auxiliary/draw/draw_vertex.h
+++ b/
src/gallium/auxiliary/draw/draw_vertex.h
@@
-87,18
+87,17
@@
struct vertex_info
} attrib[PIPE_MAX_SHADER_INPUTS];
};
} attrib[PIPE_MAX_SHADER_INPUTS];
};
-static INLINE
in
t
+static INLINE
size_
t
draw_vinfo_size( const struct vertex_info *a )
{
draw_vinfo_size( const struct vertex_info *a )
{
- return ((const char *)&a->attrib[a->num_attribs] -
- (const char *)a);
+ return offsetof(const struct vertex_info, attrib[a->num_attribs]);
}
static INLINE int
draw_vinfo_compare( const struct vertex_info *a,
const struct vertex_info *b )
{
}
static INLINE int
draw_vinfo_compare( const struct vertex_info *a,
const struct vertex_info *b )
{
-
unsigned
sizea = draw_vinfo_size( a );
+
size_t
sizea = draw_vinfo_size( a );
return memcmp( a, b, sizea );
}
return memcmp( a, b, sizea );
}
@@
-106,7
+105,7
@@
static INLINE void
draw_vinfo_copy( struct vertex_info *dst,
const struct vertex_info *src )
{
draw_vinfo_copy( struct vertex_info *dst,
const struct vertex_info *src )
{
-
unsigned
size = draw_vinfo_size( src );
+
size_t
size = draw_vinfo_size( src );
memcpy( dst, src, size );
}
memcpy( dst, src, size );
}