summaryrefslogtreecommitdiff
path: root/Source/Core/VideoBackends
AgeCommit message (Collapse)Author
2021-10-13Fix all uninitialized variable warnings (C26495)Pokechu22
2021-10-10BPMemory: Refactor/consolidate TexUnit AddressingScott Mansell
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-08Merge pull request #9803 from Techjar/bbox-videocommonLéo Lam
VideoCommon: Abstract bounding box
2021-10-04VideoCommon: Abstract bounding boxTechjar
This moves much of the duplicated bounding box code into VideoCommon, leaving only the specific buffer implementations in each backend.
2021-09-20DriverDetails: Add broken dual source blending bug to MoltenVK on Intel GPUsOatmealDome
2021-09-20VulkanContext: Don't assume anv for Intel GPUs on macOSOatmealDome
2021-09-16VulkanContext: Disable subgroup reduction on macOS with AMD GPUsOatmealDome
2021-08-30VideoBackends / VideoCommon: allow the ability to set debug names for ↵iwubcode
shaders / textures. These names are visible in applications like RenderDoc
2021-08-30Update clang-format to version 12Léo Lam
12 is the latest release and various editors (VS, VSCode and CLion) ship with clang-format 12 by default.
2021-08-11D3D12: Transition compute textures to UAV stateRobin Kertels
2021-08-05ShaderCompiler: Attach source text to SPIR-V for debuggers like RenderDocOatmealDome
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-20Software: Handle texture wrapping more accuratelyPokechu22
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-08Fix indirect textures when format is not ITF_8Pokechu22
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-23Merge pull request #9742 from Pokechu22/sw-resolutionJMC47
Software: Fix bad backbuffer size
2021-06-20Software: Remove texinfo.sourcerow == SourceRow::Colors assertPokechu22
These asserts were removed for the hardware renderer in #3684.
2021-06-13Merge pull request #9784 from PEmu2/masterLéo Lam
Update buffer_storage warning message
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-07Vulkan: Fix subgroup reductionTechjar
It seems that we were writing values from helper invocations, which produces wrong results.
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-05Update buffer_storage warning messagePEmu2
2021-05-31VideoCommon: Restore BBox* forwarding functionsTechjar
2021-05-29Merge pull request #9766 from stenzek/ogl-bbox-memory-barrierConnor McLaughlin
OGL: Force memory barrier when reading back bounding box values
2021-05-29OGL: Force memory barrier when reading back bounding box valuesConnor McLaughlin
We also need to ensure the the CPU does not receive stale values which have been updated by the GPU. Apparently the buffer here is not coherent on NVIDIA drivers. Not sure if this is a driver bug/spec violation or not, one would think that glGetBufferSubData() would invalidate any caches as needed, but this path is only used on NVIDIA anyway, so it's fine. A point to note is that according to ARB_debug_report, it's moved from video to host memory, which would explain why it needs the cache invalidate.
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-28VideoBackends/OGL: Cache bounding box values between readsConnor McLaughlin
2021-05-28VideoBackends/D3D: Cache bounding box values between readsConnor McLaughlin
2021-05-24Software: Fix bad backbuffer sizePokechu22
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-22VideoCommon: Split BBox* functions into common and backend implementation ↵Techjar
variants This will allow for some aspects of bounding box to be handled in VideoCommon instead of individual backends.
2021-05-21Fix perf query regressionJosJuice
When trying to do a small optimization in 8a0f5ea, I failed to take into account that WeakFlush and FlushOne update m_query_count. Only D3D11 and OGL had this problem, not D3D12 and Vulkan.
2021-05-15Remove all remaining volatile qualifiersJosJuice
2021-05-13Remove Atomic.hJosJuice
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-07Software: Fix OOB tex coord indicesPokechu22
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-07Split TevStageIndirect::mid into matrix_index and matrix_idPokechu22
2021-04-24Merge pull request #9646 from PatrickFerry/sw-textureencoder-alignedwidthLéo Lam
SW: Fix alignedWidth in TextureEncoder
2021-04-23Merge pull request #9660 from ezio1900/masterJMC47
VideoCommon: Fix scissorOffset, handle negative value correctly
2021-04-24VideoCommon: Fix scissorOffset, handle negative value correctlyezio1900
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-23Merge pull request #9321 from Pokechu22/sw-copyregionJMC47
Software: Fix out of bounds accesses in CopyRegion
2021-04-23Merge pull request #9350 from Pokechu22/sw-viewportJMC47
Software: Invert backface test when viewport is positive
2021-04-19SW: Fix alignedWidth in TextureEncoderPatrick A. Ferry
This was causing issues in Software Renderer. Look at bug 11487
2021-04-12Vulkan: Work around AMD exclusive fullscreen bug (21.3+)Connor McLaughlin
2021-03-06Software: Invert backface test when viewport is positivePokechu22
Fixes Jimmie Johnson's Anything with an Engine.
2021-03-06Software: Fix out of bounds accesses in CopyRegionPokechu22
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-06Convert BPMemory to BitField and enum classPokechu22
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-06Convert XFMemory to BitField and enum classPokechu22
Additionally a new ClipDisable union has been added (though it is not currently used by Dolphin).
2021-03-06Convert CPMemory to BitField and enum classPokechu22
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-02-13Software: Implement pointsPokechu22