radeonsi: always create wait_mem_scratch for compute-based culling

used by the primitive restart emulation

Acked-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4269>
This commit is contained in:
Marek Olšák 2020-03-20 18:20:52 -04:00 committed by Marge Bot
parent 42ce52b904
commit be9455bdf7
1 changed files with 2 additions and 1 deletions

View File

@ -622,7 +622,8 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen,
sctx->b.create_video_buffer = vl_video_buffer_create;
}
if (sctx->chip_class >= GFX9) {
if (sctx->chip_class >= GFX9 ||
si_compute_prim_discard_enabled(sctx)) {
sctx->wait_mem_scratch = si_resource(
pipe_buffer_create(screen, 0, PIPE_USAGE_DEFAULT, 8));
if (!sctx->wait_mem_scratch)