• Home
  • Raw
  • Download

Lines Matching refs:vc4

1911         if (!c->vc4->screen->has_control_flow) {  in ntq_emit_if()
2066 if (!c->vc4->screen->has_control_flow) { in ntq_emit_loop()
2219 vc4_shader_ntq(struct vc4_context *vc4, enum qstage stage, in vc4_shader_ntq() argument
2224 c->vc4 = vc4; in vc4_shader_ntq()
2401 vc4_generate_code(vc4, c); in vc4_shader_ntq()
2423 struct vc4_context *vc4 = vc4_context(pctx); in vc4_shader_state_create() local
2428 so->program_id = vc4->next_uncompiled_program_id++; in vc4_shader_state_create()
2499 vc4_setup_compiled_fs_inputs(struct vc4_context *vc4, struct vc4_compile *c, in vc4_setup_compiled_fs_inputs() argument
2547 struct set_entry *entry = _mesa_set_search(vc4->fs_inputs_set, &inputs); in vc4_setup_compiled_fs_inputs()
2554 alloc_inputs = rzalloc(vc4->fs_inputs_set, struct vc4_fs_inputs); in vc4_setup_compiled_fs_inputs()
2557 _mesa_set_add(vc4->fs_inputs_set, alloc_inputs); in vc4_setup_compiled_fs_inputs()
2564 vc4_get_compiled_shader(struct vc4_context *vc4, enum qstage stage, in vc4_get_compiled_shader() argument
2572 ht = vc4->fs_cache; in vc4_get_compiled_shader()
2574 try_threading = vc4->screen->has_threaded_fs; in vc4_get_compiled_shader()
2576 ht = vc4->vs_cache; in vc4_get_compiled_shader()
2586 struct vc4_compile *c = vc4_shader_ntq(vc4, stage, key, try_threading); in vc4_get_compiled_shader()
2590 c = vc4_shader_ntq(vc4, stage, key, false); in vc4_get_compiled_shader()
2595 shader->program_id = vc4->next_compiled_program_id++; in vc4_get_compiled_shader()
2597 vc4_setup_compiled_fs_inputs(vc4, c, shader); in vc4_get_compiled_shader()
2621 shader->bo = vc4_bo_alloc_shader(vc4->screen, c->qpu_insts, in vc4_get_compiled_shader()
2679 vc4_setup_shared_key(struct vc4_context *vc4, struct vc4_key *key, in vc4_setup_shared_key() argument
2710 key->ucp_enables = vc4->rasterizer->base.clip_plane_enable; in vc4_setup_shared_key()
2714 vc4_update_compiled_fs(struct vc4_context *vc4, uint8_t prim_mode) in vc4_update_compiled_fs() argument
2716 struct vc4_job *job = vc4->job; in vc4_update_compiled_fs()
2720 if (!(vc4->dirty & (VC4_DIRTY_PRIM_MODE | in vc4_update_compiled_fs()
2732 vc4_setup_shared_key(vc4, &key->base, &vc4->fragtex); in vc4_update_compiled_fs()
2733 key->base.shader_state = vc4->prog.bind_fs; in vc4_update_compiled_fs()
2737 key->blend = vc4->blend->rt[0]; in vc4_update_compiled_fs()
2738 if (vc4->blend->logicop_enable) { in vc4_update_compiled_fs()
2739 key->logicop_func = vc4->blend->logicop_func; in vc4_update_compiled_fs()
2744 key->msaa = vc4->rasterizer->base.multisample; in vc4_update_compiled_fs()
2745 key->sample_coverage = (vc4->sample_mask != (1 << VC4_MAX_SAMPLES) - 1); in vc4_update_compiled_fs()
2746 key->sample_alpha_to_coverage = vc4->blend->alpha_to_coverage; in vc4_update_compiled_fs()
2747 key->sample_alpha_to_one = vc4->blend->alpha_to_one; in vc4_update_compiled_fs()
2750 if (vc4->framebuffer.cbufs[0]) in vc4_update_compiled_fs()
2751 key->color_format = vc4->framebuffer.cbufs[0]->format; in vc4_update_compiled_fs()
2753 key->stencil_enabled = vc4->zsa->stencil_uniforms[0] != 0; in vc4_update_compiled_fs()
2754 key->stencil_twoside = vc4->zsa->stencil_uniforms[1] != 0; in vc4_update_compiled_fs()
2755 key->stencil_full_writemasks = vc4->zsa->stencil_uniforms[2] != 0; in vc4_update_compiled_fs()
2756 key->depth_enabled = (vc4->zsa->base.depth.enabled || in vc4_update_compiled_fs()
2758 if (vc4->zsa->base.alpha.enabled) in vc4_update_compiled_fs()
2759 key->alpha_test_func = vc4->zsa->base.alpha.func; in vc4_update_compiled_fs()
2765 vc4->rasterizer->base.sprite_coord_enable; in vc4_update_compiled_fs()
2767 (vc4->rasterizer->base.sprite_coord_mode == in vc4_update_compiled_fs()
2771 key->light_twoside = vc4->rasterizer->base.light_twoside; in vc4_update_compiled_fs()
2773 struct vc4_compiled_shader *old_fs = vc4->prog.fs; in vc4_update_compiled_fs()
2774 vc4->prog.fs = vc4_get_compiled_shader(vc4, QSTAGE_FRAG, &key->base); in vc4_update_compiled_fs()
2775 if (vc4->prog.fs == old_fs) in vc4_update_compiled_fs()
2778 vc4->dirty |= VC4_DIRTY_COMPILED_FS; in vc4_update_compiled_fs()
2780 if (vc4->rasterizer->base.flatshade && in vc4_update_compiled_fs()
2781 (!old_fs || vc4->prog.fs->color_inputs != old_fs->color_inputs)) { in vc4_update_compiled_fs()
2782 vc4->dirty |= VC4_DIRTY_FLAT_SHADE_FLAGS; in vc4_update_compiled_fs()
2785 if (!old_fs || vc4->prog.fs->fs_inputs != old_fs->fs_inputs) in vc4_update_compiled_fs()
2786 vc4->dirty |= VC4_DIRTY_FS_INPUTS; in vc4_update_compiled_fs()
2790 vc4_update_compiled_vs(struct vc4_context *vc4, uint8_t prim_mode) in vc4_update_compiled_vs() argument
2795 if (!(vc4->dirty & (VC4_DIRTY_PRIM_MODE | in vc4_update_compiled_vs()
2805 vc4_setup_shared_key(vc4, &key->base, &vc4->verttex); in vc4_update_compiled_vs()
2806 key->base.shader_state = vc4->prog.bind_vs; in vc4_update_compiled_vs()
2807 key->fs_inputs = vc4->prog.fs->fs_inputs; in vc4_update_compiled_vs()
2808 key->clamp_color = vc4->rasterizer->base.clamp_vertex_color; in vc4_update_compiled_vs()
2811 key->attr_formats[i] = vc4->vtx->pipe[i].src_format; in vc4_update_compiled_vs()
2815 vc4->rasterizer->base.point_size_per_vertex); in vc4_update_compiled_vs()
2818 vc4_get_compiled_shader(vc4, QSTAGE_VERT, &key->base); in vc4_update_compiled_vs()
2819 if (vs != vc4->prog.vs) { in vc4_update_compiled_vs()
2820 vc4->prog.vs = vs; in vc4_update_compiled_vs()
2821 vc4->dirty |= VC4_DIRTY_COMPILED_VS; in vc4_update_compiled_vs()
2828 vc4_get_compiled_shader(vc4, QSTAGE_COORD, &key->base); in vc4_update_compiled_vs()
2829 if (cs != vc4->prog.cs) { in vc4_update_compiled_vs()
2830 vc4->prog.cs = cs; in vc4_update_compiled_vs()
2831 vc4->dirty |= VC4_DIRTY_COMPILED_CS; in vc4_update_compiled_vs()
2836 vc4_update_compiled_shaders(struct vc4_context *vc4, uint8_t prim_mode) in vc4_update_compiled_shaders() argument
2838 vc4_update_compiled_fs(vc4, prim_mode); in vc4_update_compiled_shaders()
2839 vc4_update_compiled_vs(vc4, prim_mode); in vc4_update_compiled_shaders()
2841 return !(vc4->prog.cs->failed || in vc4_update_compiled_shaders()
2842 vc4->prog.vs->failed || in vc4_update_compiled_shaders()
2843 vc4->prog.fs->failed); in vc4_update_compiled_shaders()
2916 struct vc4_context *vc4 = vc4_context(pctx); in vc4_shader_state_delete() local
2920 hash_table_foreach(vc4->fs_cache, entry) { in vc4_shader_state_delete()
2921 delete_from_cache_if_matches(vc4->fs_cache, &vc4->prog.fs, in vc4_shader_state_delete()
2924 hash_table_foreach(vc4->vs_cache, entry) { in vc4_shader_state_delete()
2925 delete_from_cache_if_matches(vc4->vs_cache, &vc4->prog.vs, in vc4_shader_state_delete()
2936 struct vc4_context *vc4 = vc4_context(pctx); in vc4_fp_state_bind() local
2937 vc4->prog.bind_fs = hwcso; in vc4_fp_state_bind()
2938 vc4->dirty |= VC4_DIRTY_UNCOMPILED_FS; in vc4_fp_state_bind()
2944 struct vc4_context *vc4 = vc4_context(pctx); in vc4_vp_state_bind() local
2945 vc4->prog.bind_vs = hwcso; in vc4_vp_state_bind()
2946 vc4->dirty |= VC4_DIRTY_UNCOMPILED_VS; in vc4_vp_state_bind()
2952 struct vc4_context *vc4 = vc4_context(pctx); in vc4_program_init() local
2963 vc4->fs_cache = _mesa_hash_table_create(pctx, fs_cache_hash, in vc4_program_init()
2965 vc4->vs_cache = _mesa_hash_table_create(pctx, vs_cache_hash, in vc4_program_init()
2967 vc4->fs_inputs_set = _mesa_set_create(pctx, fs_inputs_hash, in vc4_program_init()
2974 struct vc4_context *vc4 = vc4_context(pctx); in vc4_program_fini() local
2977 hash_table_foreach(vc4->fs_cache, entry) { in vc4_program_fini()
2981 _mesa_hash_table_remove(vc4->fs_cache, entry); in vc4_program_fini()
2984 hash_table_foreach(vc4->vs_cache, entry) { in vc4_program_fini()
2988 _mesa_hash_table_remove(vc4->vs_cache, entry); in vc4_program_fini()