llvmpipe: add initial compute state structs
These mirror the fragment shader structs, this is just a framework. Reviewed-by: Roland Scheidegger <sroland@vmware.com>
This commit is contained in:
parent
add0b151f5
commit
3879f69b50
|
@ -152,6 +152,7 @@ llvmpipe_create_context(struct pipe_screen *screen, void *priv,
|
|||
|
||||
make_empty_list(&llvmpipe->setup_variants_list);
|
||||
|
||||
make_empty_list(&llvmpipe->cs_variants_list);
|
||||
|
||||
llvmpipe->pipe.screen = screen;
|
||||
llvmpipe->pipe.priv = priv;
|
||||
|
|
|
@ -49,6 +49,7 @@ struct draw_context;
|
|||
struct draw_stage;
|
||||
struct draw_vertex_shader;
|
||||
struct lp_fragment_shader;
|
||||
struct lp_compute_shader;
|
||||
struct lp_blend_state;
|
||||
struct lp_setup_context;
|
||||
struct lp_setup_variant;
|
||||
|
@ -66,6 +67,7 @@ struct llvmpipe_context {
|
|||
struct lp_fragment_shader *fs;
|
||||
struct draw_vertex_shader *vs;
|
||||
const struct lp_geometry_shader *gs;
|
||||
struct lp_compute_shader *cs;
|
||||
const struct lp_velems_state *velems;
|
||||
const struct lp_so_state *so;
|
||||
|
||||
|
@ -150,6 +152,10 @@ struct llvmpipe_context {
|
|||
struct lp_setup_variant_list_item setup_variants_list;
|
||||
unsigned nr_setup_variants;
|
||||
|
||||
/** List of all compute shader variants */
|
||||
struct lp_cs_variant_list_item cs_variants_list;
|
||||
unsigned nr_cs_variants;
|
||||
unsigned nr_cs_instrs;
|
||||
struct lp_cs_context *csctx;
|
||||
|
||||
/** Conditional query object and mode */
|
||||
|
|
|
@ -30,8 +30,41 @@
|
|||
#include "util/u_thread.h"
|
||||
#include "pipe/p_state.h"
|
||||
|
||||
struct lp_compute_shader_variant;
|
||||
|
||||
struct lp_compute_shader_variant_key
|
||||
{
|
||||
};
|
||||
|
||||
struct lp_cs_variant_list_item
|
||||
{
|
||||
struct lp_compute_shader_variant *base;
|
||||
struct lp_cs_variant_list_item *next, *prev;
|
||||
};
|
||||
|
||||
struct lp_compute_shader_variant
|
||||
{
|
||||
struct lp_compute_shader_variant_key key;
|
||||
|
||||
struct gallivm_state *gallivm;
|
||||
};
|
||||
|
||||
struct lp_compute_shader {
|
||||
struct pipe_shader_state base;
|
||||
|
||||
struct lp_cs_variant_list_item variants;
|
||||
};
|
||||
|
||||
struct lp_cs_exec {
|
||||
struct lp_compute_shader_variant *variant;
|
||||
};
|
||||
|
||||
struct lp_cs_context {
|
||||
struct pipe_context *pipe;
|
||||
|
||||
struct {
|
||||
struct lp_cs_exec current;
|
||||
} cs;
|
||||
};
|
||||
|
||||
struct lp_cs_context *lp_csctx_create(struct pipe_context *pipe);
|
||||
|
|
Loading…
Reference in New Issue