softpipe: Enable PIPE_CAP_TGSI_TEXCOORD.
[mesa.git] / src / gallium / drivers / softpipe / sp_screen.c
index d186aea773811dab2b80c9819725889cb4c55b24..9e974ae889379577d64005b192660bb85fd34472 100644 (file)
 #include "sp_fence.h"
 #include "sp_public.h"
 
-DEBUG_GET_ONCE_BOOL_OPTION(use_llvm, "SOFTPIPE_USE_LLVM", FALSE)
+static const struct debug_named_value sp_debug_options[] = {
+   {"vs",        SP_DBG_VS,         "dump vertex shader assembly to stderr"},
+   {"gs",        SP_DBG_GS,         "dump geometry shader assembly to stderr"},
+   {"fs",        SP_DBG_FS,         "dump fragment shader assembly to stderr"},
+   {"cs",        SP_DBG_CS,         "dump compute shader assembly to stderr"},
+   {"no_rast",   SP_DBG_NO_RAST,    "no-ops rasterization, for profiling purposes"},
+   {"use_llvm",  SP_DBG_USE_LLVM,   "Use LLVM if available for shaders"},
+};
+
+int sp_debug;
+DEBUG_GET_ONCE_FLAGS_OPTION(sp_debug, "SOFTPIPE_DEBUG", sp_debug_options, 0)
 
 static const char *
 softpipe_get_vendor(struct pipe_screen *screen)
@@ -243,6 +253,7 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_CULL_DISTANCE:
    case PIPE_CAP_COPY_BETWEEN_COMPRESSED_AND_PLAIN_FORMATS:
    case PIPE_CAP_TGSI_ARRAY_COMPONENTS:
+   case PIPE_CAP_TGSI_TEXCOORD:
       return 1;
    case PIPE_CAP_CLEAR_TEXTURE:
       return 1;
@@ -253,7 +264,6 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
    case PIPE_CAP_PCI_DEVICE:
    case PIPE_CAP_PCI_FUNCTION:
    case PIPE_CAP_GLSL_OPTIMIZE_CONSERVATIVELY:
-   case PIPE_CAP_ALLOW_MAPPED_BUFFERS_DURING_EXECUTION:
       return 0;
    case PIPE_CAP_MAX_GS_INVOCATIONS:
       return 32;
@@ -520,6 +530,8 @@ softpipe_create_screen(struct sw_winsys *winsys)
    if (!screen)
       return NULL;
 
+   sp_debug = debug_get_option_sp_debug();
+
    screen->winsys = winsys;
 
    screen->base.destroy = softpipe_destroy_screen;
@@ -535,7 +547,7 @@ softpipe_create_screen(struct sw_winsys *winsys)
    screen->base.context_create = softpipe_create_context;
    screen->base.flush_frontbuffer = softpipe_flush_frontbuffer;
    screen->base.get_compute_param = softpipe_get_compute_param;
-   screen->use_llvm = debug_get_option_use_llvm();
+   screen->use_llvm = sp_debug & SP_DBG_USE_LLVM;
 
    softpipe_init_screen_texture_funcs(&screen->base);
    softpipe_init_screen_fence_funcs(&screen->base);