diff options
author | Keith Whitwell <keithw@vmware.com> | 2010-10-17 17:53:29 -0700 |
---|---|---|
committer | Keith Whitwell <keithw@vmware.com> | 2010-10-17 17:53:29 -0700 |
commit | b5236f3da482665567a9d53264e6203092120c31 (patch) | |
tree | 4dcd22bcb4c4f54d8aa9b74350354b3dbed6fde4 /src/gallium/auxiliary/draw | |
parent | c1d6b318661de2acdee38254d3750ed8dfc09e8b (diff) | |
download | external_mesa3d-b5236f3da482665567a9d53264e6203092120c31.zip external_mesa3d-b5236f3da482665567a9d53264e6203092120c31.tar.gz external_mesa3d-b5236f3da482665567a9d53264e6203092120c31.tar.bz2 |
llvmpipe: clean up fields in draw_llvm_variant_key
Diffstat (limited to 'src/gallium/auxiliary/draw')
-rw-r--r-- | src/gallium/auxiliary/draw/draw_llvm.c | 15 | ||||
-rw-r--r-- | src/gallium/auxiliary/draw/draw_llvm.h | 8 |
2 files changed, 9 insertions, 14 deletions
diff --git a/src/gallium/auxiliary/draw/draw_llvm.c b/src/gallium/auxiliary/draw/draw_llvm.c index 7afa37b..ebd8b9d 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.c +++ b/src/gallium/auxiliary/draw/draw_llvm.c @@ -847,7 +847,7 @@ generate_clipmask(LLVMBuilderRef builder, boolean clip_xy, boolean clip_z, boolean clip_user, - boolean enable_d3dclipping, + boolean clip_halfz, unsigned nr, LLVMValueRef context_ptr) { @@ -900,7 +900,7 @@ generate_clipmask(LLVMBuilderRef builder, } if (clip_z){ - if (enable_d3dclipping){ + if (clip_halfz){ /* plane 5 */ test = lp_build_compare(builder, f32_type, PIPE_FUNC_GREATER, zero, pos_z); temp = LLVMBuildShl(builder, temp, shift, ""); @@ -980,18 +980,13 @@ clipmask_bool(LLVMBuilderRef builder, LLVMValueRef temp; int i; - LLVMDumpValue(clipmask); - for (i=0; i<4; i++){ temp = LLVMBuildExtractElement(builder, clipmask, LLVMConstInt(LLVMInt32Type(), i, 0) , ""); ret = LLVMBuildOr(builder, ret, temp, ""); - LLVMDumpValue(ret); } LLVMBuildStore(builder, ret, ret_ptr); - LLVMDumpValue(ret_ptr); - } static void @@ -1133,7 +1128,7 @@ draw_llvm_generate(struct draw_llvm *llvm, struct draw_llvm_variant *variant) variant->key.clip_xy, variant->key.clip_z, variant->key.clip_user, - variant->key.enable_d3dclipping, + variant->key.clip_halfz, variant->key.nr_planes, context_ptr); /* return clipping boolean value for function */ @@ -1344,7 +1339,7 @@ draw_llvm_generate_elts(struct draw_llvm *llvm, struct draw_llvm_variant *varian variant->key.clip_xy, variant->key.clip_z, variant->key.clip_user, - variant->key.enable_d3dclipping, + variant->key.clip_halfz, variant->key.nr_planes, context_ptr); /* return clipping boolean value for function */ @@ -1428,7 +1423,7 @@ draw_llvm_make_variant_key(struct draw_llvm *llvm, char *store) key->clip_z = llvm->draw->clip_z; key->clip_user = llvm->draw->clip_user; key->bypass_viewport = llvm->draw->identity_viewport; - key->enable_d3dclipping = (boolean)!llvm->draw->rasterizer->gl_rasterization_rules; + key->clip_halfz = !llvm->draw->rasterizer->gl_rasterization_rules; key->need_edgeflags = (llvm->draw->vs.edgeflag_output ? TRUE : FALSE); key->nr_planes = llvm->draw->nr_planes; key->pad = 0; diff --git a/src/gallium/auxiliary/draw/draw_llvm.h b/src/gallium/auxiliary/draw/draw_llvm.h index def0681..b5b8c66 100644 --- a/src/gallium/auxiliary/draw/draw_llvm.h +++ b/src/gallium/auxiliary/draw/draw_llvm.h @@ -160,16 +160,16 @@ typedef int struct draw_llvm_variant_key { - unsigned nr_vertex_elements:16; - unsigned nr_samplers:12; + unsigned nr_vertex_elements:8; + unsigned nr_samplers:8; unsigned clip_xy:1; unsigned clip_z:1; unsigned clip_user:1; + unsigned clip_halfz:1; unsigned bypass_viewport:1; - unsigned enable_d3dclipping:1; unsigned need_edgeflags:1; unsigned nr_planes:4; - unsigned pad:26; + unsigned pad:6; /* Variable number of vertex elements: */ |