Commit Graph

5066 Commits

Author SHA1 Message Date
Triang3l 24bf39e942 [D3D12] ROV: Don't clamp during blending for floats 2018-10-21 13:44:35 +03:00
Triang3l eb185ab64c [D3D12] ROV: Clamp float16 to 65504 to prevent Infinity 2018-10-20 21:50:57 +03:00
Triang3l 24ebe6b1a7 [D3D12] ROV: Non-IEEE multiplication in blending 2018-10-20 17:58:02 +03: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
Triang3l 1d97fe7d53 [D3D12] ROV: Declare SV_IsFrontFace in the depth-only shader 2018-10-19 12:30:09 +03:00
Triang3l 18ef1248f9 [D3D12] ROV: Use front face stencil for back face when needed 2018-10-19 11:55:01 +03:00
Triang3l c1e78f6953 [D3D12] ROV: Broken stencil test 2018-10-19 11:33:50 +03:00
Triang3l ea2864d21e [D3D12] ROV: Stencil constant declarations 2018-10-18 23:02:25 +03:00
Triang3l d214c62c78 [D3D12] ROV: Fix write mask source 2018-10-18 20:59:24 +03:00
Triang3l f48ea20880 [D3D12] ROV: Track which RTs and components have been actually written 2018-10-18 14:54:33 +03:00
Triang3l 1860bc6a59 [D3D12] Display whether ROV is actually used in the title 2018-10-17 17:53:37 +03:00
Triang3l f5a90faeab [D3D12] ROV: Separate depth and stencil discard/writing 2018-10-17 16:22:24 +03:00
Triang3l 1c6d753e55 [D3D12] ROV: Depth test refactoring 2018-10-17 15:23:58 +03:00
Triang3l 6c0ffe881a [D3D12] ROV: Min/max blend operations 2018-10-17 13:04:03 +03:00
Triang3l 17a737a358 [D3D12] Display ROV support in the window title 2018-10-16 21:19:45 +03:00
Triang3l 37fe120fe0 [D3D12] ROV: Write mask, write in ascending RT number order 2018-10-16 20:50:01 +03:00
Triang3l e8414da5dd [D3D12] ROV: Fix depth format system constant setting 2018-10-16 18:08:18 +03:00
Triang3l 5f2c4500d6 [D3D12] ROV: Clamp values participating in blending 2018-10-16 15:02:08 +03:00
Triang3l 2d56c9ae30 [D3D12] ROV: Empty pixel shader for depth-only drawing 2018-10-16 14:02:43 +03:00
Triang3l 6e9964b43e [D3D12] ROV: Fix depth testing 2018-10-15 23:16:34 +03:00
Triang3l e455467c32 [D3D12] ROV: Non-working depth testing code 2018-10-15 22:13:06 +03:00
Christian Hawley add23849bf [CPU] Implement lmw and stmw instructions 2018-10-14 13:57:45 -04:00
Triang3l fa968a9ecd [D3D12] ROV: Fix 7e3 denormal read 2018-10-14 16:05:11 +03:00
Triang3l 5395183d98 [D3D12] ROV: 64bpp load/store 2018-10-14 14:38:04 +03:00
Triang3l eb8596d72a [D3D12] ROV: Cleanup format system constants 2018-10-14 12:04:39 +03:00
Triang3l 518535bbd3 [D3D12] ROV 7e3 reading 2018-10-13 20:19:42 +03:00
Triang3l 148a713280 [D3D12] ROV 7e3 writing 2018-10-13 19:10:25 +03:00
Triang3l c8a48f9c1c [D3D12] ROV: Blending fixes 2018-10-13 17:44:04 +03:00
Triang3l efc7f794ed [D3D12] DXBC: Fix position/color use after free, fix ROV color load/store 2018-10-13 15:38:49 +03:00
Triang3l f98a4d11ea [D3D12] ROV: A bit of non-working blending code 2018-10-13 14:33:22 +03:00
Triang3l 60c7f11fe0 [D3D12] Blend constant values 2018-10-12 23:56:49 +03:00
Justin Moore 2fa7607547
Merge pull request #1086 from bwrsandman/xenia-build-test-bin-path
[Test] Fix build_bin_path for case sensitive FS
2018-10-12 15:08:04 -05:00
Triang3l 5f108246b6 [D3D12] ROV: Blending constant declaration 2018-10-12 22:28:07 +03:00
Triang3l 74c9c2c724 Merge branch 'd3d12' of github.com:xenia-project/xenia into d3d12 2018-10-12 20:08:50 +03:00
Triang3l 10a3dc6d94 [D3D12] ROV: 32-bit loading, except for 7e3 2018-10-12 20:07:00 +03:00
Triang3l 013087108b [D3D12] ROV: Used render targets flags 2018-10-12 12:32:48 +03:00
Triang3l 3dc15dbb44 [D3D12] ROV: 32bpp storing (except for 7e3) 2018-10-12 09:59:31 +03:00
Triang3l 615fade64e
[D3D12] ROV: Fix EDRAM pitch shader constant size 2018-10-11 19:59:35 +03:00
Triang3l 197b1d8114 [D3D12] ROV: EDRAM offset calculation 2018-10-11 10:16:36 +03:00
Triang3l 8cde541596 [D3D12] ROV: Binding 2018-10-10 18:33:39 +03:00
Triang3l 67e5cb8681 [D3D12] ROV: Disable RTs when using ROV 2018-10-10 16:37:35 +03:00
Triang3l 6d2e74325c [D3D12] ROV: Check if supported 2018-10-10 14:30:29 +03:00
Triang3l 90f700c785 [D3D12] Analysis: Display fetch constant contents if type is wrong 2018-10-10 12:44:02 +03:00
Triang3l 7bc79cbd01 [D3D12] Signed texture SRVs 2018-10-09 21:44:18 +03:00
Triang3l 7603de218b [D3D12] DXBC part of signed textures 2018-10-09 08:31:09 +03:00
Triang3l 6a6e63060b [D3D12] Submit barriers before uploading gamma ramp 2018-10-08 19:42:02 +03:00
Triang3l fccebae703 [D3D12] PIX: Capture with F4, disable tiled resources when attached 2018-10-08 12:05:15 +03:00
Triang3l 16dc6e4100 [D3D12] DXBC: In getWeights, apply the offset for unnormalized coordinates only when needed 2018-10-07 21:51:18 +03:00