1848b8605Smrg/**************************************************************************
2848b8605Smrg *
3848b8605Smrg * Copyright 2009-2010 VMware, Inc.  All Rights Reserved.
4848b8605Smrg *
5848b8605Smrg * Permission is hereby granted, free of charge, to any person obtaining a
6848b8605Smrg * copy of this software and associated documentation files (the
7848b8605Smrg * "Software"), to deal in the Software without restriction, including
8848b8605Smrg * without limitation the rights to use, copy, modify, merge, publish,
9848b8605Smrg * distribute, sub license, and/or sell copies of the Software, and to
10848b8605Smrg * permit persons to whom the Software is furnished to do so, subject to
11848b8605Smrg * the following conditions:
12848b8605Smrg *
13848b8605Smrg * The above copyright notice and this permission notice (including the
14848b8605Smrg * next paragraph) shall be included in all copies or substantial portions
15848b8605Smrg * of the Software.
16848b8605Smrg *
17848b8605Smrg * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
18848b8605Smrg * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
19848b8605Smrg * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
20848b8605Smrg * IN NO EVENT SHALL VMWARE AND/OR ITS SUPPLIERS BE LIABLE FOR
21848b8605Smrg * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
22848b8605Smrg * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
23848b8605Smrg * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24848b8605Smrg *
25848b8605Smrg **************************************************************************/
26848b8605Smrg
27848b8605Smrg
28848b8605Smrg#ifndef U_FRAMEBUFFER_H
29848b8605Smrg#define U_FRAMEBUFFER_H
30848b8605Smrg
31848b8605Smrg
32848b8605Smrg#include "pipe/p_compiler.h"
33848b8605Smrg#include "pipe/p_state.h"
34848b8605Smrg
35848b8605Smrg
36848b8605Smrg#ifdef __cplusplus
37848b8605Smrgextern "C" {
38848b8605Smrg#endif
39848b8605Smrg
40848b8605Smrgextern boolean
41848b8605Smrgutil_framebuffer_state_equal(const struct pipe_framebuffer_state *dst,
42848b8605Smrg                             const struct pipe_framebuffer_state *src);
43848b8605Smrg
44848b8605Smrgextern void
45848b8605Smrgutil_copy_framebuffer_state(struct pipe_framebuffer_state *dst,
46848b8605Smrg                            const struct pipe_framebuffer_state *src);
47848b8605Smrg
48848b8605Smrg
49848b8605Smrgextern void
50848b8605Smrgutil_unreference_framebuffer_state(struct pipe_framebuffer_state *fb);
51848b8605Smrg
52848b8605Smrg
53848b8605Smrgextern boolean
54848b8605Smrgutil_framebuffer_min_size(const struct pipe_framebuffer_state *fb,
55848b8605Smrg                          unsigned *width,
56848b8605Smrg                          unsigned *height);
57848b8605Smrg
58848b8605Smrg
59848b8605Smrgextern unsigned
60848b8605Smrgutil_framebuffer_get_num_layers(const struct pipe_framebuffer_state *fb);
61848b8605Smrg
62848b8605Smrg
63848b8605Smrgextern unsigned
64848b8605Smrgutil_framebuffer_get_num_samples(const struct pipe_framebuffer_state *fb);
65848b8605Smrg
66848b8605Smrg
67b8e80941Smrgextern void
68b8e80941Smrgutil_sample_locations_flip_y(struct pipe_screen *screen, unsigned fb_height,
69b8e80941Smrg                             unsigned samples, uint8_t *locations);
70b8e80941Smrg
71b8e80941Smrg
72848b8605Smrg#ifdef __cplusplus
73848b8605Smrg}
74848b8605Smrg#endif
75848b8605Smrg
76848b8605Smrg#endif /* U_FRAMEBUFFER_H */
77