mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-02-04 04:10:25 +01:00
glthread: ignore the return value of glUnmapBuffer, don't sync, and return true
We always return GL_TRUE from the Unmap functions. gl_marshal.py is modified so as not to use "return" in the unmarshal function, which always returns void. Reviewed-by: Zoltán Böszörményi <zboszor@gmail.com> Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9029>
This commit is contained in:
parent
638a184849
commit
c59fd3acb9
4 changed files with 7 additions and 5 deletions
|
|
@ -906,7 +906,7 @@
|
|||
<param name="access" type="GLenum" />
|
||||
</function>
|
||||
|
||||
<function name="UnmapNamedBufferEXT">
|
||||
<function name="UnmapNamedBufferEXT" marshal="async">
|
||||
<return type="GLboolean" />
|
||||
<param name="buffer" type="GLuint" />
|
||||
</function>
|
||||
|
|
|
|||
|
|
@ -5169,7 +5169,7 @@
|
|||
<glx ignore="true"/>
|
||||
</function>
|
||||
|
||||
<function name="UnmapBuffer" es2="3.0" no_error="true">
|
||||
<function name="UnmapBuffer" es2="3.0" no_error="true" marshal="async">
|
||||
<param name="target" type="GLenum"/>
|
||||
<return type="GLboolean"/>
|
||||
<glx ignore="true"/>
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ class PrintCode(gl_XML.gl_print_base):
|
|||
def print_sync_call(self, func, unmarshal = 0):
|
||||
call = 'CALL_{0}(ctx->CurrentServerDispatch, ({1}))'.format(
|
||||
func.name, func.get_called_parameter_string())
|
||||
if func.return_type == 'void':
|
||||
if func.return_type == 'void' or unmarshal:
|
||||
out('{0};'.format(call))
|
||||
if func.marshal_call_after and not unmarshal:
|
||||
out(func.marshal_call_after);
|
||||
|
|
@ -306,7 +306,7 @@ class PrintCode(gl_XML.gl_print_base):
|
|||
out('}')
|
||||
|
||||
def print_async_marshal(self, func):
|
||||
out('void GLAPIENTRY')
|
||||
out('{0} GLAPIENTRY'.format(func.return_type))
|
||||
out('_mesa_marshal_{0}({1})'.format(
|
||||
func.name, func.get_parameter_string()))
|
||||
out('{')
|
||||
|
|
@ -338,6 +338,8 @@ class PrintCode(gl_XML.gl_print_base):
|
|||
self.validate_count_or_fallback(func)
|
||||
|
||||
self.print_async_dispatch(func)
|
||||
if func.return_type == 'GLboolean':
|
||||
out('return GL_TRUE;') # for glUnmapBuffer
|
||||
out('}')
|
||||
|
||||
def print_async_body(self, func):
|
||||
|
|
|
|||
|
|
@ -73,7 +73,7 @@ class PrintCode(gl_XML.gl_print_base):
|
|||
print('struct marshal_cmd_{0};'.format(func.name))
|
||||
print(('void _mesa_unmarshal_{0}(struct gl_context *ctx, '
|
||||
'const struct marshal_cmd_{0} *cmd);').format(func.name))
|
||||
print('void GLAPIENTRY _mesa_marshal_{0}({1});'.format(func.name, func.get_parameter_string()))
|
||||
print('{0} GLAPIENTRY _mesa_marshal_{1}({2});'.format(func.return_type, func.name, func.get_parameter_string()))
|
||||
elif flavor == 'sync':
|
||||
print('{0} GLAPIENTRY _mesa_marshal_{1}({2});'.format(func.return_type, func.name, func.get_parameter_string()))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue