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

[dxbc] Implemented Geometry SV RenderTargetId

This commit is contained in:
Philip Rebohle 2018-02-04 23:36:00 +01:00
parent b741b3b4d5
commit fc947f5985
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99
2 changed files with 21 additions and 0 deletions

View File

@ -4598,6 +4598,25 @@ namespace dxvk {
emitVsSystemValueStore(sv, mask, value);
break;
case DxbcSystemValue::RenderTargetId: {
if (m_gs.builtinLayer == 0) {
m_gs.builtinLayer = emitNewBuiltinVariable({
{ DxbcScalarType::Uint32, 1, 0 },
spv::StorageClassOutput },
spv::BuiltInLayer,
"gs_layer");
}
DxbcRegisterPointer ptr;
ptr.type.ctype = DxbcScalarType::Uint32;
ptr.type.ccount = 1;
ptr.id = m_gs.builtinLayer;
emitValueStore(
ptr, emitRegisterExtract(value, mask),
DxbcRegMask(true, false, false, false));
} break;
default:
Logger::warn(str::format(
"DxbcCompiler: Unhandled GS SV output: ", sv));

View File

@ -116,6 +116,8 @@ namespace dxvk {
DxbcPrimitiveTopology outputTopology = DxbcPrimitiveTopology::Undefined;
uint32_t outputVertexCount = 0;
uint32_t functionId = 0;
uint32_t builtinLayer = 0;
};