aco: add aco_is_gpu_supported

Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25631>
This commit is contained in:
Qiang Yu
2023-10-18 18:52:23 +08:00
committed by Marge Bot
parent 9c63138ae3
commit 23cb6768cb
2 changed files with 11 additions and 0 deletions
+8
View File
@@ -28,6 +28,7 @@
#include "util/memstream.h"
#include "ac_gpu_info.h"
#include <array>
#include <iostream>
#include <vector>
@@ -425,3 +426,10 @@ aco_compile_ps_prolog(const struct aco_compiler_options* options,
aco_compile_shader_part(options, info, args, aco::select_ps_prolog, (void*)pinfo, build_prolog,
binary, true);
}
bool
aco_is_gpu_supported(const struct radeon_info* info)
{
/* Does not support compute only cards yet. */
return info->gfx_level >= GFX6 && info->has_graphics;
}
+3
View File
@@ -37,6 +37,7 @@ struct ac_shader_config;
struct aco_shader_info;
struct aco_vs_prolog_info;
struct aco_ps_epilog_info;
struct radeon_info;
struct aco_compiler_statistic_info {
char name[32];
@@ -97,6 +98,8 @@ void aco_compile_ps_prolog(const struct aco_compiler_options* options,
uint64_t aco_get_codegen_flags();
bool aco_is_gpu_supported(const struct radeon_info* info);
#ifdef __cplusplus
}
#endif