<feed xmlns='http://www.w3.org/2005/Atom'>
<title>dolphin/Source/Core/VideoCommon/VertexLoader_Position.h, branch release-prep-2603a</title>
<subtitle>GameCube and Wii emulator</subtitle>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/'/>
<entry>
<title>linter: Apply clang-format 19.1 formatting</title>
<updated>2025-04-23T09:19:20+00:00</updated>
<author>
<name>Joshua Vandaële</name>
<email>joshua@vandaele.software</email>
</author>
<published>2025-03-17T11:14:32+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=2c54ee94c1bed2b958478e302307be4d056321a5'/>
<id>2c54ee94c1bed2b958478e302307be4d056321a5</id>
<content type='text'>
find ./Source/ -name '*.cpp' -o -name '*.h' | xargs clang-format-19 -i
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
find ./Source/ -name '*.cpp' -o -name '*.h' | xargs clang-format-19 -i
</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>VertexLoader: Inline GetSize</title>
<updated>2022-09-15T10:50:15+00:00</updated>
<author>
<name>Robin Kertels</name>
<email>robin.kertels@gmail.com</email>
</author>
<published>2022-09-14T21:58:09+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=fdcd2b7d009cece6ad090143ce954aed713bb11c'/>
<id>fdcd2b7d009cece6ad090143ce954aed713bb11c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>treewide: convert GPLv2+ license info to SPDX tags</title>
<updated>2021-07-05T02:35:56+00:00</updated>
<author>
<name>Pierre Bourdon</name>
<email>delroth@gmail.com</email>
</author>
<published>2021-07-05T01:22:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=e149ad4f0a9874f354221a7fc76d8f1841e47808'/>
<id>e149ad4f0a9874f354221a7fc76d8f1841e47808</id>
<content type='text'>
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
SPDX standardizes how source code conveys its copyright and licensing
information. See https://spdx.github.io/spdx-spec/1-rationale/ . SPDX
tags are adopted in many large projects, including things like the Linux
kernel.
</pre>
</div>
</content>
</entry>
<entry>
<title>Convert CPMemory to BitField and enum class</title>
<updated>2021-03-07T03:27:08+00:00</updated>
<author>
<name>Pokechu22</name>
<email>Pokechu022@gmail.com</email>
</author>
<published>2021-02-08T23:22:10+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=f749fcfa9f42cda679ff7f4288c8418d2b56b08d'/>
<id>f749fcfa9f42cda679ff7f4288c8418d2b56b08d</id>
<content type='text'>
Additionally, VCacheEnhance has been added to UVAT_group1.  According to YAGCD, this field is always 1.

TVtxDesc also now has separate low and high fields whose hex values correspond with the proper registers, instead of having one 33-bit value.  This change was made in a way that should be backwards-compatible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Additionally, VCacheEnhance has been added to UVAT_group1.  According to YAGCD, this field is always 1.

TVtxDesc also now has separate low and high fields whose hex values correspond with the proper registers, instead of having one 33-bit value.  This change was made in a way that should be backwards-compatible.
</pre>
</div>
</content>
</entry>
<entry>
<title>VertexLoader_Position: Tidy up public function definitions</title>
<updated>2019-05-30T14:29:50+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2019-05-30T13:33:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=6f656b72199ba95398d5a0b08cab7f7a5db9e876'/>
<id>6f656b72199ba95398d5a0b08cab7f7a5db9e876</id>
<content type='text'>
We can use u32 instead of unsigned int to shorten up these definitions
and make them much nicer to read.

While we're at it, change the size array to house u32 elements to match
the return value of the function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can use u32 instead of unsigned int to shorten up these definitions
and make them much nicer to read.

While we're at it, change the size array to house u32 elements to match
the return value of the function.
</pre>
</div>
</content>
</entry>
<entry>
<title>Common: Move byte swapping utilities into their own header</title>
<updated>2017-03-03T22:18:18+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2017-03-03T19:43:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=552c0d8404ebd1e0cfa71c2d14ecb81c40f4cd70'/>
<id>552c0d8404ebd1e0cfa71c2d14ecb81c40f4cd70</id>
<content type='text'>
This moves all the byte swapping utilities into a header named Swap.h.

A dedicated header is much more preferable here due to the size of the
code itself. In general usage throughout the codebase, CommonFuncs.h was
generally only included for these functions anyway. These being in their
own header avoids dumping the lesser used utilities into scope. As well
as providing a localized area for more utilities related to byte
swapping in the future (should they be needed). This also makes it nicer
to identify which files depend on the byte swapping utilities in
particular.

Since this is a completely new header, moving the code uncovered a few
indirect includes, as well as making some other inclusions unnecessary.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This moves all the byte swapping utilities into a header named Swap.h.

A dedicated header is much more preferable here due to the size of the
code itself. In general usage throughout the codebase, CommonFuncs.h was
generally only included for these functions anyway. These being in their
own header avoids dumping the lesser used utilities into scope. As well
as providing a localized area for more utilities related to byte
swapping in the future (should they be needed). This also makes it nicer
to identify which files depend on the byte swapping utilities in
particular.

Since this is a completely new header, moving the code uncovered a few
indirect includes, as well as making some other inclusions unnecessary.
</pre>
</div>
</content>
</entry>
<entry>
<title>Reformat all the things. Have fun with merge conflicts.</title>
<updated>2016-06-24T08:43:46+00:00</updated>
<author>
<name>Pierre Bourdon</name>
<email>delroth@gmail.com</email>
</author>
<published>2016-06-24T08:43:46+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=3570c7f03a2aa90aa634f96c0af1969af610f14d'/>
<id>3570c7f03a2aa90aa634f96c0af1969af610f14d</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>VideoCommon: Header cleanup</title>
<updated>2016-01-18T01:11:45+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2016-01-17T21:54:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=d9fec92628231526b47e19cd09b68572eb06e44f'/>
<id>d9fec92628231526b47e19cd09b68572eb06e44f</id>
<content type='text'>
Also remedies places where the video backends and core rely on things
being indirectly included.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Also remedies places where the video backends and core rely on things
being indirectly included.
</pre>
</div>
</content>
</entry>
<entry>
<title>General: Remove unimplemented function prototypes</title>
<updated>2015-09-06T02:01:07+00:00</updated>
<author>
<name>Lioncash</name>
<email>mathew1800@gmail.com</email>
</author>
<published>2015-09-05T20:06:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.dog6.net/dolphin/commit/?id=633be0387d7aa7f4bf9a57179e46bcb746c6a92f'/>
<id>633be0387d7aa7f4bf9a57179e46bcb746c6a92f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
