intel / DRI2: When available, use DRI2GetBuffersWithFormat
[mesa.git] / src / mesa / state_tracker / st_draw.h
index c81f2b25dadba8fc19c03cd4ca138b251ccf0d41..da04fce8e24bfb832b851129a40b344c1999aa19 100644 (file)
@@ -59,4 +59,24 @@ st_feedback_draw_vbo(GLcontext *ctx,
                      GLuint min_index,
                      GLuint max_index);
 
+/* Internal function:
+ */
+extern GLuint
+st_pipe_vertex_format(GLenum type, GLuint size, 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