Commit graph

561 commits

Author SHA1 Message Date
Pokechu22
2db7569463 SW/Tev: Use TevColorRef/TevAlphaRef instead of raw s16 pointers 2022-08-29 11:05:10 -07:00
Pokechu22
e04d23e086 SW/Rasterizer: Fix indirect stage using texture coordinates/maps >= 4
The masking was incorrect. This affects the main menu of The Last Avatar, though that menu also relies on copy filter functionality that is not correctly handled in the software renderer so the difference is not obvious; that game shuffles textures across all indices for some reason, so this issue would presumably result in subtle flickering.
2022-08-28 12:19:36 -07:00
TellowKrinkle
6ee0248eab VideoBackends:Metal: MSAA support 2022-07-21 20:44:19 -05:00
JMC47
70b0b03c3c
Merge pull request #10747 from tellowkrinkle/LateUIDFixup
Add a post-cache shader UID fixup pass
2022-07-17 00:43:16 -04:00
Pokechu22
2f43889141 Software: Use hardware-verified numbers for RGB->YUV conversion 2022-07-16 00:07:10 -07:00
Pokechu22
791bd16b28 Restructure parameters to TetxureConverterShaderGen/TextureConversionShader
This will be used for later refactoring for increased accuracy.
2022-07-16 00:07:10 -07:00
TellowKrinkle
6ab24e6c17 VideoCommon: Better driver bug handling
Adds a pass to process driver deficiencies between UID caching and use, allowing a full view of the whole pipeline, since some bugs/workarounds involve interactions between blend modes and the pixel shader
2022-07-13 21:51:24 -05:00
Minty-Meeo
69e32dea52 Resolve GCC Warnings 2022-06-30 15:26:48 -05:00
Admiral H. Curtiss
580c721c82
cmake: Don't use PCH with Qt6. 2022-05-22 01:19:44 +02:00
Pokechu22
8df55b492c Show a panic alert if the CP matrix indices don't match the XF matrix indices
This almost certainly never happens, but if it does we want to know.
2022-05-18 14:43:14 -07:00
JMC47
c0488de482
Merge pull request #10251 from Pokechu22/negative-scissor
Rework scissor handling
2022-04-24 15:00:42 -04:00
Pokechu22
784079853d VideoCommon: Add comment explaining why only the first normal gets normalized
Co-authored-by: Scott Mansell <phiren@gmail.com>
2022-04-22 16:54:38 -07:00
Pokechu22
2a5c77f43f VideoCommon: Handle emboss texgen with only a single normal
Fixes a large number of effects in Rogue Squadron 2 and 3.
2022-04-22 16:54:38 -07:00
Pokechu22
04fdadd9d5 VideoCommon: Rename norm0/norm1/norm2 to normal/tangent/binormal 2022-04-22 16:54:36 -07:00
Pokechu22
4d1e1db3c5 Software: Fix scissor rectangle always being block-aligned 2022-04-16 12:35:00 -07:00
Pokechu22
8745d84949 Software: Disable clipping based on xfmem
This fixes https://bugs.dolphin-emu.org/issues/12562, and is also needed for a hardware test of mine.
2022-04-16 12:35:00 -07:00
Pokechu22
925ceab82f Software: Use new scissor logic
Unlike the hardware backends, the software renderer can use multiple scissor rectangles (though this will result in extra rasterization).
2022-04-16 12:34:58 -07:00
Pokechu22
4595b89ad8 VideoCommon: Remove bSupportsOversizedViewports
I think this is a relic of D3D9.  D3D11 and D3D12 seem to work fine without it.  Plus, ViewportCorrectionMatrix just didn't work correctly (at least with the viewports being generated by the new scissor code).
2022-04-16 10:26:11 -07:00
Pokechu22
59f299d5d6 Software: Fix zfreeze with CullMode::All 2022-04-08 20:05:32 -07:00
Pokechu22
164e0f742d 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.
2022-04-08 20:05:32 -07:00
Pokechu22
3a742e99bb 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.
2022-04-08 20:05:32 -07:00
Pokechu22
af316f7bfe Software: Implement pixel engine alpha read mode 2022-03-29 15:34:43 -07:00
Pokechu22
c657b80996 Software/EfbInterface: Remove logspam for RGB565_Z16 being unsupported
This message would be logged, usually multiple times, for EVERY. SINGLE. PIXEL. That's pretty much useless and just makes the log unreadable. Plus, the current support (which acts as RGB8) is close enough that for end-user purposes, it's fine.  I don't think the hardware backends support RGB565_Z16 and its antialiasing functionality correctly either, but they don't have similar logspam.
2022-03-08 13:59:55 -08:00
Pokechu22
444f6fd0cb Treat alpha as 0 if alpha is 1 for blending
This removes the white box in fortune street again, without causing Mario Kart Wii to regress.
2022-02-08 15:15:15 -08:00
Pokechu22
0327e6acb4 Use the same logic for lerp bias for color and alpha
It doesn't make sense for alpha to add the bias ONLY when dividing by 2, while color doesn't apply the bias for divide by 2 only; hardware testing indicates that alpha should have the bias.

This fixes the menus in Mario Kart Wii (https://bugs.dolphin-emu.org/issues/11909) but reintroduces the white rectangle in Fortune Street.

This reverts commit 5aaa5141ed (and several other matching changes elsewhere).
2022-02-08 15:15:15 -08:00
OatmealDome
947b562e06 VideoConfig: Add flag for whether the system supports setting object names 2022-01-31 01:17:37 -05:00
OatmealDome
08396c56e5 VideoConfig: Add bool for sampler LOD bias support 2021-12-25 15:16:27 -05:00
Pokechu22
27cb704466 Eliminate VarType for ComponentFormat 2021-12-18 15:21:48 -08:00
Pokechu22
3aaeb2b9ef Convert OpcodeDecoder::Opcode and OpcodeDecoder::Primitive to enum class 2021-12-18 12:51:56 -08:00
Pokechu22
3fc12431c5 Remove parameters to SWVertexLoader::SetFormat
They haven't been used since efbe5bc4b6.
2021-12-18 12:51:56 -08:00
Pokechu22
2025763420 Treewide: Adjust order of includes 2021-12-10 14:49:57 -08:00
JMC47
dbaebdc585
Merge pull request #10222 from phire/fix-copy-filter-clamping
Fix copy filter clamping
2021-11-18 17:48:33 -05:00
Pokechu22
1adff1c467 VideoCommon: Skip textureQueryLevels if it doesn't exist 2021-11-17 21:28:39 -08:00
Pokechu22
b9288212a0 Software: Adjust diagonal LOD implementation
This produces behavior matching the behavior on hardware (see Wario's Gold Mine in Mario Kart Wii).
2021-11-17 20:04:34 -08:00
Pokechu22
51e3334526 VideoCommon: Use coarse derivatives for Manual Texture Sampling if possible 2021-11-17 20:04:34 -08:00
Pokechu22
3096f77ba0 Eliminate SamplerCommon::AreBpTexMode0MipmapsEnabled
This was added in 0b9a72a62d but became irrelevant in 70f9fc4e75 as the check is now self-explanatory due to a rejiggering of the bitfields.
2021-11-17 20:04:34 -08:00
Scott Mansell
9bbc843542 VideoSoftware: Fix copy filter clamping 2021-11-17 09:29:16 +13:00
Fletcher Porter
f16e9045a2 Silence the -Wswitch warnings in Tev
The compiler was loudly announcing each and every branch Tev was not checking in
a switch statement, but Tev has learned it's lesson and will produce that
warning no more.
2021-10-13 23:54:06 -07:00
Pokechu22
78bfd25964 Fix all uninitialized variable warnings (C26495) 2021-10-13 12:32:16 -07:00
Scott Mansell
9fa26624b0 BPMemory: Refactor/consolidate TexUnit Addressing
Currently the logic for addressing the individual TexUnits is splattered all
across dolphin's codebase, this commit attempts to consolidate it all into a
single place and formalise it using our new TexUnitAddress struct.
2021-10-10 09:09:43 +13:00
Techjar
1161af8059 VideoCommon: Abstract bounding box
This moves much of the duplicated bounding box code into VideoCommon,
leaving only the specific buffer implementations in each backend.
2021-10-04 15:51:24 -04:00
iwubcode
1f2f505373 VideoBackends / VideoCommon: allow the ability to set debug names for shaders / textures. These names are visible in applications like RenderDoc 2021-08-30 13:47:48 -05:00
Pokechu22
3a4d8379bf Convert NaN to 1 when generating texture coordinates
This fixes eyelids in Shadow the Hedgehog during cutscenes (https://bugs.dolphin-emu.org/issues/11458)
2021-07-24 22:20:35 -07:00
Pokechu22
fa9c43cfaa Software: Handle texture wrapping more accurately
This fixes various texture offsetting issues with negative texture coordinates (bringing the software renderer in line with the hardware renderers).  It also handles the invalid wrap mode accurately (as was done for the hardware renderers in the previous commit).  Lastly, it handles wrapping with non-power-of-2 texture sizes in a hardware-accurate way (which is somewhat broken looking, as games aren't supposed to use wrapping with non-power-of-2 sizes); this has not been done for the hardware renderers.
2021-07-20 19:23:23 -07:00
Pokechu22
2feced2e33 Fix indirect textures when format is not ITF_8 2021-07-08 15:48:14 -07:00
Pierre Bourdon
e149ad4f0a
treewide: convert GPLv2+ license info to SPDX tags
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.
2021-07-05 04:35:56 +02:00
JMC47
46120a6108
Merge pull request #9742 from Pokechu22/sw-resolution
Software: Fix bad backbuffer size
2021-06-23 18:36:04 -04:00
Pokechu22
51862135d6 Software: Remove texinfo.sourcerow == SourceRow::Colors assert
These asserts were removed for the hardware renderer in #3684.
2021-06-20 18:05:57 -07:00
Pokechu22
c583cac568 Hack to hide debug cubes in Super Mario Sunshine
... while not breaking other games.
2021-06-09 20:50:49 -07:00
Techjar
2f1b639f0a VideoCommon: Restore BBox* forwarding functions 2021-05-31 18:01:47 -04:00