Commit Graph

4034 Commits

Author SHA1 Message Date
gibbed 7ae0e2b8e5 [Kernel] Fix Travis whining. 2018-11-20 16:05:45 -06:00
gibbed 4f2326e5d7 [Kernel] Oops. 2018-11-20 15:52:15 -06:00
gibbed 5b776b99da [Kernel] Move xboxkrnl_threading to new shim convention. 2018-11-20 15:49:06 -06:00
gibbed d7fc74d788 [Kernel] Move xam_ui to new shim convention. 2018-11-20 14:53:00 -06:00
gibbed 2247742494 [Kernel] Add command-line flag to toggle XEX patching. 2018-11-20 14:48:32 -06:00
gibbed 7e78a79a2d [Kernel] Add a note to previous commit. 2018-11-20 14:25:18 -06:00
gibbed de34bd81db [Kernel] Set default license mask when available in XamContentCreateEx. 2018-11-20 14:24:13 -06:00
gibbed ff0b8a67cd [Kernel] Tag XamContentGetLicenseMask as high frequency. 2018-11-20 13:53:46 -06:00
gibbed e1d448f630 [Kernel] Move xam_content to new shim convention. 2018-11-20 13:50:31 -06:00
gibbed 927acf1902 [Kernel] Fix a minor typo. 2018-11-20 13:05:38 -06:00
gibbed 394105d359 [CPU/Kernel] Cleanup and rework of how kernel exports are declared. 2018-11-20 13:03:17 -06:00
gibbed 613be1425e [Kernel] Update XamContentOpenFile argument names. 2018-11-20 13:03:17 -06:00
Rick Gibbed c65ee2aa48
Merge pull request #1226 from chris-hawley/master
[JIT] stmw/lmw
2018-11-20 08:43:26 -06:00
gibbed dafed58e98 [Kernel] Implement MmAllocatePhysicalMemory. 2018-11-19 22:04:44 -06:00
gibbed 4f50e0e6c7 [Kernel] Implement RtlCopyString, RtlCopyUnicodeString. 2018-11-19 21:03:05 -06:00
Dr. Chat 95701f188d [x64] Dynamically link to growable function tables 2018-11-18 21:21:36 -06:00
Triang3l 7fa453c813 [GPU] Fix 1-component ALU instruction swizzle (hopefully) 2018-11-18 22:20:43 +03:00
Dr. Chat c9797dde2a [CPU] Fix switch variable scoping 2018-11-18 11:35:23 -06:00
gibbed 4436616e6d [x64] Use constant a bit earlier in VECTOR_SHL_V128. 2018-11-18 08:17:04 -06:00
gibbed 44f194be35 [x64] Fix constant access in VECTOR_SHL_V128. 2018-11-18 08:13:37 -06:00
gibbed 3ced6c5cf2 [CPU] Add constant VectorAverage. 2018-11-18 08:13:37 -06:00
Rick Gibbed 21b8620bf5
Merge pull request #1264 from bmzhao/fix-failing-linux-build
Fix Linux build errors due to missing virtual destructors
2018-11-17 18:03:09 -06:00
NPCompete da66c68bf6 [CPU] Made xe::cpu::StackWalker destructor virtual since it is an abstract class. 2018-11-17 14:50:30 -08:00
NPCompete 7c24f8e09f [Kernel] Made xe::kernel::App destructor virtual since it is an abstract class. 2018-11-17 14:50:00 -08:00
Rick Gibbed b8b1775837
Merge pull request #1260 from alan-shaffer/thread-name-fix
[Kernel] Don't dereference null pointers in SetThreadName.
2018-11-17 16:40:23 -06:00
Dr. Chat aa14741e74 [x64] Fix unwind info bug; Cleanup win code cache 2018-11-17 14:40:25 -06:00
Dr. Chat 69af4a21ac [x64] Fill unwind reservation info bytes with 0xCC as well 2018-11-17 11:04:25 -06:00
alan bad8c4b0c5 [Kernel] Don't dereference null pointers in SetThreadName. 2018-11-13 11:10:21 -05:00
Triang3l c949ce3d9c
[Base] StringBuffer: Clear the C string in Reset 2018-11-10 16:33:40 +03:00
Rick Gibbed 128fb32698
Merge pull request #1253 from emoose/compressed-xex-fix
[CPU] Fix some compressed XEXs trying to decompress past the actual image size, causing errors
2018-11-09 20:27:01 -06:00
emoose 7f479ffb79 [Kernel] Remove item limit from enumerators, fixes #1255
Like said in that issue, it seems the limit passed to XamContentCreateEnumerator is actually a limit on how many results XamEnumerate should return per call, not a limit on the number of enumeration items in total.
These changes fix Sonic Unleashed not loading more than 1 DLC (it passes 1 as the limit, but then loops over XamEnumerate to load in each DLC one at a time), and likely many other games.
2018-11-07 22:47:59 +00:00
emoose ab53cf2a82 [CPU] Fix some compressed XEXs decompressing past the image size 2018-11-05 19:47:18 +00:00
emoose bbb5c938ec [CPU] Fix XexModule::FindSaveRest not finding functions properly 2018-11-01 15:50:56 +00:00
Triang3l 3b584a5f1c [Kernel] Clang-format user_module.cc 2018-10-29 11:21:26 +03:00
Dr. Chat c95ba803a8 Merge branch 'xexp' 2018-10-28 12:20:02 -05:00
Dr. Chat 7443b7e61f [CPU] Rename ImportLibrary fields to follow naming conventions 2018-10-28 09:41:31 -05:00
Rick Gibbed 6a39d4b1f5
Merge pull request #1240 from 0x8080/Exports
[Kernel] Define all exports for xboxkrnl/xam/xbdm
2018-10-23 18:30:04 -05:00
0x7FFFFFFF 96bb9b04da [Kernel] Define all exports for xboxkrnl/xam/xbdm 2018-10-23 17:26:47 -06:00
gibbed a33b13c174 [Kernel] Stub XamShowNuiTroubleshooterUI. 2018-10-23 17:48:10 -05:00
gibbed 3a64cf64e0 [Kernel] Stub HidReadKeys. 2018-10-23 16:43:31 -05:00
Triang3l 76c14f7e58 [APU] Load XAudio2_8.dll dynamically 2018-10-23 23:34:41 +03:00
Triang3l 00adfcadf9
[UI] Fix build error in file_picker_win.cc using decltype 2018-10-23 10:54:16 +03:00
Triang3l 2b03a9e095 [GPU] Synchronize GPU frontend with the D3D12 branch 2018-10-22 23:28:52 +03:00
emoose bf039172cf [Kernel] Add null pointer checks to xmp_app handlers 2018-10-22 18:01:09 +01:00
emoose 67f0e487f4 [Kernel] Fix _snwprintf not having format_core wide = true 2018-10-22 18:00:01 +01:00
emoose 6e74ba93d6 [CPU] Add support for delta patches using *_offset fields 2018-10-22 12:26:14 +01:00
emoose d2fd109af3 [CPU] Add more asserts for XEXP descriptor (+ log a warning) 2018-10-20 05:08:14 +01:00
emoose 265903fe66 [CPU] Add XEXP support to XexModule, if XEXP is in same folder as XEX
This was a headache to work out, big thanks to the lack of documentation on .xexp files... a ton of guesswork was involved here but luckily it turned out well.

I did have to make some pretty major changes to the way XEX files are loaded though.
Previously it'd just load everything in one go: XEX headers -> decrypt/decompress data -> load imports/symbols -> set loader data table entries, etc...

Now it's changed to something like this:
- Load base XEX headers + decrypted/decompressed image data, return X_STATUS_PENDING
- In the LoadFromFile call used to load the XEX, search for XEXP patch file (only .xexp in same folder atm)
- If patch exists: load XEXP, decrypt headers/data, apply patch to base XEX, dispose of XEXP
- Finish XEX load via LoadXexContinue() (handles imports/symbols/loader data...)

This saves us from needing to reset the imports/function/symbol stuff after patching (since all the XEX code will be a lot different), but I'm not really sure if I went about it the best way.
2018-10-20 04:36:21 +01:00
emoose 0b7f7e1657 [CPU] Move XEX2 code into XexModule class, autodetect XEX key
Code is mainly just copy/pasted from kernel/util/xex2.cc, I've tried fixing it up to work better in a class, but there's probably some things I missed.

Also includes some minor improvements to the XEX loader, like being able to try both XEX keys (retail/devkit) automatically, and some fixes to how the base address is determined.

(Previously there was code that would get base address from optional header, code that'd get it from xex_security_info, code that'd use a stored base address value...
Now everything reads it from a single stored value instead, which is set either from the xex_security_info, or if it exists from the optional header instead.
Maybe this can help improve compatibility with any weird XEX's that don't have a base address optional header?)

Compressed XEX loader also has some extra checks to make sure the compressed data hash matches what's expected.
Might increase loading times by a fraction, but could save reports from people unknowingly using corrupt XEXs.
(still no checks for non-compressed data though, maybe need to compare data with xex_security_info->ImageHash?)
2018-10-20 04:18:18 +01:00
Christian Hawley add23849bf [CPU] Implement lmw and stmw instructions 2018-10-14 13:57:45 -04:00
Dr. Chat 37e59464c2 [UI] Undo warning fix in file_picker_win.cc 2018-09-10 20:38:58 -05:00
Justin Moore 91c53f975e
Merge pull request #1209 from Triang3l/all_format_info
[GPU] Add info about unknown texture formats
2018-09-07 17:08:07 -05:00
Justin Moore 413a04eb1b
Merge pull request #1211 from Triang3l/patch-1
[GPU] Add texture signedness enumeration
2018-09-06 19:26:06 -05:00
gibbed de43afbb54 Fix warnings when building on newer Windows 10 SDK versions. 2018-08-25 14:23:20 -05:00
Triang3l 1a4fc3bde2
[GPU] Add texture signedness enumeration
For sign_x, sign_y, sign_z and sign_w fields of xe_gpu_texture_fetch_t.
2018-08-19 15:25:20 +03:00
Triang3l d75a372780 [GPU] Add info about unknown texture formats 2018-08-05 14:02:58 +03:00
gibbed ba7dc6b2d7 [GPU] Improve readability of initialization errors and remove references to OpenGL. 2018-07-01 16:50:03 -05:00
Rick Gibbed 94d1106386
Merge pull request #1177 from Triang3l/depthbias.
[GPU] Depth bias support
2018-07-01 01:34:34 -05:00
gibbed 15eb6ed2d9 [Vulkan] Fix GetMipExtent calculating mip extent incorrectly. 2018-07-01 01:31:33 -05:00
gibbed 4357415892 [GPU] Better names for tiled functions. 2018-07-01 01:30:22 -05:00
Rick Gibbed 724086dcad
Merge pull request #1189 from Triang3l/vpk_vupk_constants.
[CPU] Unify constant operand checks in pack/unpack
2018-07-01 01:23:11 -05:00
Rick Gibbed f24dbaa21b
Merge pull request #1176 from Triang3l/xex_exe_extension.
[Core] Treat .exe files as XEX
2018-07-01 01:14:04 -05:00
Dr. Chat f89b4626a3 [VFS] Add VFS dump tool (supporting STFS only as of now) 2018-06-26 13:45:16 -05:00
Triang3l dd19701dc4 [CPU] Unify constant operand checks in pack/unpack 2018-06-18 13:55:46 +03:00
Triang3l c6255af824 [GPU] Depth bias support 2018-06-16 16:32:14 +03:00
Unknown 86443dd28a Persist title-specific profile content 2018-06-13 19:37:15 -07:00
Triang3l c89cc6a229 [CPU] vupkd3d: NaN on negative overflow and tests 2018-06-11 21:34:13 +03:00
Triang3l 0378f532ab [CPU] Fix W in 2101010 vupkd3d and revert untested saturation 2018-06-11 17:22:15 +03:00
Triang3l bd02fd31bd [Core] Treat .exe files as XEX 2018-06-09 10:24:11 +03:00
gibbed 5f16e46282 [Core] Do a case-insensitive compare for extension when launching a path. Fixes #1175. 2018-06-09 01:22:45 -05:00
gibbed c11cce2d3b Oops. Fix premake for xenia-ui-window-vulkan-demo. 2018-06-08 10:09:12 -05:00
gibbed fb9eb84893 Fix premake for xenia-hid-demo and xenia-ui-window-vulkan-demo. 2018-06-08 09:52:35 -05:00
gibbed 40e8d78d16 [Kernel] Allow specifying of additional command-line passed to guest. 2018-06-06 19:56:03 -05:00
gibbed 43b987da1e [HID] Make winkey key checks more readable. 2018-06-05 08:15:59 -05:00
gibbed 8d5d6c5a59 [HID] Allow shift in winkey input to toggle d-pad in addition to capslock. 2018-06-05 08:13:51 -05:00
gibbed 1409b9c565 [GPU/Vulkan] Add support for 2D image stacks. 2018-06-05 07:51:51 -05:00
gibbed 4caa2a2145 [Vulkan] Blacklist some validation layer errors we don't care about. 2018-06-04 23:37:58 -05:00
gibbed 486172770d [GPU] Ignore min mip level when one is specified and there is no mip address. 2018-06-04 22:54:41 -05:00
gibbed aba0f3c628 [GPU] Ensure pitch/height are a multiple of block size for host textures. 2018-06-04 22:53:30 -05:00
gibbed 2c7043bd98 [GPU/Vulkan] Maybe fix minimum mip level. Probably breaks everything. 2018-06-04 10:13:28 -05:00
gibbed b5a88d1a7d [GPU] Track unaligned (visible) block width in texture info.
[Vulkan] Don't use power of two for mip width/height calculation for host textures.
[Vulkan] Add more Vulkan error logging.
[Vulkan/GPU] Rudimentary texture dumping.
2018-06-04 06:08:29 -05:00
gibbed b35fe935f9 [GPU] Ignore mipmap level count when mip data address is invalid. 2018-06-01 22:04:31 -05:00
gibbed 0d429fc7d7 [Vulkan] Disable texture mipmap watches by default. 2018-05-31 23:00:11 -05:00
gibbed 79f8fe9f37 [GPU] Fixes to problems caused by previous commit (bad handling of memory addressing, watches, etc). 2018-05-31 21:50:22 -05:00
gibbed 9ac2bf0beb [Kernel] Fix fetch field name that was changed. 2018-05-31 20:17:03 -05:00
gibbed e329649f2e [GPU] Rename texture_memory_usage.cc to texture_extent.cc 2018-05-31 19:43:26 -05:00
gibbed e89a31006f - [GPU] Rename TextureMemoryUsage to TextureExtent (and relevant functions/etc).
- [GPU] Precalculate memory byte usage for base mip (and any additional mip levels).
- [GPU] Change TextureCache::WatchCallback so that if it's fired multiple times for the same texture it does not assert.
- [GPU] Add write watches for texture memory associated with additional mipmap levels.
2018-05-31 19:41:33 -05:00
gibbed cd39bbed5c [Base] Undo last commit because it breaks file redirection.
This reverts commit ceece673e8.
2018-05-31 17:22:50 -05:00
gibbed ceece673e8 [Base] Fix AttachConsole so that --help works when invoked from command-line. 2018-05-31 16:46:03 -05:00
gibbed d0df71b8b6 [Vulkan] Move texture config to its own files. 2018-05-31 10:35:58 -05:00
gibbed 1573b7570d [Vulkan] Apply distinct component and vector swizzles. 2018-05-31 10:29:08 -05:00
gibbed 2314f25fb7 [Vulkan] Force red channel into all channels for DXT5A. Probably wrong solution but will work for now. 2018-05-31 09:47:41 -05:00
Triang3l 06fcdef968 [CPU] Bring back saturation in D3DCOLOR vpkd3d128 2018-05-31 16:17:27 +03:00
gibbed 958aa04cc5 [Vulkan] Fix swizzle for DXT5A. 2018-05-31 07:31:33 -05:00
Triang3l d61aff4389 [CPU] v(u)pkd3d128: Support UINT_2101010 and don't saturate D3DCOLOR
Fix broken mesh polygons in the Call of Duty series. Also remove saturation of D3DCOLOR when packing because values near 3 may be accepted, while unpacking D3DCOLOR gives values near 1.
2018-05-31 14:42:11 +03:00
gibbed ec3ab0adbd [GPU] Stub out context update GPU opcode.
[Vulkan] Gracefully handle vertex upload failures.
2018-05-30 20:49:30 -05:00
gibbed bbebfd49c8 [Vulkan] Add logging to certain error conditions.
[Vulkan] Track both texture block height and texture block vertical pitch.
[Vulkan] Only convert the necessary visible height on texture uploads.
[Vulkan] Fix write watch on texture data so it properly only covers mip 0 data.
2018-05-30 19:38:36 -05:00
gibbed 7068d0a5a9 [Vulkan] More details in texture upload logging. 2018-05-30 18:19:37 -05:00
gibbed 6b2f75219c [Vulkan] Include format/dimension in render texture debug name. 2018-05-30 18:19:06 -05:00
gibbed 2d68ec162d [Vulkan] Remove unnecessary swizzles. 2018-05-30 18:16:11 -05:00
gibbed 8a099925f3 Shut Travis up. 2018-05-30 10:09:19 -05:00
gibbed 6e000039e8 [Vulkan] Maybe fix the rectangle list shader, part two! Probably still breaks everything. 2018-05-30 09:56:44 -05:00
gibbed 8882d7eebd [Vulkan] Maybe fix the rectangle list shader. Probably breaks everything. 2018-05-30 08:04:16 -05:00
gibbed fed60962d6 [Vulkan] Regenerate shaders, and explicitly require the extensions they depend on. 2018-05-30 08:04:16 -05:00
Dr. Chat ef18e9d649 [VFS] Fix Stfs GetBlockHash (and simplify it) 2018-05-29 23:12:27 -05:00
DrChat f518ec1b37 [GPU] Add coherency debug logs 2018-05-29 19:42:59 -05:00
Dr. Chat a0464f54ba [VFS] SVOD (with EGDF) support 2018-05-29 14:12:09 -05:00
gibbed 62bb26878f [GPU] Whoops, CompositeExtract should come after the loads. 2018-05-28 21:10:11 -05:00
gibbed 3e6a9099d1 [GPU] Fix composite extracts from previous commit. 2018-05-28 20:34:53 -05:00
gibbed 83a9cb3435 [GPU] Use uint4 for loop/bool constants to meet std140 packing requirements. 2018-05-28 18:19:22 -05:00
gibbed 2bd9bae0f4 [Vulkan] Better swizzle for DXT3A/DXT5A? 2018-05-28 17:25:32 -05:00
gibbed e665c0a3fb Fix another Travis complaint. 2018-05-28 14:42:53 -05:00
gibbed f450ae6a76 Fix lint errors due to Travis lint differences. 2018-05-28 07:14:18 -05:00
gibbed 425764698e [Vulkan] Improvements to texture upload code, fix mipmap uploads, remove no_mipmaps flag. 2018-05-28 07:06:33 -05:00
gibbed b623c33e00 [Vulkan] Add no_mipmaps flag. 2018-05-27 20:36:45 -05:00
gibbed 73c7546114 [Kernel] Fix return of XamUserGetXUID and XamUserGetSigninInfo. 2018-05-27 19:51:25 -05:00
gibbed da06cb4f06 [Kernel] Fix return of XamUserGetDeviceContext. 2018-05-27 19:43:44 -05:00
gibbed dc5bd83098 [Kernel] Move xam_user to new shim convention. 2018-05-27 19:43:39 -05:00
gibbed fc0cc89a1d [Kernel] Add X_HRESULT_result. (yes, the name is stupid) 2018-05-27 18:12:48 -05:00
gibbed ee7b9f415a [Kernel] Move xam_input to new shim convention. 2018-05-27 16:59:07 -05:00
gibbed 4cc2aaf5b9 Remove unnecessary usage of xe::be. 2018-05-27 16:35:01 -05:00
Dr. Chat fed3c10c60 [VFS] Properly detect STFS volume descriptor type 2018-05-27 14:03:29 -05:00
Dr. Chat 3e216f0553 [VFS] Panic when fed a GoD container 2018-05-26 21:19:34 -05:00
Dr. Chat 728ed593ad [VFS] Make ResolvePath / Dump virtual 2018-05-26 18:51:03 -05:00
gibbed 9231317eeb [Vulkan] Generalize texture conversion, and fix cube textures in the process. 2018-05-26 11:19:52 -05:00
Dr. Chat 1def8cfc59 [VFS] Rename a couple STFSVolumeDescriptor fields 2018-05-26 09:06:10 -05:00
gibbed 7df45bf590 [Vulkan] Fix DXT3A conversion. 2018-05-26 08:25:25 -05:00
gibbed cc130e1b07 [GPU] Remove unused code. 2018-05-26 07:06:56 -05:00
gibbed 7116b5fc82 [Vulkan] Reimplemented texture conversions. Here be dragons! Probably breaks everything. Also bonus DXT3A support. 2018-05-26 06:57:16 -05:00
gibbed 926464cb90 [App] Put DEBUG/CHECKED into the window title when appropriate. 2018-05-26 06:29:08 -05:00
gibbed 73d75c56e1 [GPU] Fix TextureInfo::Prepare for 3D textures. 2018-05-24 23:45:38 -05:00
gibbed 56dd07e329 [Kernel] Add yield to XAudioGetVoiceCategoryVolumeChangeMask for games that spin threads with it. 2018-05-24 23:31:21 -05:00
gibbed 8e9d50dd4a [Kernel] Fix XamUserGetSigninInfo to zero out info even in failure. 2018-05-24 12:41:13 -05:00
gibbed 14c73a33f9 [Kernel] Fix return of CreateContent/OpenContent in ContentManager when an already open package was found. 2018-05-24 11:17:56 -05:00
gibbed 85ad87eb73 [Kernel] Fix ContentPackage leaking its registered device. 2018-05-24 11:17:52 -05:00
gibbed 6411674f0f [GPU] Use pitch for block width calculation. 2018-05-24 08:45:12 -05:00
gibbed bc7306b352 [Kernel] Fix XamLoaderGetLaunchDataSize to set size to 0 for games that don't check its return value. 2018-05-24 03:26:29 -05:00
gibbed 4613c6b8b8 [Vulkan] Better macro for channel swizzling. 2018-05-23 20:37:32 -05:00
gibbed e9290cd2e0 [Vulkan] Rework component swizzles into channel swizzles. Probably breaks everything. 2018-05-23 20:19:53 -05:00
gibbed d0561d046b [Kernel] Handle title being null in XamShowMessageBoxUI. 2018-05-23 13:30:59 -05:00
gibbed 2ef3ea996f [Kernel] Experimental debug monitor/PIX code. 2018-05-23 05:10:39 -05:00
gibbed 09585eb103 [GPU] Clarify assert in SpirvShaderTranslator::StoreToResult. 2018-05-23 04:55:32 -05:00
gibbed 9e153c0db1 [App] Add optional scratch/cache mounts. 2018-05-23 04:55:18 -05:00
gibbed 712a2afdf4 [Kernel] Correct GammaType enum. 2018-05-23 04:25:19 -05:00
gibbed bc369e43cb [Kernel] Add support for XFileEndOfFileInformation. 2018-05-23 04:24:37 -05:00
DrChat 6262dd2c3d [App] Actually set a high-performance timer 2018-05-22 22:20:34 -05:00
DrChat 288af1c7e9 [App] Add a flag to toggle high-performance timers 2018-05-22 17:31:30 -05:00
DrChat 73c30d87a8 [App] Request high-performance timer resolution on Windows 2018-05-22 16:41:05 -05:00
gibbed cb4b1bae1b [Vulkan] Forgot to undef the new RRRR swizzle macro. 2018-05-22 11:07:27 -05:00
gibbed 9bc17cd1d4 [Vulkan] Maybe fix DXT5A? 2018-05-22 10:52:52 -05:00