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:
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user