Commit Graph

13 Commits

Author SHA1 Message Date
Scott Mansell 6ad182edd9 Ignore nullability-completeness warnings in VMA
These cause a lot of warnings when compiling with clang.
And the example VmaUsage.h appears to disable them
2023-01-30 03:11:51 +13:00
Robin Kertels 3ffbf94b2a
VideoBackends:Vulkan: Set up VMA
Co-authored-by: iwubcode <iwubcode@users.noreply.github.com>
2022-10-23 02:54:35 +02:00
Pokechu22 ae7b14887b Remove varargs support from LOG_VULKAN_ERROR
Nothing currently uses it. It could theoretically be replaced with fmt support, but I don't think the LOG_VULKAN_ERROR macro is that useful and it'd be better to replace it with regular logging instead.
2022-10-12 16:50:51 -07:00
Pokechu22 0cced44142 Use `__VA_OPT__(, ) __VA_ARGS__` instead of `##__VA_ARGS__`
Per https://en.cppreference.com/w/cpp/preprocessor/replace#.23_and_.23.23_operators the `##` behavior is a nonstandard extension; this extension seems to be supported by all compilers we care about, but IntelliSense in visual studio doesn't correctly handle it, resulting in false errors in the IDE (but not when compiling).

Per https://en.cppreference.com/w/cpp/preprocessor/replace#Function-like_macros C++20 introduced a workaround, where `__VA_OPT__(, )` generates a comma if and only if `__VA_ARGS__` is non-empty.

This PR replaces all occurrences, with the exception of Externals, DSPSpy (which is not likely to be edited in MSVC and does not target C++20 currently), and JitArm64_Integer.cpp (which uses `Function(__VA_ARGS__)`, and thus does not ever need a comma).
2022-08-23 12:09:57 -07:00
Pokechu22 04d8cdfe88 Convert LOG_TYPE and LOG_LEVELS to enum class 2021-10-24 11:48:36 -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
Shawn Hoffman cff4806d8d windows: fix build if pch were to be disabled 2020-08-22 16:18:24 -07: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
Stenzek 16f103ab42 Vulkan: Exclusive fullscreen support via VK_EXT_full_screen_exclusive 2019-10-31 22:45:59 +10:00
Stenzek f9869cb216 Vulkan: Support runtime selection of WSI 2019-02-15 18:40:46 +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
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
Stenzek 77a128ab87 Implement experimental Vulkan backend 2016-10-01 02:40:01 +10:00