Path: blob/21.2-virgl/src/gallium/drivers/freedreno/freedreno_blitter.h
4570 views
/*1* Copyright (C) 2017 Rob Clark <[email protected]>2*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 (including the next11* paragraph) shall be included in all copies or substantial portions of the12* Software.13*14* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR15* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,16* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL17* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER18* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,19* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE20* SOFTWARE.21*22* Authors:23* Rob Clark <[email protected]>24*/2526#ifndef FREEDRENO_BLIT_H_27#define FREEDRENO_BLIT_H_2829#include "pipe/p_state.h"30#include "util/u_dump.h"3132#include "freedreno_context.h"3334bool fd_blitter_blit(struct fd_context *ctx,35const struct pipe_blit_info *info) assert_dt;3637void fd_blitter_clear(struct pipe_context *pctx, unsigned buffers,38const union pipe_color_union *color, double depth,39unsigned stencil) assert_dt;4041void fd_resource_copy_region(struct pipe_context *pctx,42struct pipe_resource *dst, unsigned dst_level,43unsigned dstx, unsigned dsty, unsigned dstz,44struct pipe_resource *src, unsigned src_level,45const struct pipe_box *src_box) assert_dt;4647bool fd_blit(struct pipe_context *pctx,48const struct pipe_blit_info *blit_info) assert_dt;4950#define DBG_BLIT(blit, batch) do { \51if (FD_DBG(MSGS)) { \52const struct fd_resource *src = fd_resource((blit)->src.resource); \53const struct fd_resource *dst = fd_resource((blit)->dst.resource); \54const char *src_target = util_str_tex_target((blit)->src.resource->target, true); \55const char *dst_target = util_str_tex_target((blit)->dst.resource->target, true); \56const char *src_format = util_format_short_name((blit)->src.format); \57const char *dst_format = util_format_short_name((blit)->dst.format); \58const char *src_tiling = fd_resource_tile_mode_desc(src, (blit)->src.level); \59const char *dst_tiling = fd_resource_tile_mode_desc(dst, (blit)->dst.level); \60if (batch) { \61DBG("%p: %s %s %s (%p) -> %s %s %s (%p)", (batch), \62src_target, src_format, src_tiling, src, \63dst_target, dst_format, dst_tiling, dst); \64} else { \65DBG("%s %s %s (%p) -> %s %s %s (%p)", \66src_target, src_format, src_tiling, src, \67dst_target, dst_format, dst_tiling, dst); \68} \69} \70} while (0)7172#endif /* FREEDRENO_BLIT_H_ */737475