Author Topic: GPU Caps Viewer 1.43.1.0 vk_phong_lighting2 truncates handles.  (Read 6052 times)

0 Members and 1 Guest are viewing this topic.

Dorian

  • Jr. Member
  • **
  • Posts: 17
GPU Caps Viewer 1.43.1.0 vk_phong_lighting2 truncates handles.
« on: December 05, 2019, 10:54:25 AM »
Hi.

I haven't yet checked other tests, but it looks like vk_phong_lighting2 is zeroing upper 32bits of 64bit shader module handles.
It leads to crash if VK_LAYER_KHRONOS_validation layer from  SDK 1.1.126.0 (latest) is used.

In my case:
driver vkCreateShaderModule returns module 0x000000000b7a7020
layer hashes it to 0x84a6b60000000033
and later CapsViewer calls vkCreateGraphicsPipelines with shader module 0x0000000000000033 (invalid).
Layer tries to hash it back and crashes.

Seems like CapsViewer casts it to 32bit variable.

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2453
    • Geeks3D.com
Re: GPU Caps Viewer 1.43.1.0 vk_phong_lighting2 truncates handles.
« Reply #1 on: December 05, 2019, 07:28:59 PM »
Thanks!
32-bit apps should die!
I will look at this issue as soon as possible.
Does the same demo work correctly with GeeXLab 64-bit?

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2453
    • Geeks3D.com
Re: GPU Caps Viewer 1.43.1.0 vk_phong_lighting2 truncates handles.
« Reply #2 on: December 05, 2019, 09:01:29 PM »
I found and fixed the bug. Indeed it's stupid cast that was behind the crash: the VkShaderModule was cast in a 32-bit pointer in the 32-bit version of GeeXLab and I had little chance to catch that bug because I develop GeeXLab in 64-bit. The 32-bit pointer is now an uint64_t.  If you're interested, I can also release a 32-bit version of GeeXLab with core functionalities and the Vulkan plugin. I will try to release it tomorrow.  Thanks for your help Dorian  ;)

Dorian

  • Jr. Member
  • **
  • Posts: 17
Re: GPU Caps Viewer 1.43.1.0 vk_phong_lighting2 truncates handles.
« Reply #3 on: December 06, 2019, 03:20:27 PM »
Thank you JeGX for quick fix.
Now validation layers are not crashing in GeeXLab_0.29.8.1_FREE_win32.

JeGX

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2453
    • Geeks3D.com
Re: GPU Caps Viewer 1.43.1.0 vk_phong_lighting2 truncates handles.
« Reply #4 on: December 06, 2019, 04:00:07 PM »
Cool, now GPU Caps Viewer can be updated...