• Home
  • Raw
  • Download

Lines Matching refs:prog

77                          struct gl_program *prog,  in set_affected_state_flags()  argument
86 if (prog->Parameters->NumParameters) in set_affected_state_flags()
89 if (prog->info.num_textures) in set_affected_state_flags()
92 if (prog->info.num_images) in set_affected_state_flags()
95 if (prog->info.num_ubos) in set_affected_state_flags()
98 if (prog->info.num_ssbos) in set_affected_state_flags()
101 if (prog->info.num_abos) in set_affected_state_flags()
109 st_set_prog_affected_state_flags(struct gl_program *prog) in st_set_prog_affected_state_flags() argument
113 switch (prog->info.stage) { in st_set_prog_affected_state_flags()
115 states = &prog->affected_states; in st_set_prog_affected_state_flags()
121 set_affected_state_flags(states, prog, in st_set_prog_affected_state_flags()
132 states = &prog->affected_states; in st_set_prog_affected_state_flags()
136 set_affected_state_flags(states, prog, in st_set_prog_affected_state_flags()
147 states = &prog->affected_states; in st_set_prog_affected_state_flags()
152 set_affected_state_flags(states, prog, in st_set_prog_affected_state_flags()
163 states = &prog->affected_states; in st_set_prog_affected_state_flags()
168 set_affected_state_flags(states, prog, in st_set_prog_affected_state_flags()
179 states = &prog->affected_states; in st_set_prog_affected_state_flags()
186 set_affected_state_flags(states, prog, in st_set_prog_affected_state_flags()
197 states = &prog->affected_states; in st_set_prog_affected_state_flags()
201 set_affected_state_flags(states, prog, in st_set_prog_affected_state_flags()
375 struct gl_program *prog) in st_prog_to_nir_postprocess() argument
390 NIR_PASS_V(nir, st_nir_lower_wpos_ytransform, prog, screen); in st_prog_to_nir_postprocess()
400 char *msg = st_finalize_nir(st, prog, NULL, nir, true, true); in st_prog_to_nir_postprocess()
411 st_translate_prog_to_nir(struct st_context *st, struct gl_program *prog, in st_translate_prog_to_nir() argument
415 st_get_nir_compiler_options(st, prog->info.stage); in st_translate_prog_to_nir()
418 nir_shader *nir = prog_to_nir(st->ctx, prog, options); in st_translate_prog_to_nir()
420 st_prog_to_nir_postprocess(st, nir, prog); in st_translate_prog_to_nir()
432 st_prepare_vertex_program(struct gl_program *prog) in st_prepare_vertex_program() argument
434 struct gl_vertex_program *stvp = (struct gl_vertex_program *)prog; in st_prepare_vertex_program()
436 stvp->num_inputs = util_bitcount64(prog->info.inputs_read); in st_prepare_vertex_program()
437 stvp->vert_attrib_mask = prog->info.inputs_read; in st_prepare_vertex_program()
443 if (prog->info.outputs_written & BITFIELD64_BIT(attr)) in st_prepare_vertex_program()
451 st_translate_stream_output_info(struct gl_program *prog) in st_translate_stream_output_info() argument
453 struct gl_transform_feedback_info *info = prog->sh.LinkedTransformFeedback; in st_translate_stream_output_info()
467 if (prog->skip_pointsize_xfb && attr == VARYING_SLOT_PSIZ) in st_translate_stream_output_info()
469 if (prog->info.outputs_written & BITFIELD64_BIT(attr)) in st_translate_stream_output_info()
475 &prog->state.stream_output; in st_translate_stream_output_info()
555 cs.prog = state->ir.nir; in st_create_nir_shader()
557 cs.prog = state->tokens; in st_create_nir_shader()
578 struct gl_program *prog) in st_translate_vertex_program() argument
581 if (prog->arb.IsPositionInvariant) in st_translate_vertex_program()
582 _mesa_insert_mvp_code(st->ctx, prog); in st_translate_vertex_program()
587 prog->affected_states = ST_NEW_VS_STATE | in st_translate_vertex_program()
591 if (prog->Parameters->NumParameters) in st_translate_vertex_program()
592 prog->affected_states |= ST_NEW_VS_CONSTANTS; in st_translate_vertex_program()
594 if (prog->nir) in st_translate_vertex_program()
595 ralloc_free(prog->nir); in st_translate_vertex_program()
597 if (prog->serialized_nir) { in st_translate_vertex_program()
598 free(prog->serialized_nir); in st_translate_vertex_program()
599 prog->serialized_nir = NULL; in st_translate_vertex_program()
602 prog->state.type = PIPE_SHADER_IR_NIR; in st_translate_vertex_program()
603 prog->nir = st_translate_prog_to_nir(st, prog, in st_translate_vertex_program()
605 prog->info = prog->nir->info; in st_translate_vertex_program()
607 st_prepare_vertex_program(prog); in st_translate_vertex_program()
612 get_nir_shader(struct st_context *st, struct gl_program *prog) in get_nir_shader() argument
614 if (prog->nir) { in get_nir_shader()
615 nir_shader *nir = prog->nir; in get_nir_shader()
621 prog->nir = NULL; in get_nir_shader()
622 assert(prog->serialized_nir && prog->serialized_nir_size); in get_nir_shader()
628 st_get_nir_compiler_options(st, prog->info.stage); in get_nir_shader()
630 blob_reader_init(&blob_reader, prog->serialized_nir, prog->serialized_nir_size); in get_nir_shader()
677 struct gl_program *prog, in st_create_common_variant() argument
685 struct gl_program_parameter_list *params = prog->Parameters; in st_create_common_variant()
689 state.stream_output = prog->state.stream_output; in st_create_common_variant()
694 state.ir.nir = get_nir_shader(st, prog); in st_create_common_variant()
731 char *msg = st_finalize_nir(st, prog, prog->shader_program, state.ir.nir, in st_create_common_variant()
778 struct gl_program *prog, in st_get_common_variant() argument
784 for (v = st_common_variant(prog->variants); v; in st_get_common_variant()
792 if (prog->variants != NULL) { in st_get_common_variant()
795 _mesa_shader_stage_to_string(prog->info.stage), in st_get_common_variant()
805 v = st_create_common_variant(st, prog, key); in st_get_common_variant()
809 if (prog->info.stage == MESA_SHADER_VERTEX) { in st_get_common_variant()
810 struct gl_vertex_program *vp = (struct gl_vertex_program *)prog; in st_get_common_variant()
817 st_add_variant(&prog->variants, &v->base); in st_get_common_variant()
1224 st_can_add_pointsize_to_program(struct st_context *st, struct gl_program *prog) in st_can_add_pointsize_to_program() argument
1226 nir_shader *nir = prog->nir; in st_can_add_pointsize_to_program()
1257 struct gl_program *prog) in st_precompile_shader_variant() argument
1259 switch (prog->Target) { in st_precompile_shader_variant()
1271 (prog->info.outputs_written & (VARYING_SLOT_COL0 | in st_precompile_shader_variant()
1279 st_get_common_variant(st, prog, &key); in st_precompile_shader_variant()
1290 if (prog->ati_fs) { in st_precompile_shader_variant()
1294 st_get_fp_variant(st, prog, &key); in st_precompile_shader_variant()
1304 st_serialize_nir(struct gl_program *prog) in st_serialize_nir() argument
1306 if (!prog->serialized_nir) { in st_serialize_nir()
1311 nir_serialize(&blob, prog->nir, false); in st_serialize_nir()
1312 blob_finish_get_buffer(&blob, &prog->serialized_nir, &size); in st_serialize_nir()
1313 prog->serialized_nir_size = size; in st_serialize_nir()
1318 st_finalize_program(struct st_context *st, struct gl_program *prog) in st_finalize_program() argument
1320 if (st->current_program[prog->info.stage] == prog) { in st_finalize_program()
1321 if (prog->info.stage == MESA_SHADER_VERTEX) { in st_finalize_program()
1323 st->dirty |= ST_NEW_VERTEX_PROGRAM(st, prog); in st_finalize_program()
1325 st->dirty |= prog->affected_states; in st_finalize_program()
1329 if (prog->nir) { in st_finalize_program()
1330 nir_sweep(prog->nir); in st_finalize_program()
1336 st_serialize_nir(prog); in st_finalize_program()
1340 st_precompile_shader_variant(st, prog); in st_finalize_program()
1350 struct gl_program *prog ) in st_program_string_notify() argument
1355 assert(!prog->shader_program); in st_program_string_notify()
1357 st_release_variants(st, prog); in st_program_string_notify()
1362 assert(prog->ati_fs); in st_program_string_notify()
1363 assert(prog->ati_fs->Program == prog); in st_program_string_notify()
1365 st_init_atifs_prog(ctx, prog); in st_program_string_notify()
1368 if (!st_translate_fragment_program(st, prog)) in st_program_string_notify()
1371 if (!st_translate_vertex_program(st, prog)) in st_program_string_notify()
1373 if (st->lower_point_size && st_can_add_pointsize_to_program(st, prog)) { in st_program_string_notify()
1374 prog->skip_pointsize_xfb = true; in st_program_string_notify()
1375 NIR_PASS_V(prog->nir, st_nir_add_point_size); in st_program_string_notify()
1379 st_finalize_program(st, prog); in st_program_string_notify()