diff options
author | Marek Olšák <[email protected]> | 2017-03-27 16:53:19 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2017-03-31 21:41:57 +0200 |
commit | 322eb13f09e0bce7cf6ee92b6b036a1490630ce5 (patch) | |
tree | 2c57f8ae7380eb60c52f57f95b097d47f8a9b03d /src/gallium/auxiliary/util | |
parent | 283c31afa168921e9b8531a9bdd20bc0adc6caf2 (diff) |
radeonsi: add tests verifying that VM faults don't hang
GFX9 hangs instead of writing VM faults to dmesg.
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r-- | src/gallium/auxiliary/util/u_tests.c | 9 | ||||
-rw-r--r-- | src/gallium/auxiliary/util/u_tests.h | 4 |
2 files changed, 9 insertions, 4 deletions
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 |