ea9208c2c7a54881d57e89198650166b51c5a0d4
1 /**************************************************************************
3 * Copyright 2008 Tungsten Graphics, Inc., Cedar Park, Texas.
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 TUNGSTEN GRAPHICS AND/OR ITS SUPPLIERS 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 **************************************************************************/
29 #ifndef U_SIMPLE_SHADERS_H
30 #define U_SIMPLE_SHADERS_H
33 #include "pipe/p_compiler.h"
37 struct pipe_shader_state
;
38 struct pipe_stream_output_info
;
47 util_make_vertex_passthrough_shader(struct pipe_context
*pipe
,
49 const uint
*semantic_names
,
50 const uint
*semantic_indexes
);
53 util_make_vertex_passthrough_shader_with_so(struct pipe_context
*pipe
,
55 const uint
*semantic_names
,
56 const uint
*semantic_indexes
,
57 const struct pipe_stream_output_info
*so
);
60 util_make_layered_clear_vertex_shader(struct pipe_context
*pipe
);
63 util_make_fragment_tex_shader_writemask(struct pipe_context
*pipe
,
69 util_make_fragment_tex_shader(struct pipe_context
*pipe
, unsigned tex_target
,
70 unsigned interp_mode
);
74 util_make_fragment_tex_shader_writedepth(struct pipe_context
*pipe
,
76 unsigned interp_mode
);
80 util_make_fragment_tex_shader_writedepthstencil(struct pipe_context
*pipe
,
82 unsigned interp_mode
);
86 util_make_fragment_tex_shader_writestencil(struct pipe_context
*pipe
,
88 unsigned interp_mode
);
92 util_make_fragment_passthrough_shader(struct pipe_context
*pipe
,
94 int input_interpolate
,
95 boolean write_all_cbufs
);
99 util_make_empty_fragment_shader(struct pipe_context
*pipe
);
103 util_make_fragment_cloneinput_shader(struct pipe_context
*pipe
, int num_cbufs
,
105 int input_interpolate
);
109 util_make_fs_blit_msaa_color(struct pipe_context
*pipe
,
114 util_make_fs_blit_msaa_depth(struct pipe_context
*pipe
,
119 util_make_fs_blit_msaa_depthstencil(struct pipe_context
*pipe
,
124 util_make_fs_blit_msaa_stencil(struct pipe_context
*pipe
,
129 util_make_fs_msaa_resolve(struct pipe_context
*pipe
,
130 unsigned tgsi_tex
, unsigned nr_samples
,
131 boolean is_uint
, boolean is_sint
);