Repository: baldurk/renderdoc

Issue #1225: Replay: vkCreateGraphicsPipelines error
Created: 2019-01-04T11:09:27Z
Hello,
I have issue when on capture I see few error logs while replaying any captured sample.
RDOC 004075: [05:32:47]          rdcfile.cpp( 240) - Log     - Opening RDCFile /tmp/RenderDoc/YUVSampler_1970.01.01_05.31_frame2038.rdc
RDOC 004075: [05:32:47]          rdcfile.cpp( 300) - Debug   - Opened capture file for read
RDOC 004075: [05:32:47]        vk_replay.cpp(3688) - Debug   - Creating a VulkanReplay replay device
RDOC 004075: [05:32:47]          amd_rgp.cpp(  75) - Log     - AMD RGP Interop is not enabled
RDOC 004075: [05:32:47]  vk_device_funcs.cpp( 255) - Log     - Enabling VK_EXT_debug_report
RDOC 004075: [05:32:47]        vk_replay.cpp(3769) - Log     - Created device.
RDOC 004075: [05:32:47]  vk_device_funcs.cpp( 748) - Log     - Capture describes physical device 0:
RDOC 004075: [05:32:47]  vk_device_funcs.cpp( 751) - Log     -    - Mali-G51 (ver 219.42 patch 0xfed) - 13b5:70901000
RDOC 004075: [05:32:47]  vk_device_funcs.cpp( 832) - Log     - Mapping during replay to physical device 0:
RDOC 004075: [05:32:47]  vk_device_funcs.cpp( 835) - Log     -    - Mali-G51 (ver 219.42 patch 0xfed) - 13b5:70901000
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1118) - Warning - VK_EXT_transform_feedback_extension not available, mesh output from geometry/tessellation stages will not be available
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1188) - Log     - Capture describes queue family 0:
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1190) - Log     -    - 2 queues available with VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1195) - Log     -      0 timestamp bits (1,1,1) granularity
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1334) - Log     - Remapping to queue family 0:
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1336) - Log     -    - 2 queues available with VK_QUEUE_GRAPHICS_BIT | VK_QUEUE_COMPUTE_BIT | VK_QUEUE_TRANSFER_BIT
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1340) - Log     -      0 timestamp bits (1,1,1) granularity
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1700) - Warning - depthClamp = false, overlays like highlight drawcall won't show depth-clipped pixels.
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1733) - Warning - shaderStorageImageMultisample = false, save/load from 2DMS textures will not be possible
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 0: VK_KHR_swapchain (68)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 1: VK_KHR_incremental_present (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 2: VK_KHR_maintenance1 (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 3: VK_KHR_shader_draw_parameters (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 4: VK_KHR_variable_pointers (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 5: VK_KHR_16bit_storage (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 6: VK_KHR_storage_buffer_storage_class (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 7: VK_KHR_get_memory_requirements2 (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 8: VK_KHR_dedicated_allocation (3)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 9: VK_KHR_external_fence (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 10: VK_KHR_external_fence_fd (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 11: VK_KHR_external_semaphore (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 12: VK_KHR_external_semaphore_fd (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 13: VK_KHR_external_memory (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 14: VK_KHR_external_memory_fd (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 15: VK_EXT_external_memory_dma_buf (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 16: VK_EXT_image_drm_format_modifier (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 17: VK_KHR_maintenance2 (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 18: VK_KHR_image_format_list (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 19: VK_KHR_bind_memory2 (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 20: VK_KHR_sampler_ycbcr_conversion (1)
RDOC 004075: [05:32:47]  vk_device_funcs.cpp(1767) - Log     - Ext 21: VK_KHR_descriptor_update_template (1)
RDOC 004075: [05:32:47]       shader_cache.h( 139) - Debug   - Successfully loaded 44 shaders from shader cache
RDOC 004075: [05:32:47]         vk_debug.cpp( 532) - Debug   - Depth copies Array -> MSAA not supported for sample count 2 on format VK_FORMAT_D16_UNORM
RDOC 004075: [05:32:47]         vk_debug.cpp( 532) - Debug   - Depth copies Array -> MSAA not supported for sample count 16 on format VK_FORMAT_D16_UNORM
RDOC 004075: [05:32:47]         vk_debug.cpp( 493) - Debug   - Depth copies MSAA -> Array not supported for format VK_FORMAT_D16_UNORM_S8_UINT
RDOC 004075: [05:32:47]         vk_debug.cpp( 532) - Debug   - Depth copies Array -> MSAA not supported for sample count 2 on format VK_FORMAT_X8_D24_UNORM_PACK32
RDOC 004075: [05:32:48]         vk_debug.cpp( 532) - Debug   - Depth copies Array -> MSAA not supported for sample count 16 on format VK_FORMAT_X8_D24_UNORM_PACK32
RDOC 004075: [05:32:48]         vk_debug.cpp( 532) - Debug   - Depth copies Array -> MSAA not supported for sample count 2 on format VK_FORMAT_D24_UNORM_S8_UINT
RDOC 004075: [05:32:48]         vk_debug.cpp( 532) - Debug   - Depth copies Array -> MSAA not supported for sample count 16 on format VK_FORMAT_D24_UNORM_S8_UINT
RDOC 004075: [05:32:48]         vk_debug.cpp( 532) - Debug   - Depth copies Array -> MSAA not supported for sample count 2 on format VK_FORMAT_D32_SFLOAT
RDOC 004075: [05:32:48]         vk_debug.cpp( 532) - Debug   - Depth copies Array -> MSAA not supported for sample count 16 on format VK_FORMAT_D32_SFLOAT
RDOC 004075: [05:32:48]         vk_debug.cpp( 493) - Debug   - Depth copies MSAA -> Array not supported for format VK_FORMAT_D32_SFLOAT_S8_UINT
_RDOC 004075: [05:32:49]         vk_debug.cpp( 390) - Error   - Failed creating object m_OutlinePipeline[i] at line 1922, vkr was VK_ERROR_INITIALIZATION_FAILED
RDOC 004075: [05:32:49]         vk_debug.cpp( 390) - Error   - Failed creating object m_QuadResolvePipeline[i] at line 1929, vkr was VK_ERROR_INITIALIZATION_FAILED
RDOC 004075: [05:32:49]         vk_debug.cpp( 390) - Error   - Failed creating object m_OutlinePipeline[i] at line 1922, vkr was VK_ERROR_INITIALIZATION_FAILED
RDOC 004075: [05:32:49]         vk_debug.cpp( 390) - Error   - Failed creating object m_QuadResolvePipeline[i] at line 1929, vkr was VK_ERROR_INITIALIZATION_FAILED
RDOC 004075: [05:32:49]         vk_debug.cpp( 390) - Error   - Failed creating object m_OutlinePipeline[i] at line 1922, vkr was VK_ERROR_INITIALIZATION_FAILED
RDOC 004075: [05:32:49]         vk_debug.cpp( 390) - Error   - Failed creating object m_QuadResolvePipeline[i] at line 1929, vkr was VK_ERROR_INITIALIZATION_FAILED
RDOC 004075: [05:32:49]         vk_debug.cpp( 390) - Error   - Failed creating object Pipeline at line 2019, vkr was VK_ERROR_INITIALIZATION_FAILED
RDOC 004075: [05:32:49]         vk_debug.cpp( 390) - Error   - Failed creating object MSAAPipeline at line 2024, vkr was VK_ERROR_INITIALIZATION_FAILED_

Kindly check the same.
Thank you.

Duplicate issue #1231: Replay: FetchVSOut crash
Created: 2019-01-10T07:15:56Z
Hello,
I have another issue, It looks like fixing #1225
didn't fully fix the issue.
Still have some bindings issues.

 vkUpdateDescriptorSets(VkDevice, uint32_t, const VkWriteDescriptorSet*, uint32_t, const VkCopyDescriptorSet*)
**first_index_src < ds_bindings[binding_src].count**

Thread 6 "renderdoccmd" received signal SIGABRT, Aborted.
[Switching to Thread 0xb377c250 (LWP 21151)]
__GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
58      ../sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) bt
#0  __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:58
#1  0x410ac46c in __GI_abort () at abort.c:89
#2  0xb0bf3dda in stdlib_abort () from /tmp/libmali.so
#3  0xb09b60a6 in cdbgp_quit () from /tmp/libmali.so
#4  0xb0884b78 in vkUpdateDescriptorSets () from /tmp/libmali.so
#5  0xb5e5b18e in WrappedVulkan::vkUpdateDescriptorSets (this=this@entry=
    0xb3413328, device=device@entry=0xb5a14fe8, writeCount=writeCount@entry=0,
    pDescriptorWrites=pDescriptorWrites@entry=0x0, copyCount=<optimized out>,
    copyCount@entry=2, pDescriptorCopies=<optimized out>)
    at /usr/src/debug/renderdoc-1.3/renderdoc/driver/vulkan/wrappers/vk_descriptor_funcs.cpp:905
#6  0xb5bfea02 in VulkanReplay::FetchVSOut (this=this@entry=0xb34133c0,
    eventId=<optimized out>)
    at /usr/src/debug/renderdoc-1.3/renderdoc/driver/vulkan/vk_postvs.cpp:1622
#7  0xb5c0515a in VulkanReplay::InitPostVSBuffers (this=0xb34133c0,
    eventId=<optimized out>)
    at /usr/src/debug/renderdoc-1.3/renderdoc/driver/vulkan/vk_postvs.cpp:3140
#8  0xb61f072c in ReplayProxy::Proxied_InitPostVSBuffers<ReadSerialiser, WriteSerialiser> (this=this@entry=0xaec9f8b8, paramser=..., retser=...,
    eventId=<optimized out>, eventId@entry=0)
    at /usr/src/debug/renderdoc-1.3/renderdoc/core/replay_proxy.cpp:939
#9  0xb61cf03c in ReplayProxy::InitPostVSBuffers (this=0xaec9f8b8, eventId=0)
    at /usr/src/debug/renderdoc-1.3/renderdoc/core/replay_proxy.cpp:947
---Type <return> to continue, or q <return> to quit---
#10 0xb61d0e9c in ReplayProxy::Tick (this=this@entry=0xaec9f8b8,
    type=type@entry=4125)
    at /usr/src/debug/renderdoc-1.3/renderdoc/core/replay_proxy.cpp:2601
#11 0xb61b837a in ActiveRemoteClientThread (
    threadData=threadData@entry=0x13dd30, previewWindow=...)
    at /usr/src/debug/renderdoc-1.3/renderdoc/core/remote_server.cpp:772
#12 0xb61ba078 in RenderDoc::<lambda()>::operator()(void) const (
    __closure=__closure@entry=0xb3420590)
    at /usr/src/debug/renderdoc-1.3/renderdoc/core/remote_server.cpp:974
#13 0xb61ba0f6 in std::_Function_handler<void(), RenderDoc::BecomeRemoteServer(char const*, uint16_t, RENDERDOC_KillCallback, RENDERDOC_PreviewWindowCallback)::<lambda()> >::_M_invoke(const std::_Any_data &) (__functor=...)
    at /usr/lib/gcc/armv7l-tizen-linux-gnueabi/6.2.1/include/c++/functional:1731
#14 0xb629c030 in std::function<void ()>::operator()() const (
    this=this@entry=0xb377bc1c)
    at /usr/lib/gcc/armv7l-tizen-linux-gnueabi/6.2.1/include/c++/functional:2127
#15 0xb64fe30a in Threading::sThreadInit (init=0x13f870)
    at /usr/src/debug/renderdoc-1.3/renderdoc/os/posix/posix_threading.cpp:167
#16 0x411f6148 in start_thread (arg=0xb377c250) at pthread_create.c:335
#17 0x411500b8 in ?? () at ../sysdeps/unix/sysv/linux/arm/clone.S:86
   from /usr/lib/libc.so.6
---Type <return> to continue, or q <return> to quit---
Backtrace stopped: previous frame identical to this frame (corrupt stack?)

Kindly check.
Thank you !

Closing comment (2019-01-10T09:47:01Z): This is not related to #1225, that was an issue with compiling RenderDoc's internal shaders, this is updating descriptor sets with the application's shaders.
Can you provide more repro details so that I can investigate? The callstack only shows the crash happening inside the driver which doesn't point to any problem on RenderDoc's side, so if it is a bug in my code I need more information.
If you can't share an example with me that crashes, please provide as much information as you can such as the exact pipeline & descriptor set layouts and the contents of the bindings. Also enable the validation layers and see if they find any problems with the vkUpdateDescriptorSets call.
One thing to try - you said before you're on Tizen. This should be treated the same as Android, but it's not a supported platform so I don't know if you have RDOC_ANDROID enabled or not. For v1.2 I found that a number of android drivers could not properly implement VkCopyDescriptorSet so I disabled this path on android only. I should probably just remove the path on all platforms as there is little benefit - you could try doing that locally to see if it helps.
As an unrelated side note; it's not a problem here and I guess it is maybe due to a language barrier, but saying "Kindly check." or "Please check." on their own in this context can sound a little rude in english. I'm not bothered, but some could take offense at the phrase.