aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/llvmpipe
diff options
context:
space:
mode:
authorChristoph Bumiller <[email protected]>2013-04-05 14:29:36 +0200
committerMarek Olšák <[email protected]>2014-07-02 00:47:09 +0200
commitbc198f8e63f8fa297a458892c1c51ba8808c73a5 (patch)
tree5f842e6f56746e9d49eaffe3e727cc2b6b8c8268 /src/gallium/drivers/llvmpipe
parenta27b3582a60ac2be2b1d6594b042d2bb6438d81a (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/llvmpipe')
-rw-r--r--src/gallium/drivers/llvmpipe/lp_draw_arrays.c6
-rw-r--r--src/gallium/drivers/llvmpipe/lp_screen.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
index 99e6d198837..edfb2040969 100644
--- a/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
+++ b/src/gallium/drivers/llvmpipe/lp_draw_arrays.c
@@ -33,6 +33,7 @@
#include "pipe/p_defines.h"
#include "pipe/p_context.h"
+#include "util/u_draw.h"
#include "util/u_prim.h"
#include "lp_context.h"
@@ -60,6 +61,11 @@ llvmpipe_draw_vbo(struct pipe_context *pipe, const struct pipe_draw_info *info)
if (!llvmpipe_check_render_cond(lp))
return;
+ if (info->indirect) {
+ util_draw_indirect(pipe, info);
+ return;
+ }
+
if (lp->dirty)
llvmpipe_update_derived( lp );
diff --git a/src/gallium/drivers/llvmpipe/lp_screen.c b/src/gallium/drivers/llvmpipe/lp_screen.c
index 26ab2946af3..356fad79964 100644
--- a/src/gallium/drivers/llvmpipe/lp_screen.c
+++ b/src/gallium/drivers/llvmpipe/lp_screen.c
@@ -217,6 +217,8 @@ llvmpipe_get_param(struct pipe_screen *screen, enum pipe_cap param)
case PIPE_CAP_VERTEX_ELEMENT_SRC_OFFSET_4BYTE_ALIGNED_ONLY:
case PIPE_CAP_TGSI_TEXCOORD:
return 0;
+ case PIPE_CAP_DRAW_INDIRECT:
+ return 1;
case PIPE_CAP_CONSTANT_BUFFER_OFFSET_ALIGNMENT:
return 16;