void draw_geometry_shader_prepare(struct draw_geometry_shader *shader,
struct draw_context *draw)
{
-#ifdef HAVE_LLVM
boolean use_llvm = draw_get_option_use_llvm();
-#else
- boolean use_llvm = FALSE;
-#endif
if (!use_llvm && shader && shader->machine->Tokens != shader->state.tokens) {
tgsi_exec_machine_bind_shader(shader->machine,
shader->state.tokens,
boolean
draw_gs_init( struct draw_context *draw )
{
- draw->gs.tgsi.machine = tgsi_exec_machine_create();
- if (!draw->gs.tgsi.machine)
- return FALSE;
-
- draw->gs.tgsi.machine->Primitives = align_malloc(
- MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector), 16);
- if (!draw->gs.tgsi.machine->Primitives)
- return FALSE;
- memset(draw->gs.tgsi.machine->Primitives, 0,
- MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector));
+ if (!draw_get_option_use_llvm()) {
+ draw->gs.tgsi.machine = tgsi_exec_machine_create();
+ if (!draw->gs.tgsi.machine)
+ return FALSE;
+
+ draw->gs.tgsi.machine->Primitives = align_malloc(
+ MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector), 16);
+ if (!draw->gs.tgsi.machine->Primitives)
+ return FALSE;
+ memset(draw->gs.tgsi.machine->Primitives, 0,
+ MAX_PRIMITIVES * sizeof(struct tgsi_exec_vector));
+ }
return TRUE;
}
{
draw->dump_vs = debug_get_option_gallium_dump_vs();
- draw->vs.tgsi.machine = tgsi_exec_machine_create();
- if (!draw->vs.tgsi.machine)
- return FALSE;
+ if (!draw_get_option_use_llvm()) {
+ draw->vs.tgsi.machine = tgsi_exec_machine_create();
+ if (!draw->vs.tgsi.machine)
+ return FALSE;
+ }
draw->vs.emit_cache = translate_cache_create();
if (!draw->vs.emit_cache)
if (draw->vs.emit_cache)
translate_cache_destroy(draw->vs.emit_cache);
- tgsi_exec_machine_destroy(draw->vs.tgsi.machine);
+ if (!draw_get_option_use_llvm())
+ tgsi_exec_machine_destroy(draw->vs.tgsi.machine);
}
{
struct exec_vertex_shader *evs = exec_vertex_shader(shader);
+ debug_assert(!draw_get_option_use_llvm());
/* Specify the vertex program to interpret/execute.
* Avoid rebinding when possible.
*/
unsigned slot;
boolean clamp_vertex_color = shader->draw->rasterizer->clamp_vertex_color;
+ debug_assert(!draw_get_option_use_llvm());
tgsi_exec_set_constant_buffers(machine, PIPE_MAX_CONSTANT_BUFFERS,
constants, const_size);