Bug 107971 - SPV_GOOGLE_hlsl_functionality1 / SPV_GOOGLE_decorate_string
Summary: SPV_GOOGLE_hlsl_functionality1 / SPV_GOOGLE_decorate_string
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Vulkan/Common (show other bugs)
Version: git
Hardware: Other All
: medium enhancement
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-09-18 08:46 UTC by xbx
Modified: 2018-12-07 13:33 UTC (History)
4 users (show)

See Also:
i915 platform:
i915 features:


Attachments
example spirv from dxc.exe (4.03 KB, text/plain)
2018-09-18 08:46 UTC, xbx
Details

Description xbx 2018-09-18 08:46:02 UTC
Created attachment 141626 [details]
example spirv from dxc.exe

hi,

Trying to use the "dxc" compiler to compile hlsl -> spirv and enabling additional reflection decorations produces a spirv binary that is rejected by mesa.


Seems to me it's because decorations of type "OpDecorateStringGOOGLE" "OpMemberDecorateStringGOOGLE" appear in the header and cause vtn_handle_preamble_instruction() to move on to the next section prematurely.
(if I understand correctly they should just be skipped?)
Comment 1 Bas Nieuwenhuizen 2018-09-18 08:56:16 UTC
Is there any extension for supporting these in vulkan? Only Google extensions I can find in the Vulkan spec are VK_GOOGLE_display_timing and VK_ANDROID_external_memory_android_hardware_buffer.
Comment 2 xbx 2018-09-18 09:47:52 UTC
I don't know. I don't think so.

It's only an spv extentension to add some additional reflection info to help with porting from hlsl.

https://github.com/KhronosGroup/SPIRV-Registry/blob/master/extensions/GOOGLE/SPV_GOOGLE_hlsl_functionality1.asciidoc
Comment 3 Jason Ekstrand 2018-10-13 13:53:49 UTC
Patches are on the list.  Mind giving them a try?

https://patchwork.freedesktop.org/series/50971/
Comment 4 xbx 2018-10-15 21:10:31 UTC
thanks.

the patches work fine.
Comment 5 Jason Ekstrand 2018-10-15 21:13:58 UTC
If you want to give me a "Tested-by" tag, I'll happily add it to the patch before pushing.
Comment 6 Emil Velikov 2018-12-07 13:33:01 UTC
Should be resolved with the following commit. Feel free to reopen otherwise.

commit ca4e465f7d018f8702ddb5332bf1c892b1808366
Author: Jason Ekstrand <jason.ekstrand@intel.com>
Date:   Sat Oct 13 08:46:20 2018 -0500

    anv,radv: Trivially expose two new VK_GOOGLE extensions


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.