Commit Graph

4180 Commits

Author SHA1 Message Date
Mai M 8b81481920
Merge pull request #9710 from JosJuice/volatile-begone
Remove all remaining volatile qualifiers
2021-05-20 10:20:22 -04:00
JMC47 93e9d8be86
Merge pull request #8923 from Filoppi/OSD-fixes
fixes for "On Display Messages"
2021-05-18 00:33:15 -04:00
JosJuice 8a0f5ea04a Remove all remaining volatile qualifiers 2021-05-15 09:52:04 +02:00
Mat M d74a1068b8
Merge pull request #9540 from Pokechu22/better-fifo-analyzer-part-2
Fifo analyzer quality of life improvements
2021-05-14 15:51:53 -04:00
Mat M 964fed77c5
Merge pull request #9707 from JosJuice/remove-atomic-header
Remove Atomic.h
2021-05-14 14:33:24 -04:00
Scott Mansell 9f91fb6447
Merge pull request #9688 from Filoppi/input_cleanup
Input cleanup
2021-05-14 20:51:33 +12:00
JosJuice b93983b50a Remove Atomic.h
The STL has everything we need nowadays.

I have tried to not alter any behavior or semantics with this
change wherever possible. In particular, WriteLow and WriteHigh
in CommandProcessor retain the ability to accidentally undo
another thread's write to the upper half or lower half
respectively. If that should be fixed, it should be done in a
separate commit for clarity. One thing did change: The places
where we were using += on a volatile variable (not an atomic
operation) are now using fetch_add (actually an atomic operation).

Tested with single core and dual core on x86-64 and AArch64.
2021-05-13 18:56:27 +02:00
Mat M d034c830ac
Merge pull request #9681 from iwubcode/texture-info
VideoCommon: move all texture calculations to a "TextureInfo" class
2021-05-13 06:44:08 -04:00
Filoppi f4fec42165 Add mixed comments to input code, make some tooltip clearer 2021-05-12 18:27:23 +03:00
iwubcode 182dfc38e6 VideoCommon: move all texture calculations to a "TextureInfo" class. This ever so slightly improves readability and allows for the full texture name to be generated outside of the hires texture cache 2021-05-11 22:58:36 -05:00
JMC47 eb5cd9be78
Merge pull request #9694 from iwubcode/xfb-tcache-hash
VideoCommon: update TextureCache logic for finding oversized XFBs
2021-05-09 15:20:53 -04:00
iwubcode 6fd7867c56 VideoCommon: simplify TextureCacheBase by comparing a xfb's hash against a newly calculated one. This fixes games like Teenage Mutant Ninja Turtles (Wii) which use oversized textures where the stride doesn't match the BytesPerRow and that resulted in a different hash algorithm being used. By not hashing the texture before, we improve performance by hashing at most once in all direct XFB lookup scenarios. 2021-05-08 01:29:48 -05:00
Pokechu22 e1d45e9ba6 UberShaderPixel: always run indirect stage logic
Hardware testing has confirmed that fb_addprev and wrapping both run even when the indirect stage is disabled.
2021-05-07 16:37:47 -07:00
Pokechu22 b5844ab195 PixelShaderGen: always run indirect stage logic
Hardware testing has confirmed that fb_addprev and wrapping both run even when the indirect stage is disabled.
2021-05-07 16:37:47 -07:00
Pokechu22 5e3360c2cc UberShaderPixel: Fix OOB tex coord indices
Previously we set the texture coordinate to zero, now we set
the texture coordinate *index* to zero. This fixes the ripple
effect of the Mario painting in Luigi's Mansion.
2021-05-07 16:37:47 -07:00
Pokechu22 ed02034967 UberShaderPixel: Return fixed-point values from selectTexCoord
This change should have no behavioral differences itself, but allows for changing the behavior of out of bounds tex coord indices more easily in the next commit.  Without this change, returning tex0 for out of bounds cases and then applying the fixed-point logic would use the wrong tex dimension info (tex0 with I_TEXDIMS[1] or such), which is inaccurate.
2021-05-07 16:37:10 -07:00
Tillmann Karras f6cf85a8bc PixelShaderGen: Fix OOB tex coord indices
Previously we set the texture coordinate to zero, now we set
the texture coordinate *index* to zero. This fixes the ripple
effect of the Mario painting in Luigi's Mansion.

Co-authored-by: Pokechu22 <Pokechu022@gmail.com>
2021-05-07 16:28:09 -07:00
Pokechu22 002ff4e4dd PixelShaderGen: Remove unused num_texgens argument
It became unused in f039149198.
2021-05-07 16:28:08 -07:00
Pokechu22 c3668e179c Split TevStageIndirect::mid into matrix_index and matrix_id 2021-05-07 16:27:52 -07:00
Pokechu22 1d628d087b Add 1 when displaying the number of TEV stages 2021-05-07 16:14:19 -07:00
Pokechu22 072304404c Correct indirect stage ref typos
YAGCD uses BI0/BC0/BI1/BC1/BI2/BC2/BI3/BC3, so I'm pretty sure the BI2/BC3/BI4/BC4 names are a typo that just was propagated.
2021-05-07 16:14:18 -07:00
Pokechu22 77b1cca987 Separate vertex components by spaces 2021-05-07 15:42:26 -07:00
Pokechu22 df77a687e8 Add descriptions for GX_LOAD_INDX_A/B/C/D 2021-05-07 15:42:26 -07:00
Pokechu22 0a906f553f Move vertex size and component calculation to VertexLoaderBase 2021-05-07 15:42:17 -07:00
Pokechu22 fa7077763f Remove VertexLoaderBase::IsInitialized
It is no longer relevant for the current set of loaders after 7030542546.  If it becomes relevant again, a static function named IsUsable or IsCompatibleWithCurrentMachine or something would be a better approach.
2021-05-07 15:42:17 -07:00
Pokechu22 cafffff75e Eliminate TVtxAttr 2021-05-07 15:42:17 -07:00
Pokechu22 0a71ce143a Extract VertexLoaderARM64::GetLoadSize into a new function 2021-05-07 15:42:16 -07:00
Pokechu22 252ef6bb34 Use bool bitfields in VAT 2021-05-07 15:42:16 -07:00
Pokechu22 b6149623aa Remove VertexLoader::ToString 2021-05-07 15:42:13 -07:00
Pokechu22 bc7da726a5 Convert VertexLoader_Color to a table 2021-05-07 15:42:11 -07:00
Léo Lam a6f6211dde
Merge pull request #9633 from Pokechu22/BitfieldExtract-pointer-to-member
Change BitfieldExtract to use a pointer to the bitfield member
2021-05-08 00:21:15 +02:00
Pokechu22 0f7c9ef767 Change BitfieldExtract to use a pointer to the bitfield member 2021-05-07 15:11:17 -07:00
Léo Lam 049b92b7ef
Merge pull request #9417 from Filoppi/input-1
Fix FPS counter and Game Window speed % breaking on pause/unpause
2021-05-07 15:08:01 +02:00
Léo Lam 2b632f6d5d
Merge pull request #9641 from lynlevenick/ash/texture-cache-opt
Remove spurious memory allocations in TextureCacheBase::SerializeTexture and DeserializeTexture
2021-05-07 15:01:23 +02:00
Filoppi 818672b585 Fix FPS counter and Game Window speed % breaking on pause/unpause
-Add pause state to FPSCounter.
-Add ability to have more than one "OnStateChanged" callback in core.
-Add GetActualEmulationSpeed() to Core. Returns 1 by default. It's used by my input PRs.
2021-05-06 01:10:04 +03:00
Scott Mansell ab55c948a1 Update zcompression format change TODO 2021-05-05 11:32:42 +12:00
Scott Mansell a4796e512a Implement EFB Peeks for compressed z16 formats
This fixes an issue in RS3 where engine lens flares would shine
though ships during cutscenes
2021-05-05 11:32:29 +12:00
Filoppi 3492f51eaf OnScreenDisplay: a few fixes
-They might have never drawn if DrawMessages wasn't called before they actually expired
-Their fade was wrong if the duration of the message was less than the fade time

This makes them much more useful for debugging, I know there might be other means
of debugging like logs and imgui, but this was the simplest so that's what I used.
If you want to print the same message every frame, but with a slightly different value
to see the changes, it now work.

To compensate for the fact that they are now always rendered once,
so on start up a lot of old messages (printed while the emulation was off) could show up,
I've added a "drop" time, which means if a msg isn't rendered for the first
time within that time, it will be dropped and never rendered.
2021-04-25 15:45:30 +03:00
ezio1900 97ea3a603e VideoCommon: Fix scissorOffset, handle negative value correctly
VideoCommon: Change the type of BPMemory.scissorOffset to 10bit signed: S32X10Y10
VideoBackends: Fix Software Clipper.PerspectiveDivide function, use BPMemory.scissorOffset instead of hard code 342
2021-04-24 08:46:21 +08:00
ash!! 43ceba4fef optimize TextureCacheBase::SerializeTexture, ::DeserializeTexture
texture serialization and deserialization used to involve many memory
allocations and deallocations, along with many copies to and from
those allocations. avoid those by reserving a memory region inside the
output and writing there directly, skipping the allocation and copy to
an intermediate buffer entirely.
2021-04-18 13:40:42 -07:00
JMC47 821e51cda4
Merge pull request #7214 from stenzek/cp-access-sync
Fifo: Run/sync with the GPU on command processor register access
2021-04-18 11:17:25 -04:00
Stenzek e3ac5dca32 Fifo: Run/sync with the GPU on command processor register access 2021-04-18 03:24:01 +10:00
sspacelynx aba9cae5ab
DriverDetails: Fix broken vector bitwise AND on Mali drivers 2021-04-11 15:15:02 +02:00
Pokechu22 f32b771f7a Skip loading unknown XF registers in the FIFO player
This avoids some warnings, which were originally fixed by ignoring loads with a value of zero (see 636bedb207 / #3242).

Note that FifoCI will report some changes, but only on the first frame; these seem to be timing related as they don't happen if a different write is used to replace skipped ones.
2021-04-06 11:54:49 -07:00
Pokechu22 cde6cf2ab5 Track and log CP commands 0x00/0x10/0x20 differently from other unknown commands
They appear to relate to perf queries, and combining them with truely unknown commands would probably hide useful information.  Furthermore, 0x20 is issued by every title, so without this every title would be recorded as using an unknown command, which is very unhelpful.
2021-04-06 11:54:49 -07:00
Pokechu22 193f6a67a7 Log a warning for inexact uses of MATINDEX or VCD commands 2021-04-06 11:54:48 -07:00
Pokechu22 7fe1292c62 Add game quirks for unknown BP/CP/XF commands 2021-04-06 11:44:31 -07:00
Léo Lam 6d1eb6ae5a
Merge pull request #9621 from Pokechu22/cassert
Replace uses of cassert with Common/Assert.h
2021-04-03 12:46:21 +02:00
Pokechu22 004dfd1586 Replace uses of cassert with Common/Assert.h 2021-04-02 10:18:18 -07:00
blåhaj f339bc69c8 VertexShaderGen: Sonic epsilon hack for OpenGL ES
debaf63fe8 moved the "Sonic epsilon hack"
to vertex shaders. However, it was only done for targets with depth
clamping. If this is not available, for example the target is OpenGL ES,
the Sonic problem appears (https://bugs.dolphin-emu.org/issues/11897).

A version of the "Sonic epsilon hack" is added for targets without
depth clamping.
2021-04-02 15:12:30 +02:00