diff options
Diffstat (limited to 'src/gallium/drivers/softpipe/sp_screen.c')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_screen.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index 982af6b3808..35521b64ab1 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -45,6 +45,7 @@ #include "sp_fence.h" #include "sp_public.h" +DEBUG_GET_ONCE_BOOL_OPTION(use_llvm, "SOFTPIPE_USE_LLVM", FALSE); static const char * softpipe_get_vendor(struct pipe_screen *screen) @@ -135,6 +136,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) static int softpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe_shader_cap param) { + struct softpipe_screen *sp_screen = softpipe_screen(screen); switch(shader) { case PIPE_SHADER_FRAGMENT: @@ -144,11 +146,17 @@ softpipe_get_shader_param(struct pipe_screen *screen, unsigned shader, enum pipe switch (param) { case PIPE_SHADER_CAP_MAX_TEXTURE_SAMPLERS: #ifdef HAVE_LLVM - /* Softpipe doesn't yet know how to tell draw/llvm about textures */ - return 0; -#else + if (sp_screen->use_llvm) + /* Softpipe doesn't yet know how to tell draw/llvm about textures */ + return 0; +#endif return PIPE_MAX_VERTEX_SAMPLERS; + case PIPE_SHADER_CAP_INTEGERS: +#ifdef HAVE_LLVM /* gallivm doesn't support integers yet */ + if (sp_screen->use_llvm) + return 0; #endif + /* fallthrough */ default: return draw_get_shader_param(shader, param); } @@ -326,6 +334,8 @@ softpipe_create_screen(struct sw_winsys *winsys) screen->base.context_create = softpipe_create_context; screen->base.flush_frontbuffer = softpipe_flush_frontbuffer; + screen->using_llvm = debug_get_option_use_llvm(); + util_format_s3tc_init(); softpipe_init_screen_texture_funcs(&screen->base); |