[19/20] mesa: fix glGet for ext_external_objects parameters

Submitted by Andres Rodriguez on Jan. 23, 2018, 6:05 p.m.

Details

Message ID 20180123180510.10180-20-andresx7@gmail.com
State New
Headers show
Series "Add support for GL_EXT_semaphore" ( rev: 5 4 3 ) in Mesa

Not browsing as part of any series.

Commit Message

Andres Rodriguez Jan. 23, 2018, 6:05 p.m.
This allows the client to actually query the enums specified in the
ext_external_objects spec.

Signed-off-by: Andres Rodriguez <andresx7@gmail.com>
---
 src/mesa/main/get.c              | 3 +++
 src/mesa/main/get_hash_params.py | 5 +++++
 2 files changed, 8 insertions(+)

Patch hide | download patch | download mbox

diff --git a/src/mesa/main/get.c b/src/mesa/main/get.c
index 7f2d72aa4b..34970b8e16 100644
--- a/src/mesa/main/get.c
+++ b/src/mesa/main/get.c
@@ -2543,6 +2543,9 @@  find_value_indexed(const char *func, GLenum pname, GLuint index, union value *v)
       return TYPE_INT;
 
    /* GL_EXT_external_objects */
+   case GL_NUM_DEVICE_UUIDS_EXT:
+      v->value_int = 1;
+      return TYPE_INT;
    case GL_DRIVER_UUID_EXT:
       _mesa_get_driver_uuid(ctx, v->value_int_4);
       return TYPE_INT_4;
diff --git a/src/mesa/main/get_hash_params.py b/src/mesa/main/get_hash_params.py
index bc71574cca..6852714ed7 100644
--- a/src/mesa/main/get_hash_params.py
+++ b/src/mesa/main/get_hash_params.py
@@ -138,6 +138,11 @@  descriptor=[
 
 # GL_ARB_polygon_offset_clamp / GL_EXT_polygon_offset_clamp
   [ "POLYGON_OFFSET_CLAMP_EXT", "CONTEXT_FLOAT(Polygon.OffsetClamp), extra_ARB_polygon_offset_clamp" ],
+
+# GL_EXT_external_objects
+  [ "NUM_DEVICE_UUIDS_EXT", "LOC_CUSTOM, TYPE_INT, NO_OFFSET, NO_EXTRA" ],
+  [ "DRIVER_UUID_EXT", "LOC_CUSTOM, TYPE_INT_4, NO_OFFSET, NO_EXTRA" ],
+  [ "DEVICE_UUID_EXT", "LOC_CUSTOM, TYPE_INT_4, NO_OFFSET, NO_EXTRA" ],
 ]},
 
 # Enums in OpenGL and GLES1