#include "tgsi/tgsi_dump.h"
#include "tgsi/tgsi_exec.h"
-
+DEBUG_GET_ONCE_BOOL_OPTION(gallium_dump_vs, "GALLIUM_DUMP_VS", FALSE)
void
draw_vs_set_constants(struct draw_context *draw,
}
draw->vs.aligned_constant_storage[slot] = align_malloc(size, 16);
}
+ assert(constants);
memcpy((void *)draw->vs.aligned_constant_storage[slot],
constants,
size);
draw_create_vertex_shader(struct draw_context *draw,
const struct pipe_shader_state *shader)
{
- struct draw_vertex_shader *vs;
+ struct draw_vertex_shader *vs = NULL;
if (draw->dump_vs) {
tgsi_dump(shader->tokens, 0);
}
- vs = draw_create_vs_llvm( draw, shader );
- if (!vs) {
+ if (!draw->pt.middle.llvm) {
+#if defined(PIPE_ARCH_X86)
vs = draw_create_vs_sse( draw, shader );
- if (!vs) {
- vs = draw_create_vs_ppc( draw, shader );
- if (!vs) {
- vs = draw_create_vs_exec( draw, shader );
- }
- }
+#elif defined(PIPE_ARCH_PPC)
+ vs = draw_create_vs_ppc( draw, shader );
+#endif
+ }
+
+ if (!vs) {
+ vs = draw_create_vs_exec( draw, shader );
}
if (vs)
boolean
draw_vs_init( struct draw_context *draw )
{
- draw->dump_vs = debug_get_bool_option("GALLIUM_DUMP_VS", FALSE);
+ draw->dump_vs = debug_get_option_gallium_dump_vs();
draw->vs.machine = tgsi_exec_machine_create();
if (!draw->vs.machine)