GPUDevice: Add API version field
Also tie shader caches to API version and device LUID. That way we don't have tons of cache files, and they're regenerated if the GPU/driver changes.
This commit is contained in:
@@ -111,6 +111,18 @@ void SmallStringBase::shrink_to_fit()
|
||||
m_buffer_size = buffer_size;
|
||||
}
|
||||
|
||||
void SmallStringBase::convert_to_lower_case()
|
||||
{
|
||||
for (u32 i = 0; i < m_length; i++)
|
||||
m_buffer[i] = static_cast<char>(std::tolower(m_buffer[i]));
|
||||
}
|
||||
|
||||
void SmallStringBase::convert_to_upper_case()
|
||||
{
|
||||
for (u32 i = 0; i < m_length; i++)
|
||||
m_buffer[i] = static_cast<char>(std::toupper(m_buffer[i]));
|
||||
}
|
||||
|
||||
std::string_view SmallStringBase::view() const
|
||||
{
|
||||
return (m_length == 0) ? std::string_view() : std::string_view(m_buffer, m_length);
|
||||
|
||||
@@ -188,6 +188,10 @@ public:
|
||||
ALWAYS_INLINE void push_back(value_type val) { append(val); }
|
||||
ALWAYS_INLINE void pop_back() { erase(-1); }
|
||||
|
||||
// case conversion
|
||||
void convert_to_lower_case();
|
||||
void convert_to_upper_case();
|
||||
|
||||
// returns a string view for this string
|
||||
std::string_view view() const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user