mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-01-18 02:52:10 +01:00
[dxbc] Implemnted SV_ViewportArrayIndex for geometry shaders
Required by Final Fantasy XIV.
This commit is contained in:
parent
fc47fb8f6c
commit
60d6416e5f
@ -5175,6 +5175,25 @@ namespace dxvk {
|
||||
DxbcRegMask(true, false, false, false));
|
||||
} break;
|
||||
|
||||
case DxbcSystemValue::ViewportId: {
|
||||
if (m_gs.builtinViewportId == 0) {
|
||||
m_gs.builtinViewportId = emitNewBuiltinVariable({
|
||||
{ DxbcScalarType::Uint32, 1, 0 },
|
||||
spv::StorageClassOutput },
|
||||
spv::BuiltInViewportIndex,
|
||||
"gs_viewport_id");
|
||||
}
|
||||
|
||||
DxbcRegisterPointer ptr;
|
||||
ptr.type.ctype = DxbcScalarType::Uint32;
|
||||
ptr.type.ccount = 1;
|
||||
ptr.id = m_gs.builtinViewportId;
|
||||
|
||||
emitValueStore(
|
||||
ptr, emitRegisterExtract(value, mask),
|
||||
DxbcRegMask(true, false, false, false));
|
||||
} break;
|
||||
|
||||
default:
|
||||
Logger::warn(str::format(
|
||||
"DxbcCompiler: Unhandled GS SV output: ", sv));
|
||||
|
@ -119,6 +119,7 @@ namespace dxvk {
|
||||
uint32_t functionId = 0;
|
||||
|
||||
uint32_t builtinLayer = 0;
|
||||
uint32_t builtinViewportId = 0;
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user