-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
float16 HLSL support #6
Comments
Forgot I also requested min16int shader support for SPIRV-Cross (KhronosGroup/SPIRV-Cross#491).. in CompilerHLSL::type_to_glsl I modifify to (similar to msl backend):
perhaps you could also add that to your custom branch.. |
If I understand it correctly, What I don't want is to expose VK_AMD_gpu_shader_half_float but internally translate it to min16float as this can result in some ugly bugs (for example 32bit alignment). |
Ok sorry for lag, I already have support for new DXIL working.. I wanted to clean up but anyway I'm lazy too.. |
Updated the spirv-cross dependency to the latest master. Concerning fp16 and the AMD extension: |
Sorry for delay in testing.. |
Ping.. |
Sry, updated again. Should be working now (tried with a fresh clone of the repository). |
Hi,
I asked SPIRV-Cross devs to add FP16 HLSL support output (via min16float which is supported without using SM6.0) and they delivered:
KhronosGroup/SPIRV-Cross@47d94ff
the problem I see is your spirv-cross branch has some commits not upstreamed in SPIRV-Cross so asking if you plan to upstream all your changes and point to a recent enough SPIRV-Cross..
in case not, can you update your branch to a commit newer than the one I referenced?
I have modified vulkan test (https://github.com/Erkaman/vulkan_minimal_compute) shader to use fp16:
it's as easy as adding after #version 450 to existing shader.comp file:
and regenerate SPIR-V file..
the using up to date SPIRV-Cross for rostkatze you should get output HLSL min16float in shader..
so in theory rostkatze should gain fp16 support "automagically"..
also you can test double support by adding only:
#define vec2 dvec2
seems SPIRV-Cross supports double in HLSL output for a while but still don't know but this sample doesn't work ok on this case (mandelbrot.png it generates is corrupt)
altough all seems right (d3dcompiler api returns no error)
For min16float testing in theory you need AMD recent enough (Vega and perhaps Polaris) for doubles more..
check support with dxcapsviewer in Windows SDK and tab "Direct3D 11" shows as "double precision shaders" "yes" and "Direct3D 11.1" or higher search "Pixel shader precision" "other stage precision" should show at least "32bits/16bits" to be supported..
The text was updated successfully, but these errors were encountered: