mirror of
https://git.triforceproject.com/triforce/source
synced 2026-11-27 19:48:49 -04:00
Triforce v0.8.4
Smoother frames and less memory: a compact pipeline cache on NVIDIA, the renderer and game-code profiles, native float in the hot game code, late GPU work left as before. A PC whose NVIDIA shader cache drops the game's gets a driver cache folder of its own. Fixes from the 0.8.3 reports: RenoDX's encoder and tone mapping matched on NVIDIA again; the out-of-memory notice at the next start; no microphone open without a recording device; Evil HD undergrowth kept to 80/120 m; the FG HUD layer keeps what it learned; a stick past 92% is a full push; the DualSense jack read only when used; Linux Save Select, Quit and Restart, and the Linux launcher's sound; the update check uses the program's own version.
This commit is contained in:
@@ -712,8 +712,25 @@ static bool buffer_budget_on() {
|
||||
}();
|
||||
return on;
|
||||
}
|
||||
// ((Triforce, 11-26, diagnostics) RX_VK_LOG_HOST_ALLOCS=1: each host buffer of 1 MB or more made, with its caller (the map
|
||||
// file names it): who holds the allocator's blocks in system memory (1.1 GB at the owner's spot). 2000 lines at most
|
||||
// (the module's base: __ImageBase is the Windows linker's; on Linux the caller's address is logged as it is)
|
||||
#ifdef _WIN32
|
||||
extern "C" char __ImageBase;
|
||||
static const char* host_alloc_base() { return &__ImageBase; }
|
||||
#else
|
||||
static const char* host_alloc_base() { return nullptr; }
|
||||
#endif
|
||||
static void host_alloc_note(const char* kind, uint64_t size, VkBufferUsageFlags usage, const void* caller) {
|
||||
static const bool on = getenv("RX_VK_LOG_HOST_ALLOCS") != nullptr;
|
||||
static std::atomic<int> n{0};
|
||||
if (on && size >= (1u << 20) && n.fetch_add(1) < 2000)
|
||||
logf("vk: host alloc %s %.1f MB usage %#x caller triforce_vk+%llx", kind, size / 1048576.0, (unsigned)usage,
|
||||
(unsigned long long)((const char*)caller - host_alloc_base()));
|
||||
}
|
||||
bool create_buffer(uint64_t size, VkBufferUsageFlags usage, bool host_visible, VkBuffer& buffer,
|
||||
VmaAllocation& allocation, void** mapped, bool dedicated) {
|
||||
if (host_visible) host_alloc_note("visible", size, usage, __builtin_return_address(0));
|
||||
VkBufferCreateInfo bi{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
|
||||
bi.size = size;
|
||||
bi.usage = usage;
|
||||
@@ -748,6 +765,7 @@ bool create_buffer(uint64_t size, VkBufferUsageFlags usage, bool host_visible, V
|
||||
/// threads copy pages into it, the replay reads texture pages out of it and the GPU copies the rest from it)
|
||||
bool create_buffer_cached(uint64_t size, VkBufferUsageFlags usage, VkBuffer& buffer, VmaAllocation& allocation,
|
||||
void** mapped, bool dedicated) {
|
||||
host_alloc_note("cached", size, usage, __builtin_return_address(0));
|
||||
VkBufferCreateInfo bi{VK_STRUCTURE_TYPE_BUFFER_CREATE_INFO};
|
||||
bi.size = size;
|
||||
bi.usage = usage;
|
||||
|
||||
Reference in New Issue
Block a user