glthread: use GLenum16 in batch buffers to save space
authorMarek Olšák <marek.olsak@amd.com>
Mon, 23 Mar 2020 01:07:38 +0000 (21:07 -0400)
committerMarge Bot <eric+marge@anholt.net>
Mon, 27 Apr 2020 11:56:06 +0000 (11:56 +0000)
Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4758>

src/mapi/glapi/gen/gl_marshal.py

index 0572458fd974938e0a3766b74280dd717da55ee5..16b3a6e04db75b0bd8ddf70a619f8e22e0b436ef 100644 (file)
@@ -153,7 +153,10 @@ class PrintCode(gl_XML.gl_print_base):
                     out('{0} {1}[{2}];'.format(
                             p.get_base_type_string(), p.name, p.count))
                 else:
                     out('{0} {1}[{2}];'.format(
                             p.get_base_type_string(), p.name, p.count))
                 else:
-                    out('{0} {1};'.format(p.type_string(), p.name))
+                    type = p.type_string()
+                    if type == 'GLenum':
+                        type = 'GLenum16'
+                    out('{0} {1};'.format(type, p.name))
 
             for p in func.variable_params:
                 if p.img_null_flag:
 
             for p in func.variable_params:
                 if p.img_null_flag: