aboutsummaryrefslogtreecommitdiffstats
path: root/src/amd/vulkan/winsys
diff options
context:
space:
mode:
authorSamuel Pitoiset <[email protected]>2020-01-31 14:35:54 +0100
committerSamuel Pitoiset <[email protected]>2020-02-11 07:56:55 +0100
commita8024aaaab9812d018cfa656d0dfce6ffedc123f (patch)
treefea24c424098780a7744b7c9300b8f4c49412522 /src/amd/vulkan/winsys
parent5b335e1599e90dae9a7a1b4a1d9a4498f0d0cedd (diff)
radv: make sure to not submit any IBs when RADV_FORCE_FAMILY is set
To prevent GPU hangs. Signed-off-by: Samuel Pitoiset <[email protected]> Reviewed-by: Bas Nieuwenhuizen <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3654>
Diffstat (limited to 'src/amd/vulkan/winsys')
-rw-r--r--src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c3
-rw-r--r--src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c1
-rw-r--r--src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h1
3 files changed, 5 insertions, 0 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
index dbc7397ed93..4e29716b920 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c
@@ -1235,6 +1235,9 @@ static int radv_amdgpu_winsys_cs_submit(struct radeon_winsys_ctx *_ctx,
struct radv_amdgpu_ctx *ctx = radv_amdgpu_ctx(_ctx);
int ret;
+ if (cs->ws->noop)
+ abort();
+
assert(sem_info);
if (!cs->ws->use_ib_bos) {
ret = radv_amdgpu_winsys_cs_submit_sysmem(_ctx, queue_idx, sem_info, bo_list, cs_array,
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
index a77508faf94..4310009ddb0 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.c
@@ -189,6 +189,7 @@ radv_amdgpu_winsys_create(int fd, uint64_t debug_flags, uint64_t perftest_flags)
ws->use_local_bos = perftest_flags & RADV_PERFTEST_LOCAL_BOS;
ws->zero_all_vram_allocs = debug_flags & RADV_DEBUG_ZERO_VRAM;
+ ws->noop = debug_flags & RADV_DEBUG_NOOP;
ws->batchchain = !(perftest_flags & RADV_PERFTEST_NO_BATCHCHAIN);
list_inithead(&ws->global_bo_list);
pthread_mutex_init(&ws->global_bo_list_lock, NULL);
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
index edec0a1ed78..ca16c48a791 100644
--- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
+++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_winsys.h
@@ -48,6 +48,7 @@ struct radv_amdgpu_winsys {
bool use_ib_bos;
bool zero_all_vram_allocs;
bool use_local_bos;
+ bool noop;
unsigned num_buffers;
pthread_mutex_t global_bo_list_lock;