You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
This issue seems related to frame buffers not following nicely the window size.
Starting in Vulkan (with Debug) crashes with:
../../../src/renderer_vk.cpp (683): BGFX ---E- RenderPass, Validation, 0: Validation Error: [ VUID-VkRenderPassBeginInfo-pNext-02852 ] Object 0: handle = 0xd10d270000000018, type = VK_OBJECT_TYPE_RENDER_PASS; Object 1: handle = 0x27d60e0000000019, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0xdb2c5767 | vkCmdBeginRenderPass(): pRenderPassBegin->renderArea offset.x (0) + extent.width (1280) is greater than framebuffer width (621). The Vulkan spec states: If the pNext chain does not contain VkDeviceGroupRenderPassBeginInfo or its deviceRenderAreaCount member is equal to 0, renderArea.offset.x + renderArea.extent.width must be less than or equal to VkFramebufferCreateInfo::width the framebuffer was created with (https://vulkan.lunarg.com/doc/view/1.3.280.0/linux/1.3-extensions/vkspec.html#VUID-VkRenderPassBeginInfo-pNext-02852)
../../../src/renderer_vk.cpp (683): BGFX ---E- RenderPass, Validation, 0: Validation Error: [ VUID-VkRenderPassBeginInfo-pNext-02852 ] Object 0: handle = 0xd10d270000000018, type = VK_OBJECT_TYPE_RENDER_PASS; Object 1: handle = 0x27d60e0000000019, type = VK_OBJECT_TYPE_FRAMEBUFFER; | MessageID = 0xdb2c5767 | vkCmdBeginRenderPass(): pRenderPassBegin->renderArea offset.x (0) + extent.width (1280) is greater than framebuffer width (621). The Vulkan spec states: If the pNext chain does not contain VkDeviceGroupRenderPassBeginInfo or its deviceRenderAreaCount member is equal to 0, renderArea.offset.x + renderArea.extent.width must be less than or equal to VkFramebufferCreateInfo::width the framebuffer was created with (https://vulkan.lunarg.com/doc/view/1.3.280.0/linux/1.3-extensions/vkspec.html#VUID-VkRenderPassBeginInfo-pNext-02852)
vkObject(0): ALLOC 0x14e0e4b0 of 424 byte(s)
vkObject(0): ALLOC 0x14e0fe20 of 2552 byte(s)
../../../src/bgfx.cpp(57): ALLOC 0x14e0fdf0 of 32 byte(s)
../../../src/renderer_vk.cpp(3766): ALLOC 0x14e20d20 of 15166 byte(s)
../../../src/renderer_vk.cpp(583): FREE 0x14e0e4b0
../../../src/renderer_vk.cpp(3778): FREE 0x14e20d20
vkCommand(0): ALLOC 0x14d52250 of 24 byte(s)
../../../src/renderer_vk.cpp(583): FREE 0x14d52250
../../../src/renderer_vk.cpp(7969): ASSERT VK_SUCCESS == vkresult -> vkWaitForFences(device, 1, &m_completedFence, 1U, (18446744073709551615UL)); VK error 0xfffffffc: VK_ERROR_DEVICE_LOST
Fatal error: 0x00000000: vkWaitForFences(device, 1, &m_completedFence, 1U, (18446744073709551615UL)); VK error 0xfffffffc: VK_ERROR_DEVICE_LOSTzsh: IOT instruction (core dumped) ../../.build/linux64_gcc/bin/example-07-callbackDebug
Notice that the validation mechanism is complaining about unmatched resolutions.
Starting in OpenGL works for a bit, but you can see that the resolution is wrong:
After about 5, the resolution adjusts and I see (note that the updated resolution happened together with the printing of the line I marked in the yellow rectangle):
Afterwards quitting the example app crashes it with segfault:
Looking at the code, it seems that this 5 seconds is not random:
I believe the problem to be originating from the fact that the app is not processing events, and therefore not seeing the correct frame size yet. I suspect most people never see this issue, as the app probably gets initialized with the correct resolution and then does 5 seconds of not listening to events, but as I'm using a tiling window manager, the app doesn't get to choose it's resolution at startup. Vulkan says:
pRenderPassBegin->renderArea offset.x (0) + extent.width (1280) is greater than framebuffer width (621). The Vulkan spec states: If the pNext chain does not contain VkDeviceGroupRenderPassBeginInfo or its deviceRenderAreaCount member is equal to 0, renderArea.offset.x + renderArea.extent.width must be less than or equal to VkFramebufferCreateInfo::width the framebuffer was created with (https://vulkan.lunarg.com/doc/view/1.3.280.0/linux/1.3-extensions/vkspec.html#VUID-VkRenderPassBeginInfo-pNext-02852)
You can tell that OpenGL just ignores the window size and just does its thing regarding the first 5 seconds. Vulkan crashes badly with a device lost error.
Looking at the recording with OpenGL, I see:
So, it's like the backbuffer actually has the full resolution, but is just not rendered too completely.
The text was updated successfully, but these errors were encountered:
mcourteaux
changed the title
example-07-callback does not work well with a tiling wm.
[vulkan] example-07-callback does not work well with a tiling wm.
Jun 5, 2024
Describe the bug
This issue seems related to frame buffers not following nicely the window size.
Starting in Vulkan (with Debug) crashes with:
Notice that the validation mechanism is complaining about unmatched resolutions.
Starting in OpenGL works for a bit, but you can see that the resolution is wrong:
After about 5, the resolution adjusts and I see (note that the updated resolution happened together with the printing of the line I marked in the yellow rectangle):
Afterwards quitting the example app crashes it with segfault:
Looking at the code, it seems that this 5 seconds is not random:
bgfx/examples/07-callback/callback.cpp
Lines 391 to 419 in 530a558
I believe the problem to be originating from the fact that the app is not processing events, and therefore not seeing the correct frame size yet. I suspect most people never see this issue, as the app probably gets initialized with the correct resolution and then does 5 seconds of not listening to events, but as I'm using a tiling window manager, the app doesn't get to choose it's resolution at startup. Vulkan says:
You can tell that OpenGL just ignores the window size and just does its thing regarding the first 5 seconds. Vulkan crashes badly with a device lost error.
Looking at the recording with OpenGL, I see:
So, it's like the backbuffer actually has the full resolution, but is just not rendered too completely.
The text was updated successfully, but these errors were encountered: