summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/radeonsi
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2017-10-05 04:02:05 +0200
committerMarek Olšák <[email protected]>2017-10-07 18:26:35 +0200
commit0a3b5a0232cef1598ff0417e588a2d32e81d4f6a (patch)
tree22cbff599fedf33b6a93de7d00038972220934d9 /src/gallium/drivers/radeonsi
parenta46bcf0a771575ce68e0a0585a84ca6029b96b4e (diff)
gallium/u_blitter: let drivers decide which VS to use for draw_rectangle
This approach allows drivers to set their own vertex shader and skip compilation of u_blitter vertex shaders. Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi')
-rw-r--r--src/gallium/drivers/radeonsi/si_state.h1
-rw-r--r--src/gallium/drivers/radeonsi/si_state_draw.c2
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.h b/src/gallium/drivers/radeonsi/si_state.h
index c9745a58cb7..9cc323dc9be 100644
--- a/src/gallium/drivers/radeonsi/si_state.h
+++ b/src/gallium/drivers/radeonsi/si_state.h
@@ -409,6 +409,7 @@ void si_emit_cache_flush(struct si_context *sctx);
void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *dinfo);
void si_draw_rectangle(struct blitter_context *blitter,
void *vertex_elements_cso,
+ blitter_get_vs_func get_vs,
int x1, int y1, int x2, int y2,
float depth, unsigned num_instances,
enum blitter_attrib_type type,
diff --git a/src/gallium/drivers/radeonsi/si_state_draw.c b/src/gallium/drivers/radeonsi/si_state_draw.c
index ceb90d287f5..9cb42741153 100644
--- a/src/gallium/drivers/radeonsi/si_state_draw.c
+++ b/src/gallium/drivers/radeonsi/si_state_draw.c
@@ -1492,6 +1492,7 @@ void si_draw_vbo(struct pipe_context *ctx, const struct pipe_draw_info *info)
void si_draw_rectangle(struct blitter_context *blitter,
void *vertex_elements_cso,
+ blitter_get_vs_func get_vs,
int x1, int y1, int x2, int y2,
float depth, unsigned num_instances,
enum blitter_attrib_type type,
@@ -1565,6 +1566,7 @@ void si_draw_rectangle(struct blitter_context *blitter,
vbuffer.buffer_offset = offset;
pipe->set_vertex_buffers(pipe, blitter->vb_slot, 1, &vbuffer);
+ pipe->bind_vs_state(pipe, get_vs(blitter));
if (sctx->vertex_elements != vertex_elements_cso)
pipe->bind_vertex_elements_state(pipe, vertex_elements_cso);