diligentgraphics / diligentsamples Goto Github PK
View Code? Open in Web Editor NEWSample projects demonstrating the usage of Diligent Engine
Home Page: http://diligentgraphics.com/diligent-engine/samples/
License: Apache License 2.0
Sample projects demonstrating the usage of Diligent Engine
Home Page: http://diligentgraphics.com/diligent-engine/samples/
License: Apache License 2.0
Suggested code style:
cbuffer Constants
{
float4x4 g_WorldViewProj;
};
struct VSInput {
float3 Pos : ATTRIB0;
float2 UV : ATTRIB1;
};
struct PSInput
{
float4 Pos : SV_POSITION;
float2 UV : TEX_COORD;
};
// Vertex shader takes two inputs: vertex position and uv coordinates.
// By convention, Diligent Engine expects vertex shader inputs to be labeled as ATTRIBn, where n is the attribute number.
// Note that if separate shader objects are not supported (this is only the case for old GLES3.0 devices), vertex
// shader output variable name must match exactly the name of the pixel shader input variable.
// If the variable has structure type (like in this example), the structure declarations must also be indentical.
void main(in VSInput VSIn, out PSInput PSIn)
{
PSIn.Pos = mul( float4(VSIn.Pos, 1.0), g_WorldViewProj);
PSIn.UV = VSIn.UV;
}
And for the pixel shader:
Texture2D g_Texture;
SamplerState g_Texture_sampler; // By convention, texture samplers must use _sampler suffix
struct PSInput
{
float4 Pos : SV_POSITION;
float2 UV : TEX_COORD;
};
struct PSOutput
{
float4 Color : SV_TARGET;
};
void main(in PSInput PSIn, out PSOutput PSOut)
{
PSOut.Color = g_Texture.Sample(g_Texture_sampler, PSIn.UV);
}
Original hello_ar sample was recently updated to support occlusion
I'm getting the following run-time when trying to run VRS example (XCode 13.2.1):
Diligent Engine: ERROR in ShaderMtlImpl() (ShaderMtlImpl.mm, 423): Failed to compile MSL source:
program_source:9:10: fatal error: 'Structures.fxh' file not found
#include "Structures.fxh"
^~~~~~~~~~~~~~~~
Diligent Engine: ERROR in CreateDeviceObject() (RenderDeviceBase.hpp, 511): Failed to create Shader object 'Blit - VS'
Diligent Engine: ERROR in ShaderMtlImpl() (ShaderMtlImpl.mm, 423): Failed to compile MSL source:
program_source:9:10: fatal error: 'Structures.fxh' file not found
#include "Structures.fxh"
^~~~~~~~~~~~~~~~
Diligent Engine: ERROR in CreateDeviceObject() (RenderDeviceBase.hpp, 511): Failed to create Shader object 'Blit - PS'
Diligent Engine: ERROR in ValidateGraphicsPipelineCreateInfo() (PipelineStateBase.cpp, 554): Description of graphics PSO 'Blit to swapchain image' is invalid: Vertex shader must not be null.
Diligent Engine: ERROR in CreateDeviceObject() (RenderDeviceBase.hpp, 511): Failed to create Pipeline State object 'Blit to swapchain image'
To reproduce, start the demo on MacOS and resize the window. After the resize, mouse input stops work properly.
Resizing windows works OK on Windows.
Tutorial00App::Render calls CommitShaderResources with null IShaderResourceBinding, which is forbidden by the assert in CommitShaderResources.
(gdb) bt
#0 __GI_raise (sig=<optimized out>) at ../sysdeps/unix/sysv/linux/raise.c:50
#1 0x00007ffff6f8665d in LinuxDebug::AssertionFailed (Message=0x555555cf1630 "pShaderResourceBinding must not be null", Function=0x7ffff756bb72 "CommitShaderResources", File=0x7ffff756f2d8 "/home/mslusarz/dev/DiligentEngine/DiligentCore/Graphics/GraphicsEngine/include/DeviceContextBase.hpp", Line=577) at ../DiligentCore/Platforms/Linux/src/LinuxDebug.cpp:41
#2 0x00007ffff6f8673f in DebugAssertionFailed (Message=0x555555cf1630 "pShaderResourceBinding must not be null", Function=0x7ffff756bb72 "CommitShaderResources", File=0x7ffff756f2d8 "/home/mslusarz/dev/DiligentEngine/DiligentCore/Graphics/GraphicsEngine/include/DeviceContextBase.hpp", Line=577) at ../DiligentCore/Platforms/Linux/src/LinuxDebug.cpp:53
#3 0x00007ffff6d4ea81 in Diligent::DeviceContextBase<Diligent::EngineVkImplTraits>::CommitShaderResources (this=0x555555e80210, pShaderResourceBinding=0x0, StateTransitionMode=Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION) at /home/mslusarz/dev/DiligentEngine/DiligentCore/Graphics/GraphicsEngine/include/DeviceContextBase.hpp:577
#4 0x00007ffff6d35ac6 in Diligent::DeviceContextVkImpl::CommitShaderResources (this=0x555555e80210, pShaderResourceBinding=0x0, StateTransitionMode=Diligent::RESOURCE_STATE_TRANSITION_MODE_TRANSITION) at /home/mslusarz/dev/DiligentEngine/DiligentCore/Graphics/GraphicsEngineVulkan/src/DeviceContextVkImpl.cpp:473
#5 0x000055555555853c in Tutorial00App::Render (this=0x555555573e70) at ../DiligentSamples/Tutorials/Tutorial00_HelloLinux/src/Tutorial00_HelloLinux.cpp:298
#6 0x0000555555556afd in xcb_main () at ../DiligentSamples/Tutorials/Tutorial00_HelloLinux/src/Tutorial00_HelloLinux.cpp:474
#7 0x0000555555557173 in main (argc=1, argv=0x7fffffffde08) at ../DiligentSamples/Tutorials/Tutorial00_HelloLinux/src/Tutorial00_HelloLinux.cpp:696
I have successfully built the engine on vs2017, win10. When I run any of the samples or tutorials, the main window context starts and the aborts before any content is started. No messages are displayed on the command prompt window.
Replace camera rotation widget with mouse/touch rotation
To be able to switch between d3d11 and d3d12 modes
AntTweakBar is not maintained anymore and renders very slowly. Imgui seems to be a much better alternative.
Hello. First of all, thank you guys, great job ๐.
Second, it's 2020 and a good time to think about extended mesh loading. I tried to link Diligent Graphics Engine (D3D11) with Assimp (on Windows), but that's quite wayward. Of course, the library is low-level, however Diligent Samples repo can afford this kind of job.
Also, add two-sided shadow map rendering mode
At the moment, it is required to manually add Copy files build phase to iOS Xcode project generated by CMake to bundle and code-sign MoltenVK dylib, which is inconvenient.
See also stackoverflow question.
MacOS version : 10.14.3
Android Studio version : 3.3
SDK : 26.1.1
NDK : r16b
I tried to build Tutorial01 on my MacBook Pro with android studio, but it was failed. No problems on gradle sync.
After change '-DANDROID_STL=gnustl_static' on build.gradle file to '-DANDROID_STL=c++_static' or '-DANDROID_STL=c++_shared' , it work correctly. Error codes below.
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':Common:generateJsonModelDebug'.
> Build command failed.
Error while executing process /Users/june/Library/Android/sdk/cmake/3.6.4111459/bin/cmake with arguments {-H/Users/june/DiligentEngine -B/Users/june/DiligentEngine/Common/NativeApp/Android/.externalNativeBuild/cmake/debug/armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-21 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=/Users/june/DiligentEngine/Common/NativeApp/Android/build/intermediates/cmake/debug/obj/armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=/Users/june/Library/Android/sdk/ndk-bundle -DCMAKE_TOOLCHAIN_FILE=/Users/june/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=/Users/june/Library/Android/sdk/cmake/3.6.4111459/bin/ninja -GAndroid Gradle - Ninja -DANDROID_PLATFORM=android-21 -DANDROID_TOOLCHAIN=clang -DANDROID_STL=gnustl_static -DENABLE_TESTS=TRUE}
-- Configuring incomplete, errors occurred!
CMake Error at /Users/june/Library/Android/sdk/ndk-bundle/build/cmake/android.toolchain.cmake:249 (message):
gnustl_static is no longer supported. Please switch to either c++_shared
or c++_static. See
https://developer.android.com/ndk/guides/cpp-support.html for more
information.
Call Stack (most recent call first):
/Users/june/Library/Android/sdk/cmake/3.6.4111459/share/cmake-3.6/Modules/CMakeDetermineSystem.cmake:98 (include)
CMakeLists.txt:5 (project)
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage
CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
Hello!
What's a problem:
2021-10-27 11:40:38.557 Tutorial02_Cube[41599:537351] *** Terminating app due to uncaught exception
'NSInvalidArgumentException', reason: 'Could not find a storyboard named 'Main' in bundle NSBundle
</Users/blaze/DiligentEngine/build/DiligentSamples/Tutorials/Tutorial02_Cube/Tutorial02_Cube.app> (loaded)'
Everything compiles fine but when I started it, it crashed
It says that Main.storyboard is missing. So I decided to check the contents of Tutorial02_Cube.app and found their Main.storyboard. In theory, everything should work
How to reproduce:
Hardware and software:
MacBook Air on M1 chip
Visual Studio Code with CMake Tools extension
Xcode 13.1
Diligent Engine: ERROR in Diligent::ShaderGLImpl::ShaderGLImpl() (ShaderGLImpl.cpp, 127): Failed to compile shader file 'Imgui PS'
InfoLog:
Fragment shader failed to compile with the following errors:
ERROR: 0:205: error(#229) Overloaded functions must have the same return type: unsigned int
ERROR: 0:209: error(#229) Overloaded functions must have the same return type: uvec2
ERROR: 0:214: error(#229) Overloaded functions must have the same return type: uvec3
ERROR: 0:218: error(#229) Overloaded functions must have the same return type: uvec4
ERROR: error(#273) 4 compilation errors. No code generated
I'm having issues with the Shadows sample application. The visual output doesn't look reasonable when using Vulkan (MoltenVK) backend on my Mac. The shadows in the scene move among the scene by moving/rotating the camera. When using OpenGL backend it works properly though. The attached video shows the Shadows sample app using Vulkan (MoltenVK) backend to illustrate the issue.
Details about my configuration:
Diligent Engine: ERROR: Space in dynamic heap is exausted! After idling for 60.3 ms still no space is available. Increase the size of the heap by setting EngineVkAttribs::DynamicHeapSize to a greater value or optimize dynamic resource usage
DiAssertion failed: pDestination, file c:\program files (x86)\windows kits\10\include\10.0.17134.0\um\directxmathconvert.inl, line 1819
ligent Engine: ERROR: Space in dynamic heap is exausted! After idling for 60.3 ms still no space is available. Increase the size of the heap by setting EngineVkAttribs::DynamicHeapSize to a greater value or optimize dynamic resource usage
Assertion failed: pDestination, file c:\program files (x86)\windows kits\10\include\10.0.17134.0\um\directxmathconvert.inl, line 1819
VulkanUtilities::VulkanLogicalDevice::CreateGraphicsPipeline(VkGraphicsPipelineCreateInfo const&, VkPipelineCache_T*, char const*) const VulkanLogicalDevice.cpp:249
Diligent::(anonymous namespace)::CreateGraphicsPipeline(Diligent::RenderDeviceVkImpl*, std::__ndk1::vector<VkPipelineShaderStageCreateInfo, std::__ndk1::allocator<VkPipelineShaderStageCreateInfo> >&, Diligent::PipelineLayoutVk const&, Diligent::PipelineStateDesc const&, Diligent::GraphicsPipelineDesc const&, VulkanUtilities::VulkanObjectWrapper<VkPipeline_T*, (VulkanUtilities::VulkanHandleTypeId)9>&, Diligent::RefCntAutoPtr<Diligent::IRenderPass>&) PipelineStateVkImpl.cpp:347
Diligent::PipelineStateVkImpl::PipelineStateVkImpl(Diligent::IReferenceCounters*, Diligent::RenderDeviceVkImpl*, Diligent::GraphicsPipelineStateCreateInfo const&) PipelineStateVkImpl.cpp:864
Diligent::PipelineStateVkImpl* Diligent::MakeNewRCObj<Diligent::PipelineStateVkImpl, Diligent::FixedBlockMemoryAllocator>::operator()<Diligent::RenderDeviceVkImpl*, Diligent::GraphicsPipelineStateCreateInfo const&>(Diligent::RenderDeviceVkImpl*&&, Diligent::GraphicsPipelineStateCreateInfo const&) RefCountedObjectImpl.hpp:668
void Diligent::RenderDeviceBase<Diligent::EngineVkImplTraits>::CreatePipelineStateImpl<Diligent::GraphicsPipelineStateCreateInfo>(Diligent::IPipelineState**, Diligent::GraphicsPipelineStateCreateInfo const&)::'lambda'()::operator()() const RenderDeviceBase.hpp:512
void Diligent::RenderDeviceBase<Diligent::EngineVkImplTraits>::CreateDeviceObject<Diligent::IPipelineState, Diligent::PipelineStateDesc, void Diligent::RenderDeviceBase<Diligent::EngineVkImplTraits>::CreatePipelineStateImpl<Diligent::GraphicsPipelineStateCreateInfo>(Diligent::IPipelineState**, Diligent::GraphicsPipelineStateCreateInfo const&)::'lambda'()>(char const*, const&, Diligent::GraphicsPipelineStateCreateInfo**, void Diligent::RenderDeviceBase<Diligent::EngineVkImplTraits>::CreatePipelineStateImpl<Diligent::GraphicsPipelineStateCreateInfo>(Diligent::IPipelineState**, Diligent::GraphicsPipelineStateCreateInfo const&)::'lambda'()) RenderDeviceBase.hpp:484
void Diligent::RenderDeviceBase<Diligent::EngineVkImplTraits>::CreatePipelineStateImpl<Diligent::GraphicsPipelineStateCreateInfo>(Diligent::IPipelineState**, Diligent::GraphicsPipelineStateCreateInfo const&) RenderDeviceBase.hpp:509
Diligent::RenderDeviceVkImpl::CreateGraphicsPipelineState(Diligent::GraphicsPipelineStateCreateInfo const&, Diligent::IPipelineState**) RenderDeviceVkImpl.cpp:546
Diligent::Tutorial08_Tessellation::CreatePipelineStates() Tutorial08_Tessellation.cpp:225
Diligent::Tutorial08_Tessellation::Initialize(Diligent::SampleInitInfo const&) Tutorial08_Tessellation.cpp:319
Diligent::SampleApp::InitializeSample() SampleApp.cpp:435
Diligent::SampleAppAndroid::Initialize() SampleAppAndroid.cpp:119
Diligent::AndroidAppBase::InitDisplay() AndroidAppBase.cpp:43
Diligent::AndroidAppBase::HandleCmd(android_app*, int) AndroidAppBase.cpp:130
process_cmd android_native_app_glue.c:197
::android_main(android_app *) AndroidMain.cpp:82
android_app_entry android_native_app_glue.c:226
__pthread_start(void*) 0x0000007a5cafab28
__start_thread 0x0000007a5ca9c334
additional info
where:
PipelineWrapper VulkanLogicalDevice::CreateGraphicsPipeline(const VkGraphicsPipelineCreateInfo& PipelineCI,
VkPipelineCache cache,
const char* DebugName) const
{
VERIFY_EXPR(PipelineCI.sType == VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO);
if (DebugName == nullptr)
DebugName = "";
VkPipeline vkPipeline = VK_NULL_HANDLE;
// see stack_after.cpp for what happens when this is entered
> auto err = vkCreateGraphicsPipelines(m_VkDevice, cache, 1, &PipelineCI, m_VkAllocator, &vkPipeline);
CHECK_VK_ERROR_AND_THROW(err, "Failed to create graphics pipeline '", DebugName, '\'');
if (*DebugName != 0)
SetPipelineName(m_VkDevice, vkPipeline, DebugName);
return PipelineWrapper{GetSharedPtr(), std::move(vkPipeline)};
}
stack after stepping into vkCreateGraphicsPipelines
art_sigsegv_fault 0x00000079dadfbf90
art::FaultManager::HandleFault(int, siginfo*, void*) 0x00000079dadfc4b8
art::SignalChain::Handler(int, siginfo*, void*) 0x000000624b37fde8
<unknown> 0x0000007a6256f7c0
<unknown> 0x00000079698897fc
debug variables
cache = {VkPipelineCache | 0x0} NULL
DebugName = {const char * | 0x79d168d130} "Terrain PSO"
*DebugName = {const char} 84 'T'
PipelineCI = {const VkGraphicsPipelineCreateInfo &}
basePipelineHandle = {VkPipeline | 0x0} NULL
basePipelineIndex = {int32_t} -1
flags = {VkPipelineCreateFlags} 1
layout = {VkPipelineLayout | 0x79d1919408} 0x00000079d1919408
pColorBlendState = {const VkPipelineColorBlendStateCreateInfo * | 0x79cabfa750} 0x00000079cabfa750
attachmentCount = {uint32_t} 1
blendConstants = {float [4]} (0, 0, 0, 0)
[0] = {float} 0
[1] = {float} 0
[2] = {float} 0
[3] = {float} 0
flags = {VkPipelineColorBlendStateCreateFlags} 0
logicOp = {VkLogicOp} VK_LOGIC_OP_NO_OP
logicOpEnable = {VkBool32} 0
pAttachments = {const VkPipelineColorBlendAttachmentState * | 0x79cdc044c0} 0x00000079cdc044c0
alphaBlendOp = {VkBlendOp} VK_BLEND_OP_ADD
blendEnable = {VkBool32} 0
colorBlendOp = {VkBlendOp} VK_BLEND_OP_ADD
colorWriteMask = {VkColorComponentFlags} 15
dstAlphaBlendFactor = {VkBlendFactor} VK_BLEND_FACTOR_ZERO
dstColorBlendFactor = {VkBlendFactor} VK_BLEND_FACTOR_ZERO
srcAlphaBlendFactor = {VkBlendFactor} VK_BLEND_FACTOR_ONE
srcColorBlendFactor = {VkBlendFactor} VK_BLEND_FACTOR_ONE
pNext = {const void * | 0x0} NULL
sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_COLOR_BLEND_STATE_CREATE_INFO
pDepthStencilState = {const VkPipelineDepthStencilStateCreateInfo * | 0x79cabfa4e8} 0x00000079cabfa4e8
back = {VkStencilOpState}
compareMask = {uint32_t} 255
compareOp = {VkCompareOp} VK_COMPARE_OP_ALWAYS
depthFailOp = {VkStencilOp} VK_STENCIL_OP_KEEP
failOp = {VkStencilOp} VK_STENCIL_OP_KEEP
passOp = {VkStencilOp} VK_STENCIL_OP_KEEP
reference = {uint32_t} 0
writeMask = {uint32_t} 255
depthBoundsTestEnable = {VkBool32} 0
depthCompareOp = {VkCompareOp} VK_COMPARE_OP_LESS
depthTestEnable = {VkBool32} 1
depthWriteEnable = {VkBool32} 1
flags = {VkPipelineDepthStencilStateCreateFlags} 0
front = {VkStencilOpState}
compareMask = {uint32_t} 255
compareOp = {VkCompareOp} VK_COMPARE_OP_ALWAYS
depthFailOp = {VkStencilOp} VK_STENCIL_OP_KEEP
failOp = {VkStencilOp} VK_STENCIL_OP_KEEP
passOp = {VkStencilOp} VK_STENCIL_OP_KEEP
reference = {uint32_t} 0
writeMask = {uint32_t} 255
maxDepthBounds = {float} 1
minDepthBounds = {float} 0
pNext = {const void * | 0x0} NULL
stencilTestEnable = {VkBool32} 0
sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_DEPTH_STENCIL_STATE_CREATE_INFO
pDynamicState = {const VkPipelineDynamicStateCreateInfo * | 0x79cabfa490} 0x00000079cabfa490
dynamicStateCount = {uint32_t} 3
flags = {VkPipelineDynamicStateCreateFlags} 0
pDynamicStates = {const VkDynamicState * | 0x79d168d360} 0x00000079d168d360
*pDynamicStates = {VkDynamicState} VK_DYNAMIC_STATE_VIEWPORT
pNext = {const void * | 0x0} NULL
sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_DYNAMIC_STATE_CREATE_INFO
pInputAssemblyState = {const VkPipelineInputAssemblyStateCreateInfo * | 0x79cabfa620} 0x00000079cabfa620
flags = {VkPipelineInputAssemblyStateCreateFlags} 0
pNext = {const void * | 0x0} NULL
primitiveRestartEnable = {VkBool32} 0
sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO
topology = {VkPrimitiveTopology} VK_PRIMITIVE_TOPOLOGY_PATCH_LIST
pMultisampleState = {const VkPipelineMultisampleStateCreateInfo * | 0x79cabfa550} 0x00000079cabfa550
alphaToCoverageEnable = {VkBool32} 0
alphaToOneEnable = {VkBool32} 0
flags = {VkPipelineMultisampleStateCreateFlags} 0
minSampleShading = {float} 0
pNext = {const void * | 0x0} NULL
pSampleMask = {const VkSampleMask * | 0x79cabfa790} 0x00000079cabfa790
*pSampleMask = {VkSampleMask} 4294967295
rasterizationSamples = {VkSampleCountFlagBits} VK_SAMPLE_COUNT_1_BIT
sampleShadingEnable = {VkBool32} 0
sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_MULTISAMPLE_STATE_CREATE_INFO
pNext = {const void * | 0x0} NULL
pRasterizationState = {const VkPipelineRasterizationStateCreateInfo * | 0x79cabfa580} 0x00000079cabfa580
cullMode = {VkCullModeFlags} 2
depthBiasClamp = {float} 0
depthBiasConstantFactor = {float} 0
depthBiasEnable = {VkBool32} 0
depthBiasSlopeFactor = {float} 0
depthClampEnable = {VkBool32} 0
flags = {VkPipelineRasterizationStateCreateFlags} 0
frontFace = {VkFrontFace} VK_FRONT_FACE_CLOCKWISE
lineWidth = {float} 1
pNext = {const void * | 0x0} NULL
polygonMode = {VkPolygonMode} VK_POLYGON_MODE_FILL
rasterizerDiscardEnable = {VkBool32} 0
sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_RASTERIZATION_STATE_CREATE_INFO
pStages = {const VkPipelineShaderStageCreateInfo * | 0x79cdca2c00} 0x00000079cdca2c00
flags = {VkPipelineShaderStageCreateFlags} 0
module = {VkShaderModule | 0x79d13c4fc0} 0x00000079d13c4fc0
pName = {const char * | 0x79d1846049} "TerrainVS"
*pName = {const char} 84 'T'
pNext = {const void * | 0x0} NULL
pSpecializationInfo = {const VkSpecializationInfo * | 0x0} NULL
stage = {VkShaderStageFlagBits} VK_SHADER_STAGE_VERTEX_BIT
sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_SHADER_STAGE_CREATE_INFO
pTessellationState = {const VkPipelineTessellationStateCreateInfo * | 0x79cabfa608} 0x00000079cabfa608
flags = {VkPipelineTessellationStateCreateFlags} 0
patchControlPoints = {uint32_t} 1
pNext = {const void * | 0x0} NULL
sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_TESSELLATION_STATE_CREATE_INFO
pVertexInputState = {const VkPipelineVertexInputStateCreateInfo * | 0x79cabfa680} 0x00000079cabfa680
flags = {VkPipelineVertexInputStateCreateFlags} 0
pNext = {const void * | 0x0} NULL
pVertexAttributeDescriptions = {const VkVertexInputAttributeDescription * | 0x79cabfa818} 0x00000079cabfa818
binding = {uint32_t} 121
format = {VkFormat} 3401558096
location = {uint32_t} 3514994840
offset = {uint32_t} 121
pVertexBindingDescriptions = {const VkVertexInputBindingDescription * | 0x79cabfa918} 0x00000079cabfa918
binding = {uint32_t} 3514994816
inputRate = {VkVertexInputRate} 3401558352
stride = {uint32_t} 121
sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_VERTEX_INPUT_STATE_CREATE_INFO
vertexAttributeDescriptionCount = {uint32_t} 0
vertexBindingDescriptionCount = {uint32_t} 0
pViewportState = {const VkPipelineViewportStateCreateInfo * | 0x79cabfa5d0} 0x00000079cabfa5d0
flags = {VkPipelineViewportStateCreateFlags} 0
pNext = {const void * | 0x0} NULL
pScissors = {const VkRect2D * | 0x79cabfa5c0} 0x00000079cabfa5c0
extent = {VkExtent2D}
height = {uint32_t} 8192
width = {uint32_t} 8192
offset = {VkOffset2D}
x = {int32_t} 0
y = {int32_t} 0
pViewports = {const VkViewport * | 0x0} NULL
scissorCount = {uint32_t} 1
sType = {VkStructureType} VK_STRUCTURE_TYPE_PIPELINE_VIEWPORT_STATE_CREATE_INFO
viewportCount = {uint32_t} 1
renderPass = {VkRenderPass | 0x79d1641e78} 0x00000079d1641e78
stageCount = {uint32_t} 5
sType = {VkStructureType} VK_STRUCTURE_TYPE_GRAPHICS_PIPELINE_CREATE_INFO
subpass = {uint32_t} 0
this = {const VulkanUtilities::VulkanLogicalDevice * | 0x79d2476100} 0x00000079d2476100
m_EnabledExtFeatures = {VulkanUtilities::VulkanLogicalDevice::ExtensionFeatures}
AccelStruct = {VkPhysicalDeviceAccelerationStructureFeaturesKHR}
accelerationStructure = {VkBool32} 0
accelerationStructureCaptureReplay = {VkBool32} 0
accelerationStructureHostCommands = {VkBool32} 0
accelerationStructureIndirectBuild = {VkBool32} 0
descriptorBindingAccelerationStructureUpdateAfterBind = {VkBool32} 0
pNext = {void * | 0x0} NULL
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
BufferDeviceAddress = {VkPhysicalDeviceBufferDeviceAddressFeaturesKHR}
bufferDeviceAddress = {VkBool32} 0
bufferDeviceAddressCaptureReplay = {VkBool32} 0
bufferDeviceAddressMultiDevice = {VkBool32} 0
pNext = {void * | 0x0} NULL
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
DescriptorIndexing = {VkPhysicalDeviceDescriptorIndexingFeaturesEXT}
descriptorBindingPartiallyBound = {VkBool32} 0
descriptorBindingSampledImageUpdateAfterBind = {VkBool32} 0
descriptorBindingStorageBufferUpdateAfterBind = {VkBool32} 0
descriptorBindingStorageImageUpdateAfterBind = {VkBool32} 0
descriptorBindingStorageTexelBufferUpdateAfterBind = {VkBool32} 0
descriptorBindingUniformBufferUpdateAfterBind = {VkBool32} 0
descriptorBindingUniformTexelBufferUpdateAfterBind = {VkBool32} 0
descriptorBindingUpdateUnusedWhilePending = {VkBool32} 0
descriptorBindingVariableDescriptorCount = {VkBool32} 0
pNext = {void * | 0x0} NULL
runtimeDescriptorArray = {VkBool32} 0
shaderInputAttachmentArrayDynamicIndexing = {VkBool32} 0
shaderInputAttachmentArrayNonUniformIndexing = {VkBool32} 0
shaderSampledImageArrayNonUniformIndexing = {VkBool32} 0
shaderStorageBufferArrayNonUniformIndexing = {VkBool32} 0
shaderStorageImageArrayNonUniformIndexing = {VkBool32} 0
shaderStorageTexelBufferArrayDynamicIndexing = {VkBool32} 0
shaderStorageTexelBufferArrayNonUniformIndexing = {VkBool32} 0
shaderUniformBufferArrayNonUniformIndexing = {VkBool32} 0
shaderUniformTexelBufferArrayDynamicIndexing = {VkBool32} 0
shaderUniformTexelBufferArrayNonUniformIndexing = {VkBool32} 0
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
HasPortabilitySubset = {bool} false
MeshShader = {VkPhysicalDeviceMeshShaderFeaturesNV}
meshShader = {VkBool32} 0
pNext = {void * | 0x0} NULL
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
taskShader = {VkBool32} 0
PortabilitySubset = {VkPhysicalDevicePortabilitySubsetFeaturesKHR}
constantAlphaColorBlendFactors = {VkBool32} 0
events = {VkBool32} 0
imageView2DOn3DImage = {VkBool32} 0
imageViewFormatReinterpretation = {VkBool32} 0
imageViewFormatSwizzle = {VkBool32} 0
multisampleArrayImage = {VkBool32} 0
mutableComparisonSamplers = {VkBool32} 0
pNext = {void * | 0x0} NULL
pointPolygons = {VkBool32} 0
samplerMipLodBias = {VkBool32} 0
separateStencilMaskRef = {VkBool32} 0
shaderSampleRateInterpolationFunctions = {VkBool32} 0
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
tessellationIsolines = {VkBool32} 0
tessellationPointMode = {VkBool32} 0
triangleFans = {VkBool32} 0
vertexAttributeAccessBeyondStride = {VkBool32} 0
RayQuery = {VkPhysicalDeviceRayQueryFeaturesKHR}
pNext = {void * | 0x0} NULL
rayQuery = {VkBool32} 0
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
RayTracingPipeline = {VkPhysicalDeviceRayTracingPipelineFeaturesKHR}
pNext = {void * | 0x0} NULL
rayTracingPipeline = {VkBool32} 0
rayTracingPipelineShaderGroupHandleCaptureReplay = {VkBool32} 0
rayTracingPipelineShaderGroupHandleCaptureReplayMixed = {VkBool32} 0
rayTracingPipelineTraceRaysIndirect = {VkBool32} 0
rayTraversalPrimitiveCulling = {VkBool32} 0
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
ShaderFloat16Int8 = {VkPhysicalDeviceShaderFloat16Int8FeaturesKHR}
pNext = {void * | 0x0} NULL
shaderFloat16 = {VkBool32} 0
shaderInt8 = {VkBool32} 0
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
Spirv14 = {bool} false
Spirv15 = {bool} false
Storage8Bit = {VkPhysicalDevice8BitStorageFeaturesKHR}
pNext = {void * | 0x0} NULL
storageBuffer8BitAccess = {VkBool32} 0
storagePushConstant8 = {VkBool32} 0
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
uniformAndStorageBuffer8BitAccess = {VkBool32} 0
Storage16Bit = {VkPhysicalDevice16BitStorageFeaturesKHR}
pNext = {void * | 0x0} NULL
storageBuffer16BitAccess = {VkBool32} 1
storageInputOutput16 = {VkBool32} 1
storagePushConstant16 = {VkBool32} 1
sType = {VkStructureType} VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_16BIT_STORAGE_FEATURES
uniformAndStorageBuffer16BitAccess = {VkBool32} 1
SubgroupOps = {bool} false
TimelineSemaphore = {VkPhysicalDeviceTimelineSemaphoreFeaturesKHR}
pNext = {void * | 0x0} NULL
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
timelineSemaphore = {VkBool32} 0
VertexAttributeDivisor = {VkPhysicalDeviceVertexAttributeDivisorFeaturesEXT}
pNext = {void * | 0x0} NULL
sType = {VkStructureType} VK_STRUCTURE_TYPE_APPLICATION_INFO
vertexAttributeInstanceRateDivisor = {VkBool32} 0
vertexAttributeInstanceRateZeroDivisor = {VkBool32} 0
m_EnabledFeatures = {VkPhysicalDeviceFeatures}
alphaToOne = {VkBool32} 0
depthBiasClamp = {VkBool32} 1
depthBounds = {VkBool32} 0
depthClamp = {VkBool32} 0
drawIndirectFirstInstance = {VkBool32} 1
dualSrcBlend = {VkBool32} 0
fillModeNonSolid = {VkBool32} 0
fragmentStoresAndAtomics = {VkBool32} 1
fullDrawIndexUint32 = {VkBool32} 1
geometryShader = {VkBool32} 1
imageCubeArray = {VkBool32} 1
independentBlend = {VkBool32} 1
largePoints = {VkBool32} 0
logicOp = {VkBool32} 0
multiDrawIndirect = {VkBool32} 0
multiViewport = {VkBool32} 0
occlusionQueryPrecise = {VkBool32} 1
pipelineStatisticsQuery = {VkBool32} 0
robustBufferAccess = {VkBool32} 0
samplerAnisotropy = {VkBool32} 0
sampleRateShading = {VkBool32} 0
shaderClipDistance = {VkBool32} 0
shaderCullDistance = {VkBool32} 0
shaderFloat64 = {VkBool32} 0
shaderImageGatherExtended = {VkBool32} 0
shaderInt16 = {VkBool32} 1
shaderInt64 = {VkBool32} 0
shaderResourceMinLod = {VkBool32} 0
shaderResourceResidency = {VkBool32} 0
shaderSampledImageArrayDynamicIndexing = {VkBool32} 1
shaderStorageBufferArrayDynamicIndexing = {VkBool32} 1
shaderStorageImageArrayDynamicIndexing = {VkBool32} 1
shaderStorageImageExtendedFormats = {VkBool32} 1
shaderStorageImageMultisample = {VkBool32} 0
shaderStorageImageReadWithoutFormat = {VkBool32} 0
shaderStorageImageWriteWithoutFormat = {VkBool32} 1
shaderTessellationAndGeometryPointSize = {VkBool32} 0
shaderUniformBufferArrayDynamicIndexing = {VkBool32} 1
sparseBinding = {VkBool32} 0
sparseResidency2Samples = {VkBool32} 0
sparseResidency4Samples = {VkBool32} 0
sparseResidencyBuffer = {VkBool32} 0
sparseResidencyImage2D = {VkBool32} 0
sparseResidencyImage3D = {VkBool32} 0
tessellationShader = {VkBool32} 1
textureCompressionASTC_LDR = {VkBool32} 0
textureCompressionBC = {VkBool32} 0
textureCompressionETC2 = {VkBool32} 0
vertexPipelineStoresAndAtomics = {VkBool32} 0
wideLines = {VkBool32} 0
m_SupportedStagesMask = {std::__ndk1::vector<unsigned int, std::__ndk1::allocator>} size=1
[0] = {unsigned int} 131071
m_VkAllocator = {const VkAllocationCallbacks *const | 0x0} NULL
m_VkDevice = {VkDevice | 0x79d1597000} 0x00000079d1597000
std::__ndk1::enable_shared_from_this<VulkanUtilities::VulkanLogicalDevice> = {std::__ndk1::enable_shared_from_this<VulkanUtilities::VulkanLogicalDevice>}
__weak_this_ = {std::__ndk1::weak_ptr<VulkanUtilities::VulkanLogicalDevice>} std::__ndk1::weak_ptr<VulkanUtilities::VulkanLogicalDevice>::element_type @ 0x00000079d2476100 strong=83 weak=2
vkPipeline = {VkPipeline | 0x0} NULL
I know, every sample can be compiled on multiple platforms.
But it would be nice to have the samples as .exe files .
Just to try them.
When running tutorial in D3D11 mode, the following message is repeatedly printed:
Diligent Engine: ERROR: Buffer 'Draw constants' has not been transitioned to Constant Buffer state. Call TransitionShaderResources(), use RESOURCE_STATE_TRANSITION_MODE_TRANSITION mode or explicitly transition the buffer to required state.
Host Platfrom -> [Target platform, if different], toolset, configuration
(DiligentGraphics/DiligentCore@697d1fa)configure_cmake.sh
(DiligentGraphics/DiligentCore@1d90af5)
I'm using VS2019 on WIN7 I just built the AtmosphereSample demo but once I start it and select a renderer it crashes, no matter which renderer I choose. it comes up with:
Unhandled exception at 0x000007FED4AF0667 (GraphicsEngineD3D11_64r.dll) in AtmosphereSample.exe: 0xC000001D: Illegal Instruction.
how do I get this fixed?
I have tried (in order):
all the different renderer options except D3D12 (DirectX12),
Rebuilding the solution,
retrying all render options except D3D12,
Running it with admin privs.
It has been reported that Android samples crash in simulator. This needs to be verified.
Running the VRS sample on Pixel 6 phone produces a SIGSEGV.
Make the tutorial run without Async if the device does not support multiple queues.
OS, GPU:
Linux, Nvidia driver 440.82, Nvidia 750
DiligentSamples source and build today.
No changes to Samples.
Debug output:
At the same time, every other "demo" (Khronos Vulkan Samples) keeps working without any problems.
Tutorial03_Texturing - log link, worked only once
Tutorial18_Queries - log link, black screen most of the times
Video proof:
launching Tutorial17_MSAA and msaa from Khronos samples
webm video link
Video proof:
(for some reason OBS lag on recording DiligentSamples, I do not have lags launching it, video lags)
webm video link
watch video, I set all settings to max (2048 textures) then changing Num cascades result crash because of, log:
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': created new device-local page. (128.00 MB, type idx: 7). Current allocated size: 1.06 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': created new device-local page. (128.00 MB, type idx: 7). Current allocated size: 1.19 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': created new device-local page. (128.00 MB, type idx: 7). Current allocated size: 1.31 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': destroying device-local page (64.00 MB). Current allocated size: 1.25 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': destroying device-local page (64.00 MB). Current allocated size: 1.19 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': destroying device-local page (64.00 MB). Current allocated size: 1.12 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': destroying device-local page (128.00 MB). Current allocated size: 1.00 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': created new device-local page. (128.00 MB, type idx: 7). Current allocated size: 1.12 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': created new device-local page. (128.00 MB, type idx: 7). Current allocated size: 1.25 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': created new device-local page. (128.00 MB, type idx: 7). Current allocated size: 1.38 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': destroying device-local page (128.00 MB). Current allocated size: 1.25 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': destroying device-local page (128.00 MB). Current allocated size: 1.12 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': destroying device-local page (128.00 MB). Current allocated size: 1.00 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': created new device-local page. (128.00 MB, type idx: 7). Current allocated size: 1.12 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': created new device-local page. (128.00 MB, type idx: 7). Current allocated size: 1.25 GB
Diligent Engine: Info: VulkanMemoryManager 'Global resource memory manager': created new device-local page. (128.00 MB, type idx: 7). Current allocated size: 1.38 GB
Diligent Engine: ERROR in AllocateDeviceMemory() (VulkanLogicalDevice.cpp, 176): Failed to allocate device memory 'Device memory page. Size: 128.00 MB, type: 7'
VK Error Code: ERROR_OUT_OF_DEVICE_MEMORY
terminate called after throwing an instance of 'std::runtime_error'
what(): Failed to allocate device memory 'Device memory page. Size: 128.00 MB, type: 7'
VK Error Code: ERROR_OUT_OF_DEVICE_MEMORY
This feature is not supported by all Vulkan implementations (Android, Mac) and causes problems.
Add command line options to automatically capture and output performance statistics for samples and tutorials (as discussed in DiligentGraphics/DiligentEngine#100)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.