Lines Matching refs:cso
62 filter_mode(const struct pipe_sampler_state *cso) in filter_mode() argument
66 switch (cso->mag_img_filter) { in filter_mode()
75 switch (cso->min_img_filter) { in filter_mode()
77 switch (cso->min_mip_filter) { in filter_mode()
90 switch (cso->min_mip_filter) { in filter_mode()
108 compare_mode(const struct pipe_sampler_state *cso) in compare_mode() argument
110 if (cso->compare_mode != PIPE_TEX_COMPARE_R_TO_TEXTURE) in compare_mode()
113 switch (cso->compare_func) { in compare_mode()
129 const struct pipe_sampler_state *cso) in nv30_sampler_state_create() argument
139 so->pipe = *cso; in nv30_sampler_state_create()
141 so->wrap = (wrap_mode(cso->wrap_s) << NV30_3D_TEX_WRAP_S__SHIFT) | in nv30_sampler_state_create()
142 (wrap_mode(cso->wrap_t) << NV30_3D_TEX_WRAP_T__SHIFT) | in nv30_sampler_state_create()
143 (wrap_mode(cso->wrap_r) << NV30_3D_TEX_WRAP_R__SHIFT); in nv30_sampler_state_create()
145 so->wrap |= compare_mode(cso); in nv30_sampler_state_create()
146 so->filt = filter_mode(cso) | 0x00002000; in nv30_sampler_state_create()
147 so->bcol = (float_to_ubyte(cso->border_color.f[3]) << 24) | in nv30_sampler_state_create()
148 (float_to_ubyte(cso->border_color.f[0]) << 16) | in nv30_sampler_state_create()
149 (float_to_ubyte(cso->border_color.f[1]) << 8) | in nv30_sampler_state_create()
150 (float_to_ubyte(cso->border_color.f[2]) << 0); in nv30_sampler_state_create()
153 unsigned aniso = cso->max_anisotropy; in nv30_sampler_state_create()
155 if (!cso->normalized_coords) in nv30_sampler_state_create()
172 if (cso->max_anisotropy >= 8) so->en |= NV30_3D_TEX_ENABLE_ANISO_8X; in nv30_sampler_state_create()
173 else if (cso->max_anisotropy >= 4) so->en |= NV30_3D_TEX_ENABLE_ANISO_4X; in nv30_sampler_state_create()
174 else if (cso->max_anisotropy >= 2) so->en |= NV30_3D_TEX_ENABLE_ANISO_2X; in nv30_sampler_state_create()
177 so->filt |= (int)(cso->lod_bias * 256.0) & 0x1fff; in nv30_sampler_state_create()
178 so->max_lod = (int)(CLAMP(cso->max_lod, 0.0, max_lod) * 256.0); in nv30_sampler_state_create()
179 so->min_lod = (int)(CLAMP(cso->min_lod, 0.0, max_lod) * 256.0); in nv30_sampler_state_create()