From: Francisco Jerez Date: Sun, 31 Oct 2010 21:07:26 +0000 (+0100) Subject: dri/nouveau: Validate the framebuffer state on read buffer changes. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=4a282629c28864b977a86cf5c314bf2fafdff3bf;p=mesa.git dri/nouveau: Validate the framebuffer state on read buffer changes. --- diff --git a/src/mesa/drivers/dri/nouveau/nouveau_state.c b/src/mesa/drivers/dri/nouveau/nouveau_state.c index 7b7ddd2f54d..1579d29efc2 100644 --- a/src/mesa/drivers/dri/nouveau/nouveau_state.c +++ b/src/mesa/drivers/dri/nouveau/nouveau_state.c @@ -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) { @@ -512,6 +518,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;