glthread: qualify the *cmd unmarshal parameter with restrict

This seems like a logical thing to do. Clearly the memory can't be
accessed with any other pointer.

Acked-by: Adam Jackson <ajax@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21777>
This commit is contained in:
Marek Olšák
2022-08-13 01:42:34 -04:00
parent 862b00b795
commit c455ea6144
8 changed files with 34 additions and 32 deletions
+1 -1
View File
@@ -191,7 +191,7 @@ class PrintCode(gl_XML.gl_print_base):
out('uint32_t')
out(('_mesa_unmarshal_{0}(struct gl_context *ctx, '
'const struct marshal_cmd_{0} *cmd)').format(func.name))
'const struct marshal_cmd_{0} *restrict cmd)').format(func.name))
out('{')
with indent():
for p in fixed_params:
+1 -1
View File
@@ -70,7 +70,7 @@ class PrintCode(gl_XML.gl_print_base):
if flavor in ('custom', 'async'):
print('struct marshal_cmd_{0};'.format(func.name))
print(('uint32_t _mesa_unmarshal_{0}(struct gl_context *ctx, '
'const struct marshal_cmd_{0} *cmd);').format(func.name))
'const struct marshal_cmd_{0} *restrict cmd);').format(func.name))
if flavor in ('custom', 'async', 'sync') and not func.marshal_is_static():
print('{0} GLAPIENTRY _mesa_marshal_{1}({2});'.format(func.return_type, func.name, func.get_parameter_string()))