Use unchecked shaders for better performance#17767
Conversation
|
I do think we should do this though. This is the right default for 99% of users. Unless you're making VRChat or a shader playground, you're not running random untrusted shaders. I'd like to expose an option to enable validation for some shaders, but that needs a real user to inform us of the right design. |
There was a problem hiding this comment.
I agree that this is unquestionably the better default. I won't push too hard for it in this PR (as this is better and I don't look a gift horse in the mouth), but making this configurable from our Shader type is low hanging fruit, and makes a very valuable and hard-to-implement-yourself feature available to people that want it.
Edit: I don't think doing that needs design work. Just make it an enum on Shader and expose the functionality via a new method on RenderDevice.
alice-i-cecile
left a comment
There was a problem hiding this comment.
Eh, let's merge this now :)
|
@JMS55 CI is failing due to no safety comment (probably good!). I've taken my best crack at it, but please feel free to revise it as you see fit. |
Co-authored-by: Alice Cecile <alice.i.cecile@gmail.com>
Head branch was pushed to by a user without write access
|
@alice-i-cecile there's two usages of unsafe, you'll probably need to add the same comment to the second one to satisfy CI |
Objective
Solution
Migration Guide