summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
AgeCommit message (Collapse)Author
2021-07-27Remove note about anisotropic filtering requiring edge LODPokechu22
This was added because YAGCD's info on MAXANISO (near TX_SETMODE0 in Section 5.11.1) claims it's the case, but Extrems says it does work. I haven't tested anything myself, and dolphin still does not actually implement anisotropic filtering based on this field.
2021-07-25VideoBackendBase: Prefer Vulkan over OGL on macOS Mojave and newerOatmealDome
2021-07-24Convert NaN to 1 when generating texture coordinatesPokechu22
This fixes eyelids in Shadow the Hedgehog during cutscenes (https://bugs.dolphin-emu.org/issues/11458)
2021-07-20WrapMode=3 behaves the same as ClampPokechu22
2021-07-20PixelShaderGen: Fix OpenGL ES bounding box compilation errorJosJuice
2021-07-20VideoCommon: Expand vector comparisons instead of overloading any()Techjar
For whatever stupid reason, Mali drivers do not allow overloading built-in functions.
2021-07-18PostProcessing: fix link error when switching shadersTillmann Karras
Switching to a post-processing shader with different configuration options will change the UBO, so we need to recompile the vertex shader as well.
2021-07-14Merge pull request #9881 from blaahaj/postprocessing-fixConnor McLaughlin
PostProcessing: Fix OpenGL UBO linking with configuration options
2021-07-12Merge pull request #9888 from JosJuice/jitarm64-logicalimm-everywhereMarkus Wick
JitArm64: Stop using hand-encoded logical immediates
2021-07-12JitArm64: Stop using hand-encoded logical immediatesJosJuice
2021-07-12VideoCommon: fix generic buildCrystalGamma
On x86/ARM Common/Assert.h is included by way of VideoCommon/VertexLoader{X64,ARM64}.h, on other platforms it is missing.
2021-07-11Use separate fmt::formatters for each indirect matrix columnPokechu22
This also fixes a bug where the float version of row 1 actually showed row 0 again.
2021-07-11Ignore the top bit of the indirect texture matrix scalePokechu22
This fixes the Zora eye coloration in Twilight Princess.
2021-07-11Merge pull request #9876 from Pokechu22/skyward-sword-mapTilka
Fix indirect textures when format is not ITF_8
2021-07-10JitArm64: Encode logical immediates at compile-time where possibleJosJuice
Manually encoding and decoding logical immediates is error-prone. Using ORRI2R and friends lets us avoid doing the work manually, but in exchange, there is a runtime performance penalty. It's probably rather small, but still, it would be nice if we could let the compiler do the work at compile-time. And that's exactly what this commit does, so now I have no excuse for trying to manually write logical immediates anymore.
2021-07-08Fix indentation for alphabumpPokechu22
2021-07-08Fix indirect textures when format is not ITF_8Pokechu22
2021-07-07PostProcessing: Fix OpenGL UBO linking with configuration optionsblåhaj
2021-07-06Merge pull request #9595 from Dentomologist/fix_vertex_loader_test_warningsLéo Lam
VertexLoaderTest: Fix memset assignment warning
2021-07-06Merge pull request #9862 from delroth/spdx-tagsMai M
Use SPDX for Dolphin licensing info
2021-07-05Merge pull request #9640 from v1993/patch-1JMC47
Allow post-processing shaders to query reciprocal of window resolution
2021-07-05treewide: convert GPLv2+ license info to SPDX tagsPierre Bourdon
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-06-24Merge pull request #9833 from Pokechu22/ubershaders-tevcoordLéo Lam
UberShaderPixel: always set tevcoord, even if the stage has no texture
2021-06-24Merge pull request #9837 from AdmiralCurtiss/mysterious-voodoo-performance-fixLéo Lam
VideoCommon/Fifo: Move SConfig::GetInstance() outside the GPU loop.
2021-06-23Merge pull request #9826 from Techjar/fix-tmem-mipsJMC47
VideoCommon/TextureInfo: Fix mipmap loading from tmem
2021-06-23VideoCommon/Fifo: Move SConfig::GetInstance() outside the GPU loop.Admiral H. Curtiss
2021-06-21UberShaderPixel: always set tevcoord, even if the stage has no texturePokechu22
This fixes NES game graphics when UberShaders are in use.
2021-06-20VideoCommon/TextureInfo: Fix mipmap loading from tmemTechjar
Even address needs to be offset to the first mipmap entry.
2021-06-19VideoCommon: enhance hi res texture support by having exact matches be ↵iwubcode
picked before wildcard matches. Additionally, add the ability to ignore the texture hash portion of the texture name when loading a hi res texture
2021-06-19VideoCommon: split the texture hash from the base name when generating the ↵iwubcode
texture name
2021-06-13VideoCommon: Define scalar any() and all() functions in GLSLTechjar
This fixes bounding box shaders failing to compile under Vulkan, due to differences between GLSL and HLSL in the return value of vector comparisons and what types these functions accept. I included all() for the sake of completeness.
2021-06-11Merge pull request #9801 from Techjar/bbox-rounding-hackJMC47
VideoCommon: Only include centered pixels in bounding box
2021-06-10VideoCommon: Only include centered pixels in bounding boxTechjar
At higher resolutions, our bounding box dimensions end up being slightly larger than original hardware in some cases. This is not necessarily wrong, it's just an artifact of rendering at a higher resolution, due to bringing out detail that wouldn't have appeared on original hardware. It causes a texel to fall partially on what would have been a single pixel at native resolution, resulting in the coordinates getting bumped up to the next valid value. In many cases, these slightly larger bounding boxes are perfectly fine, as games don't hard-code expected dimensions. It is problematic in Paper Mario TTYD though, for a somewhat complicated reason. Paper Mario TTYD frequently uses EFB copies to pre-render a bunch of animation frames for a character sprite (especially in Chapter 2), so that it can then render 100 or more of them without bringing the GameCube to its knees. Based on my observation, the game seems to set aside a region of memory to store these EFB copies. This region is obviously fairly small, as the GameCube only has 24MB of RAM. There are 2 rooms in Chapter 2 where you fight a horde of as many as 100 Jabbies, which are also rendered using EFB copies, so in this room the game ends up making 130(!) EFB copies just for Puni and Jabbi sprites. This seems to nearly fill the region of memory it set aside for them. Unfortunately, our slightly larger bounding boxes at higher resolutions results in overflowing this memory, causing very strange behavior. Some EFB copies partially overlap game state, resulting in reading it as a garbage RGB5A3 texture that constantly changes. Others apparently somehow trigger a corner case in our persistent buffer mapping, causing them to partially overwrite earlier EFB copies. What this change does is only include the screen coordinates that align with the equivalent native resolution pixel centers, which generally results in the bounding boxes being more in line with original hardware. It isn't perfect, but it's enough to fix Paper Mario TTYD's Jabbi rooms by avoiding the buffer overflow. Notably, it is more accurate at odd resolutions than at even resolutions. Native resolution is completely unaffected by this change, as should be the case. This change may also have a small positive impact on shader performance at higher resolutions, as there will be less atomic operations performed.
2021-06-09Eliminate TVtxDesc.GetLegacyHexPokechu22
2021-06-09Remove PixelShaderGen hasindstagePokechu22
2021-06-09Hack to hide debug cubes in Super Mario SunshinePokechu22
... while not breaking other games.
2021-06-08Merge pull request #9782 from Techjar/bbox-ogl-upsidedown-fixConnor McLaughlin
VideoCommon: Perform OpenGL bounding box inversion in pixel shader
2021-06-07Merge pull request #9792 from sepalani/lintLéo Lam
Lint: End of namespace
2021-06-07Lint: End of namespaceSepalani
2021-06-06VideoCommon: Perform OpenGL bounding box inversion in pixel shaderTechjar
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-05VideoCommon: Round bounding box coordinates down and remove pixel center offsetTechjar
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-01Merge pull request #9764 from Pokechu22/amd-opengl-bbox-fixJMC47
VideoCommon: Fix bounding box on AMD/OpenGL/Windows
2021-05-31VideoCommon: Add fallback handling for bounding box when disabled or unsupportedTechjar
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-31VideoCommon: Fix bounding box on AMD/OpenGL/WindowsPokechu22
Co-authored-by: Techjar <tecknojar@gmail.com>
2021-05-31VideoCommon: Restore BBox* forwarding functionsTechjar
2021-05-30Fix -Wreorder warningsTillmann Karras
2021-05-29VideoCommon: Remove BBox* forwarding functionsTechjar
2021-05-28VideoCommon: Move bounding box pixel quads rounding to shaderTechjar
This avoids rounding values that the game writes to the bounding box registers, especially the default values.
2021-05-27Skip indirect operation for out of bounds indirect stagesPokechu22
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-24Merge pull request #9441 from skylersaleh/masterLéo Lam
Apple M1 Support for MacOS