draw: add vs/gs images support
[mesa.git] / src / gallium / auxiliary / draw / draw_context.h
index 3e6722fcb7e1713af0e1210c7f33ccebe3d87070..69138690de7b2fc3347bf9baf53b40f5b79c1607 100644 (file)
@@ -39,7 +39,6 @@
 
 
 #include "pipe/p_state.h"
-#include "tgsi/tgsi_exec.h"
 
 struct pipe_context;
 struct draw_context;
@@ -153,33 +152,39 @@ draw_total_gs_outputs(const struct draw_context *draw);
 
 void
 draw_texture_sampler(struct draw_context *draw,
-                     uint shader_type,
+                     enum pipe_shader_type shader_type,
                      struct tgsi_sampler *sampler);
 
 void
 draw_image(struct draw_context *draw,
-           uint shader_type,
+           enum pipe_shader_type shader_type,
            struct tgsi_image *image);
 
 void
 draw_buffer(struct draw_context *draw,
-           uint shader_type,
+           enum pipe_shader_type shader_type,
            struct tgsi_buffer *buffer);
 
 void
 draw_set_sampler_views(struct draw_context *draw,
-                       unsigned shader_stage,
+                       enum pipe_shader_type shader_stage,
                        struct pipe_sampler_view **views,
                        unsigned num);
 void
 draw_set_samplers(struct draw_context *draw,
-                  unsigned shader_stage,
+                  enum pipe_shader_type shader_stage,
                   struct pipe_sampler_state **samplers,
                   unsigned num);
 
+void
+draw_set_images(struct draw_context *draw,
+                enum pipe_shader_type shader_stage,
+                struct pipe_image_view *images,
+                unsigned num);
+
 void
 draw_set_mapped_texture(struct draw_context *draw,
-                        unsigned shader_stage,
+                        enum pipe_shader_type shader_stage,
                         unsigned sview_idx,
                         uint32_t width, uint32_t height, uint32_t depth,
                         uint32_t first_level, uint32_t last_level,
@@ -188,6 +193,14 @@ draw_set_mapped_texture(struct draw_context *draw,
                         uint32_t img_stride[PIPE_MAX_TEXTURE_LEVELS],
                         uint32_t mip_offsets[PIPE_MAX_TEXTURE_LEVELS]);
 
+void
+draw_set_mapped_image(struct draw_context *draw,
+                      enum pipe_shader_type shader_stage,
+                      unsigned idx,
+                      uint32_t width, uint32_t height, uint32_t depth,
+                      const void *base_ptr,
+                      uint32_t row_stride,
+                      uint32_t img_stride);
 
 /*
  * Vertex shader functions
@@ -250,11 +263,18 @@ void draw_set_mapped_vertex_buffer(struct draw_context *draw,
 
 void
 draw_set_mapped_constant_buffer(struct draw_context *draw,
-                                unsigned shader_type,
+                                enum pipe_shader_type shader_type,
                                 unsigned slot,
                                 const void *buffer,
                                 unsigned size);
 
+void
+draw_set_mapped_shader_buffer(struct draw_context *draw,
+                              enum pipe_shader_type shader_type,
+                              unsigned slot,
+                              const void *buffer,
+                              unsigned size);
+
 void
 draw_set_mapped_so_targets(struct draw_context *draw,
                            int num_targets,
@@ -300,10 +320,11 @@ boolean draw_need_pipeline(const struct draw_context *draw,
                            unsigned prim );
 
 int
-draw_get_shader_param(unsigned shader, enum pipe_shader_cap param);
+draw_get_shader_param(enum pipe_shader_type shader, enum pipe_shader_cap param);
 
 int
-draw_get_shader_param_no_llvm(unsigned shader, enum pipe_shader_cap param);
+draw_get_shader_param_no_llvm(enum pipe_shader_type shader,
+                              enum pipe_shader_cap param);
 
 boolean
 draw_get_option_use_llvm(void);