-
Notifications
You must be signed in to change notification settings - Fork 575
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
MSL: Work around broken cube texture gradients on Apple Silicon. #2233
MSL: Work around broken cube texture gradients on Apple Silicon. #2233
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits in terms of unrelated features being added in the PR (at least split into separate commits).
...aders-msl/asm/frag/depth-array-texture-lod.lod-as-grad.1d-as-2d.agx-cube-grad.msl23.asm.frag
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
To date, all released Apple Silicon GPUs incorrectly interpret the gradient vectors when sampling a cube texture. Specifically, they ignore one of the three partial derivatives in each gradient depending on the selected major axis, and they expect the remaining derivatives to be partially transformed. h/t @lexaknyazev for the code used in the `spvGradientCube()` function. Fixes 8 tests under `dEQP-VK.glsl.texture_functions.texturegrad.*`.
14bea1d
to
18976c4
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, assuming math is conformant.
To date, all released Apple Silicon GPUs incorrectly interpret the gradient vectors when sampling a cube texture. Specifically, they ignore one of the three partial derivatives in each gradient depending on the selected major axis, and they expect the remaining derivatives to be partially transformed.
h/t @lexaknyazev for the code used in the
spvGradientCube()
function.Fixes 8 tests under
dEQP-VK.glsl.texture_functions.texturegrad.*
.Also, (unrelated) add missing new MSL options to the C API and the CLI.