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