2 * Mesa 3-D graphics library
4 * Copyright (C) 2015 LunarG, Inc.
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
13 * The above copyright notice and this permission notice shall be included
14 * in all copies or substantial portions of the Software.
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 * THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 * DEALINGS IN THE SOFTWARE.
25 * Chia-I Wu <olv@lunarg.com>
28 #ifndef ILO_STATE_SAMPLER_H
29 #define ILO_STATE_SAMPLER_H
31 #include "genhw/genhw.h"
36 struct ilo_state_surface
;
38 struct ilo_state_sampler_info
{
45 enum gen_mip_filter mip_filter
;
46 enum gen_map_filter min_filter
;
47 enum gen_map_filter mag_filter
;
48 enum gen_aniso_ratio max_anisotropy
;
50 enum gen_texcoord_mode tcx_ctrl
;
51 enum gen_texcoord_mode tcy_ctrl
;
52 enum gen_texcoord_mode tcz_ctrl
;
54 enum gen_prefilter_op shadow_func
;
57 struct ilo_state_sampler_border_info
{
66 struct ilo_state_sampler
{
69 uint32_t filter_integer
;
72 uint32_t addr_ctrl_1d
;
73 uint32_t addr_ctrl_2d_3d
;
74 uint32_t addr_ctrl_cube
;
77 bool base_to_surf_min_lod
;
80 struct ilo_state_sampler_border
{
85 ilo_state_sampler_init(struct ilo_state_sampler
*sampler
,
86 const struct ilo_dev
*dev
,
87 const struct ilo_state_sampler_info
*info
);
90 ilo_state_sampler_init_disabled(struct ilo_state_sampler
*sampler
,
91 const struct ilo_dev
*dev
);
94 ilo_state_sampler_set_surface(struct ilo_state_sampler
*sampler
,
95 const struct ilo_dev
*dev
,
96 const struct ilo_state_surface
*surf
);
99 ilo_state_sampler_border_init(struct ilo_state_sampler_border
*border
,
100 const struct ilo_dev
*dev
,
101 const struct ilo_state_sampler_border_info
*info
);
103 #endif /* ILO_STATE_SAMPLER_H */