gallium/pp: s/uint/enum tgsi_semantic/ to fix MSVC warning
[mesa.git] / src / gallium / auxiliary / postprocess / pp_private.h
1 /**************************************************************************
2 *
3 * Copyright 2011 Lauri Kasanen
4 * All Rights Reserved.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the
8 * "Software"), to deal in the Software without restriction, including
9 * without limitation the rights to use, copy, modify, merge, publish,
10 * distribute, sub license, and/or sell copies of the Software, and to
11 * permit persons to whom the Software is furnished to do so, subject to
12 * the following conditions:
13 *
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
16 * of the Software.
17 *
18 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
19 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
21 * IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR
22 * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
23 * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
24 * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25 *
26 **************************************************************************/
27
28 #ifndef PP_PRIVATE_H
29 #define PP_PRIVATE_H
30
31
32 #include "postprocess.h"
33
34
35 /**
36 * Internal control details.
37 */
38 struct pp_program
39 {
40 struct pipe_screen *screen;
41 struct pipe_context *pipe;
42 struct cso_context *cso;
43
44 struct pipe_blend_state blend;
45 struct pipe_depth_stencil_alpha_state depthstencil;
46 struct pipe_rasterizer_state rasterizer;
47 struct pipe_sampler_state sampler; /* bilinear */
48 struct pipe_sampler_state sampler_point; /* point */
49 struct pipe_viewport_state viewport;
50 struct pipe_framebuffer_state framebuffer;
51 struct pipe_vertex_element velem[2];
52
53 union pipe_color_union clear_color;
54
55 void *passvs;
56
57 struct pipe_resource *vbuf;
58 struct pipe_surface surf;
59 struct pipe_sampler_view *view;
60 };
61
62
63
64 /**
65 * The main post-processing queue.
66 */
67 struct pp_queue_t
68 {
69 pp_func *pp_queue; /* An array of pp_funcs */
70 unsigned int n_filters; /* Number of enabled filters */
71
72 struct pipe_resource *tmp[2]; /* Two temp FBOs for the queue */
73 struct pipe_resource *inner_tmp[3]; /* Three for filter use */
74
75 unsigned int n_tmp, n_inner_tmp;
76
77 struct pipe_resource *depth; /* depth of original input */
78 struct pipe_resource *stencil; /* stencil shared by inner_tmps */
79 struct pipe_resource *areamaptex; /* MLAA area map texture */
80
81 struct pipe_surface *tmps[2], *inner_tmps[3], *stencils;
82
83 void ***shaders; /* Shaders in TGSI form */
84 unsigned int *filters; /* Active filter to filters.h mapping. */
85 struct pp_program *p;
86
87 bool fbos_init;
88 };
89
90
91 void pp_free_fbos(struct pp_queue_t *);
92
93 void pp_debug(const char *, ...);
94
95 struct pp_program *pp_init_prog(struct pp_queue_t *, struct pipe_context *pipe,
96 struct cso_context *);
97
98 void pp_blit(struct pipe_context *pipe,
99 struct pipe_resource *src_tex,
100 int srcX0, int srcY0,
101 int srcX1, int srcY1,
102 int srcZ0,
103 struct pipe_surface *dst,
104 int dstX0, int dstY0,
105 int dstX1, int dstY1);
106
107
108 #endif /* PP_PRIVATE_H */