diff options
author | Christoph Bumiller <[email protected]> | 2013-04-05 14:29:36 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2014-07-02 00:47:09 +0200 |
commit | bc198f8e63f8fa297a458892c1c51ba8808c73a5 (patch) | |
tree | 5f842e6f56746e9d49eaffe3e727cc2b6b8c8268 /src/gallium/drivers/softpipe | |
parent | a27b3582a60ac2be2b1d6594b042d2bb6438d81a (diff) |
gallium: add facilities for indirect drawing
v2:
Added comments to util_draw_indirect, clarified and fixed map size.
Removed unlikely().
Diffstat (limited to 'src/gallium/drivers/softpipe')
-rw-r--r-- | src/gallium/drivers/softpipe/sp_draw_arrays.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/softpipe/sp_screen.c | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/softpipe/sp_draw_arrays.c b/src/gallium/drivers/softpipe/sp_draw_arrays.c index ebabac051df..b75c10f3f05 100644 --- a/src/gallium/drivers/softpipe/sp_draw_arrays.c +++ b/src/gallium/drivers/softpipe/sp_draw_arrays.c @@ -34,6 +34,7 @@ #include "pipe/p_defines.h" #include "pipe/p_context.h" #include "util/u_inlines.h" +#include "util/u_draw.h" #include "util/u_prim.h" #include "sp_context.h" @@ -67,6 +68,11 @@ softpipe_draw_vbo(struct pipe_context *pipe, if (!softpipe_check_render_cond(sp)) return; + if (info->indirect) { + util_draw_indirect(pipe, info); + return; + } + sp->reduced_api_prim = u_reduced_prim(info->mode); if (sp->dirty) { diff --git a/src/gallium/drivers/softpipe/sp_screen.c b/src/gallium/drivers/softpipe/sp_screen.c index ee3e0f2aef6..cfb10b17a87 100644 --- a/src/gallium/drivers/softpipe/sp_screen.c +++ b/src/gallium/drivers/softpipe/sp_screen.c @@ -200,6 +200,8 @@ softpipe_get_param(struct pipe_screen *screen, enum pipe_cap param) case PIPE_CAP_MIN_TEXTURE_GATHER_OFFSET: case PIPE_CAP_MAX_TEXTURE_GATHER_OFFSET: return 0; + case PIPE_CAP_DRAW_INDIRECT: + return 1; } /* should only get here on unhandled cases */ debug_printf("Unexpected PIPE_CAP %d query\n", param); |