mesa: drop the buffer mode param from the DrawBuffer driver function
authorTimothy Arceri <tarceri@itsqueeze.com>
Fri, 27 Apr 2018 00:03:56 +0000 (10:03 +1000)
committerTimothy Arceri <tarceri@itsqueeze.com>
Fri, 27 Apr 2018 00:09:10 +0000 (10:09 +1000)
No drivers used it.

Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/common/driverfuncs.c
src/mesa/drivers/dri/i915/intel_buffers.c
src/mesa/drivers/dri/i965/intel_buffers.c
src/mesa/drivers/dri/nouveau/nouveau_state.c
src/mesa/drivers/dri/radeon/radeon_common.c
src/mesa/drivers/dri/radeon/radeon_common.h
src/mesa/main/buffers.c
src/mesa/main/dd.h

index b7ac2b5..e783262 100644 (file)
@@ -306,5 +306,5 @@ _mesa_init_driver_state(struct gl_context *ctx)
                                  ctx->Stencil.ZPassFunc[1]);
 
 
-   ctx->Driver.DrawBuffer(ctx, ctx->Color.DrawBuffer[0]);
+   ctx->Driver.DrawBuffer(ctx);
 }
index 386e032..83d59ed 100644 (file)
@@ -53,7 +53,7 @@ intel_check_front_buffer_rendering(struct intel_context *intel)
 }
 
 static void
-intelDrawBuffer(struct gl_context * ctx, GLenum mode)
+intelDrawBuffer(struct gl_context * ctx)
 {
    if (_mesa_is_front_buffer_drawing(ctx->DrawBuffer)) {
       struct intel_context *const intel = intel_context(ctx);
index fd522cc..dae56e3 100644 (file)
@@ -33,7 +33,7 @@
 #include "main/renderbuffer.h"
 
 static void
-intelDrawBuffer(struct gl_context * ctx, GLenum mode)
+intelDrawBuffer(struct gl_context *ctx)
 {
    if (_mesa_is_front_buffer_drawing(ctx->DrawBuffer)) {
       struct brw_context *const brw = brw_context(ctx);
index debbd38..a05c8be 100644 (file)
@@ -115,7 +115,7 @@ nouveau_read_buffer(struct gl_context *ctx, GLenum buffer)
 }
 
 static void
-nouveau_draw_buffer(struct gl_context *ctx, GLenum buffer)
+nouveau_draw_buffer(struct gl_context *ctx)
 {
        nouveau_validate_framebuffer(ctx);
        context_dirty(ctx, FRAMEBUFFER);
index 61cbf59..a3bf00b 100644 (file)
@@ -317,11 +317,10 @@ void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb)
 /**
  * Called via glDrawBuffer.
  */
-void radeonDrawBuffer( struct gl_context *ctx, GLenum mode )
+void radeonDrawBuffer(struct gl_context *ctx)
 {
        if (RADEON_DEBUG & RADEON_DRI)
-               fprintf(stderr, "%s %s\n", __func__,
-                       _mesa_enum_to_string( mode ));
+               fprintf(stderr, "%s\n", __func__);
 
        if (_mesa_is_front_buffer_drawing(ctx->DrawBuffer)) {
                radeonContextPtr radeon = RADEON_CONTEXT(ctx);
index ada4956..a39b936 100644 (file)
@@ -21,7 +21,7 @@ void radeon_clear_tris(struct gl_context *ctx, GLbitfield mask);
 
 void radeon_window_moved(radeonContextPtr radeon);
 void radeon_draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb);
-void radeonDrawBuffer( struct gl_context *ctx, GLenum mode );
+void radeonDrawBuffer(struct gl_context *ctx);
 void radeonReadBuffer( struct gl_context *ctx, GLenum mode );
 void radeon_viewport(struct gl_context *ctx);
 void radeon_fbo_init(struct radeon_context *radeon);
index ba970d8..bb85688 100644 (file)
@@ -305,7 +305,7 @@ draw_buffer(struct gl_context *ctx, struct gl_framebuffer *fb,
    /* Call device driver function only if fb is the bound draw buffer */
    if (fb == ctx->DrawBuffer) {
       if (ctx->Driver.DrawBuffer)
-         ctx->Driver.DrawBuffer(ctx, buffer);
+         ctx->Driver.DrawBuffer(ctx);
       if (ctx->Driver.DrawBufferAllocate)
          ctx->Driver.DrawBufferAllocate(ctx);
    }
@@ -588,7 +588,7 @@ draw_buffers(struct gl_context *ctx, struct gl_framebuffer *fb, GLsizei n,
     */
    if (fb == ctx->DrawBuffer) {
       if (ctx->Driver.DrawBuffer)
-         ctx->Driver.DrawBuffer(ctx, n > 0 ? buffers[0] : GL_NONE);
+         ctx->Driver.DrawBuffer(ctx);
       if (ctx->Driver.DrawBufferAllocate)
          ctx->Driver.DrawBufferAllocate(ctx);
    }
index 5ee6902..9f9606a 100644 (file)
@@ -611,7 +611,7 @@ struct dd_function_table {
    /** Specify mapping of depth values from NDC to window coordinates */
    void (*DepthRange)(struct gl_context *ctx);
    /** Specify the current buffer for writing */
-   void (*DrawBuffer)(struct gl_context *ctx, GLenum buffer);
+   void (*DrawBuffer)(struct gl_context *ctx);
    /** Used to allocated any buffers with on-demand creation */
    void (*DrawBufferAllocate)(struct gl_context *ctx);
    /** Enable or disable server-side gl capabilities */