* sceAudio3dTerminate
My First Gran Turismo® (CUSA49696) uses this while initializing it's audio system. Without it, the game spams errored sceAudio3dInitialize calls.
* Properly close AudioOut handle
Based on library decompilation.
* renderer_vulkan: Respect provoking vertex setting
* renderer_vulkan: Handle rasterization discard
* renderer_vulkan: Implement logic ops
* renderer_vulkan: Properly implement depth clamp and clip
* renderer_vulkan: Handle line width
* Fix build
* vk_pipeline_cache: Don't check depth clamp without a depth buffer
* liverpool: Fix line control offset
* vk_pipeline_cache: Don't run search if depth clamp is disabled
* vk_pipeline_cache: Allow using viewport range when it's more restrictive then depth clamp
* liverpool: Disable depth clip when near and far planes have different setting
* vk_graphics_pipeline: Move warning to pipeline
* vk_pipeline_cache: Revert viewport check and remove log
* vk_graphics_pipeline: Enable depth clamp when depth clip is disabled and extension is not supported
Without the depth clip extension depth clipping is controlled by depth clamping
* shader_recompiler: Replace buffer pulling with attribute divisor for instance step rates
* flatten_extended_userdata: Remove special step rate buffer handling
* Review comments
* spirv_emit_context: Name all instance rate attribs properly
* spirv: Merge ReadConstBuffer again
template function only has 1 user now
* attribute: Add missing attributes
* translate: Reimplement step rate instance id
* Resolve validation warnings
* shader_recompiler: Separate vertex inputs from LS stage, cleanup tess
* buffer_cache: Handle inline data to flexible memory
* control_flow: Fix single instruction scopes edge case
Fixes the following pattern
v_cmpx_gt_u32 cond
buffer_store_dword value
.LABEL:
Before
buffer[index] = value;
After
if (cond)
{
buffer[index] = value;
}
* vector_memory: Handle soffset when offen is false
When offen is not used we can substitute the offset argument with soffset and have it handled correctly
* scalar_alu: Handle sharp moves with S_MOV_B64
This fixes unable to track sharp errors when this pattern is used in a shader
* emulator: Add log
* video_core: Bump binary info search range and buffer num
* buffer_cache: Bring back upload batching and temporary buffer
Because that PR fused the write and read protections under a single function call, it was a requirement to move the actual memory copy part inside the lambda to perform it before the read protection kicks in. However on certain large data transfers it had potential for data corruption. If, for example, an upload had two copies, a 400MB and a 300MB one, the first one would fit in the staging buffer, very likely with an induced stall. However the second one wouldn't have space to fit alongside the other data, but it's also small enough for the buffer to fit it, so the staging buffer would cause a flush and wait to copy it, overwriting the previous transfer.
To address this the upload function has been reworked to allow for batching like previously but with the new locking behavior. Also the condition to use temporary buffers has been expanded to also include cases when staging buffer will stall, which should increase performance a little in some cases.
* buffer_cache: Move buffer barriers and copy outside of lock range
- Moved enums, flags, and structs to ime_common.h to simplify usage with Ime and ImeDialog
- Updated Ime to use an enum as the return type, consistent with ImeDialog
- Removed duplicate definition of OrbisImeKeycode
- Added OrbisImeLanguage as a flags enum
- Added missing options to OrbisImeOption
- Removed OrbisImeDialogOption; OrbisImeOption should be used instead
- Added OrbisImeTextAreaMode
- Updated OrbisImeTextAreaMode
- Fixed OrbisImeEventParam by adding the missing member OrbisImePanelType panel_type
- Updated the sceImeOpen declaration to use extended parameters (not yet implemented)
-Fixed Diablo III (CUSA00434) assertion failure on ImeDialog initialization
Co-authored-by: w1naenator <valdis.bogdans@hotmail.com>
* texture_cache: Async download of GPU modified linear images
* liverpool: Back to less submits
* texture_cache: Don't download depth images
* config: Add option for linear image readback
* Organize settings and fix defaults
setDefaultValues was missing several rather important config options, and some of the defaults were inaccurate.
* Set alternative settings based on defaults
Reduces how many times we redefine the defaults for each setting.
I avoided changing behavior for installDirs and installDirsEnabled because I don't want to introduce any changes I can't easily test.
* Run save after loading to fill in missing config entries
A fix for the growing complaints about config files not updating when new settings are added.
Thanks to the prior changes, default settings are new properly defined everywhere, so running save here will properly fill in missing values with their expected defaults instead of the weird settings load would sometimes use.
* Clang
* Only update config when necessary
Instead of updating the config on each emulator boot, calculate the number of entries stored in the config and compare to a hardcoded constant.
If the config doesn't have the right number of entries, then regenerate it.
* Clang
* Clang
* buffer_cache: Fix various thread races on data upload and invalidation
* memory_tracker: Improve locking more on invalidation
---------
Co-authored-by: georgemoralis <giorgosmrls@gmail.com>
* vector_alu: Improve handling of mbcnt append/consume patterns
The existing implementation was written to handle a single pattern of mbcnt before the DS_APPEND instruction
v_mbcnt_hi_u32_b32 vX, exec_hi, 0
v_mbcnt_lo_u32_b32 vX, exec_lo, vX
ds_append vY offset:4 gds
v_add_i32 vX, vcc, vY, vX
In this case however the DS_APPEND is before the mbcnt pattern
ds_append vX gds
v_mbcnt_hi_u32_b32 vY, exec_hi, vX
v_mbcnt_lo_u32_b32 vZ, exec_lo, vY
The mbcnt instructions are always in pairs of hi/lo and in general are quite flexible. But they assume the subgroup size is 64 so they are not recompiled literally. Together with DS_APPEND they are used to derive a unique per thread index in a buffer (different from using thread_id as order could be random). DS_APPEND instruction works on per subgroup level, by adding number of active threads of subgroup to the GDS counter, essentially giving a multiple-of-64 base index to all threads. Then each thread executes the mbcnt pair which returns the number of active threads with id less than the itself and adds it with the base.
The recompiler translates DS_APPEND into an atomic increment of a storage buffer counter, which already gives the desired unique index, so this pattern is a no-op. On main it was set to zero as per the first pattern to avoid altering the DS_APPEND result. The new handling passes through the initial value of the pattern instead, which has the same effect but works on either case.
* vk_rasterizer: Always sync DMA buffers
* Added V_CMP_EQ_U64 shader opcode support and added 64-bit relational operators (<,>,<=,>=)
* Fixed clang-format crying because I typed xargs clang-format instead of xargs clang-format-19
* Replaced V_CMP_EQ_U64 code to match V_CMP_U32 to test
* Updated V_CMP_U64 for future addons