Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.10)

project(vsg
VERSION 1.1.15
VERSION 1.1.16
DESCRIPTION "VulkanSceneGraph library"
LANGUAGES CXX
)
Expand Down
2 changes: 1 addition & 1 deletion include/vsg/app/CompileManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ namespace vsg
CompileResult compile(ref_ptr<Object> object, ContextSelectionFunction contextSelection = {});

/// compile all the command graphs in a task
CompileResult compileTask(ref_ptr<RecordAndSubmitTask> task, const ResourceRequirements& resourceRequirements = {});
CompileResult compileTask(ref_ptr<RecordAndSubmitTask> task, ResourceRequirements& resourceRequirements);

/// mechanism for releasing and reusing used resources
ref_ptr<ResourceScavenger> resourceScavenger;
Expand Down
2 changes: 2 additions & 0 deletions include/vsg/core/Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ namespace vsg
VSG_array(ushortArray, uint16_t);
VSG_array(intArray, int32_t);
VSG_array(uintArray, uint32_t);
VSG_array(int64Array, int64_t);
VSG_array(uint64Array, uint64_t);
VSG_array(floatArray, float);
VSG_array(doubleArray, double);

Expand Down
10 changes: 8 additions & 2 deletions include/vsg/core/Value.h
Original file line number Diff line number Diff line change
Expand Up @@ -208,8 +208,14 @@ namespace vsg
VSG_value(pathValue, vsg::Path);

VSG_value(boolValue, bool);
VSG_value(intValue, int);
VSG_value(uintValue, unsigned int);
VSG_value(byteValue, int8_t);
VSG_value(ubyteValue, uint8_t);
VSG_value(shortValue, int16_t);
VSG_value(ushortValue, uint16_t);
VSG_value(intValue, int32_t);
VSG_value(uintValue, uint32_t);
VSG_value(int64Value, int64_t);
VSG_value(uint64Value, uint64_t);
VSG_value(floatValue, float);
VSG_value(doubleValue, double);

Expand Down
7 changes: 7 additions & 0 deletions include/vsg/utils/GraphicsPipelineConfigurator.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ namespace vsg
{
public:
explicit DescriptorConfigurator(ref_ptr<ShaderSet> in_shaderSet = {});
explicit DescriptorConfigurator(const DescriptorConfigurator& rhs, const CopyOp& copyop = {});

ref_ptr<Object> clone(const CopyOp& copyop = {}) const override { return DescriptorConfigurator::create(*this, copyop); }

ref_ptr<ShaderSet> shaderSet;
bool blending = false;
Expand Down Expand Up @@ -76,6 +79,9 @@ namespace vsg
{
public:
explicit ArrayConfigurator(ref_ptr<ShaderSet> in_shaderSet = {});
explicit ArrayConfigurator(const ArrayConfigurator& rhs, const CopyOp& copyop = {});

ref_ptr<Object> clone(const CopyOp& copyop = {}) const override { return ArrayConfigurator::create(*this, copyop); }

ref_ptr<ShaderSet> shaderSet;

Expand Down Expand Up @@ -132,6 +138,7 @@ namespace vsg
ref_ptr<ShaderCompileSettings> shaderHints;
ref_ptr<DescriptorConfigurator> descriptorConfigurator;
StateCommands inheritedState;
std::map<uint32_t, VkVertexInputRate> vertexInputRates;

int compare(const Object& rhs) const override;

Expand Down
13 changes: 13 additions & 0 deletions include/vsg/utils/ShaderSet.h
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,19 @@ namespace vsg
GraphicsPipelineStates defaultGraphicsPipelineStates;
std::vector<ref_ptr<CustomDescriptorSetBinding>> customDescriptorSetBindings;

/// Hints mask for scene graph builders for what ShaderSet prefers/requires.
enum GeometryHints
{
NO_PREFERENCE = 0,
GEOMETRY = 1 << 0,
VERTEXDRAW = 1 << 1,
VERTEXINDEXDRAW = 1 << 2,
DRAWMESHTASKS = 1 << 3,
MESHLETS = 1 << 4
};

int geometryHints = GeometryHints::NO_PREFERENCE;

ref_ptr<ShaderCompileSettings> defaultShaderHints;
/// variants of the rootShaderModule compiled for different combinations of ShaderCompileSettings
std::map<ref_ptr<ShaderCompileSettings>, ShaderStages, DereferenceLess> variants;
Expand Down
11 changes: 10 additions & 1 deletion src/vsg/app/CompileManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -350,7 +350,7 @@ CompileResult CompileManager::compile(ref_ptr<Object> object, ContextSelectionFu
return result;
}

CompileResult CompileManager::compileTask(ref_ptr<RecordAndSubmitTask> task, const ResourceRequirements& resourceRequirements)
CompileResult CompileManager::compileTask(ref_ptr<RecordAndSubmitTask> task, ResourceRequirements& resourceRequirements)
{
CompileResult result;

Expand All @@ -360,6 +360,7 @@ CompileResult CompileManager::compileTask(ref_ptr<RecordAndSubmitTask> task, con
try
{
auto compileTraversal = CompileTraversal::create(task->device, resourceRequirements);
auto deviceMemoryBufferPools = task->device->deviceMemoryBufferPools.ref_ptr();

for (const auto& context : compileTraversal->contexts)
{
Expand All @@ -369,6 +370,14 @@ CompileResult CompileManager::compileTask(ref_ptr<RecordAndSubmitTask> task, con
}
}

if (deviceMemoryBufferPools && deviceMemoryBufferPools->compileTraversalUseReserve)
{
for (auto& context : compileTraversal->contexts)
{
context->reserve(resourceRequirements);
}
}

for (auto& cg : task->commandGraphs)
{
cg->accept(*compileTraversal);
Expand Down
8 changes: 8 additions & 0 deletions src/vsg/io/ObjectFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,14 @@ ObjectFactory::ObjectFactory()
add<vsg::wstringValue>();
add<vsg::pathValue>();
add<vsg::boolValue>();
add<vsg::byteValue>();
add<vsg::ubyteValue>();
add<vsg::shortValue>();
add<vsg::ushortValue>();
add<vsg::intValue>();
add<vsg::uintValue>();
add<vsg::int64Value>();
add<vsg::uint64Value>();
add<vsg::floatValue>();
add<vsg::doubleValue>();
add<vsg::vec2Value>();
Expand Down Expand Up @@ -75,6 +81,8 @@ ObjectFactory::ObjectFactory()
add<vsg::ushortArray>();
add<vsg::intArray>();
add<vsg::uintArray>();
add<vsg::int64Array>();
add<vsg::uint64Array>();
add<vsg::floatArray>();
add<vsg::doubleArray>();
add<vsg::vec2Array>();
Expand Down
3 changes: 2 additions & 1 deletion src/vsg/io/glsl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ namespace
{".rmiss", VK_SHADER_STAGE_MISS_BIT_KHR},
{".rcall", VK_SHADER_STAGE_CALLABLE_BIT_KHR},
{".glsl", VK_SHADER_STAGE_ALL},
{".hlsl", VK_SHADER_STAGE_ALL}};
{".hlsl", VK_SHADER_STAGE_ALL},
{".h", VK_SHADER_STAGE_ALL}};
} // namespace

glsl::glsl()
Expand Down
Loading
Loading