Commit Graph

4303 Commits

Author SHA1 Message Date
Pokechu22 c583cac568 Hack to hide debug cubes in Super Mario Sunshine
... while not breaking other games.
2021-06-09 20:50:49 -07:00
Connor McLaughlin c729852d72
Merge pull request #9782 from Techjar/bbox-ogl-upsidedown-fix
VideoCommon: Perform OpenGL bounding box inversion in pixel shader
2021-06-08 13:24:03 +10:00
Léo Lam 5e371bb4be
Merge pull request #9792 from sepalani/lint
Lint: End of namespace
2021-06-07 12:16:08 +02:00
Sepalani ce8004c9c1 Lint: End of namespace 2021-06-07 12:55:52 +04:00
Techjar 4866002c9b VideoCommon: Perform OpenGL bounding box inversion in pixel shader
Running the min/max operation on the upside down, quad-rounded pixel
coordinates before inverting them to the standard upper-left origin
produces wrong results. Therefore, we need to do the inversion before
rounding to pixel quads.
2021-06-06 20:55:06 -04:00
Techjar 83d55704aa VideoCommon: Round bounding box coordinates down and remove pixel center offset
Fragment coordinates always have a 0.5 offset from a whole integer, as
that's where the pixel center is on modern GPUs. Therefore, we want to
always round the fragment coordinates down for bounding box
calculations. This also renders the pixel center offset useless, as 0.5
vs ~0.5833333 makes no difference when rounding down.
2021-06-05 00:34:10 -04:00
JMC47 a12865570d
Merge pull request #9764 from Pokechu22/amd-opengl-bbox-fix
VideoCommon: Fix bounding box on AMD/OpenGL/Windows
2021-06-01 19:55:54 -04:00
Techjar 8cfe49295f VideoCommon: Add fallback handling for bounding box when disabled or unsupported
The SDK seems to write "default" bounding box values before every draw
(1023 0 1023 0 are the only values encountered so far, which happen to
be the extents allowed by the BP registers) to reset the registers for
comparison in the pixel engine, and presumably to detect whether GX has
updated the registers with real values. Handling these writes and
returning them on read when bounding box emulation is disabled or
unsupported, even without computing real values from rendering, seems
to prevent games from corrupting memory or crashing.

This obviously does not fix any effects that rely on bounding box
emulation, but having the game not clobber its own code/data or just
outright crash is a definite improvement.
2021-05-31 19:56:24 -04:00
Pokechu22 c58837964f VideoCommon: Fix bounding box on AMD/OpenGL/Windows
Co-authored-by: Techjar <tecknojar@gmail.com>
2021-05-31 16:22:50 -07:00
Techjar 2f1b639f0a VideoCommon: Restore BBox* forwarding functions 2021-05-31 18:01:47 -04:00
Tillmann Karras faec77a971 Fix -Wreorder warnings 2021-05-30 17:10:20 +01:00
Techjar a24e78b3cf VideoCommon: Remove BBox* forwarding functions 2021-05-29 01:45:21 -04:00
Techjar e4aef0a85b VideoCommon: Move bounding box pixel quads rounding to shader
This avoids rounding values that the game writes to the bounding box
registers, especially the default values.
2021-05-28 23:30:22 -04:00
Pokechu22 5928182a4c Skip indirect operation for out of bounds indirect stages
This fixes rendering issues in Viewtiful Joe (https://bugs.dolphin-emu.org/issues/12525), but it is not entirely hardware accurate, as hardware testing showed other, more complex behavior in this case.  However, it should be good enough for our purposes.
2021-05-27 22:13:42 -07:00
Léo Lam 51671921c4
Merge pull request #9441 from skylersaleh/master
Apple M1 Support for MacOS
2021-05-24 12:39:01 +02:00
Mai M 95aadff0e7
Merge pull request #9737 from Techjar/fix-textureinfo-hasmips
VideoCommon/TextureInfo: Restore old mipmap detection logic
2021-05-22 19:39:52 -04:00
Skyler Saleh 76ed9310f2 Apple M1: RAII Wrapper for JITPageWrite*Execute*()
Added RAII wrapper around the the JITPageWriteEnableExecuteDisable() and
JITPageWriteDisableExecuteEnable() to make it so that it is harder to forget to
pair the calls in all code branches as suggested by leoetlino.
2021-05-22 15:25:18 -07:00
Skyler Saleh 4ecb3084b7 Apple M1 Support for MacOS
This commit adds support for compiling Dolphin for ARM on MacOS so that it can
run natively on the M1 processors without running through Rosseta2 emulation
providing a 30-50% performance speedup and less hitches from Rosseta2.

It consists of several key changes:

- Adding support for W^X allocation(MAP_JIT) for the ARM JIT
- Adding the machine context and config info to identify the M1 processor
- Additions to the build system and docs to support building universal binaries
- Adding code signing entitlements to access the MAP_JIT functionality
- Updating the MoltenVK libvulkan.dylib to a newer version with M1 support
2021-05-22 15:25:17 -07:00
Techjar be6b000bec VideoCommon: Account for pixel quads in bounding box calculation
The GC/Wii GPU rasterizes in 2x2 pixel groups, so bounding box values
will be rounded to the extents of these groups, rather than the exact
pixel. To account for this, we'll round the top/left down to even and
the bottom/right up to odd. I have verified that the values resulting
from this change exactly match a real Wii.
2021-05-22 05:58:52 -04:00
Techjar 0f17990137 VideoCommon: Split BBox* functions into common and backend implementation variants
This will allow for some aspects of bounding box to be handled in
VideoCommon instead of individual backends.
2021-05-22 01:11:57 -04:00
Techjar 42d1658c50 VideoCommon/TextureInfo: Restore old mipmap detection logic 2021-05-22 00:35:43 -04:00
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
Valeri b3b1518f91
Allow shaders to query reciprocal of window resolution 2021-04-13 20:14:17 +03: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
JMC47 ce8e87c64b
Merge pull request #8747 from iwubcode/map-freelook
Support controlling Free Look via input bindings (motion controls, gamepad, etc!)
2021-04-01 01:05:00 -04:00
Pokechu22 51de3d0fd1 Refactor CP array constants slightly 2021-03-26 17:27:21 -07:00
Dentomologist 1cc035eb05 VertexLoaderTest: Fix memset assignment warning
Initialize and assign members of TVtxDesc and VAT structs directly
instead of using memset.

Fixes -Wclass-memaccess warning from gcc on Debian.
2021-03-18 21:10:29 -07:00
iwubcode 425ee13d35 FreeLook: update camera and manager to use a delta time for movement (in case we decide to move this somewhere else in the future) 2021-03-18 17:54:12 -05:00
iwubcode 80cf87158e VideoCommon: update FreeLook camera to add quaternion based rotation, fix orbital and fps implementations 2021-03-17 20:58:33 -05:00
JosJuice a45a0a2066
Merge pull request #9494 from Dentomologist/convert_arm64reg_to_enum_class
Arm64Gen: Convert ARM64Reg to enum class
2021-03-17 00:05:23 +01:00
Dentomologist f0f206714f Arm64Gen: Convert ARM64Reg to enum class
Most changes are just adding ARM64Reg:: in front of the constants.
2021-03-13 10:10:59 -08:00
Dentomologist 95c86ee48b FreeLookCamera: Add override specifiers 2021-03-07 10:10:00 -08:00
Dentomologist 1c71d33ed5 FreeLookCamera: Remove unused variable 2021-03-07 10:10:00 -08:00
Pokechu22 df81210e96 Use formatters in GetBPRegInfo; add missing commands
BPMEM_TEV_COLOR_ENV + 6 (0xC6) was missing due to a typo.  BPMEM_BP_MASK (0xFE) does not lend itself well to documentation with the current FIFO analyzer implementation (since it requires remembering the values in BP memory) but still shouldn't be treated as unknown.  BPMEM_TX_SETMODE0_4 and BPMEM_TX_SETMODE1_4 (0xA4-0xAB) were missing entirely.
2021-03-06 19:27:20 -08:00
Pokechu22 70f9fc4e75 Convert BPMemory to BitField and enum class
Additional changes:
- For TevStageCombiner's ColorCombiner and AlphaCombiner, op/comparison and scale/compare_mode have been split as there are different meanings and enums if bias is set to compare.  (Shift has also been renamed to scale)
- In TexMode0, min_filter has been split into min_mip and min_filter.
- In TexImage1, image_type is now cache_manually_managed.
- The unused bit in GenMode is now exposed.
- LPSize's lineaspect is now named adjust_for_aspect_ratio.
2021-03-06 19:27:19 -08:00
Pokechu22 db8ced7e4e Add FogParam0::FloatValue and FogParam3::FloatValue
This value will be used in the register description; so expose it in a way that can be re-used instead of calculating it in 2 places later.
2021-03-06 19:27:18 -08:00
Pokechu22 f2bea67709 Fix typo with ztex2 op in UseVertexDepthRange 2021-03-06 19:27:17 -08:00
Pokechu22 762fe33a3d Rename BPMEM_EFB_BR to BPMEM_EFB_WH 2021-03-06 19:27:16 -08:00
Pokechu22 81b84a5ebe Use XFMEM_REGISTERS_START/END in XFRegWritten and LoadXFReg 2021-03-06 19:27:15 -08:00
Pokechu22 8c80369373 Add names and descriptions for regular XF memory 2021-03-06 19:27:15 -08:00
Pokechu22 2d6ec7457d Add names and descriptions for XF registers to the FIFO analyzer 2021-03-06 19:27:14 -08:00
Pokechu22 aab81d5aa0 Convert XFMemory to BitField and enum class
Additionally a new ClipDisable union has been added (though it is not currently used by Dolphin).
2021-03-06 19:27:14 -08:00
Pokechu22 953e09428f Add names and descriptions for CP registers to the FIFO analyzer 2021-03-06 19:27:14 -08:00
Pokechu22 f749fcfa9f Convert CPMemory to BitField and enum class
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.
2021-03-06 19:27:08 -08:00
Pokechu22 c27efb3f1f Create constants for CP registers and masks 2021-03-06 17:34:05 -08:00
iwubcode 0a9c764dc4 VideoCommon: Join the prefetch thread before clearing to avoid a potential crash that can occur by multiple threads touching a single resource 2021-02-11 19:18:38 -06:00
Léo Lam c386c5acc2
Merge pull request #9366 from iwubcode/freelook_camera_quaternion
VideoCommon: allow Free Look to be manipulated by a quaternion
2021-01-28 01:34:09 +01:00
iwubcode 586c689d63 VideoCommon: use Quaternion for Free Look orientation 2021-01-27 18:22:10 -06:00
Shawn Hoffman 500a694ca8 msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
Shawn Hoffman 84128d9532 rename Common/File to Common/IOFile 2021-01-27 14:29:48 -08:00
Shawn Hoffman 07fd02f207 rename Core/Analytics to Core/DolphinAnalytics 2021-01-27 14:29:47 -08:00
Dentomologist e3237661ec Arm64Emitter: Convert ShiftType to enum class 2021-01-17 16:21:38 -08:00
Dentomologist 70c54065ab Arm64Emitter: Convert IndexType to enum class 2021-01-15 23:27:11 -08:00
Léo Lam eafb9de047
Merge pull request #9323 from waddlesplash/haiku
Rehabilitate Haiku support.
2021-01-05 16:09:43 +01:00
Filippo Tarpini a5a6ef8512
Fix a couple of typos
[committer note: fixed commit message style]
2021-01-05 15:24:21 +01:00
waddlesplash 2df11d3911 Rehabilitate Haiku support. 2021-01-02 16:54:24 -05:00
iwubcode 16dc2fa379 VideoCommon: Fix crash that occurs on loading a fifo log due to uninitialized Free Look control type 2020-12-26 17:26:21 -06:00
iwubcode c7b24d6213 VideoCommon: Update active config when we check for config changes, this ensures Free Look settings are copied at the start of the frame. Also update the camera's controller type at this time 2020-12-24 13:51:46 -06:00
iwubcode bcf63c463b VideoCommon: Add 'Active' state to FreelookCamera to future proof if we ever add multiple cameras 2020-12-24 13:49:25 -06:00
iwubcode a37fd8c5d9 VideoCommon: Update Free Look camera with settings change... 2020-12-24 13:49:25 -06:00
iwubcode f6ab9a9b6f Core / VideoCommon: Remove old Free Look config 2020-12-24 13:49:25 -06:00
iwubcode d5bc209eb6 VideoCommon: Change 'Zoom' to 'MoveForward' since it really isn't a zoom 2020-12-24 13:48:38 -06:00
iwubcode cb6ae6a4b1 VideoCommon: Add speed to Free Look camera 2020-12-24 13:48:38 -06:00
Léo Lam 0ad2f3da45
Core: Remove ImageWrite and get rid of -Wmissing-declarations warnings 2020-12-16 16:04:19 +01:00
Léo Lam eafe005672
Fix -Wclass-memaccess warnings
We want to clear/memset the padding bytes, not just each member,
so using assignment or {} initialization is not an option.

To silence the warnings, cast the object pointer to u8* (which is not
undefined behavior) to make it explicit to the compiler that we want
to fill the object representation.
2020-12-16 15:37:43 +01:00
David Carlier 2c355b81f2
Add NetBSD support 2020-12-15 02:34:25 +01:00
Léo Lam fd5c69deca
Merge pull request #9289 from AdmiralCurtiss/simple-png-api-write
Use Simplified libpng API for writing PNGs.
2020-12-11 10:24:16 +01:00
Léo Lam d8b9a040ed
Merge pull request #9275 from JosJuice/framedump-boot-time
FrameDump: Start timing at 0 ticks when starting from boot
2020-12-05 23:57:41 +01:00
Lioncash 139d4fc76e General: Convert PanicAlerts over to fmt equivalent
Converts lingering panic alert calls over to the fmt-capable ones.
2020-12-02 13:38:33 -05:00
JosJuice d69f243c32 FrameDump: Start timing at 0 ticks when starting from boot 2020-11-27 17:54:08 +01:00
Admiral H. Curtiss 324de7fa02 VideoCommon: Use Common::SavePNG() to write textures. 2020-11-26 23:55:05 +01:00
Lioncash 978e5469af Core: Remove commented out logs
Commented out logs shouldn't be kept around, since it makes performing
renames and migrations harder, as tooling generally doesn't inspect
comments.
2020-11-26 07:49:37 -05:00
JosJuice 28c696fa74 Fix vertex ubershader GLES compile errors
Regression from 51724c1.
2020-11-23 11:42:41 +01:00
JosJuice 118d056410 FrameDump: Re-add call to av_register_all
This was removed in 4902146329.
We still need this for the ffmpeg version we're using on Windows.
2020-11-22 00:11:23 +01:00
Stenzek 51724c1ccd LightingShaderGen: Always calculate lighting for both color channels
Cel-damage depends on lighting being calculated for the first channel
even though there is no color in the vertex format (defaults to the
material color). If lighting for the channel is not enabled, the vertex
will use the default color as before.

The default value of the color is determined by the number of elements in
the vertex format. This fixes the grey cubes in Super Mario Sunshine.

If the color channel count is zero, we set the color to black before the
end of the vertex shader. It's possible that this would be undefined
behavior on hardware if a vertex color index that was greater than the
channel count was used within TEV.
2020-11-20 15:54:04 -08:00
JosJuice e63b00e562 Fix translatable strings which contain non-positional arguments 2020-11-20 20:24:30 +01:00
Léo Lam bca82bb942
Merge pull request #9239 from altimumdelta/FFDUMP_Separate_Logging
FrameDump Logging: Separate log type and migrate to fmt
2020-11-20 02:21:57 +01:00
Lioncash 3d9b2aa005 VideoCommon: Migrate over to fmt
Migrates off the printf-based formatting where applicable.
2020-11-17 21:23:58 -05:00
altimumdelta f44b13ffcd FrameDump Logging: Separate log type and migrate to fmt 2020-11-10 17:17:43 +01:00
Lioncash a5b28f1f07 ShaderGenCommon: Rename WriteFmt() to Write()
Now that we've converted all of the shader generators over to using fmt,
we can drop the old Write() member function and perform a rename
operation on the WriteFmt() to turn it into the new Write() function.

All changes within this are the removal of a <cstdarg> header, since the
previous printf-based Write() required it, and renaming. No functional
changes are made at all.
2020-11-09 02:31:49 -05:00
LC add2b44eb7
Merge pull request #9197 from lioncash/uber-pixel
UberShaderPixel: Migrate over to fmt
2020-11-09 02:13:57 -05:00
JosJuice 28aa04312c Common/LinearDiskCache: Replace std::fstream with File::IOFile
File::IOFile is better suited to this type of task.
Split out from a future PR.
2020-11-05 00:31:17 +01:00
JMC47 6a3a71cfd7
Merge pull request #9141 from Techjar/but-for-how-long
Re-enable GPU Texture Decoding under MoltenVK
2020-10-29 01:22:13 -04:00
Lioncash dc72edf0e2 UberShaderPixel: Migrate over to fmt
Completes the migration over to using the fmt-formatting WriteFmt
function. The next PR will rename all usages of WriteFmt, while
simultaneously getting rid of the old printf code.
2020-10-27 13:25:11 -04:00
Léo Lam d2a2ec870d
Merge pull request #9171 from lioncash/pixel
PixelShaderGen: Migrate over to fmt
2020-10-26 20:35:47 +01:00
Léo Lam 7f66de062c
Merge pull request #9188 from jordan-woyak/stop-caring-about-old-avcodec-versions
VideoCommon/FrameDump: Remove code for older versions of avcodec.
2020-10-26 18:55:48 +01:00
iwubcode 8a4773bc91 VideoCommon: update vcproj file to set HAS_OPENGL 2020-10-23 17:08:53 -05:00
iwubcode a34745926e VideoCommon: remove HAS_OPENGL from VideoBackendBase 2020-10-23 17:00:32 -05:00
iwubcode 272717b3f4 VideoCommon: update vcproj file to set HAS_VULKAN 2020-10-23 17:00:05 -05:00
iwubcode d12380f26b VideoCommon: rename USE_VULKAN to HAS_VULKAN in VideoBackendBase 2020-10-23 16:59:22 -05:00
Lioncash 5de2244acf PixelShaderGen: Migrate over to fmt
Continues the migration of the shader generators over to fmt.

After this, all that remains in the Ubershader pixel generator.
2020-10-23 17:17:55 -04:00
Jordan Woyak 4902146329 VideoCommon/FrameDump: Remove code for older versions of avcodec. 2020-10-23 14:43:50 -05:00
mazes-80 f375ee72a2
CMake: Add option to enable/disable Vulkan video backend 2020-10-23 20:14:46 +02:00
JosJuice 908d6f8fa0
Merge pull request #9179 from leoetlino/available-video-backends
VideoCommon: Get rid of the global g_available_video_backends
2020-10-23 20:02:21 +02:00
Jordan Woyak 4807a5e157 VideoCommon: FrameDump fixes/cleanups. 2020-10-22 12:17:26 -05:00
Léo Lam 89b01cd6d3
Merge pull request #9169 from lioncash/uber-vert
UberShaderVertex: Migrate over to fmt
2020-10-22 01:21:31 +02:00
Léo Lam d08b80828d
VideoCommon: Simplify VideoBackendBase::GetDefaultBackendName
Now we can just call GetDefaultVideoBackend to get the default backend
and get its name by calling GetName.
2020-10-21 22:00:10 +02:00
Léo Lam aaaa3896c0
VideoCommon: Get rid of the global g_available_video_backends
Replace it with a function-local static that is initialized on first
use. This gets rid of a global variable and removes the need for
manual initialization in UICommon.

This commit also replaces the weird find_if that looks for a non-null
unique_ptr with a simple "is vector empty" check considering that
none of the pointers can be null by construction.
2020-10-21 22:00:10 +02:00
Lioncash 751d67a59a UberShaderVertex: Migrate over to fmt
Continues migration of the shader generators over to fmt.

With this, all that's left to move over are the pixel shaders (regular
and ubershader variants)
2020-10-20 09:24:10 -04:00
Léo Lam ce59b026c0
Merge pull request #9168 from lioncash/ifconst
DataReader: Make use of if constexpr where applicable
2020-10-20 14:56:24 +02:00
Lioncash 7bc2bbc508 DataReader: Make use of if constexpr where applicable
We can make use of if constexpr for cases where booleans will always
statically be known at compile-time.
2020-10-20 08:42:32 -04:00
Léo Lam dc5ae5ee66
Merge pull request #9165 from lioncash/ubercommon
UberShaderCommon: Migrate over to fmt
2020-10-20 14:42:19 +02:00