st/mesa: Treat vertex outputs absent in outputMapping as zero in mesa_to_tgsi
[mesa.git] / src / mesa / state_tracker / st_atom.h
index 68388a5674d75afcf8d3b161b6a102131afec29b..dc7aa135ac671941a4f601a44bea492b1d876f97 100644 (file)
 #include "main/glheader.h"
 
 struct st_context;
+struct st_vertex_program;
+struct st_common_variant;
+struct pipe_vertex_buffer;
+struct pipe_vertex_element;
+struct cso_velems_state;
 
 /**
  * Enumeration of state tracker pipelines.
@@ -54,10 +59,20 @@ void st_destroy_atoms( struct st_context *st );
 void st_validate_state( struct st_context *st, enum st_pipeline pipeline );
 GLuint st_compare_func_to_pipe(GLenum func);
 
-enum pipe_format
-st_pipe_vertex_format(GLenum type, GLuint size, GLenum format,
-                      GLboolean normalized, GLboolean integer);
-
+void
+st_setup_arrays(struct st_context *st,
+                const struct st_vertex_program *vp,
+                const struct st_common_variant *vp_variant,
+                struct cso_velems_state *velements,
+                struct pipe_vertex_buffer *vbuffer, unsigned *num_vbuffers,
+                bool *has_user_vertex_buffers);
+
+void
+st_setup_current_user(struct st_context *st,
+                      const struct st_vertex_program *vp,
+                      const struct st_common_variant *vp_variant,
+                      struct cso_velems_state *velements,
+                      struct pipe_vertex_buffer *vbuffer, unsigned *num_vbuffers);
 
 /* Define ST_NEW_xxx_INDEX */
 enum {
@@ -87,10 +102,10 @@ enum {
                                  ST_NEW_CS_SAMPLERS)
 
 #define ST_NEW_FRAMEBUFFER      (ST_NEW_FB_STATE | \
-                                 ST_NEW_SAMPLE_MASK | \
+                                 ST_NEW_SAMPLE_STATE | \
                                  ST_NEW_SAMPLE_SHADING)
 
-#define ST_NEW_VERTEX_PROGRAM(st, p) (p->affected_states | \
+#define ST_NEW_VERTEX_PROGRAM(st, p) ((p)->affected_states | \
                                       (st_user_clip_planes_enabled(st->ctx) ? \
                                        ST_NEW_CLIP_STATE : 0))