From a7e2470843be35b7373e48fc6be9e0f9df877afb Mon Sep 17 00:00:00 2001 From: Brian Paul Date: Wed, 28 Apr 2010 13:39:55 -0600 Subject: [PATCH] llvmpipe: remove some unneeded shader structure fields --- src/gallium/drivers/llvmpipe/lp_state.h | 4 ---- src/gallium/drivers/llvmpipe/lp_state_fs.c | 7 ++----- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/src/gallium/drivers/llvmpipe/lp_state.h b/src/gallium/drivers/llvmpipe/lp_state.h index dcbff190b62..ed75da8cbe2 100644 --- a/src/gallium/drivers/llvmpipe/lp_state.h +++ b/src/gallium/drivers/llvmpipe/lp_state.h @@ -85,8 +85,6 @@ struct lp_fragment_shader_variant_key struct lp_fragment_shader_variant { - struct lp_fragment_shader *shader; - struct lp_fragment_shader_variant_key key; LLVMValueRef function[2]; @@ -109,8 +107,6 @@ struct lp_fragment_shader struct tgsi_shader_info info; struct lp_fragment_shader_variant *variants; - - struct lp_fragment_shader_variant *current; }; diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.c b/src/gallium/drivers/llvmpipe/lp_state_fs.c index d1afb535c48..adb26f7508a 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.c +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.c @@ -937,7 +937,6 @@ generate_variant(struct llvmpipe_context *lp, if(!variant) return NULL; - variant->shader = shader; memcpy(&variant->key, key, sizeof *key); generate_fragment(lp, shader, variant, 0); @@ -1166,8 +1165,6 @@ llvmpipe_update_fs(struct llvmpipe_context *lp) LP_COUNT_ADD(nr_llvm_compiles, 2); /* emit vs. omit in/out test */ } - shader->current = variant; - /* TODO: put this in the variant */ /* TODO: most of these can be relaxed, in particular the colormask */ opaque = !key.blend.logicop_enable && @@ -1181,7 +1178,7 @@ llvmpipe_update_fs(struct llvmpipe_context *lp) ? TRUE : FALSE; lp_setup_set_fs_functions(lp->setup, - shader->current->jit_function[RAST_WHOLE], - shader->current->jit_function[RAST_EDGE_TEST], + variant->jit_function[RAST_WHOLE], + variant->jit_function[RAST_EDGE_TEST], opaque); } -- 2.30.2