Fix crashes during rasterization fallback by avoiding _tnl_need_projected_coords
[mesa.git] / src / mesa / drivers / dri / radeon / radeon_context.h
index c1803130969a4c7a8777d77ef05cf1b6657f8e99..3019602b7cff9c2ba87265bebbf71bde997b0686 100644 (file)
@@ -38,8 +38,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #ifndef __RADEON_CONTEXT_H__
 #define __RADEON_CONTEXT_H__
 
-#ifdef GLX_DIRECT_RENDERING
-
+#include "tnl/t_vertex.h"
 #include "dri_util.h"
 #include "drm.h"
 #include "radeon_drm.h"
@@ -164,6 +163,8 @@ struct radeon_tex_obj {
    GLuint pp_cubic_faces;              /* cube face 1,2,3,4 log2 sizes */
 
    GLboolean  border_fallback;
+
+   GLuint tile_bits;                   /* hw texture tile bits used on this texture */
 };
 
 
@@ -188,7 +189,7 @@ struct radeon_state_atom {
    GLboolean dirty;                      /* dirty-mark in emit_state_list */
    GLboolean (*check)( GLcontext * );    /* is this state active? */
 };
-   
+
 
 
 /* Trying to keep these relatively short as the variables are becoming
@@ -530,12 +531,13 @@ struct radeon_tcl_info {
 /* radeon_swtcl.c
  */
 struct radeon_swtcl_info {
-   GLuint SetupIndex;
-   GLuint SetupNewInputs;
    GLuint RenderIndex;
    GLuint vertex_size;
-   GLuint vertex_stride_shift;
    GLuint vertex_format;
+
+   struct tnl_attr_map vertex_attrs[VERT_ATTRIB_MAX];
+   GLuint vertex_attr_count;
+
    GLubyte *verts;
 
    /* Fallback rasterization functions
@@ -548,6 +550,18 @@ struct radeon_swtcl_info {
    GLenum render_primitive;
    GLuint numverts;
 
+   /**
+    * Offset of the 4UB color data within a hardware (swtcl) vertex.
+    */
+   GLuint coloroffset;
+
+   /**
+    * Offset of the 3UB specular color data within a hardware (swtcl) vertex.
+    */
+   GLuint specoffset;
+
+   GLboolean needproj;
+
    struct radeon_dma_region indexed_verts;
 };
 
@@ -707,6 +721,7 @@ struct radeon_context {
    GLuint TclFallback;
    GLuint Fallback;
    GLuint NewGLState;
+   GLuint tnl_index;   /* index of bits for last tnl_install_attrs */
 
    /* Vertex buffers
     */
@@ -783,6 +798,7 @@ struct radeon_context {
    driOptionCache optionCache;
 
    GLboolean using_hyperz;
+   GLboolean texmicrotile;
 
    /* Performance counters
     */
@@ -850,5 +866,4 @@ extern int RADEON_DEBUG;
 #define DEBUG_SANITY    0x800
 #define DEBUG_SYNC     0x1000
 
-#endif
 #endif /* __RADEON_CONTEXT_H__ */