-
Notifications
You must be signed in to change notification settings - Fork 454
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
Fix for "static const" literals in HLSL #1684
Fix for "static const" literals in HLSL #1684
Conversation
|
6b81fe2
to
586a4fe
Compare
Thanks for the PR @num3ric, it looks good to me even though like you said, we don't have DX unit test so we probably need someone to test it manually, would you be able to do that? Meanwhile it would be nice if you could fix the CLA issue by following the link from the above comment so that we can approve the PR when ready. |
@remia The CLA is now applied so we should be good there. Regarding testing, I have been testing this change (manually) with a large number of transforms - so far so good. Let me know if there's anything in particular you think should be tested. I haven't had the chance to port automated tests to DX11/12 yet however. |
Actually, we do need to confirm this works with both dynamic properties enabled/disabled. My current tests only covered them disabled. Will do so and report back. |
Signed-off-by: Eric Renaud-Houde <[email protected]>
586a4fe
to
cc6acbc
Compare
Force-fixed the DCO email mismatch error in the previous commit, so this should be good for approval now. I'm still working on building an independent DX app to fully test this on the side, but with minimal testing all looks good so far. Reading through various operators, the const functions aren't in use when dynamic properties are enabled. |
@num3ric , you mentioned above that you were going to build an independent DX app to help testing. I was just wondering if that's something you could share/contribute? It could be quite helpful given the OpenGL limitation of our GPU CI testing. |
@doug-walker I'll see what I can do! This is certainly something that would benefit us, so indeed worth pushing. However what I have currently is a standalone ImGui-based DX12 app, which I built as a means of transferring Vulkan knowledge over to DX12 (skipping over DX11)... not something ready to publish at large just yet. Once I have GPU readback working, it will become more interesting for automated testing. |
Thanks for the update, yes that sounds very interesting! Please keep us posted when you might have something to share or if we can help. |
Constant globals in HLSL should be
static const
and not justconst
. Without it, we get the following warnings as an example:See
WAR_CONST_INITIALIZER
(3207) in the following:https://docs.microsoft.com/en-us/windows/win32/direct3dhlsl/hlsl-errors-and-warnings
I have not extensively tested this suggested change yet, but sharing as a conversation starter. The gpu tests seem to be centered around OpenGL only.