aboutsummaryrefslogtreecommitdiff
path: root/mesalib/src/mapi
diff options
context:
space:
mode:
authormarha <marha@users.sourceforge.net>2012-10-26 08:09:05 +0200
committermarha <marha@users.sourceforge.net>2012-10-26 08:09:05 +0200
commit8d86f8c566c4181c846a872a5a2f88718e635a72 (patch)
treef19c89fae4a0b9fd62ee9a2a1368e5b127bef505 /mesalib/src/mapi
parent281f26a1dfda732687680a36857960f74608df5b (diff)
downloadvcxsrv-8d86f8c566c4181c846a872a5a2f88718e635a72.tar.gz
vcxsrv-8d86f8c566c4181c846a872a5a2f88718e635a72.tar.bz2
vcxsrv-8d86f8c566c4181c846a872a5a2f88718e635a72.zip
fontconfig pixman mesa git update 26 oct 2012
fontconfig: 038aa930ae2c3b7972eefe334917e7222fe478ec mesa: 8fb4b1dce156d02a0907925364d8945915c29bcf pixman: 4b91f6ca72db3e8cbd7e97e9ef44be2f8994040d
Diffstat (limited to 'mesalib/src/mapi')
-rw-r--r--mesalib/src/mapi/mapi/mapi_glapi.c4
-rw-r--r--mesalib/src/mapi/mapi/stub.c22
-rw-r--r--mesalib/src/mapi/mapi/stub.h3
3 files changed, 27 insertions, 2 deletions
diff --git a/mesalib/src/mapi/mapi/mapi_glapi.c b/mesalib/src/mapi/mapi/mapi_glapi.c
index adfc0cbcc..4627c4de0 100644
--- a/mesalib/src/mapi/mapi/mapi_glapi.c
+++ b/mesalib/src/mapi/mapi/mapi_glapi.c
@@ -219,8 +219,8 @@ _glapi_get_proc_address(const char *funcName)
const char *
_glapi_get_proc_name(unsigned int offset)
{
- /* not implemented */
- return NULL;
+ const struct mapi_stub *stub = stub_find_by_slot(offset);
+ return stub ? stub_get_name(stub) : NULL;
}
unsigned long
diff --git a/mesalib/src/mapi/mapi/stub.c b/mesalib/src/mapi/mapi/stub.c
index 6fb8556d1..688dc8143 100644
--- a/mesalib/src/mapi/mapi/stub.c
+++ b/mesalib/src/mapi/mapi/stub.c
@@ -153,6 +153,28 @@ stub_find_dynamic(const char *name, int generate)
return stub;
}
+static const struct mapi_stub *
+search_table_by_slot(const struct mapi_stub *table, size_t num_entries,
+ int slot)
+{
+ size_t i;
+ for (i = 0; i < num_entries; ++i) {
+ if (table[i].slot == slot)
+ return &table[i];
+ }
+ return NULL;
+}
+
+const struct mapi_stub *
+stub_find_by_slot(int slot)
+{
+ const struct mapi_stub *stub =
+ search_table_by_slot(public_stubs, ARRAY_SIZE(public_stubs), slot);
+ if (stub)
+ return stub;
+ return search_table_by_slot(dynamic_stubs, num_dynamic_stubs, slot);
+}
+
void
stub_fix_dynamic(struct mapi_stub *stub, const struct mapi_stub *alias)
{
diff --git a/mesalib/src/mapi/mapi/stub.h b/mesalib/src/mapi/mapi/stub.h
index b2b6f1839..98e2553ec 100644
--- a/mesalib/src/mapi/mapi/stub.h
+++ b/mesalib/src/mapi/mapi/stub.h
@@ -42,6 +42,9 @@ stub_find_public(const char *name);
struct mapi_stub *
stub_find_dynamic(const char *name, int generate);
+const struct mapi_stub *
+stub_find_by_slot(int slot);
+
void
stub_fix_dynamic(struct mapi_stub *stub, const struct mapi_stub *alias);