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

SPIRV compiler performance fixes. #3258

Merged
merged 5 commits into from
Oct 4, 2023
Merged

Conversation

csyonghe
Copy link
Collaborator

@csyonghe csyonghe commented Oct 4, 2023

Fixes complexity explosion in simplifyIR where we repetitively traverse the entire cfg to determine reachability/dominance.

Fixes a bug in constant folding of bitcast.

Implement a pass to turn composite SSA values into memory objects.

Fix a bug in IRBlock::addParam.

Make eliminatePhi pass only process phi nodes of composite types and leave scalar phi nodes as is.

Expose more options for simplifyIR to avoid performing expensive optimizations where unnecessary.

Revise stdlib and get rid of __spirv_capability modifiers.

expipiplus1
expipiplus1 previously approved these changes Oct 4, 2023
@@ -4830,6 +4814,7 @@ SlangResult emitSPIRVFromIR(
// feature so we can skip
if(SLANG_FAILED(validationResult) && validationResult != SLANG_E_NOT_AVAILABLE)
{
File::writeAllBytes("d:\\bug.spv", spirvOut.getBuffer(), spirvOut.getCount());
Copy link
Collaborator

Choose a reason for hiding this comment

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

^

String optErr;
if (SLANG_FAILED(optimizeSPIRV(spirv, optErr, outSpirv)))
{
File::writeAllBytes("D:\\problem-spirv.spv", spirv.getBuffer(), spirv.getCount());
Copy link
Collaborator

Choose a reason for hiding this comment

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

^

@csyonghe csyonghe merged commit ac886fd into shader-slang:master Oct 4, 2023
11 of 12 checks passed
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.

2 participants