1 /**************************************************************************
3 * Copyright 2011 Lauri Kasanen
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:
14 * The above copyright notice and this permission notice (including the
15 * next paragraph) shall be included in all copies or substantial portions
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.
26 **************************************************************************/
31 #include "pipe/p_state.h"
39 struct pp_queue_t
; /* Forward definition */
42 /* Less typing later on */
43 typedef void (*pp_func
) (struct pp_queue_t
*, struct pipe_resource
*,
44 struct pipe_resource
*, unsigned int);
49 * Note enabled is an array of values, one per filter stage.
50 * Zero indicates the stage is disabled. Non-zero indicates the
51 * stage is enabled. For some stages, the value controls quality.
53 struct pp_queue_t
*pp_init(struct pipe_context
*pipe
,
54 const unsigned int *enabled
,
55 struct cso_context
*);
57 void pp_run(struct pp_queue_t
*, struct pipe_resource
*,
58 struct pipe_resource
*, struct pipe_resource
*);
59 void pp_free(struct pp_queue_t
*);
61 void pp_init_fbos(struct pp_queue_t
*, unsigned int, unsigned int);
66 void pp_nocolor(struct pp_queue_t
*, struct pipe_resource
*,
67 struct pipe_resource
*, unsigned int);
69 void pp_jimenezmlaa(struct pp_queue_t
*, struct pipe_resource
*,
70 struct pipe_resource
*, unsigned int);
71 void pp_jimenezmlaa_color(struct pp_queue_t
*, struct pipe_resource
*,
72 struct pipe_resource
*, unsigned int);
74 /* The filter init functions */
76 bool pp_celshade_init(struct pp_queue_t
*, unsigned int, unsigned int);
78 bool pp_nored_init(struct pp_queue_t
*, unsigned int, unsigned int);
79 bool pp_nogreen_init(struct pp_queue_t
*, unsigned int, unsigned int);
80 bool pp_noblue_init(struct pp_queue_t
*, unsigned int, unsigned int);
82 bool pp_jimenezmlaa_init(struct pp_queue_t
*, unsigned int, unsigned int);
83 bool pp_jimenezmlaa_init_color(struct pp_queue_t
*, unsigned int,
86 /* The filter free functions */
88 void pp_celshade_free(struct pp_queue_t
*, unsigned int);
89 void pp_nocolor_free(struct pp_queue_t
*, unsigned int);
90 void pp_jimenezmlaa_free(struct pp_queue_t
*, unsigned int);