Shawn Hoffman
2f47f486af
msbuild: re-enable standalone vcxproj processing
2020-08-22 16:17:50 -07:00
Shawn Hoffman
94bf48b67c
msbuild: refactor stuff out of project files (for dolphin)
2020-08-22 16:17:50 -07:00
Filip Gawin
0ede5d1537
Use range loop (if possible)
2020-07-18 18:29:16 -05:00
orbea
ba2d04b793
Externals: Fix build failures with the newer glslang.
...
v2: Don't include glslang project wide.
2020-05-30 18:54:21 -07:00
Lioncash
86f8768268
VideoCommon/ShaderGenCommon: Make template functions regular functions
...
These are only ever used with ShaderCode instances and nothing else.
Given that, we can convert these helper functions to expect that type of
object as an argument and remove the need for templates, improving
compiler throughput a marginal amount, as the template instantiation
process doesn't need to be performed.
We can also move the definitions of these functions into the cpp file,
which allows us to remove a few inclusions from the ShaderGenCommon
header. This uncovered a few instances of indirect inclusions being
relied upon in other source files.
One other benefit is this allows changes to be made to the definitions
of the functions without needing to recompile all translation units that
make use of these functions, making change testing a little quicker.
Moving the definitions into the cpp file also allows us to completely
hide DefineOutputMember() from external view, given it's only ever used
inside of GenerateVSOutputMembers().
2020-05-25 21:12:29 -04:00
degasus
fc0df37d94
Fix windows build system.
2020-04-29 12:56:52 +02:00
Léo Lam
9d44af4c31
Merge pull request #8696 from howard0su/cleanup_shadow
...
Cleanup warnings of -Wmissing-declarations
2020-04-27 15:33:01 +02:00
Stenzek
a2f4fafe86
Vulkan: Switch from vkCreateMacOSSurfaceMVK() to vkCreateMetalSurfaceEXT()
...
Since we are calling this off the UI thread, we can't use anything which
accesses the underlying NSView object. We create and set the Metal layer
on the UI thread before the video backend is initialized. This extension
is both compatible with MoltenVK and gfx-portability for accepting a
layer at surface creation.
2020-04-07 18:56:55 +10:00
Jun Su
b6ff15c130
Cleanup warnings of -Wmissing-declarations
...
Add static to the functions which is not intentionally
export to big scope.
2020-03-24 20:16:10 +08:00
Stenzek
fb947296b0
Vulkan: Pass CAMetalLayer to MoltenVK instead of NSView
...
Gets rid of the warning for calling [NSView layer] off the main thread.
2020-03-11 23:11:26 +10:00
Stenzek
a545344268
VideoBackends: Make it possible for PrepareWindow to change the surface
...
Again, needed for MoltenVK.
2020-03-11 23:10:30 +10:00
Stenzek
08cc73108a
Vulkan: Treat VK_SUBOPTIMAL_KHR as VK_SUCCESS on Android
...
Android 10 seems to expect a prerotated/transformed swap chain for optimal
presentation. For now, until we implement that, just ignore the hint.
2020-01-31 19:16:06 +10:00
Stenzek
ead65b0d8c
Vulkan: Log when a swap chain resize is occurring
...
This may help us debug performance problems in the future.
2020-01-31 19:11:43 +10:00
Ryan Meredith
e5f6d9320f
Add Dolphin version and current video backend to shader compilation logs
2020-01-24 03:29:38 -05:00
David Korth
f5fe692842
Use pre-increment for iterators instead of post-increment.
...
Pre-increment is more efficient, since it doesn't have to return the
old iterator.
2019-12-29 23:45:02 -05:00
Stenzek
6fcb1c6c46
Add an ARM64 target to Visual Studio projects
2019-12-28 19:20:41 +10:00
Stenzek
e05bc33899
Vulkan: Call VertexManagerBase initialize
2019-12-09 19:16:15 +10:00
Lioncash
10f7674651
VideoCommon/IndexGenerator: Eliminate static state
...
Now that we've extracted all of the stateless functions that can be
hidden, it's time to make the index generator a regular class with
active data members.
This can just be a member that sits within the vertex manager base
class. By deglobalizing the state of the index generator we also get rid
of the wonky dual-initializing that was going on within the OpenGL
backend.
Since the renderer is always initialized before the vertex manager, we
now only call Init() once throughout the execution lifecycle.
2019-12-05 10:49:32 -05:00
Stenzek
dd23a1ee79
Update VS projects/solutions to VS2019
2019-11-30 13:42:52 +10:00
Lioncash
c792961000
Common: Unify logging namespace with Common
...
Previously the logging was a in a little bit of a disarray. Some things
were in namespaces, and other things were not.
Given this code will feature a bit of restructuring during the
transition over to fmt, this is a good time to unify it under a single
namespace and also remove functions and types from the global namespace.
Now, all functions and types are under the Common::Log namespace. The
only outliers being, of course, the preprocessor macros.
2019-11-28 05:13:21 -05:00
Stenzek
16f103ab42
Vulkan: Exclusive fullscreen support via VK_EXT_full_screen_exclusive
2019-10-31 22:45:59 +10:00
Stenzek
6fc6444687
Vulkan: Explicitly enable VK_KHR_get_physical_device_properties2
...
This was missing from the subgroup PR way back.
2019-10-31 22:45:59 +10:00
Stenzek
230190fc36
Vulkan: Allow runtime querying of enabled extensions
2019-10-31 22:45:59 +10:00
Stenzek
328d89db70
Vulkan: Add a DriverDetails bug for "slow cached readback memory"
...
Using the cached memory type appears to be slower on Mali drivers, with
~10-15% CPU spent in the __pi___inval_cache_range kernel function.
2019-10-02 21:34:58 +10:00
Stenzek
c557aa4a15
Vulkan: Add strict flag to memory type selection
2019-10-02 21:27:32 +10:00
Stenzek
2698e311aa
Vulkan: Use correct aspect for D24S8 textures
2019-07-31 15:33:05 +10:00
Connor McLaughlin
fc8859a414
Merge pull request #8249 from lioncash/rect
...
VideoCommon: Remove unused MathUtil.h include from VideoCommon.h
2019-07-19 16:32:30 +10:00
Stenzek
68bd4cd79a
Vulkan: Use reversed depth range in viewport
...
Also adds a DriverDetails bug to disable on drivers where this is still
broken.
2019-07-18 23:43:12 +10:00
Lioncash
2b9389202e
VideoCommon: Remove unused MathUtil.h include from VideoCommon.h
...
This header doesn't actually make use of MathUtil.h within itself, so
this can be removed. Many other source files used VideoCommon.h as an
indirect include to include MathUtil.h, so these includes can also be
adjusted.
While we're at it, we can also migrate valid inclusions of VideoCommon.h
into cpp files where it can feasibly be done to minimize propagating it
via other headers.
2019-07-16 20:54:34 -04:00
Lioncash
d4337eebde
VideoCommon/Statistics: Rename stats global to g_stats
...
Makes the global variable follow our convention of prefixing g_ on
global variables to make it obvious in surrounding code that it's not a
local variable.
2019-07-10 23:34:54 -04:00
Lioncash
a99c7d01e1
VideoCommon/Statistics: Normalize statistic variable names
...
Normalizes all variables related to statistics so that they follow our
coding style.
These are relatively low traffic areas, so this modification isn't too
noisy.
2019-07-10 23:19:10 -04:00
Lioncash
72b04a353d
VideoBackends/Vulkan: Use nested namespace specifiers where applicable
2019-06-17 16:57:30 -04:00
Stenzek
3f1586dbce
Vulkan: Display a warning when using MoltenVK on HS and earlier
2019-06-08 20:16:24 +10:00
Lioncash
a9663669dc
Common/CommonFuncs: Remove now-unneccessary ArraySize function
...
Since C++17, non-member std::size() is present in the standard library
which also operates on regular C arrays. Given that, we can just replace
usages of ArraySize with that where applicable.
In many cases, we can just change the actual C array ArraySize() was
called on into a std::array and just use its .size() member function
instead.
In some other cases, we can collapse the loops they were used in, into a
ranged-for loop, eliminating the need for en explicit bounds query.
2019-06-01 10:07:57 -04:00
Lioncash
a41ba68c1e
VideoVulkan/CMakeLists: Specify headers in target sources
2019-05-31 06:54:26 -04:00
Lioncash
1831dcbe6f
VideoVulkan/ShaderCompiler: Use non-member std::size instead of ArraySize()
...
Now that we're on C++17, we can use its non-member std::size function
instead of ours. This provides no functional change.
2019-05-30 04:16:20 -04:00
Lioncash
d6a60050ff
VideoVulkan/ShaderCompiler: Use a std::optional instead of bool+out variable
...
Now that we utilize C++17, we can simply return an optional containing
the code instead of using an out variable and a boolean result,
essentially combining them into one.
This provides a much more straightforward interface.
2019-05-30 04:16:17 -04:00
Lioncash
e60268bd42
VideoCommon/RenderBase: Use a std::string_view with CreateShaderFromSource()
...
Greatly simplifies the overall interface when it comes to compiling
shaders. Also allows getting rid of a std::string overload of the same
name. Now std::string and const char* both go through the same function.
2019-05-30 03:29:35 -04:00
weihuoya
e98f43d2af
bbox minor fx
2019-05-09 17:30:17 +08:00
Léo Lam
ab9ece9bca
Replace MathUtil::Clamp with std::clamp
2019-05-04 23:12:17 +02:00
Stenzek
5399995c61
Vulkan: Don't set a negative offset in scissor rect
...
The spec/validation layers say this is invalid.
2019-04-28 16:01:09 +10:00
Stenzek
f8c1ba409c
Replace EFBRectangle/TargetRectangle with MathUtil::Rectangle
2019-04-21 14:28:14 +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
Stenzek
474500f07e
Vulkan: Prevent submission of command buffer with open queries
2019-04-01 20:49:42 +10:00
Stenzek
b685a66753
Vulkan: Fix crash when checking subgroup support on Mesa
2019-03-30 00:18:26 +10:00
Stenzek
a6bb06174f
Vulkan: Fix library load failure on Android
2019-03-29 23:36:53 +10:00
Stenzek
604ab67c7f
Vulkan: Simplify perf queries using vkGetQueryPoolResults
2019-03-29 20:54:44 +10:00
Stenzek
6d40ea8553
Vulkan: Fix barrier validation layer errors for bounding box
2019-03-29 20:54:44 +10:00
Stenzek
23a655217c
Vulkan: Fix validation layer error for unbound texture layouts
2019-03-29 20:54:44 +10:00
Stenzek
427dd45151
Vulkan: Simplify command buffer fence tracking
2019-03-29 20:54:44 +10:00
Connor McLaughlin
f3fadd7302
Merge pull request #7869 from stenzek/d3dcommon
...
D3D: Move sharable D3D11/D3D12 code to common library
2019-03-29 20:40:06 +10:00
Stenzek
6561850f2b
Vulkan: Support subgroup reduction operations via GL_KHR_shader_subgroup
2019-03-29 20:06:56 +10:00
Stenzek
f6641b7e4f
Vulkan: Use Common::DynamicLibrary
2019-03-29 19:52:38 +10:00
Stenzek
16294acd2a
VideoBackends: Scale bounding box rectangle in the pixel shader
2019-03-25 18:47:58 +10:00
Dzmitry Malyshau
4173a8f545
Use proper view type of framebuffer images
2019-03-15 12:24:39 -04:00
Stenzek
a218a794cb
FramebufferManager: Implement deferred EFB cache invalidation
2019-03-09 12:24:04 +10:00
Stenzek
65216c9e87
VideoConfig: Add SupportsPartialDepthCopies to backend info
...
D3D11 doesn't support partial copies of depth buffers via
CopySubResource(), so we need to use a different path for the EFB cache.
2019-03-09 12:19:53 +10:00
spycrab
f72652f690
Revert "Vulkan: Show backend as Vulkan (MoltenVK) on macOS"
2019-03-07 02:05:59 +01:00
spycrab
a5534ec950
Vulkan: Show backend as Vulkan (MoltenVK) on macOS
2019-03-06 15:25:54 +01:00
Stenzek
21d81f99ff
VideoBackends: Fix GPU decoding of XFB buffers
...
Was using UNORM instead of UINT, resulting in invalid values.
2019-02-28 20:35:22 +10:00
Stenzek
f039149198
Move most backend functionality to VideoCommon
2019-02-19 16:57:54 +10:00
Stenzek
f9869cb216
Vulkan: Support runtime selection of WSI
2019-02-15 18:40:46 +10:00
Jordan Woyak
69b617ce76
WiimoteEmu: Remove redundant Matrix library and use the one in Common.
2019-02-03 12:02:02 -06:00
Tilka
2d75797c63
Merge pull request #7747 from stenzek/vulkan-shutdown
...
Vulkan: Shutdown fixes and cleanup/refactoring
2019-02-02 12:45:20 +00:00
Stenzek
3b033bf3f0
Vulkan: Move clear shader from Renderer to ShaderCache
2019-01-27 13:07:35 +10:00
Stenzek
e2cf238ec4
Vulkan: Move swapchain related members from Renderer to SwapChain
2019-01-27 12:59:57 +10:00
Stenzek
bd66db049a
Vulkan: Use device-local functions where possible
...
Avoids a call into the loader library, which may improve performance
ever-so-slightly.
2019-01-27 12:51:04 +10:00
Stenzek
ce1cc2d9fa
Vulkan: Don't execute command buffer before shutting down
...
We don't need to, and this was causing occasional crashes on Adreno.
2019-01-27 12:41:10 +10:00
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
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
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
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
Stenzek
7c4607a05a
Vulkan: Add missing increment of draw call count
2018-10-28 11:32:26 +10:00
Stenzek
eb284b5d66
VideoBackends: Pass window system info from host on creation
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
Tillmann Karras
97cc9894e4
Update to Visual Studio's default Windows SDK
2018-10-20 00:53:08 +01: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
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
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
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
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
4faac3a627
TextureConversionShader: Don't sample from adjacent rows when not needed
2018-05-03 14:09:32 +10: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
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
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
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
Helios747
b02b616930
[UI] Remove experimental tag from Vulkan
2018-03-21 15:12:12 -07:00
Lioncash
7926a0c814
Use __func__ instead of __FUNCTION__ where applicable
...
This replaces usages of the non-standard __FUNCTION__ macro with the standard
mandated __func__ identifier.
__FUNCTION__ is a preprocessor definition that is provided as an
extension by compilers. This was the only convenient option to rely on
pre-C++11. However, C++11 and greater mandate the predefined identifier
__func__, which lets us accomplish the same thing.
The difference between the two, however, is that __func__ isn't a
preprocessor macro, it's an actual identifier that exists at function
scope. The C++17 draft standard (N4659) at section [dcl.fct.def.general]
paragraph 8 states:
"
The function-local predefined variable __func__ is defined as if a
definition of the form
static const char __func__[] = "function-name ";
had been provided, where function-name is an implementation-defined
string. It is unspecified whether such
a variable has an address distinct from that of any other object in the
program.
"
Thankfully, we don't do any macro or string concatenation with __FUNCTION__
that can't be modified to use __func__.
2018-03-16 13:41:53 -04:00
Lioncash
75f5fcdfee
Assert: Remove unused parameter from DEBUG_ASSERT
...
This brings the macro in line with the regular ASSERT macro, which only has one
macro parameter.
2018-03-16 13:01:11 -04:00
Lioncash
50a476c371
Assert: Uppercase assertion macros
...
Macros should be all upper-cased. This is also kind of a wart that's
been sticking out for quite a while now (we avoid prefixing
underscores).
2018-03-14 22:03:12 -04:00
Stenzek
db810956ec
Vulkan: Provide a more accurate method of detecting drivers/vendors
...
This is needed to differentiate between the open-source Mesa drivers and
their binary counterparts for Intel and AMD.
2018-03-14 02:48:53 +10:00
Stenzek
f9c829c7f7
OGL: Re-implement async shader compiling
2018-03-10 15:56:34 +10:00
Stenzek
dec0c3bce8
Move shader caches to VideoCommon
2018-03-10 15:56:30 +10:00
Stenzek
24df896eb8
VKShader: Fix incorrect loading of binary shaders
2018-03-10 15:56:27 +10:00
Stenzek
5e5dfe686a
VKPipeline: Fix render pass and add pipeline layout fields
2018-03-10 15:56:13 +10:00
Stenzek
4c24a69710
VideoCommon: Add support for Abstract Framebuffers
2018-03-02 20:20:48 +10:00
Stenzek
2a6d9e4713
AbstractTexture: Add support for depth textures/formats
2018-03-01 17:31:24 +10:00
Stenzek
6374a4c4a8
AbstractTexture: Support multisampled abstract texture
2018-03-01 17:31:24 +10:00
Stenzek
887e3830ba
VideoBackends: Restore the framebuffer as part of the API state
...
It's not often we switch out to draw to the EFB anyway.
2018-03-01 17:31:24 +10:00
Stenzek
b4b0f3d942
Vulkan: Fix broken post-processing
2018-03-01 16:55:55 +10:00
Stenzek
fec6bb4d56
VideoBackends: Add AbstractShader and AbstractPipeline classes
2018-02-22 22:02:34 +10:00
Stenzek
de632fc9c8
Renderer: Handle resize events on-demand instead of polling
...
We now differentiate between a resize event and surface change/destroyed
event, reducing the overhead for resizes in the Vulkan backend. It is
also now now safe to change the surface multiple times if the video thread
is lagging behind.
2018-02-20 01:15:55 +10:00
Stenzek
c1b39ecc58
BPFunctions: Move upscaling of scissor rect to VideoCommon
2018-02-20 00:49:32 +10:00
Stenzek
5359396099
BPFunctions: Move GX viewport conversion to VideoCommon
2018-02-20 00:49:32 +10:00
Stenzek
7c517226ed
Vulkan: Remove redundant YUYV conversion shaders
...
These are no longer used as of hybrid XFB.
2018-02-14 15:26:35 +10:00
Stenzek
84b990faa0
VideoConfig: Remove bForceCopyToRam field
...
It's the inverse of supports-copy-to-vram.
2018-02-11 15:29:37 +10:00
Anthony
096131c908
Merge pull request #6334 from stenzek/startup
...
Video Backend Initialization/Core Boot Improvements
2018-02-07 23:35:54 -08:00
Anthony
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
Stenzek
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
Stenzek
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
Stenzek
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
TraceBullet
ab6f932347
Fix Auto-Adjust Window Size option making the window too large
2018-01-26 10:47:19 -05:00
Stenzek
81ae88d2d5
AbstractTexture: Fix crash in Vulkan backend when freeing texture
2018-01-26 19:12:11 +10:00
Stenzek
fd39103c73
Vulkan: Fix invalid stage mask in layout transitions
2018-01-26 12:33:24 +10:00
Stenzek
47f453d7aa
Vulkan: Fix waiting on non-existant fence when reading back
2018-01-26 12:33:24 +10:00
Stenzek
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
Stenzek
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
Stenzek
0525726338
Vulkan: Move pipeline barrier outside render pass for EFB peeks
2018-01-11 15:36:01 +10:00
Stenzek
48a8063cd5
Vulkan: Fix FramebufferManagerBase::m_EFBLayers being set out-of-range
2018-01-11 15:30:27 +10:00
Stenzek
173a33886c
Vulkan: Move render pass management to ObjectCache
2018-01-11 15:21:34 +10:00
Stenzek
0e50b2c9f2
Vulkan: Add missing layout transition when resolving MSAA depth buffers
2018-01-11 15:21:33 +10:00
Jonathan Hamilton
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
degasus
02dd062518
VideoCommon: Drop now unused efb2tex matrix generation.
2017-12-06 09:30:03 +01:00
Lioncash
6ca85dbf0a
VKTexture: Add missing override specifier to the other ScaleRectangeFromTexture() prototype
2017-12-02 20:20:13 -05:00
Lioncash
c7bc16811c
VKTexture: Remove unimplemented ScaleRectangleFromTexture() prototype
2017-12-02 20:15:32 -05:00
degasus
e2a9ee384f
VideoCommon: Rename TextureConversionShader namespace.
2017-12-02 15:17:39 +01:00
degasus
e8febd0cef
VideoCommon: Create a namespace for TextureConversionShaderGen.
2017-12-02 15:17:39 +01:00
Markus Wick
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
Stenzek
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
Stenzek
cf1f975148
Vulkan: Fix headless framedumping without USE_X11 set
2017-11-23 17:00:32 +10:00
Stenzek
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
Stenzek
7f217a8bb2
Vulkan: Drop StagingTexture2D class as it is now duplicated functionality
2017-11-22 18:49:33 +10:00
Stenzek
db1d9de933
AbstractTexture: Drop slow map readback path
2017-11-22 18:49:33 +10:00
Stenzek
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
Stenzek
59517318d6
Vulkan: Use new readback methods for texture encoding
2017-11-22 18:47:04 +10:00
Stenzek
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
Stenzek
f43d85921d
VideoBackends: Add AbstractStagingTexture class
...
Can be used for asynchronous readback or upload of textures.
2017-11-22 18:47:04 +10:00
Stenzek
a584ccc7d8
AbstractTexture: Support BGRA8 formats
...
Used for some driver's swap chains, and EFB to RAM.
2017-11-22 18:47:04 +10:00
Stenzek
49a9c33bd7
VideoCommon: Move abstract texture creation function to Renderer
2017-11-22 18:47:04 +10:00
Stenzek
39559f6358
VideoConfig: Remove bSupportsInternalResolutionFrameDumps
...
Field is unused as of Hybrid XFB.
2017-11-21 17:19:43 +10:00
Leo Lam
80bcc0d58d
Merge pull request #6186 from lioncash/enum-class
...
VideoConfig: Make AspectMode and StereoMode enum classes
2017-11-19 15:08:16 +01:00
Lioncash
364eaadfe5
VideoBackends: Remove header inclusions made unnecessary with Hybrid XFB
...
Just some inclusions that weren't removed in the initial Hybrid XFB PR.
2017-11-19 00:53:10 -05:00
Lioncash
5337e58284
VideoConfig: Make StereoMode an enum class
...
Makes for more strongly-typed identifiers (and doesn't pollute
surrounding namespaces)
2017-11-18 23:19:53 -05:00
Lioncash
10697bcbe3
VideoConfig: Make AspectMode an enum class
...
Makes for more strongly-typed identifiers (and doesn't pollute
surrounding namespaces)
2017-11-18 23:17:56 -05:00
iwubcode
7248dd47d5
Hybrid XFB: Fix lint errors
2017-11-17 22:11:32 -06:00
iwubcode
4964fc87ae
Video Backends: Remove the right of the xfb region for games where the
...
VI stride does not match the VI width
2017-11-17 22:11:32 -06:00
iwubcode
53684701fa
HybridXFB: Fix lint errors
2017-11-17 22:11:31 -06:00
iwubcode
1090549552
Software Backend: Force EFB/XFB to copy to ram
2017-11-17 22:11:31 -06:00
iwubcode
76b775d5be
Video Common: Add XFB decoding via the GPU
2017-11-17 22:11:30 -06:00
iwubcode
33bc286baa
Remove old XFB logic
2017-11-17 22:11:29 -06:00
iwubcode
b285188de1
Video Backends: Implement vertical scaling for xfb copies. This fixes the
...
display of PAL games that run in 50hz mode.
2017-11-17 22:11:29 -06:00
iwubcode
2cd9565b18
Add an additional flag fo 'XFB Copy'
2017-11-17 22:11:29 -06:00
iwubcode
65cd085f9b
Add new GUI option to skip XFBToRam and remove old XFB options
2017-11-17 22:11:28 -06:00
iwubcode
198d3b69b4
Add ability to dump xfb copies to texture for debugging purposes
2017-11-17 22:11:28 -06:00
iwubcode
a9f0d1783b
Support frame and video dumping from VideoCommon
2017-11-17 22:11:23 -06:00
iwubcode
79387dddb2
Add support for hybrid XFB
2017-11-17 19:47:56 -06:00
Anthony
d378811271
Merge pull request #6165 from JosJuice/auto-ir-handling
...
Fix incorrect handling of auto IR
2017-11-06 23:10:53 -08:00
Pierre Bourdon
bb0794715c
Merge pull request #6111 from stenzek/enable-vk-nv-glsl
...
Vulkan: Use VK_NV_glsl extension where available, and skip glslang
2017-11-04 17:14:28 +01:00
JosJuice
a310cbec8e
Fix incorrect handling of auto IR
...
Some lines of code in Dolphin just plainly grabbed the value of
g_ActiveConfig.iEFBScale, which resulted in Auto being treated as
0x rather than the actual automatically selected scale.
2017-11-03 16:04:46 +01:00
Tommaso Checchi
5fb6ceac45
Fixed fog, lava, water in Mario Galaxy (and possibly other games) in higher IRs by detecting & fixing the mipmaps that aren't just used for downscaling, but are handmade to create a gradient.
2017-10-27 00:45:20 -07:00
Stenzek
271f1af8c9
Vulkan: Fix crash on shutdown with Virtual XFB enabled
2017-10-18 22:11:59 +10:00
Stenzek
06bbf111d9
Vulkan: Improve readability of device/instance extension checks
2017-10-11 23:18:01 +10:00
Stenzek
79188d4f55
Vulkan: Use VK_NV_glsl extension where available, and skip glslang
2017-10-11 23:15:41 +10:00
Stenzek
90ca2e8042
Merge pull request #6066 from stenzek/vulkan-resize
...
Vulkan: Fixes for window resizing
2017-10-11 23:02:48 +10:00
Stenzek
4301b8538d
Vulkan: Only use oldSwapchain in response to VK_ERROR_OUT_OF_DATE_KHR
...
Seems to be required on the latest NV driver, otherwise the presented
images are never shown.
2017-10-10 23:21:40 +10:00
Stenzek
cdf34a79f7
Vulkan: Set a flag to resize the swap chain when presenting fails
...
Drivers can return VK_ERROR_OUT_OF_DATE_KHR from vkQueuePresentKHR, and
we should resize the image in this case, as well as when getting it back
from vkAcquireNextImageKHR.
2017-10-10 23:21:40 +10:00
Stenzek
80593f502e
Vulkan: Fix bug where command buffer wouldn't be started after resize
2017-10-10 23:21:40 +10:00
Léo Lam
8f56219ea8
Vulkan: Fix crash when Core initialisation fails
...
The Vulkan backend was not shutting down the AsyncShaderCompiler and
some other instances, causing asserts to hit, followed by a hard crash.
2017-10-08 12:34:06 +02:00
Stenzek
24ddea04ce
VideoBackends: Move SamplerState to common
2017-09-11 20:01:54 +10:00
Stenzek
340aabbb06
VideoCommon: Add helpers for generating common render states
2017-09-11 20:01:52 +10:00
Stenzek
b7a099814a
Vulkan: Clear contents of EFB convert framebuffer at create time
...
Fixes a validation layer warning when converting pixel formats.
2017-09-11 20:01:50 +10:00
Stenzek
e584090822
Vulkan: Fix interface mismatch in RGB->YUYV shader
2017-09-11 20:01:48 +10:00