fix fallback crashes when driver can't handle frag prog for i915 driver too (untested)
authorRoland Scheidegger <sroland@tungstengraphics.com>
Sun, 29 Jul 2007 16:31:36 +0000 (18:31 +0200)
committerRoland Scheidegger <sroland@tungstengraphics.com>
Sun, 29 Jul 2007 16:31:36 +0000 (18:31 +0200)
src/mesa/drivers/dri/i915/i830_vtbl.c
src/mesa/drivers/dri/i915/i915_vtbl.c
src/mesa/drivers/dri/i915/intel_context.h
src/mesa/drivers/dri/i915/intel_render.c
src/mesa/drivers/dri/i915tex/i915_context.h

index d40cf705a354bd127ac8dd979383d0d0b227a1b6..cf1d0b0c1e36e963356d8a11d1ecdfcc50c3c1f5 100644 (file)
@@ -59,6 +59,11 @@ do {                                                                 \
 #define VRTX_TEX_SET_FMT(n, x)          ((x)<<((n)*2))
 #define TEXBIND_SET(n, x)              ((x)<<((n)*4))
 
+ static void
+i830_render_prevalidate(struct intel_context *intel)
+{
+}
+
 static void i830_render_start( intelContextPtr intel )
 {
    GLcontext *ctx = &intel->ctx;
@@ -531,4 +536,5 @@ void i830InitVtbl( i830ContextPtr i830 )
    i830->intel.vtbl.update_texture_state = i830UpdateTextureState;
    i830->intel.vtbl.emit_flush = i830_emit_flush;
    i830->intel.vtbl.render_start = i830_render_start;
+   i830->intel.vtbl.render_prevalidate = i830_render_prevalidate;
 }
index cc8a605e50537c21868f96b1e4dd18035b84eb89..4ad95cf4e365044b048c84031ae8a7a2ffdbf1a5 100644 (file)
@@ -41,7 +41,8 @@
 #include "i915_reg.h"
 #include "i915_context.h"
 
-static void i915_render_start( intelContextPtr intel )
+static void
+i915_render_prevalidate(struct intel_context *intel)
 {
    GLcontext *ctx = &intel->ctx;
    i915ContextPtr i915 = I915_CONTEXT(intel);
@@ -54,6 +55,10 @@ static void i915_render_start( intelContextPtr intel )
    }
 }
 
+static void i915_render_start( intelContextPtr intel )
+{
+}
+
 
 static void i915_reduced_primitive_state( intelContextPtr intel,
                                          GLenum rprim )
@@ -454,6 +459,7 @@ void i915InitVtbl( i915ContextPtr i915 )
    i915->intel.vtbl.lost_hardware = i915_lost_hardware;
    i915->intel.vtbl.reduced_primitive_state = i915_reduced_primitive_state;
    i915->intel.vtbl.render_start = i915_render_start;
+   i915->intel.vtbl.render_prevalidate = i915_render_prevalidate;
    i915->intel.vtbl.set_color_region = i915_set_color_region;
    i915->intel.vtbl.set_z_region = i915_set_z_region;
    i915->intel.vtbl.update_color_z_regions = i915_update_color_z_regions;
index 3b50107d73f91807ea511451a078a3b1b2ff4932..914533d11bee672b369d998012ce3531de29cdba 100644 (file)
@@ -112,6 +112,7 @@ struct intel_context
       void (*update_texture_state)( intelContextPtr intel );
 
       void (*render_start)( intelContextPtr intel );
+      void (*render_prevalidate) (struct intel_context * intel);
       void (*set_color_region)( intelContextPtr intel, const intelRegion *reg );
       void (*set_z_region)( intelContextPtr intel, const intelRegion *reg );
       void (*update_color_z_regions)(intelContextPtr intel,
index d9438ba0fd898a5e3de890db8ec73e7b8a9eb9af..7bc02ba807399e3b0a35065fb4e7f69e2c0e0454 100644 (file)
@@ -199,6 +199,8 @@ static GLboolean intel_run_render( GLcontext *ctx,
    struct vertex_buffer *VB = &tnl->vb;
    GLuint i;
 
+   intel->vtbl.render_prevalidate( intel );
+
    /* Don't handle clipping or indexed vertices.
     */
    if (intel->RenderIndex != 0 || 
index d2713e88f96a2f26aa212d7fd75ba616dd161db6..3a41d66c14802bbf807a9ba125990a2d3f5518ab 100644 (file)
@@ -308,12 +308,6 @@ extern GLboolean i915CreateContext(const __GLcontextModes * mesaVis,
                                    void *sharedContextPrivate);
 
 
-/*======================================================================
- * i915_texprog.c
- */
-extern void i915ValidateTextureProgram(struct i915_context *i915);
-
-
 /*======================================================================
  * i915_debug.c
  */