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>
This commit is contained in:
Dave Airlie 2021-12-07 12:43:29 +10:00 committed by Marge Bot
parent c9fec99c4a
commit 7b066ebfb3
5 changed files with 13 additions and 32 deletions

View 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);
}

View file

@ -272,16 +272,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
*/

View 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;
}

View file

@ -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 */

View 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);