mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-23 03:29:43 +00:00
nv2a: Add support for PGRAPH RDI select 0x17
This commit is contained in:
parent
973f8db16a
commit
e42fb24752
2
dtc
2
dtc
@ -1 +1 @@
|
||||
Subproject commit 88f18909db731a627456f26d779445f84e449536
|
||||
Subproject commit e54388015af1fb4bf04d0bca99caba1074d9cc42
|
@ -305,6 +305,10 @@ static uint32_t pgraph_rdi_read(PGRAPHState *pg,
|
||||
{
|
||||
uint32_t r = 0;
|
||||
switch(select) {
|
||||
case RDI_INDEX_VTX_CONSTANTS0:
|
||||
assert((address / 4) < NV2A_VERTEXSHADER_CONSTANTS);
|
||||
r = pg->vsh_constants[address / 4][3 - address % 4];
|
||||
break;
|
||||
default:
|
||||
fprintf(stderr, "nv2a: unknown rdi read select 0x%x address 0x%x\n",
|
||||
select, address);
|
||||
@ -319,6 +323,13 @@ static void pgraph_rdi_write(PGRAPHState *pg,
|
||||
uint32_t val)
|
||||
{
|
||||
switch(select) {
|
||||
case RDI_INDEX_VTX_CONSTANTS0:
|
||||
assert(false); /* Untested */
|
||||
assert((address / 4) < NV2A_VERTEXSHADER_CONSTANTS);
|
||||
pg->vsh_constants_dirty[address / 4] |=
|
||||
(val != pg->vsh_constants[address / 4][3 - address % 4]);
|
||||
pg->vsh_constants[address / 4][3 - address % 4] = val;
|
||||
break;
|
||||
default:
|
||||
NV2A_DPRINTF("unknown rdi write select 0x%x, address 0x%x, val 0x%08x\n",
|
||||
select, address, val);
|
||||
|
@ -1286,6 +1286,13 @@
|
||||
#define NV_IGRAPH_XF_LTC1_L6 0x12
|
||||
#define NV_IGRAPH_XF_LTC1_L7 0x13
|
||||
|
||||
/* These RDI select values appear to be named by MS.
|
||||
* nvidia seems to refer to RDI_INDEX_VTX_CONSTANTS0 by RDI_RAMSEL_XL_XFCTX.
|
||||
* However, we don't have other nvidia names; so we use these aliases for now.
|
||||
* Eventually we'll probably adopt nouveau names for these internals.
|
||||
*/
|
||||
#define RDI_INDEX_VTX_CONSTANTS0 0x17
|
||||
|
||||
|
||||
#define NV2A_VERTEX_ATTR_POSITION 0
|
||||
#define NV2A_VERTEX_ATTR_WEIGHT 1
|
||||
|
Loading…
Reference in New Issue
Block a user