• Home
  • Raw
  • Download

Lines Matching refs:vc4

1884         if (!c->vc4->screen->has_control_flow) {  in ntq_emit_if()
2038 if (!c->vc4->screen->has_control_flow) { in ntq_emit_loop()
2188 vc4_shader_ntq(struct vc4_context *vc4, enum qstage stage, in vc4_shader_ntq() argument
2193 c->vc4 = vc4; in vc4_shader_ntq()
2363 vc4_generate_code(vc4, c); in vc4_shader_ntq()
2385 struct vc4_context *vc4 = vc4_context(pctx); in vc4_shader_state_create() local
2390 so->program_id = vc4->next_uncompiled_program_id++; in vc4_shader_state_create()
2458 vc4_setup_compiled_fs_inputs(struct vc4_context *vc4, struct vc4_compile *c, in vc4_setup_compiled_fs_inputs() argument
2506 struct set_entry *entry = _mesa_set_search(vc4->fs_inputs_set, &inputs); in vc4_setup_compiled_fs_inputs()
2513 alloc_inputs = rzalloc(vc4->fs_inputs_set, struct vc4_fs_inputs); in vc4_setup_compiled_fs_inputs()
2516 _mesa_set_add(vc4->fs_inputs_set, alloc_inputs); in vc4_setup_compiled_fs_inputs()
2523 vc4_get_compiled_shader(struct vc4_context *vc4, enum qstage stage, in vc4_get_compiled_shader() argument
2531 ht = vc4->fs_cache; in vc4_get_compiled_shader()
2533 try_threading = vc4->screen->has_threaded_fs; in vc4_get_compiled_shader()
2535 ht = vc4->vs_cache; in vc4_get_compiled_shader()
2545 struct vc4_compile *c = vc4_shader_ntq(vc4, stage, key, try_threading); in vc4_get_compiled_shader()
2549 c = vc4_shader_ntq(vc4, stage, key, false); in vc4_get_compiled_shader()
2554 shader->program_id = vc4->next_compiled_program_id++; in vc4_get_compiled_shader()
2556 vc4_setup_compiled_fs_inputs(vc4, c, shader); in vc4_get_compiled_shader()
2580 shader->bo = vc4_bo_alloc_shader(vc4->screen, c->qpu_insts, in vc4_get_compiled_shader()
2631 vc4_setup_shared_key(struct vc4_context *vc4, struct vc4_key *key, in vc4_setup_shared_key() argument
2662 key->ucp_enables = vc4->rasterizer->base.clip_plane_enable; in vc4_setup_shared_key()
2666 vc4_update_compiled_fs(struct vc4_context *vc4, uint8_t prim_mode) in vc4_update_compiled_fs() argument
2668 struct vc4_job *job = vc4->job; in vc4_update_compiled_fs()
2672 if (!(vc4->dirty & (VC4_DIRTY_PRIM_MODE | in vc4_update_compiled_fs()
2684 vc4_setup_shared_key(vc4, &key->base, &vc4->fragtex); in vc4_update_compiled_fs()
2685 key->base.shader_state = vc4->prog.bind_fs; in vc4_update_compiled_fs()
2689 key->blend = vc4->blend->rt[0]; in vc4_update_compiled_fs()
2690 if (vc4->blend->logicop_enable) { in vc4_update_compiled_fs()
2691 key->logicop_func = vc4->blend->logicop_func; in vc4_update_compiled_fs()
2696 key->msaa = vc4->rasterizer->base.multisample; in vc4_update_compiled_fs()
2697 key->sample_coverage = (vc4->rasterizer->base.multisample && in vc4_update_compiled_fs()
2698 vc4->sample_mask != (1 << VC4_MAX_SAMPLES) - 1); in vc4_update_compiled_fs()
2699 key->sample_alpha_to_coverage = vc4->blend->alpha_to_coverage; in vc4_update_compiled_fs()
2700 key->sample_alpha_to_one = vc4->blend->alpha_to_one; in vc4_update_compiled_fs()
2703 if (vc4->framebuffer.cbufs[0]) in vc4_update_compiled_fs()
2704 key->color_format = vc4->framebuffer.cbufs[0]->format; in vc4_update_compiled_fs()
2706 key->stencil_enabled = vc4->zsa->stencil_uniforms[0] != 0; in vc4_update_compiled_fs()
2707 key->stencil_twoside = vc4->zsa->stencil_uniforms[1] != 0; in vc4_update_compiled_fs()
2708 key->stencil_full_writemasks = vc4->zsa->stencil_uniforms[2] != 0; in vc4_update_compiled_fs()
2709 key->depth_enabled = (vc4->zsa->base.depth.enabled || in vc4_update_compiled_fs()
2711 if (vc4->zsa->base.alpha.enabled) { in vc4_update_compiled_fs()
2713 key->alpha_test_func = vc4->zsa->base.alpha.func; in vc4_update_compiled_fs()
2718 vc4->rasterizer->base.sprite_coord_enable; in vc4_update_compiled_fs()
2720 (vc4->rasterizer->base.sprite_coord_mode == in vc4_update_compiled_fs()
2724 key->light_twoside = vc4->rasterizer->base.light_twoside; in vc4_update_compiled_fs()
2726 struct vc4_compiled_shader *old_fs = vc4->prog.fs; in vc4_update_compiled_fs()
2727 vc4->prog.fs = vc4_get_compiled_shader(vc4, QSTAGE_FRAG, &key->base); in vc4_update_compiled_fs()
2728 if (vc4->prog.fs == old_fs) in vc4_update_compiled_fs()
2731 vc4->dirty |= VC4_DIRTY_COMPILED_FS; in vc4_update_compiled_fs()
2733 if (vc4->rasterizer->base.flatshade && in vc4_update_compiled_fs()
2734 old_fs && vc4->prog.fs->color_inputs != old_fs->color_inputs) { in vc4_update_compiled_fs()
2735 vc4->dirty |= VC4_DIRTY_FLAT_SHADE_FLAGS; in vc4_update_compiled_fs()
2738 if (old_fs && vc4->prog.fs->fs_inputs != old_fs->fs_inputs) in vc4_update_compiled_fs()
2739 vc4->dirty |= VC4_DIRTY_FS_INPUTS; in vc4_update_compiled_fs()
2743 vc4_update_compiled_vs(struct vc4_context *vc4, uint8_t prim_mode) in vc4_update_compiled_vs() argument
2748 if (!(vc4->dirty & (VC4_DIRTY_PRIM_MODE | in vc4_update_compiled_vs()
2758 vc4_setup_shared_key(vc4, &key->base, &vc4->verttex); in vc4_update_compiled_vs()
2759 key->base.shader_state = vc4->prog.bind_vs; in vc4_update_compiled_vs()
2760 key->fs_inputs = vc4->prog.fs->fs_inputs; in vc4_update_compiled_vs()
2761 key->clamp_color = vc4->rasterizer->base.clamp_vertex_color; in vc4_update_compiled_vs()
2764 key->attr_formats[i] = vc4->vtx->pipe[i].src_format; in vc4_update_compiled_vs()
2768 vc4->rasterizer->base.point_size_per_vertex); in vc4_update_compiled_vs()
2771 vc4_get_compiled_shader(vc4, QSTAGE_VERT, &key->base); in vc4_update_compiled_vs()
2772 if (vs != vc4->prog.vs) { in vc4_update_compiled_vs()
2773 vc4->prog.vs = vs; in vc4_update_compiled_vs()
2774 vc4->dirty |= VC4_DIRTY_COMPILED_VS; in vc4_update_compiled_vs()
2781 vc4_get_compiled_shader(vc4, QSTAGE_COORD, &key->base); in vc4_update_compiled_vs()
2782 if (cs != vc4->prog.cs) { in vc4_update_compiled_vs()
2783 vc4->prog.cs = cs; in vc4_update_compiled_vs()
2784 vc4->dirty |= VC4_DIRTY_COMPILED_CS; in vc4_update_compiled_vs()
2789 vc4_update_compiled_shaders(struct vc4_context *vc4, uint8_t prim_mode) in vc4_update_compiled_shaders() argument
2791 vc4_update_compiled_fs(vc4, prim_mode); in vc4_update_compiled_shaders()
2792 vc4_update_compiled_vs(vc4, prim_mode); in vc4_update_compiled_shaders()
2794 return !(vc4->prog.cs->failed || in vc4_update_compiled_shaders()
2795 vc4->prog.vs->failed || in vc4_update_compiled_shaders()
2796 vc4->prog.fs->failed); in vc4_update_compiled_shaders()
2864 struct vc4_context *vc4 = vc4_context(pctx); in vc4_shader_state_delete() local
2868 hash_table_foreach(vc4->fs_cache, entry) in vc4_shader_state_delete()
2869 delete_from_cache_if_matches(vc4->fs_cache, entry, so); in vc4_shader_state_delete()
2870 hash_table_foreach(vc4->vs_cache, entry) in vc4_shader_state_delete()
2871 delete_from_cache_if_matches(vc4->vs_cache, entry, so); in vc4_shader_state_delete()
2880 struct vc4_context *vc4 = vc4_context(pctx); in vc4_fp_state_bind() local
2881 vc4->prog.bind_fs = hwcso; in vc4_fp_state_bind()
2882 vc4->dirty |= VC4_DIRTY_UNCOMPILED_FS; in vc4_fp_state_bind()
2888 struct vc4_context *vc4 = vc4_context(pctx); in vc4_vp_state_bind() local
2889 vc4->prog.bind_vs = hwcso; in vc4_vp_state_bind()
2890 vc4->dirty |= VC4_DIRTY_UNCOMPILED_VS; in vc4_vp_state_bind()
2896 struct vc4_context *vc4 = vc4_context(pctx); in vc4_program_init() local
2907 vc4->fs_cache = _mesa_hash_table_create(pctx, fs_cache_hash, in vc4_program_init()
2909 vc4->vs_cache = _mesa_hash_table_create(pctx, vs_cache_hash, in vc4_program_init()
2911 vc4->fs_inputs_set = _mesa_set_create(pctx, fs_inputs_hash, in vc4_program_init()
2918 struct vc4_context *vc4 = vc4_context(pctx); in vc4_program_fini() local
2921 hash_table_foreach(vc4->fs_cache, entry) { in vc4_program_fini()
2925 _mesa_hash_table_remove(vc4->fs_cache, entry); in vc4_program_fini()
2928 hash_table_foreach(vc4->vs_cache, entry) { in vc4_program_fini()
2932 _mesa_hash_table_remove(vc4->vs_cache, entry); in vc4_program_fini()