Commit graph

1572 commits

Author SHA1 Message Date
Marshall Mohror 00c798991c
remove semicolon 2021-02-05 08:25:02 -06:00
Marshall Mohror 6b2e7b77cc
Merge pull request #5657 from FearlessTobi/port-5158
Port yuzu-emu/yuzu#5158: "video_core: Remove unnecessary enum class casting in logging messages"
2021-02-04 10:51:29 -06:00
BreadFish64 a131f9eb74 gl_rasterizer_cache: don't place null textures in the recycler 2021-02-03 13:29:03 -06:00
BreadFish64 85e9ba897d gl_rasterizer_cache: Recycle host textures
Allocating new textures has fairly high driver overhead.
We can avoid some of this by reusing the textures from destroyed surfaces since the game will probably create more textures with the same dimensions and format.
2021-02-02 20:46:25 -06:00
BreadFish64 935e88a580 gl_rasterizer_cache: Remove all fully invalid surfaces from the cache
Some games (e.g. Pilotwings Resort) create many surfaces that are invalidated quickly but were never removed.
This occasionally lead to large lag spikes due to high lookup times and other data structure management overhead.
2021-02-02 20:43:41 -06:00
Lioncash 10f440cb59 common/telemetry: Migrate namespace into the Common namespace
Migrates the Telemetry namespace into the Common namespace to make the
code consistent with the rest of our common code.
2021-01-04 05:17:13 +01:00
Lioncash 9c08409e0e externals: Update Xbyak to 5.96
I made a request on the Xbyak issue tracker to allow some constructors
to be constexpr in order to avoid static constructors from needing to
execute for some of our register constants.

This request was implemented, so this updates Xbyak so that we can make
use of it.
2021-01-04 05:11:18 +01:00
xperia64 94d1f695ee
Use alternate-form formatting for floats after fmt 7.1.2 update (#5654)
* Use alternate-form formatting for floats after 7.1.2  update

* Last two floats
2020-12-28 18:32:36 -05:00
FearlessTobi 20139141f7 video_core: Remove unnecessary enum class casting in logging messages
fmt now automatically prints the numeric value of an enum class member by default, so we don't need to use casts any more.

Reduces the line noise in our code a bit.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-12-28 16:50:23 +01:00
Vitor Kiguchi 8e54e7cf1a fix some conversion warnings 2020-12-06 16:01:59 -03:00
xperia64 4f058c04e8
Fix telemetry-related exit crash from use-after-free (#5617)
* Fix telemetry-related exit crash from use-after-free

* ...clang format
2020-11-22 21:45:14 +08:00
Marshall Mohror a89261d397
Merge pull request #5580 from oneup03/master
Implement Reverse Interlaced 3D
2020-11-16 16:53:05 -06:00
gal20 8b82a228f0
change result back to std::optional 2020-11-14 21:46:29 +02:00
gal20 5055212063
Update src/video_core/renderer_opengl/gl_shader_manager.cpp
Co-authored-by: Marshall Mohror <mohror64@gmail.com>
2020-11-14 21:45:30 +02:00
gal20 03c002ee2a
make result not optional
This fixes crash when hardware shader is enabled in the flatpak version
2020-11-14 19:58:12 +02:00
tywald 2e0ce86c9e
Band-aid solution for 'Disk Shader Cache' (#5188)
* Enable 'Accurate Multiplication' by default.

* Move 'Disk Shader Cache' to the 'Advanced' tab

* Prevent enabling 'Disk Shader Cache' when 'Enable Hardware Shader' or 'Accurate Multiplication' is disabled.

* Do not load 'Disk Shader Cache' when 'Accurate Multiplication' is disabled.

* Add a tooltip for 'Disk Shader Cache'.
2020-11-06 10:07:59 -08:00
OneUp03 33d233fffa Add reverse_interlaced uniform flag 2020-10-21 12:27:02 -05:00
OneUp03 a4f57e6910 Implement Reverse Interlaced 3D 2020-10-16 11:41:08 -05:00
FearlessTobi 51d348b087 General: Make use of std::nullopt where applicable
Allows some implementations to avoid completely zeroing out the internal
buffer of the optional, and instead only set the validity byte within
the structure.

This also makes it consistent how we return empty optionals.

Co-Authored-By: LC <712067+lioncash@users.noreply.github.com>
2020-10-03 17:25:54 +02:00
xperia64 1128f5f8ee Silence some noisy switch case warning 2020-09-06 16:22:48 -04:00
Vitor Kiguchi a6efc7c1ee Separate the enums from cam/cam.h
The settings.h file doesn't actually need all of the definitions
on cam.h, only some of the enums. They can, therefore, be separated
into another file, which is included by settings.h instead.
The other changes are fixing files that included settings.h and
depended on indirect includes from includes of includes of cam.h
2020-08-19 01:45:57 -03:00
Marshall Mohror f4e727cc19
Merge pull request #5420 from citra-emu/xglTextureBarrier
videocore: When an image is the current framebuffer and is sampled, make a copy instead of using glTextureBarrier
2020-07-07 16:45:27 -05:00
BreadFish64 60282f35fe fix clang format 2020-07-07 16:43:42 -05:00
BreadFish64 662c348b6c fix 2020-06-27 13:23:34 -05:00
BreadFish64 ea2584c54d generic texture allocator 2020-06-27 13:13:37 -05:00
BreadFish64 cae4b7aaf7 Clean up 2020-06-26 15:41:10 -05:00
LC e79de3107e
gl_resource_manager: Make use of noexcept on move constructors and move assignment operators (#5340)
Some of the classes in this file already do this, so we can apply this
to the other ones to be consistent.

Allows these classes to play nicely and not churn copies when used with
standard containers or any other API that makes use of
std::move_if_noexcept.
2020-06-23 11:00:25 -05:00
Marshall Mohror 372c653ec3
Fix clang-format 2020-06-20 14:03:04 -05:00
Marshall Mohror 353780e1c9
Merge pull request #5403 from lioncash/gen2
gl_shader_gen: Minor string cleanups
2020-06-20 13:09:24 -05:00
BreadFish64 b80c6f7534 handle all cases more robustly 2020-06-20 13:01:26 -05:00
BreadFish64 d04071d6b3 video_core/GLES: fix issues cause by missing glTextureBarrier
create a duplicate for sampling instead
2020-06-20 13:01:26 -05:00
LC 8ce81b19be
General: Remove usages of ARRAY_SIZE where applicable. (#5392)
Same behavior, but without our own boilerplate function.
2020-06-19 09:10:45 -05:00
xperia64 1504018a56
Avoid deadlock when stopping video dumping (#5407)
* Avoid deadlock when stopping video dumping

* Use static_cast, make quit atomic

* One more atomic load

* Use suggested lock instead of atomic

* Fix locking
2020-06-18 18:20:57 -04:00
Lioncash 2b031e4eaf gl_shader_gen: std::move strings where applicable
Avoids the creation of a copy when returning.
2020-06-08 06:59:05 -04:00
Lioncash 11792682fb gl_shader_gen: Collapse several format calls into one
Same behavior, but performs one formatting pass without altering the
readability of the formatting.
2020-06-08 06:44:03 -04:00
Lioncash e79e991681 gl_shader_gen: Mark local functions as static where applicable
These aren't used outside of the translation unit.
2020-06-08 06:40:39 -04:00
Lioncash 9645c1e1b2 gl_shader_gen: Eliminate unnecessary std::string construction in AppendProcTexCombineAndMap()
We can make use of a std::string_view here, since only string literals
are used within the switch.
2020-06-08 06:37:41 -04:00
Mat M 51dfc46d3f
gl_rasterizer_cache: Trivial minor cleanups (#5295)
* gl_rasterizer_cache: Mark file-scope functions as static where applicable

Prevents -Wmissing-declaration warnings from occurring and also makes
these functions internally linked.

* gl_rasterizer_cache: Remove unused local std::string variable

Despite being unused, compilers are unable to completely remove any code
gen related to the construction and destruction of this variable, since
the destructor of std::string is non-trivial.

Thus, we can remove it to reduce a minor amount of unnecessary code
generation

* gl_rasterizer_cache: Mark hash implementation as noexcept

This shouldn't throw.

* gl_rasterizer_cache: Remove unused variable in ClearAll()

* gl_rasterizer_cache: Make use of const on references explicit

While declared as auto&, these actually behave as const auto& variables,
due to the constness of the container being iterated. We can make this
explicit for readability sake.

* gl_rasterizer_cache: Resolve truncation warnings

The size is forwarded to a std::memset call, which takes a std::size_t
as its size parameter, so we can just make this change to silence the
warnings.

* gl_rasterizer_cache: Resolve variable shadowing warnings

Prevents a -Wshadow warning from occurring.
2020-05-18 09:19:54 -05:00
Ben 8d27b0714d
Merge pull request #5335 from lioncash/nullopt
gl_shader_manager: Make use of std::nullopt where applicable
2020-05-09 12:36:23 +02:00
Ben 4892d37309
Merge pull request #5336 from lioncash/constexpr
gl_rasterizer_cache: Make use of if constexpr in MortonCopyTile()
2020-05-09 12:36:04 +02:00
Ben 007fb63e47
Merge pull request #5230 from B3n30/circumvent_apple_intel_hw_shader_issue
Add flag to disable seperable shaders for osx Intel GPUs.
2020-05-09 12:34:21 +02:00
Ben 96ebd53466
Merge pull request #5264 from lioncash/gen
gl_shader_gen: Make use of fmt where applicable
2020-05-09 12:28:57 +02:00
Ben e959d44f00
Merge pull request #5262 from lioncash/fmt
gl_shader_decompiler: Make use of fmt with the decompiler
2020-05-09 12:28:34 +02:00
Lioncash cd201cd60f gl_shader_gen: Make use of fmt where applicable
Avoids string churn and makes it significantly easier to read the shader
template strings that are being used as the basis for formatting.
2020-05-08 14:50:48 -04:00
Lioncash 38c8fecb81 gl_rasterizer_cache: Make use of if constexpr in MortonCopyTile()
A trivial change that allows compilers to more rigorously optimize out
code blocks that will never be executed in some scenarios.
2020-05-04 23:08:53 -04:00
Lioncash f2a7fe05c3 gl_shader_manager: Make use of std::nullopt where applicable
Prevents the internal buffer in the std::optional from being zeroed out
unnecessarily and instead sets the validity byte only in some
implementations.

While we're at it, we can make use of std::move to eliminate unnecessary
heap reallocations from occurring.
2020-05-04 23:00:11 -04:00
Lioncash 016d43df98 gl_shader_decompiler: Make use of fmt with the decompiler
Allows us to avoid even more string churn by allowing the AddLine
function to make use of fmt formatting so the string is formatted all at
once instead of concatenating multiple strings.

This is similar to how yuzu's decompiler works, which I've made function
the same way in the past.
2020-05-04 22:40:33 -04:00
Pengfei Zhu e212dc3a1f
Merge pull request #5297 from lioncash/missing
gl_rasterizer: Amend missing return value in branch in SetupGeometryShader()
2020-05-02 08:07:49 +08:00
Pengfei Zhu 4d7487bd34
Merge pull request #5298 from lioncash/unused
gl_rasterizer: Silence various compilation warnings
2020-05-01 23:34:36 +08:00
Pengfei Zhu 6a0636d631
Merge pull request #5296 from lioncash/flatten
gl_rasterizer_cache: Flatten LoadCustomTexture()
2020-05-01 23:01:47 +08:00
Pengfei Zhu 2eacb11c53
Merge pull request #5292 from lioncash/alloc
gl_shader_manager: Eliminate variable shadowing
2020-05-01 22:57:55 +08:00
Pengfei Zhu 1bb9a71a01
Merge pull request #5291 from lioncash/trunc
renderer_opengl: Resolve compiler truncation warnings
2020-05-01 22:56:46 +08:00
Ben fd1b254635
Merge pull request #5290 from lioncash/shader
gl_shader_gen: Minor interface cleanup
2020-05-01 16:16:25 +02:00
Lioncash 763778e6c0 gl_rasterizer: Make const on references consistent
Applies const to auto& instances that would actually resolve to a const
reference for readability and explicitness.
2020-05-01 06:19:20 -04:00
Lioncash 437453d32b gl_rasterizer: Amend missing return value in branch in SetupGeometryShader()
Previously undefined behavior was being invoked in the case that
geometry shaders weren't supported.
2020-05-01 06:10:32 -04:00
Lioncash 81768bf0c2 gl_rasterizer: Resolve truncation warnings 2020-05-01 06:08:20 -04:00
Lioncash df97021f55 gl_rasterizer: Make use of std::string_view in IsVendorAmd()
Same behavior, no heap allocation.

strings returned from glGetString() are guaranteed to be static strings,
so this is safe to do. They're also guaranteed to be null-terminated.
2020-05-01 05:57:25 -04:00
Lioncash de140a5870 gl_rasterizer: Default destructor in the cpp file 2020-05-01 05:53:40 -04:00
Lioncash ea08178dde gl_rasterizer: Remove unused emu_window variable in RasterizerOpenGL
Silences an unused private variable warning.
2020-05-01 05:52:48 -04:00
Lioncash 59a614a70f gl_rasterizer_cache: Remove unnecessary reference parameter in LoadCustomTexture()
This is only ever used in a self-referential manner, so we can make use
of the texture info member directly.
2020-05-01 05:42:35 -04:00
Lioncash e342f36e02 gl_rasterizer_cache: Flatten LoadCustomTexture()
Makes the control flow much nicer to follow, as we don't store to a
local before returning anymore.
2020-05-01 05:33:47 -04:00
Mat M 85d37c9994
gl_shader_disk: Make use of std::nullopt where applicable (#5293)
Some implementations can use the std::nullopt_t constructor of
std::optional to avoid needing to completely zero out the internal
buffer of the optional and instead only set the validity byte within it.

e.g. Consider the following function:

std::optional<std::vector<ShaderDiskCacheRaw>> fn() {
    return {};
}

With libc++ this will result in the following code generation on x86-64:

Fn():
  mov     rax, rdi
  vxorps  xmm0, xmm0, xmm0
  vmovups ymmword ptr [rdi], ymm0
  vzeroupper
  ret

With libstdc++, we also get the similar equivalent:

Fn():
  vpxor   xmm0, xmm0, xmm0
  mov     rax, rdi
  vmovdqu XMMWORD PTR [rdi], xmm0
  vmovdqu XMMWORD PTR [rdi+16], xmm0
  ret

If we change this function to return std::nullopt instead, then this
simplifies both the code gen from libc++ and libstdc++ down to:

Fn():
  mov     BYTE PTR [rdi+24], 0
  mov     rax, rdi
  ret

Given how little of a change is necessary to result in better code
generation, this is essentially a "free" very minor optimization.
2020-04-30 22:42:32 -05:00
Lioncash f20120e5a7 gl_shader_gen: Mark hash implementations as noexcept
These shouldn't throw at all, so we can mark the interface as such.
2020-04-30 22:57:36 -04:00
Lioncash ca4f7266c0 gl_shader_manager: Remove unused variable within LoadDiskCache() 2020-04-30 22:48:57 -04:00
Lioncash 138539c9a0 gl_shader_manager: Eliminate variable shadowing
Resolves a few -Wshadow warnings.
2020-04-30 22:46:58 -04:00
Lioncash 2d83b39532 gl_shader_manager: Avoid unnecessary std::vector copy in LoadDiskCache()
Same behavior, but without an unnecessary reallocation.
2020-04-30 22:43:03 -04:00
Lioncash e118cb1e0b renderer_opengl: Resolve compiler truncation warnings
Resolves numerous truncation warnings on MSVC.
2020-04-30 22:26:14 -04:00
Lioncash d23ffe9b42 gl_shader_gen: Mark PicaVSConfig reference parameter as const
This isn't mutated whatsoever, so this can be marked const.
2020-04-30 22:07:25 -04:00
Ben 9dc0f38ffd
Merge pull request #5241 from lioncash/pica
pica_state: Make use of std::array where applicable
2020-04-28 09:01:41 +02:00
Marshall Mohror 8a0b0c2fc7
texture_filters: update ScaleForce (#5270)
* texture_filters: update ScaleForce

* texture_filters: optimize scale_force

* texture_filters/scale_force: optimize final offset calculation
2020-04-27 23:50:47 -05:00
Lioncash 41b7df4a32 command_processor: Resolve undefined behavior type punning
We can use std::memcpy to achieve the same behavior without undefined
behavior. Once Citra moves to C++20 we can convert this over to
std::bit_cast.
2020-04-27 15:35:21 -04:00
Lioncash 5ac4636a14 pica_state: Make use of std::array
Same behavior, stronger typing.
2020-04-27 15:35:18 -04:00
Mat M bc14f485c4
gl_shader_disk_cache: std::move entries in LoadTransferable() (#5249) 2020-04-24 17:49:54 +02:00
Pengfei Zhu 77ffe37c46
Merge pull request #5247 from lioncash/copy3
swrasterizer/proctex: Take regs by const reference
2020-04-24 22:07:03 +08:00
Mat M 8b43dff849
gl_shader_gen: Convert file-scope std::string into a std::string_view (#5263)
Same behavior, no heap allocations at program start up
2020-04-21 20:31:58 -05:00
Marshall Mohror db5b8b9c88
video_core: reduce string allocations in shader decompiler (#5261)
* video_core: reduce string allocations in shader decompiler

* use append for indentation instead of resize

Co-authored-by: Mat M. <mathew1800@gmail.com>
2020-04-20 22:08:58 -05:00
Hamish Milne d5a962cb81
Fix savestates compatibility (#5256)
* Fix savestates compatibility
2020-04-20 16:21:37 +02:00
Sebastian Valle bcc80d0871
Merge pull request #5243 from lioncash/move2
geometry_pipeline: std::move vertex handler in SetVertexHandler()
2020-04-19 21:48:48 -05:00
Sebastian Valle 1469ad339c
Merge pull request #5244 from lioncash/move3
gl_shader_manager: std::move std::string where applicable
2020-04-19 21:48:15 -05:00
Sebastian Valle acf18ce4dd
Merge pull request #5245 from lioncash/guard
video_core: Add missing header guards
2020-04-19 21:47:45 -05:00
Sebastian Valle df92b37bbf
Merge pull request #5248 from lioncash/view
post_processing_opengl: Make use of std::string_view with GetPostProcessingShaderCode()
2020-04-19 21:46:48 -05:00
Ben ca722f1bb1
Merge pull request #5242 from lioncash/noexcept
gl_resource_manager: Make use of noexcept on move assignment and move constructors
2020-04-19 16:56:24 +02:00
Ben 362956a69b
Merge pull request #5240 from lioncash/primitive
primitive_assembly: Minor changes
2020-04-19 16:55:56 +02:00
Lioncash 623cc926ed post_processing_opengl: Make use of std::string_view with GetPostProcessingShaderCode()
Same behavior, but doesn't result in an allocating copy of the passed in
string. Particularly given the string is only compared against other
existing strings.
2020-04-18 22:27:44 -04:00
Lioncash e2533e8edb swrasterizer/proctex: Take regs and state by const reference
Avoids unnecessarily copying 512 bytes and 3584 bytes upon every
invocation.
2020-04-18 22:16:05 -04:00
Lioncash 82b55b763c swrasterizer/proctex: Make CombineAndMap() internally linked
This isn't used outside of this source file, so it can be marked
internally linked.
2020-04-18 22:09:36 -04:00
Lioncash 7a3d4d7642 video_core: Add missing header guards
Ensures errors related to multiple inclusions never happen.
2020-04-18 22:06:37 -04:00
Lioncash c72d9b806b gl_shader_manager: std::move std::string where applicable
Prevents unnecessary copies from occurring. In the case of ShaderCache,
we can just remove the parameter, given it's unused.
2020-04-18 21:40:21 -04:00
Lioncash 12d4c835db geometry_pipeline: std::move vertex handler in SetVertexHandler()
std::function is allowed to internally allocate, so this prevents
potential reallocations from occurring, should that case ever happen.
2020-04-18 21:26:47 -04:00
Lioncash 12279b22cc gl_resource_manager: Make use of noexcept on move assignment and move constructors
Several standard constructors generally check if objects can be moved in
a non-throwing manner (usually via std::move_if_noexcept) to preserve
its exception guarantees. This means that if these were used with
certain containers any reallocations internally would cause resource
churn, as copies would be necessary instead of moves.

This way, if they're every used in that manner, the right behavior is
always performed.
2020-04-18 21:12:03 -04:00
Lioncash 2cefd16850 primitive_assembly: Mark constructor explicit
Prevents any implicit constructions from occurring, given the
constructor isn't a converting constructor.
2020-04-18 20:42:39 -04:00
Lioncash 59bb84b86c primitive_assembly: Take triangle_handler by reference
Avoids copying the std::function when we don't need to. Particularly
given the std::function isn't actually stored anywhere, so there's no
need to move it.
2020-04-18 20:40:45 -04:00
Lioncash e38e79e27e primitive_assembly: Make use of std::array where applicable
Same behavior, minus any potential implicit array to pointer decay.
2020-04-18 20:39:07 -04:00
Lioncash dd2a86bed1 video_core: Amend misplaced forward declarations
ShaderProgramManager was placed within the wrong namespace. Backend
simply isn't necessary, so it can be removed.
2020-04-18 20:12:22 -04:00
B3n30 922a5f738a fix typo; updated comment about apples bad driver 2020-04-18 15:55:19 +02:00
B3n30 1e54f27cde Add flag to disable seperable shaders for osx Intel GPUs. Default is false 2020-04-18 13:37:58 +02:00
Hamish Milne 7af4b1a18e Merge branch 'master' into feature/savestates-2 2020-04-17 00:01:43 +01:00
Marshall Mohror 55ecaa0344
video_core: add ScaleForce to texture filters (#5210)
* video_core: add ScaleForce to texture filters

* fix erroneous namespace end comment

Co-Authored-By: Valentin Vanelslande <vvanelslandedev@gmail.com>

* move copyright header to shader file

Co-authored-by: Valentin Vanelslande <vvanelslandedev@gmail.com>
2020-04-16 13:33:14 -05:00
Hamish Milne 9cd669db84 Merge branch 'master' into feature/savestates-2 2020-04-16 19:03:49 +01:00
Marshall Mohror 45dfb3aacc
Merge pull request #5186 from hamish-milne/feature/fix-5067
Revert one change from #4844
2020-04-13 23:57:46 -05:00
Hamish Milne 828f88d20a Merge branch 'master' into feature/savestates-2 2020-04-12 11:24:06 +01:00
Hamish Milne a210e7e2bd Sync GPU state after loading (fix FE terrain bug) 2020-04-11 10:28:52 +01:00
Hamish Milne eb78fe0c10
Revert one change from #4844
This fixes #5067 by reverting a speculative change made in a previous PR.

From this one can conclude that, for disabled textures, black (0,0,0,1) is the correct colour and clear (0,0,0,0) is not.
2020-04-07 15:38:24 +01:00
Marshall Mohror d37b0476ad
video_core/renderer_opengl/gl_rasterizer_cache: Create Format Reinterpretation Framework (#5170)
* video_core/renderer_opengl/gl_rasterizer_cache: Create Format Reinterpretation Framework

Adds RGBA4 -> RGB5A1 reinterpretation commonly used by virtual console
If no matching surface can be found, ValidateSurface checks for a surface in the cache which is reinterpretable to the requested format.
If that fails, the cache is checked for any surface with a matching bit-width. If one is found, the region is flushed.
If not, the region is checked against dirty_regions to see if it was created entirely on the GPU.
If not, then the surface is flushed.

Co-Authored-By: James Rowe <jroweboy@users.noreply.github.com>
Co-Authored-By: Ben <b3n30@users.noreply.github.com>

temporary change to avoid merge conflicts with video dumping

* re-add D24S8->RGBA8 res_scale hack

* adress review comments

* fix dirty region check

* check for surfaces with invalid pixel format, and break logic into separate functions
2020-04-07 09:12:32 -05:00
Hamish Milne 7ff985cef9 Fixed TAS movie serialization 2020-04-06 21:23:39 +01:00
Marshall Mohror 9c7da35382
Merge pull request #5083 from zhaowenlan1779/video-dumping-update
video_core, citra_qt: Video dumping updates
2020-04-03 21:15:32 -05:00
Marshall Mohror f14e973a27
Texture Filtering v2 (#5166)
* video_core/renderer_opengl: Move SurfaceParams into its own file

Some of its enums are needed outside of the rasterizer cache
and trying to use it caused circular dependencies.

* video_core/renderer_opengl: Overhaul the texture filter framework

This should make it less intrusive.
Now texture filtering doesn't have any mutable global state.
The texture filters now always upscale to the internal rendering resolution.
This simplifies the logic in UploadGLTexture and it simply takes the role of BlitTextures at the end of the function.
This also prevent extra blitting required when uploading to a framebuffer surface with a mismatched size.

* video_core/renderer_opengl: Use generated mipmaps for filtered textures

The filtered guest mipmaps often looked terrible.

* core/settings: Remove texture filter factor

* sdl/config: Remove texture filter factor

* qt/config: Remove texture filter factor
2020-04-02 22:42:50 -05:00
Khangaroo d26564d020
Don't dump textures that aren't a power of 2 (#5152)
* don't dump textures that aren't a power of 2

* early return

* include bitset

* revert change to comment block

* explain change
2020-04-01 23:59:24 -05:00
Hamish Milne 92640fc29c Code review actions (plus hopefully fix the linux CI) 2020-03-31 17:54:28 +01:00
Hamish Milne de9ae14059 Only serialize wchar paths on windows 2020-03-28 19:29:29 +00:00
Hamish Milne 86600e90d3 Merge branch 'feature/savestates-2' of https://github.com/hamish-milne/citra into feature/savestates-2 2020-03-28 16:29:18 +00:00
Hamish Milne d92b3e9754 Code review changes - clarified HTTP serialization 2020-03-28 16:29:15 +00:00
Hamish Milne 26f9364062
Apply suggestions from code review
Co-Authored-By: Ben <bene_thomas@web.de>
2020-03-28 16:28:07 +00:00
Hamish Milne bbf8e876ab
Apply suggestions from code review
Co-Authored-By: Pengfei Zhu <zhupf321@gmail.com>
2020-03-28 16:26:24 +00:00
Hamish Milne 7049af744f Merge remote-tracking branch 'upstream/master' into feature/savestates-2 2020-03-28 12:33:21 +00:00
Marshall Mohror 5dbf334ef1
Revert "Use immutable storage when available (#5053)" (#5151)
This reverts commit 407fd15515.
2020-03-26 19:01:18 -05:00
James Rowe 407fd15515
Use immutable storage when available (#5053)
Going to merge this because I plan to use it.
2020-03-26 12:53:55 -05:00
Jan Beich bb3decb983 video_core: don't use NULL for non-pointer after a7d3489dc9
src/video_core/renderer_opengl/texture_filters/bicubic/bicubic.cpp:51:86: error: cannot initialize a parameter of type 'GLuint' (aka 'unsigned int') with an rvalue of type 'nullptr_t'
    glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, NULL, 0);
                                                                                     ^~~~
src/video_core/renderer_opengl/texture_filters/xbrz/xbrz_freescale.cpp:95:86: error: cannot initialize a parameter of type 'GLuint' (aka 'unsigned int') with an rvalue of type 'nullptr_t'
    glFramebufferTexture2D(GL_DRAW_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_TEXTURE_2D, NULL, 0);
                                                                                     ^~~~
/usr/include/sys/_null.h:37:14: note: expanded from macro 'NULL'
 #define NULL    nullptr
                 ^~~~~~~
2020-03-19 00:10:43 +00:00
Marshall Mohror a7d3489dc9
video_core: add texture filtering (#5017)
video_core: add texture filtering
2020-03-16 09:42:05 -05:00
Hamish Milne da3ab3d56e Merge branch 'master' into feature/savestates-2 2020-03-07 21:23:08 +00:00
Marshall Mohror ab8cb17ab7
Merge pull request #5111 from BreadFish64/interval
video_core: use explicit interval type in texture cache
2020-02-29 11:25:04 -06:00
BreadFish64 cfd2ab6121 video_core: use explicit interval type in texture cache
The default is discrete_interval which has dynamic open-ness.
We only use right_open intervals anyway. In theory this could allow some compile-time optimizations.
2020-02-28 13:45:19 -06:00
zhupengfei 3c6765e87c
core: Properly std::move things around 2020-02-27 16:55:09 +08:00
zhupengfei 06a0d86e9c
video_core, core: Move pixel download to its own thread
This uses the mailbox model to move pixel downloading to its own thread, eliminating Nvidia's warnings and (possibly) making use of GPU copy engine.

To achieve this, we created a new mailbox type that is different from the presentation mailbox in that it never discards a rendered frame.

Also, I tweaked the projection matrix thing so that it can just draw the frame upside down instead of having the CPU flip it.
2020-02-27 16:55:08 +08:00
Marshall Mohror 688e44bc8b
videocore/renderer_opengl/gl_rasterizer_cache: Move bits per pixel table out of function (#5101)
* videocore/renderer_opengl/gl_rasterizer_cache: Move bits per pixel table out of function

GCC and MSVC copy the table at runtime with the old implementation, which is wasteful and prevents inlining. Unfortunately, static constexpr variables are not legal in constexpr functions, so the table has to be external.
Also replaced non-standard assert with DEBUG_ASSERT_MSG.

* fix case of table name in assert

* set table to private
2020-02-22 14:37:42 -07:00
James Rowe 55c75b5e3e Add ClearAll to rasterizer cache for fully wiping the cache on save/load 2020-02-13 17:42:11 +08:00
Hamish Milne 0effb229cd Fix geometry pipeline; attempt to fix motion controls 2020-02-13 17:42:10 +08:00
Hamish Milne b2370ea353 Fixed setting the right DSP service on deserialization 2020-02-13 17:42:10 +08:00
Hamish Milne 558e710e17 Finished archives; remove pod.h 2020-02-13 17:41:26 +08:00
Hamish Milne 9877bf7d48 Change how the boost target works; disable external warnings in MSVC 2020-02-13 17:41:20 +08:00
Hamish Milne 7b846ffa98 clang-format fixes 2020-02-13 17:39:15 +08:00
Hamish Milne 3ed8d95866 Serialize FS service; some compiler fixes 2020-02-13 17:38:24 +08:00
Hamish Milne 3e752002c4 Replace g_kernel with Core::Global etc. 2020-02-13 17:38:21 +08:00
Hamish Milne 050c3bdee5 Serialize primitive_assembly 2020-02-13 17:38:18 +08:00
Hamish Milne c284192a87 Serialize geometry_pipeline 2020-02-13 17:38:17 +08:00
Hamish Milne acc89b2251 Fixed an include 2020-02-13 17:38:17 +08:00
Hamish Milne dc0d1ebc95 Added a TODO 2020-02-13 17:38:17 +08:00
Hamish Milne f79c9668a3 Added shader state; WIP kernel objects 2020-02-13 17:38:10 +08:00
Hamish Milne 45788b9c82 Added shader state serialization 2020-02-13 17:34:16 +08:00
Hamish Milne 6f00976ab5 video_core serialization 2020-02-13 17:34:16 +08:00
James Rowe bd29261e0a Frontend: Only load disk resources if hw shader is enabled 2020-01-22 09:47:53 -07:00
vitor-k 89cab445d4 Implementation of screen rotation without use of additional layouts.
This is based on what was done using additional layouts, but modified
to have a variable to control rotation and making it so Single Screen
Layout behaves like Upright Single would, and Default Layout behaves
like Upright Double would, when the new variable is used.

Large Layout and Side Layout currently ignore the new variable.
New variable still currently doesn't have a hotkey.
2020-01-20 22:31:51 -03:00
James Rowe e74a402c69
Merge pull request #4923 from jroweboy/diskcachelul
Disk Shader Caching
2020-01-17 18:15:50 -07:00
iwubcode 43f8aadd52 renderer_opengl: Allow usage of interlaced 3D 2020-01-16 22:12:50 -06:00
James Rowe e95bc52b3d Only check for sanitize_mul if theres a shader in the cache 2020-01-16 08:35:52 -07:00
James Rowe cf4125a6a5 Only load precompiled shaders if their sanitize_mul setting matches 2020-01-15 21:10:37 -07:00
James Rowe 6945b6539f Address review and update zstd 2020-01-15 19:58:34 -07:00
James Rowe 936094dd27 Log the number of entries in each cache 2020-01-15 19:58:34 -07:00
James Rowe 45bc5b465e Add a error log for unsupported configurations for disk cache 2020-01-15 19:58:34 -07:00
James Rowe 2d86bc6db5 Rename InvalidateTransferable to InvalidateAll to match what it does 2020-01-15 19:58:34 -07:00
James Rowe 7092ba8480 Only add shaders to precompiled cache if they are new 2020-01-15 19:58:34 -07:00
James Rowe 061a33477f Properly bind the shader sampler and uniform bindings 2020-01-15 19:58:34 -07:00
James Rowe a20c81d593 Change VFS vector to regular vector 2020-01-15 19:58:34 -07:00
James Rowe 4e9ec4efd0 Add shader disk caching 2020-01-15 19:58:33 -07:00
James Rowe f369196c9f Remove wait for free buffer
Previously we would first attempt to use any buffer that was free,
meaning whichever buffer has already been displayed. This has poor
interactions when the operating system throttles the update rate of the
window, so if there isn't any free buffers available, just reuse the
oldest frame instead.
2019-12-16 20:02:01 -07:00
James Rowe 439d550850
Merge pull request #4940 from jroweboy/presentation-thread
Split Presentation thread from Render thread
2019-12-15 20:25:34 -07:00
James Rowe 30dfe1fcb8 Use the correct register length for index_array
The index_array can't possible be 31 bits long as that would index
out of bounds memory. According to 3dbrew, this should be 28
2019-12-13 18:08:07 -07:00
James Rowe 65613cce81 Add microprofile scopes for presentation 2019-12-02 18:59:12 -07:00
BreadFish64 e38b4f6707 video_core: get rid of MSVC hack comment 2019-11-17 17:42:19 -06:00
James Rowe 586b8e8b46 Change from QOpenGLWidget to QWindow
While QOpenGLWidget sounds like a good idea, it has issues which are
harder to debug due to how Qt manages the context behind the scenes. We
could probably work around any of these issues over time, but its
probably easier to do it ourselves with a QWindow directly.

Plus using QWindow + createWindowContainer is the easiest to use
configuration for Qt + Vulkan so this is probably much better in the
long run.
2019-11-09 13:12:30 -07:00
James Rowe 26d828fb4c Prevent softlock on shutdown and various cleanup 2019-11-09 13:12:29 -07:00
James Rowe 9c32c0b98b Change from render to texture to render to renderbuffer 2019-11-09 13:12:29 -07:00
James Rowe 52d7676831 recreate mailbox to use a queue instead 2019-11-09 13:12:29 -07:00
James Rowe ac90cd0378 Change Present to finish only after swap 2019-11-09 13:12:29 -07:00
James Rowe 27d0fc64d0 Add texture mailbox support to opengl renderer. 2019-11-09 13:10:17 -07:00
Khangaroo df99d98240 specify size of buffer and use openglstate in getteximageoes 2019-11-09 12:58:17 -07:00
khang06 a458155f99 texture dump hotkey (ctrl+d)
address more comments
2019-11-09 12:56:30 -07:00
Khangaroo 5450d4980d crash hotfix (no clang-format because on phone)
hotfix 2: check if the texture is custom before dumping

hotfix 4: fix custom texture conflict detection
2019-11-09 12:56:28 -07:00
Khangaroo ae4aaf2fc1 nested folder support + refuse to load incompatibly sized textures + general cleanups 2019-11-09 12:56:27 -07:00
Khangaroo 8a98310a16 address more comments, fix dumping textures that already got dumped 2019-11-09 12:56:27 -07:00
Khangaroo c2a32e942b address more comments 2019-11-09 12:56:27 -07:00
Khangaroo 650fe6447d generate mipmaps (for now) 2019-11-09 12:56:27 -07:00
Khangaroo f09489475a fix texture dumping on opengl es, create load folder if none exists if custom textures is enabled 2019-11-09 12:56:27 -07:00
Khangaroo 254f8a4643 fix inverted texture dump error message path 2019-11-09 12:56:27 -07:00
Khangaroo 8b881ac1fc fix preload textures being enabled when it shouldn't
address more comments
2019-11-09 12:56:25 -07:00
Khangaroo 391e552927 qimageinterface fixes, remove old lodepng, address more comments 2019-11-09 12:56:24 -07:00
Khangaroo b81c15941e add image interface, remove lodepng from video_core/core, address more comments, fix comments
remove unnecessary conversion
2019-11-09 12:56:21 -07:00
Khangaroo 5940361b81 new-line that clang-format didn't fix
address some comments
2019-11-09 12:56:17 -07:00
Khangaroo 59b475a4b9 implement custom texture preload 2019-11-09 12:56:17 -07:00
Khangaroo 657a129b60 handle upscaling and offsets (fixes oot3d) 2019-11-09 12:54:43 -07:00
Khangaroo 6d90c42a79 fix crashes, add custom texture cache, load textures from load directory 2019-11-09 12:54:40 -07:00
Khangaroo f866b2a917 texture replacement (also messy) 2019-11-09 12:53:16 -07:00
khang06 deff865ac9 initial sloppy texture dumping implementation (opengl only) 2019-11-09 12:53:16 -07:00
khang06 2b92065d2a add lodepng as an external, have video_core depend on it 2019-11-09 12:48:23 -07:00
James Rowe c1d3b5e61c
Merge pull request #4934 from vitor-k/boost_remnant
Remove boost headers not currently used
2019-09-18 10:57:37 -06:00
BreadFish64 d0decf2166 remove ugly msvc hack
the bug appears to be fixed so there's no reason to keep this around
2019-09-15 22:35:21 -05:00
vitor-k 147a7f0dec Remove boost headers not currently used 2019-09-15 15:18:38 -03:00
Pengfei Zhu 4bc22aa350
Merge pull request #4918 from vitor-k/warnings
Silence warnings from unused code and mismatched declaration
2019-09-06 22:08:06 +08:00
vitor-k 61f9710d95 remove unused call to nodiscard function 2019-09-05 17:11:38 -03:00
Weiyi Wang dd3ba7bd21 opengl: remove hw geometry shader related stuff 2019-08-18 20:07:50 -04:00
Weiyi Wang b4d45b57c7
Merge pull request #4879 from tywald/accurate-gs-on
Remove 'Accurate Geometry Shader' setting
2019-08-18 15:52:45 -04:00
James Rowe 62e6c147ae Add perf stat logging through ini setting
For better tracking of performance regressions on incoming changes, this
change adds a way to dump frametime to file by changing an ini config
option. This is intentionally hidden as its only useful to a small
number of individuals, and not really applicable to the general
userbase.
2019-08-14 21:17:27 -06:00
zhupengfei 0224ae13c4
video_core: Implement frame dumping
Two PBOs are used to speed up pixel copying process. To avoid getting the wrong speed/FPS, a new parameter is added to DrawScreens about whether to increase the frame count.
2019-08-13 19:28:04 +08:00
zhupengfei 778cc68114
renderer_base: Add prepare/cleanup function interface
This should be called by the video dumper backend to tell the video core to create necessary buffers/storage, etc.
2019-08-13 19:28:04 +08:00
tywald aad8261534 Remove 'Accurate Geometry Shader' setting, default behavior is as it was turned on. 2019-08-12 02:55:14 +02:00
Hamish Milne e3cefe5a5d Use a clear texture instead of texture 0 (solid black) in the GL rasterizer (#4844)
* Add OpenGLState.default_texture and set it to Clear in OpenGLRasterizer

* Localize the fix to the GL rasterizer

* Revert unwanted change
2019-08-10 11:05:00 +02:00
Weiyi Wang 0269cb6e67 gl_rasterizer: decrease vertex buffer size (#4703)
Nvidia seems to have flickering issue with pokemon for some specific vertex buffer size. The root cause is still unknown. This is just a workaround
2019-08-10 10:51:24 +02:00
xperia64 8131bd32e3 renderer_opengl: Add support for custom shaders (#4578)
* Add Anaglyph 3D

Change 3D slider in-game

Change shaders while game is running

Move shader loading into function

Disable 3D slider setting when stereoscopy is off

The rest of the shaders

Address review issues

Documentation and minor fixups

Forgot clang-format

Fix shader release on SDL2-software rendering

Remove unnecessary state changes

Respect 3D factor setting regardless of stereoscopic rendering

Improve shader resolution passing

Minor setting-related improvements

Add option to toggle texture filtering

Rebase fixes

* One final clang-format

* Fix OpenGL problems
2019-08-09 20:00:47 +02:00
weihuoya 899e3eb003 minor fix for opengles 2019-07-28 21:18:38 +08:00
Weiyi Wang 909d04ddea Remove unused stuff
Some unused variables are still kept in services, as they are parameters passed from the command buffer and might be used in the future
2019-07-16 20:27:03 -04:00
Weiyi Wang 99136ec592 gl_rasterizer: correct supress_mipmap_for_cube logic
The previous version would break when the state changes from (cube=true,mipmap=false) -> (cube=true,mipmap=true)
2019-07-06 08:03:01 -04:00
Weiyi Wang bb776e25a9 pica: move global shader buffer state into Pica::State (#4796) 2019-06-20 00:39:08 +02:00
BreadFish64 aaf496dec7 video_core: change "left + width" to "right" in CanSubRect
the constructed rectangle from GetSubRect already has the right info
2019-06-04 17:03:31 -05:00
Aner Torre 4b0ce1b770 video_core: Fix fragment_shader compilation failure due to different type variable multiplication 2019-05-19 14:45:41 +02:00
James Rowe 3f2c7eb471
Merge pull request #4738 from FearlessTobi/port-1020-new
Port yuzu-emu/yuzu#1020: "core: Namespace EmuWindow"
2019-04-26 08:58:09 -06:00
Lioncash 6e22891761 core: Namespace EmuWindow
Gets the class out of the global namespace.
2019-04-21 14:16:16 +02:00
Weiyi Wang 0ec45f694c
Merge pull request #3910 from wwylele/mipmap
gl_rasterizer: implement mipmap by forwarding PICA mipmap configuration
2019-04-17 14:10:42 -04:00
Weiyi Wang e3b6bf93bc gl_rasterizer_cache: validate surface in mipmap/cubemap if the children is not validated yet 2019-04-15 09:07:36 -04:00
Weiyi Wang 4a206237be
Merge pull request #4726 from FearlessTobi/port-2312
Port yuzu-emu/yuzu#2312: "general: Use deducation guides for std::lock_guard and std::unique_lock"
2019-04-13 18:00:09 -04:00
Tobias e9c2b27c68
Merge pull request #4681 from FearlessTobi/port-2188-2190
Port yuzu-emu/yuzu#2188 and yuzu-emu/yuzu#2190: various minor code refactoring changes
2019-04-09 21:18:34 +02:00
Lioncash 21c71d21ae general: Use deducation guides for std::lock_guard and std::unique_lock
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-07 15:14:29 +02:00
fearlessTobi d755a15891 fix compilation problems 2019-03-23 12:43:03 +01:00
Weiyi Wang 1f233e4365
Merge pull request #4691 from liushuyu/oes_fix
video_core: renderer_opengl: gles color fix
2019-03-18 19:01:13 -04:00
xperia64 fa0919915c Fix GLES version header on picky drivers 2019-03-15 23:32:29 +00:00
liushuyu 71b0eab85c
video_core: renderer_opengl: addressed comments...
use indexing to make code more concise; use const bool instead of bool
2019-03-14 10:58:29 -06:00
liushuyu 476df9debf
video_core: renderer_opengl: addressed comments...
... removed incorrect comments and removed incorrect value calculations
2019-03-13 19:17:29 -06:00
liushuyu 164eb100eb video_core: renderer_opengl: addressed comments...
... removed redundant comments and removed incorrect value assignments
2019-03-12 22:56:11 -06:00
liushuyu 3983b12086
video_core: renderer_opengl: gles color fix 2019-03-12 22:28:54 -06:00
Weiyi Wang 88a011ec8e GetTextureSurface: return on invalid physical address early
Previously this check is in GetSurface (if (addr == 0)). This worked fine because GetTextureSurface directly forwarded the address value to GetSurface. However, now with mipmap support, GetTextureSurface would call GetSurface several times with different address offset, resulting some >0 but still invalid address in case the input is 0. We should error out early on invalid address instead of sending it furthor down which would cause invalid memory access
2019-03-10 11:06:08 -04:00
wwylele ebdef4fd69 gl_rasterizer_cache: unlink watchers if surface is moved to remove_surfaces but is not immediately removed 2019-03-08 09:37:25 -05:00
wwylele 777af04f4a gl_rasterizer: ignore mipmap setting for cubemap before we implements it 2019-03-08 09:37:25 -05:00
wwylele d7196b5573 gl_rasterizer_cache: invalidate watchers on (partial) surface invalidation 2019-03-08 09:37:25 -05:00
wwylele fa141c799b gl_shader_gen: use accurate LOD formula for texture 2D 2019-03-08 09:37:25 -05:00
wwylele ca78d34933 gl_rasterizer: implement mipmap 2019-03-08 09:37:24 -05:00
Lioncash e1a4912ade common/math_util: Move contents into the Common namespace
These types are within the common library, so they should be within the
Common namespace.
2019-03-02 18:13:10 +01:00
Lioncash 643472e24a common/vector_math: Move Vec[x] types into the Common namespace
These types are within the common library, so they should be using the
Common namespace.
2019-03-02 15:04:13 +01:00
tgsm d6c530d08c video_core: use nested namespaces 2019-02-19 03:09:57 -05:00
Weiyi Wang f409342ab5
Merge pull request #4613 from BreadFish64/gles5
video_core: add GLES support
2019-02-17 15:44:39 -05:00
Weiyi Wang de1128c60d
Merge pull request #4628 from FearlessTobi/backport-some-stuff
Backport various minor frontend review changes from yuzu and port minor PR from yuzu
2019-02-14 11:45:27 -05:00
Weiyi Wang 4b2397aa77
Merge pull request #4633 from BreadFish64/fully-invalid
video_core: improve efficiency of CachedSurface::IsSurfaceFullyInvalid
2019-02-14 11:44:46 -05:00
ReinUsesLisp fc6e33d812 video_core: Sort predicate order to have semantically positive value first 2019-02-13 21:06:37 +01:00
SachinVin d63acfc1e9 video_core: add workarounds to enable GLES support
video_core: shorten GetGLSLVersionString

video_core: make GLES version and extensions consistent

video_core: move some logic to LoadShader

video_core: deduplicate fragment shader precision specifier
2019-02-12 16:57:18 -06:00
BreadFish64 d90f733330 video_core: improve efficiency of CachedSurface::IsSurfaceFullyInvalid 2019-02-09 17:33:18 -06:00
fearlessTobi 6be1b4d293 renderer_base: backport minor changes from yuzu 2019-02-06 17:16:27 +01:00
Weiyi Wang b5f2318ae7 gl_rasterizer: change shadow_texture_bias from shader config var to shader uniform
Games can frequently change this register. Using it as shader config var would generates a lot of shaders
2019-02-02 20:40:08 -05:00
Lioncash d2aac218a6 renderer_opengl: Correct forward declaration of FramebufferLayout
This is actually a struct, not a class, which can lead to compilation
warnings.
2018-12-27 02:48:05 +01:00
Weiyi Wang 07d6d90bb3 gl_rasterizer_cache/MortonCopy: avoid read/write to invalid address 2018-12-09 13:20:44 -05:00
Weiyi Wang 7e8ba6ed8e Memory: move memory chunk into pImpl and make them dynamically allocated
Otherwise MSVC would give out-of-memory error on compile time
2018-12-06 13:30:47 -05:00
Weiyi Wang d18cda5a5d Memory: move MarkRegionCached into class 2018-12-05 20:21:14 -05:00
Weiyi Wang 296c458e0e Memory: move GetPhysicalPointer and IsValidPhysicalAddress into class 2018-12-05 20:21:14 -05:00
Weiyi Wang 8bb404c82a VideoCore: pass in memory system
currently set as global. Will change when videocore itself is wrapped as a class
2018-12-05 20:16:42 -05:00
Francois Berder c598fd7228 renderer_opengl: Fix string comparison
Signed-off-by: Francois Berder <fberder@outlook.fr>
2018-12-04 22:12:35 +00:00
zhupengfei 071b41cb61
citra_qt, video_core: Screenshot functionality
Allows capturing screenshot at the current internal resolution (native for software renderer), but a setting is available to capture it in other resolutions. The screenshot is saved to a single PNG in the current layout.
2018-11-30 14:14:41 +08:00
Markus Wick 62036bdea8 gl_rasterizer_cache: Add profiles for Copy and Blit
They were missed, and Copy is very high in profile here. It doesn't block the GPU,
but it stalls the driver thread. So with our bad GL instructions, this might block quite a while.
2018-11-17 15:11:56 +01:00
Markus Wick 2b793797e0 gl_resource_manager: Profile creation and deletion 2018-11-17 15:07:30 +01:00
Markus Wick 79696a1a43 gl_stream_buffer: Profile orphaning of stream buffer.
This serialize to the driver thread and so it may block for a while.
So if it is in the benchmark, we get noticed if it happens too often.
2018-11-17 15:03:20 +01:00
Markus Wick 392547a97c gl_resource_manager: Split implementations in .cpp file
Those implementations are quite costly, so there is no need to inline them to the caller.
Ressource deletion is often a performance bug, so in this way, we support to add breakpoints to them.
2018-11-17 15:01:40 +01:00
Tobias 46e8237e7e Port yuzu-emu/yuzu#1137: "renderer_opengl: Namespace OpenGL code" (#4423)
* renderer_opengl: Namespace OpenGL code

Namespaces all OpenGL code under the OpenGL namespace.

Prevents polluting the global namespace and allows clear distinction
between other renderers' code in the future.

* Also namespace TextureCubeConfig
2018-11-16 23:29:10 -08:00
Weiyi Wang 9458e4d8ec CoreTiming: wrap into class 2018-11-04 10:26:38 -05:00
B3n30 2306af3600 Handle cases when std::optional does not contain a value 2018-10-05 16:51:33 +02:00