nicebyte / nicegraf Goto Github PK
View Code? Open in Web Editor NEWAn abstraction layer for graphics APIs.
An abstraction layer for graphics APIs.
currently _ngf_tmp_store
resides in the vulkan backend, but it is needed in other backends as well.
I'm trying to compile nicegraf-samples. After it builds nicegraf-shaderc, the process segfaults generating the shaders in the /artifacts folder. The segfault is in DxcCreateInstance, which is called from dxc_wrapper.cpp.
I just compiled dxc from source and copied libdxcompiler.so to nicegraf-shaderc's path. That shuts up the error about not loading libdxcompiler, but maybe it's causing this issue too? I'm on Linux Mint 20.
Program received signal SIGSEGV, Segmentation fault.
0x00007ffff61f37d3 in int DoBasicQueryInterface<IDxcUtils, DxcUtils>(DxcUtils*, GUID const&, void**) () fr
om /home/sean/projects/nicegraf-samples/nicegraf-shaderc/libdxcompiler.so
(gdb) where
#0 0x00007ffff61f37d3 in int DoBasicQueryInterface<IDxcUtils, DxcUtils>(DxcUtils*, GUID const&, void**) (
) from /home/sean/projects/nicegraf-samples/nicegraf-shaderc/libdxcompiler.so
#1 0x00007ffff61f437a in CreateDxcUtils(GUID const&, void**) () from /home/sean/projects/nicegraf-samples
/nicegraf-shaderc/libdxcompiler.so
#2 0x00007ffff61ee5cb in DxcCreateInstance () from /home/sean/projects/nicegraf-samples/nicegraf-shaderc/
libdxcompiler.so
#3 0x0000555555706290 in dxc_wrapper::<lambda(auto:22)>::operator()<IDxcLibrary**>(IDxcLibrary **) const
(__closure=0x7fffffffc560, ptr=0x7fffffffc5b8) at /home/sean/projects/nicegraf-samples/nicegraf-shaderc/dx
c_wrapper.cpp:86
#4 0x00005555557062c6 in dxc_wrapper::com_ptr<IDxcLibrary>::com_ptr<dxc_wrapper::dxc_wrapper(const string
&, const std::vector<std::__cxx11::basic_string<char> >&, const string&)::<lambda(auto:22)> >(dxc_wrapper:
:<lambda(auto:22)>) (this=0x7fffffffc5b8, create_fn=...) at /home/sean/projects/nicegraf-samples/nicegraf-
shaderc/dxc_wrapper.h:60
#5 0x00005555557058ac in dxc_wrapper::dxc_wrapper (this=0x7fffffffcac0, sm="6_2", dxc_params=std::vector
of length 3, capacity 4 = {...}, exe_dir="/home/sean/projects/nicegraf-samples/nicegraf-shaderc") at /home
/sean/projects/nicegraf-samples/nicegraf-shaderc/dxc_wrapper.cpp:85
#6 0x000055555570c38a in main (argc=4, argv=0x7fffffffdf68) at /home/sean/projects/nicegraf-samples/niceg
raf-shaderc/nicegraf_shaderc.cpp:220
(gdb) f 0
#0 0x00007ffff61f37d3 in int DoBasicQueryInterface<IDxcUtils, DxcUtils>(DxcUtils*, GUID const&, void**) (
) from /home/sean/projects/nicegraf-samples/nicegraf-shaderc/libdxcompiler.so
(gdb) f 6
#6 0x000055555570c38a in main (argc=4, argv=0x7fffffffdf68) at /home/sean/projects/nicegraf-samples/niceg
raf-shaderc/nicegraf_shaderc.cpp:220
220 dxc_wrapper dxcompiler(shader_model, dxc_options, exe_dir);
way to repro:
vk implementation buffers bind ops internally until draw. need to clean up binds that end up never being used.
viewport, scissor, blend constants, stencil masks and stencil reference value should be controlled through command buffer only
produce documentation in a tutorial format demonstrating:
currently ngf_destroy_image
calls vkDestroyImage
/vkDestroyImageView
directly
the following validation error pops up consistently:
Images passed to present must be in layout VK_IMAGE_LAYOUT_PRESENT_SRC_KHR or VK_IMAGE_LAYOUT_SHARED_PRESENT_KHR but is in VK_IMAGE_LAYOUT_UNDEFINED. The Vulkan spec states: Each element of pImageIndices must be the index of a presentable image acquired from the swapchain specified by the corresponding element of the pSwapchains array, and the presented image subresource must be in the VK_IMAGE_LAYOUT_PRESENT_SRC_KHR layout at the time the operation is executed on a VkDevice (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkPresentInfoKHR-pImageIndices-01296)
it occurs once or twice on swapchain recreation.
necessary for a test suite
steps to reproduce:
in: https://github.com/nicebyte/nicegraf-samples/blob/master/vol-01/03-hexagon/hexagon.cpp
Create a duplicate pipeline
state->pipeline_test.initialize(pipe_info);
and switch to it after binding vert_buffer:
ngf_cmd_bind_gfx_pipeline(renc, state->pipeline);
ngf_cmd_bind_attrib_buffer(renc, state->vert_buffer, 0u, 0u);
ngf_cmd_bind_gfx_pipeline(renc, state->pipeline_test);
04-hexagon-indexed
triggers the following validation error:
Invalid usage flag for Buffer 0x560f0d6b4a90 used by vkCmdCopyBuffer(). In this case, Buffer should have VK_BUFFER_USAGE_TRANSFER_DST_BIT set during creation. The Vulkan spec states: dstBuffer must have been created with VK_BUFFER_USAGE_TRANSFER_DST_BIT usage flag (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-vkCmdCopyBuffer-dstBuffer-00120)
this appears to be triggered by copying the index buffer data.
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.