Commit graph

3828 commits

Author SHA1 Message Date
Lioncash
f7eff6dab8 VideoCommon/ShaderGenCommon: Simplify operator!= for ShaderUid
This can be implemented as the negation of operator==, placing the
comparison logic for equality and inequality in the same place.
2019-05-30 06:41:57 -04:00
Lioncash
954246d10e VideoCommon/ShaderGenCommon: Remove use of a union within ShaderUid
This is only ever used to retrieve a raw view of the given UID data
structure, however it's already valid C++ to retrieve a char/unsigned
char view of an object for bytewise inspection.

u8 maps to unsigned char on all platforms we support, so we can just do
this directly with a reinterpret cast, simplifying the overall
interface.
2019-05-30 06:41:57 -04:00
Lioncash
149a97e396 VideoCommon: Remove unnecessary memset on ShaderUid instances.
Zero-initialization zeroes out all members and padding bits, so this is
safe to do. While we're at it, also add static assertions that enforce
the necessary requirements of a UID type explicitly within the ShaderUid
class.

This way, we can remove several memset calls around the shader
generation code that makes sure the underlying UID data is zeroed out.
Now our ShaderUid class enforces this for us, so we don't need to care about
it at the usage sites.
2019-05-30 06:41:54 -04:00
Léo Lam
0cfdcf436d
Merge pull request #8136 from lioncash/arglist
VideoCommon/{NetPlayChatUI/NetPlayGolfUI}: Minor changes
2019-05-29 13:18:03 +02:00
Lioncash
1a0f8e7804 VideoCommon/VertexLoaderX64: Add missing header guard 2019-05-29 06:35:22 -04:00
Lioncash
778623c48c VideoCommon/NetPlayGolfUI: Remove unused header
This header doesn't actually make use of any std::string facilities.
2019-05-29 06:20:57 -04:00
Lioncash
cf0f2bbf1d VideoCommon/NetPlayGolfUI: Default the destructor in the cpp file
Ensures the destruction logic is kept local to the translation unit. It
also doesn't really do much to have it specified in the header.
2019-05-29 06:20:05 -04:00
Lioncash
0fabab0760 VideoCommon/NetPlayGolfUI: Initialize netplay_client in the constructor initializer list 2019-05-29 06:20:05 -04:00
Lioncash
c958fc1278 VideoCommon/NetPlayChatUI: Default destructor in the cpp file
Ensures that the destruction logic is kept local to the translation unit
(making it nicer when it comes to forward declaring non-trivial types).
It also doesn't really do much to define it in the header.
2019-05-29 06:20:05 -04:00
Lioncash
53b115b81e VideoCommon/NetPlayChatUI: Use nullptr where applicable
We gotsa type dedicated to this concept already :P
2019-05-29 06:14:43 -04:00
Lioncash
50a15b7484 VideoCommon/NetPlayChatUI: Take std::string by value in AppendChat()
Given we're simply storing the std::string into a deque. We can emplace
it and move it. Completely avoiding copies with the current usage of the
function.
2019-05-29 06:12:29 -04:00
Lioncash
08223bad9f VideoCommon/NetPlayChatUI: Set member variable within the constructor initializer list
Member variables should be initialized within the constructor
initializer list if possible.
2019-05-29 06:09:49 -04:00
Connor McLaughlin
707266aeed
Merge pull request #8069 from iwubcode/passive_support
VideoCommon: Implement passive stereoscopic 3D
2019-05-12 15:15:34 +10:00
Stenzek
3e29fdb4a7 CommandProcessor: Don't reset the video buffer when FIFO distance is changed
This prevents partially-processed commands from being lost when switching buffers.
2019-05-11 00:31:37 +10:00
weihuoya
e98f43d2af bbox minor fx 2019-05-09 17:30:17 +08:00
Techjar
ff972e3673 Reformat repo to clang-format 7.0 rules 2019-05-06 18:48:04 +00:00
iwubcode
c513bb5309 VideoCommon: Implement passive stereoscopic 3D 2019-05-04 22:58:00 -05:00
Léo Lam
ab9ece9bca Replace MathUtil::Clamp with std::clamp 2019-05-04 23:12:17 +02:00
Léo Lam
99a4ca8de7
Merge pull request #7839 from ShFil119/impr/redundant
Remove redundant initialization
2019-05-04 22:50:51 +02:00
z0z0z
5bacb2e4c6 Disable Vulkan overrides for RADV driver 2019-05-01 07:59:54 -04:00
Filip Gawin
c110ffcdaa Remove redundant initialization 2019-04-30 01:22:24 +02:00
Connor McLaughlin
1b1662773e
Merge pull request #8048 from stenzek/vulkan-negative-scissor-rect
Vulkan: Don't set a negative offset in scissor rect
2019-04-28 23:37:51 +10:00
Connor McLaughlin
d2d8d7ce90
Merge pull request #8051 from JosJuice/efb-constexpr
Turn EFB_WIDTH/EFB_HEIGHT into constexpr
2019-04-28 20:37:25 +10:00
JosJuice
ced2306fc5 Turn EFB_WIDTH/EFB_HEIGHT into constexpr
https://bugs.dolphin-emu.org/issues/11692#note-5

Also change const into constexpr while we're at it.
2019-04-28 11:50:17 +02:00
Connor McLaughlin
f7199397a0
Merge pull request #8047 from stenzek/d3d-feature-level-10
D3D11: Fix Dolphin crashing on feature level 10.0 devices
2019-04-28 17:07:37 +10:00
Stenzek
53af27b133 FramebufferManager: Fix invalid transitions for 1xIR in EFB cache 2019-04-28 16:13:49 +10:00
Stenzek
51154d6907 FramebufferShaderGen: Don't emit SV_SampleIndex when not using SSAA 2019-04-28 15:26:21 +10:00
Stenzek
d5b3595314 TextureCache: Fix incorrect format string in GetXFBTexture() 2019-04-28 14:32:37 +10:00
iwubcode
c2abf092e9 VideoCommon: Do not reset the gather pipe (WPAR buffer) as this does not reflect what actually happens on real hardware. On hardware, there's no way for the GPU to signal to reset the WPAR buffer. Instead, the WPAR buffer will be reset automatically upon receiving 32 bytes or when spr[WPAR] is written 2019-04-26 22:20:53 -05:00
Connor McLaughlin
59c0e51f5b
Merge pull request #8000 from stenzek/more-videocommon-cleanup
Additional cleanup/fixes from VideoCommon merge
2019-04-22 12:50:22 +10:00
Connor McLaughlin
93be178f28
Merge pull request #7857 from stenzek/opengl-stereo
OGL: Fix stereoscopy
2019-04-22 12:41:12 +10:00
Connor McLaughlin
44d5a71e27
Merge pull request #7965 from jordan-woyak/condvar-fixes
Minor changes to usages of std::condition_variable.
2019-04-21 23:50:53 +10:00
Stenzek
9577d0641b ShaderCache: Fix crash at shutdown on shared shader compilation fail 2019-04-21 14:28:14 +10:00
Stenzek
f8c1ba409c Replace EFBRectangle/TargetRectangle with MathUtil::Rectangle 2019-04-21 14:28:14 +10:00
Connor McLaughlin
5b4ebccf6b
Merge pull request #8012 from stenzek/bounding-box-shaders
PixelShaderGen: Don't emit bounding box shader code for old UIDs when disabled
2019-04-21 13:27:05 +10:00
Stenzek
b09a0e1a60 TextureCache: Check for out-of-range partial copy rect after scaling 2019-04-21 12:54:32 +10:00
Stenzek
3791262d96 TextureCache: Use linear filtering on y-scaled and >1xIR VRAM copies 2019-04-21 12:41:15 +10:00
Stenzek
708bd3d9f7 TextureCache: Simplify XFB reconstruction
This also better handles in-memory interlaced XFB data placed by the CPU
by considering the stride from the VI.
2019-04-21 12:41:15 +10:00
Stenzek
dbaba0062a TextureDecoder: Move XFB decoding to Common
This was previously missing for generic (which is used on ARM).
2019-04-21 12:41:15 +10:00
Stenzek
eddde3e6c8 ShaderGen: Use interface blocks when geometry shaders are supported
We don't use explicit locations in OpenGL currently, so this breaks
when we use alternative names in the geometry shaders.
2019-04-20 23:44:33 +10:00
Stenzek
c6b45c5ca9 ShaderCache: Fix crash if pipeline from uid cache fails creation 2019-04-20 23:16:29 +10:00
Stenzek
96aa762d1e PixelShaderGen: Don't emit bounding box shader code for old UIDs when disabled
If bounding box is enabled when a UID cache is created, then later disabled,
we shouldn't emit the bounding box portion of the shader.

Fixes pipeline creation errors on D3D12 backend for this case.
2019-04-20 23:16:14 +10:00
Connor McLaughlin
c26f53bf84
Merge pull request #7999 from stenzek/pipeline-cache-data
Implement pipeline data cache for OpenGL and D3D12
2019-04-20 12:56:02 +10:00
Jordan Woyak
779e618046 VideoCommon: Change free-look's middle-mouse action to roll the camera. 2019-04-17 05:10:11 -05:00
Stenzek
00b83b4196 ShaderCache: Utilize pipeline cache data where possible 2019-04-16 00:39:43 +10:00
Stenzek
61a656570e AbstractPipeline: Support returning "cache data"
"Cache data" can be used to assist a driver with creating pipelines by
using previously-compiled shader ISA.
2019-04-16 00:09:47 +10:00
Jordan Woyak
d34a9afe04 Minor changes to usages of std::condition_variable. 2019-04-06 17:39:25 -05:00
spycrab
e44433c2f6
Merge pull request #7955 from Techjar/netplay-golf-mode
NetPlay golf mode
2019-04-05 17:25:23 +02:00
Techjar
6c393f9ff4 Add imgui golf mode overlay 2019-04-05 07:01:03 -04:00
Techjar
a318c55cec PixelShaderGen: Fix bounding box coordinates being offset by 1 pixel 2019-04-03 10:09:05 -04:00