mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-23 22:00:13 +01:00
radv: fail to initialize when the AMD GPU generation is unsupported
Better to be conservative than allowing something that isn't supposed to be working. Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33031>
This commit is contained in:
parent
0b310ae4d8
commit
c942d957b0
1 changed files with 13 additions and 0 deletions
|
|
@ -22,12 +22,25 @@
|
||||||
#include "vk_drm_syncobj.h"
|
#include "vk_drm_syncobj.h"
|
||||||
#include "xf86drm.h"
|
#include "xf86drm.h"
|
||||||
|
|
||||||
|
static bool
|
||||||
|
radv_is_gpu_supported(const struct radeon_info *info)
|
||||||
|
{
|
||||||
|
/* Unknown GPU generations aren't supported. */
|
||||||
|
if (info->gfx_level > GFX12)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
static bool
|
static bool
|
||||||
do_winsys_init(struct radv_amdgpu_winsys *ws, int fd)
|
do_winsys_init(struct radv_amdgpu_winsys *ws, int fd)
|
||||||
{
|
{
|
||||||
if (!ac_query_gpu_info(fd, ws->dev, &ws->info, true))
|
if (!ac_query_gpu_info(fd, ws->dev, &ws->info, true))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (!radv_is_gpu_supported(&ws->info))
|
||||||
|
return false;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Override the max submits on video queues.
|
* Override the max submits on video queues.
|
||||||
* If you submit multiple session contexts in the same IB sequence the
|
* If you submit multiple session contexts in the same IB sequence the
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue