Commit Graph

57 Commits

Author SHA1 Message Date
GPUCode 26d5727b19
video_core: Merge tex0 and tex_cube (#7173) 2023-11-17 03:14:10 -08:00
Vitor K a35f8cbb78
fix include/namespace related compilation errors (#7019)
a user on discord reported compilation errors when trying to compile
on Linux with GCC 13 and Clang 16.
2023-09-28 18:36:50 +05:30
GPUCode 1159e4d928
video_core: Take factors into account with min/max blending functions (#6925)
* sw_framebuffer: Take factors into account for min/max blending

* renderer_gl: Take factors into account for min/max blending

* Address review comments

* gl_shader_gen: Fix frambuffer fetch on qcom and mali

* renderer_opengl: Add fallback path for mesa

* gl_shader_gen: Avoid emitting blend emulation if minmax_factor is present
2023-08-30 21:26:28 +03:00
GPUCode 88ea66053e
Miscallenious fixes to gl backend and qt frontend (#6834)
* renderer_gl: Make rasterizer normal class member

* It doesn't need to be heap allocated anymore

* gl_rasterizer: Remove default_texture

* It's unused

* gl_rasterizer: General cleanup

* gl_rasterizer: Lower case lambdas

* Match style with review comments from vulkan backend

* rasterizer_cache: Prevent memory leak

* Since the switch from shared_ptr these surfaces were no longer being destroyed properly. Use our garbage collector for that purpose to destroy it safely for both backends

* rasterizer_cache: Make temp copy of old surface

* The custom surface would override the memory region of the old region resulting in garbage data, this ensures the custom surface is constructed correctly

* citra_qt: Manually create dialog tabs

* Allows for custom constructors which is very useful. While at it, global state is now eliminated from configuration

* citra_qt: Eliminate global system usage

* core: Remove global system usage in memory and HIO

* citra_qt: Use qOverload

* tests: Run clang format

* gl_texture_runtime: Fix surface scaling
2023-08-02 01:40:39 +03:00
GPUCode a955f02771
rasterizer_cache: Remove runtime allocation caching (#6705)
* rasterizer_cache: Sentence surfaces

* gl_texture_runtime: Remove runtime side allocation cache

* rasterizer_cache: Adjust surface scale during reinterpreration

* Fixes pixelated outlines. Also allows to remove the d24s8 specific hack and is more generic in general

* rasterizer_cache: Remove Expand flag

* Begone!

* rasterizer_cache: Cache framebuffers with surface id

* rasterizer_cache: Sentence texture cubes

* renderer_opengl: Move texture mailbox to separate file

* Makes renderer_opengl cleaner overall and allows to report removal threshold from runtime instead of hardcoding. Vulkan requires this

* rasterizer_cache: Dont flush cache on layout change

* rasterizer_cache: Overhaul framebuffer management

* video_core: Remove duplicate

* rasterizer_cache: Sentence custom surfaces

* Vulkan cannot destroy images immediately so this ensures we use our garbage collector for that purpose
2023-08-01 03:35:41 +03:00
bunnei a941547c1c android: renderer_opengl: Partially implement glLogicOp on GLES. 2021-07-24 23:37:03 +05:30
weihuoya cddd447506 use separate texture buffer for light and fog
gl_state.cpp: Fix typo in texture buffer LUT

gl_state.cpp: Initialize texture_buffer_lut_lf
2021-07-24 23:36:53 +05:30
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
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 9c32c0b98b Change from render to texture to render to renderbuffer 2019-11-09 13:12:29 -07: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
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 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
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 4f9b9c4b80 gl_state: add pipeline state 2018-04-11 14:41:43 +03:00
wwylele 15e8664ef7 gl_rasterizer: implement texture cube 2018-03-10 01:15:06 +02:00
James Rowe 160ac25527 OpenGL State: Change setters so they don't directly write to curstate 2017-12-23 16:10:25 -07:00
Dwayne Slater 350082ab75 Fix logic ops not being enabled in the OpenGL renderer 2017-11-29 16:30:19 -05:00
Huw Pascoe a13ab958cb Fixed type conversion ambiguity 2017-09-30 09:34:35 +01:00
wwylele 1eca380886 gl_rasterizer: add clipping plane z<=0 defined in PICA 2017-08-21 08:03:07 +03:00
wwylele 8482933db8 gl_rasterizer: use texture buffer for proctex LUT 2017-07-01 11:02:48 +03:00
wwylele 8978ecb09c gl_rasterizer: use texture buffer for fog LUT 2017-06-22 20:41:00 +03:00
wwylele 457659fe01 gl_state: reset 1d textures 2017-06-21 23:13:06 +03:00
wwylele be9e952bdc gl_rasterizer: manage texture ids in one place 2017-06-21 23:13:06 +03:00
wwylele ab60414122 gl_rasterizer/lighting: fix LUT interpolation 2017-06-21 23:13:06 +03:00
wwylele 4d62e75fb2 gl_rasterizer: implement procedural texture 2017-05-20 13:50:50 +03:00
Markus Wick d0d49bb951 OpenGL: Drop framebuffer completeness check.
This OpenGL call synchronize the worker thread of the nvidia blob.
It can be verified on linux with the __GL_THREADED_OPTIMIZATIONS=1 environment variable.
Those errors should not happen on tested drivers.
It was used as a workaround for https://bugs.freedesktop.org/show_bug.cgi?id=94148
2016-12-07 22:09:13 +01:00
Subv 4623415026 RasterizerGL: Use GL_TRUE and 0xFF in the stencil and depth masks instead of simply true and -1 2016-11-27 13:09:11 -05:00
Yuri Kunde Schlesner 84fbbe2629 Use negative priorities to avoid special-casing the self-include 2016-09-21 00:15:56 -07:00
Emmanuel Gil Peyrot ebdae19fd2 Remove empty newlines in #include blocks.
This makes clang-format useful on those.

Also add a bunch of forgotten transitive includes, which otherwise
prevented compilation.
2016-09-21 11:15:47 +09:00
Emmanuel Gil Peyrot dc8479928c Sources: Run clang-format on everything. 2016-09-18 09:38:01 +09:00
Jannik Vogel a12571c709 OpenGL: Implement fog 2016-06-07 00:06:28 +02:00
Jannik Vogel 5864cb7e00 OpenGL: Support blend equation 2016-05-12 22:57:40 +02:00
Emmanuel Gil Peyrot 691a42fe98 VideoCore: Run include-what-you-use and fix most includes. 2016-04-30 17:02:41 +01:00
tfarley 22f3a7e94c HWRasterizer: Texture forwarding 2016-04-21 17:27:56 -04:00
MerryMage 0801363840 renderer_opengl: Initalise fragment shader LUT textures 2016-02-26 00:12:38 +00:00
bunnei 021cb0bced renderer_opengl: Use textures for fragment shader LUTs instead of UBOs.
- Gets us LUT interpolation for free.
- Some older Intel GPU drivers did not support the big UBOs needed to store the LUTs.
2016-02-05 17:17:31 -05:00
Yuri Kunde Schlesner 95dbc6eb0e OpenGL: Add support for glFrontFace in the state tracker 2015-12-04 21:58:26 -08:00
Subv 823ce62f2f FragShader: Use an UBO instead of several individual uniforms 2015-11-18 21:03:56 -05:00
Lioncash aec28ed91e video_core: Reorganize headers 2015-09-11 07:31:15 -04:00
Yuri Kunde Schlesner ec28f037e6 OpenGL: Add support for Sampler Objects to state tracker 2015-09-03 15:09:50 -03:00
Subv 46f660a789 GLRasterizer: Implemented stencil testing in the hw renderer. 2015-08-20 10:11:09 -05:00
Yuri Kunde Schlesner 254582aa35 OpenGL: Fix state tracking in situations with reused object handles
If an OpenGL object is created, bound to a binding using the state
tracker, and then destroyed, a newly created object can be assigned the
same numeric handle by OpenGL. However, even though it is a new object,
and thus needs to be bound to the binding again, the state tracker
compared the current and previous handles and concluded that no change
needed to be made, leading to failure to bind objects in certain cases.

This manifested as broken text in VVVVVV, which this commit fixes along
with similar texturing problems in other games.
2015-08-06 00:59:37 -03:00
Yuri Kunde Schlesner ff68db61bc OpenGL: Remove redundant texture.enable_2d field from OpenGLState
All uses of this field where it's false can just set the texture id to 0
instead.
2015-08-05 22:55:22 -03:00
Yuri Kunde Schlesner e5c4fe0098 GL Renderer: Remove erroneous glEnable(GL_TEXTURE_2D) calls
In OpenGL 3, texturing is always enabled, and this call is invalid.
While it produced no effect in the rest of the execution, it wouldn't
have the intended effect of disabling texturing for that unit. Instead
bind a null texture to the unit.
2015-07-22 01:22:09 -03:00