mesa/st: move blit function to direct call
authorDave Airlie <airlied@redhat.com>
Tue, 7 Dec 2021 02:43:29 +0000 (12:43 +1000)
committerMarge Bot <emma+marge@anholt.net>
Wed, 8 Dec 2021 19:06:48 +0000 (19:06 +0000)
Acked-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>

src/mesa/main/blit.c
src/mesa/main/dd.h
src/mesa/state_tracker/st_cb_blit.c
src/mesa/state_tracker/st_cb_blit.h
src/mesa/state_tracker/st_context.c

index 116c012..8f05d34 100644 (file)
@@ -40,6 +40,7 @@
 #include "macros.h"
 #include "state.h"
 
+#include "state_tracker/st_cb_blit.h"
 
 /** Set this to 1 to debug/log glBlitFramebuffer() calls */
 #define DEBUG_BLIT 0
@@ -572,11 +573,10 @@ blit_framebuffer(struct gl_context *ctx,
       return;
    }
 
-   assert(ctx->Driver.BlitFramebuffer);
-   ctx->Driver.BlitFramebuffer(ctx, readFb, drawFb,
-                               srcX0, srcY0, srcX1, srcY1,
-                               dstX0, dstY0, dstX1, dstY1,
-                               mask, filter);
+   st_BlitFramebuffer(ctx, readFb, drawFb,
+                      srcX0, srcY0, srcX1, srcY1,
+                      dstX0, dstY0, dstX1, dstY1,
+                      mask, filter);
 }
 
 
index a27fca9..2844d76 100644 (file)
@@ -273,16 +273,6 @@ struct dd_function_table {
    /*@}*/
 
    /**
-    * \name Functions for GL_EXT_framebuffer_{object,blit,discard}.
-    */
-   void (*BlitFramebuffer)(struct gl_context *ctx,
-                           struct gl_framebuffer *readFb,
-                           struct gl_framebuffer *drawFb,
-                           GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
-                           GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
-                           GLbitfield mask, GLenum filter);
-
-   /**
     * \name Functions for GL_ARB_sample_locations
     */
    void (*GetProgrammableSampleCaps)(struct gl_context *ctx,
index 526fb7e..d71c9c1 100644 (file)
@@ -46,7 +46,7 @@
 
 #include "util/format/u_format.h"
 
-static void
+void
 st_BlitFramebuffer(struct gl_context *ctx,
                    struct gl_framebuffer *readFB,
                    struct gl_framebuffer *drawFB,
@@ -321,10 +321,3 @@ st_BlitFramebuffer(struct gl_context *ctx,
       }
    }
 }
-
-
-void
-st_init_blit_functions(struct dd_function_table *functions)
-{
-   functions->BlitFramebuffer = st_BlitFramebuffer;
-}
index 359d1c2..d5dba3d 100644 (file)
 #ifndef ST_CB_BLIT_H
 #define ST_CB_BLIT_H
 
-
-struct dd_function_table;
-struct st_context;
-
-extern void
-st_init_blit_functions(struct dd_function_table *functions);
-
+void
+st_BlitFramebuffer(struct gl_context *ctx,
+                   struct gl_framebuffer *readFB,
+                   struct gl_framebuffer *drawFB,
+                   GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1,
+                   GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1,
+                   GLbitfield mask, GLenum filter);
 
 #endif /* ST_CB_BLIT_H */
index bc6a46e..db8d277 100644 (file)
@@ -43,7 +43,6 @@
 #include "st_context.h"
 #include "st_debug.h"
 #include "st_cb_bitmap.h"
-#include "st_cb_blit.h"
 #include "st_cb_bufferobjects.h"
 #include "st_cb_clear.h"
 #include "st_cb_compute.h"
@@ -921,7 +920,6 @@ st_init_driver_functions(struct pipe_screen *screen,
                          bool has_egl_image_validate)
 {
    st_init_draw_functions(screen, functions);
-   st_init_blit_functions(functions);
    st_init_bufferobject_functions(screen, functions);
 
    st_init_drawtex_functions(functions);