bunnei
10118c71e0
memory: Simplify rasterizer cache operations.
7 years ago
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
7 years ago
bunnei
2eaf6c41a4
gpu: Use host address for caching instead of guest address.
7 years ago
ReinUsesLisp
ffe2e50458
video_core/morton: Use enum to describe MortonCopyPixels128 mode
7 years ago
ReinUsesLisp
6ed6129b4f
video_core/morton: Remove unused parameter in MortonSwizzle
7 years ago
ReinUsesLisp
9030a8259f
video_core/morton: Remove clang-format off when it's not needed
7 years ago
ReinUsesLisp
fdf76a25ab
video_core/morton: Remove unused functions
7 years ago
ReinUsesLisp
a63295a872
video_core/texture: Fix up sampler lod bias
7 years ago
Mat M
a3734d7e31
vk_sampler_cache: Use operator== instead of memcmp
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
7 years ago
ReinUsesLisp
aa59d77c3b
vk_sampler_cache: Implement a sampler cache
7 years ago
ReinUsesLisp
8ebeb9ade2
video_core/texture: Add a raw representation of TSCEntry
7 years ago
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.
7 years ago
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.
7 years ago
ReinUsesLisp
a6c048920e
gl_rasterizer: Use system instance passed from argument
7 years ago
ReinUsesLisp
a0be7b3b92
gl_rasterizer: Encapsulate sampler queries into methods
7 years ago
ReinUsesLisp
6ee0ba64c8
gl_rasterizer: Minor logger changes
7 years ago
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.
7 years ago
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.
7 years ago
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.
7 years ago
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.
7 years ago
bunnei
84ad81ee67
gpu_thread: Fix deadlock with threading idle state check.
7 years ago
bunnei
63aa08acbe
gpu_thread: (HACK) Ignore flush on FlushAndInvalidateRegion.
7 years ago
bunnei
3f1b4fb23a
gpu: Always flush.
7 years ago
bunnei
aaa373585c
gpu: Refactor a/synchronous implementations into their own classes.
7 years ago
bunnei
7b574f406b
gpu: Move command processing to another thread.
7 years ago
bunnei
ac51d048a9
gpu: Refactor command and swap buffers interface for asynch.
7 years ago
bunnei
4483089d70
gpu: Refactor to take RendererBase instead of RasterizerInterface.
7 years ago
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.
7 years ago
Lioncash
42085ff110
video_core/surface: Remove obsolete TODO in PixelFormatFromRenderTargetFormat()
This isn't needed anymore, according to Hexagon
7 years ago
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.
7 years ago
ReinUsesLisp
1f6571b3de
maxwell_to_vk: Initial implementation
7 years ago
ReinUsesLisp
8e84e81e74
vk_buffer_cache: Fix clang-format
7 years ago
bunnei
ab70c2583d
fuck git for ruining my day, I will learn but I will not forgive
7 years ago
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.
7 years ago
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.
7 years ago
ReinUsesLisp
bb3ab7d66c
gl_state: Fixup multibind bug
7 years ago
Fernando Sahmkow
7ea097e5c2
Devirtualize Register/Unregister and use a wrapper instead.
7 years ago
Fernando Sahmkow
5a9204dbd7
Corrections and redesign.
7 years ago
Fernando Sahmkow
d6b9b51606
Fix linux compile error.
7 years ago
Fernando Sahmkow
e64fa4d2ea
Remove NotifyFrameBuffer as we are doing a texception pass every drawcall.
7 years ago
Fernando Sahmkow
3558c88442
Remove certain optimizations that caused texception to fail in certain scenarios.
7 years ago
Fernando Sahmkow
e9d84ef22c
Bug fixes and formatting
7 years ago
Fernando Sahmkow
5bc82d124c
rasterizer_cache_gl: Implement Texception Pass
7 years ago
Fernando Sahmkow
8932001610
rasterizer_cache_gl: Implement Partial Reinterpretation of Surfaces.
7 years ago
Fernando Sahmkow
44ea2810e4
rasterizer_cache: mark reinterpreted surfaces and add ability to reload marked surfaces on next use.
7 years ago
Fernando Sahmkow
d583fc1e97
rasterizer_cache_gl: Notify on framebuffer change
7 years ago
Fernando Sahmkow
45b6d2d349
rasterizer_cache: Expose FlushObject to Child classes and allow redefining of Register and Unregister
7 years ago
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.
7 years ago
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.
7 years ago
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.
7 years ago