glapi: remove dead code

Reviewed-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33634>
This commit is contained in:
Marek Olšák
2025-01-23 05:00:35 -05:00
committed by Marge Bot
parent a22e50e6fe
commit 142202cd00
12 changed files with 7 additions and 207 deletions
+1 -39
View File
@@ -29,15 +29,13 @@
#include <string.h>
#include <stdlib.h>
#include "glapi/glapi.h"
#include "u_current.h"
#include "table.h" /* for MAPI_TABLE_NUM_SLOTS */
#include "stub.h"
/*
* _mesa_glapi_Dispatch, _glapi_Context
* _mesa_glapi_Dispatch,
* _mesa_glapi_tls_Dispatch, _mesa_glapi_tls_Context,
* _mesa_glapi_set_context, _mesa_glapi_get_context,
* _glapi_destroy_multithread, _glapi_check_multithread
* _mesa_glapi_set_dispatch, and _mesa_glapi_get_dispatch
* are defined in u_current.c.
*/
@@ -52,22 +50,6 @@ _mesa_glapi_get_dispatch_table_size(void)
return MAPI_TABLE_NUM_SLOTS;
}
/**
* Initializes the glapi relocs table (no-op for shared-glapi), and returns the
* offset of the given function in the dispatch table.
*/
int
_glapi_add_dispatch( const char * function_name )
{
assert(function_name[0] == 'g' && function_name[1] == 'l');
const struct mapi_stub *stub = stub_find_public(function_name + 2);
if (!stub)
return -1;
return stub_get_slot(stub);
}
static const struct mapi_stub *
_glapi_get_stub(const char *name)
{
@@ -132,23 +114,3 @@ _glapi_set_nop_handler(_glapi_nop_handler_proc func)
{
table_set_noop_handler(func);
}
/**
* This is a deprecated function which should not be used anymore.
* It's only present to satisfy linking with older versions of libGL.
*/
unsigned long
_glthread_GetID(void)
{
return 0;
}
void
_glapi_noop_enable_warnings(unsigned char enable)
{
}
void
_glapi_set_warning_func(_glapi_proc func)
{
}
-1
View File
@@ -4,7 +4,6 @@
files_shared_glapi = files(
'../entry.c',
'../u_current.c',
'../u_current.h',
'glapi.c',
'stub.c',
'stub.h',
+1 -1
View File
@@ -32,7 +32,7 @@
#include "util/macros.h"
#include "util/simple_mtx.h"
#include "u_current.h"
#include "glapi/glapi.h"
#include "entry.h"
#include "stub.h"
#include "table.h"
-33
View File
@@ -34,47 +34,14 @@
#include "mapi_tmp.h"
#define MAPI_TABLE_NUM_SLOTS (MAPI_TABLE_NUM_STATIC + MAPI_TABLE_NUM_DYNAMIC)
#define MAPI_TABLE_SIZE (MAPI_TABLE_NUM_SLOTS * sizeof(mapi_func))
struct _glapi_table;
extern const mapi_func table_noop_array[];
typedef void (*nop_handler_proc)(const char *name);
void
table_set_noop_handler(nop_handler_proc func);
/**
* Get the no-op dispatch table.
*/
static inline const struct _glapi_table *
table_get_noop(void)
{
return (const struct _glapi_table *) table_noop_array;
}
/**
* Set the function of a slot.
*/
static inline void
table_set_func(struct _glapi_table *tbl, int slot, mapi_func func)
{
mapi_func *funcs = (mapi_func *) tbl;
funcs[slot] = func;
}
/**
* Return the function of a slot.
*/
static inline mapi_func
table_get_func(const struct _glapi_table *tbl, int slot)
{
const mapi_func *funcs = (const mapi_func *) tbl;
return funcs[slot];
}
#endif /* _TABLE_H_ */