struct lp_fragment_shader_variant
{
- struct lp_fragment_shader *shader;
-
struct lp_fragment_shader_variant_key key;
LLVMValueRef function[2];
struct tgsi_shader_info info;
struct lp_fragment_shader_variant *variants;
-
- struct lp_fragment_shader_variant *current;
};
if(!variant)
return NULL;
- variant->shader = shader;
memcpy(&variant->key, key, sizeof *key);
generate_fragment(lp, shader, variant, 0);
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 &&
? 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);
}