citra/src/video_core/renderer_opengl
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
..
texture_filters texture_filters: update ScaleForce (#5270) 2020-04-27 23:50:47 -05:00
frame_dumper_opengl.cpp core: Properly std::move things around 2020-02-27 16:55:09 +08:00
frame_dumper_opengl.h video_core, core: Move pixel download to its own thread 2020-02-27 16:55:08 +08:00
gl_format_reinterpreter.cpp video_core/renderer_opengl/gl_rasterizer_cache: Create Format Reinterpretation Framework (#5170) 2020-04-07 09:12:32 -05:00
gl_format_reinterpreter.h video_core/renderer_opengl/gl_rasterizer_cache: Create Format Reinterpretation Framework (#5170) 2020-04-07 09:12:32 -05:00
gl_rasterizer.cpp Merge branch 'master' into feature/savestates-2 2020-04-16 19:03:49 +01:00
gl_rasterizer.h video_core: Amend misplaced forward declarations 2020-04-18 20:12:22 -04:00
gl_rasterizer_cache.cpp Merge branch 'master' into feature/savestates-2 2020-04-12 11:24:06 +01:00
gl_rasterizer_cache.h Merge branch 'master' into feature/savestates-2 2020-04-12 11:24:06 +01:00
gl_resource_manager.cpp Change from QOpenGLWidget to QWindow 2019-11-09 13:12:30 -07:00
gl_resource_manager.h gl_resource_manager: Make use of noexcept on move assignment and move constructors 2020-04-18 21:12:03 -04:00
gl_shader_decompiler.cpp video_core: reduce string allocations in shader decompiler (#5261) 2020-04-20 22:08:58 -05:00
gl_shader_decompiler.h video_core: Add missing header guards 2020-04-18 22:06:37 -04:00
gl_shader_disk_cache.cpp gl_shader_disk: Make use of std::nullopt where applicable (#5293) 2020-04-30 22:42:32 -05:00
gl_shader_disk_cache.h Only load precompiled shaders if their sanitize_mul setting matches 2020-01-15 21:10:37 -07:00
gl_shader_gen.cpp gl_shader_gen: Convert file-scope std::string into a std::string_view (#5263) 2020-04-21 20:31:58 -05:00
gl_shader_gen.h Only load precompiled shaders if their sanitize_mul setting matches 2020-01-15 21:10:37 -07:00
gl_shader_manager.cpp gl_shader_manager: std::move std::string where applicable 2020-04-18 21:40:21 -04:00
gl_shader_manager.h Address review and update zstd 2020-01-15 19:58:34 -07:00
gl_shader_util.cpp Fix GLES version header on picky drivers 2019-03-15 23:32:29 +00:00
gl_shader_util.h video_core: add workarounds to enable GLES support 2019-02-12 16:57:18 -06:00
gl_state.cpp Change from QOpenGLWidget to QWindow 2019-11-09 13:12:30 -07:00
gl_state.h Texture Filtering v2 (#5166) 2020-04-02 22:42:50 -05:00
gl_stream_buffer.cpp gl_stream_buffer: Profile orphaning of stream buffer. 2018-11-17 15:03:20 +01:00
gl_stream_buffer.h Port yuzu-emu/yuzu#1137: "renderer_opengl: Namespace OpenGL code" (#4423) 2018-11-16 23:29:10 -08:00
gl_surface_params.cpp Texture Filtering v2 (#5166) 2020-04-02 22:42:50 -05:00
gl_surface_params.h video_core/renderer_opengl/gl_rasterizer_cache: Create Format Reinterpretation Framework (#5170) 2020-04-07 09:12:32 -05:00
gl_vars.cpp video_core: add workarounds to enable GLES support 2019-02-12 16:57:18 -06:00
gl_vars.h video_core: add workarounds to enable GLES support 2019-02-12 16:57:18 -06:00
pica_to_gl.h Merge pull request #3910 from wwylele/mipmap 2019-04-17 14:10:42 -04:00
post_processing_opengl.cpp post_processing_opengl: Make use of std::string_view with GetPostProcessingShaderCode() 2020-04-18 22:27:44 -04:00
post_processing_opengl.h post_processing_opengl: Make use of std::string_view with GetPostProcessingShaderCode() 2020-04-18 22:27:44 -04:00
renderer_opengl.cpp Texture Filtering v2 (#5166) 2020-04-02 22:42:50 -05:00
renderer_opengl.h video_core, core: Move pixel download to its own thread 2020-02-27 16:55:08 +08:00