mesa/st: convert DrawTex 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:
@@ -325,14 +325,6 @@ struct dd_function_table {
|
||||
|
||||
/**@}*/
|
||||
|
||||
/**
|
||||
* \name GL_OES_draw_texture interface
|
||||
*/
|
||||
/*@{*/
|
||||
void (*DrawTex)(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
|
||||
GLfloat width, GLfloat height);
|
||||
/*@}*/
|
||||
|
||||
/**
|
||||
* \name GL_ARB_texture_multisample
|
||||
*/
|
||||
|
@@ -27,6 +27,7 @@
|
||||
|
||||
#include "main/mtypes.h"
|
||||
|
||||
#include "state_tracker/st_cb_drawtex.h"
|
||||
|
||||
static void
|
||||
draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
|
||||
@@ -47,8 +48,7 @@ draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
|
||||
if (ctx->NewState)
|
||||
_mesa_update_state(ctx);
|
||||
|
||||
assert(ctx->Driver.DrawTex);
|
||||
ctx->Driver.DrawTex(ctx, x, y, z, width, height);
|
||||
st_DrawTex(ctx, x, y, z, width, height);
|
||||
|
||||
_mesa_set_vp_override(ctx, GL_FALSE);
|
||||
}
|
||||
|
@@ -158,7 +158,7 @@ lookup_shader(struct st_context *st,
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
void
|
||||
st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
|
||||
GLfloat width, GLfloat height)
|
||||
{
|
||||
@@ -353,14 +353,6 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
|
||||
st->dirty |= ST_NEW_VERTEX_ARRAYS;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
st_init_drawtex_functions(struct dd_function_table *functions)
|
||||
{
|
||||
functions->DrawTex = st_DrawTex;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Free any cached shaders
|
||||
*/
|
||||
|
@@ -10,11 +10,10 @@
|
||||
#define ST_CB_DRAWTEX_H
|
||||
|
||||
|
||||
struct dd_function_table;
|
||||
struct st_context;
|
||||
|
||||
extern void
|
||||
st_init_drawtex_functions(struct dd_function_table *functions);
|
||||
void st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
|
||||
GLfloat width, GLfloat height);
|
||||
|
||||
extern void
|
||||
st_destroy_drawtex(struct st_context *st);
|
||||
|
@@ -922,8 +922,6 @@ st_init_driver_functions(struct pipe_screen *screen,
|
||||
st_init_draw_functions(screen, functions);
|
||||
st_init_bufferobject_functions(screen, functions);
|
||||
|
||||
st_init_drawtex_functions(functions);
|
||||
|
||||
st_init_eglimage_functions(functions, has_egl_image_validate);
|
||||
|
||||
st_init_msaa_functions(functions);
|
||||
|
Reference in New Issue
Block a user