Lines Matching refs:gs

48    draw->gs.tgsi.machine = tgsi_exec_machine_create();  in draw_gs_init()
49 if (!draw->gs.tgsi.machine) in draw_gs_init()
52 draw->gs.tgsi.machine->Primitives = align_malloc( in draw_gs_init()
54 if (!draw->gs.tgsi.machine->Primitives) in draw_gs_init()
56 memset(draw->gs.tgsi.machine->Primitives, 0, in draw_gs_init()
64 if (!draw->gs.tgsi.machine) in draw_gs_destroy()
67 align_free(draw->gs.tgsi.machine->Primitives); in draw_gs_destroy()
69 tgsi_exec_machine_destroy(draw->gs.tgsi.machine); in draw_gs_destroy()
89 struct draw_geometry_shader *gs; in draw_create_geometry_shader() local
92 gs = CALLOC_STRUCT(draw_geometry_shader); in draw_create_geometry_shader()
94 if (!gs) in draw_create_geometry_shader()
97 gs->draw = draw; in draw_create_geometry_shader()
98 gs->state = *state; in draw_create_geometry_shader()
99 gs->state.tokens = tgsi_dup_tokens(state->tokens); in draw_create_geometry_shader()
100 if (!gs->state.tokens) { in draw_create_geometry_shader()
101 FREE(gs); in draw_create_geometry_shader()
105 tgsi_scan_shader(state->tokens, &gs->info); in draw_create_geometry_shader()
108 gs->input_primitive = PIPE_PRIM_TRIANGLES; in draw_create_geometry_shader()
109 gs->output_primitive = PIPE_PRIM_TRIANGLE_STRIP; in draw_create_geometry_shader()
110 gs->max_output_vertices = 32; in draw_create_geometry_shader()
112 for (i = 0; i < gs->info.num_properties; ++i) { in draw_create_geometry_shader()
113 if (gs->info.properties[i].name == in draw_create_geometry_shader()
115 gs->input_primitive = gs->info.properties[i].data[0]; in draw_create_geometry_shader()
116 else if (gs->info.properties[i].name == in draw_create_geometry_shader()
118 gs->output_primitive = gs->info.properties[i].data[0]; in draw_create_geometry_shader()
119 else if (gs->info.properties[i].name == in draw_create_geometry_shader()
121 gs->max_output_vertices = gs->info.properties[i].data[0]; in draw_create_geometry_shader()
124 gs->machine = draw->gs.tgsi.machine; in draw_create_geometry_shader()
126 if (gs) in draw_create_geometry_shader()
129 for (i = 0; i < gs->info.num_outputs; i++) { in draw_create_geometry_shader()
130 if (gs->info.output_semantic_name[i] == TGSI_SEMANTIC_POSITION && in draw_create_geometry_shader()
131 gs->info.output_semantic_index[i] == 0) in draw_create_geometry_shader()
132 gs->position_output = i; in draw_create_geometry_shader()
136 return gs; in draw_create_geometry_shader()
145 draw->gs.geometry_shader = dgs; in draw_bind_geometry_shader()
146 draw->gs.num_gs_outputs = dgs->info.num_outputs; in draw_bind_geometry_shader()
147 draw->gs.position_output = dgs->position_output; in draw_bind_geometry_shader()
151 draw->gs.geometry_shader = NULL; in draw_bind_geometry_shader()
152 draw->gs.num_gs_outputs = 0; in draw_bind_geometry_shader()
486 draw->gs.tgsi.num_samplers, in draw_geometry_shader_prepare()
487 draw->gs.tgsi.samplers); in draw_geometry_shader_prepare()