1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-01-29 17:52:18 +01:00

[dxbc] Added support for oDepthGe/oDepthLe

This commit is contained in:
Philip Rebohle 2018-02-08 10:28:27 +01:00
parent b3ba401503
commit 59be5b72e8
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -444,6 +444,26 @@ namespace dxvk {
"oDepth");
} break;
case DxbcOperandType::OutputDepthGe: {
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeDepthReplacing);
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeDepthGreater);
m_ps.builtinDepth = emitNewBuiltinVariable({
{ DxbcScalarType::Float32, 1, 0 },
spv::StorageClassOutput },
spv::BuiltInFragDepth,
"oDepthGe");
} break;
case DxbcOperandType::OutputDepthLe: {
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeDepthReplacing);
m_module.setExecutionMode(m_entryPointId, spv::ExecutionModeDepthLess);
m_ps.builtinDepth = emitNewBuiltinVariable({
{ DxbcScalarType::Float32, 1, 0 },
spv::StorageClassOutput },
spv::BuiltInFragDepth,
"oDepthLe");
} break;
default:
Logger::err(str::format(
"DxbcCompiler: Unsupported operand type declaration: ",
@ -3770,6 +3790,8 @@ namespace dxvk {
m_ps.builtinSampleMaskOut };
case DxbcOperandType::OutputDepth:
case DxbcOperandType::OutputDepthGe:
case DxbcOperandType::OutputDepthLe:
return DxbcRegisterPointer {
{ DxbcScalarType::Float32, 1 },
m_ps.builtinDepth };