Commit graph

195 commits

Author SHA1 Message Date
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
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
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
Weiyi Wang
296c458e0e Memory: move GetPhysicalPointer and IsValidPhysicalAddress into class 2018-12-05 20:21:14 -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
James Rowe
14b0435df2
Merge pull request #3994 from FearlessTobi/replace-clamp-functions
Remove MathUtil::Clamp and replace it with its std:: counterpart
2018-08-02 11:08:07 -06:00
wwylele
266f2b6242 gl_rasterizer: only apply AMD hack when the vendor is AMD 2018-07-31 22:58:17 +03:00
fearlessTobi
15abf35889 Address feedback by wwylele 2018-07-30 14:46:13 +02:00
fearlessTobi
71e1d6e25d Fix compile errors 2018-07-26 13:23:25 +02:00
fearlessTobi
7a3e126a4f Replace MathUtil::Clamp with its std counterpart 2018-07-24 19:08:17 +02:00
Weiyi Wang
78685065cf
Merge pull request #3916 from wwylele/mipmap-proctex
gl_rasterizer: implement mipmap for procedural texture
2018-07-19 11:51:57 +03:00
wwylele
431fe444a9 gl_rasterizer: call glTextureBarrier when an image is bound to both texture and framebuffer 2018-07-09 23:11:29 +03:00
wwylele
2927c88fd3 gl_rasterizer: implement mipmap for proctex 2018-07-06 01:13:02 +03:00
wwylele
0eab948728 reformat all files with clang-format 2018-06-29 16:56:12 +03:00
wwylele
7c5a76e58b log: replace all NGLOG with LOG 2018-06-29 14:18:07 +03:00
NarcolepticK
9ae70e733f video-core: Migrate logging macros (#3878)
* video-core: Migrate logging macros

* video-core: Fixed missed clang format

* video-core: Migrated LOG_GENERIC macro
2018-06-29 00:13:30 +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
Markus Wick
10fba63b94 gl_rasterizer: Provide texture buffer offsets.
This allows us to move all data into one TBO.
2018-06-22 17:03:38 +02:00
wwylele
781912e854 gl_rasterize: implement shadow mapping using image load/store 2018-06-01 14:26:44 +03:00
wwylele
f0ee4c0595 gl_rasterizer: reset texture state context after every draw 2018-06-01 12:05:30 +03:00
Markus Wick
caba02d42a gl_rasterizer: Don't flip the texture bindings.
The state object isn't used anywhere else, so there
is no need to revert the state.
And the comment is just wrong: It doesn't matter
which textures are bound on framebuffer binding, it
only matters at draw time. And we reset all bindings
before the draw call. So let's use gl_state as it is
designed to avoid flipping states.
2018-05-28 21:04:59 +02:00
Markus Wick
301073334a gl_rasterizer: Remove redundant scissor state change.
There is no need to disable this state after the draw call,
gl_state will handle this for us if needed. This kind of
redundant state changes are bad for the driver overhead,
as flipping bits will invalidate the driver state.
2018-05-18 21:13:56 +02: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
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
Weiyi Wang
be5777f3de
Merge pull request #3686 from wwylele/glvtx-shader-gen
gl_shader_gen: generate programmable vs/gs and fixed gs
2018-05-01 21:27:48 +03:00
wwylele
1762ad2dcc gl_rasterizer_cache: cache texture cube 2018-05-01 21:26:43 +03:00
wwylele
191b29e402 gl_shader_gen: generate programmable vs/gs and fixed gs 2018-04-24 20:39:10 +03:00
Markus Wick
5d1dd205c4 renderer_opengl: Rewrite stream buffer. 2018-04-21 16:12:30 +02:00
Weiyi Wang
cb36f9fad2
Merge pull request #3645 from wwylele/shader-manager
renderer_opengl: refactor shader & program objects and add shader manager for rasterizer
2018-04-16 16:38:38 +03:00
wwylele
8dc75598a4 gl_rasterizer: isolate shader management into its own class 2018-04-11 14:52:37 +03:00
wwylele
7e7de7d3ab gl_rasterizer_cache: exit FillTextureCube when address is invalid 2018-04-08 12:34:50 +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
Weiyi Wang
a9544ca015
Merge pull request #3580 from daniellimws/common-fmt
common: Migrate logging macros
2018-04-06 12:38:08 +03:00
wwylele
0d84c5a0b6 gl_rasterizer: move state syncing from ctor to its own function 2018-04-04 17:23:55 +03:00
wwylele
c2719feda2 gl_rasterizer: move shader uniform sync from SetShader() to ctor 2018-04-03 09:27:23 +03:00