def bind_shader(cmd, args): handle, type = struct.unpack("<II", args) return [ virgl.CMD_3D(cmd["cmd"]).name, handle, type]
def clear(cmd, args): buf_idx, r, g, b, a, depth, stencil = struct.unpack("<IffffdI", args) return [ virgl.CMD_3D(cmd["cmd"]).name, buf_idx, r, g, b, a, depth, stencil]
def bind_object(cmd, args): handle, = struct.unpack("<I", args) type = cmd["opt"] return [ virgl.CMD_3D(cmd["cmd"]).name, type, handle]
def destroy_sub_ctx(cmd, args): ctx_id, = struct.unpack("<I", args) return [ virgl.CMD_3D(cmd["cmd"]).name, str(ctx_id)]