Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build errors #1

Open
shujaatak opened this issue Sep 8, 2020 · 2 comments
Open

Build errors #1

shujaatak opened this issue Sep 8, 2020 · 2 comments

Comments

@shujaatak
Copy link

shujaatak commented Sep 8, 2020

I am trying to build 0.0.1 branch of atlas using latest C++17 compatible compiler and vulkan 1.1.126.0 on Ubuntu but I get the following three errors. I can remove the first and third error by removing -Werror flag in the CMakeLists.txt file but I don't know how to get rid of the 2nd error:

/home/shujaat/Desktop/Vulkan/atlas/src/atlas/io/debugimagesource.cpp: In member function ‘atlas::io::Response<atlas::core::Image> atlas::io::DebugImageSource::readRegion(atlas::io::Request<atlas::core::Region>)’:
/home/shujaat/Desktop/Vulkan/atlas/src/atlas/io/debugimagesource.cpp:17:10: error: variable ‘region’ set but not used [-Werror=unused-but-set-variable]
     auto region = request.key();
          ^~~~~~
/home/shujaat/Desktop/Vulkan/atlas/src/atlas/renderer/instance.cpp: In function ‘vk::SurfaceFormatKHR pickSurfaceFormat(const std::vector<vk::SurfaceFormatKHR>&)’:
/home/shujaat/Desktop/Vulkan/atlas/src/atlas/renderer/instance.cpp:211:80: error: could not convert ‘{eB8G8R8A8Unorm, eSrgbNonlinear}’ from ‘<brace-enclosed initializer list>’ to ‘vk::SurfaceFormatKHR’
         return { vk::Format::eB8G8R8A8Unorm, vk::ColorSpaceKHR::eSrgbNonlinear };
                                                                                ^
/home/shujaat/Desktop/Vulkan/atlas/src/atlas/renderer/pipeline.cpp: In member function ‘vk::DescriptorSetLayoutBinding atlas::renderer::Pipeline::getUniform(const spirv_cross::Compiler&, const spirv_cross::Resource&, const vk::ShaderStageFlagBits&)’:
/home/shujaat/Desktop/Vulkan/atlas/src/atlas/renderer/pipeline.cpp:438:10: error: variable ‘pair’ set but not used [-Werror=unused-but-set-variable]
     auto pair = std::pair<uint32_t, uint32_t>(set, bind);

@shujaatak
Copy link
Author

shujaatak commented Sep 8, 2020

Update:
I commented the return statement of the following code which was throwing the second error, I also noted that thisif statementdoesn't get proved true as the printf statement is not executed. So,in my case, commenting the return statement can not be the cause of the crash :

if (availableFormats.size() == 1 && availableFormats[0].format == vk::Format::eUndefined)
{
    printf("Never Reach Here!");
    //return { vk::Format::eB8G8R8A8Unorm, vk::ColorSpaceKHR::eSrgbNonlinear };
}

Now atlas compiles successfully but it crashes at the startup. I run it with --shader-directory /home/shujaat/Desktop/Vulkan/atlas/build/bin/shaders -v:

[2020-09-08 14:03:11.100] [atlas] [info] initialize
[2020-09-08 14:03:11.100] [atlas] [info] shader directory.../home/shujaat/Desktop/Vulkan/atlas/build/bin/shaders
[2020-09-08 14:03:11.173] [atlas] [debug] create window
[2020-09-08 14:03:11.173] [instance] [info] initialize
[2020-09-08 14:03:11.208] [instance] [debug] enabled extensions: 2
[2020-09-08 14:03:11.208] [instance] [debug] 	VK_KHR_surface
[2020-09-08 14:03:11.208] [instance] [debug] 	VK_KHR_xcb_surface
[2020-09-08 14:03:11.208] [instance] [debug] validation layers are disabled
[2020-09-08 14:03:11.213] [instance] [debug] instance created.
[2020-09-08 14:03:11.213] [instance] [debug] surface created
[2020-09-08 14:03:11.219] [instance] [debug] found 1 device(s)
[2020-09-08 14:03:11.219] [instance] [debug] selected device #0 (Intel(R) HD Graphics 5500 (BDW GT2))
[2020-09-08 14:03:11.222] [instance] [debug] create device
[2020-09-08 14:03:11.223] [allocator] [info] initializing
[2020-09-08 14:03:11.223] [pipeline] [debug] shader directory set to /home/shujaat/Desktop/Vulkan/atlas/build/bin/shaders/
[2020-09-08 14:03:11.224] [pipeline] [debug] pipeline 'debug' created successfully
[2020-09-08 14:03:11.228] [scene <main>] [info] initialized
[2020-09-08 14:03:11.229] [pipeline] [debug] pipeline 'terrain' created successfully
[2020-09-08 14:03:11.229] [pipeline] [debug] pipeline 'grid' created successfully
Press <RETURN> to close this window...

@shujaatak
Copy link
Author

Update:
Now when I ran it in Debug mode, I got this (The last error is hinting something useful):

[2020-09-08 14:18:35.454] [atlas] [info] initialize
[2020-09-08 14:18:35.454] [atlas] [info] shader directory.../home/shujaat/Desktop/Vulkan/atlas/build/bin/shaders
[2020-09-08 14:18:35.510] [atlas] [debug] create window
[2020-09-08 14:18:35.510] [instance] [info] initialize
[2020-09-08 14:18:35.548] [instance] [debug] enabled extensions: 3
[2020-09-08 14:18:35.548] [instance] [debug] 	VK_KHR_surface
[2020-09-08 14:18:35.548] [instance] [debug] 	VK_KHR_xcb_surface
[2020-09-08 14:18:35.548] [instance] [debug] 	VK_EXT_debug_report
[2020-09-08 14:18:36.223] [instance] [debug] instance created.
[2020-09-08 14:18:36.225] [instance] [debug] setup debug callback
[2020-09-08 14:18:36.225] [instance] [debug] surface created
[2020-09-08 14:18:36.231] [instance] [debug] found 1 device(s)
[2020-09-08 14:18:36.232] [instance] [debug] selected device #0 (Intel(R) HD Graphics 5500 (BDW GT2))
[2020-09-08 14:18:36.233] [instance] [debug] create device
[2020-09-08 14:18:36.246] [allocator] [info] initializing
[2020-09-08 14:18:36.247] [pipeline] [debug] shader directory set to /home/shujaat/Desktop/Vulkan/atlas/build/bin/shaders/
[2020-09-08 14:18:36.292] [pipeline] [debug] pipeline 'debug' created successfully
[2020-09-08 14:18:36.296] [scene <main>] [info] initialized
[2020-09-08 14:18:36.299] [pipeline] [debug] pipeline 'terrain' created successfully
[2020-09-08 14:18:36.301] [pipeline] [debug] pipeline 'grid' created successfully
[2020-09-08 14:18:36.328] [instance] [error]  [ VUID-VkRenderPassBeginInfo-framebuffer-parameter ] Object: 0x1a000000001a (Type = 24) | Invalid VkFramebuffer Object 0x1a000000001a. The Vulkan spec states: framebuffer must be a valid VkFramebuffer handle (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkRenderPassBeginInfo-framebuffer-parameter)
Press <RETURN> to close this window...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant