common: `Common` namespace for the slot vector container
This commit is contained in:
parent
7b89b7f5fd
commit
d9036a702d
|
@ -12,7 +12,7 @@
|
|||
#include "common/assert.h"
|
||||
#include "common/types.h"
|
||||
|
||||
namespace VideoCore {
|
||||
namespace Common {
|
||||
|
||||
struct SlotId {
|
||||
static constexpr u32 INVALID_INDEX = std::numeric_limits<u32>::max();
|
||||
|
@ -162,11 +162,11 @@ private:
|
|||
std::vector<u32> free_list;
|
||||
};
|
||||
|
||||
} // namespace VideoCore
|
||||
} // namespace Common
|
||||
|
||||
template <>
|
||||
struct std::hash<VideoCore::SlotId> {
|
||||
std::size_t operator()(const VideoCore::SlotId& id) const noexcept {
|
||||
struct std::hash<Common::SlotId> {
|
||||
std::size_t operator()(const Common::SlotId& id) const noexcept {
|
||||
return std::hash<u32>{}(id.index);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -39,7 +39,7 @@ struct AscQueueInfo {
|
|||
u32* read_addr;
|
||||
u32 ring_size_dw;
|
||||
};
|
||||
static VideoCore::SlotVector<AscQueueInfo> asc_queues{};
|
||||
static Common::SlotVector<AscQueueInfo> asc_queues{};
|
||||
static constexpr VAddr tessellation_factors_ring_addr = 0xFF0000000ULL;
|
||||
|
||||
static void DumpCommandList(std::span<const u32> cmd_list, const std::string& postfix) {
|
||||
|
|
|
@ -100,7 +100,7 @@ private:
|
|||
vk::Image image{};
|
||||
};
|
||||
|
||||
constexpr SlotId NULL_IMAGE_ID{0};
|
||||
constexpr Common::SlotId NULL_IMAGE_ID{0};
|
||||
|
||||
struct Image {
|
||||
explicit Image(const Vulkan::Instance& instance, Vulkan::Scheduler& scheduler,
|
||||
|
|
|
@ -140,8 +140,8 @@ private:
|
|||
Vulkan::Scheduler& scheduler;
|
||||
Vulkan::StreamBuffer staging;
|
||||
TileManager tile_manager;
|
||||
SlotVector<Image> slot_images;
|
||||
SlotVector<ImageView> slot_image_views;
|
||||
Common::SlotVector<Image> slot_images;
|
||||
Common::SlotVector<ImageView> slot_image_views;
|
||||
tsl::robin_map<u64, Sampler> samplers;
|
||||
tsl::robin_pg_map<u64, std::vector<ImageId>> page_table;
|
||||
boost::icl::interval_map<VAddr, s32> cached_pages;
|
||||
|
|
|
@ -8,8 +8,8 @@
|
|||
|
||||
namespace VideoCore {
|
||||
|
||||
using ImageId = SlotId;
|
||||
using ImageViewId = SlotId;
|
||||
using ImageId = Common::SlotId;
|
||||
using ImageViewId = Common::SlotId;
|
||||
|
||||
struct Offset2D {
|
||||
s32 x;
|
||||
|
|
Loading…
Reference in New Issue