Commit Graph

2402 Commits

Author SHA1 Message Date
6490c2b86b OGL: Use explicit flush instead of GL_SYNC_FLUSH_COMMANDS_BIT 2018-02-09 01:25:14 +10:00
4b96db8fc9 OGL: Don't leave staging texture buffer bound after mapping
This could cause glReadPixels() calls which assume no buffer is bound
(e.g. CPU EFB access) to fail. The problem was limited to devices which
don't support persistent mapping, as the map path is not otherwise.
2018-02-09 01:15:27 +10:00
096131c908 Merge pull request #6334 from stenzek/startup
Video Backend Initialization/Core Boot Improvements
2018-02-07 23:35:54 -08:00
4636230f5a Merge pull request #6333 from stenzek/vulkan-transition
Vulkan: Fix invalid stage mask in layout transitions
2018-02-07 23:32:05 -08:00
be716a680f Do not link to libusbhid on FreeBSD/NetBSD
Both libusbhid (system library) and libhidapi (3rd party library)
provide a function called hid_init. Dolphin was being linked to both.

The WiimoteScannerHidapi constructor was calling hid_init without
arguments. libusbhid's hid_init expects one argument (a file path).
It was being called as if it was defined without arguments, which
resulted in a garbage path being passed in, and because of that,
the Qt GUI was failing to launch with the following error:
'dolphin-emu-qt2: @ : No such file or directory'
2018-02-05 00:46:59 +03:00
260d5b7aa7 BPMemory: Handle fog configuration where both A and C are infinity/NaN
The console appears to behave against standard IEEE754 specification
here, in particular around how NaNs are handled. NaNs appear to have no
effect on the result, and are treated the same as positive or negative
infinity, based on the sign bit.

However, when the result would be NaN (inf - inf, or (-inf) - (-inf)),
this results in a completely fogged color, or unfogged color
respectively. We handle this by returning a constant zero for the A
varaible, and positive or negative infinity for C depending on the sign
bits of the A and C registers. This ensures that no NaN value is passed
to the GPU in the first place, and that the result of the fog
calculation cannot be NaN.
2018-02-01 17:40:39 +10:00
fe5150cc31 Merge pull request #6303 from TraceBullet/auto-adjust-window-size
Fix Auto-Adjust Window Size option making the window too large
2018-01-29 17:28:44 +10:00
c790077c13 VideoBackend: Remove PeekMessages method
The video thread and backend no longer create any windows, therefore
there will never be any messages dispatched to their thread.
2018-01-27 13:53:55 +10:00
d96e8c9d76 VideoBackends: Combine Initialize/Prepare and Cleanup/Shutdown methods
Also allows the work previously done in Prepare to return a failure
status.
2018-01-27 13:53:55 +10:00
ab6f932347 Fix Auto-Adjust Window Size option making the window too large 2018-01-26 10:47:19 -05:00
81ae88d2d5 AbstractTexture: Fix crash in Vulkan backend when freeing texture 2018-01-26 19:12:11 +10:00
fd39103c73 Vulkan: Fix invalid stage mask in layout transitions 2018-01-26 12:33:24 +10:00
47f453d7aa Vulkan: Fix waiting on non-existant fence when reading back 2018-01-26 12:33:24 +10:00
38e0b6e2ab AbstractTexture: Move Bind() method to Renderer
This makes state tracking simpler, and enables easier porting to command
lists later on.
2018-01-22 13:22:09 +10:00
4997fbce44 Vulkan: Fix possible mismatch between EFB framebuffer and render pass
This could happen when changing MSAA settings or internal resolution at
runtime.
2018-01-11 16:02:31 +10:00
0525726338 Vulkan: Move pipeline barrier outside render pass for EFB peeks 2018-01-11 15:36:01 +10:00
48a8063cd5 Vulkan: Fix FramebufferManagerBase::m_EFBLayers being set out-of-range 2018-01-11 15:30:27 +10:00
173a33886c Vulkan: Move render pass management to ObjectCache 2018-01-11 15:21:34 +10:00
0e50b2c9f2 Vulkan: Add missing layout transition when resolving MSAA depth buffers 2018-01-11 15:21:33 +10:00
c709f3c2d1 Standardise some enums from ALL_CAPS to CamelCase 2018-01-05 10:03:58 -08:00
8d68adcaf3 Workaround qualcomm driver bug
It seems it doesn't like modifying inout variables in place - so instead
use a temporary for ocol0/ocol1 and only write them once at the end of
the shader
2018-01-05 09:56:46 -08:00
29a9ed043b Implement dual-source blending in shader
For some GLES drivers that don't support dual-source blending, but do
support GL_EXT_shader_framebuffer_fetch, this might be useful.
2018-01-05 09:56:46 -08:00
5f5aca7870 OGL: Fix incorrect usage of glGetTextureSubImage
Was causing issues with texture dumping on newer drivers.
2017-12-10 15:31:14 +10:00
02dd062518 VideoCommon: Drop now unused efb2tex matrix generation. 2017-12-06 09:30:03 +01:00
e0ffce2785 D3D: Use VideoCommon EFB-to-texture shaders 2017-12-06 03:33:50 +10:00
050440fd5b OGL/TextureConverter: Remove unnecessary using declaration 2017-12-03 18:51:22 -05:00
93e85f9a7c OGL/TextureConverter: Resolve -Wmissing-variable-declaration warnings 2017-12-03 18:51:17 -05:00
f68956a614 Merge pull request #6232 from lioncash/d3d-vert-mgr
D3D/VertexManager: Add missing includes
2017-12-03 09:24:23 +01:00
6ca85dbf0a VKTexture: Add missing override specifier to the other ScaleRectangeFromTexture() prototype 2017-12-02 20:20:13 -05:00
c7bc16811c VKTexture: Remove unimplemented ScaleRectangleFromTexture() prototype 2017-12-02 20:15:32 -05:00
b0fadbb5de D3D/VertexManager: Add missing includes
Gets rid of reliance on indirect includes
2017-12-02 20:09:33 -05:00
d95177526f VideoBackends: Fix -Wswitch warnings 2017-12-02 21:52:07 +01:00
e2a9ee384f VideoCommon: Rename TextureConversionShader namespace. 2017-12-02 15:17:39 +01:00
e8febd0cef VideoCommon: Create a namespace for TextureConversionShaderGen. 2017-12-02 15:17:39 +01:00
491c10ec96 VideoBackends: Use VideoCommon shader generators for efb2tex copies.
This will generate one shader per copy format. For now, it is the same
shader with the colmat hard coded. So it should already improve the GPU
performance a bit, but a rewrite of the shader generator is suggested.

Half of the patch is done by linkmauve1:
VideoCommon: Reorganise the shader writes.
2017-12-02 15:17:39 +01:00
1e7096dd27 D3DBase: Mark file-scope variables as internally linked where applicable 2017-11-30 23:46:46 -05:00
cd68b3606c Merge pull request #6193 from stenzek/readbacks
Abstract Staging Textures - VideoCommon interface for texture readbacks/uploads
2017-12-01 14:24:06 +10:00
cf1f975148 Vulkan: Fix headless framedumping without USE_X11 set 2017-11-23 17:00:32 +10:00
32125cf181 OGL: Fix headless frame dumping
Also skips swapping the window system buffers in headless mode, as there
may not be a surface which can be swapped in the first place. Instead,
we call glFlush() at the end of a frame in this case.
2017-11-23 16:53:55 +10:00
ab44536a3c OGL: Update the window size after swapping buffers, not before
Prevents us from rendering beyond the viewport bounds.
2017-11-23 16:09:59 +10:00
7f217a8bb2 Vulkan: Drop StagingTexture2D class as it is now duplicated functionality 2017-11-22 18:49:33 +10:00
db1d9de933 AbstractTexture: Drop slow map readback path 2017-11-22 18:49:33 +10:00
6577365851 VideoCommon: Re-implement asynchronous frame dumping
This was lost as a result of hybrid XFB, now it is back, and ~10%
faster in very brief testing.
2017-11-22 18:49:33 +10:00
752dd4761d D3D: Use new readback methods for EFB2RAM 2017-11-22 18:47:04 +10:00
9da9f26b90 OGL: Use new readback methods for EFB2RAM 2017-11-22 18:47:04 +10:00
59517318d6 Vulkan: Use new readback methods for texture encoding 2017-11-22 18:47:04 +10:00
c2cc128f1b AbstractTexture: Implement Save using new common methods 2017-11-22 18:47:04 +10:00
56afebeb44 AbstractTexture: Seperate CopyRectangleFromTexture to two methods
ScaleRectangleFromTexture, which does a draw, and
CopyRectangleFromTexture, which where possible, does a bit-for-bit copy.
2017-11-22 18:47:04 +10:00
f43d85921d VideoBackends: Add AbstractStagingTexture class
Can be used for asynchronous readback or upload of textures.
2017-11-22 18:47:04 +10:00
a584ccc7d8 AbstractTexture: Support BGRA8 formats
Used for some driver's swap chains, and EFB to RAM.
2017-11-22 18:47:04 +10:00