Marshall Mohror
688e44bc8b
videocore/renderer_opengl/gl_rasterizer_cache: Move bits per pixel table out of function ( #5101 )
...
* videocore/renderer_opengl/gl_rasterizer_cache: Move bits per pixel table out of function
GCC and MSVC copy the table at runtime with the old implementation, which is wasteful and prevents inlining. Unfortunately, static constexpr variables are not legal in constexpr functions, so the table has to be external.
Also replaced non-standard assert with DEBUG_ASSERT_MSG.
* fix case of table name in assert
* set table to private
2020-02-22 14:37:42 -07:00
James Rowe
55c75b5e3e
Add ClearAll to rasterizer cache for fully wiping the cache on save/load
2020-02-13 17:42:11 +08:00
Hamish Milne
0effb229cd
Fix geometry pipeline; attempt to fix motion controls
2020-02-13 17:42:10 +08:00
Hamish Milne
b2370ea353
Fixed setting the right DSP service on deserialization
2020-02-13 17:42:10 +08:00
Hamish Milne
558e710e17
Finished archives; remove pod.h
2020-02-13 17:41:26 +08:00
Hamish Milne
9877bf7d48
Change how the boost target works; disable external warnings in MSVC
2020-02-13 17:41:20 +08:00
Hamish Milne
7b846ffa98
clang-format fixes
2020-02-13 17:39:15 +08:00
Hamish Milne
3ed8d95866
Serialize FS service; some compiler fixes
2020-02-13 17:38:24 +08:00
Hamish Milne
3e752002c4
Replace g_kernel with Core::Global etc.
2020-02-13 17:38:21 +08:00
Hamish Milne
050c3bdee5
Serialize primitive_assembly
2020-02-13 17:38:18 +08:00
Hamish Milne
c284192a87
Serialize geometry_pipeline
2020-02-13 17:38:17 +08:00
Hamish Milne
acc89b2251
Fixed an include
2020-02-13 17:38:17 +08:00
Hamish Milne
dc0d1ebc95
Added a TODO
2020-02-13 17:38:17 +08:00
Hamish Milne
f79c9668a3
Added shader state; WIP kernel objects
2020-02-13 17:38:10 +08:00
Hamish Milne
45788b9c82
Added shader state serialization
2020-02-13 17:34:16 +08:00
Hamish Milne
6f00976ab5
video_core serialization
2020-02-13 17:34:16 +08:00
James Rowe
bd29261e0a
Frontend: Only load disk resources if hw shader is enabled
2020-01-22 09:47:53 -07:00
vitor-k
89cab445d4
Implementation of screen rotation without use of additional layouts.
...
This is based on what was done using additional layouts, but modified
to have a variable to control rotation and making it so Single Screen
Layout behaves like Upright Single would, and Default Layout behaves
like Upright Double would, when the new variable is used.
Large Layout and Side Layout currently ignore the new variable.
New variable still currently doesn't have a hotkey.
2020-01-20 22:31:51 -03:00
James Rowe
e74a402c69
Merge pull request #4923 from jroweboy/diskcachelul
...
Disk Shader Caching
2020-01-17 18:15:50 -07:00
iwubcode
43f8aadd52
renderer_opengl: Allow usage of interlaced 3D
2020-01-16 22:12:50 -06: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
6945b6539f
Address review and update zstd
2020-01-15 19:58:34 -07:00
James Rowe
936094dd27
Log the number of entries in each cache
2020-01-15 19:58:34 -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
a20c81d593
Change VFS vector to regular vector
2020-01-15 19:58:34 -07:00
James Rowe
4e9ec4efd0
Add shader disk caching
2020-01-15 19:58:33 -07:00
James Rowe
f369196c9f
Remove wait for free buffer
...
Previously we would first attempt to use any buffer that was free,
meaning whichever buffer has already been displayed. This has poor
interactions when the operating system throttles the update rate of the
window, so if there isn't any free buffers available, just reuse the
oldest frame instead.
2019-12-16 20:02:01 -07:00
James Rowe
439d550850
Merge pull request #4940 from jroweboy/presentation-thread
...
Split Presentation thread from Render thread
2019-12-15 20:25:34 -07:00
James Rowe
30dfe1fcb8
Use the correct register length for index_array
...
The index_array can't possible be 31 bits long as that would index
out of bounds memory. According to 3dbrew, this should be 28
2019-12-13 18:08:07 -07:00
James Rowe
65613cce81
Add microprofile scopes for presentation
2019-12-02 18:59:12 -07:00
BreadFish64
e38b4f6707
video_core: get rid of MSVC hack comment
2019-11-17 17:42:19 -06: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
26d828fb4c
Prevent softlock on shutdown and various cleanup
2019-11-09 13:12:29 -07:00
James Rowe
9c32c0b98b
Change from render to texture to render to renderbuffer
2019-11-09 13:12:29 -07:00
James Rowe
52d7676831
recreate mailbox to use a queue instead
2019-11-09 13:12:29 -07:00
James Rowe
ac90cd0378
Change Present to finish only after swap
2019-11-09 13:12:29 -07:00
James Rowe
27d0fc64d0
Add texture mailbox support to opengl renderer.
2019-11-09 13:10:17 -07:00
Khangaroo
df99d98240
specify size of buffer and use openglstate in getteximageoes
2019-11-09 12:58:17 -07:00
khang06
a458155f99
texture dump hotkey (ctrl+d)
...
address more comments
2019-11-09 12:56:30 -07:00
Khangaroo
5450d4980d
crash hotfix (no clang-format because on phone)
...
hotfix 2: check if the texture is custom before dumping
hotfix 4: fix custom texture conflict detection
2019-11-09 12:56:28 -07:00
Khangaroo
ae4aaf2fc1
nested folder support + refuse to load incompatibly sized textures + general cleanups
2019-11-09 12:56:27 -07:00
Khangaroo
8a98310a16
address more comments, fix dumping textures that already got dumped
2019-11-09 12:56:27 -07:00
Khangaroo
c2a32e942b
address more comments
2019-11-09 12:56:27 -07:00
Khangaroo
650fe6447d
generate mipmaps (for now)
2019-11-09 12:56:27 -07:00
Khangaroo
f09489475a
fix texture dumping on opengl es, create load folder if none exists if custom textures is enabled
2019-11-09 12:56:27 -07:00
Khangaroo
254f8a4643
fix inverted texture dump error message path
2019-11-09 12:56:27 -07:00
Khangaroo
8b881ac1fc
fix preload textures being enabled when it shouldn't
...
address more comments
2019-11-09 12:56:25 -07:00
Khangaroo
391e552927
qimageinterface fixes, remove old lodepng, address more comments
2019-11-09 12:56:24 -07:00
Khangaroo
b81c15941e
add image interface, remove lodepng from video_core/core, address more comments, fix comments
...
remove unnecessary conversion
2019-11-09 12:56:21 -07:00
Khangaroo
5940361b81
new-line that clang-format didn't fix
...
address some comments
2019-11-09 12:56:17 -07:00
Khangaroo
59b475a4b9
implement custom texture preload
2019-11-09 12:56:17 -07:00
Khangaroo
657a129b60
handle upscaling and offsets (fixes oot3d)
2019-11-09 12:54:43 -07:00
Khangaroo
6d90c42a79
fix crashes, add custom texture cache, load textures from load directory
2019-11-09 12:54:40 -07:00
Khangaroo
f866b2a917
texture replacement (also messy)
2019-11-09 12:53:16 -07:00
khang06
deff865ac9
initial sloppy texture dumping implementation (opengl only)
2019-11-09 12:53:16 -07:00
khang06
2b92065d2a
add lodepng as an external, have video_core depend on it
2019-11-09 12:48:23 -07:00
James Rowe
c1d3b5e61c
Merge pull request #4934 from vitor-k/boost_remnant
...
Remove boost headers not currently used
2019-09-18 10:57:37 -06:00
BreadFish64
d0decf2166
remove ugly msvc hack
...
the bug appears to be fixed so there's no reason to keep this around
2019-09-15 22:35:21 -05:00
vitor-k
147a7f0dec
Remove boost headers not currently used
2019-09-15 15:18:38 -03:00
Pengfei Zhu
4bc22aa350
Merge pull request #4918 from vitor-k/warnings
...
Silence warnings from unused code and mismatched declaration
2019-09-06 22:08:06 +08:00
vitor-k
61f9710d95
remove unused call to nodiscard function
2019-09-05 17:11:38 -03:00
Weiyi Wang
dd3ba7bd21
opengl: remove hw geometry shader related stuff
2019-08-18 20:07:50 -04:00
Weiyi Wang
b4d45b57c7
Merge pull request #4879 from tywald/accurate-gs-on
...
Remove 'Accurate Geometry Shader' setting
2019-08-18 15:52:45 -04:00
James Rowe
62e6c147ae
Add perf stat logging through ini setting
...
For better tracking of performance regressions on incoming changes, this
change adds a way to dump frametime to file by changing an ini config
option. This is intentionally hidden as its only useful to a small
number of individuals, and not really applicable to the general
userbase.
2019-08-14 21:17:27 -06:00
zhupengfei
0224ae13c4
video_core: Implement frame dumping
...
Two PBOs are used to speed up pixel copying process. To avoid getting the wrong speed/FPS, a new parameter is added to DrawScreens about whether to increase the frame count.
2019-08-13 19:28:04 +08:00
zhupengfei
778cc68114
renderer_base: Add prepare/cleanup function interface
...
This should be called by the video dumper backend to tell the video core to create necessary buffers/storage, etc.
2019-08-13 19:28:04 +08:00
tywald
aad8261534
Remove 'Accurate Geometry Shader' setting, default behavior is as it was turned on.
2019-08-12 02:55:14 +02: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
xperia64
8131bd32e3
renderer_opengl: Add support for custom shaders ( #4578 )
...
* Add Anaglyph 3D
Change 3D slider in-game
Change shaders while game is running
Move shader loading into function
Disable 3D slider setting when stereoscopy is off
The rest of the shaders
Address review issues
Documentation and minor fixups
Forgot clang-format
Fix shader release on SDL2-software rendering
Remove unnecessary state changes
Respect 3D factor setting regardless of stereoscopic rendering
Improve shader resolution passing
Minor setting-related improvements
Add option to toggle texture filtering
Rebase fixes
* One final clang-format
* Fix OpenGL problems
2019-08-09 20:00:47 +02:00
weihuoya
899e3eb003
minor fix for opengles
2019-07-28 21:18:38 +08:00
Weiyi Wang
909d04ddea
Remove unused stuff
...
Some unused variables are still kept in services, as they are parameters passed from the command buffer and might be used in the future
2019-07-16 20:27:03 -04:00
Weiyi Wang
99136ec592
gl_rasterizer: correct supress_mipmap_for_cube logic
...
The previous version would break when the state changes from (cube=true,mipmap=false) -> (cube=true,mipmap=true)
2019-07-06 08:03:01 -04:00
Weiyi Wang
bb776e25a9
pica: move global shader buffer state into Pica::State ( #4796 )
2019-06-20 00:39:08 +02:00
BreadFish64
aaf496dec7
video_core: change "left + width" to "right" in CanSubRect
...
the constructed rectangle from GetSubRect already has the right info
2019-06-04 17:03:31 -05:00
Aner Torre
4b0ce1b770
video_core: Fix fragment_shader compilation failure due to different type variable multiplication
2019-05-19 14:45:41 +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
Weiyi Wang
0ec45f694c
Merge pull request #3910 from wwylele/mipmap
...
gl_rasterizer: implement mipmap by forwarding PICA mipmap configuration
2019-04-17 14:10:42 -04:00
Weiyi Wang
e3b6bf93bc
gl_rasterizer_cache: validate surface in mipmap/cubemap if the children is not validated yet
2019-04-15 09:07:36 -04:00
Weiyi Wang
4a206237be
Merge pull request #4726 from FearlessTobi/port-2312
...
Port yuzu-emu/yuzu#2312 : "general: Use deducation guides for std::lock_guard and std::unique_lock"
2019-04-13 18:00:09 -04:00
Tobias
e9c2b27c68
Merge pull request #4681 from FearlessTobi/port-2188-2190
...
Port yuzu-emu/yuzu#2188 and yuzu-emu/yuzu#2190 : various minor code refactoring changes
2019-04-09 21:18:34 +02:00
Lioncash
21c71d21ae
general: Use deducation guides for std::lock_guard and std::unique_lock
...
Since C++17, the introduction of deduction guides for locking facilities
means that we no longer need to hardcode the mutex type into the locks
themselves, making it easier to switch mutex types, should it ever be
necessary in the future.
2019-04-07 15:14:29 +02:00
fearlessTobi
d755a15891
fix compilation problems
2019-03-23 12:43:03 +01:00
Weiyi Wang
1f233e4365
Merge pull request #4691 from liushuyu/oes_fix
...
video_core: renderer_opengl: gles color fix
2019-03-18 19:01:13 -04:00
xperia64
fa0919915c
Fix GLES version header on picky drivers
2019-03-15 23:32:29 +00:00
liushuyu
71b0eab85c
video_core: renderer_opengl: addressed comments...
...
use indexing to make code more concise; use const bool instead of bool
2019-03-14 10:58:29 -06:00
liushuyu
476df9debf
video_core: renderer_opengl: addressed comments...
...
... removed incorrect comments and removed incorrect value calculations
2019-03-13 19:17:29 -06:00
liushuyu
164eb100eb
video_core: renderer_opengl: addressed comments...
...
... removed redundant comments and removed incorrect value assignments
2019-03-12 22:56:11 -06:00
liushuyu
3983b12086
video_core: renderer_opengl: gles color fix
2019-03-12 22:28:54 -06:00
Weiyi Wang
88a011ec8e
GetTextureSurface: return on invalid physical address early
...
Previously this check is in GetSurface (if (addr == 0)). This worked fine because GetTextureSurface directly forwarded the address value to GetSurface. However, now with mipmap support, GetTextureSurface would call GetSurface several times with different address offset, resulting some >0 but still invalid address in case the input is 0. We should error out early on invalid address instead of sending it furthor down which would cause invalid memory access
2019-03-10 11:06:08 -04:00
wwylele
ebdef4fd69
gl_rasterizer_cache: unlink watchers if surface is moved to remove_surfaces but is not immediately removed
2019-03-08 09:37:25 -05:00
wwylele
777af04f4a
gl_rasterizer: ignore mipmap setting for cubemap before we implements it
2019-03-08 09:37:25 -05:00
wwylele
d7196b5573
gl_rasterizer_cache: invalidate watchers on (partial) surface invalidation
2019-03-08 09:37:25 -05:00
wwylele
fa141c799b
gl_shader_gen: use accurate LOD formula for texture 2D
2019-03-08 09:37:25 -05:00
wwylele
ca78d34933
gl_rasterizer: implement mipmap
2019-03-08 09:37:24 -05:00