ac/gpu_info: don't fail on amdgpu_query_video_caps_info failures
When VCN is unsupported, we don't want to break GL or Vulkan. Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13871>
This commit is contained in:
parent
a9b4aef0f2
commit
d830d213b6
|
@ -535,19 +535,10 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
|
||||||
info->vram_size_kb = DIV_ROUND_UP(info->vram_size, 1024);
|
info->vram_size_kb = DIV_ROUND_UP(info->vram_size, 1024);
|
||||||
|
|
||||||
if (info->drm_minor >= 41) {
|
if (info->drm_minor >= 41) {
|
||||||
r = amdgpu_query_video_caps_info(dev, AMDGPU_INFO_VIDEO_CAPS_DECODE,
|
amdgpu_query_video_caps_info(dev, AMDGPU_INFO_VIDEO_CAPS_DECODE,
|
||||||
sizeof(info->dec_caps), &(info->dec_caps));
|
sizeof(info->dec_caps), &(info->dec_caps));
|
||||||
if (r) {
|
amdgpu_query_video_caps_info(dev, AMDGPU_INFO_VIDEO_CAPS_ENCODE,
|
||||||
fprintf(stderr, "amdgpu: amdgpu_query_video_caps_info for decode failed.\n");
|
sizeof(info->enc_caps), &(info->enc_caps));
|
||||||
return r;
|
|
||||||
}
|
|
||||||
|
|
||||||
r = amdgpu_query_video_caps_info(dev, AMDGPU_INFO_VIDEO_CAPS_ENCODE,
|
|
||||||
sizeof(info->enc_caps), &(info->enc_caps));
|
|
||||||
if (r) {
|
|
||||||
fprintf(stderr, "amdgpu: amdgpu_query_video_caps_info for encode failed.\n");
|
|
||||||
return r;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Add some margin of error, though this shouldn't be needed in theory. */
|
/* Add some margin of error, though this shouldn't be needed in theory. */
|
||||||
|
|
Loading…
Reference in New Issue