Stenzek
b01df8670f
Renderer: Fix throttle-disable (TAB) hotkey when vsync is enabled
2019-01-27 12:31:12 +10:00
Stenzek
774480ba23
Vulkan: Set contents scale of Metal layer to screen factor
...
This gives us a native resolution framebuffer.
2019-01-26 00:02:04 +10:00
Stenzek
ee0fa548bc
Vulkan: Don't bind last descriptor set if bounding box is unsupported
...
Fixes crash on a4xx/Vulkan.
2019-01-25 11:15:57 +10:00
Stenzek
e9b02e7dd0
Vulkan: Remove unused UpdateUtilityUniformBuffer function
2019-01-25 11:15:57 +10:00
Stenzek
e4b205c769
Decouple XFB scanout from presentation
2019-01-25 11:15:57 +10:00
Stenzek
c9c0b85056
VideoBackends: Store a backbuffer 'scale'
...
This is a scaling factor, used for hi-dpi configurations.
2019-01-25 11:15:57 +10:00
Stenzek
e03b8e899e
Vulkan: Move texture upload buffer to ObjectCache
2019-01-25 11:15:57 +10:00
Stenzek
63dd91628d
Remove old RasterFont classes
2019-01-25 11:15:57 +10:00
Stenzek
600d1fc0bc
Renderer: Use imgui for drawing debug text and OSD
2019-01-25 11:15:57 +10:00
Stenzek
d1868d9475
RenderBase: Implement imgui rendering
2019-01-25 11:10:49 +10:00
Stenzek
396b7c2978
OGL: Invalidate tracked state when calling ResetAPIState()
...
Due to the current design, any of the GL state can be mutated after
calling this function, so we can't assume that the tracked state will
match if we call SetPipeline() after ResetAPIState().
2019-01-25 11:10:49 +10:00
Stenzek
6bfe4c83a5
OGL: Fix broken stereoscopy geometry shader for EFB copies
2019-01-19 23:22:57 +10:00
zackhow
078fc74b54
Android/OGL: fix bounding box for OpenGL-ES
...
OpenGL-ES does not have glGetBufferSubData, so use glMapBufferRange instead
2019-01-09 21:08:49 -05:00
weihuoya
66a7db3850
Always flush on swap
2019-01-08 18:28:59 +08:00
Stenzek
7afd5cc2fb
Use main buffers for utility draws
2018-12-04 17:37:25 +10:00
Stenzek
5ca18ff04e
Vulkan: Restore viewport/scissor state on RestoreAPIState
2018-12-04 17:36:08 +10:00
Stenzek
b409a87d1a
D3D: Clamp viewport to current framebuffer dimensions, not target
2018-12-04 17:36:08 +10:00
Stenzek
fa8262fa4a
Vulkan: Don't panic on missing color/depth buffer in config
2018-12-04 17:36:08 +10:00
Stenzek
2644e920cc
Renderer: Add backbuffer format to base class
2018-12-04 17:36:08 +10:00
Stenzek
1adcd47dcb
Renderer: Add a base Initialize() method to match Shutdown()
2018-12-04 17:36:08 +10:00
weihuoya
3ab0f02cec
vulkan: fx index buffer reserve size
2018-12-03 19:23:36 +08:00
Connor McLaughlin
6388992f62
Merge pull request #7039 from stenzek/moltenvk
...
Vulkan: macOS support via MoltenVK
2018-11-30 21:55:30 +10:00
Stenzek
a0653a1a34
Vulkan: Fix incorrect fence being assigned to staging texture
2018-11-12 01:02:32 +10:00
Stenzek
673f1963a0
Vulkan: Support macOS via MoltenVK
...
The path to the MoltenVK library can be specified by the
LIBMOLTENVK_PATH environment variable, otherwise it assumes it is
located in the application bundle's Contents/MacOS directory.
2018-11-07 05:41:09 -08:00
Stenzek
c7a2b1572b
CMake: Build Vulkan backend on macOS
2018-11-07 05:12:20 -08:00
Stenzek
7efdd1070b
OGL: Fix crash when opening graphics window on another backend
2018-11-07 21:20:12 +10:00
Stenzek
66b6e72c5e
Vulkan: Submit fewer command buffers in deferred EFB copies mode
2018-11-07 16:25:01 +10:00
Stenzek
8e2c063d62
TextureCache: Implement deferred/batched EFB copies
2018-11-07 16:25:01 +10:00
Pierre Bourdon
f1413dbbf6
Merge pull request #7501 from Techjar/class-memaccess-cleanup
...
VideoCommon: Clean up class-memaccess warnings
2018-10-28 23:59:51 +01:00
Stenzek
7c4607a05a
Vulkan: Add missing increment of draw call count
2018-10-28 11:32:26 +10:00
Stenzek
0559311f92
GLContext: Runtime selection of EGL/GLX on Linux
2018-10-20 21:11:34 +10:00
Stenzek
025e909773
GLContext: Use destructor instead of Shutdown() to cleanup
...
Also uses the Initialize() method to make the context current.
2018-10-20 21:11:34 +10:00
Stenzek
dcdd02d646
GLContext: Remove global context pointer
2018-10-20 21:11:34 +10:00
Stenzek
eb284b5d66
VideoBackends: Pass window system info from host on creation
2018-10-20 21:11:34 +10:00
Stenzek
9c57a98723
GLContext: Use host connection
...
This also removes the need for a sleeping event thread.
2018-10-20 21:11:34 +10:00
Stenzek
1d827a5223
Renderer: Pull dimensions from GLInterface/Swapchain
2018-10-20 21:11:34 +10:00
Stenzek
a3961750a7
Drop Host_GetRenderSurface and pass display to backend
2018-10-20 21:11:34 +10:00
Stenzek
134d967be2
Refactoring and cleanup of GLInterface (now GLContext)
2018-10-20 21:11:34 +10:00
Tillmann Karras
97cc9894e4
Update to Visual Studio's default Windows SDK
2018-10-20 00:53:08 +01:00
Techjar
8560eecd49
VideoCommon: Clean up class-memaccess warnings
2018-10-14 23:05:47 -04:00
Stenzek
e3f475b30e
NullBackend: Initialize vtx_decl in VertexFormat
...
This field was previously left uninitialized, which resulted in corrupted
UID caches being created.
2018-10-14 21:24:09 +10:00
Mat M
ecd4897d43
Merge pull request #7437 from stenzek/graphics-options-race
...
Fix race condition caused by opening graphics options while running
2018-10-12 10:29:28 -04:00
Stenzek
2e905455b1
OGL: Disable scissor test when calling glBlitFramebuffer()
...
glBlitFramebuffer() does not bypass the scissor test, which meant that
part of texture copies (e.g. XFB) could have been clipped when running
under OpenGL ES, as glCopyImageSubData() is not supported.
2018-10-09 22:00:40 +10:00
Tillmann Karras
56fdcf5f00
VideoCommon: remove unnecessary floor()
...
floatindex is clamped to the range [0, 9]. For non-negative numbers
floor() is equivalent to trunc(). Truncation happens implicitly when
converting to uint, so the floor() is unnecessary.
2018-10-09 00:31:43 +01:00
Jules Blok
1ab1d41b10
Merge pull request #7457 from Tilka/use_clamp
...
VideoSoftware: make use of Clamp()
2018-10-07 19:53:45 +01:00
Tilka
af2f212039
Merge pull request #7348 from spycrab/gl_cache_shaders
...
GL/TextureCache: Clean up inline shader code
2018-10-06 00:28:54 +01:00
Tillmann Karras
a6a5d86cd8
VideoSoftware: make use of Clamp()
2018-10-05 22:07:38 +01:00
Stenzek
eb33d7af64
Core: Call InitBackendInfo before loading config
2018-09-28 21:44:41 +10:00
spycrab
392df8a11d
GL/TextureCache: Clean up inline shader code
2018-08-30 16:05:39 +02:00
Stenzek
448e19629d
Vulkan: Drop usage of VK_NV_glsl extension
...
It's not providing a large performance improvement anymore, after the
more recent drivers introduced a new shader compiler.
2018-08-29 13:12:19 +10:00
Stenzek
3323265d91
FramebufferManager: Dynamic selection of EFB depth format
2018-07-19 21:47:42 +10:00
Stenzek
b30342d38f
VideoBackends: Support D24S8 abstract texture format
2018-07-19 21:47:42 +10:00
Techjar
dc2f22516c
Mark all video backend names for translation
2018-06-30 06:30:19 -04:00
Lioncash
540bb1a1b0
Software: Don't link against X11 libraries
...
The software backend doesn't actually use X11 in any capacity directly.
2018-06-21 01:47:37 -04:00
Léo Lam
c93210155f
Merge pull request #7075 from Ebola16/DumpObjects
...
Software Renderer "Dump Objects" needs dedicated folder and tooltip
2018-06-06 15:20:14 +02:00
Ryan Meredith
45b9b7d211
Give Dump Objects dedicated folder and tooltip
2018-06-06 08:42:41 -04:00
Anthony
36ff2a20d5
Merge pull request #6954 from degasus/coherent
...
OGL/Streambuffer: Use coherent mapping by default.
2018-06-05 12:06:17 -07:00
Léo Lam
6ce9c96d91
Merge pull request #7027 from leoetlino/cleanup
...
Use some C++17 features available since GCC 6
2018-06-04 20:50:50 +02:00
Stenzek
bc96557ec4
Externals: Update glslang to upstream commit 32d3ec3
2018-06-02 07:34:31 +00:00
Léo Lam
8a00a9e149
Remove old GCC version checks
2018-05-30 10:59:15 +02:00
Stenzek
640bfb8135
VideoConfig: Add a field for indicating logic op support in the backend
2018-05-26 00:07:20 +10:00
degasus
fdfd8b19d6
OGL/Streambuffer: Use coherent mapping by default.
...
Coherent mappings have a lower overhead and less GL codes.
So enables coherent mapping by default for all drivers.
Both Qualcomm and ARM performs very bad with explicit flushing, so this change helps them as well.
AFAIK there was one GPU generation which was slower on coherent mapping: nvidia tesla
So Geforce 200 and 300 series should be tested with this PR before merging.
As this was last tested many years ago, this issue might have been fixed as well.
Those GPUs are close to 10 years old and not supported any more by nvidia.
2018-05-24 00:00:02 +02:00
Stenzek
d0c025bf0b
OGL: Fix EFB access in MSAA-mode
2018-05-22 15:35:20 +10:00
Stenzek
f74dbc794c
EFB2RAM: Apply copy filter as a float coefficient after sampling
...
Using 8-bit integer math here lead to precision loss for depth copies,
which broke various effects in games, e.g. lens flare in MK:DD.
It's unlikely the console implements this as a floating-point multiply
(fixed-point perhaps), but since we have the float round trip in our
EFB2RAM shaders anyway, it's not going to make things any worse. If we
do rewrite our shaders to use integer math completely, then it might be
worth switching this conversion back to integers.
However, the range of the values (format) should be known, or we should
expand all values out to 24-bits first.
2018-05-22 12:24:08 +10:00
Lioncash
8a1a924e2e
Vulkan/PostProcessing: Make file-scope std::string instances const char arrays
...
Avoids performing avoidable file-scope heap allocations
2018-05-21 12:29:05 -04:00
Emmanuel Gil Peyrot
c51ae9c62a
Remove SOIL altogether from the project.
2018-05-20 13:44:42 +02:00
Lioncash
505d45a233
EfbInterface: Move buffer constant from the header to the cpp file
...
This is only ever used internally, so we can limit its scope to the only
usage point.
2018-05-18 16:23:34 -04:00
Lioncash
5eef8ba984
EfbInterface: Make efb and perf_values std::arrays
2018-05-18 16:23:29 -04:00
Lioncash
c58b5e9b9b
EfbInterface: Make perf_values internally linked
...
Instead, expose functions to operate with it. This way we keep the
internal representation concealed.
2018-05-18 15:35:08 -04:00
Lioncash
f3a8874214
EfbInterface: Move efb array into the EfbInterface namespace
2018-05-18 15:09:37 -04:00
Markus Wick
c485efdfe1
Merge pull request #6743 from stenzek/faster-disabled-copy-filter
...
TextureConversionShader: Don't sample from adjacent rows when not needed
2018-05-17 10:45:50 +02:00
Léo Lam
f91b729b61
Merge pull request #6825 from leoetlino/onion-types
...
Config: Fix implicit conversions/enum config types
2018-05-12 21:59:43 +02:00
Score_Under
4e7caa2818
Fix syntax error in GLSL_GS
2018-05-12 15:42:18 +01:00
Score_Under
70b00f2b2d
Remove stray quote sign
...
This allows GLSL_EFB_POKE_GEOMETRY_GS to compile again.
2018-05-12 15:21:29 +01:00
Léo Lam
7dca7c237e
Config: Fix template deduction for implicit conversions
...
This excludes the second argument from template deduction.
Otherwise, it is required to manually cast the second argument to
the ConfigInfo type (because implicit conversions won't work).
e.g. to set the value for a ConfigInfo<std::string> from a string
literal, you'd need a ugly `std::string("yourstring")`.
2018-05-12 14:30:18 +02:00
Léo Lam
d1bb5249ec
Merge pull request #6801 from stenzek/copy-filter-typo
...
D3D/Vulkan: Fix incorrect clamp in EFB RAM copy
2018-05-11 10:36:47 +02:00
Lioncash
ba01f6dba3
CommonFuncs: Convert ROUND_UP_POW2 macro to a function
...
Also move it to MathUtils where it belongs with the rest of the
power-of-two functions. This gets rid of pollution of the current scope
of any translation unit with b<value> macros that aren't intended to be
used directly.
2018-05-10 19:42:20 -04:00
Stenzek
3493d738ca
D3D/Vulkan: Fix incorrect clamp in EFB RAM copy
...
This could cause darker-than-expected EFB copies if clamping was not
enabled, and the user forced EFB copies to RAM only.
2018-05-11 00:32:39 +10:00
Stenzek
501b35bbf2
OGL: Fix broken format changes in i965 driver
2018-05-08 00:11:27 +10:00
Markus Wick
e31c571f51
Merge pull request #6646 from spycrab/fbm_strings
...
OGL/FramebufferManager: Clean up inline GLSL code
2018-05-07 08:58:56 +02:00
Stenzek
286d594f32
OGL: Fix incorrect clamping in EFB copies
2018-05-05 17:45:54 +10:00
Stenzek
4faac3a627
TextureConversionShader: Don't sample from adjacent rows when not needed
2018-05-03 14:09:32 +10:00
Stenzek
7a745e5b0d
D3D: Drop gamma parameter from util draw helper
...
No longer needed as we perform gamma correction during the XFB copy.
2018-05-02 21:58:56 +10:00
spycrab
b4dc658b2e
OGL/FramebufferManager: Clean up inline GLSL code
2018-05-01 15:03:59 +02:00
Stenzek
9e798eec94
Implement EFB copy filter and gamma in hardware backends
...
Also makes y_scale a dynamic parameter for EFB copies, as it doesn't
make sense to keep it as part of the uid, otherwise we're generating
redundant shaders.
2018-04-29 19:05:20 +10:00
Scott Mansell
a192a3bb30
While I'm here, fix some chroma sub-sampling bugs.
...
RE4's brightness screen is actually very good for spotting these.
Bug 1: Colors at the end of the scanlines are clamped, instead of a black
border
Bug 2: U and V color channels share coordinates, instead of being offset
by a pixel.
2018-04-29 17:56:53 +10:00
Scott Mansell
fc96479f12
VideoSoftware: Implement xfb copy filter (Deflickering/Brightness)
2018-04-29 17:56:51 +10:00
Lioncash
d68f437e67
Common: Move BitSet helper functions into the Common namespace
2018-04-23 00:13:55 -04:00
Tillmann Karras
4cfd900c67
Fix some warnings
2018-04-17 14:10:05 +01:00
Lioncash
b0dc823472
Common/Logging/Log: Wrap GENERIC_LOG macro's body in do { } while (0)
...
Enforces the termination of GENERIC_LOGs with semicolons.
2018-04-16 12:11:32 -04:00
spycrab
40bb9974f2
Reformat all the things!
2018-04-12 21:28:39 +02:00
Markus Wick
c6d0d9a01f
Merge pull request #6578 from JosJuice/remove-projection-hacks
...
Remove support for projection hacks
2018-04-04 09:10:32 +02:00
Lioncash
b184923540
Vulkan/CMakeLists: Migrate off add_dolphin_library
...
Finishes the migration work started in 3a4c3bbe01
2018-04-02 08:29:37 -04:00
Lioncash
8b43a31855
Software/CMakeLists: Migrate off add_dolphin_library
...
Continues the migration work started in 3a4c3bbe01
2018-04-02 08:24:40 -04:00
Lioncash
a3c53ff754
OGL/CMakeLists: Migrate off add_dolphin_library
...
Continues the migration work started in 3a4c3bbe01
2018-04-02 08:22:39 -04:00
Lioncash
d4f8502ad1
Null/CMakeLists: Migrate off add_dolphin_library
...
Continues the migration work started in 3a4c3bbe01
2018-04-02 08:17:00 -04:00
Lioncash
3854e2bcca
D3D/CMakeLists: Migrate off add_dolphin_library
...
Continues the migration work started in 3a4c3bbe01
2018-04-02 08:15:22 -04:00
JosJuice
91732e2baf
Remove support for projection hacks
...
This isn't really useful for anything anymore as far as I know.
2018-04-01 21:41:18 +02:00
Lioncash
b818cc682c
VideoCommon/Vulkan: Explicitly link in xxhash
...
Lessens the dependency on the LIBS variable (and also makes the required
libraries explicit).
2018-03-28 17:03:16 -04:00
Stenzek
2f1a7cbee1
Implement "Skip" ubershader mode
...
Skip ubershader mode works the same as hybrid ubershaders in that the
shaders are compiled asynchronously. However, instead of using the
ubershader to draw the object, it skips it entirely until the
specialized shader is made available.
This mode will likely result in broken effects where a game creates an
EFB copy, and does not redraw it every frame. Therefore, it is not a
recommended option, however, it may result in better performance on
low-end systems.
2018-03-26 01:57:41 +10:00