diff options
author | Rob Clark <[email protected]> | 2017-12-18 15:06:37 -0500 |
---|---|---|
committer | Rob Clark <[email protected]> | 2017-12-19 15:00:18 -0500 |
commit | d7cb509fd3af578c7b1b8eac57910e38e258e348 (patch) | |
tree | 28dae17ebbb29c71b8efc15a847019b9c4530a0e /src/gallium/drivers/freedreno/ir3 | |
parent | 0536737983981b03fbe8bccd9f3a0f7ae81479b0 (diff) |
freedreno/ir3: add ctx->mem_to_mem()
For dealing with indirect-draw + gl_VertexID, we'll introduce another
case where we need to use CP_MEM_TO_MEM. Rather than adding more
if(a5xx)/else make this a ctx vfunc.
Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/drivers/freedreno/ir3')
-rw-r--r-- | src/gallium/drivers/freedreno/ir3/ir3_shader.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/gallium/drivers/freedreno/ir3/ir3_shader.c b/src/gallium/drivers/freedreno/ir3/ir3_shader.c index 3337543113d..3b1fcdfd5f9 100644 --- a/src/gallium/drivers/freedreno/ir3/ir3_shader.c +++ b/src/gallium/drivers/freedreno/ir3/ir3_shader.c @@ -879,20 +879,8 @@ ir3_emit_cs_consts(const struct ir3_shader_variant *v, struct fd_ringbuffer *rin 0x1000); indirect_offset = 0; - if (is_a5xx(ctx->screen)) { - struct fd_bo *src = fd_resource(info->indirect)->bo; - struct fd_bo *dst = fd_resource(indirect)->bo; - for (unsigned i = 0; i < 3; i++) { - unsigned dst_off = i * 4; - unsigned src_off = (i * 4) + info->indirect_offset; - OUT_PKT7(ring, CP_MEM_TO_MEM, 5); - OUT_RING(ring, 0x00000000); - OUT_RELOCW(ring, dst, dst_off, 0, 0); - OUT_RELOC (ring, src, src_off, 0, 0); - } - } else { - assert(0); - } + ctx->mem_to_mem(ring, indirect, 0, info->indirect, + info->indirect_offset, 3); } else { pipe_resource_reference(&indirect, info->indirect); indirect_offset = info->indirect_offset; |