1848b8605Smrg/************************************************************************** 2848b8605Smrg * 3848b8605Smrg * Copyright 2008 VMware, Inc. 4848b8605Smrg * All Rights Reserved. 5848b8605Smrg * 6848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a 7848b8605Smrg * copy of this software and associated documentation files (the 8848b8605Smrg * "Software"), to deal in the Software without restriction, including 9848b8605Smrg * without limitation the rights to use, copy, modify, merge, publish, 10848b8605Smrg * distribute, sub license, and/or sell copies of the Software, and to 11848b8605Smrg * permit persons to whom the Software is furnished to do so, subject to 12848b8605Smrg * the following conditions: 13848b8605Smrg * 14848b8605Smrg * The above copyright notice and this permission notice (including the 15848b8605Smrg * next paragraph) shall be included in all copies or substantial portions 16848b8605Smrg * of the Software. 17848b8605Smrg * 18848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19848b8605Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20848b8605Smrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21848b8605Smrg * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR 22848b8605Smrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23848b8605Smrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24848b8605Smrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25848b8605Smrg * 26848b8605Smrg **************************************************************************/ 27848b8605Smrg 28848b8605Smrg 29848b8605Smrg#ifndef U_BLIT_H 30848b8605Smrg#define U_BLIT_H 31848b8605Smrg 32848b8605Smrg 33848b8605Smrg#include "pipe/p_compiler.h" 34b8e80941Smrg#include "pipe/p_defines.h" 35848b8605Smrg 36848b8605Smrg 37848b8605Smrg#ifdef __cplusplus 38848b8605Smrgextern "C" { 39848b8605Smrg#endif 40848b8605Smrg 41848b8605Smrg 42848b8605Smrgstruct cso_context; 43848b8605Smrgstruct pipe_context; 44848b8605Smrgstruct pipe_resource; 45848b8605Smrgstruct pipe_sampler_view; 46848b8605Smrgstruct pipe_surface; 47848b8605Smrg 48848b8605Smrgextern struct blit_state * 49848b8605Smrgutil_create_blit(struct pipe_context *pipe, struct cso_context *cso); 50848b8605Smrg 51848b8605Smrgextern void 52848b8605Smrgutil_destroy_blit(struct blit_state *ctx); 53848b8605Smrg 54848b8605Smrgextern void 55848b8605Smrgutil_blit_pixels(struct blit_state *ctx, 56848b8605Smrg struct pipe_resource *src_tex, 57848b8605Smrg unsigned src_level, 58848b8605Smrg int srcX0, int srcY0, 59848b8605Smrg int srcX1, int srcY1, 60848b8605Smrg int srcZ0, 61848b8605Smrg struct pipe_surface *dst, 62848b8605Smrg int dstX0, int dstY0, 63848b8605Smrg int dstX1, int dstY1, 64b8e80941Smrg float z, enum pipe_tex_filter filter, 65b8e80941Smrg uint writemask); 66848b8605Smrg 67848b8605Smrgextern void 68848b8605Smrgutil_blit_pixels_tex(struct blit_state *ctx, 69848b8605Smrg struct pipe_sampler_view *src_sampler_view, 70848b8605Smrg int srcX0, int srcY0, 71848b8605Smrg int srcX1, int srcY1, 72848b8605Smrg unsigned src_face, 73848b8605Smrg struct pipe_surface *dst, 74848b8605Smrg int dstX0, int dstY0, 75848b8605Smrg int dstX1, int dstY1, 76b8e80941Smrg float z, enum pipe_tex_filter filter, 77b8e80941Smrg boolean src_xrbias); 78848b8605Smrg 79848b8605Smrg#ifdef __cplusplus 80848b8605Smrg} 81848b8605Smrg#endif 82848b8605Smrg 83848b8605Smrg#endif 84