i965: Rename do_<stage>_prog to brw_compile_<stage>_prog (and export)
[mesa.git] / src / mesa / drivers / dri / nouveau / nouveau_state.c
index 5155da96eaaa556f35d5eb1e6a5942d81c618e2b..3aad10ed62eb254ada71a482177d6e5222fd3a92 100644 (file)
@@ -106,12 +106,6 @@ nouveau_depth_mask(struct gl_context *ctx, GLboolean flag)
        context_dirty(ctx, DEPTH);
 }
 
-static void
-nouveau_depth_range(struct gl_context *ctx, GLclampd nearval, GLclampd farval)
-{
-       context_dirty(ctx, VIEWPORT);
-}
-
 static void
 nouveau_read_buffer(struct gl_context *ctx, GLenum buffer)
 {
@@ -325,7 +319,7 @@ nouveau_polygon_mode(struct gl_context *ctx, GLenum face, GLenum mode)
 }
 
 static void
-nouveau_polygon_offset(struct gl_context *ctx, GLfloat factor, GLfloat units)
+nouveau_polygon_offset(struct gl_context *ctx, GLfloat factor, GLfloat units, GLfloat clamp)
 {
        context_dirty(ctx, POLYGON_OFFSET);
 }
@@ -342,12 +336,6 @@ nouveau_render_mode(struct gl_context *ctx, GLenum mode)
        context_dirty(ctx, RENDER_MODE);
 }
 
-static void
-nouveau_scissor(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
-{
-       context_dirty(ctx, SCISSOR);
-}
-
 static void
 nouveau_shade_model(struct gl_context *ctx, GLenum mode)
 {
@@ -404,7 +392,7 @@ nouveau_tex_env(struct gl_context *ctx, GLenum target, GLenum pname,
 }
 
 static void
-nouveau_tex_parameter(struct gl_context *ctx, GLenum target,
+nouveau_tex_parameter(struct gl_context *ctx,
                      struct gl_texture_object *t, GLenum pname,
                      const GLfloat *params)
 {
@@ -429,12 +417,6 @@ nouveau_tex_parameter(struct gl_context *ctx, GLenum target,
        }
 }
 
-static void
-nouveau_viewport(struct gl_context *ctx, GLint x, GLint y, GLsizei w, GLsizei h)
-{
-       context_dirty(ctx, VIEWPORT);
-}
-
 void
 nouveau_emit_nothing(struct gl_context *ctx, int emit)
 {
@@ -483,6 +465,12 @@ nouveau_update_state(struct gl_context *ctx, GLbitfield new_state)
                        context_dirty_i(ctx, TEX_MAT, i);
        }
 
+       if (new_state & _NEW_SCISSOR)
+               context_dirty(ctx, SCISSOR);
+
+       if (new_state & _NEW_VIEWPORT)
+               context_dirty(ctx, VIEWPORT);
+
        if (new_state & _NEW_CURRENT_ATTRIB &&
            new_state & _NEW_LIGHT) {
                context_dirty(ctx, MATERIAL_FRONT_AMBIENT);
@@ -504,6 +492,7 @@ nouveau_update_state(struct gl_context *ctx, GLbitfield new_state)
 
        _swrast_InvalidateState(ctx, new_state);
        _tnl_InvalidateState(ctx, new_state);
+       _vbo_InvalidateState(ctx, new_state);
 
        nouveau_state_emit(ctx);
 }
@@ -524,7 +513,6 @@ nouveau_state_init(struct gl_context *ctx)
        ctx->Driver.FrontFace = nouveau_front_face;
        ctx->Driver.DepthFunc = nouveau_depth_func;
        ctx->Driver.DepthMask = nouveau_depth_mask;
-       ctx->Driver.DepthRange = nouveau_depth_range;
        ctx->Driver.ReadBuffer = nouveau_read_buffer;
        ctx->Driver.DrawBuffers = nouveau_draw_buffers;
        ctx->Driver.Enable = nouveau_enable;
@@ -540,7 +528,6 @@ nouveau_state_init(struct gl_context *ctx)
        ctx->Driver.PolygonOffset = nouveau_polygon_offset;
        ctx->Driver.PolygonStipple = nouveau_polygon_stipple;
        ctx->Driver.RenderMode = nouveau_render_mode;
-       ctx->Driver.Scissor = nouveau_scissor;
        ctx->Driver.ShadeModel = nouveau_shade_model;
        ctx->Driver.StencilFuncSeparate = nouveau_stencil_func_separate;
        ctx->Driver.StencilMaskSeparate = nouveau_stencil_mask_separate;
@@ -548,7 +535,6 @@ nouveau_state_init(struct gl_context *ctx)
        ctx->Driver.TexGen = nouveau_tex_gen;
        ctx->Driver.TexEnv = nouveau_tex_env;
        ctx->Driver.TexParameter = nouveau_tex_parameter;
-       ctx->Driver.Viewport = nouveau_viewport;
 
        ctx->Driver.UpdateState = nouveau_update_state;