aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/tests
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2016-01-12 18:00:00 +0100
committerSamuel Pitoiset <[email protected]>2016-02-13 15:51:17 +0100
commitbfd695e1d2975e5dd5363c2e7fcc3084a28457aa (patch)
tree2947d36a5610ca0686b4e3d1100aa00e145a2045 /src/gallium/tests
parent61ed09c7ea41e559219c772f18ea00942d54d30a (diff)
gallium: add a new interface for pipe_context::launch_grid()
This introduces pipe_grid_info which contains all information to describe a launch_grid call. This will be used to implement indirect compute in the same fashion as indirect draw. Changes from v2: - correctly initialize pipe_grid_info for nv50/nvc0 Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Marek Olšák <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/tests')
-rw-r--r--src/gallium/tests/trivial/compute.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/gallium/tests/trivial/compute.c b/src/gallium/tests/trivial/compute.c
index 5ce12abe227..288cf2ad629 100644
--- a/src/gallium/tests/trivial/compute.c
+++ b/src/gallium/tests/trivial/compute.c
@@ -424,8 +424,17 @@ static void launch_grid(struct context *ctx, const uint *block_layout,
const void *input)
{
struct pipe_context *pipe = ctx->pipe;
+ struct pipe_grid_info info;
+ int i;
+
+ for (i = 0; i < 3; i++) {
+ info.block[i] = block_layout[i];
+ info.grid[i] = grid_layout[i];
+ }
+ info.pc = pc;
+ info.input = input;
- pipe->launch_grid(pipe, block_layout, grid_layout, pc, input);
+ pipe->launch_grid(pipe, &info);
}
static void test_default_init(void *p, int s, int x, int y)