1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-02 19:24:12 +01:00

[dxbc] Implemented OutputCoverageMask

This commit is contained in:
Philip Rebohle 2018-01-29 10:54:36 +01:00
parent 4ac38af8a7
commit 8c4d94b570
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 20 additions and 4 deletions

View File

@ -421,6 +421,15 @@ namespace dxvk {
"vThreadIndexInGroup");
} break;
case DxbcOperandType::OutputCoverageMask: {
m_module.enableCapability(spv::CapabilitySampleRateShading);
m_ps.builtinSampleMaskOut = emitNewBuiltinVariable({
{ DxbcScalarType::Uint32, 1, 0 },
spv::StorageClassOutput },
spv::BuiltInSampleMask,
"oDepth");
} break;
case DxbcOperandType::OutputDepth: {
m_module.setExecutionMode(m_entryPointId,
spv::ExecutionModeDepthReplacing);
@ -3656,6 +3665,11 @@ namespace dxvk {
{ DxbcScalarType::Uint32, 1 },
m_cs.builtinLocalInvocationIndex };
case DxbcOperandType::OutputCoverageMask:
return DxbcRegisterPointer {
{ DxbcScalarType::Uint32, 1 },
m_ps.builtinSampleMaskOut };
case DxbcOperandType::OutputDepth:
return DxbcRegisterPointer {
{ DxbcScalarType::Float32, 1 },

View File

@ -125,10 +125,12 @@ namespace dxvk {
struct DxbcCompilerPsPart {
uint32_t functionId = 0;
uint32_t builtinFragCoord = 0;
uint32_t builtinDepth = 0;
uint32_t builtinIsFrontFace = 0;
uint32_t builtinSampleId = 0;
uint32_t builtinFragCoord = 0;
uint32_t builtinDepth = 0;
uint32_t builtinIsFrontFace = 0;
uint32_t builtinSampleId = 0;
uint32_t builtinSampleMaskIn = 0;
uint32_t builtinSampleMaskOut = 0;
std::array<DxbcVectorType, DxbcMaxInterfaceRegs> oTypes;
};