Lines Matching refs:sampler
33 * Sets the sampler state for a single unit.
37 struct gen7_sampler_state *sampler)
52 sampler->ss0.min_filter = BRW_MAPFILTER_NEAREST;
53 sampler->ss0.mip_filter = BRW_MIPFILTER_NONE;
57 sampler->ss0.min_filter = BRW_MAPFILTER_LINEAR;
58 sampler->ss0.mip_filter = BRW_MIPFILTER_NONE;
61 sampler->ss0.min_filter = BRW_MAPFILTER_NEAREST;
62 sampler->ss0.mip_filter = BRW_MIPFILTER_NEAREST;
65 sampler->ss0.min_filter = BRW_MAPFILTER_LINEAR;
66 sampler->ss0.mip_filter = BRW_MIPFILTER_NEAREST;
69 sampler->ss0.min_filter = BRW_MAPFILTER_NEAREST;
70 sampler->ss0.mip_filter = BRW_MIPFILTER_LINEAR;
73 sampler->ss0.min_filter = BRW_MAPFILTER_LINEAR;
74 sampler->ss0.mip_filter = BRW_MIPFILTER_LINEAR;
82 sampler->ss0.min_filter = BRW_MAPFILTER_ANISOTROPIC;
83 sampler->ss0.mag_filter = BRW_MAPFILTER_ANISOTROPIC;
86 sampler->ss3.max_aniso = MIN2((gl_sampler->MaxAnisotropy - 2) / 2,
93 sampler->ss0.mag_filter = BRW_MAPFILTER_NEAREST;
97 sampler->ss0.mag_filter = BRW_MAPFILTER_LINEAR;
104 sampler->ss3.r_wrap_mode = translate_wrap_mode(gl_sampler->WrapR,
106 sampler->ss3.s_wrap_mode = translate_wrap_mode(gl_sampler->WrapS,
108 sampler->ss3.t_wrap_mode = translate_wrap_mode(gl_sampler->WrapT,
118 sampler->ss3.r_wrap_mode = BRW_TEXCOORDMODE_CUBE;
119 sampler->ss3.s_wrap_mode = BRW_TEXCOORDMODE_CUBE;
120 sampler->ss3.t_wrap_mode = BRW_TEXCOORDMODE_CUBE;
122 sampler->ss3.r_wrap_mode = BRW_TEXCOORDMODE_CLAMP;
123 sampler->ss3.s_wrap_mode = BRW_TEXCOORDMODE_CLAMP;
124 sampler->ss3.t_wrap_mode = BRW_TEXCOORDMODE_CLAMP;
132 sampler->ss3.t_wrap_mode = BRW_TEXCOORDMODE_WRAP;
137 /* Shadowing is "enabled" by emitting a particular sampler
141 sampler->ss1.shadow_function =
146 sampler->ss0.lod_bias = S_FIXED(CLAMP(texUnit->LodBias +
149 sampler->ss0.lod_preclamp = 1; /* OpenGL mode */
150 sampler->ss0.default_color_mode = 0; /* OpenGL/DX10 mode */
159 sampler->ss0.base_level = U_FIXED(0, 1);
161 sampler->ss1.max_lod = U_FIXED(CLAMP(gl_sampler->MaxLod, 0, 13), 8);
162 sampler->ss1.min_lod = U_FIXED(CLAMP(gl_sampler->MinLod, 0, 13), 8);
164 /* The sampler can handle non-normalized texture rectangle coordinates
168 sampler->ss3.non_normalized_coord = 1;
173 sampler->ss2.default_color_pointer = brw->wm.sdc_offset[ss_index] >> 5;
175 if (sampler->ss0.min_filter != BRW_MAPFILTER_NEAREST)
176 sampler->ss3.address_round |= BRW_ADDRESS_ROUNDING_ENABLE_U_MIN |
179 if (sampler->ss0.mag_filter != BRW_MAPFILTER_NEAREST)
180 sampler->ss3.address_round |= BRW_ADDRESS_ROUNDING_ENABLE_U_MAG |
198 brw->sampler.count = _mesa_fls(SamplersUsed);
200 if (brw->sampler.count == 0)
204 brw->sampler.count * sizeof(*samplers),
205 32, &brw->sampler.offset);
206 memset(samplers, 0, brw->sampler.count * sizeof(*samplers));
208 for (unsigned s = 0; s < brw->sampler.count; s++) {