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:
@@ -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:
|
||||
|
||||
@@ -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()))
|
||||
|
||||
Reference in New Issue
Block a user