Path: blob/21.2-virgl/src/gallium/drivers/lima/lima_util.h
4565 views
/*1* Copyright (C) 2018-2019 Lima Project2*3* Permission is hereby granted, free of charge, to any person obtaining a4* copy of this software and associated documentation files (the "Software"),5* to deal in the Software without restriction, including without limitation6* the rights to use, copy, modify, merge, publish, distribute, sublicense,7* and/or sell copies of the Software, and to permit persons to whom the8* Software is furnished to do so, subject to the following conditions:9*10* The above copyright notice and this permission notice shall be included in11* all copies or substantial portions of the Software.12*13* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR14* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,15* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL16* THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR17* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,18* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR19* OTHER DEALINGS IN THE SOFTWARE.20*21*/2223#ifndef H_LIMA_UTIL24#define H_LIMA_UTIL2526#include <stdint.h>27#include <stdbool.h>2829#define LIMA_PAGE_SIZE 40963031struct lima_dump;3233bool lima_get_absolute_timeout(uint64_t *timeout);3435struct lima_dump *lima_dump_create(void);36struct lima_dump *lima_dump_next(struct lima_dump *dump);37void lima_dump_free(struct lima_dump *dump);3839void lima_dump_vs_command_stream_print(struct lima_dump *dump, void *data,40int size, uint32_t start);41void lima_dump_plbu_command_stream_print(struct lima_dump *dump, void *data,42int size, uint32_t start);43void lima_dump_rsw_command_stream_print(struct lima_dump *dump, void *data,44int size, uint32_t start);45void lima_dump_texture_descriptor(struct lima_dump *dump, void *data,46int size, uint32_t start, uint32_t offset);4748void _lima_dump_command_stream_print(struct lima_dump *dump, void *data,49int size, bool is_float, const char *fmt, ...);50#define lima_dump_command_stream_print(dump, ...) \51do { \52if (dump) \53_lima_dump_command_stream_print(dump, __VA_ARGS__); \54} while (0)5556#endif575859