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:
Dave Airlie
2021-12-07 12:52:42 +10:00
committed by Marge Bot
parent 601c30c8c1
commit d16f514f19
5 changed files with 5 additions and 24 deletions

View File

@@ -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 * \name GL_ARB_texture_multisample
*/ */

View File

@@ -27,6 +27,7 @@
#include "main/mtypes.h" #include "main/mtypes.h"
#include "state_tracker/st_cb_drawtex.h"
static void static void
draw_texture(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, 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) if (ctx->NewState)
_mesa_update_state(ctx); _mesa_update_state(ctx);
assert(ctx->Driver.DrawTex); st_DrawTex(ctx, x, y, z, width, height);
ctx->Driver.DrawTex(ctx, x, y, z, width, height);
_mesa_set_vp_override(ctx, GL_FALSE); _mesa_set_vp_override(ctx, GL_FALSE);
} }

View File

@@ -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, st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
GLfloat width, GLfloat height) 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; st->dirty |= ST_NEW_VERTEX_ARRAYS;
} }
void
st_init_drawtex_functions(struct dd_function_table *functions)
{
functions->DrawTex = st_DrawTex;
}
/** /**
* Free any cached shaders * Free any cached shaders
*/ */

View File

@@ -10,11 +10,10 @@
#define ST_CB_DRAWTEX_H #define ST_CB_DRAWTEX_H
struct dd_function_table;
struct st_context; struct st_context;
extern void void st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z,
st_init_drawtex_functions(struct dd_function_table *functions); GLfloat width, GLfloat height);
extern void extern void
st_destroy_drawtex(struct st_context *st); st_destroy_drawtex(struct st_context *st);

View File

@@ -922,8 +922,6 @@ st_init_driver_functions(struct pipe_screen *screen,
st_init_draw_functions(screen, functions); st_init_draw_functions(screen, functions);
st_init_bufferobject_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_eglimage_functions(functions, has_egl_image_validate);
st_init_msaa_functions(functions); st_init_msaa_functions(functions);