summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/draw/draw_llvm.h
diff options
context:
space:
mode:
authorJosé Fonseca <jfonseca@vmware.com>2010-04-25 21:43:49 +0100
committerJosé Fonseca <jfonseca@vmware.com>2010-04-25 23:41:49 +0100
commit4dd1a568404dcf068cb111db04bb6e904b91d7bd (patch)
tree4cf82dd2855442e512e53e47e2a476188cd35d4a /src/gallium/auxiliary/draw/draw_llvm.h
parent2cd128ab443addeb6e013f80d7c3f6639a66b2f1 (diff)
downloadexternal_mesa3d-4dd1a568404dcf068cb111db04bb6e904b91d7bd.zip
external_mesa3d-4dd1a568404dcf068cb111db04bb6e904b91d7bd.tar.gz
external_mesa3d-4dd1a568404dcf068cb111db04bb6e904b91d7bd.tar.bz2
draw: Respect pipe_vertex_buffer::max_index in llvm generated code.
Everybody should respect max_index, specially llvm generated code, which likes to eat vertices 4 at a time, so it may end up chew a bit a bit more than actually exists.
Diffstat (limited to 'src/gallium/auxiliary/draw/draw_llvm.h')
-rw-r--r--src/gallium/auxiliary/draw/draw_llvm.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h
index 28b9044..20f4f3d 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.h
+++ b/src/gallium/auxiliary/draw/draw_llvm.h
@@ -78,7 +78,10 @@ struct draw_jit_context
#define draw_jit_vbuffer_stride(_builder, _ptr) \
lp_build_struct_get(_builder, _ptr, 0, "stride")
-#define draw_jit_vbuffer_offset(_builder, _ptr) \
+#define draw_jit_vbuffer_max_index(_builder, _ptr) \
+ lp_build_struct_get(_builder, _ptr, 1, "max_index")
+
+#define draw_jit_vbuffer_offset(_builder, _ptr) \
lp_build_struct_get(_builder, _ptr, 2, "buffer_offset")