Lioncash
a5fa4b311e
video_core: Amend constructor initializer list order where applicable
...
Specifies the members in the same order that initialization would take
place in.
This also silences -Wreorder warnings.
2019-03-27 12:37:53 -04:00
Lioncash
bbe700359d
video_core: Add missing override specifiers
...
Ensures that the signatures will always match with the base class.
Also silences a few compilation warnings.
2019-03-27 12:24:52 -04:00
Lioncash
e36f1a5ba9
video_core/gpu: Amend typo in GPU member variable name
...
smaphore -> semaphore
2019-03-27 12:12:57 -04:00
bunnei
e5893db3e6
Merge pull request #2256 from bunnei/gpu-vmm
...
gpu: Rewrite MemoryManager based on the VMManager implementation.
2019-03-22 18:41:12 -04:00
bunnei
d0dddb3e9d
Revert "Devirtualize Register/Unregister and use a wrapper instead."
...
- Fixes graphical issues from transitions in Super Mario Odyssey.
2019-03-21 21:56:56 -04:00
bunnei
2117edd0f8
memory_manager: Cleanup FindFreeRegion.
2019-03-20 23:12:28 -04:00
bunnei
5a5fccaa23
memory_manager: Use Common::AlignUp in public interface as needed.
2019-03-20 22:58:49 -04:00
bunnei
72837e4b3d
memory_manager: Bug fixes and further cleanup.
2019-03-20 22:36:03 -04:00
bunnei
19330f45d3
maxwell_dma: Check for valid source in destination before copy.
...
- Avoid a crash in Octopath Traveler.
2019-03-20 22:36:03 -04:00
bunnei
197dcf0b5e
memory_manager: Add protections for invalid GPU addresses.
...
- Avoid a crash in Xenoblade Chronicles 2.
2019-03-20 22:36:03 -04:00
bunnei
21eb4cfa7f
gl_rasterizer_cache: Check that backing memory is valid before creating a surface.
...
- Fixes a crash in Puyo Puyo Tetris.
2019-03-20 22:36:02 -04:00
bunnei
22d3dfbcd4
gpu: Rewrite virtual memory manager using PageTable.
2019-03-20 22:36:02 -04:00
bunnei
241563d15c
gpu: Move GPUVAddr definition to common_types.
2019-03-20 22:36:02 -04:00
bunnei
032e4c4ca3
gl_rasterizer: Skip zero addr/sized regions on flush/invalidate.
2019-03-16 22:03:19 -04:00
bunnei
2392e146b0
Merge pull request #2244 from bunnei/gpu-mem-refactor
...
video_core: Refactor to use MemoryManager interface for all memory access.
2019-03-16 21:59:45 -04:00
bunnei
10118c71e0
memory: Simplify rasterizer cache operations.
2019-03-16 00:41:08 -04:00
bunnei
574e89d924
video_core: Refactor to use MemoryManager interface for all memory access.
...
# Conflicts:
# src/video_core/engines/kepler_memory.cpp
# src/video_core/engines/maxwell_3d.cpp
# src/video_core/morton.cpp
# src/video_core/morton.h
# src/video_core/renderer_opengl/gl_global_cache.cpp
# src/video_core/renderer_opengl/gl_global_cache.h
# src/video_core/renderer_opengl/gl_rasterizer_cache.cpp
2019-03-16 00:38:48 -04:00
bunnei
2eaf6c41a4
gpu: Use host address for caching instead of guest address.
2019-03-14 22:34:42 -04:00
bunnei
84d3cdf7d7
Merge pull request #2233 from ReinUsesLisp/morton-cleanup
...
video_core/morton: Miscellaneous changes
2019-03-14 21:23:12 -04:00
bunnei
6788ebffc8
Merge pull request #2229 from ReinUsesLisp/vk-sampler-cache
...
vk_sampler_cache: Implement a sampler cache
2019-03-14 21:22:34 -04:00
bunnei
8bd17aa044
Merge pull request #2216 from ReinUsesLisp/rasterizer-system
...
gl_rasterizer: Use system instance passed from argument
2019-03-14 16:37:05 -04:00
bunnei
4e6c667586
Merge pull request #2227 from lioncash/override
...
renderer_opengl/gl_global_cache: Add missing override specifiers
2019-03-13 17:05:49 -04:00
ReinUsesLisp
ffe2e50458
video_core/morton: Use enum to describe MortonCopyPixels128 mode
2019-03-13 16:35:21 -03:00
ReinUsesLisp
6ed6129b4f
video_core/morton: Remove unused parameter in MortonSwizzle
2019-03-13 16:35:10 -03:00
ReinUsesLisp
9030a8259f
video_core/morton: Remove clang-format off when it's not needed
2019-03-13 16:16:45 -03:00
ReinUsesLisp
fdf76a25ab
video_core/morton: Remove unused functions
2019-03-13 16:15:54 -03:00
ReinUsesLisp
a63295a872
video_core/texture: Fix up sampler lod bias
2019-03-13 00:45:54 -03:00
Mat M
a3734d7e31
vk_sampler_cache: Use operator== instead of memcmp
...
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
2019-03-12 21:05:36 -03:00
ReinUsesLisp
aa59d77c3b
vk_sampler_cache: Implement a sampler cache
2019-03-12 20:20:57 -03:00
ReinUsesLisp
8ebeb9ade2
video_core/texture: Add a raw representation of TSCEntry
2019-03-12 16:56:29 -03:00
bunnei
2ad44a453f
Merge pull request #2215 from ReinUsesLisp/samplers
...
gl_rasterizer: Encapsulate sampler queries into methods
2019-03-12 13:10:53 -04:00
Lioncash
3350c0a779
renderer_opengl/gl_global_cache: Replace indexing for assignment with insert_or_assign
...
The previous code had some minor issues with it, really not a big deal,
but amending it is basically 'free', so I figured, "why not?".
With the standard container maps, when:
map[key] = thing;
is done, this can cause potentially undesirable behavior in certain
scenarios. In particular, if there's no value associated with the key,
then the map constructs a default initialized instance of the value
type.
In this case, since it's a std::shared_ptr (as a type alias) that is
the value type, this will construct a std::shared_pointer, and then
assign over it (with objects that are quite large, or actively heap
allocate this can be extremely undesirable).
We also make the function take the region by value, as we can avoid a
copy (and by extension with std::shared_ptr, a copy causes an atomic
reference count increment), in certain scenarios when ownership isn't a
concern (i.e. when ReserveGlobalRegion is called with an rvalue
reference, then no copy at all occurs). So, it's more-or-less a "free"
gain without many downsides.
2019-03-11 12:20:35 -04:00
Lioncash
1070c020db
renderer_opengl/gl_global_cache: Append missing override specifiers
...
Two of the functions here are overridden functions, so we can append
these specifiers to make it explicit.
2019-03-11 12:02:30 -04:00
ReinUsesLisp
a6c048920e
gl_rasterizer: Use system instance passed from argument
2019-03-11 03:17:21 -03:00
bunnei
633ce92908
Merge pull request #2147 from ReinUsesLisp/texture-clean
...
shader_ir: Remove "extras" from the MetaTexture
2019-03-10 17:28:36 -04:00
bunnei
4a84921b31
Merge pull request #2143 from ReinUsesLisp/texview
...
gl_rasterizer_cache: Create texture views for array discrepancies
2019-03-10 17:27:49 -04:00
ReinUsesLisp
a0be7b3b92
gl_rasterizer: Encapsulate sampler queries into methods
2019-03-09 04:35:57 -03:00
ReinUsesLisp
6ee0ba64c8
gl_rasterizer: Minor logger changes
2019-03-09 03:34:49 -03:00
bunnei
160fc63c72
Merge pull request #2209 from lioncash/reorder
...
video_core/gpu_thread: Silence a -Wreorder warning
2019-03-08 12:04:26 -05:00
bunnei
78c803b4f3
Merge pull request #2208 from lioncash/gpu
...
video_core/gpu: Make GPU's destructor virtual
2019-03-08 12:03:58 -05:00
bunnei
1143923cdd
Merge pull request #2191 from ReinUsesLisp/maxwell-to-vk
...
maxwell_to_vk: Initial implementation
2019-03-08 11:51:08 -05:00
ReinUsesLisp
e7ac5a6adf
dma_pusher: Store command_list_header by copy
...
Instead of holding a reference that will get invalidated by
dma_pushbuffer.pop(), hold it as a copy. This doesn't have any
performance cost since CommandListHeader is 8 bytes long.
2019-03-08 04:06:54 -03:00
Lioncash
c2d4c8b95e
video_core/gpu_thread: Remove unimplemented WaitForIdle function prototype
...
This function didn't have a definition, so we can remove it to prevent
accidentally attempting to use it.
2019-03-07 16:08:52 -05:00
Lioncash
48a461a629
video_core/gpu_thread: Amend constructor initializer list order
...
Moves the data members to satisfy the order they're declared as in the
constructor initializer list.
Silences a -Wreorder warning.
2019-03-07 16:05:49 -05:00
Lioncash
24e2e601d5
video_core/gpu: Make GPU's destructor virtual
...
Because of the recent separation of GPU functionality into sync/async
variants, we need to mark the destructor virtual to provide proper
destruction behavior, given we use the base class within the System
class.
Prior to this, it was undefined behavior whether or not the destructor
in the derived classes would ever execute.
2019-03-07 15:59:45 -05:00
bunnei
4f352833a5
Merge pull request #2055 from bunnei/gpu-thread
...
Asynchronous GPU command processing
2019-03-07 10:41:53 -05:00
bunnei
076c76f4e4
Merge pull request #2149 from ReinUsesLisp/decoders-style
...
gl_rasterizer_cache: Move format conversion functions to their own file
2019-03-06 21:56:20 -05:00
bunnei
84ad81ee67
gpu_thread: Fix deadlock with threading idle state check.
2019-03-06 21:48:57 -05:00
bunnei
63aa08acbe
gpu_thread: (HACK) Ignore flush on FlushAndInvalidateRegion.
2019-03-06 21:48:57 -05:00
bunnei
3f1b4fb23a
gpu: Always flush.
2019-03-06 21:48:57 -05:00
bunnei
aaa373585c
gpu: Refactor a/synchronous implementations into their own classes.
2019-03-06 21:48:57 -05:00
bunnei
7b574f406b
gpu: Move command processing to another thread.
2019-03-06 21:48:57 -05:00
bunnei
d2ff93c319
Merge pull request #2190 from lioncash/ogl-global
...
core: Remove the global telemetry accessor function
2019-03-06 21:41:53 -05:00
bunnei
ac51d048a9
gpu: Refactor command and swap buffers interface for asynch.
2019-03-06 21:09:09 -05:00
bunnei
4483089d70
gpu: Refactor to take RendererBase instead of RasterizerInterface.
2019-03-06 21:09:09 -05:00
bunnei
22f105c06d
Merge pull request #2203 from lioncash/engines-include
...
video_core/engines: Remove unnecessary includes
2019-03-06 10:51:27 -05:00
Lioncash
f9ee0dc7ee
video_core/engines: Remove unnecessary includes
...
Removes a few unnecessary dependencies on core-related machinery, such
as the core.h and memory.h, which reduces the amount of rebuilding
necessary if those files change.
This also uncovered some indirect dependencies within other source
files. This also fixes those.
2019-03-05 20:35:32 -05:00
Lioncash
42085ff110
video_core/surface: Remove obsolete TODO in PixelFormatFromRenderTargetFormat()
...
This isn't needed anymore, according to Hexagon
2019-03-05 10:15:06 -05:00
bunnei
07e13d6728
Merge pull request #2165 from ReinUsesLisp/unbind-tex
...
gl_rasterizer: Unbind textures but don't apply the gl_state
2019-03-04 13:51:59 -05:00
Lioncash
90febaf717
video_core/renderer_opengl: Replace direct usage of global system object accessors
...
We already pass a reference to the system object to the constructor of the renderer,
so we can just use that instead of using the global accessor functions.
2019-03-04 10:24:09 -05:00
ReinUsesLisp
1f6571b3de
maxwell_to_vk: Initial implementation
2019-03-04 04:06:05 -03:00
Mat M
a461e266ea
Merge pull request #2183 from ReinUsesLisp/vk-buffer-cache-clang
...
vk_buffer_cache: Fix clang-format
2019-03-02 14:43:15 -05:00
bunnei
3c39b39bbc
Merge pull request #2182 from bunnei/my-wasted-friday
...
fuck git for ruining my day, I will learn but I will not forgive
2019-03-02 00:57:15 -05:00
ReinUsesLisp
8e84e81e74
vk_buffer_cache: Fix clang-format
2019-03-02 02:16:45 -03:00
bunnei
ab70c2583d
fuck git for ruining my day, I will learn but I will not forgive
2019-03-02 00:01:34 -05:00
ReinUsesLisp
35c105a108
vk_buffer_cache: Implement a buffer cache
...
This buffer cache is just like OpenGL's buffer cache with some minor
style changes. It uses VKStreamBuffer.
2019-03-01 17:33:36 -03:00
ReinUsesLisp
e85066dac7
gl_rasterizer: Remove texture unbinding after dispatching a draw call
...
Unbinding was required when OpenGL delete operations didn't unbind a
resource if it was bound. This is no longer needed and can be removed.
2019-02-28 00:17:50 -03:00
ReinUsesLisp
bb3ab7d66c
gl_state: Fixup multibind bug
2019-02-28 00:17:03 -03:00
bunnei
1b13859af8
Merge pull request #2152 from ReinUsesLisp/vk-stream-buffer
...
vk_stream_buffer: Implement a stream buffer
2019-02-27 21:19:15 -05:00
bunnei
1f5d6a8fed
Merge pull request #2121 from FernandoS27/texception2
...
Improve the Accuracy of the Rasterizer Cache through a Texception Pass
2019-02-27 21:17:55 -05:00
bunnei
66f4fd4c81
Merge pull request #2172 from lioncash/reorder
...
gl_rasterizer/vk_memory_manager: Silence -Wreorder warnings
2019-02-27 21:14:20 -05:00
Fernando Sahmkow
7ea097e5c2
Devirtualize Register/Unregister and use a wrapper instead.
2019-02-27 21:58:50 -04:00
Fernando Sahmkow
5a9204dbd7
Corrections and redesign.
2019-02-27 21:58:49 -04:00
Fernando Sahmkow
d6b9b51606
Fix linux compile error.
2019-02-27 21:58:48 -04:00
Fernando Sahmkow
e64fa4d2ea
Remove NotifyFrameBuffer as we are doing a texception pass every drawcall.
2019-02-27 21:58:47 -04:00
Fernando Sahmkow
3558c88442
Remove certain optimizations that caused texception to fail in certain scenarios.
2019-02-27 21:58:45 -04:00
Fernando Sahmkow
e9d84ef22c
Bug fixes and formatting
2019-02-27 21:58:44 -04:00
Fernando Sahmkow
5bc82d124c
rasterizer_cache_gl: Implement Texception Pass
2019-02-27 21:58:43 -04:00
Fernando Sahmkow
8932001610
rasterizer_cache_gl: Implement Partial Reinterpretation of Surfaces.
2019-02-27 21:58:40 -04:00
Fernando Sahmkow
44ea2810e4
rasterizer_cache: mark reinterpreted surfaces and add ability to reload marked surfaces on next use.
2019-02-27 21:58:39 -04:00
Fernando Sahmkow
d583fc1e97
rasterizer_cache_gl: Notify on framebuffer change
2019-02-27 21:58:37 -04:00
Fernando Sahmkow
45b6d2d349
rasterizer_cache: Expose FlushObject to Child classes and allow redefining of Register and Unregister
2019-02-27 21:57:33 -04:00
bunnei
f15e2dd881
Merge pull request #2163 from ReinUsesLisp/bitset-dirty
...
maxwell_3d: Use std::bitset to manage dirty flags
2019-02-27 20:50:08 -05:00
ReinUsesLisp
27ddbeb01c
gl_rasterizer_cache: Create texture views for array discrepancies
...
When a texture is sampled in a shader with a different array mode than
the cached state, create a texture view and bind that to the shader
instead.
2019-02-27 14:41:06 -03:00
bunnei
66e023fba2
Merge pull request #2167 from lioncash/namespace
...
common: Move Quaternion, Rectangle, Vec2, Vec3, and Vec4 into the Common namespace
2019-02-27 11:19:53 -05:00
Lioncash
16ea93c11e
vk_memory_manager: Reorder constructor initializer list in terms of member declaration order
...
Reorders members in the order that they would actually be initialized
in. Silences a -Wreorder warning.
2019-02-27 11:08:19 -05:00
Lioncash
a6a783b3dc
gl_rasterizer: Reorder constructor initializer list in terms of member declaration order
...
Orders the members in the order they would actually be initialized in.
Silences a -Wreorder warning.
2019-02-27 11:08:19 -05:00
Lioncash
e7eff72e83
gl_shader_disk_cache: Remove #pragma once from cpp file
...
This is only necessary in headers. Silences a warning with clang.
2019-02-27 11:02:49 -05:00
Lioncash
b9238edd0d
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-02-27 03:38:39 -05:00
ReinUsesLisp
0ad3c031f4
gl_rasterizer_cache: Move format conversion to its own file
2019-02-26 20:08:27 -03:00
ReinUsesLisp
0ccd490fcd
decoders: Minor style changes
2019-02-26 20:08:27 -03:00
ReinUsesLisp
d91e35a50a
renderer_opengl: Update pixel format tracking
2019-02-26 03:47:16 -03:00
ReinUsesLisp
5219edd715
maxwell_3d: Use std::bitset to manage dirty flags
2019-02-26 03:01:48 -03:00
ReinUsesLisp
730eb1dad7
vk_stream_buffer: Remove copy code path
2019-02-26 02:09:43 -03:00
ReinUsesLisp
5ca63d0675
shader/decode: Remove extras from MetaTexture
2019-02-26 00:11:30 -03:00
ReinUsesLisp
48e6f77c03
shader/decode: Split memory and texture instructions decoding
2019-02-26 00:11:30 -03:00
Lioncash
c1b2e35625
shader/track: Resolve variable shadowing warnings
2019-02-25 09:10:59 -05:00
bunnei
c07987dfab
Merge pull request #2118 from FernandoS27/ipa-improve
...
shader_decompiler: Improve Accuracy of Attribute Interpolation.
2019-02-24 23:04:22 -05:00
bunnei
c4243c07cc
Merge pull request #2119 from FernandoS27/fix-copy
...
rasterizer_cache_gl: Only do fast layered copy on the same format.
2019-02-24 23:03:52 -05:00
bunnei
90c780e6f3
Merge pull request #2139 from degasus/dma_pusher
...
video_core/dma_pusher: The full list of headers at once.
2019-02-24 04:15:49 -05:00