diff options
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/auxiliary/Makefile | 10 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_llvm.c | 10 | ||||
-rw-r--r-- | src/gallium/auxiliary/gallivm/lp_bld_init.c | 8 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_format_srgb.py | 4 | ||||
-rwxr-xr-x | src/gallium/auxiliary/util/u_format_table.py | 4 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/Makefile | 2 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_state_fs.c | 5 | ||||
-rw-r--r-- | src/gallium/drivers/llvmpipe/lp_tile_soa.py | 4 | ||||
-rw-r--r-- | src/gallium/drivers/r300/r300_state_derived.c | 13 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_asm.c | 8 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe.c | 2 | ||||
-rw-r--r-- | src/gallium/winsys/r600/drm/radeon_bo.c | 2 |
12 files changed, 27 insertions, 45 deletions
diff --git a/src/gallium/auxiliary/Makefile b/src/gallium/auxiliary/Makefile index abd33f6eef..f37d59e9a3 100644 --- a/src/gallium/auxiliary/Makefile +++ b/src/gallium/auxiliary/Makefile @@ -211,16 +211,16 @@ include ../Makefile.template indices/u_indices_gen.c: indices/u_indices_gen.py - python $< > $@ + $(PYTHON2) $< > $@ indices/u_unfilled_gen.c: indices/u_unfilled_gen.py - python $< > $@ + $(PYTHON2) $< > $@ util/u_format_srgb.c: util/u_format_srgb.py - python $< > $@ + $(PYTHON2) $< > $@ util/u_format_table.c: util/u_format_table.py util/u_format_pack.py util/u_format_parse.py util/u_format.csv - python util/u_format_table.py util/u_format.csv > $@ + $(PYTHON2) util/u_format_table.py util/u_format.csv > $@ util/u_half.c: util/u_half.py - python util/u_half.py > $@ + $(PYTHON2) util/u_half.py > $@ diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 140e596f99..2b5f01cda7 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -1164,11 +1164,6 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) sampler->destroy(sampler); -#ifdef PIPE_ARCH_X86 - /* Avoid corrupting the FPU stack on 32bit OSes. */ - lp_build_intrinsic(builder, "llvm.x86.mmx.emms", LLVMVoidType(), NULL, 0); -#endif - ret = LLVMBuildLoad(builder, ret_ptr,""); LLVMBuildRet(builder, ret); @@ -1378,11 +1373,6 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian sampler->destroy(sampler); -#ifdef PIPE_ARCH_X86 - /* Avoid corrupting the FPU stack on 32bit OSes. */ - lp_build_intrinsic(builder, "llvm.x86.mmx.emms", LLVMVoidType(), NULL, 0); -#endif - ret = LLVMBuildLoad(builder, ret_ptr,""); LLVMBuildRet(builder, ret); diff --git a/src/gallium/auxiliary/gallivm/lp_bld_init.c b/src/gallium/auxiliary/gallivm/lp_bld_init.c index 5598ca5c48..0b9a6f745f 100644 --- a/src/gallium/auxiliary/gallivm/lp_bld_init.c +++ b/src/gallium/auxiliary/gallivm/lp_bld_init.c @@ -145,13 +145,7 @@ lp_build_init(void) LLVMAddCFGSimplificationPass(lp_build_pass); LLVMAddPromoteMemoryToRegisterPass(lp_build_pass); LLVMAddConstantPropagationPass(lp_build_pass); - if(util_cpu_caps.has_sse4_1) { - /* FIXME: There is a bug in this pass, whereby the combination of fptosi - * and sitofp (necessary for trunc/floor/ceil/round implementation) - * somehow becomes invalid code. - */ - LLVMAddInstructionCombiningPass(lp_build_pass); - } + LLVMAddInstructionCombiningPass(lp_build_pass); LLVMAddGVNPass(lp_build_pass); } else { /* We need at least this pass to prevent the backends to fail in diff --git a/src/gallium/auxiliary/util/u_format_srgb.py b/src/gallium/auxiliary/util/u_format_srgb.py index 3e8000f368..cd63ae7891 100644 --- a/src/gallium/auxiliary/util/u_format_srgb.py +++ b/src/gallium/auxiliary/util/u_format_srgb.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -''' +CopyRight = ''' /************************************************************************** * * Copyright 2010 VMware, Inc. @@ -89,7 +89,7 @@ def main(): print '/* This file is autogenerated by u_format_srgb.py. Do not edit directly. */' print # This will print the copyright message on the top of this file - print __doc__.strip() + print CopyRight.strip() print print '#include "u_format_srgb.h"' print diff --git a/src/gallium/auxiliary/util/u_format_table.py b/src/gallium/auxiliary/util/u_format_table.py index f0b407b8b8..8cc22a5637 100755 --- a/src/gallium/auxiliary/util/u_format_table.py +++ b/src/gallium/auxiliary/util/u_format_table.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -''' +CopyRight = ''' /************************************************************************** * * Copyright 2010 VMware, Inc. @@ -83,7 +83,7 @@ def write_format_table(formats): print '/* This file is autogenerated by u_format_table.py from u_format.csv. Do not edit directly. */' print # This will print the copyright message on the top of this file - print __doc__.strip() + print CopyRight.strip() print print '#include "u_format.h"' print '#include "u_format_s3tc.h"' diff --git a/src/gallium/drivers/llvmpipe/Makefile b/src/gallium/drivers/llvmpipe/Makefile index 08da2286b0..669e42e300 100644 --- a/src/gallium/drivers/llvmpipe/Makefile +++ b/src/gallium/drivers/llvmpipe/Makefile @@ -69,7 +69,7 @@ lp_test_sincos.o : sse_mathfun.h PROGS_DEPS := ../../auxiliary/libgallium.a lp_tile_soa.c: lp_tile_soa.py ../../auxiliary/util/u_format_parse.py ../../auxiliary/util/u_format_pack.py ../../auxiliary/util/u_format.csv - python lp_tile_soa.py ../../auxiliary/util/u_format.csv > $@ + $(PYTHON2) $(PYTHON_FLAGS) lp_tile_soa.py ../../auxiliary/util/u_format.csv > $@ LDFLAGS += $(LLVM_LDFLAGS) LIBS += -L../../auxiliary/ -lgallium libllvmpipe.a $(LLVM_LIBS) $(GL_LIB_DEPS) diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index 9fbedac165..e4495e33d0 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -761,11 +761,6 @@ generate_fragment(struct llvmpipe_screen *screen, } } -#ifdef PIPE_ARCH_X86 - /* Avoid corrupting the FPU stack on 32bit OSes. */ - lp_build_intrinsic(builder, "llvm.x86.mmx.emms", LLVMVoidType(), NULL, 0); -#endif - LLVMBuildRetVoid(builder); LLVMDisposeBuilder(builder); diff --git a/src/gallium/drivers/llvmpipe/lp_tile_soa.py b/src/gallium/drivers/llvmpipe/lp_tile_soa.py index e49f9c62fe..8df7b236fe 100644 --- a/src/gallium/drivers/llvmpipe/lp_tile_soa.py +++ b/src/gallium/drivers/llvmpipe/lp_tile_soa.py @@ -1,6 +1,6 @@ #!/usr/bin/env python -''' +CopyRight = ''' /************************************************************************** * * Copyright 2009 VMware, Inc. @@ -510,7 +510,7 @@ def main(): print '/* This file is autogenerated by lp_tile_soa.py from u_format.csv. Do not edit directly. */' print # This will print the copyright message on the top of this file - print __doc__.strip() + print CopyRight.strip() print print '#include "pipe/p_compiler.h"' print '#include "util/u_format.h"' diff --git a/src/gallium/drivers/r300/r300_state_derived.c b/src/gallium/drivers/r300/r300_state_derived.c index 730ef7a3ee..50366e32c2 100644 --- a/src/gallium/drivers/r300/r300_state_derived.c +++ b/src/gallium/drivers/r300/r300_state_derived.c @@ -620,17 +620,18 @@ static uint32_t r300_get_border_color(enum pipe_format format, } break; - case 8: - r = ((float_to_ubyte(border_swizzled[0]) & 0xff) << 0) | + case 16: + r = ((float_to_ubyte(border_swizzled[2]) & 0xff) << 0) | ((float_to_ubyte(border_swizzled[1]) & 0xff) << 8) | - ((float_to_ubyte(border_swizzled[2]) & 0xff) << 16) | + ((float_to_ubyte(border_swizzled[0]) & 0xff) << 16) | ((float_to_ubyte(border_swizzled[3]) & 0xff) << 24); break; - case 16: - r = ((float_to_ubyte(border_swizzled[2]) & 0xff) << 0) | + case 8: + default: + r = ((float_to_ubyte(border_swizzled[0]) & 0xff) << 0) | ((float_to_ubyte(border_swizzled[1]) & 0xff) << 8) | - ((float_to_ubyte(border_swizzled[0]) & 0xff) << 16) | + ((float_to_ubyte(border_swizzled[2]) & 0xff) << 16) | ((float_to_ubyte(border_swizzled[3]) & 0xff) << 24); break; } diff --git a/src/gallium/drivers/r600/r600_asm.c b/src/gallium/drivers/r600/r600_asm.c index c22628423b..8a7f3ce575 100644 --- a/src/gallium/drivers/r600/r600_asm.c +++ b/src/gallium/drivers/r600/r600_asm.c @@ -879,15 +879,15 @@ int r600_bc_build(struct r600_bc *bc) void r600_bc_clear(struct r600_bc *bc) { - struct r600_bc_cf *cf, *next_cf; + struct r600_bc_cf *cf = NULL, *next_cf; free(bc->bytecode); bc->bytecode = NULL; LIST_FOR_EACH_ENTRY_SAFE(cf, next_cf, &bc->cf, list) { - struct r600_bc_alu *alu, *next_alu; - struct r600_bc_tex *tex, *next_tex; - struct r600_bc_tex *vtx, *next_vtx; + struct r600_bc_alu *alu = NULL, *next_alu; + struct r600_bc_tex *tex = NULL, *next_tex; + struct r600_bc_tex *vtx = NULL, *next_vtx; LIST_FOR_EACH_ENTRY_SAFE(alu, next_alu, &cf->alu, list) { free(alu); diff --git a/src/gallium/drivers/r600/r600_pipe.c b/src/gallium/drivers/r600/r600_pipe.c index bea7ef5df8..3564539843 100644 --- a/src/gallium/drivers/r600/r600_pipe.c +++ b/src/gallium/drivers/r600/r600_pipe.c @@ -82,6 +82,8 @@ static void r600_destroy_context(struct pipe_context *context) free(rctx->states[i]); } + util_blitter_destroy(rctx->blitter); + u_upload_destroy(rctx->upload_vb); u_upload_destroy(rctx->upload_ib); diff --git a/src/gallium/winsys/r600/drm/radeon_bo.c b/src/gallium/winsys/r600/drm/radeon_bo.c index 9d664b7e53..2d08686fc4 100644 --- a/src/gallium/winsys/r600/drm/radeon_bo.c +++ b/src/gallium/winsys/r600/drm/radeon_bo.c @@ -82,6 +82,7 @@ struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle, bo->handle = handle; pipe_reference_init(&bo->reference, 1); bo->alignment = alignment; + LIST_INITHEAD(&bo->fencedlist); if (handle) { struct drm_gem_open open_arg; @@ -123,7 +124,6 @@ struct radeon_bo *radeon_bo(struct radeon *radeon, unsigned handle, if (ptr) { memcpy(bo->data, ptr, size); } - LIST_INITHEAD(&bo->fencedlist); return bo; } |