i965: Fix emit of a MOV with bad destination channel on gen6 math in FPs.
[mesa.git] / src / mesa / drivers / dri / i915 / intel_render.c
index 410052b3c2be73c0b4c1244c369eb5eba5262554..432fc7a14b0ac2c332a92cc3451d334de5a930b9 100644 (file)
@@ -37,6 +37,8 @@
 #include "main/mtypes.h"
 #include "main/enums.h"
 
+#include "math/m_xform.h"
+
 #include "tnl/t_context.h"
 #include "tnl/t_vertex.h"
 #include "tnl/t_pipeline.h"
@@ -117,19 +119,19 @@ intelDmaPrimitive(struct intel_context *intel, GLenum prim)
    intel_set_prim(intel, hw_prim[prim]);
 }
 
-static inline GLuint intel_get_vb_max(struct intel_context *intel)
+static INLINE GLuint intel_get_vb_max(struct intel_context *intel)
 {
    GLuint ret;
 
    if (intel->intelScreen->no_vbo)
-      ret = intel->batch->size - 1500;
+      ret = sizeof(intel->batch.map) - 1500;
    else
       ret = INTEL_VB_SIZE;
    ret /= (intel->vertex_size * 4);
    return ret;
 }
 
-static inline GLuint intel_get_current_max(struct intel_context *intel)
+static INLINE GLuint intel_get_current_max(struct intel_context *intel)
 {
 
    if (intel->intelScreen->no_vbo)
@@ -164,7 +166,7 @@ do {                                                \
 
 /* Heuristic to choose between the two render paths:  
  */
-static GLboolean
+static bool
 choose_render(struct intel_context *intel, struct vertex_buffer *VB)
 {
    int vertsz = intel->vertex_size;
@@ -207,14 +209,14 @@ choose_render(struct intel_context *intel, struct vertex_buffer *VB)
               cost_render, cost_fallback);
 
    if (cost_render > cost_fallback)
-      return GL_FALSE;
+      return false;
 
-   return GL_TRUE;
+   return true;
 }
 
 
 static GLboolean
-intel_run_render(GLcontext * ctx, struct tnl_pipeline_stage *stage)
+intel_run_render(struct gl_context * ctx, struct tnl_pipeline_stage *stage)
 {
    struct intel_context *intel = intel_context(ctx);
    TNLcontext *tnl = TNL_CONTEXT(ctx);
@@ -227,7 +229,7 @@ intel_run_render(GLcontext * ctx, struct tnl_pipeline_stage *stage)
     */
    if (intel->RenderIndex != 0 ||
        !intel_validate_render(ctx, VB) || !choose_render(intel, VB)) {
-      return GL_TRUE;
+      return true;
    }
 
    tnl->clipspace.new_inputs |= VERT_BIT_POS;
@@ -250,7 +252,7 @@ intel_run_render(GLcontext * ctx, struct tnl_pipeline_stage *stage)
 
    INTEL_FIREVERTICES(intel);
 
-   return GL_FALSE;             /* finished the pipe */
+   return false;             /* finished the pipe */
 }
 
 static const struct tnl_pipeline_stage _intel_render_stage = {
@@ -264,7 +266,6 @@ static const struct tnl_pipeline_stage _intel_render_stage = {
 
 const struct tnl_pipeline_stage *intel_pipeline[] = {
    &_tnl_vertex_transform_stage,
-   &_tnl_vertex_cull_stage,
    &_tnl_normal_transform_stage,
    &_tnl_lighting_stage,
    &_tnl_fog_coordinate_stage,