Skip to content

[SPIRV] Add support of the GL_EXT_spirv_intrinsics - #3949

Merged
Jaebaek Seo (jaebaek) merged 14 commits into
microsoft:masterfrom
jiaolu:dev
Sep 24, 2021
Merged

Jaebaek Seo (jaebaek) merged 14 commits into
microsoft:masterfrom
jiaolu:dev

Conversation

@jiaolu

Copy link
Copy Markdown
Contributor

Related to the issue: #3919
Add these attributes

vk::ext_capability
vk::ext_extension
vk::ext_instruction

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@jaebaek Jaebaek Seo (jaebaek) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thank you for your contribution!
I have a few comments. PTAL.

Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp Resolved
Comment thread tools/clang/lib/SPIRV/SpirvBuilder.cpp Resolved
Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp Resolved
Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp Resolved
Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp Resolved
@jaebaek Jaebaek Seo (jaebaek) self-assigned this Sep 17, 2021
@jaebaek Jaebaek Seo (jaebaek) added the spirv Work related to SPIR-V label Sep 17, 2021
@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

JiaoluAMD (jiaolu) and others added 4 commits September 18, 2021 20:38
Related to the issue: microsoft#3919
Add these attributes

vk::ext_capability
vk::ext_extension
vk::ext_instruction
Fix intermittent clang-spirv-tests failures on the linux platform.
Put the processSpvIntrinsicCallExpr ahead of the processIntrinsicCallExpr to allow the redeclaration of the intrinsic function
Also add two new spirv Attributes
vk::ext_reference
vk::ext_literal
@jiaolu

Copy link
Copy Markdown
Contributor Author

en. it looks like the check failures does not be related with my commits.
./build.x64/release/bin/clang-hlsl-tests --HlslDataDir tools/clang/test/HLSL/

@AppVeyorBot

Copy link
Copy Markdown

@jaebaek Jaebaek Seo (jaebaek) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Mostly looks good to me. If you update the code based on my comments, I will approve it.

Just one general comment: I prefer small multiple PRs. This PR is ok, but please separate independent parts (e.g., ext_literal / ext_reference) as multiple PRs in the future, which would be better for bisecting bugs.

Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp Resolved
initInstruction(inst);
curInst.push_back(inst->getResultTypeId());
curInst.push_back(getOrAssignResultId<SpirvInstruction>(inst));
if (inst->hasResultType()) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice catch!

Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp Resolved
Comment thread tools/clang/lib/SPIRV/SpirvEmitter.cpp Resolved
@AppVeyorBot

Copy link
Copy Markdown

@jiaolu

Copy link
Copy Markdown
Contributor Author

new added attributes VKLiteralExt, and VKReferenceExt does fail "cxx11-attributes.hlsl" expected warning tests. would need to dig further.

@jiaolu

Copy link
Copy Markdown
Contributor Author

new added attributes VKLiteralExt, and VKReferenceExt does fail "cxx11-attributes.hlsl" expected warning tests. would need to dig further.

emm, this is quite tricky.
the attributes size exceed 8 bit AttrKind
create
#3967 to fix this issue.

@jaebaek

Copy link
Copy Markdown
Collaborator

JiaoluAMD (@jiaolu) I sent minor changes to your repo: jiaolu#1
Could you please include them in this PR?

JiaoluAMD (jiaolu) and others added 4 commits September 24, 2021 10:07
Related to the issue: microsoft#3919
Add these attributes

vk::ext_capability
vk::ext_extension
vk::ext_instruction
Fix intermittent clang-spirv-tests failures on the linux platform.
Put the processSpvIntrinsicCallExpr ahead of the processIntrinsicCallExpr to allow the redeclaration of the intrinsic function
Also add two new spirv Attributes
vk::ext_reference
vk::ext_literal
@AppVeyorBot

Copy link
Copy Markdown

@AppVeyorBot

Copy link
Copy Markdown

@jiaolu

Copy link
Copy Markdown
Contributor Author

❌ Build DirectXShaderCompiler 1.0.546 failed (commit ed58a60 by JiaoluAMD (@jiaolu))

I don't have idea why the "AppVeyor build" failed, looked up the message it just shows
"Image: Ubuntu
Build execution time has reached the maximum allowed time for your plan (90 minutes)."

@AppVeyorBot

Copy link
Copy Markdown

@jaebaek
Jaebaek Seo (jaebaek) merged commit de6a8ed into microsoft:master Sep 24, 2021
@jiaolu

JiaoluAMD (jiaolu) commented Sep 25, 2021 •

Copy link
Copy Markdown
Contributor Author

Finally , thanks , Jaebaek, cheers.

@jaebaek

Jaebaek Seo (jaebaek) commented Nov 11, 2021 •

Copy link
Copy Markdown
Collaborator

Ah I just saw your comment. Thanks for your contribution :)

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.

3 participants