Lines Matching refs:cfg

107    pan_pack(attrib, ATTRIBUTE, cfg) {
108 cfg.buffer_index = varyings->varying[loc].buf;
109 cfg.offset = varyings->varying[loc].offset;
110 cfg.format = panvk_varying_hw_format(dev, varyings, stage, idx);
132 pan_pack(buf, ATTRIBUTE_BUFFER, cfg) {
135 cfg.stride = varyings->buf[buf_idx].stride;
136 cfg.size = varyings->buf[buf_idx].size + offset;
137 cfg.pointer = varyings->buf[buf_idx].address & ~63ULL;
171 pan_pack(desc, ATTRIBUTE_BUFFER, cfg) {
172 cfg.type = MALI_ATTRIBUTE_TYPE_1D;
173 cfg.stride = buf_info->per_instance ? 0 : buf_info->stride;
174 cfg.pointer = addr;
175 cfg.size = size;
178 pan_pack(desc, ATTRIBUTE_BUFFER, cfg) {
179 cfg.type = MALI_ATTRIBUTE_TYPE_1D_MODULUS;
180 cfg.divisor = draw->padded_vertex_count;
181 cfg.stride = buf_info->stride;
182 cfg.pointer = addr;
183 cfg.size = size;
189 pan_pack(desc, ATTRIBUTE_BUFFER, cfg) {
190 cfg.type = MALI_ATTRIBUTE_TYPE_1D;
191 cfg.stride = 0;
192 cfg.pointer = addr;
193 cfg.size = size;
196 pan_pack(desc, ATTRIBUTE_BUFFER, cfg) {
197 cfg.type = MALI_ATTRIBUTE_TYPE_1D_POT_DIVISOR;
198 cfg.stride = buf_info->stride;
199 cfg.pointer = addr;
200 cfg.size = size;
201 cfg.divisor_r = __builtin_ctz(divisor);
207 pan_pack(desc, ATTRIBUTE_BUFFER, cfg) {
208 cfg.type = MALI_ATTRIBUTE_TYPE_1D_NPOT_DIVISOR;
209 cfg.stride = buf_info->stride;
210 cfg.pointer = addr;
211 cfg.size = size;
212 cfg.divisor_r = divisor_r;
213 cfg.divisor_e = divisor_e;
217 pan_pack(desc, ATTRIBUTE_BUFFER_CONTINUATION_NPOT, cfg) {
218 cfg.divisor_numerator = divisor_num;
219 cfg.divisor = buf_info->instance_divisor;
246 pan_pack(desc, SAMPLER, cfg) {
247 cfg.magnify_nearest = pCreateInfo->magFilter == VK_FILTER_NEAREST;
248 cfg.minify_nearest = pCreateInfo->minFilter == VK_FILTER_NEAREST;
249 cfg.mipmap_mode = panvk_translate_sampler_mipmap_mode(pCreateInfo->mipmapMode);
250 cfg.normalized_coordinates = !pCreateInfo->unnormalizedCoordinates;
252 cfg.lod_bias = FIXED_16(pCreateInfo->mipLodBias, true);
253 cfg.minimum_lod = FIXED_16(pCreateInfo->minLod, false);
254 cfg.maximum_lod = FIXED_16(pCreateInfo->maxLod, false);
255 cfg.wrap_mode_s = panvk_translate_sampler_address_mode(pCreateInfo->addressModeU);
256 cfg.wrap_mode_t = panvk_translate_sampler_address_mode(pCreateInfo->addressModeV);
257 cfg.wrap_mode_r = panvk_translate_sampler_address_mode(pCreateInfo->addressModeW);
258 cfg.compare_function = panvk_per_arch(translate_sampler_compare_func)(pCreateInfo);
259 cfg.border_color_r = border_color.uint32[0];
260 cfg.border_color_g = border_color.uint32[1];
261 cfg.border_color_b = border_color.uint32[2];
262 cfg.border_color_a = border_color.uint32[3];
278 pan_pack(attrib, ATTRIBUTE, cfg) {
279 cfg.buffer_index = buf_idx * 2;
280 cfg.offset = attribs->attrib[idx].offset +
284 cfg.offset += draw->first_instance * buf_info->stride;
286 cfg.format = pdev->formats[attribs->attrib[idx].format].hw;
307 pan_pack(desc, UNIFORM_BUFFER, cfg) {
308 cfg.pointer = address;
309 cfg.entries = DIV_ROUND_UP(size, 16);
378 pan_section_pack(job, COMPUTE_JOB, PARAMETERS, cfg) {
379 cfg.job_task_split = 5;
382 pan_section_pack(job, COMPUTE_JOB, DRAW, cfg) {
383 cfg.state = pipeline->rsds[MESA_SHADER_VERTEX];
384 cfg.attributes = draw->stages[MESA_SHADER_VERTEX].attributes;
385 cfg.attribute_buffers = draw->stages[MESA_SHADER_VERTEX].attribute_bufs;
386 cfg.varyings = draw->stages[MESA_SHADER_VERTEX].varyings;
387 cfg.varying_buffers = draw->varying_bufs;
388 cfg.thread_storage = draw->tls;
389 cfg.offset_start = draw->offset_start;
390 cfg.instance_size = draw->instance_count > 1 ?
392 cfg.uniform_buffers = draw->ubos;
393 cfg.push_uniforms = draw->stages[PIPE_SHADER_VERTEX].push_constants;
394 cfg.textures = draw->textures;
395 cfg.samplers = draw->samplers;
413 pan_section_pack(job, COMPUTE_JOB, PARAMETERS, cfg) {
414 cfg.job_task_split =
420 pan_section_pack(job, COMPUTE_JOB, DRAW, cfg) {
421 cfg.state = pipeline->rsds[MESA_SHADER_COMPUTE];
422 cfg.attributes = dispatch->attributes;
423 cfg.attribute_buffers = dispatch->attribute_bufs;
424 cfg.thread_storage = dispatch->tsd;
425 cfg.uniform_buffers = dispatch->ubos;
426 cfg.push_uniforms = dispatch->push_uniforms;
427 cfg.textures = dispatch->textures;
428 cfg.samplers = dispatch->samplers;
437 pan_pack(prim, PRIMITIVE, cfg) {
438 cfg.draw_mode = pipeline->ia.topology;
440 cfg.point_size_array_format = MALI_POINT_SIZE_ARRAY_FORMAT_FP16;
442 cfg.first_provoking_vertex = true;
444 cfg.primitive_restart = MALI_PRIMITIVE_RESTART_IMPLICIT;
445 cfg.job_task_split = 6;
448 cfg.index_count = draw->index_count;
449 cfg.indices = draw->indices;
450 cfg.base_vertex_offset = draw->vertex_offset - draw->offset_start;
453 case 32: cfg.index_type = MALI_INDEX_TYPE_UINT32; break;
454 case 16: cfg.index_type = MALI_INDEX_TYPE_UINT16; break;
455 case 8: cfg.index_type = MALI_INDEX_TYPE_UINT8; break;
459 cfg.index_count = draw->vertex_count;
460 cfg.index_type = MALI_INDEX_TYPE_NONE;
470 pan_pack(primsz, PRIMITIVE_SIZE, cfg) {
472 cfg.size_array = draw->psiz;
474 cfg.constant = draw->line_width;
484 pan_pack(dcd, DRAW, cfg) {
485 cfg.front_face_ccw = pipeline->rast.front_ccw;
486 cfg.cull_front_face = pipeline->rast.cull_front_face;
487 cfg.cull_back_face = pipeline->rast.cull_back_face;
488 cfg.position = draw->position;
489 cfg.state = draw->fs_rsd;
490 cfg.attributes = draw->stages[MESA_SHADER_FRAGMENT].attributes;
491 cfg.attribute_buffers = draw->stages[MESA_SHADER_FRAGMENT].attribute_bufs;
492 cfg.viewport = draw->viewport;
493 cfg.varyings = draw->stages[MESA_SHADER_FRAGMENT].varyings;
494 cfg.varying_buffers = cfg.varyings ? draw->varying_bufs : 0;
495 cfg.thread_storage = draw->tls;
504 cfg.flat_shading_vertex = true;
507 cfg.offset_start = draw->offset_start;
508 cfg.instance_size = draw->instance_count > 1 ?
510 cfg.uniform_buffers = draw->ubos;
511 cfg.push_uniforms = draw->stages[PIPE_SHADER_FRAGMENT].push_constants;
512 cfg.textures = draw->textures;
513 cfg.samplers = draw->samplers;
538 pan_section_pack(job, TILER_JOB, TILER, cfg) {
539 cfg.address = draw->tiler_ctx->bifrost;
571 pan_pack(vpd, VIEWPORT, cfg) {
572 cfg.scissor_minimum_x = minx;
573 cfg.scissor_minimum_y = miny;
574 cfg.scissor_maximum_x = maxx;
575 cfg.scissor_maximum_y = maxy;
576 cfg.minimum_z = MIN2(viewport->minDepth, viewport->maxDepth);
577 cfg.maximum_z = MAX2(viewport->minDepth, viewport->maxDepth);
613 pan_pack(bd, BLEND, cfg) {
615 cfg.enable = false;
616 cfg.internal.mode = MALI_BLEND_MODE_OFF;
620 cfg.srgb = util_format_is_srgb(rts->format);
621 cfg.load_destination = pan_blend_reads_dest(blend->rts[rt].equation);
622 cfg.round_to_fb_precision = !dithered;
632 &cfg.equation);
640 cfg.constant = constant;
643 cfg.internal.mode = MALI_BLEND_MODE_OPAQUE;
645 cfg.internal.mode = MALI_BLEND_MODE_FIXED_FUNCTION;
647 cfg.internal.fixed_function.alpha_zero_nop =
649 cfg.internal.fixed_function.alpha_one_store =
656 cfg.internal.fixed_function.num_comps = 4;
657 cfg.internal.fixed_function.conversion.memory_format =
659 cfg.internal.fixed_function.conversion.register_format =
661 cfg.internal.fixed_function.rt = rt;
673 pan_pack(bd, BLEND, cfg) {
674 cfg.enable = false;
675 cfg.constant = constant * pipeline->blend.constant[rt].bifrost_factor;
684 pan_pack(rsd, RENDERER_STATE, cfg) {
686 cfg.depth_units = state->rast.depth_bias.constant_factor * 2.0f;
687 cfg.depth_factor = state->rast.depth_bias.slope_factor;
688 cfg.depth_bias_clamp = state->rast.depth_bias.clamp;
692 cfg.stencil_front.mask = state->zs.s_front.compare_mask;
693 cfg.stencil_back.mask = state->zs.s_back.compare_mask;
697 cfg.stencil_mask_misc.stencil_mask_front = state->zs.s_front.write_mask;
698 cfg.stencil_mask_misc.stencil_mask_back = state->zs.s_back.write_mask;
702 cfg.stencil_front.reference_value = state->zs.s_front.ref;
703 cfg.stencil_back.reference_value = state->zs.s_back.ref;
715 pan_pack(rsd, RENDERER_STATE, cfg) {
717 pan_shader_prepare_rsd(info, pipeline->fs.address, &cfg);
721 cfg.properties.allow_forward_pixel_to_kill =
735 cfg.properties.pixel_kill_operation = earlyzs.kill;
736 cfg.properties.zs_update_operation = earlyzs.update;
738 cfg.properties.depth_source = MALI_DEPTH_SOURCE_FIXED_FUNCTION;
739 cfg.properties.allow_forward_pixel_to_kill = true;
740 cfg.properties.allow_forward_pixel_to_be_killed = true;
741 cfg.properties.zs_update_operation = MALI_PIXEL_KILL_STRONG_EARLY;
745 cfg.multisample_misc.multisample_enable = msaa;
746 cfg.multisample_misc.sample_mask =
749 cfg.multisample_misc.depth_function =
752 cfg.multisample_misc.depth_write_mask = pipeline->zs.z_write;
753 cfg.multisample_misc.fixed_function_near_discard = !pipeline->rast.clamp_depth;
754 cfg.multisample_misc.fixed_function_far_discard = !pipeline->rast.clamp_depth;
755 cfg.multisample_misc.shader_depth_range_fixed = true;
757 cfg.stencil_mask_misc.stencil_enable = pipeline->zs.s_test;
758 cfg.stencil_mask_misc.alpha_to_coverage = pipeline->ms.alpha_to_coverage;
759 cfg.stencil_mask_misc.alpha_test_compare_function = MALI_FUNC_ALWAYS;
760 cfg.stencil_mask_misc.front_facing_depth_bias = pipeline->rast.depth_bias.enable;
761 cfg.stencil_mask_misc.back_facing_depth_bias = pipeline->rast.depth_bias.enable;
762 cfg.stencil_mask_misc.single_sampled_lines = pipeline->ms.rast_samples <= 1;
765 cfg.depth_units = pipeline->rast.depth_bias.constant_factor * 2.0f;
766 cfg.depth_factor = pipeline->rast.depth_bias.slope_factor;
767 cfg.depth_bias_clamp = pipeline->rast.depth_bias.clamp;
771 cfg.stencil_front.mask = pipeline->zs.s_front.compare_mask;
772 cfg.stencil_back.mask = pipeline->zs.s_back.compare_mask;
776 cfg.stencil_mask_misc.stencil_mask_front = pipeline->zs.s_front.write_mask;
777 cfg.stencil_mask_misc.stencil_mask_back = pipeline->zs.s_back.write_mask;
781 cfg.stencil_front.reference_value = pipeline->zs.s_front.ref;
782 cfg.stencil_back.reference_value = pipeline->zs.s_back.ref;
785 cfg.stencil_front.compare_function = pipeline->zs.s_front.compare_func;
786 cfg.stencil_front.stencil_fail = pipeline->zs.s_front.fail_op;
787 cfg.stencil_front.depth_fail = pipeline->zs.s_front.z_fail_op;
788 cfg.stencil_front.depth_pass = pipeline->zs.s_front.pass_op;
789 cfg.stencil_back.compare_function = pipeline->zs.s_back.compare_func;
790 cfg.stencil_back.stencil_fail = pipeline->zs.s_back.fail_op;
791 cfg.stencil_back.depth_fail = pipeline->zs.s_back.z_fail_op;
792 cfg.stencil_back.depth_pass = pipeline->zs.s_back.pass_op;
804 pan_pack(rsd, RENDERER_STATE, cfg) {
805 pan_shader_prepare_rsd(shader_info, shader_ptr, &cfg);
816 pan_pack(descs->cpu + pan_size(TILER_CONTEXT), TILER_HEAP, cfg) {
817 cfg.size = pdev->tiler_heap->size;
818 cfg.base = pdev->tiler_heap->ptr.gpu;
819 cfg.bottom = pdev->tiler_heap->ptr.gpu;
820 cfg.top = pdev->tiler_heap->ptr.gpu + pdev->tiler_heap->size;
823 pan_pack(descs->cpu, TILER_CONTEXT, cfg) {
824 cfg.hierarchy_mask = 0x28;
825 cfg.fb_width = width;
826 cfg.fb_height = height;
827 cfg.heap = descs->gpu + pan_size(TILER_CONTEXT);