Merge branch 'mesa_7_5_branch' into dlist-statechange-shortcircuit
[mesa.git] / src / gallium / auxiliary / draw / draw_vs.c
index 978954e91c979b99f78702bc3c6d8f10b54f21b1..c057cd67fde6e6d90cc36f9a1972552c50f6eb27 100644 (file)
   *   Brian Paul
   */
 
-#include "pipe/p_util.h"
+#include "util/u_math.h"
+#include "util/u_memory.h"
+
 #include "pipe/p_shader_tokens.h"
+
 #include "draw_private.h"
 #include "draw_context.h"
 #include "draw_vs.h"
+
 #include "translate/translate.h"
 #include "translate/translate_cache.h"
 
@@ -46,7 +50,7 @@ void draw_vs_set_constants( struct draw_context *draw,
                             const float (*constants)[4],
                             unsigned size )
 {
-   if (((unsigned)constants) & 0xf) {
+   if (((uintptr_t)constants) & 0xf) {
       if (size > draw->vs.const_storage_size) {
          if (draw->vs.aligned_constant_storage)
             align_free((void *)draw->vs.aligned_constant_storage);
@@ -81,7 +85,10 @@ draw_create_vertex_shader(struct draw_context *draw,
    if (!vs) {
       vs = draw_create_vs_sse( draw, shader );
       if (!vs) {
-         vs = draw_create_vs_exec( draw, shader );
+         vs = draw_create_vs_ppc( draw, shader );
+         if (!vs) {
+            vs = draw_create_vs_exec( draw, shader );
+         }
       }
    }
 
@@ -160,8 +167,10 @@ draw_vs_init( struct draw_context *draw )
       return FALSE;
 
    draw->vs.aos_machine = draw_vs_aos_machine();
+#ifdef PIPE_ARCH_X86
    if (!draw->vs.aos_machine)
       return FALSE;
+#endif
       
    return TRUE;
 }