<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dolphin/Source/Core/VideoCommon/VertexLoaderManager.cpp, branch 2512</title>
<subtitle>GameCube and Wii emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/'/>
<entry>
<title>VideoBackends / VideoCommon: rename member variables in RenderState to be consistent</title>
<updated>2025-08-23T18:50:22+00:00</updated>
<author>
<name>iwubcode</name>
<email>iwubcode@users.noreply.github.com</email>
</author>
<published>2025-08-23T18:35:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=14459bcc1b8d58bedfd68b6f15ab160a284c821e'/>
<id>14459bcc1b8d58bedfd68b6f15ab160a284c821e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>DolphinAnalytics: Use Pascal case for GameQuirk enum</title>
<updated>2025-08-14T20:54:23+00:00</updated>
<author>
<name>Dentomologist</name>
<email>dentomologist@gmail.com</email>
</author>
<published>2025-08-14T20:04:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=3cc00c067692cf70706cc6038348b748f037ff8b'/>
<id>3cc00c067692cf70706cc6038348b748f037ff8b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>VideoCommon: Implement primitive breaking for primitive lists</title>
<updated>2024-10-30T03:38:22+00:00</updated>
<author>
<name>TellowKrinkle</name>
<email>tellowkrinkle@gmail.com</email>
</author>
<published>2024-10-20T20:16:59+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=5ef4fcb005939ac745884c16211348c835136097'/>
<id>5ef4fcb005939ac745884c16211348c835136097</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<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>Memmap: Replace GetPointer with GetSpanForAddress</title>
<updated>2024-04-20T16:31:08+00:00</updated>
<author>
<name>JosJuice</name>
<email>josjuice@gmail.com</email>
</author>
<published>2024-04-13T10:08:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=5c9bb80638ec05b32eaa129a8c763ac6bb3a5cb4'/>
<id>5c9bb80638ec05b32eaa129a8c763ac6bb3a5cb4</id>
<content type='text'>
To ensure memory safety, callers of GetPointer have to perform a bounds
check. But how is this bounds check supposed to be performed?
GetPointerForRange contained one implementation of a bounds check, but
it was cumbersome, and it also isn't obvious why it's correct.

To make doing the right thing easier, this commit changes GetPointer to
return a span that tells the caller how many bytes it's allowed to
access.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
To ensure memory safety, callers of GetPointer have to perform a bounds
check. But how is this bounds check supposed to be performed?
GetPointerForRange contained one implementation of a bounds check, but
it was cumbersome, and it also isn't obvious why it's correct.

To make doing the right thing easier, this commit changes GetPointer to
return a span that tells the caller how many bytes it's allowed to
access.
</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>VertexLoaderManager: Use fill() in Init()</title>
<updated>2024-02-02T04:04:40+00:00</updated>
<author>
<name>Lioncash</name>
<email>mai.iam2048@gmail.com</email>
</author>
<published>2024-02-01T00:46:24+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=4f40bdf501882e7a22cafcfffe62e6c5b4daf875'/>
<id>4f40bdf501882e7a22cafcfffe62e6c5b4daf875</id>
<content type='text'>
Same behavior, less code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Same behavior, less code.
</pre>
</div>
</content>
</entry>
<entry>
<title>VertexLoaderManager: Remove unused entry struct</title>
<updated>2024-02-02T04:04:39+00:00</updated>
<author>
<name>Lioncash</name>
<email>mai.iam2048@gmail.com</email>
</author>
<published>2024-02-01T00:41:50+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=ea95c82a01c531358645dfd30b9e832425a32304'/>
<id>ea95c82a01c531358645dfd30b9e832425a32304</id>
<content type='text'>
This isn't used anywhere, so it can be removed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This isn't used anywhere, so it can be removed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Resolve [-Wclass-memaccess]</title>
<updated>2023-04-12T08:59:57+00:00</updated>
<author>
<name>Minty-Meeo</name>
<email>45425365+Minty-Meeo@users.noreply.github.com</email>
</author>
<published>2023-03-23T17:49:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=678c93589a642a72d8f2122fca681b886e442ccd'/>
<id>678c93589a642a72d8f2122fca681b886e442ccd</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>VideoCommon:VertexLoaderManager: Only update vertex format in shader manager if necessary.</title>
<updated>2023-03-19T23:41:16+00:00</updated>
<author>
<name>Robin Kertels</name>
<email>robin.kertels@gmail.com</email>
</author>
<published>2023-03-19T22:25:00+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=7703fef3a4bbf3a17630b959c4a4b39cf7c416f1'/>
<id>7703fef3a4bbf3a17630b959c4a4b39cf7c416f1</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
