diff options
author | Marek Olšák <[email protected]> | 2018-10-17 12:41:38 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2018-10-18 16:08:56 -0400 |
commit | 165817d47f44359557625e30cfb38253739cf16f (patch) | |
tree | 5a87bdfb54c748925e4d82ef3f4314e0019d3481 /src/gallium/drivers | |
parent | 06bf56725db1827dfcb86b1d0bcd71d195fda1d2 (diff) |
radeonsi: fix a deadlock due to partially-initialized context on CI
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r-- | src/gallium/drivers/radeonsi/si_pipe.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 9d25748df40..46cf37567f9 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -572,12 +572,6 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, &sctx->null_const_buf); si_set_rw_buffer(sctx, SI_PS_CONST_SAMPLE_POSITIONS, &sctx->null_const_buf); - - /* Clear the NULL constant buffer, because loads should return zeros. */ - uint32_t clear_value = 0; - si_clear_buffer(sctx, sctx->null_const_buf.buffer, 0, - sctx->null_const_buf.buffer->width0, - &clear_value, 4, SI_COHERENCY_SHADER); } uint64_t max_threads_per_block; @@ -622,6 +616,14 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, /* this must be last */ si_begin_new_gfx_cs(sctx); + + if (sctx->chip_class == CIK) { + /* Clear the NULL constant buffer, because loads should return zeros. */ + uint32_t clear_value = 0; + si_clear_buffer(sctx, sctx->null_const_buf.buffer, 0, + sctx->null_const_buf.buffer->width0, + &clear_value, 4, SI_COHERENCY_SHADER); + } return &sctx->b; fail: fprintf(stderr, "radeonsi: Failed to create a context.\n"); |