Skip to content
Permalink
Browse files

rnndb/nv3: Nailed down a few D3D things.

  • Loading branch information
mwkmwkmwk committed Oct 30, 2016
1 parent 8ca1f32 commit 1b28cd501ccaef3df1f803a26b876f40bfc1de4e
Showing with 77 additions and 51 deletions.
  1. +2 −1 rnndb/fifo/nv_object.xml
  2. +50 −12 rnndb/graph/nv3_3d.xml
  3. +25 −38 rnndb/graph/nv3_pgraph.xml
@@ -174,7 +174,8 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
<!-- old-style pre-nv20 3D objects -->
<value value="0x005a" name="NV3_SURFACE_COLOR" variants="NV3:G80"/>
<value value="0x005b" name="NV3_SURFACE_ZETA" variants="NV3:G80"/>
<value value="0x0048" name="NV3_TEXTURED_TRIANGLE" variants="NV3:NV15"/>
<value value="0x0047" name="NV3_ZPOINT" variants="NV3:NV4"/> <!-- not actual hw class id -->
<value value="0x0048" name="NV3_D3D" variants="NV3:NV15"/>

<value value="0x0054" name="NV4_TEXTURED_TRIANGLE" variants="NV4:NV20"/>
<value value="0x0094" name="NV10_TEXTURED_TRIANGLE" variants="NV10:NV20"/>
@@ -31,8 +31,46 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
<value value="8" name="ALWAYS"/>
</enum>

<enum name="nv3_write_enable" inline="yes">
<value value="0" name="NEVER"/>
<value value="1" name="ALPHA"/>
<value value="2" name="ALPHA_AND_Z_TEST"/>
<value value="3" name="Z_TEST"/>
<value value="4" name="ALWAYS"/>
</enum>

<domain name="SUBCHAN" bare="yes">
<stripe prefix="obj-class" variants="NV3_TEXTURED_TRIANGLE">
<stripe prefix="obj-class" variants="NV3_ZPOINT">
<reg32 offset="0x0304" name="CONFIG">
<bitfield low="16" high="19" name="Z_FUNC" type="nv3_comparison_op"/>
<bitfield low="20" high="22" name="ZETA_WRITE_ENABLE" type="nv3_write_enable"/>
<bitfield low="24" high="26" name="COLOR_WRITE_ENABLE" type="nv3_write_enable"/>
<bitfield pos="28" name="ROP">
<value value="0" name="BLEND"/>
<value value="1" name="ADD"/>
</bitfield>
<bitfield pos="29" name="BETA">
<value value="0" name="SRCALPHA"/>
<value value="1" name="DSTCOLOR"/>
</bitfield>
<bitfield pos="30" name="DST_BLEND">
<value value="0" name="INVBETA"/>
<value value="1" name="ZERO"/>
</bitfield>
<bitfield pos="31" name="SRC_BLEND">
<value value="0" name="BETA"/>
<value value="1" name="ZERO"/>
</bitfield>
</reg32>
<reg32 offset="0x0308" name="ALPHA">
<bitfield low="0" high="7" name="ALPHA_REF"/>
<bitfield low="8" high="11" name="ALPHA_FUNC" type="nv3_comparison_op"/>
</reg32>
<reg32 offset="0x07fc" name="POINT" type="xy16"/>
<reg32 offset="0x0800" length="0x100" stride="8" name="COLOR"/>
<reg32 offset="0x0804" length="0x100" stride="8" name="ZETA"/>
</stripe>
<stripe prefix="obj-class" variants="NV3_D3D">
<reg32 offset="0x010c" name="PATCH"/>
<reg32 offset="0x0180" name="DMA_NOTIFY" type="object"/>
<reg32 offset="0x0184" name="DMA_TEXTURE" type="object"/>
@@ -63,7 +101,7 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
<bitfield name="G" high="15" low="8" type="int"/>
<bitfield name="R" high="23" low="16" type="int"/>
</reg32>
<reg32 offset="0x0314" name="CONTROL_OUT">
<reg32 offset="0x0314" name="CONFIG">
<bitfield name="INTERPOLATOR" high="3" low="0">
<value value="0" name="ZOH_CORNER"/>
<value value="0" name="ZOH_CENTER"/>
@@ -83,29 +121,29 @@ xsi:schemaLocation="http://nouveau.freedesktop.org/ rules-ng.xsd">
<value value="0x3" name="CW"/>
</bitfield>
<bitfield name="Z_PERSPECTIVE_ENABLE" pos="15" type="boolean"/>
<bitfield name="Z_FUNC" high="19" low="16" type="nv3_comparison_op"/>
<bitfield name="Z_WRITE_ENABLE" pos="20" type="boolean"/>
<bitfield name="COLOR_WRITE_ENABLE" pos="24" type="boolean"/>
<bitfield name="ROP" high="28" low="27">
<bitfield low="16" high="19" name="Z_FUNC" type="nv3_comparison_op"/>
<bitfield low="20" high="22" name="ZETA_WRITE_ENABLE" type="nv3_write_enable"/>
<bitfield low="24" high="26" name="COLOR_WRITE_ENABLE" type="nv3_write_enable"/>
<bitfield pos="28" name="ROP">
<value value="0" name="BLEND"/>
<value value="1" name="ADD"/>
</bitfield>
<bitfield name="BETA" pos="29">
<bitfield pos="29" name="BETA">
<value value="0" name="SRCALPHA"/>
<value value="1" name="DSTCOLOR"/>
</bitfield>
<bitfield name="DST_BLEND" pos="30">
<bitfield pos="30" name="DST_BLEND">
<value value="0" name="INVBETA"/>
<value value="1" name="ZERO"/>
</bitfield>
<bitfield name="SRC_BLEND" pos="31">
<bitfield pos="31" name="SRC_BLEND">
<value value="0" name="BETA"/>
<value value="1" name="ZERO"/>
</bitfield>
</reg32>
<reg32 offset="0x0318" name="ALPHA_CONTROL">
<bitfield name="ALPHA_REF" high="7" low="0" type="int"/>
<bitfield name="ALPHA_FUNC" high="31" low="8" type="nv3_comparison_op"/>
<reg32 offset="0x0318" name="ALPHA">
<bitfield low="0" high="7" name="ALPHA_REF"/>
<bitfield low="8" high="11" name="ALPHA_FUNC" type="nv3_comparison_op"/>
</reg32>
<reg32 offset="0x1000" name="TLVERTEX_SPECULAR" length="128" stride="32">
<bitfield name="I0" high="3" low="0" type="int"/>
@@ -53,7 +53,8 @@
-->
<bitfield pos="9" name="CLUT_BYPASS"/>
<bitfield pos="10" name="UNK10"/>
<bitfield pos="12" name="UNK12"/>
<!-- For D3D and ZPOINT. If enabled, ZETA is always surface 3. -->
<bitfield pos="12" name="ZETA_ENABLE"/>
<bitfield pos="13" name="CHROMA"/>
<!-- does not actually work -->
<bitfield pos="14" name="PLANE"/>
@@ -150,7 +151,7 @@
<bitfield pos="16" name="UNK16"/>
<bitfield pos="17" name="UNK17"/>
<bitfield pos="20" name="UNK20"/>
<bitfield pos="21" name="UNK21"/>
<bitfield pos="21" name="D3D_UNK21"/> <!-- setting tends to hang things -->
<bitfield pos="24" name="UNK24"/>
<!-- if set, obj switch will trigger a volatile reset -->
<bitfield pos="28" name="VOLATILE_RESET_ENABLE"/>
@@ -166,9 +167,9 @@
<bitfield pos="12" name="UNK12"/>
<bitfield pos="13" name="UNK13"/>
<bitfield pos="14" name="UNK14"/>
<bitfield pos="15" name="UNK15"/>
<bitfield pos="16" name="UNK16"/>
<bitfield pos="17" name="UNK17"/>
<bitfield pos="15" name="D3D_DITHER_ENABLE"/>
<bitfield pos="16" name="D3D_UNK16"/>
<bitfield pos="17" name="D3D_UNK17"/> <!-- setting tends to hang things -->
<bitfield pos="20" name="DATA_CHECK_ENABLE"/>
<bitfield pos="21" name="DATA_CHECK_FORCE_FAIL"/>
<bitfield pos="22" name="FORMAT_CHECK_ENABLE"/>
@@ -356,6 +357,7 @@
<reg32 offset="0x0548" name="UCLIP_YMAX"/>
<reg32 offset="0x054c" name="MISC32_1">
<!-- SIFM: POINT -->
<!-- ZPOINT: ZETA -->
<!-- D3D: TEX_FILTER -->
<!-- BITMAP: MONO_COLOR_1 -->
</reg32>
@@ -429,31 +431,25 @@
<value value="3" name="UNK3"/>
</bitfield>
<bitfield pos="15" name="UNK15"/>
<bitfield low="16" high="19" name="UNK16">
<value value="1" name="UNK1"/>
<value value="2" name="UNK2"/>
<value value="3" name="UNK3"/>
<value value="4" name="UNK4"/>
<value value="5" name="UNK5"/>
<value value="6" name="UNK6"/>
<value value="7" name="UNK7"/>
<value value="8" name="UNK8"/>
<bitfield low="16" high="19" name="Z_FUNC" type="nv3_comparison_op"/>
<bitfield low="20" high="22" name="ZETA_WRITE_ENABLE" type="nv3_write_enable"/>
<bitfield low="24" high="26" name="COLOR_WRITE_ENABLE" type="nv3_write_enable"/>
<bitfield pos="28" name="ROP">
<value value="0" name="BLEND"/>
<value value="1" name="ADD"/>
</bitfield>
<bitfield low="20" high="22" name="UNK20">
<value value="0" name="UNK0"/>
<value value="1" name="UNK1"/>
<value value="2" name="UNK2"/>
<value value="3" name="UNK3"/>
<value value="4" name="UNK4"/>
<bitfield pos="29" name="BETA">
<value value="0" name="SRCALPHA"/>
<value value="1" name="DSTCOLOR"/>
</bitfield>
<bitfield low="24" high="26" name="UNK24">
<value value="0" name="UNK0"/>
<value value="1" name="UNK1"/>
<value value="2" name="UNK2"/>
<value value="3" name="UNK3"/>
<value value="4" name="UNK4"/>
<bitfield pos="30" name="DST_BLEND">
<value value="0" name="INVBETA"/>
<value value="1" name="ZERO"/>
</bitfield>
<bitfield pos="31" name="SRC_BLEND">
<value value="0" name="BETA"/>
<value value="1" name="ZERO"/>
</bitfield>
<bitfield low="28" high="31" name="UNK28"/>
</reg32>
<!-- 648, 64c -->
<reg32 offset="0x0650" name="SURF_PITCH" length="4"/> <!-- 00001ff0 -->
@@ -506,17 +502,8 @@
<reg32 offset="0x06bc" name="TRAPPED_GINST"/>
<!-- 6c0-6c4 -->
<reg32 offset="0x06c8" name="D3D_ALPHA">
<bitfield low="0" high="7" name="UNK0"/>
<bitfield low="8" high="11" name="UNK8">
<value value="1" name="UNK1"/>
<value value="2" name="UNK2"/>
<value value="3" name="UNK3"/>
<value value="4" name="UNK4"/>
<value value="5" name="UNK5"/>
<value value="6" name="UNK6"/>
<value value="7" name="UNK7"/>
<value value="8" name="UNK8"/>
</bitfield>
<bitfield low="0" high="7" name="ALPHA_REF"/>
<bitfield low="8" high="11" name="ALPHA_FUNC" type="nv3_comparison_op"/>
</reg32>
<bitset name="NV3_PGRAPH_DMA_INTR">
<bitfield pos="0" name="UNK0"/>

0 comments on commit 1b28cd5

Please sign in to comment.
You can’t perform that action at this time.