mesa/dd/st: move get strings pointer out of dd.h

Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/14073>
This commit is contained in:
Dave Airlie 2021-12-06 14:25:55 +10:00 committed by Marge Bot
parent b03db92720
commit 0d8610b099
5 changed files with 5 additions and 24 deletions

View File

@ -114,13 +114,6 @@ struct pipe_vertex_element;
* file should be updated too!!!
*/
struct dd_function_table {
/**
* Return a string as needed by glGetString().
* Only the GL_RENDERER query must be implemented. Otherwise, NULL can be
* returned.
*/
const GLubyte * (*GetString)( struct gl_context *ctx, GLenum name );
/**
* Notify the driver after Mesa has made some internal state changes.
*

View File

@ -35,6 +35,7 @@
#include "version.h"
#include "spirv_extensions.h"
#include "state_tracker/st_cb_strings.h"
/**
* Return the string for a glGetString(GL_SHADING_LANGUAGE_VERSION) query.
*/
@ -133,10 +134,9 @@ _mesa_GetString( GLenum name )
}
/* this is a required driver function */
assert(ctx->Driver.GetString);
{
/* Give the driver the chance to handle this query */
const GLubyte *str = ctx->Driver.GetString(ctx, name);
const GLubyte *str = st_get_string(ctx, name);
if (str)
return str;
}

View File

@ -39,7 +39,7 @@
#include "st_context.h"
#include "st_cb_strings.h"
static const GLubyte *
const GLubyte *
st_get_string(struct gl_context * ctx, GLenum name)
{
struct st_context *st = st_context(ctx);
@ -58,8 +58,3 @@ st_get_string(struct gl_context * ctx, GLenum name)
}
}
void st_init_string_functions(struct dd_function_table *functions)
{
functions->GetString = st_get_string;
}

View File

@ -29,12 +29,7 @@
#ifndef ST_CB_STRINGS_H
#define ST_CB_STRINGS_H
const GLubyte *st_get_string(struct gl_context * ctx, GLenum name);
struct dd_function_table;
extern void
st_init_string_functions(struct dd_function_table *functions);
#endif /* ST_CB_CLEAR_H */
#endif /* ST_CB_STRINGS_H */

View File

@ -67,7 +67,6 @@
#include "st_cb_xformfb.h"
#include "st_cb_flush.h"
#include "st_cb_syncobj.h"
#include "st_cb_strings.h"
#include "st_cb_texturebarrier.h"
#include "st_cb_viewport.h"
#include "st_atom.h"
@ -969,7 +968,6 @@ st_init_driver_functions(struct pipe_screen *screen,
st_init_texture_functions(functions);
st_init_texture_barrier_functions(functions);
st_init_flush_functions(screen, functions);
st_init_string_functions(functions);
st_init_viewport_functions(functions);
st_init_compute_functions(functions);