diff options
author | Marek Olšák <[email protected]> | 2017-02-15 19:50:15 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-02-18 01:22:08 +0100 |
commit | ac6007460adaf4bb21028a3281ec622d1e43df49 (patch) | |
tree | 01ee6b099afebfdbb3b784d2404517f067745d30 /src/gallium/drivers/radeonsi/si_state.c | |
parent | a550fbb510c998a0e484e9bf996e2d884ce3230e (diff) |
radeonsi: upload constants into VRAM instead of GTT
This lowers lgkm wait cycles by 30% on VI and normal conditions.
The might be a measurable improvement when CE is disabled (radeon)
or under L2 thrashing.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/drivers/radeonsi/si_state.c')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_state.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeonsi/si_state.c b/src/gallium/drivers/radeonsi/si_state.c index f53f8dd8ee9..81592a7e858 100644 --- a/src/gallium/drivers/radeonsi/si_state.c +++ b/src/gallium/drivers/radeonsi/si_state.c @@ -3526,8 +3526,11 @@ static void si_set_vertex_buffers(struct pipe_context *ctx, assert(src->stride == 0); /* Assume the attrib has 4 dwords like the vbo - * module. This is also a good upper bound. */ - u_upload_data(sctx->b.b.stream_uploader, 0, 16, 16, + * module. This is also a good upper bound. + * + * Use const_uploader to upload into VRAM directly. + */ + u_upload_data(sctx->b.b.const_uploader, 0, 16, 16, src->user_buffer, &dsti->buffer_offset, &dsti->buffer); |