diff options
Diffstat (limited to 'src/gallium/drivers/llvmpipe/lp_jit.c')
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_jit.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_jit.c b/src/gallium/drivers/llvmpipe/lp_jit.c index ce92a80721a..eb1db84e4b8 100644 --- a/src/gallium/drivers/llvmpipe/lp_jit.c +++ b/src/gallium/drivers/llvmpipe/lp_jit.c @@ -68,13 +68,9 @@ lp_jit_create_types(struct llvmpipe_context *lp) elem_types[LP_JIT_TEXTURE_BORDER_COLOR] = LLVMArrayType(LLVMFloatTypeInContext(lc), 4); -#if HAVE_LLVM >= 0x0300 - texture_type = LLVMStructCreateNamed(gallivm->context, "texture"); - LLVMStructSetBody(texture_type, elem_types, - Elements(elem_types), 0); -#else texture_type = LLVMStructTypeInContext(lc, elem_types, Elements(elem_types), 0); +#if HAVE_LLVM < 0x0300 LLVMAddTypeName(gallivm->module, "texture", texture_type); LLVMInvalidateStructLayout(gallivm->target, texture_type); @@ -134,14 +130,10 @@ lp_jit_create_types(struct llvmpipe_context *lp) elem_types[LP_JIT_CTX_TEXTURES] = LLVMArrayType(texture_type, PIPE_MAX_SAMPLERS); -#if HAVE_LLVM >= 0x0300 - context_type = LLVMStructCreateNamed(gallivm->context, "context"); - LLVMStructSetBody(context_type, elem_types, - Elements(elem_types), 0); -#else context_type = LLVMStructTypeInContext(lc, elem_types, Elements(elem_types), 0); +#if HAVE_LLVM < 0x0300 LLVMInvalidateStructLayout(gallivm->target, context_type); LLVMAddTypeName(gallivm->module, "context", context_type); |