Skip to content

[spirv] Don't emit extension for using fp16 in GLSLstd450 instructions.#2503

Merged
ehsannas merged 1 commit intomicrosoft:masterfrom
ehsannas:issue_2500
Oct 8, 2019
Merged

[spirv] Don't emit extension for using fp16 in GLSLstd450 instructions.#2503
ehsannas merged 1 commit intomicrosoft:masterfrom
ehsannas:issue_2500

Conversation

@ehsannas
Copy link
Copy Markdown
Contributor

@ehsannas ehsannas commented Oct 3, 2019

With the exception of interpolation instructions.

New revision of SPIR-V Extended Instructions for GLSL allows fp16
except for interpolation instructions.

See: https://www.khronos.org/registry/spir-v/specs/1.0/GLSL.std.450.html

Fixes #2500.

With the exception of interpolation instructions.

New revision of SPIR-V Extended Instructions for GLSL allows fp16
except for interpolation instructions.

See: https://www.khronos.org/registry/spir-v/specs/1.0/GLSL.std.450.html

Fixes microsoft#2500.
@ehsannas ehsannas added the spirv Work related to SPIR-V label Oct 3, 2019
@ehsannas ehsannas requested a review from jaebaek October 3, 2019 17:47
@ehsannas ehsannas self-assigned this Oct 3, 2019
@AppVeyorBot
Copy link
Copy Markdown

Copy link
Copy Markdown
Collaborator

@jaebaek jaebaek left a comment

Choose a reason for hiding this comment

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

LGTM but I think adding an example for interpolate operation would make it more complete. Was it already added?

@ehsannas
Copy link
Copy Markdown
Contributor Author

ehsannas commented Oct 8, 2019

I wasn't able to find any hlsl intrinsic that would map to the extended instruction set's interpolate instructions.

@ehsannas ehsannas merged commit 6bf91e8 into microsoft:master Oct 8, 2019
@ehsannas ehsannas deleted the issue_2500 branch October 8, 2019 14:51
sudonatalie added a commit to sudonatalie/DirectXShaderCompiler that referenced this pull request Jan 4, 2024
The docs incorrectly stated that the `SPV_AMD_gpu_shader_half_float`
extension was added when half types were used. This is now corrected to
show that the Float16 capability is added instead.

The remaining code that could have added that extension in certain cases
has been dead code since microsoft#2503 since none of the instructions checked in
that list are ones that are emitted by DXC, so it is removed to clean
up.

Follow up from KhronosGroup/SPIRV-Tools#5519
sudonatalie added a commit to sudonatalie/DirectXShaderCompiler that referenced this pull request Jan 4, 2024
The docs incorrectly stated that the `SPV_AMD_gpu_shader_half_float`
extension was added when half types were used. This is now corrected to
show that the Float16 capability is added instead.

The remaining code that could have added that extension in certain cases
has been dead code since microsoft#2503 since none of the instructions checked in
that list are ones that are emitted by DXC, so it is removed to clean
up.

Follow up from KhronosGroup/SPIRV-Tools#5519
sudonatalie added a commit that referenced this pull request Jan 4, 2024
The docs were out of date stating that the
`SPV_AMD_gpu_shader_half_float` extension was added when half types were
used. This is now corrected to show that the Float16 capability is added
and no extension.

The remaining code that could have added that extension in certain cases
has been dead code since #2503 since none of the instructions checked in
that list are ones that are emitted by DXC, so it is removed to clean
up.

Evidence that this is dead code:
1. `git grep "InterpolateAt"` finds no uses other than those removed
here.
2. All tests still pass when it's removed.
3. The comments in #2503 also say they were not able to find a mapping
from any HLSL intrinsics to these instructions, which is why no tests
were added.

Follow-up from: KhronosGroup/SPIRV-Tools#5519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

spirv Work related to SPIR-V

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[SPIRV] compiled SPIR-V requires SPV_AMD_gpu_shader_half_float when using extended instructions

3 participants