From 322eb13f09e0bce7cf6ee92b6b036a1490630ce5 Mon Sep 17 00:00:00 2001 From: Marek Olšák Date: Mon, 27 Mar 2017 16:53:19 +0200 Subject: radeonsi: add tests verifying that VM faults don't hang MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GFX9 hangs instead of writing VM faults to dmesg. Reviewed-by: Nicolai Hähnle --- src/gallium/auxiliary/util/u_tests.c | 9 +++++---- src/gallium/auxiliary/util/u_tests.h | 4 ++++ 2 files changed, 9 insertions(+), 4 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_tests.c b/src/gallium/auxiliary/util/u_tests.c index 687e5118d7c..30eb589b06f 100644 --- a/src/gallium/auxiliary/util/u_tests.c +++ b/src/gallium/auxiliary/util/u_tests.c @@ -397,8 +397,9 @@ null_sampler_view(struct pipe_context *ctx, unsigned tgsi_tex_target) tgsi_texture_names[tgsi_tex_target]); } -static void -null_constant_buffer(struct pipe_context *ctx) +void +util_test_constant_buffer(struct pipe_context *ctx, + struct pipe_resource *constbuf) { struct cso_context *cso; struct pipe_resource *cb; @@ -411,7 +412,7 @@ null_constant_buffer(struct pipe_context *ctx) PIPE_FORMAT_R8G8B8A8_UNORM); util_set_common_states_and_clear(cso, ctx, cb); - ctx->set_constant_buffer(ctx, PIPE_SHADER_FRAGMENT, 0, NULL); + pipe_set_constant_buffer(ctx, PIPE_SHADER_FRAGMENT, 0, constbuf); /* Fragment shader. */ { @@ -502,7 +503,7 @@ util_run_tests(struct pipe_screen *screen) tgsi_vs_window_space_position(ctx); null_sampler_view(ctx, TGSI_TEXTURE_2D); null_sampler_view(ctx, TGSI_TEXTURE_BUFFER); - null_constant_buffer(ctx); + util_test_constant_buffer(ctx, NULL); ctx->destroy(ctx); diff --git a/src/gallium/auxiliary/util/u_tests.h b/src/gallium/auxiliary/util/u_tests.h index 106b0a0a938..5ac5d8371df 100644 --- a/src/gallium/auxiliary/util/u_tests.h +++ b/src/gallium/auxiliary/util/u_tests.h @@ -35,7 +35,11 @@ extern "C" { #endif struct pipe_screen; +struct pipe_context; +struct pipe_resource; +void util_test_constant_buffer(struct pipe_context *ctx, + struct pipe_resource *constbuf); void util_run_tests(struct pipe_screen *screen); #ifdef __cplusplus -- cgit v1.2.3