r300-gallium: Die on bad texture formats.
[mesa.git] / src / gallium / drivers / r300 / r300_context.h
index 9d2a07a7d97702d889ae055a7ac9613fa307da35..96f1f11246cc9af04ad64df07c14aa40d62ef70d 100644 (file)
@@ -60,7 +60,7 @@ struct r300_dsa_state {
 };
 
 struct r300_rs_state {
-    /* XXX icky as fucking hell */
+    /* Draw-specific rasterizer state */
     struct pipe_rasterizer_state rs;
 
     uint32_t vap_control_status;    /* R300_VAP_CNTL_STATUS: 0x2140 */
@@ -225,10 +225,11 @@ struct r300_vertex_format {
     uint32_t vap_prog_stream_cntl[8];
     /* R300_VAP_PROG_STREAK_CNTL_EXT_[0-7] */
     uint32_t vap_prog_stream_cntl_ext[8];
-    /* This is a map of VAP/SW TCL outputs into the GA/RS.
-     * tab[i] is the location of input i in GA/RS input memory.
-     * Named tab for historical reasons. */
-    int tab[16];
+    /* Map of vertex attributes into PVS memory for HW TCL,
+     * or GA memory for SW TCL. */
+    int vs_tab[16];
+    /* Map of rasterizer attributes from GB through RS to US. */
+    int fs_tab[16];
 };
 
 struct r300_vertex_shader {
@@ -236,6 +237,9 @@ struct r300_vertex_shader {
     struct pipe_shader_state state;
     struct tgsi_shader_info info;
 
+    /* Fallback shader, because Draw has issues */
+    struct draw_vertex_shader* draw;
+
     /* Has this shader been translated yet? */
     boolean translated;
 
@@ -260,6 +264,11 @@ struct r300_context {
     /* Draw module. Used mostly for SW TCL. */
     struct draw_context* draw;
 
+    /* Vertex buffer for rendering. */
+    struct pipe_buffer* vbo;
+    /* Offset into the VBO. */
+    size_t vbo_offset;
+
     /* Various CSO state objects. */
     /* Blend state. */
     struct r300_blend_state* blend_state;
@@ -285,7 +294,7 @@ struct r300_context {
     /* Texture states. */
     struct r300_texture* textures[8];
     int texture_count;
-    /* Vertex buffers. */
+    /* Vertex buffers for Gallium. */
     struct pipe_vertex_buffer vertex_buffers[PIPE_MAX_ATTRIBS];
     int vertex_buffer_count;
     /* Vertex information. */
@@ -310,11 +319,4 @@ struct draw_stage* r300_draw_stage(struct r300_context* r300);
 void r300_init_state_functions(struct r300_context* r300);
 void r300_init_surface_functions(struct r300_context* r300);
 
-/* Fun with includes: r300_winsys also declares this prototype.
- * We'll just step out in that case... */
-#ifndef R300_WINSYS_H
-struct pipe_context* r300_create_context(struct pipe_screen* screen,
-                                         struct r300_winsys* r300_winsys);
-#endif
-
 #endif /* R300_CONTEXT_H */