Skip to content

Commit 820dc27

Browse files
committed
Merge branch 'master' into HarmonySupport
2 parents 4c40c1e + f329721 commit 820dc27

File tree

10 files changed

+464
-402
lines changed

10 files changed

+464
-402
lines changed

.github/workflows/ci-android.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [ubuntu-latest]
14-
android-platform: [24, latest]
14+
android-platform: [29, latest]
1515
android-abi: [armeabi-v7a, arm64-v8a]
1616
build-shared: [ON]
1717

INSTALL.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121
* C++17 compliant compiler i.e. g++ 7.3 or later, Clang 6.0 or later, Visual Studio S2017 or later.
2222
* [Vulkan](https://vulkan.lunarg.com/) 1.1 or later. You can use Vulkan (libs and headers) installed from repositories or VulkanSDK.
23-
* [CMake](https://www.cmake.org) 3.7 or later.
23+
* [CMake](https://www.cmake.org) 3.10 or later.
2424

2525
---
2626

@@ -180,7 +180,7 @@ This will also tell CMake that your minimum C++ standard is 17.
180180

181181
For example, a bare minimum CMakeLists.txt file to compile a single file application would be:
182182

183-
cmake_minimum_required(VERSION 3.7)
183+
cmake_minimum_required(VERSION 3.10)
184184
find_package(vsg REQUIRED)
185185
add_executable(myapp "myapp.cpp")
186186
target_link_libraries(myapp vsg::vsg)
@@ -191,7 +191,7 @@ The build system provides macros that create specific cmake targets to use in yo
191191

192192
For example, a bare minimum CMakeLists.txt file adding the mentioned cmake targets would be:
193193

194-
cmake_minimum_required(VERSION 3.7)
194+
cmake_minimum_required(VERSION 3.10)
195195
find_package(vsg REQUIRED)
196196

197197
vsg_setup_dir_vars()

include/vsg/io/DatabasePager.h

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff 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
{

include/vsg/io/convert_utf.h

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,19 @@ namespace vsg
2828
inline void convert_utf(const std::string& src, std::string& dst) { dst = src; }
2929
inline void convert_utf(const std::wstring& src, std::wstring& dst) { dst = src; }
3030

31-
#if defined(__cpp_char8_t)
31+
#if defined(__cpp_char8_t)
3232
inline void convert_utf(const std::u8string& src, std::u8string& dst) { dst = src; }
33-
inline void convert_utf(const std::wstring& src, std::u8string& dst) { std::string temp_dst; convert_utf(src, temp_dst); dst.assign(temp_dst.begin(), temp_dst.end()); }
34-
inline void convert_utf(const std::u8string& src, std::wstring& dst) { std::string temp_src(src.begin(), src.end()); convert_utf(temp_src, dst); }
33+
inline void convert_utf(const std::wstring& src, std::u8string& dst)
34+
{
35+
std::string temp_dst;
36+
convert_utf(src, temp_dst);
37+
dst.assign(temp_dst.begin(), temp_dst.end());
38+
}
39+
inline void convert_utf(const std::u8string& src, std::wstring& dst)
40+
{
41+
std::string temp_src(src.begin(), src.end());
42+
convert_utf(temp_src, dst);
43+
}
3544

3645
inline void convert_utf(const char8_t c, std::u8string& dst)
3746
{
@@ -56,7 +65,7 @@ namespace vsg
5665
convert_utf(src, dst);
5766
return dst;
5867
}
59-
#endif
68+
#endif
6069

6170
inline void convert_utf(const char c, std::string& dst)
6271
{

include/vsg/nodes/PagedLOD.h

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff 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

include/vsg/vk/vulkan.h

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)