slang
slang copied to clipboard
Make OptionKind::EmitSpirvDirectly turn ON by default for target CodeGenTarget target SPIRV
Blocked by:
- #3547
- Fix the perf issue exposed by #3547.
- #3440
- #3438
- #3437
@csyonghe kindly add the dependent bugs for this change to be made.
+1, emitting SPIRV directly seems to be the more robust path from my experience. I think it makes sense that this becomes the default.
Made direct edits in the original post to track dependent issues.
Now that we understand what is causing NV driver to take so long to consume our SPIRV, we can implement a fix to avoid generating that pattern.
Somewhat related, but if we switched direct-to-spirv on by default, then I could submit reproducers of bugs more easily through shader playground. Currently, shader playground uses the default glslang backend path.
Q2-- let's not rush this transition.
This should be a high priority. The current direct-to-SPIRV backend is (from my experience) much more stable than with the option off.
Even the more basic features like multiple entrypoints do not work without this flag.
Why should we not just make this the default today? Are there any blocking issues preventing us from just flipping the switch?
We have users relying on some internal intrinsics that are only available on the glsl path. Switching now could break their code. We will implement the switch in early Q2.
We should probably add a “—emit-spirv-indirectly” flag then.
For internal Nvidia users working on confidential Vulkan features, they should be the ones with the burden to add a flag to their build system, not the other way around.
Slang is cross vendor language, and if we want developers to believe that, we probably shouldn’t hold back features because of confidential Nvidia reasons.
In any case, there will always be internal intrinsics in glslang/glslc/dxc that aren’t yet implemented in Slang, so we need a very clear line here on what’s “good enough” to flip the switch.
Maybe that just means setting Q2 as the cutoff and giving some time for folks both internally and externally to switch over.
I agree that most of our users will find the spirv backend to be far superior. However to flip the switch, we need to do some work around our CI and regression tests to ensure we don’t lose coverage for the glsl path. This will take some time so we probably won’t make the March deadline. We put this to Q2 so we don’t rush too hard for it, but it will be the first thing we do in April.
From: Nathan V. Morrical @.> Sent: Thursday, March 14, 2024 8:00:13 PM To: shader-slang/slang @.> Cc: Yong He @.>; Assign @.> Subject: Re: [shader-slang/slang] Make OptionKind::EmitSpirvDirectly turn ON by default for target CodeGenTarget target SPIRV (Issue #3477)
We should add a “—emit-spirv-indirectly” flag then. I don’t see why this should be a blocking issue.
For internal Nvidia users working on confidential Vulkan features, they should be the ones with the burden to add a flag to their build system, not the other way around.
Slang is cross vendor language, and if we want developers to believe that, we probably shouldn’t hold back features because .
In any case, there will always be internal intrinsics in glslang/glslc/dxc that aren’t yet implemented in Slang, so we need a very clear line here on what’s “good enough” to flip the switch.
— Reply to this email directly, view it on GitHubhttps://github.com/shader-slang/slang/issues/3477#issuecomment-1998854292, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAUHRBOCCINXPITCJ2KVMV3YYJP33AVCNFSM6AAAAABCGA3FM2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOJYHA2TIMRZGI. You are receiving this because you were assigned.Message ID: @.***>
(Just to emphasize here-- Q2 is only two weeks away, so this isn't being pushed to the far future.)
Ah, right. Time seems to have escaped me a bit. Yes, that’s not far out at all. Sometime mid April seems reasonable.