summaryrefslogtreecommitdiffstats
path: root/source/slang/emit.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang/emit.cpp')
-rw-r--r--source/slang/emit.cpp25
1 files changed, 12 insertions, 13 deletions
diff --git a/source/slang/emit.cpp b/source/slang/emit.cpp
index ace8a1559..98ce61b74 100644
--- a/source/slang/emit.cpp
+++ b/source/slang/emit.cpp
@@ -127,7 +127,7 @@ struct SharedEmitContext
// The "effective" profile that is being used to emit code,
// combining information from the target and entry point.
- Profile effctiveProfile;
+ Profile effectiveProfile;
};
struct EmitContext
@@ -4368,10 +4368,10 @@ struct EmitVisitor
}
#endif
- auto effctiveProfile = context->shared->effctiveProfile;
- if(effctiveProfile.getFamily() == ProfileFamily::GLSL)
+ auto effectiveProfile = context->shared->effectiveProfile;
+ if(effectiveProfile.getFamily() == ProfileFamily::GLSL)
{
- requireGLSLVersion(effctiveProfile.GetVersion());
+ requireGLSLVersion(effectiveProfile.GetVersion());
}
// HACK: We aren't picking GLSL versions carefully right now,
@@ -6746,10 +6746,10 @@ emitDeclImpl(decl, nullptr);
}
void emitIREntryPointAttributes_HLSL(
- EmitContext* /*ctx*/,
+ EmitContext* ctx,
EntryPointLayout* entryPointLayout)
{
- auto profile = entryPointLayout->profile;
+ auto profile = ctx->shared->effectiveProfile;
auto stage = profile.GetStage();
if(profile.getFamily() == ProfileFamily::DX)
@@ -6759,12 +6759,11 @@ emitDeclImpl(decl, nullptr);
char const* stageName = nullptr;
switch(stage)
{
- case Stage::Compute: stageName = "compute";
- case Stage::Vertex: stageName = "vertex";
- case Stage::Hull: stageName = "hull";
- case Stage::Domain: stageName = "domain";
- case Stage::Geometry: stageName = "geometry";
- case Stage::Fragment: stageName = "pixel";
+ #define PROFILE_STAGE(ID, NAME, ENUM) \
+ case Stage::ID: stageName = #NAME; break;
+
+ #include "profile-defs.h"
+
default:
break;
}
@@ -8230,7 +8229,7 @@ String emitEntryPoint(
sharedContext.target = target;
sharedContext.finalTarget = targetRequest->target;
sharedContext.entryPoint = entryPoint;
- sharedContext.effctiveProfile = getEffectiveProfile(entryPoint, targetRequest);
+ sharedContext.effectiveProfile = getEffectiveProfile(entryPoint, targetRequest);
if (entryPoint)
{