gfxstream: snapshot: avoid double boxing dispatchable handle

For dispatchable handle, such as commandBuffer, it is always
left as boxed by decoder; consequently snapshoter should not
box it again.

Reviewed-by: Marcin Radomski <dextero@google.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32148>
This commit is contained in:
Bo Hu
2024-11-08 14:31:19 -08:00
committed by Marge Bot
parent 8845255881
commit 94b906ae44

View File

@@ -356,7 +356,8 @@ def emit_impl(typeInfo, api, cgen):
if p.isNonDispatchableHandleType():
cgen.stmt("%s boxed = unboxed_to_boxed_non_dispatchable_%s(%s[i])" % (p.typeName, p.typeName, access))
else:
cgen.stmt("%s boxed = unboxed_to_boxed_%s(%s[i])" % (p.typeName, p.typeName, access))
cgen.line("// %s is already boxed, no need to box again" % p.paramName)
cgen.stmt("%s boxed = %s(%s[i])" % (p.typeName, p.typeName, access))
if is_modify_operation(api, p):
cgen.stmt("mReconstruction.forEachHandleAddModifyApi((const uint64_t*)(&boxed), 1, apiHandle)")
else: # is clear modifier operation