Closed xrombik closed 5 years ago
do you have VULKAN_SDK set in your environment variable?
I think VULKAN_SDK
is not set:
$ echo "'$VULKAN_SDK'"
''
$ export | grep VULKAN
$
But in any way i do not know what exactly it have to be.
You need to have the Vulkan SDK installed. You can do this either by downloading a package or tarball from LunarG or by using your package manager.
I just tested with Ubuntu 19.04 and I was able to get a build (without downloading anything from LunarG) after I'd installed the following packages:
libvulkan-dev
glslang-tools
glslang-dev
spirv-tools
I don't know if your mint distribution provides these packages or not, so your mileage may vary.
I've also updated the code a bit to account for some changes in the C++ API and fix some compiler issues I encountered with recent GCC versions while testing on Ubuntu.
libvulkan-dev
already installed. But this is not a Vulkan SDK, imho? I'm install a Vulkan SDK, with Vulkan developers provided script:
wget -qO - http://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-1.1.106-bionic.list http://packages.lunarg.com/vulkan/1.1.106/lunarg-vulkan-1.1.106-bionic.list
sudo apt update
sudo apt install vulkan-sdk
Then run cmake and make, and everything is fine. But accured another problem while i'm run example:
$ ./bloom
ERROR: [Loader Message] Code 0 : setupLoaderTermPhysDevs: Failed to detect any valid GPUs in the current config
ERROR: [Loader Message] Code 0 : setupLoaderTrampPhysDevs: Failed during dispatch call of 'vkEnumeratePhysicalDevices' to lower layers or loader to get count.
terminate called after throwing an instance of 'vk::InitializationFailedError'
what(): vk::Instance::enumeratePhysicalDevices: ErrorInitializationFailed
Аварийный останов (стек памяти сброшен на диск)
It seems to be a hardware/driver related problem. My Radeon R9 270 run games with Vulkan very well on Windows, but i do not know is there any problem with Linux and Vulkan for Radeon R270.
In any way i think this issue is closed. Thank you for your help.
In this time i'm do some search to resolve this problem: https://forums.linuxmint.com/viewtopic.php?t=272283
OK. This was helpful. But this time any exmple shows this error:
WARNING: radv is not a conformant vulkan implementation, testing use only.
WARNING: radv is not a conformant vulkan implementation, testing use only.
ERROR: [Validation] Code 0 : [ VUID-VkFramebufferCreateInfo-pAttachments-00880 ] Object: 0x12 (Type = 18) | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 has format of VK_FORMAT_B8G8R8A8_SRGB that does not match the format of VK_FORMAT_B8G8R8A8_UNORM used by the corresponding attachment for renderPass (0x12). The Vulkan spec states: Each element of pAttachments must have been created with an VkFormat value that matches the VkFormat specified by the corresponding VkAttachmentDescription in renderPass (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkFramebufferCreateInfo-pAttachments-00880)
ERROR: [Validation] Code 0 : [ VUID-VkFramebufferCreateInfo-pAttachments-00880 ] Object: 0x12 (Type = 18) | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 has format of VK_FORMAT_B8G8R8A8_SRGB that does not match the format of VK_FORMAT_B8G8R8A8_UNORM used by the corresponding attachment for renderPass (0x12). The Vulkan spec states: Each element of pAttachments must have been created with an VkFormat value that matches the VkFormat specified by the corresponding VkAttachmentDescription in renderPass (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkFramebufferCreateInfo-pAttachments-00880)
ERROR: [Validation] Code 0 : [ VUID-VkFramebufferCreateInfo-pAttachments-00880 ] Object: 0x12 (Type = 18) | vkCreateFramebuffer(): VkFramebufferCreateInfo attachment #0 has format of VK_FORMAT_B8G8R8A8_SRGB that does not match the format of VK_FORMAT_B8G8R8A8_UNORM used by the corresponding attachment for renderPass (0x12). The Vulkan spec states: Each element of pAttachments must have been created with an VkFormat value that matches the VkFormat specified by the corresponding VkAttachmentDescription in renderPass (https://www.khronos.org/registry/vulkan/specs/1.1-extensions/html/vkspec.html#VUID-VkFramebufferCreateInfo-pAttachments-00880)
ERROR: [Validation] Code 0 : [ VUID_Undefined ] Object: VK_NULL_HANDLE (Type = 0) | vkCreateShaderModule: parameter pCreateInfo->codeSize must be greater than 0.
ERROR: [Validation] Code 0 : [ UNASSIGNED-CoreValidation-Shader-InconsistentSpirv ] Object: VK_NULL_HANDLE (Type = 0) | SPIR-V module not valid: Invalid SPIR-V magic number.
Ошибка сегментирования (стек памяти сброшен на диск)
SEGFAULT.
example named context
, show this output:
$ ./context
WARNING: radv is not a conformant vulkan implementation, testing use only.
WARNING: radv is not a conformant vulkan implementation, testing use only.
Vulkan Context Created
API Version: 1.1.107
Driver Version: 19.1.99
Device Name: AMD RADV PITCAIRN (LLVM 8.0.0)
Device Type: DiscreteGpu
Memory Heaps: 3
Heap 0 flags { DeviceLocal } size 1 GB
Heap 1 flags { DeviceLocal } size 256 MB
Heap 2 flags {} size 3 GB
Memory Types: 4
Type 0 flags { DeviceLocal } heap 0
Type 1 flags { HostVisible | HostCoherent } heap 2
Type 2 flags { DeviceLocal | HostVisible | HostCoherent } heap 1
Type 3 flags { HostVisible | HostCoherent | HostCached } heap 2
Queues:
Queue Family: 0
Queue Family Flags: { Graphics | Compute | Transfer | SparseBinding }
Queue Count: 1
Queue Family: 1
Queue Family Flags: { Compute | Transfer | SparseBinding }
Queue Count: 2
Press enter to exit
vulkaninfo
utility show attached output
attachment: vulkaninfo.txt
Build failed with this output:
Try on platform:
Dev packages:
Clang version:
gcc Version:
CMake version: 3.10.2