Skip to content

Commit 951e36a

Browse files
committed
Merge branch 'master' into AnyOldName3-fix-semaphore-reuse
2 parents d6497fe + 62b679a commit 951e36a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+1675
-948
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [ubuntu-latest, macos-latest, windows-latest]
13-
vulkan-version: [1.3.250.1]
13+
vulkan-version: [1.3.268.0]
1414
build-shared: [OFF]
1515
include:
1616
- build-shared: ON
1717
os: windows-latest
18-
vulkan-version: 1.3.250.1
18+
vulkan-version: 1.3.268.0
1919
continue-on-error: ${{ matrix.vulkan-version == 'latest' }}
2020

2121
steps:

CMakeLists.txt

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
cmake_minimum_required(VERSION 3.7)
1+
cmake_minimum_required(VERSION 3.10)
22

33
project(vsg
4-
VERSION 1.1.11
4+
VERSION 1.1.13
55
DESCRIPTION "VulkanSceneGraph library"
66
LANGUAGES CXX
77
)
8-
set(VSG_SOVERSION 14)
8+
set(VSG_SOVERSION 15)
99
SET(VSG_RELEASE_CANDIDATE 0)
1010
set(Vulkan_MIN_VERSION 1.1.70.0)
1111

@@ -41,21 +41,13 @@ find_package(Threads REQUIRED)
4141
set(VSG_MAX_INSTRUMENTATION_LEVEL 1 CACHE STRING "Set the instrumentation level to build into the VSG library, 0 for off, 1 coarse grained, 2 medium, 3 fine grained." )
4242

4343
# Enable/disable shader compilation support that pulls in glslang
44-
set(VSG_SUPPORTS_ShaderCompiler 1 CACHE STRING "Optional shader compiler support, 0 for off, 1 for enabled." )
44+
option(VSG_SUPPORTS_ShaderCompiler "Optional shader compiler support" ON)
4545
if (VSG_SUPPORTS_ShaderCompiler)
4646

47-
# Try looking for glslang 15 first.
48-
set(GLSLANG_MIN_VERSION "15" CACHE STRING "glslang 14 is the earliest version that we think installs itself properly on all platforms. Other platforms may be able to use an earlier version")
49-
find_package(glslang ${GLSLANG_MIN_VERSION} CONFIG QUIET)
50-
51-
if (NOT glslang_FOUND)
52-
# fallback to trying glslang 14.
53-
set(GLSLANG_MIN_VERSION "14")
54-
find_package(glslang ${GLSLANG_MIN_VERSION} CONFIG)
55-
endif()
47+
find_package(glslang CONFIG QUIET)
5648

5749
if (glslang_FOUND)
58-
set(FIND_DEPENDENCY_glslang "find_package(glslang ${GLSLANG_MIN_VERSION} CONFIG REQUIRED)")
50+
set(FIND_DEPENDENCY_glslang "find_package(glslang CONFIG REQUIRED)")
5951
else()
6052
message(WARNING "glslang not found. ShaderCompile support disabled.")
6153
set(VSG_SUPPORTS_ShaderCompiler 0)
@@ -75,7 +67,7 @@ if (VSG_SUPPORTS_ShaderCompiler)
7567
endif()
7668
endif()
7769

78-
set(VSG_SUPPORTS_Windowing 1 CACHE STRING "Optional native windowing support providing a default implementation of vsg::Window::create(), 0 for off, 1 for enabled." )
70+
option(VSG_SUPPORTS_Windowing "Optional native windowing support providing a default implementation of vsg::Window::create()" ON)
7971
if (VSG_SUPPORTS_Windowing)
8072
if (ANDROID)
8173
set(FIND_DEPENDENCY_WINDOWING "")
@@ -98,6 +90,8 @@ if (VSG_SUPPORTS_Windowing)
9890
endif()
9991
endif()
10092

93+
option(VSG_USE_dynamic_cast "Use dynamic_cast in vsg::Object::cast<T>(), 0 for off, 1 for enabled." OFF)
94+
10195
# this line needs to be after the call to setup_build_vars()
10296
configure_file("${VSG_SOURCE_DIR}/src/vsg/core/Version.h.in" "${VSG_VERSION_HEADER}")
10397

INSTALL.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -170,22 +170,19 @@ To assist with setting up software to work with the VSG when you install the lib
170170

171171
find_package(vsg)
172172

173-
To select C++17 compilation you'll need:
174-
175-
set_property(TARGET mytargetname PROPERTY CXX_STANDARD 17)
176-
177173
To link your lib/application to required dependencies you'll need:
178174

179175
target_link_libraries(mytargetname vsg::vsg)
180176

181177
This will tell CMake to set up all the appropriate include paths, libs and any definitions (such as the VSG_SHARED_LIBRARY #define that is required under Windows with shared library builds to select the correct declspec().)
182178

179+
This will also tell CMake that your minimum C++ standard is 17.
180+
183181
For example, a bare minimum CMakeLists.txt file to compile a single file application would be:
184182

185183
cmake_minimum_required(VERSION 3.7)
186184
find_package(vsg REQUIRED)
187185
add_executable(myapp "myapp.cpp")
188-
set_property(TARGET myapp PROPERTY CXX_STANDARD 17)
189186
target_link_libraries(myapp vsg::vsg)
190187

191188
### Using VSG provided cmake macros within your own projects
@@ -218,7 +215,6 @@ For example, a bare minimum CMakeLists.txt file adding the mentioned cmake targe
218215
vsg_add_target_uninstall()
219216

220217
add_executable(myapp "myapp.cpp")
221-
set_property(TARGET myapp PROPERTY CXX_STANDARD 17)
222218
target_link_libraries(myapp vsg::vsg)
223219

224220
### Using VSG provided cmake macro to generate cmake support files

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ Community projects:
4545

4646
The above dependency versions are known to work so they've been set as the current minimum, it may be possible to build against older versions. If you find success with older versions let us know and we can update the version info.
4747

48-
While you can install Vulkan and glslang development libraries and headers from 3rd party repositoriesm these may be older, so for the latest versions you can also use the VulkanSDK provided by LunarG. Your can download VulkanSDK from [LunarG](https://vulkan.lunarg.com/sdk/home), unpack into a local directory and set VULKAN_SDK environment variable to the include/lib directory within it.
48+
While you can install Vulkan and glslang development libraries and headers from 3rd party repositories, these may be older, so for the latest versions you can also use the VulkanSDK provided by LunarG. You can download VulkanSDK from [LunarG](https://vulkan.lunarg.com/sdk/home), unpack into a local directory and set VULKAN_SDK environment variable to the include/lib directory within it.
4949

5050
### Command line build instructions:
5151

include/vsg/all.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
2727
#include <vsg/core/IntrusiveAllocator.h>
2828
#include <vsg/core/Mask.h>
2929
#include <vsg/core/MemorySlots.h>
30+
#include <vsg/core/MipmapLayout.h>
3031
#include <vsg/core/Object.h>
3132
#include <vsg/core/Objects.h>
3233
#include <vsg/core/ScratchMemory.h>

include/vsg/app/RecordTraversal.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ namespace vsg
9999
ref_ptr<RecordedCommandBuffers> recordedCommandBuffers;
100100

101101
/// get the current State object used to track state and projection/modelview matrices for the current subgraph being traversed
102-
State* getState() { return _state; }
102+
State* getState() { return state; }
103103

104104
/// get the current CommandBuffer for the current subgraph being traversed
105105
CommandBuffer* getCommandBuffer();
@@ -108,10 +108,10 @@ namespace vsg
108108
uint32_t deviceID() const;
109109

110110
void setFrameStamp(FrameStamp* fs);
111-
FrameStamp* getFrameStamp() { return _frameStamp; }
111+
FrameStamp* getFrameStamp() { return frameStamp; }
112112

113113
void setDatabasePager(DatabasePager* dp);
114-
DatabasePager* getDatabasePager() { return _databasePager; }
114+
DatabasePager* getDatabasePager() { return databasePager; }
115115

116116
void apply(const Object& object);
117117

@@ -173,19 +173,19 @@ namespace vsg
173173
// list of pairs of modelview matrix & region of interest
174174
std::vector<std::pair<dmat4, const RegionOfInterest*>> regionsOfInterest;
175175

176-
protected:
177-
virtual ~RecordTraversal();
178-
179-
ref_ptr<FrameStamp> _frameStamp;
180-
ref_ptr<State> _state;
176+
ref_ptr<FrameStamp> frameStamp;
177+
ref_ptr<State> state;
181178

182179
// used to handle loading of PagedLOD external children.
183-
ref_ptr<DatabasePager> _databasePager;
184-
ref_ptr<CulledPagedLODs> _culledPagedLODs;
180+
ref_ptr<DatabasePager> databasePager;
181+
ref_ptr<CulledPagedLODs> culledPagedLODs;
185182

186-
int32_t _minimumBinNumber = 0;
187-
std::vector<ref_ptr<Bin>> _bins;
188-
ref_ptr<ViewDependentState> _viewDependentState;
183+
int32_t minimumBinNumber = 0;
184+
std::vector<ref_ptr<Bin>> bins;
185+
ref_ptr<ViewDependentState> viewDependentState;
186+
187+
protected:
188+
virtual ~RecordTraversal();
189189
};
190190

191191
} // namespace vsg

include/vsg/app/TransferTask.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,4 +118,7 @@ namespace vsg
118118
};
119119
VSG_type_name(vsg::TransferTask);
120120

121+
/// convenience function that uploads staging buffer data to device including mipmaps.
122+
extern VSG_DECLSPEC void transferImageData(ref_ptr<ImageView> imageView, VkImageLayout targetImageLayout, Data::Properties properties, uint32_t width, uint32_t height, uint32_t depth, uint32_t mipLevels, ref_ptr<Buffer> stagingBuffer, VkDeviceSize stagingBufferOffset, VkCommandBuffer vk_commandBuffer, vsg::Device* device);
123+
121124
} // namespace vsg

include/vsg/app/View.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ namespace vsg
7777
/// and when it is visited the visitor.traversalMask is &'ed with the mask to give the traversalMask to use in the subgraph.
7878
Mask mask = MASK_ALL;
7979

80+
/// LODScale scales
81+
double LODScale = 1.0;
82+
8083
/// bins
8184
std::vector<ref_ptr<Bin>> bins;
8285

include/vsg/app/WindowTraits.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ namespace vsg
7070
VkImageUsageFlags depthImageUsage = VK_IMAGE_USAGE_DEPTH_STENCIL_ATTACHMENT_BIT;
7171

7272
VkQueueFlags queueFlags = VK_QUEUE_GRAPHICS_BIT;
73-
std::vector<float> queuePiorities{1.0, 0.0};
73+
std::vector<float> queuePriorities{1.0, 0.0};
7474
VkPipelineStageFlagBits imageAvailableSemaphoreWaitFlag = VK_PIPELINE_STAGE_COLOR_ATTACHMENT_OUTPUT_BIT;
7575

7676
// hints to which extension to enable during Instance/Device setup

include/vsg/commands/CopyAndReleaseImage.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ namespace vsg
4040
uint32_t width = 0;
4141
uint32_t height = 0;
4242
uint32_t depth = 0;
43-
Data::MipmapOffsets mipmapOffsets;
4443

4544
void record(CommandBuffer& commandBuffer) const;
4645
};

0 commit comments

Comments
 (0)