Lines Matching full:so
10 * Software is furnished to do so, subject to the following conditions:
97 struct vc4_rasterizer_state *so; in vc4_create_rasterizer_state() local
102 so = CALLOC_STRUCT(vc4_rasterizer_state); in vc4_create_rasterizer_state()
103 if (!so) in vc4_create_rasterizer_state()
106 so->base = *cso; in vc4_create_rasterizer_state()
109 so->config_bits[0] |= VC4_CONFIG_BITS_ENABLE_PRIM_FRONT; in vc4_create_rasterizer_state()
111 so->config_bits[0] |= VC4_CONFIG_BITS_ENABLE_PRIM_BACK; in vc4_create_rasterizer_state()
121 so->config_bits[0] |= VC4_CONFIG_BITS_CW_PRIMITIVES; in vc4_create_rasterizer_state()
124 so->config_bits[0] |= VC4_CONFIG_BITS_ENABLE_DEPTH_OFFSET; in vc4_create_rasterizer_state()
133 so->config_bits[0] |= VC4_CONFIG_BITS_RASTERIZER_OVERSAMPLE_4X; in vc4_create_rasterizer_state()
135 V3D21_DEPTH_OFFSET_pack(NULL, so->packed.depth_offset, &depth_offset); in vc4_create_rasterizer_state()
136 V3D21_POINT_SIZE_pack(NULL, so->packed.point_size, &point_size); in vc4_create_rasterizer_state()
137 V3D21_LINE_WIDTH_pack(NULL, so->packed.line_width, &line_width); in vc4_create_rasterizer_state()
140 so->tile_raster_order_flags |= VC4_SUBMIT_CL_FIXED_RCL_ORDER; in vc4_create_rasterizer_state()
142 so->tile_raster_order_flags |= in vc4_create_rasterizer_state()
146 so->tile_raster_order_flags |= in vc4_create_rasterizer_state()
151 return so; in vc4_create_rasterizer_state()
164 * values, so you don't have to do a separate writemask setup.
210 struct vc4_depth_stencil_alpha_state *so; in vc4_create_depth_stencil_alpha_state() local
212 so = CALLOC_STRUCT(vc4_depth_stencil_alpha_state); in vc4_create_depth_stencil_alpha_state()
213 if (!so) in vc4_create_depth_stencil_alpha_state()
216 so->base = *cso; in vc4_create_depth_stencil_alpha_state()
221 so->config_bits[2] |= VC4_CONFIG_BITS_EARLY_Z_UPDATE; in vc4_create_depth_stencil_alpha_state()
225 so->config_bits[1] |= VC4_CONFIG_BITS_Z_UPDATE; in vc4_create_depth_stencil_alpha_state()
227 so->config_bits[1] |= (cso->depth_func << in vc4_create_depth_stencil_alpha_state()
240 so->config_bits[2] |= VC4_CONFIG_BITS_EARLY_Z; in vc4_create_depth_stencil_alpha_state()
243 so->config_bits[1] |= (PIPE_FUNC_ALWAYS << in vc4_create_depth_stencil_alpha_state()
256 so->stencil_uniforms[0] = in vc4_create_depth_stencil_alpha_state()
263 so->stencil_uniforms[0] |= (UINT32_C(1) << 30); in vc4_create_depth_stencil_alpha_state()
264 so->stencil_uniforms[1] = in vc4_create_depth_stencil_alpha_state()
266 so->stencil_uniforms[1] |= (UINT32_C(2) << 30); in vc4_create_depth_stencil_alpha_state()
268 so->stencil_uniforms[0] |= (UINT32_C(3) << 30); in vc4_create_depth_stencil_alpha_state()
273 so->stencil_uniforms[2] = (front->writemask | in vc4_create_depth_stencil_alpha_state()
278 return so; in vc4_create_depth_stencil_alpha_state()
319 struct vc4_vertexbuf_stateobj *so = &vc4->vertexbuf; in vc4_set_vertex_buffers() local
321 util_set_vertex_buffers_mask(so->vb, &so->enabled_mask, vb, in vc4_set_vertex_buffers()
323 so->count = util_last_bit(so->enabled_mask); in vc4_set_vertex_buffers()
363 struct vc4_vertex_stateobj *so = CALLOC_STRUCT(vc4_vertex_stateobj); in vc4_vertex_state_create() local
365 if (!so) in vc4_vertex_state_create()
368 memcpy(so->pipe, elements, sizeof(*elements) * num_elements); in vc4_vertex_state_create()
369 so->num_elements = num_elements; in vc4_vertex_state_create()
371 return so; in vc4_vertex_state_create()
389 struct vc4_constbuf_stateobj *so = &vc4->constbuf[shader]; in vc4_set_constant_buffer() local
395 so->enabled_mask &= ~(1 << index); in vc4_set_constant_buffer()
396 so->dirty_mask &= ~(1 << index); in vc4_set_constant_buffer()
400 if (index == 1 && so->cb[index].buffer_size != cb->buffer_size) in vc4_set_constant_buffer()
403 util_copy_constant_buffer(&so->cb[index], cb, take_ownership); in vc4_set_constant_buffer()
405 so->enabled_mask |= 1 << index; in vc4_set_constant_buffer()
406 so->dirty_mask |= 1 << index; in vc4_set_constant_buffer()
423 * stride from the width parameter, so we need to configure our in vc4_set_framebuffer_state()
501 struct vc4_sampler_state *so = CALLOC_STRUCT(vc4_sampler_state); in vc4_create_sampler_state() local
503 if (!so) in vc4_create_sampler_state()
506 memcpy(so, cso, sizeof(*cso)); in vc4_create_sampler_state()
508 so->texture_p1 = in vc4_create_sampler_state()
519 return so; in vc4_create_sampler_state()
551 struct vc4_sampler_view *so = CALLOC_STRUCT(vc4_sampler_view); in vc4_create_sampler_view() local
554 if (!so) in vc4_create_sampler_view()
557 so->base = *cso; in vc4_create_sampler_view()
559 so->base.texture = NULL; in vc4_create_sampler_view()
560 pipe_resource_reference(&so->base.texture, prsc); in vc4_create_sampler_view()
561 so->base.reference.count = 1; in vc4_create_sampler_view()
562 so->base.context = pctx; in vc4_create_sampler_view()
565 * texture may be misaligned, so in that case we have to copy to a in vc4_create_sampler_view()
569 * so we also have to copy to a temporary then. in vc4_create_sampler_view()
593 free(so); in vc4_create_sampler_view()
605 so->texture = prsc; in vc4_create_sampler_view()
607 pipe_resource_reference(&so->texture, prsc); in vc4_create_sampler_view()
610 so->force_first_level = true; in vc4_create_sampler_view()
614 so->texture_p0 = in vc4_create_sampler_view()
619 VC4_SET_FIELD(so->force_first_level ? in vc4_create_sampler_view()
625 so->texture_p1 = in vc4_create_sampler_view()
631 so->texture_p1 |= VC4_TEX_P1_ETCFLIP_MASK; in vc4_create_sampler_view()
633 return &so->base; in vc4_create_sampler_view()