Mesa (master): glapi: guard against invalid XML definitions for glthread
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Fri Jan 29 02:46:00 UTC 2021
Module: Mesa
Branch: master
Commit: d860b61f091aaf319f06bc248b1370efc3647df2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d860b61f091aaf319f06bc248b1370efc3647df2
Author: Marek Olšák <marek.olsak at amd.com>
Date: Wed Jan 27 23:12:54 2021 -0500
glapi: guard against invalid XML definitions for glthread
This would have prevented the bug that the previous commit fixes.
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Reviewed-by: Zoltán Böszörményi <zboszor at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8753>
---
src/mapi/glapi/gen/gl_XML.py | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py
index 94e742f7b9b..da80ea1b860 100644
--- a/src/mapi/glapi/gen/gl_XML.py
+++ b/src/mapi/glapi/gen/gl_XML.py
@@ -653,6 +653,12 @@ class gl_function( gl_item ):
name = element.get( "name" )
alias = element.get( "alias" )
+ # marshal isn't allowed with alias
+ assert not alias or not element.get('marshal')
+ assert not alias or not element.get('marshal_count')
+ assert not alias or not element.get('marshal_sync')
+ assert not alias or not element.get('marshal_call_after')
+
if name in static_data.functions:
self.static_entry_points.append(name)
More information about the mesa-commit
mailing list