These mirror the fragment shader structs, this is just a framework.
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
make_empty_list(&llvmpipe->setup_variants_list);
+ make_empty_list(&llvmpipe->cs_variants_list);
llvmpipe->pipe.screen = screen;
llvmpipe->pipe.priv = priv;
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;
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;
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 */
#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);