X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fmesa%2Fstate_tracker%2Fst_draw.h;h=3e0face656b0a040cdcc8d6b4cac759d5a9fd5a3;hb=273f4d6b5fe125bf0cba44c5ee8b25c76d3396c0;hp=659c3ac834f194386daae2cf92a4230847cf7ce0;hpb=0815ebccfc0a12d8f3e831928f1c4210b7f75ad8;p=mesa.git diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h index 659c3ac834f..3e0face656b 100644 --- a/src/mesa/state_tracker/st_draw.h +++ b/src/mesa/state_tracker/st_draw.h @@ -47,6 +47,7 @@ st_draw_vbo(GLcontext *ctx, const struct _mesa_prim *prims, GLuint nr_prims, const struct _mesa_index_buffer *ib, + GLboolean index_bounds_valid, GLuint min_index, GLuint max_index); @@ -56,12 +57,29 @@ st_feedback_draw_vbo(GLcontext *ctx, const struct _mesa_prim *prims, GLuint nr_prims, const struct _mesa_index_buffer *ib, + GLboolean index_bounds_valid, GLuint min_index, GLuint max_index); /* Internal function: */ extern GLuint -st_pipe_vertex_format(GLenum type, GLuint size, GLboolean normalized); +st_pipe_vertex_format(GLenum type, GLuint size, GLenum format, + GLboolean normalized); + + +/** + * When drawing with VBOs, the addresses specified with + * glVertex/Color/TexCoordPointer() are really offsets into the VBO, not real + * addresses. At some point we need to convert those pointers to offsets. + * This function is basically a cast wrapper to avoid warnings when building + * in 64-bit mode. + */ +static INLINE unsigned +pointer_to_offset(const void *ptr) +{ + return (unsigned) (((unsigned long) ptr) & 0xffffffffUL); +} + #endif