New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VideoCommon: Handle emboss texgen with only a single normal #10584
Conversation
7b44fc6
to
5cee340
Compare
|
Well the terrain looks pretty close to perfect in both RS2 and RS3. But there are major issues with the AT-AT. When you zoom in, all 4 feet are wrong, it's just the back-right one is more wrong than the others. Dolphin always has much less emboss than real hardware, Especially with the horizontal ring around the foot. I'm wondering if perhaps the binormals get cached before being multiplied with the normal matrix? That seems to produce a result closer to the real hardware. What it shows is that the back-rear foot of the AT-AT has a very different normal matrix to the other three feet. That might be why is it shows up so differently to the other foot in dolphin. |
20329a7
to
384097e
Compare
I tried that out, and it gives correct results! It doesn't exactly match what Factor 5 wrote in the article, but maybe they only discovered this behavior when working on RS3 (and thus they only change the normal matrix in RS3 and not in RS2)? I've updated my notes with some details and images from the hardware fifoplayer that helped me confirm this (basically, I manually disabled the normal matrix changes for the nearest AT-AT and the embossing changed in addition to the lighting). Here's some new images of it: |
7ee2d8e
to
067adad
Compare
Comparing your screenshots, I agree. This produces a very close match.
I'm not even sure what effect they are expecting here. It seems to be simply applying a uniform level of emboss across the whole object. It doesn't respond to light on a per-vertex basis (apart from the fact that TEV is configured to only show the emboss result on lit surfaces). I feel like they could have gotten better performance by calculating the emboss offset in software, skipping the texgen and applying it directly in TEV. Or baking the emboss into a texture into a texture and skipping a TEV stage. Maybe they did it this way just so the emboss direction would respond to the light direction? |
067adad
to
eab8932
Compare
|
I don't have the knowledge needed to understand the PR overall, but I've tested and reviewed the AArch64-specific parts and they seem fine. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me
| MultiplyVec3Mat33(src->normal[1], mat, dst->normal[1]); | ||
| MultiplyVec3Mat33(src->normal[2], mat, dst->normal[2]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It bugs me that this is always wasting resources transforming the binomials when they might not be used. Especially when the transformed binormals are only used by emboss map.
Makes me ponder about what might be happening on the real hardware.
I really doubt it's looking ahead to see if there going to be an emboss map texgen or not.
Maybe XF can transform these binormals in parallel with earlier texgens on unused resources? Or maybe it actually applies the normal transform when it actually gets used in the emboss map texgen?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be interesting to test what happens when using a regular texgen with the source row as BinormalT or BinormalN. Only the regular texgen allows for use of one or two texture coordinate matrices, so maybe the time that would be spent for that is used to transform the normals otherwise? (I'm not sure what would be happening with Color0 or Color1 though, as I'd assume the color would already be transformed by that point so I don't know what extra work it would be doing)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well when regular texgen use binormals as source, they get the raw binormals without any transform.
It's also worth noting that diagrams in the patents show separate functional units for applying position/normal transforms (dot product unit) and texgen's texture coordinate matrix operations (texture dot 2; Do texture coordinate matrix operations happen in fixed point?), so as long as there are a few texgen operations before any emboss map operations, the binomals transform would have time to complete in parallel
(And then lighting is done in a completely separate pipeline with it's own functional units)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's also odd that the article says:
Finally, emboss mapping (as bump mapping) needs binormals to describe the orientation of the height field on the surface. Since they need to be transformed the same way the normals are transformed this can add a bit overhead.
and also
This means that only one vertex format is needed for the entire landscape, and it saves memory, transfer bandwidth and most importantly transform performance.
That implies that it is faster (and they could have measured the performance improvement with GX_PERF0_XF_XFRM_CLKS, and it's likely they did). The article doesn't mention changing the normal matrix, though, and says that "XF will provide the previously transformed bi-normal and tangent, which reside in internal registers", which is inconsistent with what we've determined. (The article was written for RS2, which doesn't change the normal matrix while using this trick (that I've seen), so this may just have been their understanding of how it worked at the time.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really suspect faulty-recall here. That they forgot exactly what they were optimising for between when they did the optimisation and when they wrote the article.
It doesn't seem like they were actually optimising for GX_PERF0_XF_XFRM_CLKS. If I'm understanding the graphical effect correctly, the amount of emboss is identical across the entire frame.
It feels like there should have been multiple ways to achieve the same effect that would have been cheaper for both XF and TEV performance, at the expense of some per-frame overhead. For example, baking the summed emboss effect into a texture each frame would have reduced the number of texture lookups by one, potentially eliminated a TEV stage and or or two XF texgen channels.
With the fact that we know the transform gets applied anyway, and with the wild overlapping of color channels, it really feels like they are optimising solely for memory bandwidth. Both CPU -> RAM bandwidth, and RAM -> CP bandwidth.
| if (!vdec.normals[1].enable) | ||
| { | ||
| m_vertex.normal[1][0] = VertexShaderManager::constants.cached_binormal[0]; | ||
| m_vertex.normal[1][1] = VertexShaderManager::constants.cached_binormal[1]; | ||
| m_vertex.normal[1][2] = VertexShaderManager::constants.cached_binormal[2]; | ||
| } | ||
| if (!vdec.normals[2].enable) | ||
| { | ||
| m_vertex.normal[2][0] = VertexShaderManager::constants.cached_tangent[0]; | ||
| m_vertex.normal[2][1] = VertexShaderManager::constants.cached_tangent[1]; | ||
| m_vertex.normal[2][2] = VertexShaderManager::constants.cached_tangent[2]; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've just realized that these names are backwards; based on the order the components are listed in table III of US6424348B2, it's normal, tangent, binormal (although other parts refer to GX_VA_NBT and normal/binormal/tangent). See also this code and the values for BinormalT and BinormalB.
Since I've consistently had binormal be at index 1 and tangent at index 2, this doesn't result in any emulation difference, but I should probably swap the names for consistency.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've swapped the names.
3da5d51
to
fba34a7
Compare
| // The following assert was triggered in House of the Dead Overkill and Star Wars Rogue | ||
| // Squadron 2 | ||
| // ASSERT(0); // should have normals |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| if ((uid_data->components & VB_HAS_NRM0) != 0) | ||
| { | ||
| if ((uid_data->components & VB_HAS_NRM1) == 0) | ||
| out.Write("float3 rawnorm1 = " I_CACHED_TANGENT ".xyz;\n"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Calling these normals is a bit strange. AFAIK a normal is typically a single vector that is perpendicular to the surface.
Maybe instead of rawnorm1 we use rawtangent. Same for rawnorm2 to be rawbinormal.
I imagine we also can change the _norm1 as well. I'm not sure yet what the N0, N1, etc values are so I can't say whether that variable makes sense. But the other values will then be consistent with general graphics operations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
N0, N1, and N2 are the rows of the normal transformation matrix; P0, P1, and P2 are similarly the rows of the position transformation matrix.
Renaming rawnorm1 and _norm1 could be a bit invasive, but I'm not opposed to doing it. (It'd also make sense to rename _norm0 to just _norm.) I think this naming scheme mostly comes from the vertex loader code referring to a normal count (either 1 or 3), and in turn Nintendo somewhat treating things the same way (though it's either N or NBT).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's also this (for D3D):
dolphin/Source/Core/VideoCommon/VertexShaderGen.cpp
Lines 171 to 177 in 2e01dc0
| // inputs | |
| if ((uid_data->components & VB_HAS_NRM0) != 0) | |
| out.Write(" float3 rawnorm0 : NORMAL0,\n"); | |
| if ((uid_data->components & VB_HAS_NRM1) != 0) | |
| out.Write(" float3 rawnorm1 : NORMAL1,\n"); | |
| if ((uid_data->components & VB_HAS_NRM2) != 0) | |
| out.Write(" float3 rawnorm2 : NORMAL2,\n"); |
D3D has dedicated semantics for NORMAL/TANGENT/BINORMAL, though it doesn't explain what they do differently. I'll switch to those too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks pokechu, I think that'll make it easier for anyone who is more familiar with graphics logic to understand what is going on. I might end up using these for an enhancement type feature in the near future.
I'm still curious why N0, N1, N2 forms a separate matrix from the normal/binorma/tangent. I'm not a graphics guru but I just find it surprising, I wonder what its purpose was.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if it's to change the space of the vectors. At least it looks like the normal/binormal/tangent are being orthnormalized to the new space? (been a while since I've done that so I might be wrong)
EDIT: guess model -> tangent space?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You might need to set #pragma pack_matrix( row_major ) for it to work as expected
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we can't get matrices working, I think we should add a comment where the matrix multiply is done (with dot products) to make it clear to the reader that a matrix multiply is being implemented.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And put the comment in the actual generated shader source... not just the code that generates it.
We kind of want those shaders to be readable too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've done that for the first one (with the position matrix), but the same pattern is used throughout for both specialized shaders and ubershaders for normals, the projection matrix, texture coordinate transformation, and dual tex transform. Adding it for each seems a bit messy, and is non-trivial for the texture coordinate ones due to how they're generated; it'd be nice to refactor it but I think it's out of scope for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
out-of-scope is fine with me.
fba34a7
to
3f7fbb5
Compare
| @@ -202,7 +233,9 @@ int VertexLoaderX64::ReadVertex(OpArg data, VertexComponentFormat attribute, Com | |||
| dest.AddMemOffset(sizeof(float)); | |||
|
|
|||
| // zfreeze | |||
| if (native_format == &m_native_vtx_decl.position) | |||
| if (native_format == &m_native_vtx_decl.position || | |||
| native_format == &m_native_vtx_decl.normals[1] || | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn't have to be this review, but could (should?) this be normal, binormal and tangent? Are we gaining anything by them being in an array?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like the if (vert_decl.normals[1].enable) would read more clearly below as if (vert_decl.binormal.enable).
(I know I'm nitpicking a bit here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's convenient to be able to iterate over them because they all share the same format, but it's a lot more messy now that special-casing is needed (on master there isn't any situation where indices 1 and 2 were directly referenced like this).
| // Only update the binormal/tangent vertex shader constants if the vertex format lacks binormals | ||
| // (VertexLoaderManager::binormal_cache gets updated by the vertex loader when binormals are | ||
| // present, though) | ||
| if (vert_decl.normals[1].enable) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ever a case where normal[1] will be set and normal[2] will not?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. The 3 options are for the vertex format are:
- None
- Normals only
- Normals + Binormals + Tangents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. The existing code doesn't make that super clear though (with separate VB_HAS_TANGENT/VB_HAS_BINORMAL (VB_HAS_NRM1 and VB_HAS_NRM2) constants, and the array). There's either 0 normals (vtx_desc.low.Normal == VertexComponentFormat::NotPresent), 1 normal (vtx_desc.low.Normal != VertexComponentFormat::NotPresent and vtx_attr.g0.NormalElements == NormalComponentCount::N), or 3 normals (vtx_desc.low.Normal != VertexComponentFormat::NotPresent and vtx_attr.g0.NormalElements == NormalComponentCount::NBT). (There's also the NormalIndex3 mode, which allows choosing between specifying a single index for the normal, binormal, and tangent, or specifying one index for each of them.) Relevant code: here and here (roughly).
It also isn't possible for normal[1] to be set but normal[0] to be unset (which again the logic doesn't make obvious).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you both for clarifying!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy with this
This is a readability change; there should be no functional or performance differences.
Before, it would always write to index 0 (which is unused). Now it writes to the correct index.
(Specifically, the copy for VertexLoaderManager::position_cache. The position matrix index happens elsewhere, and the float path still has special logic to copy to scratch3.)
This more accurately represents what's going on, and also ends at 0 instead of 1, making some indexing operations easier. This also changes it so that position_matrix_index_cache actually starts from index 0 instead of index 1.
Fixes a large number of effects in Rogue Squadron 2 and 3.
…rmalized Co-authored-by: Scott Mansell <phiren@gmail.com>
3f7fbb5
to
7840798
Compare
|
FifoCI detected that this change impacts graphical rendering. Here are the behavior differences detected by the system:
automated-fifoci-reporter |
|
Multiple approvals and it touches Rogue Squadron 2/3? What have I done to deserve such a bounty. |
commit 4c080b8 Merge: e0afcb3 a7111e3 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 23 22:23:31 2022 +0200 Merge pull request dolphin-emu#10578 from TryTwo/PR_MemoryWidget_Dual_Views Debugger MemoryWidget: Add dual views commit e0afcb3 Merge: cb5e967 b5a7ae5 Author: JosJuice <josjuice@gmail.com> Date: Sat Apr 23 22:04:10 2022 +0200 Merge pull request dolphin-emu#10540 from nyanpasu64/fix-gcadapter-atomics Remove atomic usage and fix mutex locking in GCAdapter code commit cb5e967 Merge: 8b5a61b 235f729 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 23 21:07:35 2022 +0200 Merge pull request dolphin-emu#10596 from richarm4/patch-3 Added space in comment commit 235f729 Author: Matthew Richards-Wells <91291346+richarm4@users.noreply.github.com> Date: Wed Apr 20 12:49:17 2022 -0700 GameSettings: Add missing space in comment. commit 8b5a61b Merge: 19c71db 12cd81b Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 23 20:32:47 2022 +0200 Merge pull request dolphin-emu#10599 from shuffle2/libusb Libusb fixups commit 19c71db Merge: 69ca38d f5f5262 Author: Mai M <mathew1800@gmail.com> Date: Sat Apr 23 06:10:20 2022 -0400 Merge pull request dolphin-emu#10597 from Simonx22/fix-ingame-menu-design Android: Fix in game menu rippleColor and colorEdgeEffect commit a7111e3 Author: TryTwo <taolas@gmail.com> Date: Sun Apr 17 00:47:05 2022 -0700 Dual View any size. commit 69ca38d Merge: 56bb965 6eb9111 Author: JosJuice <josjuice@gmail.com> Date: Sat Apr 23 10:25:48 2022 +0200 Merge pull request dolphin-emu#10600 from t895/modern-card Android: Modernize game card commit 56bb965 Merge: 2e01dc0 7840798 Author: JMC47 <JMC4789@gmail.com> Date: Fri Apr 22 23:24:22 2022 -0400 Merge pull request dolphin-emu#10584 from Pokechu22/emboss-single-normal-v2 VideoCommon: Handle emboss texgen with only a single normal commit 6eb9111 Author: Charles Lombardo <clombardo169@gmail.com> Date: Fri Apr 22 12:56:58 2022 -0400 Modernize game card +Remove background on card +Increase max # of lines for game title +Root layout is now a linear layout with the card view rounding the corners on the box art commit 7840798 Author: Pokechu22 <Pokechu022@gmail.com> Date: Tue Apr 19 17:46:20 2022 -0700 VideoCommon: Add comment explaining why only the first normal gets normalized Co-authored-by: Scott Mansell <phiren@gmail.com> commit 2a5c77f Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Apr 13 22:03:34 2022 -0700 VideoCommon: Handle emboss texgen with only a single normal Fixes a large number of effects in Rogue Squadron 2 and 3. commit 39b2854 Author: Pokechu22 <Pokechu022@gmail.com> Date: Thu Apr 14 12:01:57 2022 -0700 VertexLoader: Convert count register to remaining register This more accurately represents what's going on, and also ends at 0 instead of 1, making some indexing operations easier. This also changes it so that position_matrix_index_cache actually starts from index 0 instead of index 1. commit 97d0ff5 Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Apr 13 16:12:53 2022 -0700 Convert vertex loader position cache to std::array commit f722bdf Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Apr 13 20:57:38 2022 -0700 VertexLoaderX64: Refactor so that zfreeze is only in one place (Specifically, the copy for VertexLoaderManager::position_cache. The position matrix index happens elsewhere, and the float path still has special logic to copy to scratch3.) commit 6f1350a Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Apr 13 17:03:53 2022 -0700 VertexLoaderARM64: Fix z-freeze position matrix index Before, it would always write to index 0 (which is unused). Now it writes to the correct index. commit 04fdadd Author: Pokechu22 <Pokechu022@gmail.com> Date: Fri Apr 22 12:50:44 2022 -0700 VideoCommon: Rename norm0/norm1/norm2 to normal/tangent/binormal commit 88134a6 Author: Pokechu22 <Pokechu022@gmail.com> Date: Tue Dec 28 13:01:57 2021 -0800 VertexShaderGen: Simplify normal calculation This is a readability change; there should be no functional or performance differences. commit 12cd81b Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 08:58:38 2022 -0700 GCAdapter: don't call libusb_detach_kernel_driver on apple commit 5cd3cf9 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 08:48:28 2022 -0700 GCAdapter: fix retval check of libusb_detach_kernel_driver commit 978c908 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 07:37:56 2022 -0700 GCAdapter: move libusb context teardown last commit 1c9dfb7 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 07:36:56 2022 -0700 GCAdapter: some macro cleanup commit f52d948 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 07:12:09 2022 -0700 GCAdapter: set read/write thread names commit 0a07c76 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 07:07:20 2022 -0700 update libusb submodule to latest commit af930bc Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 07:05:41 2022 -0700 make libusb submodule shallow commit 2e01dc0 Merge: 3172199 ef760ee Author: Mai M <mathew1800@gmail.com> Date: Thu Apr 21 17:32:13 2022 -0400 Merge pull request dolphin-emu#10592 from AdmiralCurtiss/pointerwrap-protections Common/PointerWrap: Prevent reads/writes past the end of the buffer. commit 3172199 Merge: 902e45b 70507c2 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Thu Apr 21 18:50:08 2022 +0200 Merge pull request dolphin-emu#10577 from shuffle2/libusb update libusb to v1.0.26 commit f5f5262 Author: Simonx22 <simon@oatmealdome.me> Date: Wed Apr 20 16:22:06 2022 -0400 Android: Fix in game menu rippleColor and colorEdgeEffect commit 902e45b Merge: 3ed9d5a c925f10 Author: Mai M <mathew1800@gmail.com> Date: Wed Apr 20 06:22:17 2022 -0400 Merge pull request dolphin-emu#10595 from richarm4/patch-1 Minor text capitalization commit c925f10 Author: Matthew Richards-Wells <91291346+richarm4@users.noreply.github.com> Date: Wed Apr 20 02:07:31 2022 -0700 Minor text capitalization Changed "$Swords/Shields/boots/tunics" to "$Swords/Shields/Boots/Tunics" for consistent capitalization in the line. commit ef760ee Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Mon Apr 18 04:13:25 2022 +0200 Common/PointerWrap: Prevent reads/writes past the end of the buffer. commit 70507c2 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Mon Apr 11 06:04:20 2022 -0700 update to libusb v1.0.26 moves libusb from vendored to submodule commit 853cf4f Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Mon Apr 18 03:41:14 2022 +0200 Common/PointerWrap: Hide internals. commit 3ed9d5a Merge: 0ec3f3a 342af65 Author: Mai M <mathew1800@gmail.com> Date: Sun Apr 17 05:43:06 2022 -0400 Merge pull request dolphin-emu#10589 from JosJuice/android-more-init-checks Android: Use AfterDirectoryInitializationRunner more comprehensively commit cc22f1a Author: TryTwo <taolas@gmail.com> Date: Wed Apr 6 22:50:05 2022 -0700 MemoryWidget add dual views for two separate column types. Force first column to be Hex32. commit 342af65 Author: JosJuice <josjuice@gmail.com> Date: Sat Apr 16 15:04:29 2022 +0200 Android: Use AfterDirectoryInitializationRunner more comprehensively Should fix the crash reported in https://bugs.dolphin-emu.org/issues/12885 commit 0ec3f3a Merge: 0a4805c a2aecc3 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 16 14:35:29 2022 +0200 Merge pull request dolphin-emu#10563 from TryTwo/PR_MemoryWidget_Display_Types Debugger MemoryWidget: More display types, use combo box for options commit a2aecc3 Author: TryTwo <taolas@gmail.com> Date: Wed Apr 6 02:36:09 2022 -0700 Debugger MemoryWidget: More display types, use combo box for display options. Add alignment and riw length options. commit 0a4805c Merge: c5c4169 5c687fc Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 16 03:42:55 2022 +0200 Merge pull request dolphin-emu#10582 from AdmiralCurtiss/fmt-float Common/StringUtil: Use simpler formatting for floats and doubles. commit c5c4169 Merge: 36678dc 59f299d Author: Scott Mansell <phiren@gmail.com> Date: Fri Apr 15 11:12:49 2022 +1200 Merge pull request dolphin-emu#10255 from Pokechu22/sw-zfreeze Software: Fix zfreeze with CullMode::All commit 36678dc Merge: 3fdc6cb 9994363 Author: Scott Mansell <phiren@gmail.com> Date: Fri Apr 15 10:43:59 2022 +1200 Merge pull request dolphin-emu#10585 from Pokechu22/apple-m1-unit-tests-f-string Apple M1: Fix "Building and running unit tests" message commit 9994363 Author: Pokechu22 <Pokechu022@gmail.com> Date: Thu Apr 14 15:34:52 2022 -0700 Apple M1: Fix "Building and running unit tests" message For {arch} to be converted, the string needs to be an f-string. commit 3fdc6cb Merge: edbb0f4 c95c43b Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Wed Apr 13 12:18:41 2022 +0200 Merge pull request dolphin-emu#10486 from ttttcrngyblflpp/negative-axis-scaling Make pos/neg analog axes symmetrical commit 5c687fc Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Tue Apr 12 23:35:19 2022 +0200 Common/StringUtil: Use simpler formatting for floats and doubles. commit edbb0f4 Merge: 62cc7cc ef8e461 Author: JosJuice <josjuice@gmail.com> Date: Tue Apr 12 21:40:31 2022 +0200 Merge pull request dolphin-emu#10581 from shuffle2/win-pch windows: buildfix if pch not used commit ef8e461 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Tue Apr 12 12:27:28 2022 -0700 windows: buildfix if pch not used commit 62cc7cc Merge: 2f90a2c 8466d43 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Tue Apr 12 10:35:56 2022 +0200 Merge pull request dolphin-emu#10579 from shuffle2/mbedtls-build cmake: fix build of mbedtls from Externals commit 8466d43 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Mon Apr 11 03:55:47 2022 -0700 cmake: fix build of mbedtls from Externals commit 2f90a2c Merge: 1f4df1d c5b0b92 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Mon Apr 11 04:09:02 2022 +0200 Merge pull request dolphin-emu#10574 from EternityShack/master MemoryWidget: Load Files to Memory commit c5b0b92 Author: EternityShack <powmert323@gmail.com> Date: Sun Apr 10 21:02:33 2022 -0500 MemoryWidget: Load Files to Memory commit 1f4df1d Merge: 41a831d abffa93 Author: Pokechu22 <pokechu022@gmail.com> Date: Sun Apr 10 12:51:17 2022 -0700 Merge pull request dolphin-emu#10576 from JosJuice/moltenvk-curlies MoltenVK: Fix pixel shader typo commit abffa93 Author: JosJuice <josjuice@gmail.com> Date: Sun Apr 10 20:51:20 2022 +0200 MoltenVK: Fix pixel shader typo commit 41a831d Author: JosJuice <josjuice@gmail.com> Date: Sun Apr 10 19:44:17 2022 +0200 Translation resources sync with Transifex commit e932a1b Merge: d7709d4 3382408 Author: Mai M <mathew1800@gmail.com> Date: Sat Apr 9 14:19:39 2022 -0400 Merge pull request dolphin-emu#10571 from AdmiralCurtiss/ffmpeg-custom-pix-fmt VideoCommon/FrameDump: Allow user to specify a pixel format. commit 59f299d Author: Pokechu22 <Pokechu022@gmail.com> Date: Mon Nov 29 17:51:02 2021 -0800 Software: Fix zfreeze with CullMode::All commit 164e0f7 Author: Pokechu22 <Pokechu022@gmail.com> Date: Tue Nov 30 22:33:31 2021 -0800 Software: Store offset in Slope This is needed since we need a separate offset for zfreeze to work correctly. It also makes the code a bit less jank. commit 3a742e9 Author: Pokechu22 <Pokechu022@gmail.com> Date: Tue Nov 30 17:51:43 2021 -0800 Software: Remove config to disable ZComploc and ZFreeze These aren't particularly useful, and make the code a bit more confusing. If for some reason someone wants to test what happens when these functions are disabled, it's easier to just edit the code that implements them. They aren't exposed in the UI, so one would need to restart Dolphin to do it anyways. commit d7709d4 Merge: 91192ef 4e9a314 Author: Pokechu22 <pokechu022@gmail.com> Date: Fri Apr 8 19:17:35 2022 -0700 Merge pull request dolphin-emu#10398 from Pokechu22/viewport-rounding Round viewport coordinates when vertex rounding is enabled commit 4e9a314 Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Jan 26 12:09:00 2022 -0800 Round viewport coordinates when vertex rounding is enabled This should fix https://bugs.dolphin-emu.org/issues/9105 commit dbb857b Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Jan 26 19:11:11 2022 -0800 VertexShaderManager: Use g_ActiveConfig.UseVertexRounding() commit f6ab317 Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Jan 26 15:48:12 2022 -0800 Fix typo (GFX_HACK_VERTEX_ROUDING -> GFX_HACK_VERTEX_ROUNDING) commit 91192ef Merge: f92b7f4 5516d46 Author: Mai M <mathew1800@gmail.com> Date: Fri Apr 8 21:24:59 2022 -0400 Merge pull request dolphin-emu#10573 from AdmiralCurtiss/pr10472 DolphinQt/HacksWidget: Re-enable texture accuracy slider if it was disabled because of a custom value. commit 5516d46 Author: 3t13nn3 <etiennepenault1997@gmail.com> Date: Wed Feb 23 16:59:21 2022 +0100 DolphinQt/HacksWidget: Re-enable texture accuracy slider if it was disabled because of a custom value. Fixes https://bugs.dolphin-emu.org/issues/12771 commit f92b7f4 Merge: e3106e8 2e1f890 Author: Mai M <mathew1800@gmail.com> Date: Fri Apr 8 20:53:52 2022 -0400 Merge pull request dolphin-emu#10508 from JosJuice/android-pointer-down Android: Only use getActionIndex for ACTION_POINTER_DOWN/ACTION_POINTER_UP commit e3106e8 Merge: 417531f da12ff0 Author: Mai M <mathew1800@gmail.com> Date: Fri Apr 8 20:53:25 2022 -0400 Merge pull request dolphin-emu#10503 from JosJuice/android-directoryinitialization-thread Android: Actually use a thread for DirectoryInitialization commit 417531f Merge: 004e834 d8a5a88 Author: Mai M <mathew1800@gmail.com> Date: Fri Apr 8 20:52:25 2022 -0400 Merge pull request dolphin-emu#10545 from OatmealDome/mbedtls-2.28.0 Externals: Update mbedtls to 2.28.0 commit 004e834 Merge: d4e4b56 db4d81b Author: Mai M <mathew1800@gmail.com> Date: Fri Apr 8 20:51:36 2022 -0400 Merge pull request dolphin-emu#10558 from shuffle2/lang windows: simplify handling of gettext commit d4e4b56 Merge: dcf27b9 4120870 Author: Mai M <mathew1800@gmail.com> Date: Fri Apr 8 20:50:12 2022 -0400 Merge pull request dolphin-emu#10562 from JosJuice/android-double-tap-get Android: Fix displaying the current value of double tap setting commit dcf27b9 Merge: 120208a df214af Author: Mai M <mathew1800@gmail.com> Date: Fri Apr 8 20:47:57 2022 -0400 Merge pull request dolphin-emu#10572 from AdmiralCurtiss/ffmpeg-log-va-list VideoCommon/FrameDump: Fix log messages with arguments. commit df214af Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 9 01:42:02 2022 +0200 VideoCommon/FrameDump: Fix log messages with arguments. commit 36134ab Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 9 01:41:40 2022 +0200 Common/LogManager: Add generic printf-style log function that takes a va_list instead of va_args. commit 3382408 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 9 00:45:49 2022 +0200 VideoCommon/FrameDump: Allow user to specify a pixel format. commit 120208a Merge: 23508ca fbc9bf2 Author: Pokechu22 <pokechu022@gmail.com> Date: Fri Apr 8 14:35:03 2022 -0700 Merge pull request dolphin-emu#10543 from Minty-Meeo/initmmio-combine Combine InitMMIO and InitMMIOWii commit 23508ca Merge: 0c7f992 53cf78d Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Fri Apr 8 05:28:22 2022 +0200 Merge pull request dolphin-emu#7675 from TryTwo/Debugger_Code_Features Debugger: Get target memory in load/store instructions commit 0c7f992 Merge: e021940 5fda8ee Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Fri Apr 8 03:37:08 2022 +0200 Merge pull request dolphin-emu#10565 from AdmiralCurtiss/wgi-win7 Core/WGInput: Dynamically load winrt function addresses. commit 5fda8ee Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Thu Apr 7 06:34:39 2022 +0200 Core/WGInput: Dynamically load winrt function addresses. commit e021940 Merge: 7a33659 af316f7 Author: JMC47 <JMC4789@gmail.com> Date: Thu Apr 7 17:01:56 2022 -0400 Merge pull request dolphin-emu#10412 from Pokechu22/sw-efb-peek-alpha Software: Implement pixel engine alpha read mode commit 7a33659 Merge: 6a326a9 bbb64ff Author: JosJuice <josjuice@gmail.com> Date: Thu Apr 7 21:00:24 2022 +0200 Merge pull request dolphin-emu#10485 from JosJuice/real-ocol0-logic-ops Shadergen: Use real_ocol0 workaround for shader logic ops commit 6a326a9 Merge: 17b17e3 1ad7aac Author: JosJuice <josjuice@gmail.com> Date: Thu Apr 7 20:59:17 2022 +0200 Merge pull request dolphin-emu#10544 from AdmiralCurtiss/default-font-size-workaround Qt: Set font size for default debug font. commit 17b17e3 Merge: a8654e2 bed9175 Author: JosJuice <josjuice@gmail.com> Date: Thu Apr 7 20:58:22 2022 +0200 Merge pull request dolphin-emu#10552 from Gamer64ytb/display-cutout Android: Implement expand display cutout option. commit a8654e2 Merge: e3ca3e7 57733dd Author: JosJuice <josjuice@gmail.com> Date: Thu Apr 7 20:58:09 2022 +0200 Merge pull request dolphin-emu#10560 from JosJuice/android-wii-disc-update Android: Implement installing system update from disc image commit e3ca3e7 Merge: 38bf282 6e83e36 Author: JosJuice <josjuice@gmail.com> Date: Thu Apr 7 20:57:55 2022 +0200 Merge pull request dolphin-emu#10568 from Pokechu22/msbuild-WGInput msbuild: Move WGInput to DolphinLib.props commit 6e83e36 Author: Pokechu22 <Pokechu022@gmail.com> Date: Thu Apr 7 11:37:12 2022 -0700 msbuild: Move WGInput to DolphinLib.props It was accidentally put into the main DolphinLib.vcxproj in dolphin-emu#7614. commit 38bf282 Merge: 368342c 5b658e7 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Thu Apr 7 14:41:01 2022 +0200 Merge pull request dolphin-emu#10567 from sepalani/fix-float-preview MemoryWidget: Fix preview of zero as float/double commit 5b658e7 Author: Sepalani <sepalani@hotmail.fr> Date: Thu Apr 7 11:55:23 2022 +0400 MemoryWidget: Fix preview of zero as float/double commit 368342c Merge: 242cd4c ed96b8e Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Thu Apr 7 02:13:21 2022 +0200 Merge pull request dolphin-emu#10528 from TryTwo/PR_Debugger_Memory_Input_Types Debugger: MemoryWidget: add float and integer input types. Add input preview. commit ed96b8e Author: TryTwo <taolas@gmail.com> Date: Wed Apr 6 16:20:55 2022 -0700 Debugger MemoryWidget: add float and integer inputs. Add input preview. Change input logic. Use combobox for options. commit 242cd4c Merge: 085c86a c8d953d Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Wed Apr 6 14:38:25 2022 +0200 Merge pull request dolphin-emu#10555 from Dentomologist/fix_manual_update_check_when_autoupdate_disabled Updater: Fix manual update check when autoupdate is disabled commit 4120870 Author: JosJuice <josjuice@gmail.com> Date: Tue Apr 5 19:08:58 2022 +0200 Android: Remove nonsense code from double tap setting dialog The currentValue variable doesn't use InputOverlay.OVERLAY_ constants, it uses NativeLibrary.ButtonType constants. Sigh, why do enums have to be so bad on Android that Google recommends against using them :( Anyway, simply not doing anything is a reasonable option here. What happens then is that if the currently selected button is invalid for the current controller, none of the available options in the dialog will be pre-selected. commit cdff426 Author: JosJuice <josjuice@gmail.com> Date: Tue Apr 5 18:58:29 2022 +0200 Android: Fix displaying the current value of double tap setting commit 085c86a Merge: a4445fa 566dfc1 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Tue Apr 5 01:14:43 2022 +0200 Merge pull request dolphin-emu#7614 from jordan-woyak/windows-gaming-input InputCommon: Add Windows.Gaming.Input to ControllerInterface. commit 566dfc1 Author: Jordan Woyak <jordan.woyak@gmail.com> Date: Wed Mar 2 15:40:20 2022 -0600 ControllerInterface: Update sort priorities. commit 076a262 Author: Jordan Woyak <jordan.woyak@gmail.com> Date: Tue Oct 20 11:30:15 2020 -0500 InputCommon: Add Windows.Gaming.Input to ControllerInterface. commit bed9175 Author: Gamer64ytb <76565986+Gamer64ytb@users.noreply.github.com> Date: Sat Apr 2 17:58:18 2022 +0200 Android: Implement expand display cutout option. Some ROMs don't have fullscreen feature, for example Pixel Experience, so have a option for that is better. Also you don't need put the app on fullscreen anymore with that. commit 57733dd Author: JosJuice <josjuice@gmail.com> Date: Sun Apr 3 11:04:40 2022 +0200 Android: Implement installing system update from disc image commit d8a5a88 Author: OatmealDome <julian@oatmealdome.me> Date: Sat Apr 2 19:30:22 2022 -0400 Externals: Update mbedtls to 2.28.0 commit a4445fa Merge: 113fdc9 818f6c8 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sun Apr 3 01:22:39 2022 +0200 Merge pull request dolphin-emu#10557 from shuffle2/msvc-secure-scl msbuild: don't explicitly set _SECURE_SCL commit 818f6c8 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Sat Apr 2 15:22:27 2022 -0700 msbuild: don't explicitly set _SECURE_SCL commit db4d81b Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Sat Apr 2 15:22:02 2022 -0700 windows: simplify handling of gettext fixes binplace on first build commit c8d953d Author: Dentomologist <dentomologist@gmail.com> Date: Sat Apr 2 11:52:51 2022 -0700 Updater: Fix manual update check when autoupdate is disabled commit 113fdc9 Merge: c028f96 1942629 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 2 15:17:15 2022 +0200 Merge pull request dolphin-emu#10534 from AdmiralCurtiss/more-cheat-search-qol DolphinQt: More Cheat Search QoL commit c028f96 Merge: 25c173c e6ed77b Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 2 14:57:39 2022 +0200 Merge pull request dolphin-emu#10550 from shuffle2/cpp-conform msvc: enable conformant __cplusplus macro commit e6ed77b Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Sat Apr 2 02:07:41 2022 -0700 msvc: enable conformant __cplusplus macro commit 25c173c Merge: 4957b2e 88a1acd Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 2 05:42:33 2022 +0200 Merge pull request dolphin-emu#8732 from dreamsyntax/debugger-function-differencing Qt/Debugger CodeWidget: Record and find specific functions by differencing commit 1942629 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Fri Mar 25 09:48:16 2022 +0100 DolphinQt/CheatSearchWidget: Drop whitespace when parsing integers and floats from the user. commit 7f2fed0 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Fri Mar 25 09:40:24 2022 +0100 DolphinQt/CheatsManager: Don't leak closed cheat search tabs. commit 48c4ebe Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Fri Mar 25 09:33:17 2022 +0100 DolphinQt/CheatSearchWidget: Remember state of Hex checkboxes across sessions. commit 1ad7aac Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Thu Mar 31 05:28:39 2022 +0200 Qt: Set font size for default debug font. commit 4957b2e Merge: cc3f820 4fad2c2 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Thu Mar 31 05:24:00 2022 +0200 Merge pull request dolphin-emu#10530 from shuffle2/win-ffmpeg windows: move ffmpeg bins to submodule commit cc3f820 Merge: 0204b11 8f85e38 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Wed Mar 30 22:53:05 2022 +0200 Merge pull request dolphin-emu#10542 from TryTwo/PR_MemoryViewWidget_Spacing Debugger MemoryViewWidget: fixed, tighter spacing commit 4fad2c2 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Wed Mar 23 12:26:22 2022 -0700 framedump: enable compat with utvideo codec commit decaea8 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Thu Mar 24 04:47:43 2022 -0700 FrameDump: improve debug logging commit 09432ef Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Wed Mar 23 12:24:35 2022 -0700 windows: move ffmpeg bins to submodule udpate ffmpeg to b1cbeabf5e4b3234e895a58bafa371bfb792baf0 enable ffmpeg on arm64 commit af316f7 Author: Pokechu22 <Pokechu022@gmail.com> Date: Sat Jan 29 13:53:54 2022 -0800 Software: Implement pixel engine alpha read mode commit 8882eb0 Author: Pokechu22 <Pokechu022@gmail.com> Date: Sat Jan 29 13:28:17 2022 -0800 PixelEngine: Convert to BitField and enum class commit 45b8ebe Author: Pokechu22 <Pokechu022@gmail.com> Date: Sat Jan 29 13:02:05 2022 -0800 PixelEngine: Remove old comment This comment was added in 76d24f2 (the link was updated in 5799824, but both are dead now). An archived version is at https://web.archive.org/web/20090830050441/http://developer.nvidia.com/object/General_FAQ.html#t6 but it's about the number of available texture units, which doesn't seem relevant to PixelEngine. commit 8f85e38 Author: TryTwo <taolas@gmail.com> Date: Mon Mar 28 16:08:31 2022 -0700 Debugger MemoryViewWidget: fixed, tighter spacing commit fbc9bf2 Author: Minty-Meeo <45425365+Minty-Meeo@users.noreply.github.com> Date: Tue Mar 29 01:16:41 2022 -0500 Combine InitMMIO and InitMMIOWii commit 0204b11 Merge: c08a23b 8a0c681 Author: JosJuice <josjuice@gmail.com> Date: Mon Mar 28 17:55:48 2022 +0200 Merge pull request dolphin-emu#10541 from t895/list-fix Android: Fix games list padding commit 8a0c681 Author: Charles Lombardo <clombardo169@gmail.com> Date: Mon Mar 28 09:42:43 2022 -0400 Android: Fix games list padding Use clipToPadding="false" to prevent top white bar when scrolling commit b5a7ae5 Author: nyanpasu64 <nyanpasu64@tuta.io> Date: Sun Mar 27 22:37:43 2022 -0700 Fix locking the wrong mutex in GCAdapter_Android.cpp ResetRumble() I am not confident there are no race conditions between s_write_mutex, s_controller_write_payload_size, and s_controller_write_payload. But this code should be safer than before. commit 7616027 Author: nyanpasu64 <nyanpasu64@tuta.io> Date: Sun Mar 27 22:27:44 2022 -0700 Remove unnecessary atomic usage in GCAdapter_Android.cpp s_controller_write_payload_size needs to remain an atomic because Read() loads and stores without holding a mutex, Output() stores while holding s_write_mutex, and ResetRumble() stores while holding s_read_mutex! I'm pretty sure this code is wrong, specifically ResetRumble(). commit 871b01a Author: nyanpasu64 <nyanpasu64@tuta.io> Date: Sun Mar 27 22:25:40 2022 -0700 Remove unnecessary atomic usage in GCAdapter.cpp You can safely read or write non-atomic integers on multiple threads, as long as every thread reading or writing it holds the same mutex while doing so (here, s_mutex). Removing the atomic accesses makes the code faster, but the actual performance difference is probably negligible. commit 88a1acd Author: dreamsyntax <dreamsyntax@gmail.com> Date: Wed Apr 8 18:12:23 2020 -0700 implement CodeDiffTool Feature Add Diff button to CodeWidget Add Code Diff Tool window for recording and differencing functions. Allows finding specific functions based on when they run. commit 53cf78d Author: TryTwo <taolas@gmail.com> Date: Thu Mar 17 12:53:38 2022 -0700 Gekko constistancy changes. Add context item to codeview to show or copy a load/store target memory address from instructions at or near PC when paused. commit 2e1f890 Author: JosJuice <josjuice@gmail.com> Date: Sat Mar 12 21:05:59 2022 +0100 Android: Only use getActionIndex for ACTION_POINTER_DOWN/ACTION_POINTER_UP According to the documentation, getActionIndex should only be used with ACTION_POINTER_DOWN and ACTION_POINTER_UP. We've had a few crashes reported in the Play Console regarding invalid pointer indices for getY, and I'm hoping this will help with that. commit da12ff0 Author: JosJuice <josjuice@gmail.com> Date: Tue Mar 8 22:29:07 2022 +0100 Android: Actually use a thread for DirectoryInitialization `((Runnable) () -> init(context)).run()` is just a more complicated way of writing `init(context)`, and doesn't on its own launch a thread. commit bbb64ff Author: JosJuice <josjuice@gmail.com> Date: Sun Feb 27 16:48:28 2022 +0100 Shadergen: Use real_ocol0 workaround for shader logic ops Previously we were using this workaround when using framebuffer fetch to emulate dual source blending, but it seems like we also need to use it when using framebuffer fetch to emulate logic ops, otherwise some Adreno devices get a crash when compiling OpenGL ES ubershaders. Using the workaround in specialized shaders doesn't seem to be necessary, but I've made the same change there for consistency. This gets us closer to fixing https://bugs.dolphin-emu.org/issues/12791 but doesn't actually fix it. commit c95c43b Author: Tony Gong <gr8tony@hotmail.com> Date: Sun Feb 27 09:58:21 2022 -0800 Make pos/neg analog axes symmetrical Currently, the axes for the main and C sticks range from 0-255, with 128 being the mid-point; but this isn't symmetrical: the negative axis has 128 values not including 0, while the positive axis has 127 values not including 0. Normalizing so that the range is 1-255 makes the positive and negative axes symmetrical. The inability to yield 0 shouldn't be an issue as a real GC controller cannot yield it anyway.
commit c42392c Merge: 61edcf7 259a5fc Author: JMC47 <JMC4789@gmail.com> Date: Sun Apr 24 13:30:04 2022 -0400 Merge pull request dolphin-emu#10290 from OatmealDome/m1-earlyz-bug DriverDetails: Add broken discard with early-Z bug on Apple Silicon GPUs commit 61edcf7 Merge: 6abf367 787e3ef Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sun Apr 24 18:02:19 2022 +0200 Merge pull request dolphin-emu#10606 from AdmiralCurtiss/memory-widget-refactoring-1 Qt/MemoryWidget: Light refactoring and quality of life features. commit 787e3ef Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sun Apr 24 06:49:10 2022 +0200 Qt/MemoryViewWidget: Detect row breakpoint cell by cell data instead of cell position. commit 6920a24 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sun Apr 24 06:30:40 2022 +0200 Qt/MemoryViewWidget: Add option to copy the actually displayed cell value to clipboard. commit 54ec0bd Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sun Apr 24 06:25:42 2022 +0200 Qt/MemoryViewWidget: Don't use a member variable to hold information about the current mouse click. commit 6abf367 Merge: 13e2dda 14f9ffe Author: JosJuice <josjuice@gmail.com> Date: Sun Apr 24 10:37:45 2022 +0200 Merge pull request dolphin-emu#10588 from JosJuice/jitarm64-psq-stxx-q0 JitArm64: Always lock Q0 in psq_stXX commit 13e2dda Author: JosJuice <josjuice@gmail.com> Date: Sun Apr 24 10:06:44 2022 +0200 Translation resources sync with Transifex commit 26f9c8b Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sun Apr 24 05:24:20 2022 +0200 Qt/MemoryWidget: Don't force a fixed size for the sidebar. commit 4c080b8 Merge: e0afcb3 a7111e3 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 23 22:23:31 2022 +0200 Merge pull request dolphin-emu#10578 from TryTwo/PR_MemoryWidget_Dual_Views Debugger MemoryWidget: Add dual views commit e0afcb3 Merge: cb5e967 b5a7ae5 Author: JosJuice <josjuice@gmail.com> Date: Sat Apr 23 22:04:10 2022 +0200 Merge pull request dolphin-emu#10540 from nyanpasu64/fix-gcadapter-atomics Remove atomic usage and fix mutex locking in GCAdapter code commit cb5e967 Merge: 8b5a61b 235f729 Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 23 21:07:35 2022 +0200 Merge pull request dolphin-emu#10596 from richarm4/patch-3 Added space in comment commit 235f729 Author: Matthew Richards-Wells <91291346+richarm4@users.noreply.github.com> Date: Wed Apr 20 12:49:17 2022 -0700 GameSettings: Add missing space in comment. commit 8b5a61b Merge: 19c71db 12cd81b Author: Admiral H. Curtiss <pikachu025@gmail.com> Date: Sat Apr 23 20:32:47 2022 +0200 Merge pull request dolphin-emu#10599 from shuffle2/libusb Libusb fixups commit 19c71db Merge: 69ca38d f5f5262 Author: Mai M <mathew1800@gmail.com> Date: Sat Apr 23 06:10:20 2022 -0400 Merge pull request dolphin-emu#10597 from Simonx22/fix-ingame-menu-design Android: Fix in game menu rippleColor and colorEdgeEffect commit a7111e3 Author: TryTwo <taolas@gmail.com> Date: Sun Apr 17 00:47:05 2022 -0700 Dual View any size. commit 14f9ffe Author: JosJuice <josjuice@gmail.com> Date: Sat Apr 23 11:37:52 2022 +0200 JitArm64: Add documentation comment for EmitBackpatchRoutine commit 69ca38d Merge: 56bb965 6eb9111 Author: JosJuice <josjuice@gmail.com> Date: Sat Apr 23 10:25:48 2022 +0200 Merge pull request dolphin-emu#10600 from t895/modern-card Android: Modernize game card commit 56bb965 Merge: 2e01dc0 7840798 Author: JMC47 <JMC4789@gmail.com> Date: Fri Apr 22 23:24:22 2022 -0400 Merge pull request dolphin-emu#10584 from Pokechu22/emboss-single-normal-v2 VideoCommon: Handle emboss texgen with only a single normal commit 6eb9111 Author: Charles Lombardo <clombardo169@gmail.com> Date: Fri Apr 22 12:56:58 2022 -0400 Modernize game card +Remove background on card +Increase max # of lines for game title +Root layout is now a linear layout with the card view rounding the corners on the box art commit 7840798 Author: Pokechu22 <Pokechu022@gmail.com> Date: Tue Apr 19 17:46:20 2022 -0700 VideoCommon: Add comment explaining why only the first normal gets normalized Co-authored-by: Scott Mansell <phiren@gmail.com> commit 2a5c77f Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Apr 13 22:03:34 2022 -0700 VideoCommon: Handle emboss texgen with only a single normal Fixes a large number of effects in Rogue Squadron 2 and 3. commit 39b2854 Author: Pokechu22 <Pokechu022@gmail.com> Date: Thu Apr 14 12:01:57 2022 -0700 VertexLoader: Convert count register to remaining register This more accurately represents what's going on, and also ends at 0 instead of 1, making some indexing operations easier. This also changes it so that position_matrix_index_cache actually starts from index 0 instead of index 1. commit 97d0ff5 Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Apr 13 16:12:53 2022 -0700 Convert vertex loader position cache to std::array commit f722bdf Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Apr 13 20:57:38 2022 -0700 VertexLoaderX64: Refactor so that zfreeze is only in one place (Specifically, the copy for VertexLoaderManager::position_cache. The position matrix index happens elsewhere, and the float path still has special logic to copy to scratch3.) commit 6f1350a Author: Pokechu22 <Pokechu022@gmail.com> Date: Wed Apr 13 17:03:53 2022 -0700 VertexLoaderARM64: Fix z-freeze position matrix index Before, it would always write to index 0 (which is unused). Now it writes to the correct index. commit 04fdadd Author: Pokechu22 <Pokechu022@gmail.com> Date: Fri Apr 22 12:50:44 2022 -0700 VideoCommon: Rename norm0/norm1/norm2 to normal/tangent/binormal commit 88134a6 Author: Pokechu22 <Pokechu022@gmail.com> Date: Tue Dec 28 13:01:57 2021 -0800 VertexShaderGen: Simplify normal calculation This is a readability change; there should be no functional or performance differences. commit 12cd81b Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 08:58:38 2022 -0700 GCAdapter: don't call libusb_detach_kernel_driver on apple commit 5cd3cf9 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 08:48:28 2022 -0700 GCAdapter: fix retval check of libusb_detach_kernel_driver commit 978c908 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 07:37:56 2022 -0700 GCAdapter: move libusb context teardown last commit 1c9dfb7 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 07:36:56 2022 -0700 GCAdapter: some macro cleanup commit f52d948 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 07:12:09 2022 -0700 GCAdapter: set read/write thread names commit 0a07c76 Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 07:07:20 2022 -0700 update libusb submodule to latest commit af930bc Author: Shawn Hoffman <godisgovernment@gmail.com> Date: Fri Apr 22 07:05:41 2022 -0700 make libusb submodule shallow commit f5f5262 Author: Simonx22 <simon@oatmealdome.me> Date: Wed Apr 20 16:22:06 2022 -0400 Android: Fix in game menu rippleColor and colorEdgeEffect commit 259a5fc Author: OatmealDome <julian@oatmealdome.me> Date: Sat Dec 25 00:27:43 2021 -0500 DriverDetails: Add broken discard with early-Z bug on Apple Silicon GPUs commit e7f5e51 Author: OatmealDome <julian@oatmealdome.me> Date: Fri Jul 30 04:02:51 2021 -0400 DriverDetails: Introduce new VENDOR_APPLE for Apple GPUs commit 80dfefb Author: OatmealDome <julian@oatmealdome.me> Date: Thu Jan 6 04:15:21 2022 -0500 UberShaderPixel: Add support for non-dual source shader blending commit c1d87db Author: OatmealDome <julian@oatmealdome.me> Date: Thu Jan 6 04:15:07 2022 -0500 PixelShaderGen: Add support for non-dual source shader blending commit bad0283 Author: OatmealDome <julian@oatmealdome.me> Date: Sat Dec 25 00:27:53 2021 -0500 VKPipeline: Add shader blending support commit cc22f1a Author: TryTwo <taolas@gmail.com> Date: Wed Apr 6 22:50:05 2022 -0700 MemoryWidget add dual views for two separate column types. Force first column to be Hex32. commit 2ef2d47 Author: JosJuice <josjuice@gmail.com> Date: Sat Apr 16 13:22:36 2022 +0200 JitArm64: Always lock Q0 in psq_stXX Q0 is used as a scratch register by EmitBackpatchRoutine. Fixes a vertex explosion in Spider-Man 2 that was uncovered by 20b2300. commit b5a7ae5 Author: nyanpasu64 <nyanpasu64@tuta.io> Date: Sun Mar 27 22:37:43 2022 -0700 Fix locking the wrong mutex in GCAdapter_Android.cpp ResetRumble() I am not confident there are no race conditions between s_write_mutex, s_controller_write_payload_size, and s_controller_write_payload. But this code should be safer than before. commit 7616027 Author: nyanpasu64 <nyanpasu64@tuta.io> Date: Sun Mar 27 22:27:44 2022 -0700 Remove unnecessary atomic usage in GCAdapter_Android.cpp s_controller_write_payload_size needs to remain an atomic because Read() loads and stores without holding a mutex, Output() stores while holding s_write_mutex, and ResetRumble() stores while holding s_read_mutex! I'm pretty sure this code is wrong, specifically ResetRumble(). commit 871b01a Author: nyanpasu64 <nyanpasu64@tuta.io> Date: Sun Mar 27 22:25:40 2022 -0700 Remove unnecessary atomic usage in GCAdapter.cpp You can safely read or write non-atomic integers on multiple threads, as long as every thread reading or writing it holds the same mutex while doing so (here, s_mutex). Removing the atomic accesses makes the code faster, but the actual performance difference is probably negligible.
Basically, this disables the offset based on the light in all cases (treating it as 0, and copying the original coordinate unchanged), which should break all emboss map effects. Thus we can see what games use these effects and what they'd look like without them. This includes emboss effects that have binormal and tangent vectors specified, which already worked in Dolphin prior to dolphin-emu#10584.
Basically, this disables the offset based on the light in all cases (treating it as 0, and copying the original coordinate unchanged), which should break all emboss map effects. Thus we can see what games use these effects and what they'd look like without them. This includes emboss effects that have binormal and tangent vectors specified, which already worked in Dolphin prior to dolphin-emu#10584.
|
As a side note, I ended up finding the expired patent for the emboss effect while looking for (mostly) unrelated stuff: US7307640B2. The relevant sections are "Example Emboss-Style Bump Mapping Texture Coordinate Generation" (PDF column 10) and "Example Emboss Bump-Mapping Texture Coordinate Generation Hardware Implementation" (PDF column 13). It's mostly not new information, but it does note that they handle normalization by computing That patent does not mention the trick Factor 5 is doing, and even says "(For the present example embodiment, even where the supplied binormals are constant, for example, with flat surfaces, Command Processor 200 supplies the binormals to Transform Unit 300 on a per-vertex basis.)" (column 12 lines 11-14). |










Replacement to #10317. This time, the result is much closer to hardware.
@phire linked me to this 2002 article from a Factor 5 employee, which covers a lot about how they handle shading in the Rogue Squadron 2. Specifically, the second paragraph of the "Landscape Shader Optimizations" section says this:
This is somewhat awkward to implement, but it isn't much more complicated than z-freeze (though the current implementation might be updating a vertex shader constant more often than it needs to be, resulting in a performance hit, as I didn't see a fast way of checking if an emboss texgen is in use without 3 normal vectors).
I have notes in this gist, though they are not particularly well-organized.
Here are some screenshots (using the hardware fifoplayer):
RS2 - dolphin with this PR
RS2 - real hardware
RS3 - dolphin with this PR
RS3 - real hardware
RS2 looks pretty much perfect to me, but RS3 has some lingering issues (e.g. the right foot of the nearest AT-AT is wrong). (Also, the sky is a different blue, and as phire mentioned luke's clothing (most obvious with the belt) doesn't have the proper shinyness.)
This PR also includes a few zfreeze-related adjustments, because I'm already working in that area.
I updated both the ARM and x64 vertex loaders, but I haven't tested the ARM vertex loader myself. Given that this is generated assembly, it probably won't work right.