bunnei
65db8f5f47
gl_rasterizer: Skip zero addr/sized regions on flush/invalidate.
7 years ago
bunnei
ee8ae39de5
memory: Simplify rasterizer cache operations.
7 years ago
bunnei
d3f26c1546
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
7fccfc3ee7
gpu: Use host address for caching instead of guest address.
7 years ago
ReinUsesLisp
7db0e52458
video_core/morton: Use enum to describe MortonCopyPixels128 mode
7 years ago
ReinUsesLisp
91423268d3
video_core/morton: Remove unused parameter in MortonSwizzle
7 years ago
ReinUsesLisp
0c17b26ef8
video_core/morton: Remove clang-format off when it's not needed
7 years ago
ReinUsesLisp
369409d4f7
video_core/morton: Remove unused functions
7 years ago
ReinUsesLisp
3288b12a28
video_core/texture: Fix up sampler lod bias
7 years ago
Mat M
0dfdec8949
vk_sampler_cache: Use operator== instead of memcmp
Co-Authored-By: ReinUsesLisp <reinuseslisp@airmail.cc>
7 years ago
ReinUsesLisp
a9c05dfcd7
vk_sampler_cache: Implement a sampler cache
7 years ago
ReinUsesLisp
1fc1607e10
video_core/texture: Add a raw representation of TSCEntry
7 years ago
Lioncash
ca1cb6bef4
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
b7e2370601
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
8f48835a8e
gl_rasterizer: Use system instance passed from argument
7 years ago
ReinUsesLisp
d949475417
gl_rasterizer: Encapsulate sampler queries into methods
7 years ago
ReinUsesLisp
75fa32b772
gl_rasterizer: Minor logger changes
7 years ago
ReinUsesLisp
81ff2a51ad
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
8e1dbd7c45
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
6f95564b38
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
bd263e75cc
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
01e509662d
gpu_thread: Fix deadlock with threading idle state check.
7 years ago
bunnei
4633fda5be
gpu_thread: (HACK) Ignore flush on FlushAndInvalidateRegion.
7 years ago
bunnei
fbcb9e6815
gpu: Always flush.
7 years ago
bunnei
83079031b3
gpu: Refactor a/synchronous implementations into their own classes.
7 years ago
bunnei
9d1ee628b2
gpu: Move command processing to another thread.
7 years ago
bunnei
edf09ff450
gpu: Refactor command and swap buffers interface for asynch.
7 years ago
bunnei
1e27162275
gpu: Refactor to take RendererBase instead of RasterizerInterface.
7 years ago
Lioncash
f596ce7887
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
e45b6f69ea
video_core/surface: Remove obsolete TODO in PixelFormatFromRenderTargetFormat()
This isn't needed anymore, according to Hexagon
7 years ago
Lioncash
7c12a4035e
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
6bd70e39c5
maxwell_to_vk: Initial implementation
7 years ago
ReinUsesLisp
4da24b3629
vk_buffer_cache: Fix clang-format
7 years ago
bunnei
2695a15e47
fuck git for ruining my day, I will learn but I will not forgive
7 years ago
ReinUsesLisp
d376a3fd11
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
c97a3d0eb4
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
6c8e8383af
gl_state: Fixup multibind bug
7 years ago
Fernando Sahmkow
6c290d747b
Devirtualize Register/Unregister and use a wrapper instead.
7 years ago
Fernando Sahmkow
5a6f9f7cd7
Corrections and redesign.
7 years ago
Fernando Sahmkow
e690d9e961
Fix linux compile error.
7 years ago
Fernando Sahmkow
b7678a6f39
Remove NotifyFrameBuffer as we are doing a texception pass every drawcall.
7 years ago
Fernando Sahmkow
27cad95c5b
Remove certain optimizations that caused texception to fail in certain scenarios.
7 years ago
Fernando Sahmkow
d9ca40fa90
Bug fixes and formatting
7 years ago
Fernando Sahmkow
3cb88587ea
rasterizer_cache_gl: Implement Texception Pass
7 years ago
Fernando Sahmkow
263c936e40
rasterizer_cache_gl: Implement Partial Reinterpretation of Surfaces.
7 years ago
Fernando Sahmkow
0c640275fa
rasterizer_cache: mark reinterpreted surfaces and add ability to reload marked surfaces on next use.
7 years ago
Fernando Sahmkow
785d97ac41
rasterizer_cache_gl: Notify on framebuffer change
7 years ago
Fernando Sahmkow
25d0fe7875
rasterizer_cache: Expose FlushObject to Child classes and allow redefining of Register and Unregister
7 years ago
ReinUsesLisp
cd0f137b61
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
3f0ed32450
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