<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dolphin/Source/UnitTests/VideoCommon, branch release-prep-2503</title>
<subtitle>GameCube and Wii emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/'/>
<entry>
<title>Cache normals in addition to binormals and tangents</title>
<updated>2024-10-12T17:32:41+00:00</updated>
<author>
<name>Pokechu22</name>
<email>Pokechu022@gmail.com</email>
</author>
<published>2024-09-25T06:46:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=937bb2aa2e12b635ba328af8de7c9a5d5963d084'/>
<id>937bb2aa2e12b635ba328af8de7c9a5d5963d084</id>
<content type='text'>
Fixes LIT (https://bugs.dolphin-emu.org/issues/13635). The text does not include normals, but has lighting enabled. With the previous default of (0, 0, 0), lighting was always black (as dot(X, (0, 0, 0)) is always 0). It seems like the normal from the map in the background (0, 0, 1) is re-used.

LIT also has the vertex color enabled while vertex color is not specified, the same as SMS's debug cubes; the default MissingColorValue GameINI value of solid white seems to work correctly in this case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes LIT (https://bugs.dolphin-emu.org/issues/13635). The text does not include normals, but has lighting enabled. With the previous default of (0, 0, 0), lighting was always black (as dot(X, (0, 0, 0)) is always 0). It seems like the normal from the map in the background (0, 0, 1) is re-used.

LIT also has the vertex color enabled while vertex color is not specified, the same as SMS's debug cubes; the default MissingColorValue GameINI value of solid white seems to work correctly in this case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge pull request #13015 from tygyh/Use-boolean-literals</title>
<updated>2024-08-16T19:04:45+00:00</updated>
<author>
<name>Tilka</name>
<email>tilkax@gmail.com</email>
</author>
<published>2024-08-16T19:04:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=07557e5d9c2cb73c677ba7c41edc6c644b07ca3c'/>
<id>07557e5d9c2cb73c677ba7c41edc6c644b07ca3c</id>
<content type='text'>
Replace boolean constants with boolean literals</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace boolean constants with boolean literals</pre>
</div>
</content>
</entry>
<entry>
<title>Use 'contains' method</title>
<updated>2024-08-15T21:20:16+00:00</updated>
<author>
<name>mitaclaw</name>
<email>140017135+mitaclaw@users.noreply.github.com</email>
</author>
<published>2024-08-15T21:20:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=9fa4eb9aab4790ab370c92790de4f001eb50871e'/>
<id>9fa4eb9aab4790ab370c92790de4f001eb50871e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace boolean constants with boolean literals</title>
<updated>2024-08-15T05:14:43+00:00</updated>
<author>
<name>Dr. Dystopia</name>
<email>jonis9898@hotmail.com</email>
</author>
<published>2024-07-28T20:28:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=309df9ed5bbfefc68fb0cf6285b41324961aebbc'/>
<id>309df9ed5bbfefc68fb0cf6285b41324961aebbc</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove self-comparison</title>
<updated>2024-08-14T12:50:15+00:00</updated>
<author>
<name>Dr. Dystopia</name>
<email>jonis9898@hotmail.com</email>
</author>
<published>2024-08-14T06:22:57+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=15500198d8f3b5028fa8ee01ef7086af0b76fe04'/>
<id>15500198d8f3b5028fa8ee01ef7086af0b76fe04</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace Common::BitCast with std::bit_cast</title>
<updated>2024-05-04T01:43:51+00:00</updated>
<author>
<name>Pokechu22</name>
<email>Pokechu022@gmail.com</email>
</author>
<published>2022-08-06T04:10:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=fbbfea8e8e536800a6a911eb90cecdd1f343f9e3'/>
<id>fbbfea8e8e536800a6a911eb90cecdd1f343f9e3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix out of bounds accesses for invalid vertex component formats</title>
<updated>2024-04-04T19:50:34+00:00</updated>
<author>
<name>Pokechu22</name>
<email>Pokechu022@gmail.com</email>
</author>
<published>2024-04-02T04:37:11+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=a3951dc2d72ebb6f240d592fdbb348137130ce49'/>
<id>a3951dc2d72ebb6f240d592fdbb348137130ce49</id>
<content type='text'>
On all platforms, this would result in out of bounds accesses when getting the component sizes (which uses stuff from VertexLoader_Position.h/VertexLoader_TextCoord.h/VertexLoader_Normal.h). On platforms other than x64 and ARM64, this would also be out of bounds accesses when getting function pointers for the non-JIT vertex loader (in VertexLoader_Position.cpp etc.). Usually both of these would get data from other entries in the same multi-dimensional array, but the last few entries would be truly out of bounds. This does mean that an out of bounds function pointer can be called on platforms that don't have a JIT vertex loader, but it is limited to invalid component formats with values 5/6/7 due to the size of the bitfield the formats come from, so it seems unlikely that this could be exploited in practice.

This issue affects a few games; Def Jam: Fight for New York (https://bugs.dolphin-emu.org/issues/12719) and Fifa Street are known to be affected.

I have not done any hardware testing for this PR specifically, though I *think* I previously determined that at least a value of 5 behaves the same as float (4). That's what I implemented in any case. I did previously determine that both Def Jam: Fight for New York and Fifa Street use an invalid normal format, but don't actually have lighting enabled when that normal vector is used, so it doesn't change rendering in practice.

The color component format also has two invalid values, but VertexLoader_Color.h/.cpp do check for those invalid ones and return a default value instead of doing an out of bounds access.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
On all platforms, this would result in out of bounds accesses when getting the component sizes (which uses stuff from VertexLoader_Position.h/VertexLoader_TextCoord.h/VertexLoader_Normal.h). On platforms other than x64 and ARM64, this would also be out of bounds accesses when getting function pointers for the non-JIT vertex loader (in VertexLoader_Position.cpp etc.). Usually both of these would get data from other entries in the same multi-dimensional array, but the last few entries would be truly out of bounds. This does mean that an out of bounds function pointer can be called on platforms that don't have a JIT vertex loader, but it is limited to invalid component formats with values 5/6/7 due to the size of the bitfield the formats come from, so it seems unlikely that this could be exploited in practice.

This issue affects a few games; Def Jam: Fight for New York (https://bugs.dolphin-emu.org/issues/12719) and Fifa Street are known to be affected.

I have not done any hardware testing for this PR specifically, though I *think* I previously determined that at least a value of 5 behaves the same as float (4). That's what I implemented in any case. I did previously determine that both Def Jam: Fight for New York and Fifa Street use an invalid normal format, but don't actually have lighting enabled when that normal vector is used, so it doesn't change rendering in practice.

The color component format also has two invalid values, but VertexLoader_Color.h/.cpp do check for those invalid ones and return a default value instead of doing an out of bounds access.
</pre>
</div>
</content>
</entry>
<entry>
<title>VertexLoaderTest: Resolve -Wdangling-else warnings</title>
<updated>2023-12-11T23:45:25+00:00</updated>
<author>
<name>Lioncash</name>
<email>mai.iam2048@gmail.com</email>
</author>
<published>2023-12-11T23:45:23+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=4229d76ad6a9668aa3d380d1c79fa10b3d5adf86'/>
<id>4229d76ad6a9668aa3d380d1c79fa10b3d5adf86</id>
<content type='text'>
The ways the assertion macros expand end up generating -Wdangling-else
warnings. Trivial enough to fix by just bracing the if statements.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The ways the assertion macros expand end up generating -Wdangling-else
warnings. Trivial enough to fix by just bracing the if statements.
</pre>
</div>
</content>
</entry>
<entry>
<title>VertexLoaderTest: Add test for skipped texture coordinates</title>
<updated>2023-12-02T23:54:52+00:00</updated>
<author>
<name>Pokechu22</name>
<email>Pokechu022@gmail.com</email>
</author>
<published>2023-12-02T23:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=1ee6824324979b186baca2b5266be9c20e88c78a'/>
<id>1ee6824324979b186baca2b5266be9c20e88c78a</id>
<content type='text'>
Jimmie Johnson's Anything with an Engine is known to use texture coordinate 7 (and only texture coordinate 7) in some cases. There are a lot of possible edge-cases, so this test brute-forces all combinations with coordinates 0, 1, and 2.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Jimmie Johnson's Anything with an Engine is known to use texture coordinate 7 (and only texture coordinate 7) in some cases. There are a lot of possible edge-cases, so this test brute-forces all combinations with coordinates 0, 1, and 2.
</pre>
</div>
</content>
</entry>
<entry>
<title>VertexLoaderTest: Add test for skipped colors</title>
<updated>2023-12-02T23:53:59+00:00</updated>
<author>
<name>Pokechu22</name>
<email>Pokechu022@gmail.com</email>
</author>
<published>2023-12-02T22:13:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=530590d1622b09568ddfa74eaf8764490a59ca65'/>
<id>530590d1622b09568ddfa74eaf8764490a59ca65</id>
<content type='text'>
This test fails with the non-JIT vertex loader due to an issue fixed in a later commit in this PR. (Note that the non-JIT vertex loader is only used on machines where no JIT is available or if COMPARE_VERTEXLOADERS is enabled in VertexLoaderBase.cpp.)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This test fails with the non-JIT vertex loader due to an issue fixed in a later commit in this PR. (Note that the non-JIT vertex loader is only used on machines where no JIT is available or if COMPARE_VERTEXLOADERS is enabled in VertexLoaderBase.cpp.)
</pre>
</div>
</content>
</entry>
</feed>
