Commit Graph

6437 Commits

Author SHA1 Message Date
Triang3l 037310f8dc [Android] Unified xenia-app with windowed apps and build prerequisites 2022-07-11 21:45:57 +03:00
Gliniak 1d00372e6b Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-07-10 10:50:39 +02:00
Triang3l b41bb35a20 [SPIR-V] Make interpolators an array to fix Adreno linkage 2022-07-09 17:52:26 +03:00
Triang3l b3edc56576 [Vulkan] Merge texture and sampler descriptors into a single descriptor set
Put all descriptors used by translated shaders in up to 4 descriptor sets, which is the minimum required, and the most common on Android, `maxBoundDescriptorSets` device limit value
2022-07-09 17:10:28 +03:00
Gliniak d33be73f3d Fixed crash caused by hash calculation in specific cases 2022-07-08 08:49:43 +02:00
Triang3l e4de8663c4 [Vulkan] All guest draw uniform buffer bindings in a single descriptor set
Reduce the number of bound descriptor sets from 10 to 6, which is still above the minimum limit of 4, but closer
2022-07-07 21:05:56 +03:00
Triang3l 88c055eb30 [CPU] Null backend enough for GPU trace viewing 2022-07-06 23:28:06 +03:00
Triang3l 3ee68d79ea Revert "[GPU] Make Processor optional for GraphicsSystem setup"
The Processor is still required in many places, including the GPU command processor worker thread

This reverts commit fd03d886e9.
2022-07-06 22:43:40 +03:00
Triang3l 6852e54937 [CPU] Remove intrinsics from dot product constant propagation 2022-07-06 21:32:56 +03:00
Triang3l 326e718035 [CPU] MMIO: Arm64, load register writes + exception cleanup 2022-07-06 21:05:05 +03:00
Triang3l fd03d886e9 [GPU] Make Processor optional for GraphicsSystem setup 2022-07-05 21:21:22 +03:00
Triang3l bdfd410b13 [CPU] Cleanup x64 backend usage conditionals 2022-07-05 21:07:10 +03:00
Triang3l d263d508cd [GPU] Make operator< const 2022-07-05 20:47:53 +03:00
Triang3l 536f14d94c [GPU] Fix a typo in a Neon intrinsic name 2022-07-05 20:47:34 +03:00
Triang3l d51fafd07c [Base] Linux Arm64 exception handler 2022-07-05 20:46:49 +03:00
Triang3l 40aa73f7d7 [Linux] Swap read/write in x64 page fault handler + exception code cleanup 2022-07-04 23:51:26 +03:00
Triang3l a9cbd9cc5f [Linux] Update RIP after handling an exception 2022-07-04 23:24:26 +03:00
uytvbn 54aac81268 [Linux] Implement exception handler 2022-07-04 23:04:27 +03:00
Triang3l 35d4ea59c6 [Base] Remove exception_handler_linux.cc 2022-07-04 23:02:11 +03:00
Triang3l feaad639fb [Vulkan] Destroy all RTs before VulkanRenderTargetCache is destroyed 2022-07-04 11:27:51 +03:00
Gliniak 6e753c6399 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-07-04 08:11:04 +02:00
Triang3l 2621dabf0f [Vulkan] Native 24-bit unorm depth where available 2022-07-03 21:21:17 +03:00
Triang3l 83e9984539 [Vulkan] Remove required feature checks
Fallbacks for those will be added more or less soon, the stable version won't hard-require anything beyond 1.0 and the portability subset
2022-07-03 20:54:34 +03:00
Triang3l bbae909fd7 [GPU] Reasons to keep non-Vulkan backends [ci skip] 2022-07-03 20:39:44 +03:00
Triang3l ed61e15fc3 [App] Make D3D12 the default GPU backend on Windows again 2022-07-03 19:49:11 +03:00
Triang3l ee84f4e267 [Vulkan] Update title bar warning 2022-07-03 19:45:48 +03:00
Triang3l f7ef051025 [Vulkan] Disable validation by default 2022-07-03 19:42:22 +03:00
Triang3l 001f64852c [Vulkan] VMA for textures 2022-07-03 19:40:48 +03:00
Gliniak a8df744ea6 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-07-03 13:07:15 +02:00
Triang3l 636585e0aa [Vulkan] Trace viewer 2022-07-01 19:53:41 +03:00
Triang3l ad1ef84145 Merge branch 'master' into vulkan 2022-07-01 19:53:08 +03:00
Triang3l e37e3ef382 [GPU] Display swap output in the trace viewer
Resolve output is unreliable because resolving may be done to a subregion of a texture and even to 3D textures, and to any color format
2022-07-01 19:50:19 +03:00
Triang3l c8a4a9504f [Vulkan] Remove an unneeded scale from RefreshGuestOutput aspect ratio 2022-07-01 12:52:12 +03:00
Triang3l d174762a40 Merge branch 'master' into vulkan 2022-07-01 12:51:34 +03:00
Triang3l 28670d8ec2 [UI] Presenter: Rename display size to aspect ratio 2022-07-01 12:50:45 +03:00
Triang3l f8b351138e [Vulkan] Alpha test 2022-06-30 22:20:51 +03:00
Triang3l 6772c88141 Merge branch 'master' into vulkan 2022-06-30 22:15:29 +03:00
Triang3l 7e691d5ef1 [DXBC] Handle NaN in not equal alpha test as passed 2022-06-30 22:15:01 +03:00
Triang3l c0c3666e12 [Vulkan] Align texture extents in loading to vector size accessed by the shader
Fixes loading of the 1x1 linear 8_8_8_8 texture containing just a single #FFFFFFFF texel in 4D5307E6, which is used for screen fade and the lobby map loading bar background
2022-06-29 23:41:32 +03:00
Triang3l 9392fff369 Merge branch 'master' into vulkan 2022-06-29 23:39:54 +03:00
Triang3l a11b070fee [GPU] Align texture extents in loading to host buffer texel size accessed by the shader 2022-06-29 23:38:06 +03:00
Triang3l 7c2df55209 [Vulkan] Cache clear: shared memory, scratch buffer 2022-06-29 13:24:45 +03:00
Triang3l d5815d9e6a [Vulkan] Float24 depth range remapping fixes 2022-06-29 13:14:00 +03:00
Gliniak efe3cd96d6 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-06-29 09:21:09 +02:00
Triang3l 05ef7a273a [Vulkan] Samplers (only 1.0 core features for now) 2022-06-28 22:42:18 +03:00
Triang3l 5d9061cf99 Merge branch 'master' into vulkan 2022-06-28 22:05:45 +03:00
Triang3l 243683d2e9 [GPU] Cleanup Texture::MarkAsUsed conditionals 2022-06-28 22:04:26 +03:00
Triang3l 382710bab7 [GPU] Normalize sampler clamp modes 2022-06-28 21:58:58 +03:00
Triang3l cedc94679b [GPU] Don't drop the rest of the command list if IssueDraw fails 2022-06-28 21:40:06 +03:00
chss95cs@gmail.com 3c06921cd4 Added optimizations for combining conditions together when their results are OR'ed
Added recognition of impossible comparisons via NZM and optimize them away
Recognize (x + -y) and transform to (x - y) for constants
Recognize (~x ) + 1 and transform to -x
Check and transform comparisons if theyre semantically equal to others
Detect comparisons of single-bit values with their only possible non-zero value and transform to true/false tests
Transform ==0 to IS_FALSE, !=0 to IS_TRUE
Truncate to int8 if operand for IS_TRUE/IS_FALSE has a nzm of 1
Reduced code generated for SubDidCarry slightly
Add special case for InstrEmit_srawix if mask == 1
Cut down the code generated for trap instructions, instead of naive or'ing or compare results do a switch and select the best condition
Rerun simplification pass until no changes, as some optimizations will enable others to be done
Enable rel32 call optimization by default
2022-06-26 12:49:04 -07:00
Gliniak e6898fda66 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-06-26 20:11:33 +02:00
chrisps 08232de8cc
patch a mistake in NZM calculation for OPCODE_NOT 2022-06-26 09:30:56 -07:00
Triang3l 9672230d9f Merge branch 'master' into vulkan 2022-06-26 18:59:49 +03:00
Triang3l ec008463b6 [GPU] CrYCb/YCrCb border colors 2022-06-26 18:56:50 +03:00
Triang3l 2606fa5709 [GPU] Apply BaseMap MipFilter via samplers as it may be overridden
Make it have no effect on the texture resource as a resource may be used with samplers with different overrides. Also make sure magnification vs. minification is not undefined with it on Direct3D 12.
2022-06-26 18:41:38 +03:00
Triang3l e191430091 Merge branch 'master' into vulkan 2022-06-26 16:58:27 +03:00
Triang3l 086a070fa9 [GPU] Explicitly cast bit field values in std::min/max
According to the integral promotion rules https://eel.is/c++draft/conv.prom#5.sentence-1 bit fields can be promoted to `int` if it's wide enough to store their value, and then otherwise, to `unsigned int`. Hopefully fixes Clang building (the `width_div_8` case).
2022-06-26 16:54:11 +03:00
Triang3l e0b890fe5c [DXBC] Remove alphatest/A2C with [earlydepthstencil] 2022-06-26 15:31:08 +03:00
Triang3l 6688b13773 [Vulkan] PsParamGen 2022-06-26 15:01:27 +03:00
Triang3l a99a1be880 Merge branch 'master' into vulkan 2022-06-26 15:00:21 +03:00
Triang3l b787f2dec1 [GPU] GPR count limit is 128, not 64 2022-06-26 14:45:49 +03:00
Triang3l a5c8df7a37 [Vulkan] Remove UB-based independent blend logic
On Vulkan, unlike Direct3D, not writing to a color target in the fragment shader produces an undefined result.
2022-06-25 20:57:44 +03:00
Triang3l d8b2944caa [Vulkan] Handle unsupported fillModeNonSolid + fix portability subset feature checks 2022-06-25 20:46:52 +03:00
Triang3l d30d59883a [Vulkan] Color exponent bias and gamma conversion 2022-06-25 20:35:13 +03:00
Triang3l b1be33004a Merge branch 'master' into vulkan 2022-06-25 20:31:26 +03:00
Triang3l 4812b4ba8b [D3D12] Fix outdated color system constants comment [ci skip] 2022-06-25 20:31:05 +03:00
chss95cs@gmail.com 327cc9eff5 drastically reduce size of final generated code for rlwinm by adding special paths for rotations of 0, masks that discard the rotated bits and using And w/ UINT_MAX instead of truncate/zero extend
Add special case to TYPE_INT64's EmitAnd for UINT_MAX mask. Do mov32 to 32 if detected to take advantage of implicit zero xt/reg renaming

Add helper function for skipping assignment defs in instr.
Add helper function for checking if an opcode is binary value type
Add several new optimizations to simplificationpass, plus weak NZM calculation code (better full evaluation of Z/NZ will be done later) .
 List of optimizations:
  If a value is anded with a bitmask that it was already masked against, reuse the old value (this cuts out most FPSCR update garbage, although it does cause a local variable to be allocated for the masked FPSCR and it still repeatedly stores the masked value to the context)
  If masking a value that was or'ed against another check whether our mask only considers bits from one value or another. if so, change the operand to the OR input that actually matters
  If the only usage of a rotate left's output is an AND against a mask that discards the bits that were rotated in change the opcode to SHIFT_LEFT
  If masking against all ones, become an assign.
  If XOR or OR against 0, become an assign (additional FPSCR codegen cleanup)
  If XOR against all ones, become a NOT
Adding a direct CPUID check to x64_emitter for lzcnt, the version of xbyak we are using is skipping checking for lzcnt on all non-intel cpus, meaning we are generating the much slower bitscan path for AMD cpus.
2022-06-25 09:58:13 -07:00
Triang3l 5dca11a892 [SPIR-V] Fix fetch constant LOD bias signedness 2022-06-25 16:33:35 +03:00
Triang3l d8b0227cbd [SPIR-V] Fix cubemap X axis 2022-06-25 16:25:29 +03:00
Triang3l fdcbf67623 [Vulkan] Enable VK_KHR_sampler_ycbcr_conversion 2022-06-25 15:46:02 +03:00
Triang3l 758db4ccb3 [Vulkan] Fix textures not loaded if using a shader for the first time 2022-06-25 15:15:06 +03:00
Triang3l 4db445c6f9 Merge branch 'master' into vulkan 2022-06-25 15:13:41 +03:00
Triang3l aa45d7b47d [D3D12] More descriptive pipeline creation call comment [ci skip] 2022-06-25 15:13:11 +03:00
Triang3l c37c05d189 [Vulkan] Remove an outdated fullscreen shader comment [ci skip] 2022-06-25 14:35:15 +03:00
Triang3l 4b4205ba00 [Vulkan] Frontbuffer presentation 2022-06-25 14:33:43 +03:00
Triang3l 3fc7d8753c Merge branch 'master' into vulkan 2022-06-24 23:38:04 +03:00
Triang3l f4a634c617 [XeSL] xesl_write*Store > xesl_*Store 2022-06-24 23:37:29 +03:00
Triang3l 7a4732e14f [GPU] XeSL swap shaders 2022-06-24 23:24:30 +03:00
Gliniak 2b3686f0e9 [XAM] Set profile setting 'from' entry accordingly to setting existence 2022-06-24 10:10:52 +02:00
Triang3l b7737d70ca [D3D12] Update RequestSwapTexture resource state comment [ci skip] 2022-06-23 22:59:53 +03:00
Gliniak ce3b159683 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-06-22 21:05:45 +02:00
Triang3l 227d495738 Merge branch 'master' into vulkan 2022-06-22 21:19:29 +03:00
Triang3l e9f129f67f [GPU] Safer and more correct depth bias conversion
Float24-as-float32 depth bias is now in the increments of 8, because conversion of the depth to float24 directly in the pixel shaders may destroy the bias qualitatively otherwise if it's too small.
2022-06-22 21:14:40 +03:00
Triang3l a7885ae1a4 [GPU] Fix CPU-side float24 conversion broken recently 2022-06-22 20:47:44 +03:00
Triang3l 4514050f55 [Vulkan] Truncate depth to float24 in EDRAM range ownership transfers and resolves by default
Doesn't ruin the "greater or equal" depth test in subsequent rendering passes if precision is lost, unlike rounding to the nearest
2022-06-22 13:25:06 +03:00
Gliniak e7a122d943 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-06-22 12:18:13 +02:00
Triang3l 0d8bd0e0c6 Merge branch 'master' into vulkan 2022-06-22 13:15:50 +03:00
Triang3l cbf0476d42 [D3D12] Don't round float24 depth when it's known to be exact 2022-06-22 13:14:38 +03:00
Gliniak 83269315d8 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-06-22 12:06:42 +02:00
Triang3l 7869b080d3 [D3D12] Truncate depth to float24 in EDRAM range ownership transfers and resolves by default
Doesn't ruin the "greater or equal" depth test in subsequent rendering passes if precision is lost, unlike rounding to the nearest
2022-06-22 12:53:09 +03:00
Gliniak 87fd772393 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-06-21 07:54:44 +02:00
chss95cs@gmail.com 549ee28a93 ome guest function calls can now be resolved and embedded directly in
the emitted asm as rel32 calls. Disabled by default, enabled via
resolve_rel32_guest_calls
detect whether cpu has fast jrcxz, fast loop/loope/loopne
much more thorough LoadConstantXMM
New cvar elide_e0_check that allows the backend to assume accesses via
the SP or TLS register will not cross into 0xe0 range
Add x64 codegen for Vector shift uint8
If has fast jrcxz use for some traptrue/breaktrue instructions
Use phat nops
Add cvar use_fast_dot_product, which uses a four instruction sequence
for both dot product instructions which ought to be equivalent. disabled
by default.
2022-06-20 15:08:18 -07:00
Triang3l c0703e64db Merge branch 'master' into vulkan 2022-06-20 22:40:19 +03:00
Triang3l e2f632f8fa [D3D12] Use udiv by constant tile size + minor transfer cleanup
Drivers compile that to a multiplication and a shift anyway.
2022-06-20 22:39:30 +03:00
Triang3l 0dc480721f [Vulkan] Render target resolving 2022-06-20 22:29:07 +03:00
Triang3l c6ec6d8239 [Vulkan] Use UDiv/UMod by constant tile size + minor transfer cleanup
Drivers compile that to a multiplication and a shift anyway.
2022-06-20 22:24:07 +03:00
Gliniak a4ff64c465 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-06-20 21:07:32 +02:00
Triang3l 61c4c49d76 Merge branch 'master' into vulkan 2022-06-20 12:34:41 +03:00
Triang3l 207e11c8d2 [GPU] Separate range arguments for fixed16 RG and RGBA in GetResolveInfo
On Vulkan, when snorm16 in unsupported, these formats may be emulated as float16, which natively can represent a wide range of numbers including -32 to 32 with blending. However, R16G16_SNORM and R16G16B16A16_SNORM are two separate formats, which may have different support on the device.
2022-06-20 12:29:45 +03:00
Triang3l 3b4845511d [Vulkan] Don't require an explicit uint64_t cast for SetDeviceObjectName 2022-06-20 12:25:52 +03:00
Triang3l 67ff108f53 [Vulkan] Explain why CreateShaderModule takes uint32_t* [ci skip] 2022-06-20 12:22:41 +03:00
Triang3l b61953374e [GPU] Make resolve EDRAM binding DS 0 and rename it
Ordering the descriptor sets by the change frequency on Vulkan, in increasing order (the opposite of D3D12 root signatures). The EDRAM binding never changes there (always one storage buffer), while the destination buffer binding may become changeable in the future (to split dispatches if exceeding `maxStorageBufferRange`, for example).
2022-06-20 12:15:52 +03:00
Triang3l 1200b205cf Merge branch 'master' into vulkan 2022-06-19 17:52:28 +03:00
Triang3l 9b83d3d0f4 [GPU] XeSL resolve shaders + host depth store width fix 2022-06-19 17:50:21 +03:00
Gliniak 1e369afa3d [Memory] Allocate system heap memory from bottom of heap last quarter
Aka. From 0x30000000
2022-06-17 22:23:39 +02:00
Gliniak 0b183a3582 Merge branch 'chris_cpu_changes' of https://github.com/Gliniak/xenia.git into canary_experimental 2022-06-17 14:04:58 +02:00
chrisps e4fd015886 Juicy optimization goodness 2022-06-17 14:03:24 +02:00
chss95cs@gmail.com 8a8ff6ae46 Reuse flag results in OPCODE_BRANCH_TRUE codegen if the preceding instruction was a comparison that already set the cpu flags 2022-06-17 11:13:49 +02:00
chss95cs@gmail.com 3675b3860a Add constant folding for OPCODE_ROTATE_LEFT 2022-06-17 11:12:49 +02:00
chrisps 3ad80810b5 Optimized CONVERT_I64_TO_F64 with neat overflow trick
Reduced instruction count from 11 to 8, eliminated a movq stall.
2022-06-17 11:10:48 +02:00
chrisps 9dfbef8acf Smaller ComputeMemoryAddress/Offset sequence
Replace a movzx after setae in both ComputeMemoryAddressOffset and ComputeMemoryAddress with a xor_ of eax prior to the cmp. This reduces the length in bytes of both sequences by 1, and should be a moderate ICache usage reduction thanks to the frequency of these sequences.
2022-06-17 11:10:27 +02:00
Gliniak c0483f8bee Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-06-17 10:58:15 +02:00
Triang3l 166be463be [XeSL] Metal Shading Language definitions 2022-06-16 21:39:16 +03:00
Gliniak e8aaddf4d5 Merge remote-tracking branch 'GliniakRepo/patchingSystem' into canary_experimental 2022-06-14 17:50:25 +02:00
Triang3l 127bf34264 [Vulkan] Trace dump tool 2022-06-13 13:03:02 +03:00
Gliniak 91f43a374d Initial support for xex patching 2022-06-12 20:10:07 +02:00
Gliniak 945976a31d Added Premake Files For PatchingSystem 2022-06-12 19:58:12 +02:00
Triang3l ac268afbe9 [Vulkan] Fix 1<< uint32_t constants 2022-06-12 19:45:12 +03:00
Triang3l 140ed51e9a [GPU] Fix missing xenia-ui dependency in gpu > gpu-shader-compiler (needed for gmake2) 2022-06-12 19:44:24 +03:00
Triang3l 17c835b245 Merge branch 'master' into vulkan 2022-06-12 18:51:08 +03:00
Triang3l 820b7ba217 [GPU] Fix GetActiveTextureHostSwizzle return type 2022-06-12 18:50:38 +03:00
Gliniak 90d67ac11c [Kernel] Return X_STATUS_END_OF_FILE for async file read when offset > file_size 2022-06-09 21:36:09 +02:00
Triang3l 1a22216e44 [SPIR-V] Texture fetch instructions 2022-06-09 21:42:16 +03:00
Triang3l f875a8d887 Merge branch 'master' into vulkan 2022-06-09 21:35:12 +03:00
Triang3l 78d1eb8bf8 [GPU] TextureCache::GetActiveTextureHostSwizzle 2022-06-09 21:34:21 +03:00
Gliniak d0175ddf2f [XAM] Cut handle mask from socket handles, added support for: NetDll_getsockopt
Only positive values should be interpreted as valid sockets!
2022-06-08 19:59:15 +02:00
Gliniak 25f3e16baa [Patcher] Fixed issue with incorrect patches endianness 2022-06-08 19:42:18 +02:00
Gliniak 0de0f40fb5 [XAM] Added stubs for:
- NetDll_XNetCreateKey
 - NetDll_XNetRegisterKey

This will allow certain games to run local multiplayer
For example PDZ Deathmatch mode
2022-06-07 20:46:47 +02:00
Triang3l 56f72da137 [GPU] More exact PWL texture/RT gamma conversion 2022-06-07 21:26:34 +03:00
Gliniak 916eb1b9bd [XAM] Scan every controller slot if provided flags contains USER_ANY flag 2022-06-07 15:52:41 +02:00
Margen67 5701823ccf Log title_name 2022-06-07 09:43:04 +02:00
jgoyvaerts 5296d2e91e Fix xenia.log file not always being created in the executable folder. 2022-06-07 09:41:52 +02:00
Gliniak c7da7e1999 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-06-02 22:19:43 +02:00
Triang3l a8cfe9bebb [Vulkan] Unsubsample odd-sized 4:2:2 textures 2022-06-02 23:10:50 +03:00
Triang3l 1ce45ee150 Merge branch 'master' into vulkan 2022-06-02 22:50:14 +03:00
Triang3l 55a91afcc7 [D3D12] Don't decompress unaligned BC textures if supported 2022-06-02 22:48:03 +03:00
Triang3l 84fcd5defa [GPU] Fix resolve destination offset and extent calculation 2022-06-02 21:47:30 +03:00
Triang3l a9a072bf00 [GPU] Explain why a 32x32x4bpp linear texture takes 2 pages, not 1 [ci skip] 2022-06-01 13:00:23 +03:00
Triang3l 8bd244f277 [GPU] Better explanation for exact texture memory extent calculation [ci skip] 2022-06-01 12:55:16 +03:00
Gliniak 3169aa2ff3 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-06-01 08:45:21 +02:00
Triang3l d1ad10b98c [GPU] Primitive reset comment typo correction [ci skip] 2022-05-31 23:23:53 +03:00
Triang3l efd7ef212a [D3D12] 128 megatexel limit explanation based on the spec [ci skip] 2022-05-31 23:23:10 +03:00
Triang3l 25594c918c [GPU] Fix tiled texture memory extent calculation 2022-05-31 23:17:33 +03:00
Rick Gibbed a3e5ea8575
[Base] Fix missing include in utf8.cc. 2022-05-27 17:56:14 -05:00
Gliniak 5a71b55233 [Kernel] Added missing module hash calculation 2022-05-25 09:03:03 +02:00
Gliniak 542e075699 Fixed bug between reading header content and applying TUs 2022-05-25 08:23:19 +02:00
Gliniak d7d26dc1c4 Merge branch 'master' of https://github.com/xenia-project/xenia into canary_experimental 2022-05-25 07:54:16 +02:00
Gliniak 3d96dfa359 Always allocate system heap from top of heap 2022-05-25 07:53:50 +02:00
Triang3l 6c9a06b2da [Vulkan] Texture loading 2022-05-24 22:42:22 +03:00
Triang3l 9c445d397b [Vulkan] Fix single-type descriptor pool reuse 2022-05-24 22:37:49 +03:00
Triang3l aac28f19d1 Merge branch 'master' into vulkan 2022-05-24 22:34:40 +03:00
Triang3l a4840e1992 [GPU] FIXME comment for 1bpb/2bpb texture tiled extent 2022-05-24 22:33:27 +03:00
Triang3l 8701c9f24e [D3D12] Texture load code cleanup and resolution scaling fixes
The resolution scale is now taken into account when copying from the mip tail.
2022-05-24 22:28:42 +03:00
Triang3l 75c185e759 [GPU] Move texture load shader info to common 2022-05-24 22:24:33 +03:00
Triang3l f994d3ebb3 [Vulkan] Single block-compressed flag for host texture formats, not block sizes 2022-05-23 13:27:43 +03:00
Triang3l f7b0edee6b [Vulkan] GBGR/BGRG decompression 2022-05-23 13:18:47 +03:00
Triang3l 4c2f8764d6 Merge branch 'master' into vulkan 2022-05-23 12:36:35 +03:00
Triang3l c1f15c86a3 [GPU] Decompress GBGR/BGRG into RGBB, not RGB1
While the alpha of the texture data is not used at all (replaced with blue using the view swizzle), still make the shader code state the intention more explicitly if the format is decompressed for use as signed. Unsigned 1.0 is 0xFF, while signed 1.0 is 0x7F.
2022-05-23 12:31:45 +03:00
Triang3l cf3069eb13 [GPU] Signedness in Cr_Y1_Cb_Y0_REP/Y1_Cr_Y0_Cb_REP comment [ci skip] 2022-05-22 22:11:59 +03:00
Triang3l ef808e9def [GPU] _REP explanation in Cr_Y1_Cb_Y0_REP/Y1_Cr_Y0_Cb_REP comment [ci skip] 2022-05-22 21:46:11 +03:00
Triang3l 6735dbd941 [GPU] Calculate, not store, texture load host X blocks per thread 2022-05-22 21:21:54 +03:00
Triang3l 888d5044e0 [GPU] 2x1-subsampled texture RGBA8 conversion shader 2022-05-22 21:07:38 +03:00
Triang3l d3561d2f47 [D3D12] Pre-swizzle 2x1-subsampled formats 2022-05-22 20:31:48 +03:00
Triang3l 5de825e3a0 [GPU] Prevent multiple evaluation of XE_TEXTURE_LOAD_TRANSFORM arguments 2022-05-22 19:48:23 +03:00
Triang3l 2f0a884438 [GPU] Add k prefix to texture load group size constants 2022-05-22 19:35:25 +03:00
Triang3l 8f06ba6f7d [D3D12] Texture host BPB in LoadModeInfo 2022-05-22 19:28:05 +03:00
Triang3l 003c62ba73 [GPU] Correct rounding of texture load row size
The original multiplication was likely added early during the development of generic resolution scaling. Before generic resolution scaling, invocations were done for unscaled guest blocks, now they're done for scaled blocks, so with 3x1 scaling, an invocation for 8 blocks writes 8 host blocks, not 24.
2022-05-22 18:33:59 +03:00
Triang3l 6aa30ed074 [GPU] 128-thread groups in all texture load shaders
Vulkan's minimum requirement (maxComputeWorkGroupInvocations) is 128.
2022-05-22 18:03:09 +03:00
Triang3l 91c4e02e96 [Vulkan] Implement ClearCaches and don't do it for pipelines 2022-05-22 15:05:15 +03:00
Triang3l 35cfb07967 Merge branch 'master' into vulkan 2022-05-22 14:56:44 +03:00
Triang3l 88784101c8 [D3D12] Remove PipelineCache::ClearCache leftovers 2022-05-22 14:56:22 +03:00
Triang3l 68e7c56918 Merge branch 'master' into vulkan 2022-05-22 14:47:20 +03:00
Triang3l d31ddd9b23 [GPU] Remove PipelineCache::ClearCache 2022-05-22 14:46:03 +03:00
Gliniak dde8adc140 Allow XamUserReadProfileSettings to use xuid to define profile 2022-05-22 13:11:29 +02:00
Gliniak 84e5b159c3 Do not store obsolete info about deleted threads 2022-05-22 13:11:21 +02:00
Gliniak b759cb23a5 Better handling of title workspace 2022-05-22 13:11:08 +02:00
Gliniak 4bfd3a6506 Reset state of event before executing overlap code 2022-05-22 13:09:37 +02:00
Gliniak 5784e7bc8d Send signin changed notification for primary user 2022-05-22 13:09:25 +02:00
Gliniak 620aa3562e Set system page blocks to gpu-written every frame 2022-05-22 13:09:12 +02:00
Gliniak ba60b94c7d Round size to 64k for allocations without base address 2022-05-22 13:09:01 +02:00
Gliniak af806ee98f Allocate guest objects in last quarter of memory heap 2022-05-22 13:08:47 +02:00
Gliniak 7be4b7a138 Increase profiler max threads to 256 2022-05-22 13:06:50 +02:00
Gliniak a190bf9fd8 Changed max component length for host and svod types 2022-05-22 13:06:42 +02:00
Triang3l 08769de68b [Vulkan] Texture object and view creation 2022-05-19 21:56:24 +03:00
Triang3l b0e1916f75 Merge branch 'master' into vulkan 2022-05-19 21:46:21 +03:00
Triang3l 9aaf19a455 [Vulkan] Remove unused variable in VulkanPresenter::GuestOutputImage::Initialize 2022-05-19 21:45:48 +03:00
Triang3l c85c2f5b79 Merge branch 'master' into vulkan 2022-05-19 21:43:19 +03:00
Triang3l 1dcc919a33 [GPU] Move k_Y1_Cr_Y0_Cb_REP usage example to xenos.h 2022-05-19 21:41:52 +03:00
Triang3l 7d63d6e1d3 [D3D12] Fix 2:1-subsampled format swizzle 2022-05-19 21:40:03 +03:00
Triang3l 825a5b176c [D3D12] Fix frontbuffer resource state 2022-05-19 21:39:11 +03:00
Gliniak 5ce75a1479 Merge remote-tracking branch 'GliniakRepo/xam_swap_disc' into canary_experimental 2022-05-19 12:07:05 +02:00
Gliniak f21dbc66ba Implemented XamSwapDisc 2022-05-19 12:04:32 +02:00
Gliniak db50db3215 Merge remote-tracking branch 'GliniakRepo/TU_APPLY' into canary_experimental 2022-05-19 11:00:34 +02:00
Gliniak 7c2cd16548 Merge remote-tracking branch 'GliniakRepo/local_multiplayer' into canary_experimental 2022-05-19 10:56:21 +02:00
Gliniak 6c6c5ac14b Merge remote-tracking branch 'GliniakRepo/experimentals' into canary_experimental 2022-05-19 10:51:44 +02:00
Philpax e901567193 Fix crash from null sample channel
Certain games, such as Forza Motorsport 3, submit XMA data with the
stereo flag set with a null second channel. This falls back to mono
conversion when the second channel is null, preventing a crash.
2022-05-19 10:22:41 +02:00
Margen67 64b336805e Add vsync_interval option 2022-05-19 10:22:32 +02:00
Gliniak 0881725533 Merge remote-tracking branch 'GliniakRepo/const_prop_opcode_and_not' into canary_pr 2022-05-19 10:18:58 +02:00
Gliniak 75f0dfd6f3 Merge remote-tracking branch 'GliniakRepo/deleteFunctionsFromUnloadedModule' into canary_pr 2022-05-19 10:18:18 +02:00
Gliniak 320cbc43c8 Merge remote-tracking branch 'GliniakRepo/physicalProtectPageCombinations' into canary_pr 2022-05-19 10:17:58 +02:00
Gliniak ef281c69c3 Merge remote-tracking branch 'GliniakRepo/xamNetSockNameAndErrorHandling' into canary_pr 2022-05-19 10:17:29 +02:00
Gliniak de03165995 Merge remote-tracking branch 'GliniakRepo/audioSkipHeaderInputOffset' into canary_pr 2022-05-19 10:16:41 +02:00
Gliniak 5ef92faf6d Merge remote-tracking branch 'GliniakRepo/createEnumeratorHandle' into canary_pr 2022-05-19 10:16:10 +02:00
Gliniak 006f3adad3 Merge remote-tracking branch 'GliniakRepo/disablePositiveVibes' into canary_pr 2022-05-19 10:03:50 +02:00
Gliniak b237b71031 Merge remote-tracking branch 'GliniakRepo/memory_stats' into canary_pr 2022-05-19 10:03:29 +02:00
Gliniak 7ac2279d34 Merge remote-tracking branch 'GliniakRepo/customConHeaderImplementation' into canary_pr 2022-05-19 10:03:05 +02:00
Gliniak 5247220e73 Merge remote-tracking branch 'GliniakRepo/patchingSystem' into canary_pr 2022-05-19 10:01:33 +02:00
Margen67 99e3a1a4b1 Disable Vulkan 2022-05-19 09:39:58 +02:00
illusion0001 f9fd3e5fec AVPack cvar 2022-05-19 09:39:56 +02:00
illusion 357d9adfca automatic aspect ratio change
aspect ratio will now change if internal resolution is set to anything 4:3
(i.e 640x480, 1024x768, 1600x1200.. etc.)
2022-05-19 09:39:56 +02:00
Margen67 bdd431cd4a Rename exe to xenia_canary 2022-05-19 09:39:55 +02:00
illusion98 7242efdeef Change default config file name 2022-05-19 09:39:55 +02:00
illusion98 471041a9b5 Change window title
xenia -> xenia-canary
2022-05-19 09:39:55 +02:00
illusion98 6036c977e8 Change ID and new description 2022-05-19 09:39:55 +02:00
illusion98 c0333ea7c6 Add Time Elasped and Description Text
Display Time Elapsed when idle or playing a game
Display description when hovering over the icon
2022-05-19 09:39:55 +02:00
Triang3l 46202dd27a [Vulkan] Basic texture descriptor set allocation/binding 2022-05-17 22:42:28 +03:00
Triang3l 3381d679b4 Merge branch 'master' into vulkan 2022-05-17 22:31:34 +03:00
Triang3l 7675b6b140 [DXBC] Cleanup texture/sampler name setting 2022-05-17 22:30:55 +03:00
Triang3l 533de3b477 [D3D12] Remove unnecessary binding count uint32_t casts 2022-05-17 21:33:17 +03:00
Triang3l 5f2b0a899a [Vulkan] Fix TransientDescriptorPool ignoring the descriptor type 2022-05-15 22:20:24 +03:00
Triang3l f9261811a9 [D3D12] Fix layouts_mutex_ lock naming 2022-05-15 18:52:28 +03:00
Triang3l 0db94a700f [Vulkan] Use pipeline layout key structures directly 2022-05-15 17:42:27 +03:00
Triang3l b80361ee3c [Vulkan] Texture cache: Maximum dimensions, null images 2022-05-15 16:59:27 +03:00
Triang3l 185c23dd50 [Vulkan] Gather shader stages that VS can be translated into 2022-05-15 16:31:24 +03:00
Triang3l 7d19a8c0e8 [Vulkan] Add missing <functional> include for std::hash 2022-05-15 16:20:12 +03:00
Triang3l 862c457761 [Vulkan] Use Shader::IsHostVertexShaderTypeDomain 2022-05-15 16:19:36 +03:00
Triang3l 05adfbc58d Merge branch 'master' into vulkan 2022-05-15 16:18:41 +03:00
Triang3l a65fd4f673 [GPU] Shader::IsHostVertexShaderTypeDomain 2022-05-15 16:13:05 +03:00
Triang3l f9b3b90a68 [D3D12] Subsystem management order cleanup 2022-05-14 22:30:06 +03:00
Triang3l 60052fb4fc [Vulkan] Don't require imageViewFormatSwizzle in the immediate drawer 2022-05-14 22:18:21 +03:00
Triang3l d6a9056952 [D3D12] D3D12Texture::SRVDescriptorKey structure 2022-05-14 18:41:15 +03:00
Triang3l 26cf717394 [GPU] Make TextureCache constructors explicit 2022-05-14 18:28:32 +03:00
Triang3l 775b4623dc Merge branch 'master' into vulkan 2022-05-14 17:05:39 +03:00
Triang3l d280b3953d [GPU] Texture object/binding management to common superclass 2022-05-14 16:18:10 +03:00
Triang3l af3158f1bf [Legacy Vulkan] Add Vulkan prefix to Pipeline/TextureCache to avoid future name collisions 2022-05-11 21:21:33 +03:00
Triang3l 73d574a046 [Vulkan] Rectangle and quad list geometry shader generation 2022-05-10 21:48:18 +03:00
Triang3l b9256fcdbd Merge branch 'master' into vulkan 2022-05-10 15:57:50 +03:00
Triang3l e6fb9883d2 [D3D12] Discard primitives with NaN position in GS 2022-05-09 22:34:17 +03:00
Triang3l 4cd4a91aa7 [D3D12] Rectangle GS comment typo fix [ci skip] 2022-05-09 19:17:55 +03:00
Triang3l 8f0e751909 [D3D12] Runtime geometry shader generation 2022-05-09 19:16:22 +03:00
Triang3l 44cda56d35 [GPU] Handle kRegisters and kGammaRamp in the trace viewer 2022-05-08 19:41:11 +03:00
Triang3l 2473496c7e [GPU] Make RegisterFile::kRegisterCount constexpr 2022-05-08 19:37:29 +03:00
Triang3l 72cf75f365 [DXBC] Geometry shader instructions 2022-05-07 22:11:31 +03:00
Caroline Joy Bell d36c3975d8 [UI] Implement Type::kDirectory in Win32FilePicker 2022-05-07 21:54:26 +03:00
Triang3l e3425b242e [DXBC] Both v[#] and v[#][#] operands for HS and GS 2022-05-07 16:17:17 +03:00
Gliniak c65f240c0b [Kernel] Improved TUs Support
- Changed name of config option to apply_title_update to better reflect what that option does
- Mount TU package to UPDATE: partition
- Simplified UserModule::title_id()
- Splitted loading module into two parts to allow applying TUs and custom patches
2022-05-06 08:04:47 +02:00
Triang3l 5875f6ab31 [UI] Windows: Disable rounded corners 2022-05-05 21:46:20 +03:00
Triang3l 9c8e0cc53e [GPU] DC_LUT_PWL_DATA comment fix [ci skip] 2022-05-05 13:13:30 +03:00
Triang3l c794d0d538 [GPU] DC_LUT_RW_INDEX/WRITE_EN_MASK + gamma ramp and registers in traces 2022-05-05 13:10:29 +03:00
Triang3l 2d90d5940f [DXBC] Jump to the loop skip address before pushing 2022-05-04 22:01:30 +03:00
Triang3l 0e0f04dc1d [D3D12] Fix point size calculation + point code cleanup
6fcf9d21fe made per-vertex diameter vs. constant radius consistent, and with that commit the shader works with direct pixel to NDC conversion, however, the NDC conversion factor was outdated in that commit (still included the 0.5 factor for diameter to radius conversion, resulting in all points being 50% narrower along each axis than needed). Now, the diameter to radius conversion factor is used there properly, and also the multiplication of the per-vertex diameter by 0.5 has been removed from the shader since the constant already includes it now (the constant diameter is passed via the system constants instead of the radius also).
2022-05-04 13:26:30 +03:00
Peter Wright 7ab5ccbbd9 Add #include <cfloat> to fix build error on Linux. 2022-05-03 19:45:10 +03:00
Triang3l 9e6f96a2fc Merge branch 'master' into vulkan 2022-05-03 16:21:30 +03:00
Triang3l 6fcf9d21fe [D3D12] Point sprite size fixes, point/line bits in PsParamGen 2022-05-03 16:15:16 +03:00
Triang3l fe50c5c2e5 [XeSL] Prefix all local names with `xesl_id/var_` 2022-05-03 13:48:32 +03:00
Triang3l 72a4d14056 Merge branch 'master' into vulkan 2022-05-03 00:13:31 +03:00
Triang3l b88f715140 Merge branch 'master' into vulkan 2022-05-03 00:13:17 +03:00
Triang3l 7a89ad16a6 [D3D12] Update D3D12RenderTargetCache::Update write mask argument name 2022-05-02 23:16:18 +03:00
Gliniak ccbb5a2ebf Cleanup 2022-04-30 11:45:22 +02:00
Gliniak d78fd19ab4 Fixed incorrect hash generation + lint fixes 2022-04-29 20:33:21 +02:00
Gliniak 585b208fc0 Added support for multiple game hashes 2022-04-29 09:41:45 +02:00
Triang3l 0fd578cafd [GPU] Get unclipped draw height by running VS on the CPU 2022-04-28 22:25:25 +03:00
Triang3l b2b1d7b518 [GPU] More accurate vertex kill + PsParamGen/point documentation 2022-04-27 23:10:56 +03:00
Triang3l 5ec0c92601 [GPU] Ignore z_enable for !z_write_enable && z_func == ALWAYS 2022-04-27 21:46:29 +03:00
Triang3l 5519dbb39f [GPU] Shader control flow documentation improvements 2022-04-27 21:34:08 +03:00
Triang3l b42680abf7 [GPU] Shader ALU refactoring + documentation
Mainly move instruction info from the ShaderTranslator to xe::gpu::ucode for future use in the CPU shader interpreter
2022-04-27 20:52:20 +03:00
Gliniak fc16e3dc40 Support for patch types:
- float
 - double
 - string
 - u16string
 - byte_array

Plus some smaller changes
2022-04-27 09:41:29 +02:00
Triang3l df9a37f798 [GPU] Ucode disasm: Fix exec formatting 2022-04-26 23:08:31 +03:00
Triang3l 69958cba9d [GPU] shader-compiler: Accept little-endian ucode 2022-04-26 22:59:02 +03:00
Triang3l 443d61c9e1 [D3D12] GetFormatCopyInfo: Remove unused divide_by_block_size variable 2022-04-26 22:42:17 +03:00
Triang3l fcf6a7ded1 [Android] Minor postInvalidateWindowSurface JNI cleanup 2022-04-26 22:41:11 +03:00
Triang3l 12ff951972 [Base] More flexible Xenos float16 conversion functions 2022-04-26 22:35:37 +03:00
Joel Linn e3dd873892 [Base] Fix wait for callback return
- If wait item has disarmed itself and is then disarmed by another
  thread, still wait for the callback to return to meet guaratees
2022-04-26 13:56:11 -05:00
Joel Linn 3b4dc7da3b [Base] Use disruptorplus spin wait
- Attempt to fix deadlocks when using valgrind on CI
2022-04-26 13:56:11 -05:00
Joel Linn e59a0e1206 [Base] Relax some timing constraints.
- Because setting the timer is scheduled by us but the wait on POSIX is
  currently scheduled by pthreads, this solves issues on overprovisioned
  CIs
2022-04-26 13:56:11 -05:00
Joel Linn 4a36a7962c [Base] Remove unneeded delay scheduler 2022-04-26 13:56:11 -05:00
Joel Linn 15950eec37 [Base] Use chrono APIs for Timers 2022-04-26 13:56:11 -05:00
Joel Linn 1478be14c7 [Base] Add chrono tests 2022-04-26 13:56:11 -05:00
Joel Linn 23eef94984 [Base] Add chrono support
- WinSystemClock is a FILETIME clock without scaling, can convert to
  system_time
- XSystemClock is a FILTETIME clock with scaling applied, can only
  convert to WinSystemClock
2022-04-26 13:56:11 -05:00
Joel Linn 9b4168cce9 [Base] Make HighResolutionTimer platform agnostic 2022-04-26 13:56:11 -05:00
Joel Linn 75357caeaf [Base] Add TimerQueue
- Cross platform functionality similar to Windows' `CreateTimerQueue`
  with `WT_EXECUTEINTIMERTHREAD`
2022-04-26 13:56:11 -05:00
Joel Linn a85fc25040 [Base] Add more tests for HighResolutionTimer 2022-04-26 13:56:11 -05:00
Wunkolo be8b9c512f [x64] Add GFNI optimization for SPLAT(int8)
`pxor` is a zero-uop register-rename and `gf2p8affineqb dest, zero, int8`
is a very quick single-instruction way to use affine galois
transformations to fill a register with an immediate byte without
touching memory.
2022-04-26 13:46:46 -05:00
Gliniak c73cdb506a Initial support for xex patching 2022-04-26 13:26:49 +02:00
Gliniak 31eb639ade Added Premake Files For PatchingSystem 2022-04-26 13:26:49 +02:00
Gliniak 3a115ae6a0 [Kernel] Restored usage of: log_string_format_kernel_calls 2022-04-14 13:48:24 -05:00
Triang3l ef8a60e011 [GPU] Round tessellation patch vertex count up (by @deaklajos #2007)
Also move the clamping of the guest index count to the index buffer size to the place before it's read in calculations
2022-04-14 21:19:12 +03:00
Triang3l 38aca269e1 [GPU] Offset and clamp tessellation patch index (#2008, thanks @deaklajos) 2022-04-14 13:04:34 +03:00
Triang3l fea430f1f9 [GPU] Fix scalar c[#+aL], shader docs/refactoring 2022-04-13 23:08:19 +03:00
Triang3l 1f324bebcd [GPU] Norm16 > float16 texture load shaders 2022-04-09 23:34:50 +03:00
Triang3l 744767f549 [D3D12] Compile all built-in shaders with the same FXC version 2022-04-09 23:24:28 +03:00
Triang3l 72f3eead63 [GPU] Texture load shader style (alignment) cleanup 2022-04-09 23:23:54 +03:00
DESKTOP-F0UGBP9\deakl 8d02c5ab21 [GPU] Fixed size 0 point sprites enlarged to default 2022-04-05 02:25:24 +03:00
Triang3l 47799163bd Merge branch 'master' into vulkan 2022-04-04 22:02:46 +03:00
Triang3l 3d48fde5ca [GPU] XeSL texture load shaders + minor XeSL cleanup 2022-04-04 21:48:27 +03:00
Triang3l 0acb97d383 [Vulkan] EDRAM range ownership transfers, resolve clears, 2x-as-4x MSAA
Transfers are functional on a D3D12-like level, but need additional work so fallbacks are used when multisampled integer sampled images are not supported, and to eliminate transfers between render targets within Vulkan format compatibility classes by using different views directly.
2022-04-03 16:40:29 +03:00
Triang3l 85fc7036b8 Merge branch 'master' into vulkan 2022-04-02 22:45:23 +03:00
Triang3l c4eae232f1 [D3D12] Fixes/cleanup for render targets and barriers 2022-04-02 22:44:10 +03:00
Triang3l 1131dff705 Merge branch 'master' into vulkan 2022-03-28 21:58:34 +03:00
Triang3l 0f3207d019 [Vulkan] Fix basePipelineIndex signedness 2022-03-28 21:57:44 +03:00
Triang3l 52d61fc94c Merge branch 'master' into vulkan 2022-03-27 16:20:21 +03:00
Triang3l 3a07559df9 [GPU] XeSL host depth store and VS passthrough shaders 2022-03-27 16:15:53 +03:00
Triang3l 328aa11283 Merge branch 'master' into vulkan 2022-03-27 00:11:45 +03:00
Triang3l 2cd6c31998 [Vulkan] Samplerless texelFetch 2022-03-27 00:09:44 +03:00
Gliniak 67a0ccb7c0 [CPU] Unified assertions for unimplemented opcodes 2022-03-23 11:41:49 -05:00
Triang3l 7048baaf21 Merge branch 'master' into vulkan 2022-03-22 21:54:34 +03:00
Triang3l fa62d395fd [Vulkan] InitializeSubresourceRange: Use return, not reference 2022-03-22 21:51:02 +03:00
Triang3l 32ab1a2df1 [D3D12] Minor RT code style/comments cleanup 2022-03-22 21:48:26 +03:00
Triang3l ee8e71cea8 [D3D12] RT dump: Fix r# allocation 2022-03-22 21:41:44 +03:00
Triang3l 920704c71a [D3D12] RT transfer: Same front/back stencil ops 2022-03-22 21:39:06 +03:00
Triang3l 1259c9f7a2 [Vulkan] Pipeline barrier merging 2022-03-21 23:02:51 +03:00
Triang3l acc4fd6846 [Vulkan] Rectangle list geometry shader 2022-03-21 22:53:19 +03:00
Triang3l c47b874a4d Merge branch 'master' into vulkan 2022-03-21 20:57:02 +03:00
Triang3l 82c1fb87aa [App] Do all fullscreen entry logic for --fullscreen=true (fixes #1999) 2022-03-14 20:42:52 +03:00
Gliniak 0f2a7105b9 [CPU] Added constant propagation pass for: OPCODE_AND_NOT 2022-03-11 08:54:01 +01:00
Wunkolo c1de37f381 [x64] Remove usage of `xbyak_bin2hex.h`
C++ has had binary-literals since C++14. There is no need for these
binary enum values from xbyak.
2022-03-08 12:18:58 -06:00
Wunkolo f356cf5df8 [x64] Add `VECTOR_ROTATE_LEFT_I32` overflow-test
Edit one of the lanes in this unit-test to be larger than the width of
the element-size to ensure that this case is handled correctly.

It should only mask the lower `log2(32)=5` bits of the input, causing
`33`(`100001`) to be `1`(`000001`).
2022-03-08 12:18:58 -06:00
Wunkolo 337f0b2948 [x64] Add AVX512 optimization for `VECTOR_ROTATE_LEFT(Int32)`
`vprolvd` is an almost 1:1 analog with this opcode and can be
conditionally emitted when the host supports AVX512{F,VL}.

Altivec docs say that `vrl{bhw}` masks the lower log2(n) bits of the
element-size.

[vprold](https://www.felixcloutier.com/x86/vprold:vprolvd:vprolq:vprolvq)
modulos the shift-value by the element size in bits, which is the same
as masking the lower log2(n) bits. So `vrlw` maps exactly to `vprold`.
2022-03-08 12:18:58 -06:00
Joel Linn 7e894d10a7 [kernel] Correct status for looked up objects
- The guest will check for 0x40000000 and replace it with
  0xb7 (ERROR_ALREADY_EXISTS), which is the correct return value.
  For example, see:
  https://docs.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-createmutexa
2022-03-08 12:17:57 -06:00
Joel Linn 91f4954967 [kernel] Refactor uses of attribute names 2022-03-08 12:17:57 -06:00
Joel Linn 38d589d1e0 [kernel] Remove unnecessary string copy 2022-03-08 12:17:57 -06:00
Joel Linn b72ab7b4a4 [Base] Refactor POSIX timers, fix user-after-free
Since timer_delete does not clean up already queued signals, signal info
data needs to be retained after timer deletion and object destruction in
order to circumvent use-after-free bugs.
2022-03-08 12:17:57 -06:00
Joel Linn 257b904a5e [Base] Add DelayScheduler class
Schedule callbacks whith the only guarantee that they will not be run for
the minimum duration specified. Useful for garbage collecting POSIX
timer_create() signal info data.
2022-03-08 12:17:57 -06:00
Joel Linn e0f34b97fb [Base] Check for correct thread in HResTimer tests 2022-03-08 12:17:57 -06:00
Joel Linn fb741db2fe [Base] Fix callback threads for POSIX timers 2022-03-08 12:17:57 -06:00
Joel Linn 986dcf4f65 [Base] Check success of sync primitive creation
- Mainly use `assert`s, since failure is very rare
- Forward failure of `CreateSemaphore` to guests because it is more easy
  to trigger with invalid initial parameters.
2022-03-08 12:17:57 -06:00
Joel Linn 6bd1279fc0 [Base] Forward `handle=null` as nullptr for win 2022-03-08 12:17:57 -06:00
Joel Linn 4ea6e45e0c [Base] Remove `Sleep`s from more test cases
Timing dependencies in this tests were causing spurious test failures:
- Create and Run Thread
- Test Thread QueueUserCallback

They have been largely replaced by spin waits.
2022-03-08 12:17:57 -06:00
Joel Linn e75e0eb39c [Base] Fix `Semaphore::Create` invalid parameters 2022-03-08 12:17:57 -06:00
Joel Linn bb42829308 [Base] Fix WaitMultiple on POSIX
- Never use `cond_.notify_one()` because it may wake a thread that is
  unrelated to the signalled wait handle, resulting in a lost wake and
  possible deadlock. Wait conditions are to be checked by the threads
  themselves.
- Refactor and simplify `WaitMultiple`
2022-03-08 12:17:57 -06:00
Joel Linn ca6296089e [Base] Remove timing dependency from test
- Use atomics and spin waits to synchronize threads for tests
- Improves test stability on CI
2022-03-08 12:17:57 -06:00
Joel Linn 49efbeaca8 [Base] Add spin wait helper to threading test 2022-03-08 12:17:57 -06:00
Gliniak 283accd876 [Kernel/Memory] Check for required protect_bits combinations 2022-02-22 19:26:56 +01:00
Radosław Gliński 6b45cf8447
[Base] Match exactly when no pattern in wildcard 2022-02-17 17:38:04 -06:00
Triang3l ba28ef9717 [Win32] Declare Windows 7-11 support in the manifest 2022-02-17 20:38:52 +03:00
Joel Linn 00e7de9297 [CPU] Improve vrsqrtefp accuracy 2022-02-16 17:09:28 -06:00
Joel Linn d64848245d [CPU] Improve vrefp accuracy 2022-02-16 17:09:28 -06:00
Triang3l 294c76f7c4 [UI] Remove `virtual` from Window::IsFullscreen (tracked entirely by common code) 2022-02-16 20:37:53 +03:00
Triang3l b41fb851c6 [Vulkan] Unsupported pipeline features assertion typo fix 2022-02-15 23:05:47 +03:00
Triang3l e13c4ae90b Merge branch 'master' into vulkan 2022-02-15 23:02:43 +03:00
Triang3l 9e803ccf25 [D3D12] Pad kBlendOpMap with dummy values for all 3 bits 2022-02-15 23:02:26 +03:00
Triang3l c75e0dd19e [Vulkan] Blend and depth/stencil state, small pipeline cleanup 2022-02-15 23:00:21 +03:00
Triang3l a64264ed77 Merge branch 'master' into vulkan 2022-02-14 12:37:49 +03:00
Triang3l 74c109273c [UI] Add PerMonitor fallback to Windows dpiAwareness 2022-02-14 12:35:08 +03:00
Triang3l 09f6081b16 [Vulkan] Fix shader bytecode path in premake5.lua 2022-02-13 23:29:46 +03:00
Triang3l b8c9d5bb8c Merge branch 'master' into vulkan 2022-02-13 23:25:39 +03:00
Triang3l e57db52285 [UI] Enable Windows PMv2 DPI awareness accidentally kept disabled after testing 2022-02-13 23:10:19 +03:00
Triang3l 7652b321d0 [UI] Fix Windows 10 1607+ DPI function loading 2022-02-13 23:07:27 +03:00
Triang3l 7fc940422c [UI] Windows AdjustWindowRect and GetClientRect usage cleanup 2022-02-13 23:01:25 +03:00
Triang3l be5f7db3ef [D3D12] Fixed-function state cleanup 2022-02-13 21:50:00 +03:00
Triang3l 325ae443da [D3D12] Rename current_cached_pipeline_ to current_guest_pipeline_ 2022-02-13 21:21:49 +03:00
Triang3l 10ec47e1fe [GPU] Move common-face polygon offset to draw_util 2022-02-13 21:18:02 +03:00
Triang3l 8d07c79897 [GPU] Cleanup RB_COLOR_MASK and RB_DEPTHCONTROL normalization 2022-02-13 20:50:31 +03:00
Triang3l 8ca67b8aa7 [Vulkan] Expose relevant portability subset features 2022-02-13 20:19:01 +03:00
Triang3l 0590346084 [Vulkan] Add Vulkan-Headers and VMA submodules 2022-02-13 20:08:08 +03:00
Triang3l 8ccb00d03d [SPIR-V] Store vfetch_full address in a variable 2022-02-07 23:00:23 +03:00
Triang3l e447cf6ed8 Merge branch 'master' into vulkan 2022-02-07 22:22:43 +03:00
Triang3l 9b1fdac986 [UI] UI common shaders to XeSL 2022-02-06 22:48:38 +03:00
Triang3l 4480437a3d [SPIR-V] xb genspirv > buildshaders + opt + remap + .xesl 2022-02-05 17:07:07 +03:00
Wunkolo ea992eda1f [x64] Fix missing BMI2 emit-feature detection
We only tested for BMI1 but not for BMI2, so we've been missing out on
BMI2 performance gains for a little while. Oops.
2022-02-05 12:08:32 +03:00
Triang3l 922efb13ce Merge branch 'master' into vulkan 2022-02-03 21:12:10 +03:00
Gliniak 613f5ebe02 [HID] Added option to turn off vibration 2022-02-03 09:12:31 +01:00
Gliniak 17b30be56a Added support for local multiplayer 2022-02-02 13:44:28 +01:00
Gliniak 332a9a2ec6 [XAM] Implemented XamCreateEnumeratorHandle
- Thanks Rick for providing names for parameters
2022-02-02 10:10:07 +01:00
Gliniak 7977d7ab98 [Base] Changed entry point to wmain for Windows
This prevents subapps from crashing when executing wmain specific functions
2022-02-01 15:50:48 -06:00
Triang3l 52ec0acd0c [App] Add text saying that post-processing is vendor-independent 2022-02-01 22:29:14 +03:00
Triang3l 413d7ded49 [UI] Android surface [skip appveyor] 2022-02-01 22:18:04 +03:00
Triang3l c6fc8f706a [Base] GetAndroidThreadJniEnv capitals, move JNI usage tips there 2022-02-01 21:33:20 +03:00
Gliniak 6ad5c39fac [XAM/Content] Implemented Custom CON Header Handling 2022-01-31 22:14:02 +01:00
Gliniak e9b9302cd3 [XAM] Small XamUserReadProfileSettings improvements 2022-01-31 21:39:56 +01:00
Radosław Gliński e8374d98fe Skip 0xbadf00d gpu packets 2022-01-31 20:27:13 +01:00
Gliniak 080a65cd4f [XAM] XGetLanguage: Get user language based on config 2022-01-31 20:26:03 +01:00
Gliniak 9ed3881b3b Skip indirect ringbuffer errors - Thermonuclear war achieved 2022-01-31 20:15:47 +01:00
Gliniak 3a772e60b0 XamContentCreate: Return X_ERROR_FUNCTION_FAILED for overlapped failures 2022-01-31 20:15:41 +01:00
Gliniak dfb4cadcfe Return success from DmRegisterCommandProcessor to prevent debug games from crashing 2022-01-31 20:15:25 +01:00
Gliniak 07a1e77218 Allow users to change max amount of queued frames 2022-01-31 20:12:39 +01:00
Gliniak 498dde6e1a Limit unspecified virtual allocation only to 3/4 of heap 2022-01-31 20:12:34 +01:00
Gliniak c20c7c930c XamEnumerate: Return X_ERROR_FUNCTION_FAILED for overlapped failures 2022-01-31 20:12:29 +01:00
Gliniak c4d64a0501 QueryRegionInfo: Adjust allocation_base to contain heap address 2022-01-31 20:12:24 +01:00
Gliniak ec976cdd33 InitializeRingBuffer - Clear buffer space to prevent random data readout 2022-01-31 20:12:20 +01:00
Gliniak c483da91a4 Stop unnecessary spam of 0x601 opcode usage 2022-01-31 20:11:53 +01:00
Gliniak 8e35a3d649 Invalidate input buffers if decoding fails
Should output be invalidated too?
2022-01-31 20:11:44 +01:00
Gliniak c80ea14d9d Check if input_buffer exist
In some really specific cases there is a chance that
one of the buffers is valid, but its pointer is null
2022-01-31 20:10:14 +01:00
Gliniak 0eaf032b71 Remove applying offset when min & max address range is provided 2022-01-31 20:09:51 +01:00
Gliniak f43e400c91 Do not block XMA when there is no work buffer available 2022-01-31 20:07:39 +01:00
Triang3l 009f709ad4 [Base] Remove Android jfieldIDs used only once from the file scope 2022-01-31 13:00:28 +03:00
Triang3l d998c13ee8 [Base] Explain why no Android activity in xenia-base [ci skip] 2022-01-31 12:12:57 +03:00
Triang3l 3f817fb241 [Base] Android JNIEnv attachment and LaunchWebBrowser 2022-01-30 23:35:40 +03:00
Triang3l d2ef8d3300 [Base] Android error reporting via SIGABRT/RuntimeException 2022-01-30 18:36:11 +03:00
Triang3l 50cf96ff36 [D3D12] Don't drain PSO preload creation queue if not queueing at all 2022-01-30 12:37:14 +03:00
gibbed 306ee85514 [App] Add Compatibility help menu item. 2022-01-29 08:02:20 -06:00
gibbed c6b2b1e8eb [App] Replace Website help menu item with FAQ. 2022-01-29 08:02:20 -06:00
gibbed 7019205810 [App] Rename ShowCommitID to ShowBuildCommit. 2022-01-29 08:02:20 -06:00
Triang3l 22eb8747d3 [GPU/Kernel] Fix space-prefixed hexadecimal number printing 2022-01-29 14:02:55 +03:00
Triang3l fe3f0f26e4 [UI] Image post-processing and full presentation/window rework
[GPU] Add FXAA post-processing
[UI] Add FidelityFX FSR and CAS post-processing
[UI] Add blue noise dithering from 10bpc to 8bpc
[GPU] Apply the DC PWL gamma ramp closer to the spec, supporting fully white color
[UI] Allow the GPU CP thread to present on the host directly, bypassing the UI thread OS paint event
[UI] Allow variable refresh rate (or tearing)
[UI] Present the newest frame (restart) on DXGI
[UI] Replace GraphicsContext with a far more advanced Presenter with more coherent surface connection and UI overlay state management
[UI] Connect presentation to windows via the Surface class, not native window handles
[Vulkan] Switch to simpler Vulkan setup with no instance/device separation due to interdependencies and to pass fewer objects around
[Vulkan] Lower the minimum required Vulkan version to 1.0
[UI/GPU] Various cleanup, mainly ComPtr usage
[UI] Support per-monitor DPI awareness v2 on Windows
[UI] DPI-scale Dear ImGui
[UI] Replace the remaining non-detachable window delegates with unified window event and input listeners
[UI] Allow listeners to safely destroy or close the window, and to register/unregister listeners without use-after-free and the ABA problem
[UI] Explicit Z ordering of input listeners and UI overlays, top-down for input, bottom-up for drawing
[UI] Add explicit window lifecycle phases
[UI] Replace Window virtual functions with explicit desired state, its application, actual state, its feedback
[UI] GTK: Apply the initial size to the drawing area
[UI] Limit internal UI frame rate to that of the monitor
[UI] Hide the cursor using a timer instead of polling due to no repeated UI thread paints with GPU CP thread presentation, and only within the window
2022-01-29 13:22:03 +03:00
Pseudo-Kernel 372bdd3ec9
[APU] XMA: Fix audio loop handling.
Handles audio loop if loop_start < loop_end.
Need to handle additional cases like loop_start > loop_end.
2022-01-29 02:49:00 -06:00
TranzRail 1d51b574ec [Kernel] Add PVR opcode (includes cvars support) 2022-01-29 02:44:55 -06:00
Wunkolo 24205ee860 [x64] Fix `VECTOR_SH{L,R,A}_V128(Int8)` masking
[AltiVec](https://www.nxp.com/docs/en/reference-manual/ALTIVECPEM.pdf)
doc says that it just uses the lower `log2(n)` bits of the shift-amount
rather than the whole element-sized value. So there is no need to handle
an overflow. Also adjusts 64-bit literals to utilize the explicit
`UINT64_C` type.
2022-01-29 02:39:34 -06:00
Wunkolo f8350b5536 [x64] Add `VECTOR_SH{R,L}_I8_SAME_CONSTANT` unit test
This is to target the new GFNI-based optimization for the Int8 case.
2022-01-29 02:39:34 -06:00
Wunkolo bd9a290b30 [x64] Add `GFNI`-based optimization for `VECTOR_SH{R,L}_V128(Int8)`
In the `Int8` case of `VECTOR_SH{R,L}_V128`, when all the values are the
same, then a single-instruction `gf2p8affineqb` can be emitted that does
an int8-based arithmetic-shift, utilizing GF(8) arithmetic.

More info here:
https://wunkolo.github.io/post/2020/11/gf2p8affineqb-int8-shifting/

Also fixes the iteration-type for when detecting if all of the simd
lanes are the same value(was iterating `u16` and not `u8`)
2022-01-29 02:39:34 -06:00