Mesa (gallium_draw_llvm): draw llvm: when generating the vertex_header struct adjust its name
Zack Rusin
zack at kemper.freedesktop.org
Mon Apr 5 20:40:06 UTC 2010
Module: Mesa
Branch: gallium_draw_llvm
Commit: 1b0bab167cd541f70c32249ca3e70da88b8c93c5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1b0bab167cd541f70c32249ca3e70da88b8c93c5
Author: Zack Rusin <zackr at vmware.com>
Date: Mon Apr 5 16:43:53 2010 -0400
draw llvm: when generating the vertex_header struct adjust its name
change the name to not clash and accuretly represent the number of inputs
we store in the data member
---
src/gallium/auxiliary/draw/draw_llvm.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c
index 388c991..382f765 100644
--- a/src/gallium/auxiliary/draw/draw_llvm.c
+++ b/src/gallium/auxiliary/draw/draw_llvm.c
@@ -89,6 +89,9 @@ create_vertex_header(struct draw_llvm *llvm, int data_elems)
/* struct vertex_header */
LLVMTypeRef elem_types[3];
LLVMTypeRef vertex_header;
+ char struct_name[24];
+
+ snprintf(struct_name, 23, "vertex_header%d", data_elems);
elem_types[0] = LLVMIntType(32);
elem_types[1] = LLVMArrayType(LLVMFloatType(), 4);
@@ -117,7 +120,7 @@ create_vertex_header(struct draw_llvm *llvm, int data_elems)
llvm->target, vertex_header,
DRAW_JIT_VERTEX_DATA);
- LLVMAddTypeName(llvm->module, "vertex_header", vertex_header);
+ LLVMAddTypeName(llvm->module, struct_name, vertex_header);
return LLVMPointerType(vertex_header, 0);
}
More information about the mesa-commit
mailing list