-
Notifications
You must be signed in to change notification settings - Fork 32
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
support more shader stages #263
Conversation
Thanks! Would it be possible for you to manually test a ray tracing shader? When I used these last I had to specify the SPIR-V version: https://github.com/expipiplus1/vulkan/blob/master/examples/rays/Pipeline.hs#L189 |
It seems some comments about I test For Here is the test shaders. I have few knowledge about hlsl so I use a example from wihlidal blog, and my test on |
I noticed that both What is the purpose for Or should there be a refactor like the stuffs below?
|
Thanks for all this!
That sounds like an excellent idea! It is the way it is currently because I wanted an example of using both Do you intend to do this refactoring? (I'm very happy to merge this in the meantime, just bump the changelog and version number (after rebasing)) |
now the structure
about
|
A QuasiQuoter can generate a continuation that will accept more data and finish the generation. |
now the usage for {-# LANGUAGE QuasiQuotes #-}
{-# LANGUAGE TemplateHaskell #-}
let vertCode = $([vert|
...
VSOutput main(const uint i : SV_VertexID)
{
VSOutput output;
output.pos = float4(positions[i], 0, 1.0);
output.col = colors[i];
return output;
}
|] "main") here is another syntax use {-# LANGUAGE QuasiQuotes #-}
vertCode <- [vert|
...
VSOutput main(const uint i : SV_VertexID)
{
VSOutput output;
output.pos = float4(positions[i], 0, 1.0);
output.col = colors[i];
return output;
}
|] "main" which is better? |
I think to be honest I'd just leave it as hardcoded to |
squashed, please review it |
Looks good to me, thanks! Happy to merge if the compile error is fixed. Could you also add some details to the changelog please? If you want this in a release sooner then feel free to bump the version of vulkan-utils! |
actually I am not sure which version for |
Either in the WIP section or 0.5 if you want a release more quickly.
…On Wed, Feb 24, 2021, 4:50 PM 漁 囿 ×.̷.̷.̷ •ゞ 潅 頭 ài < ***@***.***> wrote:
actually I am not sure which version for vulkan-utils should be used for
changelog
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#263 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAGRJXGASIBP2NOA77EXJ23TAS4TTANCNFSM4XYBN47Q>
.
|
- refactor shaderQQ - update changelog - update comments - specify --target-spv for shaderc ray tracing shaders - specify --target-env for glslang ray tracing shaders - support pass hlsl entry point to glslangValidator and shaderc - support pass glsl entry point to glslangValidator - support compile both glsl and hlsl with both glslang and shaderc
update & squashed, please review again |
Looks like a couple of the tests are failing because of changed line numbers. Is it possible to fix these please, then happy to merge? |
Thanks for your review. the causeI check some github ci log and found that this is caused by the lack of
$ grep -Ri "ShaderQQ" *
compute/Main.hs:import Vulkan.Utils.ShaderQQ.GLSL.Glslang
hlsl/Pipeline.hs:import Vulkan.Utils.ShaderQQ.HLSL.Glslang ( vert )
hlsl/Pipeline.hs:import Vulkan.Utils.ShaderQQ.HLSL.Shaderc ( frag )
offscreen/Main.hs:import Vulkan.Utils.ShaderQQ.GLSL.Glslang
rays/Pipeline.hs:import Vulkan.Utils.ShaderQQ.GLSL.Glslang ( glsl )
rays/Pipeline.hs:import qualified Vulkan.Utils.ShaderQQ.GLSL.Glslang as Glslang
rays/Pipeline.hs:import qualified Vulkan.Utils.ShaderQQ.GLSL.Shaderc as Shaderc
readme.md:- Convenient shader creation using the `Vulkan.Utils.ShaderQQ.comp` QuasiQuoter
resize/Pipeline.hs:import Vulkan.Utils.ShaderQQ.GLSL.Glslang
resize/Julia.hs:import Vulkan.Utils.ShaderQQ.GLSL.Glslang
sdl-triangle/Main.hs:import Vulkan.Utils.ShaderQQ.GLSL.Glslang ( frag )
sdl-triangle/Main.hs:import Vulkan.Utils.ShaderQQ.GLSL.Shaderc ( vert )
$ grep -Ri "ShaderQQ.*.Shaderc" *
hlsl/Pipeline.hs:import Vulkan.Utils.ShaderQQ.HLSL.Shaderc ( frag )
rays/Pipeline.hs:import qualified Vulkan.Utils.ShaderQQ.GLSL.Shaderc as Shaderc
sdl-triangle/Main.hs:import Vulkan.Utils.ShaderQQ.GLSL.Shaderc ( vert ) For example, I import why some ci successfully buildIn the current version of
- run: |
if command -v glslc &> /dev/null; then
cabal configure -fgeneric-instances -f-raytracing -fhave-shaderc
else
echo "glslc could not be found"
cabal configure -fgeneric-instances -f-raytracing -f-have-shaderc
fi
shell: bash
- name: Remove examples for 8.6.5
run: |
sed -ibak '/examples/d' cabal.project
if: matrix.ghc == '8.6.5'
the solutionthe revert solution (which I choose)
the complex solution
|
I didn't realize the existence of doctest before I run now doctest failures has been fixed by changed the line number to the same as |
amazing, thanks |
released: https://hackage.haskell.org/package/vulkan-utils-0.5.0 thanks again. |
vulkan shader spec
vulkan mesh + task spec