lp_rast_priv.h revision 3199c6e764c20c69a76c561b9f4b89a23e5a97f5
1ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca/************************************************************************** 2ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * 3ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * Copyright 2009 VMware, Inc. 4ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * All Rights Reserved. 5ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * 6ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * Permission is hereby granted, free of charge, to any person obtaining a 7ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * copy of this software and associated documentation files (the 8ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * "Software"), to deal in the Software without restriction, including 9ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * without limitation the rights to use, copy, modify, merge, publish, 10ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * distribute, sub license, and/or sell copies of the Software, and to 11ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * permit persons to whom the Software is furnished to do so, subject to 12ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * the following conditions: 13ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * 14ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * The above copyright notice and this permission notice (including the 15ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * next paragraph) shall be included in all copies or substantial portions 16ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * of the Software. 17ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * 18ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 19ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 20ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 21ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR 22ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 23ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 24ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca * 26ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca **************************************************************************/ 27ee3383bc5ab81ff12d9faa675c1c38683300ce68José Fonseca 28e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell#ifndef LP_RAST_PRIV_H 29e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell#define LP_RAST_PRIV_H 30e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell 31e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell#include "lp_rast.h" 32e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell 33e0e2008f1dcd73a59a184e0ef4c1dd77ac2a1cbfKeith Whitwellstruct pipe_transfer; 34e0e2008f1dcd73a59a184e0ef4c1dd77ac2a1cbfKeith Whitwellstruct pipe_screen; 35a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca 36a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca/* We can choose whatever layout for the internal tile storage we 37a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca * prefer: 38a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca */ 39a6676d896ed18426ed3d7e6340347974c1694ca2José Fonsecastruct lp_rast_tile 40a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca{ 41a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca uint8_t *color; 42a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca 43ab76b2a8b896edc1e972de108d044b70310b4324José Fonseca uint32_t *depth; 44a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca}; 45a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca 46a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca 47e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwellstruct lp_rasterizer { 48e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell 49e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell /* We can choose whatever layout for the internal tile storage we 50e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell * prefer: 51e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell */ 52a6676d896ed18426ed3d7e6340347974c1694ca2José Fonseca struct lp_rast_tile tile; 53e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell 54e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell unsigned x; 55e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell unsigned y; 5684ab7dcf48e87350c0622c533e51aa495f7256c2Keith Whitwell boolean clipped_tile; 57e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell 5884ab7dcf48e87350c0622c533e51aa495f7256c2Keith Whitwell boolean check_for_clipped_tiles; 5984ab7dcf48e87350c0622c533e51aa495f7256c2Keith Whitwell unsigned width; 6084ab7dcf48e87350c0622c533e51aa495f7256c2Keith Whitwell unsigned height; 61e0e2008f1dcd73a59a184e0ef4c1dd77ac2a1cbfKeith Whitwell 62e0e2008f1dcd73a59a184e0ef4c1dd77ac2a1cbfKeith Whitwell struct pipe_screen *screen; 63e0e2008f1dcd73a59a184e0ef4c1dd77ac2a1cbfKeith Whitwell struct pipe_transfer *cbuf_transfer; 64e0e2008f1dcd73a59a184e0ef4c1dd77ac2a1cbfKeith Whitwell struct pipe_transfer *zsbuf_transfer; 65e0e2008f1dcd73a59a184e0ef4c1dd77ac2a1cbfKeith Whitwell void *cbuf_map; 66e0e2008f1dcd73a59a184e0ef4c1dd77ac2a1cbfKeith Whitwell void *zsbuf_map; 67e0e2008f1dcd73a59a184e0ef4c1dd77ac2a1cbfKeith Whitwell 68e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell struct { 69ab76b2a8b896edc1e972de108d044b70310b4324José Fonseca struct pipe_surface *cbuf; 70ab76b2a8b896edc1e972de108d044b70310b4324José Fonseca struct pipe_surface *zsbuf; 7147510040a68f5f672aee22eac6c01fb4dd60ec67José Fonseca boolean write_color; 7247510040a68f5f672aee22eac6c01fb4dd60ec67José Fonseca boolean write_zstencil; 73e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell unsigned clear_color; 74e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell unsigned clear_depth; 75e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell char clear_stencil; 76e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell } state; 773199c6e764c20c69a76c561b9f4b89a23e5a97f5Keith Whitwell 783199c6e764c20c69a76c561b9f4b89a23e5a97f5Keith Whitwell int nr_blocks; 793199c6e764c20c69a76c561b9f4b89a23e5a97f5Keith Whitwell struct { 803199c6e764c20c69a76c561b9f4b89a23e5a97f5Keith Whitwell unsigned x; 813199c6e764c20c69a76c561b9f4b89a23e5a97f5Keith Whitwell unsigned y; 823199c6e764c20c69a76c561b9f4b89a23e5a97f5Keith Whitwell unsigned mask; 833199c6e764c20c69a76c561b9f4b89a23e5a97f5Keith Whitwell } blocks[256]; 84e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell}; 85e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell 86ab76b2a8b896edc1e972de108d044b70310b4324José Fonseca 87ab76b2a8b896edc1e972de108d044b70310b4324José Fonsecavoid lp_rast_shade_quads( struct lp_rasterizer *rast, 88ab76b2a8b896edc1e972de108d044b70310b4324José Fonseca const struct lp_rast_shader_inputs *inputs, 89ab76b2a8b896edc1e972de108d044b70310b4324José Fonseca unsigned x, unsigned y, 907670628061c2a6ce0a1a787556b0e33a38fd3049Keith Whitwell unsigned masks); 91ab76b2a8b896edc1e972de108d044b70310b4324José Fonseca 92e529170c11d3cb5812aabeff0a6ee2d7a2ea66f2Keith Whitwell#endif 93