Commit graph

30 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
4e9ec4efd0 Add shader disk caching 2020-01-15 19:58:33 -07:00
Weiyi Wang
dd3ba7bd21 opengl: remove hw geometry shader related stuff 2019-08-18 20:07:50 -04: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
B3n30
d37a2270d6 Replace boost::optional with std::optional where possible 2018-10-05 13:51:09 +02:00
Weiyi Wang
7d8f115185 Prefix all size_t with std::
done automatically by executing regex replace `([^:0-9a-zA-Z_])size_t([^0-9a-zA-Z_])` -> `$1std::size_t$2`
2018-09-06 16:03:28 -04:00
wwylele
266f2b6242 gl_rasterizer: only apply AMD hack when the vendor is AMD 2018-07-31 22:58:17 +03:00
Valentin Vanelslande
fef231dc5b
gl_shader_manager: fix macro 2018-06-30 11:24:38 -05:00
Markus Wick
831d4f9aeb gl_rasterizer: Use the shared texture buffer for the proctex lut. 2018-06-22 17:20:55 +02:00
Markus Wick
1ca6d2ea8d gl_rasterizer: Use the shared texture buffer for the noise, color and alpha map. 2018-06-22 17:20:55 +02:00
Markus Wick
63fb7dcc1b gl_rasterizer: Use the shared texture buffer for the fog lut. 2018-06-22 17:20:55 +02:00
Markus Wick
4679487640 gl_rasterizer: Use the shared texture buffer for the lighting lut. 2018-06-22 17:20:54 +02:00
Markus Wick
a8396cdbed renderer_opengl: Create shared texture buffer. 2018-06-22 17:05:40 +02:00
wwylele
781912e854 gl_rasterize: implement shadow mapping using image load/store 2018-06-01 14:26:44 +03:00
wwylele
191b29e402 gl_shader_gen: generate programmable vs/gs and fixed gs 2018-04-24 20:39:10 +03:00
wwylele
8dc75598a4 gl_rasterizer: isolate shader management into its own class 2018-04-11 14:52:37 +03:00