Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/HansKristian-Work/dxil-spirv.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilip Rebohle <philip.rebohle@tu-dortmund.de>2022-02-02 18:24:33 +0300
committerPhilip Rebohle <philip.rebohle@tu-dortmund.de>2022-09-02 00:02:17 +0300
commit986f6827bc30a8ec7c2e2b972219eafa4dca306c (patch)
treefe89c378fc8b34fed1f66e1da3be9fcf44a16998
parentf8baa687a5c6abf177e346e6ace5c5e4d0e1d458 (diff)
Define mesh and amplification shader stages.
-rw-r--r--dxil_converter.cpp12
-rw-r--r--dxil_converter.hpp4
-rw-r--r--dxil_spirv_c.h2
3 files changed, 17 insertions, 1 deletions
diff --git a/dxil_converter.cpp b/dxil_converter.cpp
index 8f1358a..1e18170 100644
--- a/dxil_converter.cpp
+++ b/dxil_converter.cpp
@@ -2890,6 +2890,10 @@ ShaderStage Converter::Impl::get_remapping_stage(spv::ExecutionModel execution_m
return ShaderStage::RayGeneration;
case spv::ExecutionModelCallableKHR:
return ShaderStage::Callable;
+ case spv::ExecutionModelTaskEXT:
+ return ShaderStage::Amplification;
+ case spv::ExecutionModelMeshEXT:
+ return ShaderStage::Mesh;
default:
return ShaderStage::Unknown;
}
@@ -3246,6 +3250,10 @@ static spv::ExecutionModel get_execution_model(const llvm::Module &module, llvm:
return spv::ExecutionModelGeometry;
case DXIL::ShaderKind::Compute:
return spv::ExecutionModelGLCompute;
+ case DXIL::ShaderKind::Amplification:
+ return spv::ExecutionModelTaskEXT;
+ case DXIL::ShaderKind::Mesh:
+ return spv::ExecutionModelMeshEXT;
case DXIL::ShaderKind::RayGeneration:
return spv::ExecutionModelRayGenerationKHR;
case DXIL::ShaderKind::Miss:
@@ -3280,6 +3288,10 @@ static spv::ExecutionModel get_execution_model(const llvm::Module &module, llvm:
return spv::ExecutionModelGeometry;
else if (model == "cs")
return spv::ExecutionModelGLCompute;
+ else if (model == "as")
+ return spv::ExecutionModelTaskEXT;
+ else if (model == "ms")
+ return spv::ExecutionModelMeshEXT;
}
return spv::ExecutionModelMax;
diff --git a/dxil_converter.hpp b/dxil_converter.hpp
index 4c10931..15b5cf8 100644
--- a/dxil_converter.hpp
+++ b/dxil_converter.hpp
@@ -64,7 +64,9 @@ enum class ShaderStage : unsigned
Miss = 9,
AnyHit = 10,
RayGeneration = 11,
- Callable = 12
+ Callable = 12,
+ Amplification = 13,
+ Mesh = 14,
};
struct D3DBinding
diff --git a/dxil_spirv_c.h b/dxil_spirv_c.h
index c668982..548586e 100644
--- a/dxil_spirv_c.h
+++ b/dxil_spirv_c.h
@@ -88,6 +88,8 @@ typedef enum dxil_spv_shader_stage
DXIL_SPV_STAGE_ANY_HIT = 10,
DXIL_SPV_STAGE_RAY_GENERATION = 11,
DXIL_SPV_STAGE_CALLABLE = 12,
+ DXIL_SPV_STAGE_AMPLIFICATION = 13,
+ DXIL_SPV_STAGE_MESH = 14,
DXIL_SPV_STAGE_INT_MAX = 0x7fffffff
} dxil_spv_shader_stage;