Lines Matching refs:cso
94 const struct pipe_rasterizer_state *cso) in vc4_create_rasterizer_state() argument
105 so->base = *cso; in vc4_create_rasterizer_state()
107 if (!(cso->cull_face & PIPE_FACE_FRONT)) in vc4_create_rasterizer_state()
109 if (!(cso->cull_face & PIPE_FACE_BACK)) in vc4_create_rasterizer_state()
115 point_size.point_size = MAX2(cso->point_size, .125f); in vc4_create_rasterizer_state()
117 line_width.line_width = cso->line_width; in vc4_create_rasterizer_state()
119 if (cso->front_ccw) in vc4_create_rasterizer_state()
122 if (cso->offset_tri) { in vc4_create_rasterizer_state()
126 float_to_187_half(cso->offset_units); in vc4_create_rasterizer_state()
128 float_to_187_half(cso->offset_scale); in vc4_create_rasterizer_state()
131 if (cso->multisample) in vc4_create_rasterizer_state()
138 if (cso->tile_raster_order_fixed) { in vc4_create_rasterizer_state()
140 if (cso->tile_raster_order_increasing_x) { in vc4_create_rasterizer_state()
144 if (cso->tile_raster_order_increasing_y) { in vc4_create_rasterizer_state()
156 const struct pipe_blend_state *cso) in vc4_create_blend_state() argument
158 return vc4_generic_cso_state_create(cso, sizeof(*cso)); in vc4_create_blend_state()
207 const struct pipe_depth_stencil_alpha_state *cso) in vc4_create_depth_stencil_alpha_state() argument
215 so->base = *cso; in vc4_create_depth_stencil_alpha_state()
222 if (cso->depth.enabled) { in vc4_create_depth_stencil_alpha_state()
223 if (cso->depth.writemask) { in vc4_create_depth_stencil_alpha_state()
226 so->config_bits[1] |= (cso->depth.func << in vc4_create_depth_stencil_alpha_state()
233 if ((cso->depth.func == PIPE_FUNC_LESS || in vc4_create_depth_stencil_alpha_state()
234 cso->depth.func == PIPE_FUNC_LEQUAL) && in vc4_create_depth_stencil_alpha_state()
235 (!cso->stencil[0].enabled || in vc4_create_depth_stencil_alpha_state()
236 (cso->stencil[0].zfail_op == PIPE_STENCIL_OP_KEEP && in vc4_create_depth_stencil_alpha_state()
237 (!cso->stencil[1].enabled || in vc4_create_depth_stencil_alpha_state()
238 cso->stencil[1].zfail_op == PIPE_STENCIL_OP_KEEP)))) { in vc4_create_depth_stencil_alpha_state()
246 if (cso->stencil[0].enabled) { in vc4_create_depth_stencil_alpha_state()
247 const struct pipe_stencil_state *front = &cso->stencil[0]; in vc4_create_depth_stencil_alpha_state()
248 const struct pipe_stencil_state *back = &cso->stencil[1]; in vc4_create_depth_stencil_alpha_state()
415 struct pipe_framebuffer_state *cso = &vc4->framebuffer; in vc4_set_framebuffer_state() local
421 pipe_surface_reference(&cso->cbufs[i], framebuffer->cbufs[i]); in vc4_set_framebuffer_state()
423 pipe_surface_reference(&cso->cbufs[i], NULL); in vc4_set_framebuffer_state()
425 cso->nr_cbufs = framebuffer->nr_cbufs; in vc4_set_framebuffer_state()
427 pipe_surface_reference(&cso->zsbuf, framebuffer->zsbuf); in vc4_set_framebuffer_state()
429 cso->width = framebuffer->width; in vc4_set_framebuffer_state()
430 cso->height = framebuffer->height; in vc4_set_framebuffer_state()
438 if (cso->cbufs[0] && cso->cbufs[0]->u.tex.level) { in vc4_set_framebuffer_state()
440 vc4_resource(cso->cbufs[0]->texture); in vc4_set_framebuffer_state()
441 cso->width = in vc4_set_framebuffer_state()
442 (rsc->slices[cso->cbufs[0]->u.tex.level].stride / in vc4_set_framebuffer_state()
444 } else if (cso->zsbuf && cso->zsbuf->u.tex.level){ in vc4_set_framebuffer_state()
446 vc4_resource(cso->zsbuf->texture); in vc4_set_framebuffer_state()
447 cso->width = in vc4_set_framebuffer_state()
448 (rsc->slices[cso->zsbuf->u.tex.level].stride / in vc4_set_framebuffer_state()
495 const struct pipe_sampler_state *cso) in vc4_create_sampler_state() argument
510 (cso->mag_img_filter == PIPE_TEX_MIPFILTER_NEAREST || in vc4_create_sampler_state()
511 cso->min_img_filter == PIPE_TEX_MIPFILTER_NEAREST); in vc4_create_sampler_state()
517 memcpy(so, cso, sizeof(*cso)); in vc4_create_sampler_state()
520 (VC4_SET_FIELD(magfilter_map[cso->mag_img_filter], in vc4_create_sampler_state()
522 VC4_SET_FIELD(minfilter_map[cso->min_mip_filter * 2 + in vc4_create_sampler_state()
523 cso->min_img_filter], in vc4_create_sampler_state()
525 VC4_SET_FIELD(translate_wrap(cso->wrap_s, either_nearest), in vc4_create_sampler_state()
527 VC4_SET_FIELD(translate_wrap(cso->wrap_t, either_nearest), in vc4_create_sampler_state()
560 const struct pipe_sampler_view *cso) in vc4_create_sampler_view() argument
568 so->base = *cso; in vc4_create_sampler_view()
582 if ((cso->u.tex.first_level && in vc4_create_sampler_view()
583 (cso->u.tex.first_level != cso->u.tex.last_level)) || in vc4_create_sampler_view()
589 tmpl.width0 = u_minify(tmpl.width0, cso->u.tex.first_level); in vc4_create_sampler_view()
590 tmpl.height0 = u_minify(tmpl.height0, cso->u.tex.first_level); in vc4_create_sampler_view()
591 tmpl.last_level = cso->u.tex.last_level - cso->u.tex.first_level; in vc4_create_sampler_view()
614 if (cso->u.tex.first_level) { in vc4_create_sampler_view()
623 cso->u.tex.last_level : in vc4_create_sampler_view()
624 cso->u.tex.last_level - in vc4_create_sampler_view()
625 cso->u.tex.first_level, VC4_TEX_P0_MIPLVLS) | in vc4_create_sampler_view()
626 VC4_SET_FIELD(cso->target == PIPE_TEXTURE_CUBE, in vc4_create_sampler_view()