Lines Matching refs:gs
684 draw->gs.tgsi.sampler, in draw_geometry_shader_prepare()
685 draw->gs.tgsi.image, in draw_geometry_shader_prepare()
686 draw->gs.tgsi.buffer); in draw_geometry_shader_prepare()
695 draw->gs.tgsi.machine = tgsi_exec_machine_create(PIPE_SHADER_GEOMETRY); in draw_gs_init()
696 if (!draw->gs.tgsi.machine) in draw_gs_init()
699 draw->gs.tgsi.machine->Primitives = align_malloc( in draw_gs_init()
701 if (!draw->gs.tgsi.machine->Primitives) in draw_gs_init()
703 memset(draw->gs.tgsi.machine->Primitives, 0, in draw_gs_init()
712 if (draw->gs.tgsi.machine) { in draw_gs_destroy()
713 align_free(draw->gs.tgsi.machine->Primitives); in draw_gs_destroy()
714 tgsi_exec_machine_destroy(draw->gs.tgsi.machine); in draw_gs_destroy()
726 struct draw_geometry_shader *gs; in draw_create_geometry_shader() local
736 gs = &llvm_gs->base; in draw_create_geometry_shader()
742 gs = CALLOC_STRUCT(draw_geometry_shader); in draw_create_geometry_shader()
745 if (!gs) in draw_create_geometry_shader()
748 gs->draw = draw; in draw_create_geometry_shader()
749 gs->state = *state; in draw_create_geometry_shader()
750 gs->state.tokens = tgsi_dup_tokens(state->tokens); in draw_create_geometry_shader()
751 if (!gs->state.tokens) { in draw_create_geometry_shader()
752 FREE(gs); in draw_create_geometry_shader()
756 tgsi_scan_shader(state->tokens, &gs->info); in draw_create_geometry_shader()
759 gs->max_out_prims = 0; in draw_create_geometry_shader()
767 gs->vector_length = TGSI_NUM_CHANNELS; in draw_create_geometry_shader()
771 gs->vector_length = 1; in draw_create_geometry_shader()
774 gs->input_primitive = in draw_create_geometry_shader()
775 gs->info.properties[TGSI_PROPERTY_GS_INPUT_PRIM]; in draw_create_geometry_shader()
776 gs->output_primitive = in draw_create_geometry_shader()
777 gs->info.properties[TGSI_PROPERTY_GS_OUTPUT_PRIM]; in draw_create_geometry_shader()
778 gs->max_output_vertices = in draw_create_geometry_shader()
779 gs->info.properties[TGSI_PROPERTY_GS_MAX_OUTPUT_VERTICES]; in draw_create_geometry_shader()
780 gs->num_invocations = in draw_create_geometry_shader()
781 gs->info.properties[TGSI_PROPERTY_GS_INVOCATIONS]; in draw_create_geometry_shader()
782 if (!gs->max_output_vertices) in draw_create_geometry_shader()
783 gs->max_output_vertices = 32; in draw_create_geometry_shader()
794 gs->primitive_boundary = gs->max_output_vertices + 1; in draw_create_geometry_shader()
796 gs->position_output = -1; in draw_create_geometry_shader()
797 for (i = 0; i < gs->info.num_outputs; i++) { in draw_create_geometry_shader()
798 if (gs->info.output_semantic_name[i] == TGSI_SEMANTIC_POSITION && in draw_create_geometry_shader()
799 gs->info.output_semantic_index[i] == 0) in draw_create_geometry_shader()
800 gs->position_output = i; in draw_create_geometry_shader()
801 if (gs->info.output_semantic_name[i] == TGSI_SEMANTIC_VIEWPORT_INDEX) in draw_create_geometry_shader()
802 gs->viewport_index_output = i; in draw_create_geometry_shader()
803 if (gs->info.output_semantic_name[i] == TGSI_SEMANTIC_CLIPDIST) { in draw_create_geometry_shader()
804 debug_assert(gs->info.output_semantic_index[i] < in draw_create_geometry_shader()
806 gs->ccdistance_output[gs->info.output_semantic_index[i]] = i; in draw_create_geometry_shader()
810 gs->machine = draw->gs.tgsi.machine; in draw_create_geometry_shader()
814 int vector_size = gs->vector_length * sizeof(float); in draw_create_geometry_shader()
815 gs->gs_input = align_malloc(sizeof(struct draw_gs_inputs), 16); in draw_create_geometry_shader()
816 memset(gs->gs_input, 0, sizeof(struct draw_gs_inputs)); in draw_create_geometry_shader()
817 gs->llvm_prim_lengths = 0; in draw_create_geometry_shader()
819 gs->llvm_emitted_primitives = align_malloc(vector_size, vector_size); in draw_create_geometry_shader()
820 gs->llvm_emitted_vertices = align_malloc(vector_size, vector_size); in draw_create_geometry_shader()
821 gs->llvm_prim_ids = align_malloc(vector_size, vector_size); in draw_create_geometry_shader()
823 gs->fetch_outputs = llvm_fetch_gs_outputs; in draw_create_geometry_shader()
824 gs->fetch_inputs = llvm_fetch_gs_input; in draw_create_geometry_shader()
825 gs->prepare = llvm_gs_prepare; in draw_create_geometry_shader()
826 gs->run = llvm_gs_run; in draw_create_geometry_shader()
828 gs->jit_context = &draw->llvm->gs_jit_context; in draw_create_geometry_shader()
833 MAX2(gs->info.file_max[TGSI_FILE_SAMPLER]+1, in draw_create_geometry_shader()
834 gs->info.file_max[TGSI_FILE_SAMPLER_VIEW]+1)); in draw_create_geometry_shader()
838 gs->fetch_outputs = tgsi_fetch_gs_outputs; in draw_create_geometry_shader()
839 gs->fetch_inputs = tgsi_fetch_gs_input; in draw_create_geometry_shader()
840 gs->prepare = tgsi_gs_prepare; in draw_create_geometry_shader()
841 gs->run = tgsi_gs_run; in draw_create_geometry_shader()
844 return gs; in draw_create_geometry_shader()
853 draw->gs.geometry_shader = dgs; in draw_bind_geometry_shader()
854 draw->gs.num_gs_outputs = dgs->info.num_outputs; in draw_bind_geometry_shader()
855 draw->gs.position_output = dgs->position_output; in draw_bind_geometry_shader()
859 draw->gs.geometry_shader = NULL; in draw_bind_geometry_shader()
860 draw->gs.num_gs_outputs = 0; in draw_bind_geometry_shader()
918 draw_geometry_shader_new_instance(struct draw_geometry_shader *gs) in draw_geometry_shader_new_instance() argument
920 if (!gs) in draw_geometry_shader_new_instance()
923 gs->in_prim_idx = 0; in draw_geometry_shader_new_instance()