English Amiga Board


Go Back   English Amiga Board > Support > support.WinUAE

 
 
Thread Tools
Old 16 March 2018, 13:58   #1
Dr.Venom
Registered User
 
Join Date: Jul 2008
Location: Netherlands
Posts: 485
D3D11 slang shader support through SPIRV-Cross

Hi Toni,

Enjoying WinUAE as always

Question on the shader support in WinUAE.

Retroarch recently implemented shader support for their D3D11 driver through something called SPIRV-Cross. Now the complete repository of their .slang (Vulkan) shaders can be used (without modification as I understand it) with the D3D11 driver.

One of the authors commented the following about the use of SPIRV-Cross:

Quote:
aliaspider commented on 30 Jan

not exactly what you had in mind, but #6204.
the new d3d11 driver didn't have shader support at all so it was a much more exciting target for this.
I was quite impressed by how well spirv-cross works already, most shaders should work, except those that rely on unimplemented features ( like the infinite history option :P ), or the rare cases where spirv-cross fails (I will try to isolate them and open an issue for that soon).
Could this SPIRV-Cross solution potentially be a future path for WinUAE too? It would be amazing if the full repository of slang shaders could be used in WinUAE without alteration.

In case it is of interest here are some relevant links:

Dr.Venom is offline  
Old 16 March 2018, 14:44   #2
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
Yeah, noticed this too. RetroArch converted their big shader package from CG to Vulkan/Slang. Tested it with the D3D11 driver in RetroArch and everythings fine. Probably the way to make this possible for WinUAE.
Retro-Nerd is offline  
Old 16 March 2018, 14:46   #3
Toni Wilen
WinUAE developer
 
Join Date: Aug 2001
Location: Hämeenlinna/Finland
Age: 49
Posts: 26,502
Above links don't really tell anything useful. Except that it is some sort of shader converter. Or something.
Toni Wilen is offline  
Old 16 March 2018, 14:47   #4
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
More useful?

https://github.com/shader-slang/slang
Retro-Nerd is offline  
Old 23 April 2018, 19:32   #5
Retro-Nerd
Missile Command Champion
 
Retro-Nerd's Avatar
 
Join Date: Aug 2005
Location: Germany
Age: 52
Posts: 12,435
I wrote a mail to Daniel De Matteis from Libretro asking for help porting these shaders. Retroarch already loads slang shaders via D3D11 driver without problems as it seems (tested it with CRT Royale). But it seems too much work and he doesn't have the time to provide detailed infos on that matter. Unless we don't get a WinUAE core dll for Retroarch it's a dead horse.

Quote:
none of this is trivial to do or can be done in a reasonable amount of time. Neither do I have the time to provide clean instructions or whatever.

Honestly, I think both projects would be better off if he just started providing a libretro core of WinUAE, then his emulator could run in RetroArch as well as other libretro-compatible frontends and enjoy the features.

Alternatively, you could go through the RetroArch sources manually. But I reiterate, I don't have a surplus of time and it's not really trivial to explain in any way.
edit: small update, but i think it doesn't help anyway.



Quote:
We only have this information here -

https://docs.libretro.com/

there might be a spec of the shader spec there, but it's not the Slang spec.

Anyway, this would be a huge undertaking. It can't really be easily explained either, and there is all sorts of functionality you'd need to implement (multi-pass FBOs, feedback textures, etc.).

Can't really help more than that.
https://docs.libretro.com/specs/shader/

Last edited by Retro-Nerd; 23 April 2018 at 20:02.
Retro-Nerd is offline  
Old 26 April 2018, 15:55   #6
ceztko
Registered User
 
Join Date: Aug 2006
Location: Italy
Posts: 109
Quote:
Originally Posted by Retro-Nerd View Post
This is misleading: what you're referring is a separate project that builds on HLSL language to create a new language, called slang, with additional features compared to stock HLSL. Instead libretro refers to "slang" as glsl shader files (using the extension *.slang). I think here libretro is a bit wrong and should prefer a more common file extension, such as "*.glsl" or others.

SPIRV-Cross instead is the tool to convert between different bytecode representations. So, the pipeline to use libretro shaders on DX11 seems this:
glsl -> SPIRV -> DX bytecode

This is because there's no direct glsl support in DirectX drivers.
ceztko is offline  
 


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Similar Threads
Thread Thread Starter Forum Replies Last Post
Input latency measurements (and D3D11) Dr.Venom support.WinUAE 230 12 June 2018 19:24
Shader support cybermat support.FS-UAE 4 07 March 2018 14:52
D3D11 - what's all the fuss about ? andyhants support.WinUAE 3 23 January 2018 09:57
Shader support and scaling options in FS-UAE 1.3 FrodeSolheim support.FS-UAE 9 18 December 2013 17:30
Please help me with my shader! tjcbs support.WinUAE 3 02 February 2013 21:49

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 09:16.

Top

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Page generated in 0.18843 seconds with 15 queries