diff options
author | Marek Olšák <[email protected]> | 2017-10-05 04:02:05 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-10-07 18:26:35 +0200 |
commit | 0a3b5a0232cef1598ff0417e588a2d32e81d4f6a (patch) | |
tree | 22cbff599fedf33b6a93de7d00038972220934d9 /src/gallium/drivers/r600 | |
parent | a46bcf0a771575ce68e0a0585a84ca6029b96b4e (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/r600')
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe_common.c | 2 | ||||
-rw-r--r-- | src/gallium/drivers/r600/r600_pipe_common.h | 1 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/r600/r600_pipe_common.c b/src/gallium/drivers/r600/r600_pipe_common.c index 0e8a12a1b64..56297cf4db8 100644 --- a/src/gallium/drivers/r600/r600_pipe_common.c +++ b/src/gallium/drivers/r600/r600_pipe_common.c @@ -212,6 +212,7 @@ void r600_gfx_wait_fence(struct r600_common_context *ctx, void r600_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, @@ -225,6 +226,7 @@ void r600_draw_rectangle(struct blitter_context *blitter, float *vb; rctx->b.bind_vertex_elements_state(&rctx->b, vertex_elements_cso); + rctx->b.bind_vs_state(&rctx->b, get_vs(blitter)); /* Some operations (like color resolve on r6xx) don't work * with the conventional primitive types. diff --git a/src/gallium/drivers/r600/r600_pipe_common.h b/src/gallium/drivers/r600/r600_pipe_common.h index 37dcbd3d316..52f39cdb7ac 100644 --- a/src/gallium/drivers/r600/r600_pipe_common.h +++ b/src/gallium/drivers/r600/r600_pipe_common.h @@ -763,6 +763,7 @@ void r600_gfx_wait_fence(struct r600_common_context *ctx, uint64_t va, uint32_t ref, uint32_t mask); void r600_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, |