Clang workaround for c++20 non-compliance

This commit is contained in:
kd-11 2021-07-14 22:36:29 +03:00 committed by kd-11
parent 974a3c8807
commit aaac4c1bde
3 changed files with 16 additions and 11 deletions

View file

@ -106,7 +106,7 @@ namespace rsx
// Defines how the underlying PS3-visible memory backed by a texture is accessed
namespace format_class_
{
// TODO: Remove when enum import is supported by GCC
// TODO: Remove when enum import is supported by clang
enum format_class : u8
{
RSX_FORMAT_CLASS_UNDEFINED = 0,

View file

@ -335,6 +335,8 @@ namespace vk
};
}
using namespace vk::vmm_allocation_pool_; // clang workaround.
class VKGSRender : public GSRender, public ::rsx::reports::ZCULL_control
{
private:
@ -365,8 +367,6 @@ private:
deadlock = 2
};
using enum vk::vmm_allocation_pool;
private:
VKFragmentProgram m_fragment_prog;
VKVertexProgram m_vertex_prog;

View file

@ -8,15 +8,20 @@
namespace vk
{
enum vmm_allocation_pool
namespace vmm_allocation_pool_ // Workaround for clang < 13 not supporting enum imports
{
VMM_ALLOCATION_POOL_UNDEFINED = 0,
VMM_ALLOCATION_POOL_SYSTEM,
VMM_ALLOCATION_POOL_SURFACE_CACHE,
VMM_ALLOCATION_POOL_TEXTURE_CACHE,
VMM_ALLOCATION_POOL_SWAPCHAIN,
VMM_ALLOCATION_POOL_SCRATCH,
};
enum vmm_allocation_pool
{
VMM_ALLOCATION_POOL_UNDEFINED = 0,
VMM_ALLOCATION_POOL_SYSTEM,
VMM_ALLOCATION_POOL_SURFACE_CACHE,
VMM_ALLOCATION_POOL_TEXTURE_CACHE,
VMM_ALLOCATION_POOL_SWAPCHAIN,
VMM_ALLOCATION_POOL_SCRATCH,
};
}
using namespace vk::vmm_allocation_pool_;
class mem_allocator_base
{