• Home
  • Raw
  • Download

Lines Matching full:vc4

1087         /* This should always be lowered to ALU operations for VC4. */  in ntq_emit_alu()
1731 "vc4 doesn't support indirect inputs"); in ntq_emit_load_input()
1827 "vc4 doesn't support indirect outputs"); in ntq_emit_intrinsic()
1903 if (!c->vc4->screen->has_control_flow) { in ntq_emit_if()
2058 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()
2414 vc4_generate_code(vc4, c); in vc4_shader_ntq()
2436 struct vc4_context *vc4 = vc4_context(pctx); in vc4_shader_state_create() local
2441 so->program_id = vc4->next_uncompiled_program_id++; in vc4_shader_state_create()
2515 vc4_setup_compiled_fs_inputs(struct vc4_context *vc4, struct vc4_compile *c, in vc4_setup_compiled_fs_inputs() argument
2563 struct set_entry *entry = _mesa_set_search(vc4->fs_inputs_set, &inputs); in vc4_setup_compiled_fs_inputs()
2570 alloc_inputs = rzalloc(vc4->fs_inputs_set, struct vc4_fs_inputs); in vc4_setup_compiled_fs_inputs()
2573 _mesa_set_add(vc4->fs_inputs_set, alloc_inputs); in vc4_setup_compiled_fs_inputs()
2580 vc4_get_compiled_shader(struct vc4_context *vc4, enum qstage stage, in vc4_get_compiled_shader() argument
2588 ht = vc4->fs_cache; in vc4_get_compiled_shader()
2590 try_threading = vc4->screen->has_threaded_fs; in vc4_get_compiled_shader()
2592 ht = vc4->vs_cache; in vc4_get_compiled_shader()
2602 struct vc4_compile *c = vc4_shader_ntq(vc4, stage, key, try_threading); in vc4_get_compiled_shader()
2606 c = vc4_shader_ntq(vc4, stage, key, false); in vc4_get_compiled_shader()
2611 shader->program_id = vc4->next_compiled_program_id++; in vc4_get_compiled_shader()
2613 vc4_setup_compiled_fs_inputs(vc4, c, shader); in vc4_get_compiled_shader()
2637 shader->bo = vc4_bo_alloc_shader(vc4->screen, c->qpu_insts, in vc4_get_compiled_shader()
2662 vc4_setup_shared_key(struct vc4_context *vc4, struct vc4_key *key, in vc4_setup_shared_key() argument
2693 key->ucp_enables = vc4->rasterizer->base.clip_plane_enable; in vc4_setup_shared_key()
2697 vc4_update_compiled_fs(struct vc4_context *vc4, uint8_t prim_mode) in vc4_update_compiled_fs() argument
2699 struct vc4_job *job = vc4->job; in vc4_update_compiled_fs()
2703 if (!(vc4->dirty & (VC4_DIRTY_PRIM_MODE | in vc4_update_compiled_fs()
2716 vc4_setup_shared_key(vc4, &key->base, &vc4->fragtex); in vc4_update_compiled_fs()
2717 key->base.shader_state = vc4->prog.bind_fs; in vc4_update_compiled_fs()
2721 key->blend = vc4->blend->rt[0]; in vc4_update_compiled_fs()
2722 if (vc4->blend->logicop_enable) { in vc4_update_compiled_fs()
2723 key->logicop_func = vc4->blend->logicop_func; in vc4_update_compiled_fs()
2728 key->msaa = vc4->rasterizer->base.multisample; in vc4_update_compiled_fs()
2729 key->sample_coverage = (vc4->sample_mask != (1 << VC4_MAX_SAMPLES) - 1); in vc4_update_compiled_fs()
2730 key->sample_alpha_to_coverage = vc4->blend->alpha_to_coverage; in vc4_update_compiled_fs()
2731 key->sample_alpha_to_one = vc4->blend->alpha_to_one; in vc4_update_compiled_fs()
2734 if (vc4->framebuffer.cbufs[0]) in vc4_update_compiled_fs()
2735 key->color_format = vc4->framebuffer.cbufs[0]->format; in vc4_update_compiled_fs()
2737 key->stencil_enabled = vc4->zsa->stencil_uniforms[0] != 0; in vc4_update_compiled_fs()
2738 key->stencil_twoside = vc4->zsa->stencil_uniforms[1] != 0; in vc4_update_compiled_fs()
2739 key->stencil_full_writemasks = vc4->zsa->stencil_uniforms[2] != 0; in vc4_update_compiled_fs()
2740 key->depth_enabled = (vc4->zsa->base.depth.enabled || in vc4_update_compiled_fs()
2742 if (vc4->zsa->base.alpha.enabled) in vc4_update_compiled_fs()
2743 key->alpha_test_func = vc4->zsa->base.alpha.func; in vc4_update_compiled_fs()
2749 vc4->rasterizer->base.sprite_coord_enable; in vc4_update_compiled_fs()
2751 (vc4->rasterizer->base.sprite_coord_mode == in vc4_update_compiled_fs()
2755 key->ubo_1_size = vc4->constbuf[PIPE_SHADER_FRAGMENT].cb[1].buffer_size; in vc4_update_compiled_fs()
2756 key->light_twoside = vc4->rasterizer->base.light_twoside; in vc4_update_compiled_fs()
2758 struct vc4_compiled_shader *old_fs = vc4->prog.fs; in vc4_update_compiled_fs()
2759 vc4->prog.fs = vc4_get_compiled_shader(vc4, QSTAGE_FRAG, &key->base); in vc4_update_compiled_fs()
2760 if (vc4->prog.fs == old_fs) in vc4_update_compiled_fs()
2763 vc4->dirty |= VC4_DIRTY_COMPILED_FS; in vc4_update_compiled_fs()
2765 if (vc4->rasterizer->base.flatshade && in vc4_update_compiled_fs()
2766 (!old_fs || vc4->prog.fs->color_inputs != old_fs->color_inputs)) { in vc4_update_compiled_fs()
2767 vc4->dirty |= VC4_DIRTY_FLAT_SHADE_FLAGS; in vc4_update_compiled_fs()
2770 if (!old_fs || vc4->prog.fs->fs_inputs != old_fs->fs_inputs) in vc4_update_compiled_fs()
2771 vc4->dirty |= VC4_DIRTY_FS_INPUTS; in vc4_update_compiled_fs()
2775 vc4_update_compiled_vs(struct vc4_context *vc4, uint8_t prim_mode) in vc4_update_compiled_vs() argument
2780 if (!(vc4->dirty & (VC4_DIRTY_PRIM_MODE | in vc4_update_compiled_vs()
2790 vc4_setup_shared_key(vc4, &key->base, &vc4->verttex); in vc4_update_compiled_vs()
2791 key->base.shader_state = vc4->prog.bind_vs; in vc4_update_compiled_vs()
2792 key->fs_inputs = vc4->prog.fs->fs_inputs; in vc4_update_compiled_vs()
2793 key->clamp_color = vc4->rasterizer->base.clamp_vertex_color; in vc4_update_compiled_vs()
2796 key->attr_formats[i] = vc4->vtx->pipe[i].src_format; in vc4_update_compiled_vs()
2800 vc4->rasterizer->base.point_size_per_vertex); in vc4_update_compiled_vs()
2803 vc4_get_compiled_shader(vc4, QSTAGE_VERT, &key->base); in vc4_update_compiled_vs()
2804 if (vs != vc4->prog.vs) { in vc4_update_compiled_vs()
2805 vc4->prog.vs = vs; in vc4_update_compiled_vs()
2806 vc4->dirty |= VC4_DIRTY_COMPILED_VS; in vc4_update_compiled_vs()
2813 vc4_get_compiled_shader(vc4, QSTAGE_COORD, &key->base); in vc4_update_compiled_vs()
2814 if (cs != vc4->prog.cs) { in vc4_update_compiled_vs()
2815 vc4->prog.cs = cs; in vc4_update_compiled_vs()
2816 vc4->dirty |= VC4_DIRTY_COMPILED_CS; in vc4_update_compiled_vs()
2821 vc4_update_compiled_shaders(struct vc4_context *vc4, uint8_t prim_mode) in vc4_update_compiled_shaders() argument
2823 vc4_update_compiled_fs(vc4, prim_mode); in vc4_update_compiled_shaders()
2824 vc4_update_compiled_vs(vc4, prim_mode); in vc4_update_compiled_shaders()
2826 return !(vc4->prog.cs->failed || in vc4_update_compiled_shaders()
2827 vc4->prog.vs->failed || in vc4_update_compiled_shaders()
2828 vc4->prog.fs->failed); in vc4_update_compiled_shaders()
2901 struct vc4_context *vc4 = vc4_context(pctx); in vc4_shader_state_delete() local
2904 hash_table_foreach(vc4->fs_cache, entry) { in vc4_shader_state_delete()
2905 delete_from_cache_if_matches(vc4->fs_cache, &vc4->prog.fs, in vc4_shader_state_delete()
2908 hash_table_foreach(vc4->vs_cache, entry) { in vc4_shader_state_delete()
2909 delete_from_cache_if_matches(vc4->vs_cache, &vc4->prog.vs, in vc4_shader_state_delete()
2920 struct vc4_context *vc4 = vc4_context(pctx); in vc4_fp_state_bind() local
2921 vc4->prog.bind_fs = hwcso; in vc4_fp_state_bind()
2922 vc4->dirty |= VC4_DIRTY_UNCOMPILED_FS; in vc4_fp_state_bind()
2928 struct vc4_context *vc4 = vc4_context(pctx); in vc4_vp_state_bind() local
2929 vc4->prog.bind_vs = hwcso; in vc4_vp_state_bind()
2930 vc4->dirty |= VC4_DIRTY_UNCOMPILED_VS; in vc4_vp_state_bind()
2936 struct vc4_context *vc4 = vc4_context(pctx); in vc4_program_init() local
2947 vc4->fs_cache = _mesa_hash_table_create(pctx, fs_cache_hash, in vc4_program_init()
2949 vc4->vs_cache = _mesa_hash_table_create(pctx, vs_cache_hash, in vc4_program_init()
2951 vc4->fs_inputs_set = _mesa_set_create(pctx, fs_inputs_hash, in vc4_program_init()
2958 struct vc4_context *vc4 = vc4_context(pctx); in vc4_program_fini() local
2960 hash_table_foreach(vc4->fs_cache, entry) { in vc4_program_fini()
2964 _mesa_hash_table_remove(vc4->fs_cache, entry); in vc4_program_fini()
2967 hash_table_foreach(vc4->vs_cache, entry) { in vc4_program_fini()
2971 _mesa_hash_table_remove(vc4->vs_cache, entry); in vc4_program_fini()