summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2021-12-07 12:43:29 +1000
committerMarge Bot <emma+marge@anholt.net>2021-12-08 19:06:48 +0000
commit7b066ebfb38725a2130c0f7d07c873fe33224eb5 (patch)
treeaa6e1f071b4e551f4a7ae3a9e22a5b5ced86a2a8
parentc9fec99c4a2e49ecf81821fa8b6dc6edab67d3f7 (diff)
mesa/st: move blit function to direct call
Acked-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14100>
-rw-r--r--src/mesa/main/blit.c10
-rw-r--r--src/mesa/main/dd.h10
-rw-r--r--src/mesa/state_tracker/st_cb_blit.c9
-rw-r--r--src/mesa/state_tracker/st_cb_blit.h14
-rw-r--r--src/mesa/state_tracker/st_context.c2
5 files changed, 13 insertions, 32 deletions
diff --git a/src/mesa/main/blit.c b/src/mesa/main/blit.c
index 116c012b212..8f05d34dfce 100644
--- a/src/mesa/main/blit.c
+++ b/src/mesa/main/blit.c
@@ -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);
}
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index a27fca9107e..2844d76fec9 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -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,
diff --git a/src/mesa/state_tracker/st_cb_blit.c b/src/mesa/state_tracker/st_cb_blit.c
index 526fb7e7e78..d71c9c110af 100644
--- a/src/mesa/state_tracker/st_cb_blit.c
+++ b/src/mesa/state_tracker/st_cb_blit.c
@@ -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;
-}
diff --git a/src/mesa/state_tracker/st_cb_blit.h b/src/mesa/state_tracker/st_cb_blit.h
index 359d1c2c6a8..d5dba3d17f9 100644
--- a/src/mesa/state_tracker/st_cb_blit.h
+++ b/src/mesa/state_tracker/st_cb_blit.h
@@ -28,12 +28,12 @@
#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 */
diff --git a/src/mesa/state_tracker/st_context.c b/src/mesa/state_tracker/st_context.c
index bc6a46ec055..db8d27780a4 100644
--- a/src/mesa/state_tracker/st_context.c
+++ b/src/mesa/state_tracker/st_context.c
@@ -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);