Commit Graph

539 Commits

Author SHA1 Message Date
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
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