i965/gs: implement EndPrimitive() functionality in the visitor.
[mesa.git] / src / mesa / drivers / dri / nouveau / nouveau_state.c
index 7b7ddd2f54d30b5a7ab0ff7406d5b4407f88bfb0..5155da96eaaa556f35d5eb1e6a5942d81c618e2b 100644 (file)
@@ -112,6 +112,12 @@ 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)
+{
+       nouveau_validate_framebuffer(ctx);
+}
+
 static void
 nouveau_draw_buffers(struct gl_context *ctx, GLsizei n, const GLenum *buffers)
 {
@@ -489,6 +495,13 @@ nouveau_update_state(struct gl_context *ctx, GLbitfield new_state)
                context_dirty(ctx, MATERIAL_BACK_SHININESS);
        }
 
+       if (new_state & _NEW_TEXTURE) {
+               for (i = 0; i < ctx->Const.MaxTextureUnits; i++) {
+                       if (ctx->Texture.Unit[i].Sampler)
+                               context_dirty_i(ctx, TEX_OBJ, i);
+               }
+       }
+
        _swrast_InvalidateState(ctx, new_state);
        _tnl_InvalidateState(ctx, new_state);
 
@@ -512,6 +525,7 @@ nouveau_state_init(struct gl_context *ctx)
        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;
        ctx->Driver.Fogfv = nouveau_fog;