mirror of
https://github.com/EduApps-CDG/OpenDX
synced 2024-12-30 09:45:37 +01:00
[dxbc] Added support for SV_RenderTargetID in pixel shaders
This commit is contained in:
parent
746c90e860
commit
8ebffc1018
@ -4570,8 +4570,24 @@ namespace dxvk {
|
|||||||
ptrIn.type.ccount = 1;
|
ptrIn.type.ccount = 1;
|
||||||
ptrIn.id = m_ps.builtinSampleId;
|
ptrIn.id = m_ps.builtinSampleId;
|
||||||
|
|
||||||
return emitRegisterExtract(
|
return emitValueLoad(ptrIn);
|
||||||
emitValueLoad(ptrIn), mask);
|
} break;
|
||||||
|
|
||||||
|
case DxbcSystemValue::RenderTargetId: {
|
||||||
|
if (m_ps.builtinLayer == 0) {
|
||||||
|
m_ps.builtinLayer = emitNewBuiltinVariable({
|
||||||
|
{ DxbcScalarType::Uint32, 1, 0 },
|
||||||
|
spv::StorageClassInput },
|
||||||
|
spv::BuiltInLayer,
|
||||||
|
"ps_layer");
|
||||||
|
}
|
||||||
|
|
||||||
|
DxbcRegisterPointer ptr;
|
||||||
|
ptr.type.ctype = DxbcScalarType::Uint32;
|
||||||
|
ptr.type.ccount = 1;
|
||||||
|
ptr.id = m_ps.builtinLayer;
|
||||||
|
|
||||||
|
return emitValueLoad(ptr);
|
||||||
} break;
|
} break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -117,7 +117,7 @@ namespace dxvk {
|
|||||||
uint32_t outputVertexCount = 0;
|
uint32_t outputVertexCount = 0;
|
||||||
uint32_t functionId = 0;
|
uint32_t functionId = 0;
|
||||||
|
|
||||||
uint32_t builtinLayer = 0;
|
uint32_t builtinLayer = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -133,6 +133,7 @@ namespace dxvk {
|
|||||||
uint32_t builtinSampleId = 0;
|
uint32_t builtinSampleId = 0;
|
||||||
uint32_t builtinSampleMaskIn = 0;
|
uint32_t builtinSampleMaskIn = 0;
|
||||||
uint32_t builtinSampleMaskOut = 0;
|
uint32_t builtinSampleMaskOut = 0;
|
||||||
|
uint32_t builtinLayer = 0;
|
||||||
|
|
||||||
std::array<DxbcVectorType, DxbcMaxInterfaceRegs> oTypes;
|
std::array<DxbcVectorType, DxbcMaxInterfaceRegs> oTypes;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user