Fixed a bug with readback_resolve and readback_memexport that was responsible for a large portion of their overhead. readback_memexport and resolve are now usable for games, depending on your hardware. in my case games that were slideshows now run at like 20-30 fps, and my hardware isnt the best for xenia.
add split_map class for mapping keys to values in a way that optimizes for frequent searches and infrequent insertions/removals remove jump table implementation of GetColorRenderTargetFormatComponentCount, it was appearing relatively high in profiles. instead pack the component counts into a single 32 bit word, which is indexed by shifting Add cvar to align all basic blocks to a boundary Add mmio aware load paths liberally apply XE_RESTRICT in ringbuffer related code Removed the IS_TRUE and IS_FALSE opcodes, they were pointless duplicates of COMPARE_EQ/COMPARE_NE and i want to simplify our set of opcodes for future backends More work on LVSR/LVSL/STVR/STVL opcodes Optimized X64 translated code emission, now only compute instrkey once Add code for pre-computing integer division magic numbers Optimized GetHostViewportInfo a little Move args for GetHostViewportInfo into a class, cache the result and compare for future queries. moved GetHostViewportInfo far lower on the profile Add (currently not functional, and very racy) asynchronous memcpy code. will improve it and actually use it in future commits. Add non-temporal memcpy function for huge page-aligned allocations. Used for copying to shared memory/readback hoist are_accumulated_render_targets_valid_ check out of loop in render_target_cache already bound check. Add stosb/movsb code for small constant memcpys/memsets that arent worth the overhead of memcpy/memset
This commit is contained in:
@@ -19,6 +19,7 @@
|
||||
|
||||
#include "xenia/base/assert.h"
|
||||
#include "xenia/base/hash.h"
|
||||
#include "xenia/base/math.h"
|
||||
#include "xenia/base/mutex.h"
|
||||
#include "xenia/gpu/register_file.h"
|
||||
#include "xenia/gpu/shared_memory.h"
|
||||
@@ -70,6 +71,14 @@ class TextureCache {
|
||||
static bool GetConfigDrawResolutionScale(uint32_t& x_out, uint32_t& y_out);
|
||||
uint32_t draw_resolution_scale_x() const { return draw_resolution_scale_x_; }
|
||||
uint32_t draw_resolution_scale_y() const { return draw_resolution_scale_y_; }
|
||||
|
||||
divisors::MagicDiv draw_resolution_scale_x_divisor() const {
|
||||
return draw_resolution_scale_x_divisor_;
|
||||
}
|
||||
divisors::MagicDiv draw_resolution_scale_y_divisor() const {
|
||||
return draw_resolution_scale_y_divisor_;
|
||||
}
|
||||
|
||||
bool IsDrawResolutionScaled() const {
|
||||
return draw_resolution_scale_x_ > 1 || draw_resolution_scale_y_ > 1;
|
||||
}
|
||||
@@ -576,8 +585,8 @@ class TextureCache {
|
||||
|
||||
// Shared memory callback for texture data invalidation.
|
||||
static void WatchCallback(const global_unique_lock_type& global_lock,
|
||||
void* context,
|
||||
void* data, uint64_t argument, bool invalidated_by_gpu);
|
||||
void* context, void* data, uint64_t argument,
|
||||
bool invalidated_by_gpu);
|
||||
|
||||
// Checks if there are any pages that contain scaled resolve data within the
|
||||
// range.
|
||||
@@ -588,14 +597,15 @@ class TextureCache {
|
||||
const global_unique_lock_type& global_lock, void* context,
|
||||
uint32_t address_first, uint32_t address_last, bool invalidated_by_gpu);
|
||||
void ScaledResolveGlobalWatchCallback(
|
||||
const global_unique_lock_type& global_lock,
|
||||
uint32_t address_first, uint32_t address_last, bool invalidated_by_gpu);
|
||||
const global_unique_lock_type& global_lock, uint32_t address_first,
|
||||
uint32_t address_last, bool invalidated_by_gpu);
|
||||
|
||||
const RegisterFile& register_file_;
|
||||
SharedMemory& shared_memory_;
|
||||
uint32_t draw_resolution_scale_x_;
|
||||
uint32_t draw_resolution_scale_y_;
|
||||
|
||||
divisors::MagicDiv draw_resolution_scale_x_divisor_;
|
||||
divisors::MagicDiv draw_resolution_scale_y_divisor_;
|
||||
static const LoadShaderInfo load_shader_info_[kLoadShaderCount];
|
||||
|
||||
xe::global_critical_region global_critical_region_;
|
||||
|
||||
Reference in New Issue
Block a user