mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 18:10:17 +01:00
r600/sfn: allow building with clang 6 (Android 9)
static constexpr const 'value' is replaced by static function in all type_char template specializations to avoid the following building errors happening with clang 6 /home/utente/pie-x86_kernel/prebuilts/clang/host/linux-x86/clang-4691093/bin/ld.lld: error: undefined symbol: r600::type_char<r600::ExportInstr>::value >>> referenced by sfn_scheduler.cpp >>> sfn_sfn_scheduler.cpp.o:(bool r600::BlockSheduler::collect_ready_type<r600::ExportInstr>(std::__1::list<r600::ExportInstr*, std::__1::allocator<r600::ExportInstr*> >&, std::__1::list<r600::ExportInstr*, std::__1::allocator<r600::ExportInstr*> >&)) in archive src/gallium/drivers/r600/libr600.a ... /home/utente/pie-x86_kernel/prebuilts/clang/host/linux-x86/clang-4691093/bin/ld.lld: error: undefined symbol: r600::type_char<r600::RatInstr>::value >>> referenced by sfn_scheduler.cpp >>> sfn_sfn_scheduler.cpp.o:(bool r600::BlockSheduler::collect_ready_type<r600::RatInstr>(std::__1::list<r600::RatInstr*, std::__1::allocator<r600::RatInstr*> >&, std::__1::list<r600::RatInstr*, std::__1::allocator<r600::RatInstr*> >&)) in archive src/gallium/drivers/r600/libr600.a clang-6.0: error: linker command failed with exit code 1 (use -v to see invocation) Cc: "22.2" "22.3" mesa-stable Reviewed-by: Gert Wollny <gert.wollny@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19873>
This commit is contained in:
parent
ce11c06429
commit
e74d989a69
1 changed files with 11 additions and 11 deletions
|
|
@ -870,43 +870,43 @@ template <typename T> struct type_char {
|
|||
};
|
||||
|
||||
template <> struct type_char<AluInstr> {
|
||||
static constexpr const char value = 'A';
|
||||
static const char value() { return 'A';};
|
||||
};
|
||||
|
||||
template <> struct type_char<AluGroup> {
|
||||
static constexpr const char value = 'G';
|
||||
static const char value() { return 'G';};
|
||||
};
|
||||
|
||||
template <> struct type_char<ExportInstr> {
|
||||
static constexpr const char value = 'E';
|
||||
static const char value() { return 'E';};
|
||||
};
|
||||
|
||||
template <> struct type_char<TexInstr> {
|
||||
static constexpr const char value = 'T';
|
||||
static const char value() { return 'T';};
|
||||
};
|
||||
|
||||
template <> struct type_char<FetchInstr> {
|
||||
static constexpr const char value = 'F';
|
||||
static const char value() { return 'F';};
|
||||
};
|
||||
|
||||
template <> struct type_char<WriteOutInstr> {
|
||||
static constexpr const char value = 'M';
|
||||
static const char value() { return 'M';};
|
||||
};
|
||||
|
||||
template <> struct type_char<MemRingOutInstr> {
|
||||
static constexpr const char value = 'R';
|
||||
static const char value() { return 'R';};
|
||||
};
|
||||
|
||||
template <> struct type_char<WriteTFInstr> {
|
||||
static constexpr const char value = 'X';
|
||||
static const char value() { return 'X';};
|
||||
};
|
||||
|
||||
template <> struct type_char<GDSInstr> {
|
||||
static constexpr const char value = 'S';
|
||||
static const char value() { return 'S';};
|
||||
};
|
||||
|
||||
template <> struct type_char<RatInstr> {
|
||||
static constexpr const char value = 'I';
|
||||
static const char value() { return 'I';};
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
|
|
@ -928,7 +928,7 @@ BlockSheduler::collect_ready_type(std::list<T *>& ready, std::list<T *>& availab
|
|||
}
|
||||
|
||||
for (auto& i : ready)
|
||||
sfn_log << SfnLog::schedule << type_char<T>::value << "; " << *i << "\n";
|
||||
sfn_log << SfnLog::schedule << type_char<T>::value() << "; " << *i << "\n";
|
||||
|
||||
return !ready.empty();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue