Skip to content
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

HLSL: Possibility to represent variable in binary form #3259

Merged
merged 1 commit into from
Jul 18, 2023

Conversation

Dawid-Lorenz-Mobica
Copy link
Contributor

Fix for Issues: #3089

Copy link
Contributor

@arcady-lunarg arcady-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks okay overall, aside from a couple issues mentioned on specific lines, and one major one: this also adds support for binary literals to GLSL, which is not actually a thing that GLSL supports. You need to add a check to make sure that we're not compiling GLSL and to bail out early in that case. I would also like to see tests for the error cases here, both the "literal too big/too long" error messages and that this doesn't work with GLSL. There should be existing "negative" test files to which you can add some new cases.

Test/hlsl.conditional.frag Outdated Show resolved Hide resolved
Test/hlsl.conditional.frag Outdated Show resolved Hide resolved
glslang/MachineIndependent/preprocessor/PpScanner.cpp Outdated Show resolved Hide resolved
@Dawid-Lorenz-Mobica Dawid-Lorenz-Mobica force-pushed the hlsl_binary_representation branch from 39e753a to 6cd56bf Compare July 13, 2023 11:07
@arcady-lunarg arcady-lunarg self-requested a review July 17, 2023 20:37
Copy link
Contributor

@arcady-lunarg arcady-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code itself looks fine now, just one issue with your change to a test causing it to no longer generate SPIR-V code where it had previously done so. I think you need to move the negative tests to a different file, possibly a new test file.

Test/baseResults/hlsl.numericsuffixes.frag.out Outdated Show resolved Hide resolved
@Dawid-Lorenz-Mobica Dawid-Lorenz-Mobica force-pushed the hlsl_binary_representation branch from 6cd56bf to af98717 Compare July 18, 2023 08:12
Copy link
Contributor

@arcady-lunarg arcady-lunarg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, thanks.

@arcady-lunarg arcady-lunarg added the kokoro:run Trigger Google bot runs label Jul 18, 2023
@kokoro-team kokoro-team removed the kokoro:run Trigger Google bot runs label Jul 18, 2023
@arcady-lunarg arcady-lunarg merged commit d5f3ad6 into KhronosGroup:main Jul 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants