1 /****************************************************************************
2 * Copyright (C) 2015 Intel Corporation. All Rights Reserved.
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
11 * The above copyright notice and this permission notice (including the next
12 * paragraph) shall be included in all copies or substantial portions of the
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
18 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
20 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
22 ***************************************************************************/
26 class swr_vertex_shader
;
27 class swr_fragment_shader
;
31 swr_compile_vs(struct pipe_context
*ctx
, swr_vertex_shader
*swr_vs
);
34 swr_compile_fs(struct swr_context
*ctx
, swr_jit_key
&key
);
36 void swr_generate_fs_key(struct swr_jit_key
&key
,
37 struct swr_context
*ctx
,
38 swr_fragment_shader
*swr_fs
);
42 unsigned light_twoside
;
43 ubyte vs_output_semantic_name
[PIPE_MAX_SHADER_OUTPUTS
];
44 ubyte vs_output_semantic_idx
[PIPE_MAX_SHADER_OUTPUTS
];
46 unsigned nr_sampler_views
;
47 struct swr_sampler_static_state sampler
[PIPE_MAX_SHADER_SAMPLER_VIEWS
];
52 template <> struct hash
<swr_jit_key
> {
53 std::size_t operator()(const swr_jit_key
&k
) const
55 return util_hash_crc32(&k
, sizeof(k
));
60 bool operator==(const swr_jit_key
&lhs
, const swr_jit_key
&rhs
);