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

Format code for PR #6093 #40

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source/slang/slang-diagnostic-defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2259,7 +2259,8 @@ DIAGNOSTIC(
41403,
Error,
invalidAtomicDestinationPointer,
"cannot perform atomic operation because destination is neither groupshared nor from a device buffer.")
"cannot perform atomic operation because destination is neither groupshared nor from a device "
"buffer.")

//
// 5xxxx - Target code generation.
Expand Down
3 changes: 2 additions & 1 deletion source/slang/slang-emit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1322,7 +1322,8 @@ Result linkAndOptimizeIR(
byteAddressBufferOptions);
}

// For SPIR-V, this function is called elsewhere, so that it can happen after address space specialization
// For SPIR-V, this function is called elsewhere, so that it can happen after address space
// specialization
if (target != CodeGenTarget::SPIRV && target != CodeGenTarget::SPIRVAssembly)
{
bool skipFuncParamValidation = true;
Expand Down
3 changes: 2 additions & 1 deletion source/slang/slang-ir-spirv-legalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1933,7 +1933,8 @@ struct SPIRVLegalizationContext : public SourceEmitterBase
SpirvAddressSpaceAssigner addressSpaceAssigner;
specializeAddressSpace(m_module, &addressSpaceAssigner);

// For SPIR-V, we don't skip this validation, because we might then be generating invalid SPIR-V.
// For SPIR-V, we don't skip this validation, because we might then be generating invalid
// SPIR-V.
bool skipFuncParamValidation = false;
validateAtomicOperations(skipFuncParamValidation, m_sink, m_module->getModuleInst());
}
Expand Down
4 changes: 2 additions & 2 deletions source/slang/slang-ir-validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -460,8 +460,8 @@ static bool isValidAtomicDest(bool skipFuncParamValidation, IRInst* dst)
}
else if (skipFuncParamValidation)
{
// We haven't actually verified that this is a valid atomic operation destination, but
// the callee wants to skip this specific validation.
// We haven't actually verified that this is a valid atomic operation destination,
// but the callee wants to skip this specific validation.
return true;
}
}
Expand Down
2 changes: 1 addition & 1 deletion source/slang/slang-ir-validate.h
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void enableIRValidationAtInsert();
// void atomicOp(inout int array){ InterlockedAdd(array, 1);}
// groupshared int gArray;
// [numthreads(1, 1, 1)] void main() { atomicOp(gArray); }
// If 'skipFuncParamValidation' is true, then the validation allows destinations that
// If 'skipFuncParamValidation' is true, then the validation allows destinations that
// lead back to in/inout parameters that we can't validate.
void validateAtomicOperations(bool skipFuncParamValidation, DiagnosticSink* sink, IRInst* inst);

Expand Down
Loading