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 #6435 #7

Merged
Merged
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
18 changes: 7 additions & 11 deletions source/slang/slang-ir-glsl-legalize.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2354,9 +2354,7 @@ void handleSingleParam(
builder->addDependsOnDecoration(func, globalParam);
}

static void consolidateParameters(
GLSLLegalizationContext* context,
List<IRParam*>& params)
static void consolidateParameters(GLSLLegalizationContext* context, List<IRParam*>& params)
{
auto builder = context->getBuilder();

Expand Down Expand Up @@ -2435,9 +2433,7 @@ static void consolidateParameters(
}

// Consolidate ray tracing parameters for an entry point function
void consolidateRayTracingParameters(
GLSLLegalizationContext* context,
IRFunc* func)
void consolidateRayTracingParameters(GLSLLegalizationContext* context, IRFunc* func)
{
auto builder = context->getBuilder();
auto firstBlock = func->getFirstBlock();
Expand Down Expand Up @@ -2466,9 +2462,9 @@ void consolidateRayTracingParameters(
{
// We have one out/inout param, so add it as part of otherParams so we can
// just do one pass of handleSingleParam().
if (outParams.getCount() == 1)
{
otherParams.add(outParams[0]);
if (outParams.getCount() == 1)
{
otherParams.add(outParams[0]);
}
for (auto param : otherParams)
{
Expand Down Expand Up @@ -3918,7 +3914,7 @@ void legalizeEntryPointForGLSL(
default:
break;
}

// Next we will walk through any parameters of the entry-point function,
// and turn them into global variables.
if (auto firstBlock = func->getFirstBlock())
Expand All @@ -3944,7 +3940,7 @@ void legalizeEntryPointForGLSL(

legalizeEntryPointParameterForGLSL(&context, codeGenContext, func, pp, paramLayout);
}

// At this point we should have eliminated all uses of the
// parameters of the entry block. Also, our control-flow
// rules mean that the entry block cannot be the target
Expand Down
Loading