Commit Graph

516 Commits

Author SHA1 Message Date
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
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 4a4244f04d Software: Fix bad backbuffer size
MAX_XFB_WIDTH/HEIGHT are the largest XFB sizes seen in practice, but do not make sense to use for the backbuffer size, which should be the size of the window.  The old code created screenshots with a size of 720x540 on NTSC games when "Dump Frames at Internal Resolution" is unchecked; now, the window size is used.
2021-05-24 12:16:39 -07: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
Pokechu22 16c17ed9ce Software: 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:28:09 -07:00
Pokechu22 c3668e179c Split TevStageIndirect::mid into matrix_index and matrix_id 2021-05-07 16:27:52 -07:00
Léo Lam 1c6232e95f
Merge pull request #9646 from PatrickFerry/sw-textureencoder-alignedwidth
SW: Fix alignedWidth in TextureEncoder
2021-04-24 20:13:10 +02:00
JMC47 18e84361d9
Merge pull request #9660 from ezio1900/master
VideoCommon: Fix scissorOffset, handle negative value correctly
2021-04-23 21:21:53 -04: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
JMC47 cfc4af76a9
Merge pull request #9321 from Pokechu22/sw-copyregion
Software: Fix out of bounds accesses in CopyRegion
2021-04-23 14:07:46 -04:00
Patrick A. Ferry f6a4368192 SW: Fix alignedWidth in TextureEncoder
This was causing issues in Software Renderer. Look at bug 11487
2021-04-19 02:06:52 +01:00
Pokechu22 5b1c632862 Software: Invert backface test when viewport is positive
Fixes Jimmie Johnson's Anything with an Engine.
2021-03-06 22:00:16 -08:00
Pokechu22 058c7db80b Software: Fix out of bounds accesses in CopyRegion
Fixes issue 11393.

The problem is that left and top make no sense for a width by height array; they only make sense in a larger array where from which a smaller part is extracted.  Thus, the overall size of the array is provided to CopyRegion in addition to the sub-region.  EncodeXFB already handles the extraction, so CopyRegion's only use there is to resize the image (and thus no sub-region is provided).
2021-03-06 21:58:28 -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 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 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 fcd3efa1ae Software: Implement points 2021-02-13 15:59:40 -08:00
Pokechu22 8e348b87e9 Software: Fix line-width effects 2021-02-13 15:59:39 -08:00
Pokechu22 7d5ae03219 Software: Always divide the texture coordinates by q.
Equivalent to da43f9a15 for the software renderer.
2021-02-12 16:37:47 -08:00
Léo Lam a354814240
Merge pull request #9424 from Pokechu22/sw-no-special-case
Software: Remove normalization special case
2021-02-11 19:36:45 +01:00
Shawn Hoffman 500a694ca8 msbuild: bundle all dolphin "core" code into single library 2021-01-27 14:29:49 -08:00
Pokechu22 e825af7b1b Software: Remove normalization special case
The special case doesn't appear to make a significant difference in any games, and the current implementation has a (minor, fixable) issue that breaks Super Mario Sunshine (both with a failed assertion (https://bugs.dolphin-emu.org/issues/11742) and a rendering issue (https://bugs.dolphin-emu.org/issues/7476)).  Hardware testing wasn't able to reproduce the special case, either, so it may just not exist.

PR #9315 contains a fixed implementation of the special case on all video backends, and can serve as a basis for it being reintroduced if it is found to exist under more specific circumstances.  For now, I don't see a reason to keep it present.
2021-01-03 23:22:48 -08: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
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
Stenzek d6ce8eef36 Software: Use same logic for colors as hardware backends 2020-11-20 15:54:06 -08:00
Lioncash 23a8baa605 Software: Migrate logging over to fmt
Migrates the software backend over to the fmt-capable logger.
2020-11-09 03:14:01 -05:00
JosJuice 6eefc3c524 Make default graphics backend not show up as empty
Fixes https://bugs.dolphin-emu.org/issues/12245.

I considered making a change to DolphinQt instead of
the core, but then additional effort would've been
required to add the same fix to the Android GUI once
we start using the new config system there.
2020-09-06 12:56:45 +02:00
Shawn Hoffman 2f47f486af msbuild: re-enable standalone vcxproj processing 2020-08-22 16:17:50 -07:00
Shawn Hoffman 94bf48b67c msbuild: refactor stuff out of project files (for dolphin) 2020-08-22 16:17:50 -07:00
Filip Gawin 0ede5d1537 Use range loop (if possible) 2020-07-18 18:29:16 -05:00
Stenzek bf74553878 FramebufferManager: Copy to color format for depth readbacks on GLES
glReadPixels() with depth formats is not supported.

Should fix broken EFB access on GLES.
2020-05-24 16:11:11 +10:00
Jun Su 81f8099cc6 Remove warnings of -Wsign-compare
Cast the variable to the coresponding type.
2020-03-25 07:57:14 +08:00
Stenzek 6fcb1c6c46 Add an ARM64 target to Visual Studio projects 2019-12-28 19:20:41 +10:00
Anthony fdb78b64e1
Merge pull request #8513 from lioncash/bounding-box
VideoCommon/BoundingBox: Make interface for querying bounding box data
2019-12-07 18:40:02 -08:00
Lioncash 9bd533ebe4 VideoCommon/BoundingBox: Make interface for querying bounding box data
Rather than expose the bounding box members directly, we can instead
provide an interface for code to use. This makes it nicer to transition
from global data, as the interface function names are already in
place.
2019-12-05 11:48:42 -05:00
Lioncash 10f7674651 VideoCommon/IndexGenerator: Eliminate static state
Now that we've extracted all of the stateless functions that can be
hidden, it's time to make the index generator a regular class with
active data members.

This can just be a member that sits within the vertex manager base
class. By deglobalizing the state of the index generator we also get rid
of the wonky dual-initializing that was going on within the OpenGL
backend.

Since the renderer is always initialized before the vertex manager, we
now only call Init() once throughout the execution lifecycle.
2019-12-05 10:49:32 -05:00
Stenzek dd23a1ee79 Update VS projects/solutions to VS2019 2019-11-30 13:42:52 +10:00
Silent 890f781cd0
Factorize software renderer backend switching warning to be fetched from a new GetWarningMessage in video backend - will be needed for DX11.1 feature set warnings 2019-07-26 19:39:07 +02:00
Lioncash 2b9389202e VideoCommon: Remove unused MathUtil.h include from VideoCommon.h
This header doesn't actually make use of MathUtil.h within itself, so
this can be removed. Many other source files used VideoCommon.h as an
indirect include to include MathUtil.h, so these includes can also be
adjusted.

While we're at it, we can also migrate valid inclusions of VideoCommon.h
into cpp files where it can feasibly be done to minimize propagating it
via other headers.
2019-07-16 20:54:34 -04:00
Lioncash d4337eebde VideoCommon/Statistics: Rename stats global to g_stats
Makes the global variable follow our convention of prefixing g_ on
global variables to make it obvious in surrounding code that it's not a
local variable.
2019-07-10 23:34:54 -04:00
Lioncash a99c7d01e1 VideoCommon/Statistics: Normalize statistic variable names
Normalizes all variables related to statistics so that they follow our
coding style.

These are relatively low traffic areas, so this modification isn't too
noisy.
2019-07-10 23:19:10 -04:00
Lioncash 04c06ec661 VideoCommon/Statistics: Use std::array for projection values
Makes the members within the interface much nicer to look at, and also
makes copying them over much nicer too.
2019-06-20 08:06:20 -04:00
Connor McLaughlin 951b66e4ac
Merge pull request #8049 from stenzek/crop
Renderer: Adjust source rectangle when crop would draw off screen
2019-06-08 20:57:52 +10:00
Lioncash cd9281772a VideoSoftware/CMakeLists: Specify headers in target sources 2019-05-31 06:54:26 -04:00