This implements the PGRAPH RDI.
RDI is an interface to access the RAM of PGRAPH. There's also PFB RDI, but this is not implemented here.
This feature is irrelevant for game emulation, because it's only used by D3D drivers for some debug features and features we don't need. However, nv2a-trace will depend on this functionality, as some states can not be accessed through other registers.
On hardware, the GPU has to be idle before RDI can be used (apparently RDI shares some address lines with other GPU features). For now, this restriction will not be emulated in XQEMU. We can always make it more accurate in the future.
I've added code for select 0x17 and 0xCC as example, which access vertex program constants. They mostly seem to access the same data (probably for 2 separate transform-engines) and I doubt we'll have to emulate these banks going out of sync.
After merge, I'll create issues about other select values which will be required for this feature to be useful. Issues will only focus on those features we need, not completeness.
Follow-ups and notes:
0x17: RDI_RAMSEL_XL_XFCTX aka RDI_INDEX_VTX_CONSTANTS0 (required by nv2a-trace)
0xCC: ??? aka RDI_INDEX_VTX_CONSTANTS1 (required by nv2a-trace)
0x3D RDI_RAMSEL_FD_CTRL (used in D3D)
0xE0 NV_IGRAPH_TC_TPA_INDEX_SELECT (used in D3D)
0xDF NV_IGRAPH_TC_DXP_INDEX_SELECT (used in D3D)
0xEA NV_IGRAPH_TC_MINTFCDEBUG_SELECT (used in D3D + required by nv2a-trace, but can be stubbed)
This implements the PGRAPH RDI. RDI is an interface to access the RAM of PGRAPH. There's also PFB RDI, but this is not implemented here.
This feature is irrelevant for game emulation, because it's only used by D3D drivers for some debug features and features we don't need. However, nv2a-trace will depend on this functionality, as some states can not be accessed through other registers.
On hardware, the GPU has to be idle before RDI can be used (apparently RDI shares some address lines with other GPU features). For now, this restriction will not be emulated in XQEMU. We can always make it more accurate in the future.
I've added code for
select
0x17 and 0xCC as example, which access vertex program constants. They mostly seem to access the same data (probably for 2 separate transform-engines) and I doubt we'll have to emulate these banks going out of sync.After merge, I'll create issues about other
select
values which will be required for this feature to be useful. Issues will only focus on those features we need, not completeness.Follow-ups and notes:
0x17:
RDI_RAMSEL_XL_XFCTX
akaRDI_INDEX_VTX_CONSTANTS0
(required by nv2a-trace)0xCC: ??? aka
RDI_INDEX_VTX_CONSTANTS1
(required by nv2a-trace)0x3D
RDI_RAMSEL_FD_CTRL
(used in D3D)0xE0
NV_IGRAPH_TC_TPA_INDEX_SELECT
(used in D3D)0xDF
NV_IGRAPH_TC_DXP_INDEX_SELECT
(used in D3D)0xEA
NV_IGRAPH_TC_MINTFCDEBUG_SELECT
(used in D3D + required by nv2a-trace, but can be stubbed)0x10
RDI_RAMSEL_XL_P
(required by nv2a-trace)0x15
RDI_RAMSEL_XL_VAB
(considered for nv2a-trace)0x26
RDI_RAMSEL_IDX_FMT
(considered for nv2a-trace)FIXME: