diff options
author | Marek Olšák <[email protected]> | 2012-01-25 03:28:23 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2012-01-25 12:35:20 +0100 |
commit | 8ec05f06cba381ce757e18bc7c41f0bd33205926 (patch) | |
tree | a80550a49e280e9377b83ded4401f884871edce7 /src | |
parent | 15146fd1bcbb08e44a1cbb984440ee1a5de63d48 (diff) |
r600g: handle start_component from stream_output_info when possible
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/drivers/r600/r600_shader.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/gallium/drivers/r600/r600_shader.c b/src/gallium/drivers/r600/r600_shader.c index 4fe657c9b61..08858e77b5b 100644 --- a/src/gallium/drivers/r600/r600_shader.c +++ b/src/gallium/drivers/r600/r600_shader.c @@ -1041,8 +1041,8 @@ static int r600_shader_from_tgsi(struct r600_pipe_context * rctx, struct r600_pi r = -EINVAL; goto out_err; } - if (so.output[i].start_component) { - R600_ERR("stream_output - start_component cannot be non-zero\n"); + if (so.output[i].dst_offset < so.output[i].start_component) { + R600_ERR("stream_output - dst_offset cannot be less than start_component\n"); r = -EINVAL; goto out_err; } @@ -1050,14 +1050,14 @@ static int r600_shader_from_tgsi(struct r600_pipe_context * rctx, struct r600_pi memset(&output, 0, sizeof(struct r600_bytecode_output)); output.gpr = shader->output[so.output[i].register_index].gpr; output.elem_size = 0; - output.array_base = so.output[i].dst_offset; + output.array_base = so.output[i].dst_offset - so.output[i].start_component; output.type = V_SQ_CF_ALLOC_EXPORT_WORD0_SQ_EXPORT_WRITE; output.burst_count = 1; output.barrier = 1; /* array_size is an upper limit for the burst_count * with MEM_STREAM instructions */ output.array_size = 0xFFF; - output.comp_mask = (1 << so.output[i].num_components) - 1; + output.comp_mask = ((1 << so.output[i].num_components) - 1) << so.output[i].start_component; if (ctx.bc->chip_class >= EVERGREEN) { switch (so.output[i].output_buffer) { case 0: |