X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fgallium%2Fdrivers%2Fllvmpipe%2Flp_state_fs.h;h=273d241d8fc1cbc16c0fbcc0c0ad1f0ce612a430;hb=4445e170bee23a3607ece0e010adef7058ac6a11;hp=4999b8dca1a2433d41ea508de10b6f314e5ff30e;hpb=d49f153ab36fec16f687f35f3a9aaf19fb7254be;p=mesa.git diff --git a/src/gallium/drivers/llvmpipe/lp_state_fs.h b/src/gallium/drivers/llvmpipe/lp_state_fs.h index 4999b8dca1a..273d241d8fc 100644 --- a/src/gallium/drivers/llvmpipe/lp_state_fs.h +++ b/src/gallium/drivers/llvmpipe/lp_state_fs.h @@ -34,6 +34,8 @@ #include "pipe/p_state.h" #include "tgsi/tgsi_scan.h" /* for tgsi_shader_info */ #include "gallivm/lp_bld_sample.h" /* for struct lp_sampler_static_state */ +#include "gallivm/lp_bld_tgsi.h" /* for lp_tgsi_info */ +#include "lp_bld_interp.h" /* for struct lp_shader_input */ struct tgsi_token; @@ -67,12 +69,15 @@ struct lp_fragment_shader_variant_key struct lp_sampler_static_state sampler[PIPE_MAX_SAMPLERS]; }; + +/** doubly-linked list item */ struct lp_fs_variant_list_item { struct lp_fragment_shader_variant *base; struct lp_fs_variant_list_item *next, *prev; }; + struct lp_fragment_shader_variant { struct lp_fragment_shader_variant_key key; @@ -83,6 +88,9 @@ struct lp_fragment_shader_variant lp_jit_frag_func jit_function[2]; + /* Total number of LLVM instructions generated */ + unsigned nr_instrs; + struct lp_fs_variant_list_item list_item_global, list_item_local; struct lp_fragment_shader *shader; @@ -96,7 +104,7 @@ struct lp_fragment_shader { struct pipe_shader_state base; - struct tgsi_shader_info info; + struct lp_tgsi_info info; struct lp_fs_variant_list_item variants; @@ -107,11 +115,18 @@ struct lp_fragment_shader unsigned no; unsigned variants_created; unsigned variants_cached; + + /** Fragment shader input interpolation info */ + struct lp_shader_input inputs[PIPE_MAX_SHADER_INPUTS]; }; void lp_debug_fs_variant(const struct lp_fragment_shader_variant *variant); +void +llvmpipe_remove_shader_variant(struct llvmpipe_context *lp, + struct lp_fragment_shader_variant *variant); + #endif /* LP_STATE_FS_H_ */