summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/slang/slang-capabilities.capdef4
-rw-r--r--source/slang/slang-options.cpp7
-rw-r--r--source/slang/slang-profile-defs.h7
3 files changed, 17 insertions, 1 deletions
diff --git a/source/slang/slang-capabilities.capdef b/source/slang/slang-capabilities.capdef
index 941ad7ebf..ec821ef21 100644
--- a/source/slang/slang-capabilities.capdef
+++ b/source/slang/slang-capabilities.capdef
@@ -1270,6 +1270,10 @@ alias miss = _miss + raytracing;
/// [Stage]
alias mesh = _mesh + _meshshading;
+/// Task shader stage & mesh shader capabilities
+/// [Stage]
+alias task = _amplification + _meshshading;
+
/// Amplification shader stage & mesh shader capabilities
/// [Stage]
alias amplification = _amplification + _meshshading;
diff --git a/source/slang/slang-options.cpp b/source/slang/slang-options.cpp
index 9141188df..1b8a45401 100644
--- a/source/slang/slang-options.cpp
+++ b/source/slang/slang-options.cpp
@@ -325,6 +325,8 @@ void initCommandOptions(CommandOptions& options)
{"tesc", "glsl (hull)"},
{"tese", "glsl (domain)"},
{"comp", "glsl (compute)"},
+ {"mesh", "glsl (mesh)"},
+ {"task", "glsl (amplification)"},
{"slang", nullptr},
{"spv", "SPIR-V"},
{"spv-asm", "SPIR-V assembly"},
@@ -1305,11 +1307,14 @@ void OptionsParser::addInputForeignShaderPath(
};
static const Entry entries[] = {
+ {".vert", Profile::GLSL_Vertex},
{".frag", Profile::GLSL_Fragment},
{".geom", Profile::GLSL_Geometry},
{".tesc", Profile::GLSL_TessControl},
{".tese", Profile::GLSL_TessEval},
- {".comp", Profile::GLSL_Compute}};
+ {".comp", Profile::GLSL_Compute},
+ {".mesh", Profile::GLSL_Mesh},
+ {".task", Profile::GLSL_Task}};
for (Index i = 0; i < SLANG_COUNT_OF(entries); ++i)
{
diff --git a/source/slang/slang-profile-defs.h b/source/slang/slang-profile-defs.h
index 4781d5bc3..26faa7eb2 100644
--- a/source/slang/slang-profile-defs.h
+++ b/source/slang/slang-profile-defs.h
@@ -73,6 +73,7 @@ PROFILE_STAGE(Callable, callable, SLANG_STAGE_CALLABLE)
PROFILE_STAGE(Mesh, mesh, SLANG_STAGE_MESH)
PROFILE_STAGE(Amplification, amplification, SLANG_STAGE_AMPLIFICATION)
+PROFILE_STAGE_ALIAS(Task, task, Amplification)
PROFILE_STAGE(Dispatch, dispatch, SLANG_STAGE_DISPATCH)
// Note: HLSL and Direct3D convention erroneously uses the term "Pixel Shader"
@@ -322,6 +323,8 @@ P(Compute, compute, 430)
P(Compute, compute, 440)
P(Compute, compute, 450)
+P(Mesh, mesh, 450)
+
#undef P
#define P(UPPER, LOWER, STAGE, VERSION) \
PROFILE(GLSL_##UPPER##_##VERSION, glsl_##LOWER##_##VERSION, STAGE, GLSL_##VERSION)
@@ -340,6 +343,8 @@ P(TessEval, tess_eval, Domain, 430)
P(TessEval, tess_eval, Domain, 440)
P(TessEval, tess_eval, Domain, 450)
+P(Task, task, Amplification, 450)
+
#undef P
// Define a default profile for each GLSL stage that just
@@ -351,6 +356,8 @@ PROFILE_ALIAS(GLSL_Geometry, GLSL_Geometry_450, glsl_geometry)
PROFILE_ALIAS(GLSL_TessControl, GLSL_TessControl_450, glsl_tess_control)
PROFILE_ALIAS(GLSL_TessEval, GLSL_TessEval_450, glsl_tess_eval)
PROFILE_ALIAS(GLSL_Compute, GLSL_Compute_450, glsl_compute)
+PROFILE_ALIAS(GLSL_Mesh, GLSL_Mesh_450, glsl_mesh)
+PROFILE_ALIAS(GLSL_Task, GLSL_Task_450, glsl_task)
// TODO: define a profile for each GLSL *version* that we can
// use as a catch-all when the stage can be inferred from