Lines Matching refs:cso

117                         const struct pipe_blend_state *cso)  in nv50_blend_state_create()  argument
121 boolean emit_common_func = cso->rt[0].blend_enable; in nv50_blend_state_create()
126 SB_DATA (so, cso->independent_blend_enable); in nv50_blend_state_create()
129 so->pipe = *cso; in nv50_blend_state_create()
132 SB_DATA (so, !cso->independent_blend_enable); in nv50_blend_state_create()
135 SB_DATA (so, !cso->independent_blend_enable); in nv50_blend_state_create()
137 if (cso->independent_blend_enable) { in nv50_blend_state_create()
140 SB_DATA(so, cso->rt[i].blend_enable); in nv50_blend_state_create()
141 if (cso->rt[i].blend_enable) in nv50_blend_state_create()
149 if (!cso->rt[i].blend_enable) in nv50_blend_state_create()
152 SB_DATA (so, nvgl_blend_eqn(cso->rt[i].rgb_func)); in nv50_blend_state_create()
153 SB_DATA (so, nv50_blend_fac(cso->rt[i].rgb_src_factor)); in nv50_blend_state_create()
154 SB_DATA (so, nv50_blend_fac(cso->rt[i].rgb_dst_factor)); in nv50_blend_state_create()
155 SB_DATA (so, nvgl_blend_eqn(cso->rt[i].alpha_func)); in nv50_blend_state_create()
156 SB_DATA (so, nv50_blend_fac(cso->rt[i].alpha_src_factor)); in nv50_blend_state_create()
157 SB_DATA (so, nv50_blend_fac(cso->rt[i].alpha_dst_factor)); in nv50_blend_state_create()
162 SB_DATA (so, cso->rt[0].blend_enable); in nv50_blend_state_create()
167 SB_DATA (so, nvgl_blend_eqn(cso->rt[0].rgb_func)); in nv50_blend_state_create()
168 SB_DATA (so, nv50_blend_fac(cso->rt[0].rgb_src_factor)); in nv50_blend_state_create()
169 SB_DATA (so, nv50_blend_fac(cso->rt[0].rgb_dst_factor)); in nv50_blend_state_create()
170 SB_DATA (so, nvgl_blend_eqn(cso->rt[0].alpha_func)); in nv50_blend_state_create()
171 SB_DATA (so, nv50_blend_fac(cso->rt[0].alpha_src_factor)); in nv50_blend_state_create()
173 SB_DATA (so, nv50_blend_fac(cso->rt[0].alpha_dst_factor)); in nv50_blend_state_create()
176 if (cso->logicop_enable) { in nv50_blend_state_create()
179 SB_DATA (so, nvgl_logicop_func(cso->logicop_func)); in nv50_blend_state_create()
185 if (cso->independent_blend_enable) { in nv50_blend_state_create()
188 SB_DATA(so, nv50_colormask(cso->rt[i].colormask)); in nv50_blend_state_create()
191 SB_DATA (so, nv50_colormask(cso->rt[0].colormask)); in nv50_blend_state_create()
195 if (cso->alpha_to_coverage) in nv50_blend_state_create()
197 if (cso->alpha_to_one) in nv50_blend_state_create()
225 const struct pipe_rasterizer_state *cso) in nv50_rasterizer_state_create() argument
233 so->pipe = *cso; in nv50_rasterizer_state_create()
237 SB_DATA (so, cso->scissor); in nv50_rasterizer_state_create()
241 SB_DATA (so, cso->flatshade ? NV50_3D_SHADE_MODEL_FLAT : in nv50_rasterizer_state_create()
244 SB_DATA (so, !cso->flatshade_first); in nv50_rasterizer_state_create()
246 SB_DATA (so, cso->light_twoside); in nv50_rasterizer_state_create()
249 SB_DATA (so, cso->clamp_fragment_color ? 0x11111111 : 0x00000000); in nv50_rasterizer_state_create()
252 SB_DATA (so, cso->multisample); in nv50_rasterizer_state_create()
255 SB_DATA (so, fui(cso->line_width)); in nv50_rasterizer_state_create()
257 SB_DATA (so, cso->line_smooth); in nv50_rasterizer_state_create()
260 if (cso->line_stipple_enable) { in nv50_rasterizer_state_create()
263 SB_DATA (so, (cso->line_stipple_pattern << 8) | in nv50_rasterizer_state_create()
264 cso->line_stipple_factor); in nv50_rasterizer_state_create()
269 if (!cso->point_size_per_vertex) { in nv50_rasterizer_state_create()
271 SB_DATA (so, fui(cso->point_size)); in nv50_rasterizer_state_create()
274 SB_DATA (so, cso->point_quad_rasterization); in nv50_rasterizer_state_create()
276 SB_DATA (so, cso->point_smooth); in nv50_rasterizer_state_create()
279 SB_DATA (so, nvgl_polygon_mode(cso->fill_front)); in nv50_rasterizer_state_create()
280 SB_DATA (so, nvgl_polygon_mode(cso->fill_back)); in nv50_rasterizer_state_create()
281 SB_DATA (so, cso->poly_smooth); in nv50_rasterizer_state_create()
284 SB_DATA (so, cso->cull_face != PIPE_FACE_NONE); in nv50_rasterizer_state_create()
285 SB_DATA (so, cso->front_ccw ? NV50_3D_FRONT_FACE_CCW : in nv50_rasterizer_state_create()
287 switch (cso->cull_face) { in nv50_rasterizer_state_create()
301 SB_DATA (so, cso->poly_stipple_enable); in nv50_rasterizer_state_create()
303 SB_DATA (so, cso->offset_point); in nv50_rasterizer_state_create()
304 SB_DATA (so, cso->offset_line); in nv50_rasterizer_state_create()
305 SB_DATA (so, cso->offset_tri); in nv50_rasterizer_state_create()
307 if (cso->offset_point || cso->offset_line || cso->offset_tri) { in nv50_rasterizer_state_create()
309 SB_DATA (so, fui(cso->offset_scale)); in nv50_rasterizer_state_create()
311 SB_DATA (so, fui(cso->offset_units * 2.0f)); in nv50_rasterizer_state_create()
313 SB_DATA (so, fui(cso->offset_clamp)); in nv50_rasterizer_state_create()
316 if (cso->depth_clip) { in nv50_rasterizer_state_create()
353 const struct pipe_depth_stencil_alpha_state *cso) in nv50_zsa_state_create() argument
357 so->pipe = *cso; in nv50_zsa_state_create()
360 SB_DATA (so, cso->depth.writemask); in nv50_zsa_state_create()
362 if (cso->depth.enabled) { in nv50_zsa_state_create()
365 SB_DATA (so, nvgl_comparison_op(cso->depth.func)); in nv50_zsa_state_create()
370 if (cso->stencil[0].enabled) { in nv50_zsa_state_create()
373 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].fail_op)); in nv50_zsa_state_create()
374 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zfail_op)); in nv50_zsa_state_create()
375 SB_DATA (so, nvgl_stencil_op(cso->stencil[0].zpass_op)); in nv50_zsa_state_create()
376 SB_DATA (so, nvgl_comparison_op(cso->stencil[0].func)); in nv50_zsa_state_create()
378 SB_DATA (so, cso->stencil[0].writemask); in nv50_zsa_state_create()
379 SB_DATA (so, cso->stencil[0].valuemask); in nv50_zsa_state_create()
385 if (cso->stencil[1].enabled) { in nv50_zsa_state_create()
386 assert(cso->stencil[0].enabled); in nv50_zsa_state_create()
389 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].fail_op)); in nv50_zsa_state_create()
390 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zfail_op)); in nv50_zsa_state_create()
391 SB_DATA (so, nvgl_stencil_op(cso->stencil[1].zpass_op)); in nv50_zsa_state_create()
392 SB_DATA (so, nvgl_comparison_op(cso->stencil[1].func)); in nv50_zsa_state_create()
394 SB_DATA (so, cso->stencil[1].writemask); in nv50_zsa_state_create()
395 SB_DATA (so, cso->stencil[1].valuemask); in nv50_zsa_state_create()
402 if (cso->alpha.enabled) { in nv50_zsa_state_create()
405 SB_DATA (so, fui(cso->alpha.ref_value)); in nv50_zsa_state_create()
406 SB_DATA (so, nvgl_comparison_op(cso->alpha.func)); in nv50_zsa_state_create()
456 const struct pipe_sampler_state *cso) in nv50_sampler_state_create() argument
464 (nv50_tsc_wrap_mode(cso->wrap_s) << 0) | in nv50_sampler_state_create()
465 (nv50_tsc_wrap_mode(cso->wrap_t) << 3) | in nv50_sampler_state_create()
466 (nv50_tsc_wrap_mode(cso->wrap_r) << 6)); in nv50_sampler_state_create()
469 if (cso->seamless_cube_map) in nv50_sampler_state_create()
471 if (!cso->normalized_coords) in nv50_sampler_state_create()
475 switch (cso->mag_img_filter) { in nv50_sampler_state_create()
485 switch (cso->min_img_filter) { in nv50_sampler_state_create()
495 switch (cso->min_mip_filter) { in nv50_sampler_state_create()
508 if (cso->max_anisotropy >= 16) in nv50_sampler_state_create()
511 if (cso->max_anisotropy >= 12) in nv50_sampler_state_create()
514 so->tsc[0] |= (cso->max_anisotropy >> 1) << 20; in nv50_sampler_state_create()
516 if (cso->max_anisotropy >= 4) in nv50_sampler_state_create()
519 if (cso->max_anisotropy >= 2) in nv50_sampler_state_create()
523 if (cso->compare_mode == PIPE_TEX_COMPARE_R_TO_TEXTURE) { in nv50_sampler_state_create()
526 so->tsc[0] |= (nvgl_comparison_op(cso->compare_func) & 0x7) << 10; in nv50_sampler_state_create()
529 f[0] = CLAMP(cso->lod_bias, -16.0f, 15.0f); in nv50_sampler_state_create()
532 f[0] = CLAMP(cso->min_lod, 0.0f, 15.0f); in nv50_sampler_state_create()
533 f[1] = CLAMP(cso->max_lod, 0.0f, 15.0f); in nv50_sampler_state_create()
537 so->tsc[4] = fui(cso->border_color.f[0]); in nv50_sampler_state_create()
538 so->tsc[5] = fui(cso->border_color.f[1]); in nv50_sampler_state_create()
539 so->tsc[6] = fui(cso->border_color.f[2]); in nv50_sampler_state_create()
540 so->tsc[7] = fui(cso->border_color.f[3]); in nv50_sampler_state_create()
672 const struct pipe_shader_state *cso, unsigned type) in nv50_sp_state_create() argument
681 prog->pipe.tokens = tgsi_dup_tokens(cso->tokens); in nv50_sp_state_create()
683 if (cso->stream_output.num_outputs) in nv50_sp_state_create()
684 prog->pipe.stream_output = cso->stream_output; in nv50_sp_state_create()
702 const struct pipe_shader_state *cso) in nv50_vp_state_create() argument
704 return nv50_sp_state_create(pipe, cso, PIPE_SHADER_VERTEX); in nv50_vp_state_create()
718 const struct pipe_shader_state *cso) in nv50_fp_state_create() argument
720 return nv50_sp_state_create(pipe, cso, PIPE_SHADER_FRAGMENT); in nv50_fp_state_create()
734 const struct pipe_shader_state *cso) in nv50_gp_state_create() argument
736 return nv50_sp_state_create(pipe, cso, PIPE_SHADER_GEOMETRY); in nv50_gp_state_create()