summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2019-02-11 14:33:32 -0500
committerMarek Olšák <[email protected]>2019-02-26 14:58:55 -0500
commit2ae07830e74549e3b5ff89ecb40feb595786aaa8 (patch)
treeec9c763da70ee2adc4ad721e236cb3d56a29d14d /src/gallium
parenta1378639ab19682a818ee627745db7f67485d406 (diff)
gallium/u_tests: use a compute-only context to test GCN compute ring
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/auxiliary/util/u_tests.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c
index 365d4fa8f17..7b87337bb98 100644
--- a/src/gallium/auxiliary/util/u_tests.c
+++ b/src/gallium/auxiliary/util/u_tests.c
@@ -790,11 +790,9 @@ test_texture_barrier(struct pipe_context *ctx, bool use_fbfetch,
static void
test_compute_clear_image(struct pipe_context *ctx)
{
- struct cso_context *cso;
struct pipe_resource *cb;
const char *text;
- cso = cso_create_context(ctx, 0);
cb = util_create_texture2d(ctx->screen, 256, 256,
PIPE_FORMAT_R8G8B8A8_UNORM, 1);
@@ -827,7 +825,7 @@ test_compute_clear_image(struct pipe_context *ctx)
state.prog = tokens;
void *compute_shader = ctx->create_compute_state(ctx, &state);
- cso_set_compute_shader_handle(cso, compute_shader);
+ ctx->bind_compute_state(ctx, compute_shader);
/* Bind the image. */
struct pipe_image_view image = {0};
@@ -854,7 +852,6 @@ test_compute_clear_image(struct pipe_context *ctx)
cb->width0, cb->height0, expected);
/* Cleanup. */
- cso_destroy_context(cso);
ctx->delete_compute_state(ctx, compute_shader);
pipe_resource_reference(&cb, NULL);
@@ -881,9 +878,10 @@ util_run_tests(struct pipe_screen *screen)
test_texture_barrier(ctx, false, i);
for (int i = 1; i <= 8; i = i * 2)
test_texture_barrier(ctx, true, i);
+ ctx->destroy(ctx);
+ ctx = screen->context_create(screen, NULL, PIPE_CONTEXT_COMPUTE_ONLY);
test_compute_clear_image(ctx);
-
ctx->destroy(ctx);
puts("Done. Exiting..");