andrejnau / flycube Goto Github PK
View Code? Open in Web Editor NEWGraphics API wrapper is written in C++ on top of DirectX 12, Vulkan and Metal. Provides main features including ray tracing.
License: MIT License
Graphics API wrapper is written in C++ on top of DirectX 12, Vulkan and Metal. Provides main features including ray tracing.
License: MIT License
There's a crash with the following log:
Exception thrown at 0x00007FF8E3BA4B89 in SponzaPbr.exe: Microsoft C++ exception: _com_error at memory location 0x0000001DCE2F4C68.
DXGI ERROR: IDXGIFactory::CreateSwapChain: Only one flip model swap chain can be associate with an HWND, IWindow, or composition surface at a time. ClearState() and Flush() may need to be called on the D3D11 device context to trigger deferred destruction of old swapchains. [ MISCELLANEOUS ERROR #297: ]
Exception thrown at 0x00007FF8E3BA4B89 in SponzaPbr.exe: Microsoft C++ exception: _com_error at memory location 0x0000001DCE2F4CE0.
HRESULT failed in "F:\\SponzaPbr\\3rdparty\\FlyCube\\src\\Core\\Swapchain\\DXSwapchain.cpp" @ 28
--> hr = 0x80070005
Or more universal api like dx12 ExecuteIndirect .
:)
Simple shader
struct VS_INPUT
{
float3 pos : POSITION;
float3 col : COLOR;
uint instanceID : SV_InstanceID;
};
struct VS_OUTPUT
{
float4 pos: SV_POSITION;
float3 col : COLOR;
};
VS_OUTPUT mainVS(VS_INPUT input)
{
VS_OUTPUT output;
output.pos = float4(input.pos, 1.0f);
output.col = input.col;
return output;
}
Hi, this library is very cool !
After using it, I have some suggestions:
I'm not sure if this is a big deal as the sample still works but there are a bunch of vulkan validation errors when starting the Triangle sample:
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca6a9fa678, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x67c11f000000001a, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdBindPipeline() to VkCommandBuffer 0x1ca6a9fa678[] that is invalid because bound VkFramebuffer 0x67c11f000000001a[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca6a9fa678, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x892cdd0000000018, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdBindPipeline() to VkCommandBuffer 0x1ca6a9fa678[] that is invalid because bound VkImageView 0x892cdd0000000018[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca6a9fa678, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x67c11f000000001a, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdBindDescriptorSets() to VkCommandBuffer 0x1ca6a9fa678[] that is invalid because bound VkFramebuffer 0x67c11f000000001a[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca6a9fa678, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x892cdd0000000018, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdBindDescriptorSets() to VkCommandBuffer 0x1ca6a9fa678[] that is invalid because bound VkImageView 0x892cdd0000000018[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca6a9fa678, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x67c11f000000001a, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdDrawIndexed() to VkCommandBuffer 0x1ca6a9fa678[] that is invalid because bound VkFramebuffer 0x67c11f000000001a[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca6a9fa678, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x892cdd0000000018, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdDrawIndexed() to VkCommandBuffer 0x1ca6a9fa678[] that is invalid because bound VkImageView 0x892cdd0000000018[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca6a9fa678, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x67c11f000000001a, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdEndRenderPass() to VkCommandBuffer 0x1ca6a9fa678[] that is invalid because bound VkFramebuffer 0x67c11f000000001a[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca6a9fa678, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x892cdd0000000018, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdEndRenderPass() to VkCommandBuffer 0x1ca6a9fa678[] that is invalid because bound VkImageView 0x892cdd0000000018[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca73bd66a8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x203fc60000000023, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdBindPipeline() to VkCommandBuffer 0x1ca73bd66a8[] that is invalid because bound VkFramebuffer 0x203fc60000000023[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca73bd66a8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xf89e70000000022, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdBindPipeline() to VkCommandBuffer 0x1ca73bd66a8[] that is invalid because bound VkImageView 0xf89e70000000022[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca73bd66a8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x203fc60000000023, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdBindDescriptorSets() to VkCommandBuffer 0x1ca73bd66a8[] that is invalid because bound VkFramebuffer 0x203fc60000000023[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca73bd66a8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xf89e70000000022, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdBindDescriptorSets() to VkCommandBuffer 0x1ca73bd66a8[] that is invalid because bound VkImageView 0xf89e70000000022[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca73bd66a8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x203fc60000000023, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdDrawIndexed() to VkCommandBuffer 0x1ca73bd66a8[] that is invalid because bound VkFramebuffer 0x203fc60000000023[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca73bd66a8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xf89e70000000022, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdDrawIndexed() to VkCommandBuffer 0x1ca73bd66a8[] that is invalid because bound VkImageView 0xf89e70000000022[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca73bd66a8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x203fc60000000023, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdEndRenderPass() to VkCommandBuffer 0x1ca73bd66a8[] that is invalid because bound VkFramebuffer 0x203fc60000000023[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca73bd66a8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xf89e70000000022, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdEndRenderPass() to VkCommandBuffer 0x1ca73bd66a8[] that is invalid because bound VkImageView 0xf89e70000000022[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca73b51d08, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x8483000000000025, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdBindPipeline() to VkCommandBuffer 0x1ca73b51d08[] that is invalid because bound VkFramebuffer 0x8483000000000025[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca73b51d08, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x73cd210000000024, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdBindPipeline() to VkCommandBuffer 0x1ca73b51d08[] that is invalid because bound VkImageView 0x73cd210000000024[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca73b51d08, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x8483000000000025, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdBindDescriptorSets() to VkCommandBuffer 0x1ca73b51d08[] that is invalid because bound VkFramebuffer 0x8483000000000025[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca73b51d08, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x73cd210000000024, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdBindDescriptorSets() to VkCommandBuffer 0x1ca73b51d08[] that is invalid because bound VkImageView 0x73cd210000000024[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca73b51d08, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x8483000000000025, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdDrawIndexed() to VkCommandBuffer 0x1ca73b51d08[] that is invalid because bound VkFramebuffer 0x8483000000000025[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca73b51d08, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x73cd210000000024, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdDrawIndexed() to VkCommandBuffer 0x1ca73b51d08[] that is invalid because bound VkImageView 0x73cd210000000024[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca73b51d08, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x8483000000000025, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkCmdEndRenderPass() to VkCommandBuffer 0x1ca73b51d08[] that is invalid because bound VkFramebuffer 0x8483000000000025[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca73b51d08, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x73cd210000000024, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkCmdEndRenderPass() to VkCommandBuffer 0x1ca73b51d08[] that is invalid because bound VkImageView 0x73cd210000000024[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca6a9fa678, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x67c11f000000001a, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkEndCommandBuffer() to VkCommandBuffer 0x1ca6a9fa678[] that is invalid because bound VkFramebuffer 0x67c11f000000001a[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca6a9fa678, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x892cdd0000000018, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkEndCommandBuffer() to VkCommandBuffer 0x1ca6a9fa678[] that is invalid because bound VkImageView 0x892cdd0000000018[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca73bd66a8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x203fc60000000023, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkEndCommandBuffer() to VkCommandBuffer 0x1ca73bd66a8[] that is invalid because bound VkFramebuffer 0x203fc60000000023[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca73bd66a8, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0xf89e70000000022, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkEndCommandBuffer() to VkCommandBuffer 0x1ca73bd66a8[] that is invalid because bound VkImageView 0xf89e70000000022[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkFramebuffer ] Object 0: handle = 0x1ca73b51d08, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x8483000000000025, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0x47172512 | You are adding vkEndCommandBuffer() to VkCommandBuffer 0x1ca73b51d08[] that is invalid because bound VkFramebuffer 0x8483000000000025[] was destroyed.
Validation Error Validation Error: [ UNASSIGNED-CoreValidation-DrawState-InvalidCommandBuffer-VkImageView ] Object 0: handle = 0x1ca73b51d08, type = VK_OBJECT_TYPE_COMMAND_BUFFER; Object 1: handle = 0x73cd210000000024, type = VK_OBJECT_TYPE_IMAGE_VIEW; | MessageID = 0x7bb837f8 | You are adding vkEndCommandBuffer() to VkCommandBuffer 0x1ca73b51d08[] that is invalid because bound VkImageView 0x73cd210000000024[] was destroyed.
Have you thought about a fix for this yet?
https://github.com/andrejnau/FlyCube/blob/master/src/Render/ObjectCache/ObjectCache.cpp#L116
Hi! I love what you're doing,
One thing I've noticed is that, I can't seem to disable vulkan support, from a higher-level cmake project. At the moment, the way it's defined, I am not sure it's possible. It's written as:
set(VULKAN_SUPPORT ON)
However, it might be worthwhile changing it to
option(VULKAN_SUPPORT "Vulkan Support" ON)
This would be similar to how GLFW exposes their BUILD_EXAMPLES variable, and how you are able to disable examples being built from your cmake/3rdparty/glfw cmake file.
Thanks! :)
David
Is there an API like DrawIndexedIndirect or ExecuteIndirect ?
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.