1946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca/************************************************************************** 2946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * 3c022e15d1e56ba3a9c6b74eef6556d6063e2e322José Fonseca * Copyright 2009 VMware, Inc. 4946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * Copyright 2007 Tungsten Graphics, Inc., Cedar Park, Texas. 5946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * All Rights Reserved. 6946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * 7946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * Permission is hereby granted, free of charge, to any person obtaining a 8946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * copy of this software and associated documentation files (the 9946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * "Software"), to deal in the Software without restriction, including 10946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * without limitation the rights to use, copy, modify, merge, publish, 11946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * distribute, sub license, and/or sell copies of the Software, and to 12946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * permit persons to whom the Software is furnished to do so, subject to 13946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * the following conditions: 14946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * 15946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * The above copyright notice and this permission notice (including the 16946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * next paragraph) shall be included in all copies or substantial portions 17946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * of the Software. 18946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * 19946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 20946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 21946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 22946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * IN NO EVENT SHALL TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS BE LIABLE FOR 23946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 24946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 25946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 26946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca * 27946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca **************************************************************************/ 28946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 29c022e15d1e56ba3a9c6b74eef6556d6063e2e322José Fonseca/** 30c022e15d1e56ba3a9c6b74eef6556d6063e2e322José Fonseca * @author Jose Fonseca <jfonseca@vmware.com> 31c022e15d1e56ba3a9c6b74eef6556d6063e2e322José Fonseca * @author Keith Whitwell <keith@tungstengraphics.com> 32946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca */ 33946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 34c9a5930fe45a0a0299769bd2b672ca516d1bf39eJosé Fonseca#ifndef LP_SCREEN_H 35c9a5930fe45a0a0299769bd2b672ca516d1bf39eJosé Fonseca#define LP_SCREEN_H 36946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 37946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca#include "pipe/p_screen.h" 38946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca#include "pipe/p_defines.h" 39efc82aef35a2aac5d2ed9774f6d28f2626796416Brian Paul#include "os/os_thread.h" 40efc82aef35a2aac5d2ed9774f6d28f2626796416Brian Paul#include "gallivm/lp_bld.h" 41946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 42946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 4394ce4eb3c27706d992226d847d123c46b14b1c4fKeith Whitwellstruct sw_winsys; 44e173a9bbd64dc38dba6b881ed7a9faea02861042José Fonseca 45e173a9bbd64dc38dba6b881ed7a9faea02861042José Fonseca 462d6b39f05edcd575b1e10d53f96a38bec848fa67José Fonsecastruct llvmpipe_screen 472d6b39f05edcd575b1e10d53f96a38bec848fa67José Fonseca{ 48946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca struct pipe_screen base; 49946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 5094ce4eb3c27706d992226d847d123c46b14b1c4fKeith Whitwell struct sw_winsys *winsys; 51e173a9bbd64dc38dba6b881ed7a9faea02861042José Fonseca 5239be50dcdebe6bcbb48cb6aa8ac151eee811acb1José Fonseca unsigned num_threads; 5339be50dcdebe6bcbb48cb6aa8ac151eee811acb1José Fonseca 54f70d900b805b90f6f53da9698cf8025f88b7e1e0Brian Paul /* Increments whenever textures are modified. Contexts can track this. 55946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca */ 56f70d900b805b90f6f53da9698cf8025f88b7e1e0Brian Paul unsigned timestamp; 57edac740095fb2514b512034b334947f72648cd51Roland Scheidegger 58edac740095fb2514b512034b334947f72648cd51Roland Scheidegger struct lp_rasterizer *rast; 59edac740095fb2514b512034b334947f72648cd51Roland Scheidegger pipe_mutex rast_mutex; 60946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca}; 61946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 62946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 63946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 64946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 65946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonsecastatic INLINE struct llvmpipe_screen * 66946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonsecallvmpipe_screen( struct pipe_screen *pipe ) 67946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca{ 68946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca return (struct llvmpipe_screen *)pipe; 69946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca} 70946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 71946f432a08112148d743eb9faf6b27bb8cc7fa76José Fonseca 7223e951d0da5802fec70996e46ad6f0abc411594cKeith Whitwell 73c9a5930fe45a0a0299769bd2b672ca516d1bf39eJosé Fonseca#endif /* LP_SCREEN_H */ 74