Commit graph

2157 commits

Author SHA1 Message Date
OatmealDome
f87f704f43 ShaderCompiler: Add helpers for Metal framebuffer fetch 2021-12-06 22:36:39 -05:00
OatmealDome
40eb071562 ShaderCompiler: Add new helper define for input attachment binding 2021-12-06 22:36:39 -05:00
OatmealDome
8e72136eeb VulkanContext: Set Apple GPUs as supporting framebuffer fetch 2021-11-24 17:52:24 -05: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
4a9b26de86 VideoCommon: Expose SamplerState to shaders
The benefit to exposing this over the raw BP state is that adjustments Dolphin makes, such as LOD biases from arbitrary mipmap detection, will work properly.
2021-11-17 20:04:34 -08:00
Pokechu22
6236a0d494 Eliminate SamplerCommon 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
OatmealDome
2209dc0355 MoltenVK: Use an external project instead of a pre-compiled dylib
Also, update MoltenVK to match Vulkan SDK 1.2.189.
2021-11-13 11:43:23 -08:00
Pokechu22
04d8cdfe88 Convert LOG_TYPE and LOG_LEVELS to enum class 2021-10-24 11:48:36 -07: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
Léo Lam
ff1cb5a1c0
Merge pull request #9803 from Techjar/bbox-videocommon
VideoCommon: Abstract bounding box
2021-10-08 22:24:38 +02: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
OatmealDome
a256c11d2f DriverDetails: Add broken dual source blending bug to MoltenVK on Intel GPUs 2021-09-20 19:14:41 -04:00
OatmealDome
aa64f7f14f VulkanContext: Don't assume anv for Intel GPUs on macOS 2021-09-20 18:57:19 -04:00
OatmealDome
7e8f5208fe VulkanContext: Disable subgroup reduction on macOS with AMD GPUs 2021-09-16 23:32:10 -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
Léo Lam
815b590dfe
Update clang-format to version 12
12 is the latest release and various editors (VS, VSCode and CLion)
ship with clang-format 12 by default.
2021-08-30 00:20:18 +02:00
Robin Kertels
40dcf1c2e2
D3D12: Transition compute textures to UAV state 2021-08-11 00:17:04 +02:00
OatmealDome
d453390c48 ShaderCompiler: Attach source text to SPIR-V for debuggers like RenderDoc 2021-08-05 03:04:18 -04: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
Léo Lam
2898cf5121
Merge pull request #9784 from PEmu2/master
Update buffer_storage warning message
2021-06-13 12:56:26 +02: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
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
Techjar
58238e75a7 Vulkan: Fix subgroup reduction
It seems that we were writing values from helper invocations, which
produces wrong results.
2021-06-07 22:32:25 -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
PEmu2
44206b7702
Update buffer_storage warning message 2021-06-05 15:08:47 -07:00
Techjar
2f1b639f0a VideoCommon: Restore BBox* forwarding functions 2021-05-31 18:01:47 -04:00
Connor McLaughlin
b3a414ea9d
Merge pull request #9766 from stenzek/ogl-bbox-memory-barrier
OGL: Force memory barrier when reading back bounding box values
2021-05-29 17:04:57 +10:00
Connor McLaughlin
6393f157f0 OGL: Force memory barrier when reading back bounding box values
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-29 16:57:40 +10: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
Connor McLaughlin
7fd0a526e1 VideoBackends/OGL: Cache bounding box values between reads 2021-05-28 19:30:46 +10:00
Connor McLaughlin
0c11dca121 VideoBackends/D3D: Cache bounding box values between reads 2021-05-28 19:30:46 +10: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
JosJuice
1d3b9fdec2 Fix perf query regression
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-21 13:39:59 +02:00
JosJuice
8a0f5ea04a Remove all remaining volatile qualifiers 2021-05-15 09:52:04 +02: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
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