Both explicit and implicit. Using vtx 0 (as existing llvm code implies) does not work for dynamic offsets.
Signed-off-by: Jan Vesely <jan.ves...@rutgers.edu> --- Hi, I ran into problem when using VTX_READ from constant buffer would work only for 0 index. The LLVM code implied that it should work (or maybe they considered constant offsets only), but I could not find one way or the other in ISA docs. Switching to vtx#3 fixed the problem, though I'm not sure if it's the right solution. thanks, Jan src/gallium/drivers/r600/evergreen_compute.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/r600/evergreen_compute.c b/src/gallium/drivers/r600/evergreen_compute.c index 7f9580c..b351cee 100644 --- a/src/gallium/drivers/r600/evergreen_compute.c +++ b/src/gallium/drivers/r600/evergreen_compute.c @@ -369,6 +369,8 @@ static void evergreen_compute_upload_input(struct pipe_context *ctx, ctx->transfer_unmap(ctx, transfer); /* ID=0 is reserved for the parameters */ + evergreen_cs_set_vertex_buffer(rctx, 3, 0, + (struct pipe_resource*)shader->kernel_param); evergreen_cs_set_constant_buffer(rctx, 0, 0, input_size, (struct pipe_resource*)shader->kernel_param); } @@ -614,9 +616,9 @@ static void evergreen_set_compute_resources(struct pipe_context *ctx, start, count); for (unsigned i = 0; i < count; i++) { - /* The First three vertex buffers are reserved for parameters and + /* The First four vertex buffers are reserved for parameters and * global buffers. */ - unsigned vtx_id = 3 + i; + unsigned vtx_id = 4 + i; if (resources[i]) { struct r600_resource_global *buffer = (struct r600_resource_global*) -- 2.7.4 _______________________________________________ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev