• Home
  • Raw
  • Download

Lines Matching full:so

10  * Software is furnished to do so, subject to the following conditions:
90 struct v3d_rasterizer_state *so; in v3d_create_rasterizer_state() local
92 so = CALLOC_STRUCT(v3d_rasterizer_state); in v3d_create_rasterizer_state()
93 if (!so) in v3d_create_rasterizer_state()
96 so->base = *cso; in v3d_create_rasterizer_state()
101 so->point_size = MAX2(cso->point_size, .125f); in v3d_create_rasterizer_state()
103 STATIC_ASSERT(sizeof(so->depth_offset) >= in v3d_create_rasterizer_state()
105 v3dx_pack(&so->depth_offset, DEPTH_OFFSET, depth) { in v3d_create_rasterizer_state()
110 /* The HW treats polygon offset units based on a Z24 buffer, so we in v3d_create_rasterizer_state()
113 v3dx_pack(&so->depth_offset_z16, DEPTH_OFFSET, depth) { in v3d_create_rasterizer_state()
118 return so; in v3d_create_rasterizer_state()
126 struct v3d_blend_state *so; in v3d_create_blend_state() local
128 so = CALLOC_STRUCT(v3d_blend_state); in v3d_create_blend_state()
129 if (!so) in v3d_create_blend_state()
132 so->base = *cso; in v3d_create_blend_state()
136 so->blend_enables |= cso->rt[i].blend_enable << i; in v3d_create_blend_state()
144 so->blend_enables = (1 << V3D_MAX_DRAW_BUFFERS) - 1; in v3d_create_blend_state()
147 return so; in v3d_create_blend_state()
170 struct v3d_depth_stencil_alpha_state *so; in v3d_create_depth_stencil_alpha_state() local
172 so = CALLOC_STRUCT(v3d_depth_stencil_alpha_state); in v3d_create_depth_stencil_alpha_state()
173 if (!so) in v3d_create_depth_stencil_alpha_state()
176 so->base = *cso; in v3d_create_depth_stencil_alpha_state()
182 so->ez_state = V3D_EZ_LT_LE; in v3d_create_depth_stencil_alpha_state()
186 so->ez_state = V3D_EZ_GT_GE; in v3d_create_depth_stencil_alpha_state()
190 so->ez_state = V3D_EZ_UNDECIDED; in v3d_create_depth_stencil_alpha_state()
193 so->ez_state = V3D_EZ_DISABLED; in v3d_create_depth_stencil_alpha_state()
206 so->ez_state = V3D_EZ_DISABLED; in v3d_create_depth_stencil_alpha_state()
214 STATIC_ASSERT(sizeof(so->stencil_front) >= in v3d_create_depth_stencil_alpha_state()
216 v3dx_pack(&so->stencil_front, STENCIL_CFG, config) { in v3d_create_depth_stencil_alpha_state()
236 STATIC_ASSERT(sizeof(so->stencil_back) >= in v3d_create_depth_stencil_alpha_state()
238 v3dx_pack(&so->stencil_back, STENCIL_CFG, config) { in v3d_create_depth_stencil_alpha_state()
255 return so; in v3d_create_depth_stencil_alpha_state()
298 struct v3d_vertexbuf_stateobj *so = &v3d->vertexbuf; in v3d_set_vertex_buffers() local
300 util_set_vertex_buffers_mask(so->vb, &so->enabled_mask, vb, in v3d_set_vertex_buffers()
304 so->count = util_last_bit(so->enabled_mask); in v3d_set_vertex_buffers()
338 struct v3d_vertex_stateobj *so = CALLOC_STRUCT(v3d_vertex_stateobj); in v3d_vertex_state_create() local
340 if (!so) in v3d_vertex_state_create()
343 memcpy(so->pipe, elements, sizeof(*elements) * num_elements); in v3d_vertex_state_create()
344 so->num_elements = num_elements; in v3d_vertex_state_create()
346 for (int i = 0; i < so->num_elements; i++) { in v3d_vertex_state_create()
355 v3dx_pack(&so->attrs[i * size], in v3d_vertex_state_create()
416 &so->defaults_offset, &so->defaults, (void **)&attrs); in v3d_vertex_state_create()
422 if (i < so->num_elements && in v3d_vertex_state_create()
423 util_format_is_pure_integer(so->pipe[i].src_format)) { in v3d_vertex_state_create()
431 return so; in v3d_vertex_state_create()
437 struct v3d_vertex_stateobj *so = hwcso; in v3d_vertex_state_delete() local
439 pipe_resource_reference(&so->defaults, NULL); in v3d_vertex_state_delete()
440 free(so); in v3d_vertex_state_delete()
457 struct v3d_constbuf_stateobj *so = &v3d->constbuf[shader]; in v3d_set_constant_buffer() local
459 util_copy_constant_buffer(&so->cb[index], cb, take_ownership); in v3d_set_constant_buffer()
465 so->enabled_mask &= ~(1 << index); in v3d_set_constant_buffer()
466 so->dirty_mask &= ~(1 << index); in v3d_set_constant_buffer()
470 so->enabled_mask |= 1 << index; in v3d_set_constant_buffer()
471 so->dirty_mask |= 1 << index; in v3d_set_constant_buffer()
559 * clamp the LOD so that we only sample from baselevel. in v3d_upload_sampler_state_variant()
561 * fractionally over the baselevel, so that the HW can decide in v3d_upload_sampler_state_variant()
715 struct v3d_sampler_state *so = CALLOC_STRUCT(v3d_sampler_state); in v3d_create_sampler_state() local
717 if (!so) in v3d_create_sampler_state()
720 memcpy(so, cso, sizeof(*cso)); in v3d_create_sampler_state()
729 so->border_color_variants = (uses_border_color && in v3d_create_sampler_state()
737 int sampler_align = so->border_color_variants ? 32 : 8; in v3d_create_sampler_state()
739 int num_variants = (so->border_color_variants ? ARRAY_SIZE(so->sampler_state_offset) : 1); in v3d_create_sampler_state()
743 &so->sampler_state_offset[0], in v3d_create_sampler_state()
744 &so->sampler_state, in v3d_create_sampler_state()
748 so->sampler_state_offset[i] = in v3d_create_sampler_state()
749 so->sampler_state_offset[0] + i * sampler_size; in v3d_create_sampler_state()
755 v3dx_pack(&so->p0, TEXTURE_UNIFORM_PARAMETER_0_CFG_MODE1, p0) { in v3d_create_sampler_state()
761 v3dx_pack(&so->texture_shader_state, TEXTURE_SHADER_STATE, tex) { in v3d_create_sampler_state()
766 return so; in v3d_create_sampler_state()
862 * at state create time, so any time this sampler view is used in v3d_setup_texture_shader_state()
895 struct v3d_sampler_view *so) in v3dX()
897 struct pipe_resource *prsc = so->texture; in v3dX()
898 const struct pipe_sampler_view *cso = &so->base; in v3dX()
904 v3d_bo_unreference(&so->bo); in v3dX()
905 so->bo = v3d_bo_alloc(v3d->screen, in v3dX()
907 map = v3d_bo_map(so->bo); in v3dX()
909 STATIC_ASSERT(sizeof(so->texture_shader_state) >= in v3dX()
911 map = &so->texture_shader_state; in v3dX()
924 tex.swizzle_r = translate_swizzle(so->swizzle[0]); in v3dX()
925 tex.swizzle_g = translate_swizzle(so->swizzle[1]); in v3dX()
926 tex.swizzle_b = translate_swizzle(so->swizzle[2]); in v3dX()
927 tex.swizzle_a = translate_swizzle(so->swizzle[3]); in v3dX()
986 struct v3d_sampler_view *so = CALLOC_STRUCT(v3d_sampler_view); in v3d_create_sampler_view() local
989 if (!so) in v3d_create_sampler_view()
992 so->base = *cso; in v3d_create_sampler_view()
1007 v3d_get_format_swizzle(&screen->devinfo, so->base.format); in v3d_create_sampler_view()
1008 util_format_compose_swizzles(fmt_swizzle, view_swizzle, so->swizzle); in v3d_create_sampler_view()
1010 so->base.texture = prsc; in v3d_create_sampler_view()
1011 so->base.reference.count = 1; in v3d_create_sampler_view()
1012 so->base.context = pctx; in v3d_create_sampler_view()
1038 so->sampler_variant = V3D_SAMPLER_STATE_32; in v3d_create_sampler_view()
1041 so->sampler_variant = V3D_SAMPLER_STATE_16U; in v3d_create_sampler_view()
1044 so->sampler_variant = V3D_SAMPLER_STATE_1010102U; in v3d_create_sampler_view()
1047 so->sampler_variant = V3D_SAMPLER_STATE_8U; in v3d_create_sampler_view()
1053 so->sampler_variant = V3D_SAMPLER_STATE_32; in v3d_create_sampler_view()
1056 so->sampler_variant = V3D_SAMPLER_STATE_16I; in v3d_create_sampler_view()
1059 so->sampler_variant = V3D_SAMPLER_STATE_8I; in v3d_create_sampler_view()
1067 so->sampler_variant = V3D_SAMPLER_STATE_32_A; in v3d_create_sampler_view()
1069 so->sampler_variant = V3D_SAMPLER_STATE_32; in v3d_create_sampler_view()
1072 so->sampler_variant = V3D_SAMPLER_STATE_F16_LA; in v3d_create_sampler_view()
1074 so->sampler_variant = V3D_SAMPLER_STATE_F16_A; in v3d_create_sampler_view()
1076 so->sampler_variant = V3D_SAMPLER_STATE_F16_BGRA; in v3d_create_sampler_view()
1078 so->sampler_variant = V3D_SAMPLER_STATE_F16; in v3d_create_sampler_view()
1083 so->sampler_variant += (V3D_SAMPLER_STATE_F16_UNORM - in v3d_create_sampler_view()
1086 so->sampler_variant += (V3D_SAMPLER_STATE_F16_SNORM - in v3d_create_sampler_view()
1092 /* V3D still doesn't support sampling from raster textures, so we will in v3d_create_sampler_view()
1117 free(so); in v3d_create_sampler_view()
1126 so->texture = prsc; in v3d_create_sampler_view()
1128 pipe_resource_reference(&so->texture, prsc); in v3d_create_sampler_view()
1131 v3d_create_texture_shader_state_bo(v3d, so); in v3d_create_sampler_view()
1133 return &so->base; in v3d_create_sampler_view()
1220 struct v3d_streamout_stateobj *so = &ctx->streamout; in v3d_set_stream_output_targets() local
1223 assert(num_targets <= ARRAY_SIZE(so->targets)); in v3d_set_stream_output_targets()
1230 if (num_targets == 0 && so->num_targets > 0) in v3d_set_stream_output_targets()
1235 so->offsets[i] = offsets[i]; in v3d_set_stream_output_targets()
1237 pipe_so_target_reference(&so->targets[i], targets[i]); in v3d_set_stream_output_targets()
1240 for (; i < so->num_targets; i++) in v3d_set_stream_output_targets()
1241 pipe_so_target_reference(&so->targets[i], NULL); in v3d_set_stream_output_targets()
1243 so->num_targets = num_targets; in v3d_set_stream_output_targets()
1260 struct v3d_ssbo_stateobj *so = &v3d->ssbo[shader]; in v3d_set_shader_buffers() local
1266 struct pipe_shader_buffer *buf = &so->sb[n]; in v3d_set_shader_buffers()
1280 so->enabled_mask |= 1 << n; in v3d_set_shader_buffers()
1282 so->enabled_mask &= ~(1 << n); in v3d_set_shader_buffers()
1289 struct pipe_shader_buffer *buf = &so->sb[n]; in v3d_set_shader_buffers()
1294 so->enabled_mask &= ~mask; in v3d_set_shader_buffers()
1302 struct v3d_shaderimg_stateobj *so, in v3d_create_image_view_texture_shader_state() argument
1306 struct v3d_image_view *iview = &so->si[img]; in v3d_create_image_view_texture_shader_state()
1334 * textures, so it would get lowered in the shader to general memory in v3d_create_image_view_texture_shader_state()
1348 struct v3d_shaderimg_stateobj *so = &v3d->shaderimg[shader]; in v3d_set_shader_images() local
1353 struct v3d_image_view *iview = &so->si[n]; in v3d_set_shader_images()
1365 so->enabled_mask |= 1 << n; in v3d_set_shader_images()
1367 so, in v3d_set_shader_images()
1370 so->enabled_mask &= ~(1 << n); in v3d_set_shader_images()
1377 struct v3d_image_view *iview = &so->si[n]; in v3d_set_shader_images()
1384 so->enabled_mask = 0; in v3d_set_shader_images()
1386 so->enabled_mask &= ~(((1 << count) - 1) << start); in v3d_set_shader_images()