1848b8605Smrg/**************************************************************************
2848b8605Smrg *
3848b8605Smrg * Copyright 2009 VMware, Inc.
4848b8605Smrg * Copyright 2007 VMware, Inc.
5848b8605Smrg * All Rights Reserved.
6848b8605Smrg *
7848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a
8848b8605Smrg * copy of this software and associated documentation files (the
9848b8605Smrg * "Software"), to deal in the Software without restriction, including
10848b8605Smrg * without limitation the rights to use, copy, modify, merge, publish,
11848b8605Smrg * distribute, sub license, and/or sell copies of the Software, and to
12848b8605Smrg * permit persons to whom the Software is furnished to do so, subject to
13848b8605Smrg * the following conditions:
14848b8605Smrg *
15848b8605Smrg * The above copyright notice and this permission notice (including the
16848b8605Smrg * next paragraph) shall be included in all copies or substantial portions
17848b8605Smrg * of the Software.
18848b8605Smrg *
19848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20848b8605Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21848b8605Smrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
22848b8605Smrg * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
23848b8605Smrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
24848b8605Smrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25848b8605Smrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26848b8605Smrg *
27848b8605Smrg **************************************************************************/
28848b8605Smrg
29848b8605Smrg/**
30848b8605Smrg * @author Jose Fonseca <jfonseca@vmware.com>
31848b8605Smrg * @author Keith Whitwell <keithw@vmware.com>
32848b8605Smrg */
33848b8605Smrg
34848b8605Smrg#ifndef LP_SCREEN_H
35848b8605Smrg#define LP_SCREEN_H
36848b8605Smrg
37848b8605Smrg#include "pipe/p_screen.h"
38848b8605Smrg#include "pipe/p_defines.h"
39848b8605Smrg#include "os/os_thread.h"
40848b8605Smrg#include "gallivm/lp_bld.h"
41848b8605Smrg
42848b8605Smrg
43848b8605Smrgstruct sw_winsys;
44848b8605Smrg
45848b8605Smrg
46848b8605Smrgstruct llvmpipe_screen
47848b8605Smrg{
48848b8605Smrg   struct pipe_screen base;
49848b8605Smrg
50848b8605Smrg   struct sw_winsys *winsys;
51848b8605Smrg
52848b8605Smrg   unsigned num_threads;
53848b8605Smrg
54848b8605Smrg   /* Increments whenever textures are modified.  Contexts can track this.
55848b8605Smrg    */
56848b8605Smrg   unsigned timestamp;
57848b8605Smrg
58848b8605Smrg   struct lp_rasterizer *rast;
59b8e80941Smrg   mtx_t rast_mutex;
60848b8605Smrg};
61848b8605Smrg
62848b8605Smrg
63848b8605Smrg
64848b8605Smrg
65b8e80941Smrgstatic inline struct llvmpipe_screen *
66848b8605Smrgllvmpipe_screen( struct pipe_screen *pipe )
67848b8605Smrg{
68848b8605Smrg   return (struct llvmpipe_screen *)pipe;
69848b8605Smrg}
70848b8605Smrg
71848b8605Smrg
72848b8605Smrg
73848b8605Smrg#endif /* LP_SCREEN_H */
74