File tree Expand file tree Collapse file tree 7 files changed +447
-394
lines changed
Expand file tree Collapse file tree 7 files changed +447
-394
lines changed Original file line number Diff line number Diff line change @@ -48,6 +48,47 @@ namespace vsg
4848 std::vector<const PagedLOD*> newHighresRequired;
4949 };
5050
51+ struct PagedLODContainer : public Inherit <Object, PagedLODContainer>
52+ {
53+ explicit PagedLODContainer (uint32_t maxNumPagedLOD = 10000 );
54+
55+ struct List
56+ {
57+ uint32_t head = 0 ;
58+ uint32_t tail = 0 ;
59+ uint32_t count = 0 ;
60+ std::string name;
61+ };
62+
63+ struct Element
64+ {
65+ uint32_t previous = 0 ;
66+ uint32_t next = 0 ;
67+ ref_ptr<PagedLOD> plod;
68+ List* list = nullptr ;
69+ };
70+
71+ using Elements = std::vector<Element>;
72+
73+ Elements elements;
74+ List availableList;
75+ List inactiveList;
76+ List activeList;
77+
78+ void resize (uint32_t new_size);
79+ void resize ();
80+ void inactive (const PagedLOD* plod);
81+ void active (const PagedLOD* plod);
82+ void remove (PagedLOD* plod);
83+
84+ void _move (const PagedLOD* plod, List* targetList);
85+
86+ bool check ();
87+ bool check (const List& list);
88+
89+ void print (std::ostream& out);
90+ };
91+
5192 // / Thread safe queue for tracking PagedLOD that needs to be loaded, compiled or merged by the DatabasePager
5293 class VSG_DECLSPEC DatabaseQueue : public Inherit<Object, DatabaseQueue>
5394 {
Original file line number Diff line number Diff line change @@ -108,45 +108,4 @@ namespace vsg
108108 };
109109 VSG_type_name (vsg::PagedLOD);
110110
111- struct PagedLODContainer : public Inherit <Object, PagedLODContainer>
112- {
113- explicit PagedLODContainer (uint32_t maxNumPagedLOD = 10000 );
114-
115- struct List
116- {
117- uint32_t head = 0 ;
118- uint32_t tail = 0 ;
119- uint32_t count = 0 ;
120- std::string name;
121- };
122-
123- struct Element
124- {
125- uint32_t previous = 0 ;
126- uint32_t next = 0 ;
127- ref_ptr<PagedLOD> plod;
128- List* list = nullptr ;
129- };
130-
131- using Elements = std::vector<Element>;
132-
133- Elements elements;
134- List availableList;
135- List inactiveList;
136- List activeList;
137-
138- void resize (uint32_t new_size);
139- void resize ();
140- void inactive (const PagedLOD* plod);
141- void active (const PagedLOD* plod);
142- void remove (PagedLOD* plod);
143-
144- void _move (const PagedLOD* plod, List* targetList);
145-
146- bool check ();
147- bool check (const List& list);
148-
149- void print (std::ostream& out);
150- };
151-
152111} // namespace vsg
Original file line number Diff line number Diff line change @@ -116,6 +116,41 @@ typedef struct VkRenderPassCreateInfo2KHR
116116
117117#endif
118118
119+ ////////////////////////////////////////////////////////////////////////////////////////////////////
120+ //
121+ // Definitions not provided prior to 1.1.97
122+ //
123+ #if VK_HEADER_VERSION < 97
124+
125+ #define VK_EXT_memory_budget 1
126+ #define VK_EXT_MEMORY_BUDGET_SPEC_VERSION 1
127+ #define VK_EXT_MEMORY_BUDGET_EXTENSION_NAME "VK_EXT_memory_budget"
128+
129+ typedef struct VkPhysicalDeviceMemoryBudgetPropertiesEXT {
130+ VkStructureType sType ;
131+ void * pNext ;
132+ VkDeviceSize heapBudget [VK_MAX_MEMORY_HEAPS ];
133+ VkDeviceSize heapUsage [VK_MAX_MEMORY_HEAPS ];
134+ } VkPhysicalDeviceMemoryBudgetPropertiesEXT ;
135+
136+ #define VK_EXT_memory_priority 1
137+ #define VK_EXT_MEMORY_PRIORITY_SPEC_VERSION 1
138+ #define VK_EXT_MEMORY_PRIORITY_EXTENSION_NAME "VK_EXT_memory_priority"
139+
140+ typedef struct VkPhysicalDeviceMemoryPriorityFeaturesEXT {
141+ VkStructureType sType ;
142+ void * pNext ;
143+ VkBool32 memoryPriority ;
144+ } VkPhysicalDeviceMemoryPriorityFeaturesEXT ;
145+
146+ typedef struct VkMemoryPriorityAllocateInfoEXT {
147+ VkStructureType sType ;
148+ const void * pNext ;
149+ float priority ;
150+ } VkMemoryPriorityAllocateInfoEXT ;
151+
152+ #endif
153+
119154////////////////////////////////////////////////////////////////////////////////////////////////////
120155//
121156// Definitions not provided prior to 1.3.215
You can’t perform that action at this time.
0 commit comments