Commit Graph

5333 Commits

Author SHA1 Message Date
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 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 f9261811a9 [D3D12] Fix layouts_mutex_ lock naming 2022-05-15 18:52:28 +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 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 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 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 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 3d48fde5ca [GPU] XeSL texture load shaders + minor XeSL cleanup 2022-04-04 21:48:27 +03:00
Triang3l c4eae232f1 [D3D12] Fixes/cleanup for render targets and barriers 2022-04-02 22:44:10 +03:00
Triang3l 0f3207d019 [Vulkan] Fix basePipelineIndex signedness 2022-03-28 21:57:44 +03:00
Triang3l 3a07559df9 [GPU] XeSL host depth store and VS passthrough shaders 2022-03-27 16:15:53 +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 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 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 9e803ccf25 [D3D12] Pad kBlendOpMap with dummy values for all 3 bits 2022-02-15 23:02:26 +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 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 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
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