if (draw == NULL)
goto fail;
-#if defined(__i386__) || defined(__386__)
- draw->use_sse = GETENV( "GALLIUM_NOSSE" ) == NULL;
-#else
- draw->use_sse = FALSE;
-#endif
-
ASSIGN_4V( draw->plane[0], -1, 0, 0, 1 );
ASSIGN_4V( draw->plane[1], 1, 0, 0, 1 );
ASSIGN_4V( draw->plane[2], 0, -1, 0, 1 );
-boolean draw_use_sse(struct draw_context *draw)
-{
- return (boolean) draw->use_sse;
-}
-
-
void draw_set_render( struct draw_context *draw,
struct vbuf_render *render )
{
void draw_enable_point_sprites(struct draw_context *draw, boolean enable);
-boolean draw_use_sse(struct draw_context *draw);
-
void
draw_install_aaline_stage(struct draw_context *draw, struct pipe_context *pipe);
float plane[12][4];
unsigned nr_planes;
- boolean use_sse;
-
/* If a prim stage introduces new vertex attributes, they'll be stored here
*/
struct {
#include "draw_private.h"
#include "draw_context.h"
+#include "rtasm/rtasm_cpu.h"
#include "rtasm/rtasm_x86sse.h"
#include "tgsi/exec/tgsi_sse2.h"
#include "tgsi/util/tgsi_parse.h"
struct draw_sse_vertex_shader *vs;
uint nt = tgsi_num_tokens(templ->tokens);
- if (!draw->use_sse)
+ if (!rtasm_cpu_has_sse2())
return NULL;
vs = CALLOC_STRUCT( draw_sse_vertex_shader );
**************************************************************************/
+#include "pipe/p_debug.h"
#include "rtasm_cpu.h"
+static boolean rtasm_sse_enabled(void)
+{
+ return !debug_get_bool_option("GALLIUM_NOSSE", FALSE);
+}
+
int rtasm_cpu_has_sse(void)
{
/* FIXME: actually detect this at run-time */
#if defined(__i386__) || defined(__386__) || defined(i386)
- return 1;
+ return rtasm_sse_enabled();
#else
return 0;
#endif
{
/* FIXME: actually detect this at run-time */
#if defined(__i386__) || defined(__386__) || defined(i386)
- return 1;
+ return rtasm_sse_enabled();
#else
return 0;
#endif