aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_draw.h
diff options
context:
space:
mode:
authorDave Airlie <[email protected]>2009-03-20 10:52:17 +1000
committerDave Airlie <[email protected]>2009-03-20 10:52:17 +1000
commit407e8ae5b167b0193e1e5b1266a5d61ed836dfb5 (patch)
tree2d9d05a5c3122f41a13aa8bd9ae921c1176e6b0d /src/mesa/state_tracker/st_draw.h
parentbdaa0341caffc353fd26bbd91865c2d86eed11c1 (diff)
parent114bb54324f22cb53bcd14607234d0acd74d37bd (diff)
Merge remote branch 'main/master' into radeon-rewrite
Conflicts: src/mesa/drivers/dri/r300/r300_cmdbuf.c src/mesa/drivers/dri/r300/r300_state.c src/mesa/drivers/dri/r300/r300_swtcl.c src/mesa/drivers/dri/r300/radeon_ioctl.c src/mesa/drivers/dri/radeon/radeon_screen.c
Diffstat (limited to 'src/mesa/state_tracker/st_draw.h')
-rw-r--r--src/mesa/state_tracker/st_draw.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h
index 659c3ac834f..da04fce8e24 100644
--- a/src/mesa/state_tracker/st_draw.h
+++ b/src/mesa/state_tracker/st_draw.h
@@ -64,4 +64,19 @@ st_feedback_draw_vbo(GLcontext *ctx,
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