Skip to content

[spirv] Fix null pointer dereference - #3861

Merged
Natalie Chouinard (sudonatalie) merged 1 commit into
microsoft:masterfrom
sudonatalie:issue-2955
Jul 9, 2021
Merged

Natalie Chouinard (sudonatalie) merged 1 commit into
microsoft:masterfrom
sudonatalie:issue-2955

Conversation

@sudonatalie

@sudonatalie Natalie Chouinard (sudonatalie) commented Jul 6, 2021 •

Copy link
Copy Markdown
Collaborator

Fix a null pointer dereference which can occur when an unimplemented
intrinsic is used. The repro shader from issue #2955 (added as a unit
test) now fails with a useful message rather than a silent crash.

@sudonatalie

Copy link
Copy Markdown
Collaborator Author

Jaebaek Seo (@jaebaek) This should fix the crash, but of course will not generate valid SPIR-V. Is this new intrinsic one that has been discussed before or that warrants tracking separately for the SPIR-V backend?

@AppVeyorBot

Copy link
Copy Markdown

@jaebaek

Copy link
Copy Markdown
Collaborator

We have not implemented GetAttributeAtVertex support for the SPIR-V backend. It is relatively new feature. I found some commits about it, but I cannot find the spec about it. The DXIL code gen uses @dx.op.attributeAtVertex.f32() intrinsic but I have no idea we have a SPIR-V instruction matches it.

Gregory Roth (@pow2clk) could you please point out the document about GetAttributeAtVertex?

@ghost

Deleted user (ghost) commented Jul 7, 2021 •

Copy link
Copy Markdown

CLA assistant check
All CLA requirements met.

Fix a null pointer dereference which can occur when an unimplemented
intrinsic is used. The repro shader from issue microsoft#2955 (added as a unit
test) now fails with a useful message rather than a silent crash.
@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@pow2clk

Copy link
Copy Markdown
Collaborator

Hi Jaebaek Seo (@jaebaek)!

GetAttributeAtPVertex is part of the barycentrics optional feature added in shader model 6.1: https://github.com/microsoft/DirectXShaderCompiler/wiki/SV_Barycentrics#per-vertex-attributes

Congrats Natalie Chouinard (@sudonatalie) on your first PR to DXC! 😄

@jaebaek

Copy link
Copy Markdown
Collaborator

Thanks Gregory Roth (@pow2clk) !

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