Commit graph

123 commits

Author SHA1 Message Date
Weiyi Wang dd3ba7bd21 opengl: remove hw geometry shader related stuff 2019-08-18 20:07:50 -04: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
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
wwylele 777af04f4a gl_rasterizer: ignore mipmap setting for cubemap before we implements it 2019-03-08 09:37:25 -05:00
wwylele ca78d34933 gl_rasterizer: implement mipmap 2019-03-08 09:37:24 -05: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
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
fearlessTobi f61c9c3eb7 video_core: Make global EmuWindow instance part of the base renderer …
…class

Makes the global a member of the RendererBase class. We also change this
to be a reference. Passing any form of null pointer to these functions
is incorrect entirely, especially given the code itself assumes that the
pointer would always be in a valid state.

This also makes it easier to follow the lifecycle of instances being
used, as we explicitly interact the renderer with the rasterizer, rather
than it just operating on a global pointer.
2018-08-25 15:20:40 +02:00
wwylele 266f2b6242 gl_rasterizer: only apply AMD hack when the vendor is AMD 2018-07-31 22:58:17 +03:00
wwylele 2927c88fd3 gl_rasterizer: implement mipmap for proctex 2018-07-06 01:13:02 +03: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 5a9cde138d gl_rasterizer: Add a new dirty flag for any lighting lut. 2018-06-22 17:17:48 +02:00
Markus Wick a8396cdbed renderer_opengl: Create shared texture buffer. 2018-06-22 17:05:40 +02:00
Markus Wick 298ebe3752 gl_rasterizer: Inline texture buffer uploads. 2018-06-22 17:04:47 +02:00
Markus Wick 8a8c6f059f gl_rasterizer: Move TBO syncing helper to one function. 2018-06-22 17:04:47 +02:00
wwylele 781912e854 gl_rasterize: implement shadow mapping using image load/store 2018-06-01 14:26:44 +03:00
wwylele dd6252a676 gl_rasterizer: fallback to software shader path if buffer overflow happens on hardware shader path 2018-05-18 13:55:19 +03:00
wwylele 9b448a0739 gl_rasterizer: implement AccelerateDrawBatch to emulate PICA shader on hardware 2018-05-14 10:17:36 +03:00
Weiyi Wang f85e71c37c
Merge pull request #3715 from wwylele/hardware-vertex-vector
gl_rasterizer: Use GLvec* instead of C arrays
2018-05-06 07:19:06 +03:00
Weiyi Wang 0da3b75c9e
Merge pull request #3700 from wwylele/texcache-watcher
gl_rasterizer_cache: cache texture cube
2018-05-05 16:30:39 +03:00
Markus Wick 5960282303 gl_rasterizer: Use buffer_storage for uniform data.
This replaces the glBufferData logic with the shared stream buffer code.
The new code doesn't need a temporary staging buffer any more, so the
performance should imrpove quite a bit.
2018-05-05 09:22:02 +02:00
MerryMage d6cd1a8712 gl_rasterizer: Use GLvec* instead of C arrays 2018-05-05 04:37:04 +03:00
wwylele 1762ad2dcc gl_rasterizer_cache: cache texture cube 2018-05-01 21:26:43 +03:00
Markus Wick 5d1dd205c4 renderer_opengl: Rewrite stream buffer. 2018-04-21 16:12:30 +02:00
wwylele 8dc75598a4 gl_rasterizer: isolate shader management into its own class 2018-04-11 14:52:37 +03:00
Weiyi Wang 972db17247
Merge pull request #3497 from wwylele/texture-cube-new
gl_rasterizer: implement TextureCube
2018-04-06 12:41:40 +03:00
wwylele 0d84c5a0b6 gl_rasterizer: move state syncing from ctor to its own function 2018-04-04 17:23:55 +03:00
Markus Wick ac92664aa7 OGL: Use stream buffer for vertex data. 2018-03-17 02:02:39 +01:00
wwylele 15e8664ef7 gl_rasterizer: implement texture cube 2018-03-10 01:15:06 +02:00
James Rowe 24e187891f OpenGL Rasterizer: Update to use the new cache 2017-12-23 16:10:28 -07:00
wwylele addbcd5784 gl_rasterizer: implement custom clip plane 2017-08-25 07:26:45 +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 ab60414122 gl_rasterizer/lighting: fix LUT interpolation 2017-06-21 23:13:06 +03:00
wwylele 686cbf3ac6 gl_rasterizer: sync spot light status 2017-05-30 10:54:58 +03:00
wwylele 4d62e75fb2 gl_rasterizer: implement procedural texture 2017-05-20 13:50:50 +03:00
Yuri Kunde Schlesner a6fd4533f6 OpenGL: Move PicaShaderConfig to gl_shader_gen.h
Also move the implementation of CurrentConfig to the cpp file.
2017-04-16 21:49:32 -07:00
Yuri Kunde Schlesner 60fc0b086f VideoCore: Split regs.h inclusions 2017-02-09 00:04:24 -08:00
Yuri Kunde Schlesner 5759d94b5c VideoCore: Move Regs to its own file 2017-02-04 13:59:12 -08:00
Yuri Kunde Schlesner f443c7e5b0 VideoCore: Split lighting regs from Regs struct 2017-02-04 13:59:11 -08:00
Yuri Kunde Schlesner 23713d5dee VideoCore: Split framebuffer regs from Regs struct 2017-02-04 13:59:11 -08:00
Yuri Kunde Schlesner 9017093f58 VideoCore: Split texturing regs from Regs struct 2017-02-04 13:59:09 -08:00
Yuri Kunde Schlesner 000e78144c VideoCore: Split rasterizer regs from Regs struct 2017-02-04 13:08:47 -08:00
Yuri Kunde Schlesner bbc7844021 VideoCore: Change misleading register names
A few registers had names such as "count" or "number" when they actually
contained the maximum (that is, count - 1). This can easily lead to hard
to notice off by one errors.
2017-01-29 21:31:36 -08:00