summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.c20
-rw-r--r--src/gallium/auxiliary/cso_cache/cso_context.h5
2 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.c b/src/gallium/auxiliary/cso_cache/cso_context.c
index 33adee8d77a..8d217a4053e 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.c
+++ b/src/gallium/auxiliary/cso_cache/cso_context.c
@@ -1416,3 +1416,23 @@ cso_draw_arrays(struct cso_context *cso, uint mode, uint start, uint count)
cso_draw_vbo(cso, &info);
}
+
+void
+cso_draw_arrays_instanced(struct cso_context *cso, uint mode,
+ uint start, uint count,
+ uint start_instance, uint instance_count)
+{
+ struct pipe_draw_info info;
+
+ util_draw_init_info(&info);
+
+ info.mode = mode;
+ info.start = start;
+ info.count = count;
+ info.min_index = start;
+ info.max_index = start + count - 1;
+ info.start_instance = start_instance;
+ info.instance_count = instance_count;
+
+ cso_draw_vbo(cso, &info);
+}
diff --git a/src/gallium/auxiliary/cso_cache/cso_context.h b/src/gallium/auxiliary/cso_cache/cso_context.h
index 82c8e18def0..4b433b1c7a1 100644
--- a/src/gallium/auxiliary/cso_cache/cso_context.h
+++ b/src/gallium/auxiliary/cso_cache/cso_context.h
@@ -228,6 +228,11 @@ void
cso_draw_vbo(struct cso_context *cso,
const struct pipe_draw_info *info);
+void
+cso_draw_arrays_instanced(struct cso_context *cso, uint mode,
+ uint start, uint count,
+ uint start_instance, uint instance_count);
+
/* helper drawing function */
void
cso_draw_arrays(struct cso_context *cso, uint mode, uint start, uint count);