Commit Graph
3261 Commits
Author SHA1 Message Date
Ryan Houdek 48955da5f3 Thunks: Fix missing libdrm include path 2021-10-11 19:43:36 -07:00
Ryan Houdek 6cd73a6724 Merge pull request #1303 from Sonicadvance1/destdir_thunks
Thunks: Respect DESTDIR environment variable
2021-10-11 06:18:58 -07:00
Ryan Houdek 8dfe305aab Merge pull request #1302 from Sonicadvance1/missing_header_xcb
Thunks: XCB Add missing header file
2021-10-11 06:18:50 -07:00
Ryan Houdek f2ef58630c Thunks: Respect DESTDIR environment variable
This allows local install to actually work
2021-10-08 20:57:23 -07:00
Ryan Houdek de8d8d8751 Thunks: XCB Add missing header file 2021-10-08 20:49:19 -07:00
Ryan Houdek 27072d2853 Docs: Update for release FEX-2110 FEX-2110 2021-10-08 16:29:35 -07:00
Ryan Houdek 0dc8e23342 Merge pull request #1301 from Sonicadvance1/thunk_versioning
Thunks: Support versioned libraries
2021-10-08 03:01:04 -07:00
Ryan Houdek b102714d5c Thunks: Support versioned libraries
We can't expect users to have development libraries installed.
Load the versioned libraries if they exist instead

Also load them in global namespace, which is required for getting
symbols.

Behaviour on x86-64 host seems sporatic here, not sure if unintended
feature.
Doesn't quite behave the same on AArch64 host
2021-10-08 02:41:37 -07:00
Ryan Houdek 72125c9ccf Merge pull request #1300 from Sonicadvance1/thunksdb_global_file
Thunks: Install a global thunksDB for our current thunks
2021-10-08 02:02:28 -07:00
Ryan Houdek 9a07b550f3 Merge pull request #1298 from Sonicadvance1/libgl_thunks
Thunks: Adds a few missing libGL thunk functions
2021-10-08 02:02:17 -07:00
Ryan Houdek 351412a3e3 Thunks: Install a global thunksDB for our current thunks
This covers the x86_64 definitions, in the future we can have the 32-bit
versions in here as well.
2021-10-07 20:20:34 -07:00
Ryan Houdek 842ab169ce Thunks: Adds a few missing libGL thunk functions
These should really be autogenerated by we aren't there yet.
For now this misses some function aliases which fixes Mangohud when
using GL thunking.
2021-10-07 19:15:57 -07:00
Ryan Houdek b3efb1d2d7 Merge pull request #1296 from Sonicadvance1/vulkan_thunks
Vulkan thunks
2021-10-07 12:49:08 -07:00
Ryan Houdek 0d0ce38050 Thunks: Disable malloc libraries
Keeping this in the commit history to go back to later.
While these are required for static-pie builds to work, with the glibc
bug we can't use those yet.
Disable for now since it is is unnecessary.
2021-10-06 11:53:48 -07:00
Ryan Houdek cb21f52f93 Thunks: Have the ThunkHandler load the FEX malloc symbol libraries
If the thunk configuration is enabled then preemptively load the
libraries. Since they will need to be loaded for any thunking library.

This is because we need to ALWAYS share the allocators to the thunks.
2021-10-05 23:51:26 -07:00
Ryan Houdek 14b0cc5af4 Thunks: Wires up all the new thunks to the generators 2021-10-05 23:51:26 -07:00
Ryan Houdek c0fc4c4623 Thunks: Adds libvulkan
This is specifically the device loader rather than the libvulkan loader
library.
This is meant to override what is provided in the ICD files, not the
loader.

There's no real need to replace the loader, it's quite complex
2021-10-05 23:51:26 -07:00
Ryan Houdek c3230f6a91 Thunks: Adds libdrm 2021-10-05 23:51:26 -07:00
Ryan Houdek 4a3bd7cd13 Thunks: Adds libxshmfence 2021-10-05 23:51:26 -07:00
Ryan Houdek f98627da32 Thunks: Adds libxcb_xfixes 2021-10-05 23:51:26 -07:00
Ryan Houdek f3c20f2743 Thunks: Adds libxcb_sync 2021-10-05 23:51:26 -07:00
Ryan Houdek ec6140fde0 Thunks: Adds libxcb_shm 2021-10-05 23:51:25 -07:00
Ryan Houdek c5490821fc Thunks: Adds libxcb_randr 2021-10-05 23:51:25 -07:00
Ryan Houdek c0aad64578 Thunks: Adds libxcb_present 2021-10-05 23:51:25 -07:00
Ryan Houdek 7381240fb6 Thunks: Adds libxcb_glx 2021-10-05 23:51:25 -07:00
Ryan Houdek 3ea8e4864d Thunks: Adds libxcb_dri3 2021-10-05 23:51:25 -07:00
Ryan Houdek 7bf8d09391 Thunks: Adds libxcb_dri2 2021-10-05 23:51:25 -07:00
Ryan Houdek 798c6772b7 Thunks: Adds libxcb 2021-10-05 23:51:25 -07:00
Ryan Houdek 29debcda3d Thunks: Adds FEX malloc libraries
These are required to expose FEX's allocators to the guest.
Which is required when we are compiled with jemalloc, otherwise
the libraries will crash on allocations.

This needs to be done in stages otherwise glibc will load the library
and as it is setting up symbols, replace malloc, which isn't set
currently and cause a crash
2021-10-02 18:12:07 -07:00
Ryan Houdek 39c1751215 Thunks: Adds a few more features to Generator python file
This will be necessary for Vulkan
2021-10-02 18:05:03 -07:00
Ryan Houdek 9451bc5273 Thunks: Pass Vulkan XML to the thunks generators 2021-10-02 18:03:24 -07:00
Ryan Houdek e2b24f7f59 Thunks: Support thunk init function on host
Allows library to have an additional initialization function
2021-10-02 17:54:30 -07:00
Ryan Houdek 4589876ebc Adds Vulkan-Docs repo to externals 2021-10-02 17:09:23 -07:00
Ryan Houdek e0b878f1fd Merge pull request #1289 from Sonicadvance1/thunks_debugging_changes
Thunks: Some minor X related thunk changes
2021-10-02 11:13:22 -07:00
Ryan Houdek 073224ffea Merge pull request #1287 from Sonicadvance1/expand_thunk_Xext
Thunks: Expands Xext thunked functions listo
2021-10-02 11:13:14 -07:00
Ryan Houdek 00511c16a4 Merge pull request #1286 from Sonicadvance1/expand_thunk_asound
Thunks: Expands what asound thunking supports
2021-10-02 11:13:04 -07:00
Ryan Houdek 66c7fdb6de Merge pull request #1293 from Sonicadvance1/thunks_database
Thunks: Adds a new Thunks database config file
2021-10-02 11:11:55 -07:00
Ryan Houdek a48ed376d8 Merge pull request #1291 from Sonicadvance1/thunk_file_search
Thunks: Makes file searches a bit easier
2021-10-02 11:10:08 -07:00
Ryan Houdek 98bee5a6dd Merge pull request #1290 from Sonicadvance1/thunk_init_constructor
Thunks: Adds init helpers with function call
2021-10-02 11:09:23 -07:00
Ryan Houdek 8d13261ab6 Merge pull request #1292 from Sonicadvance1/thunks_script
Thunks: ThunkHelpers script improvements
2021-10-02 11:08:23 -07:00
Ryan Houdek 2b757a9b9a Merge pull request #1284 from Sonicadvance1/fix_struct_match
StructVerifier: Fix struct match and minor fixes
2021-10-02 11:07:51 -07:00
Ryan Houdek 08f56540d2 Merge pull request #1282 from Sonicadvance1/InterpreterLoadStores
Interpreter: Changes basic loadstores to sized accesses
2021-10-02 11:07:38 -07:00
Ryan Houdek fb01e8bf28 Merge pull request #1283 from Sonicadvance1/minor_core_cleanup
Core: Minor documentation and code splitting
2021-10-02 11:06:56 -07:00
Ryan Houdek d5f9f43ab0 Merge pull request #1281 from Sonicadvance1/SupportHostEnv
Adds support for setting host environment variables from config
2021-10-02 11:06:22 -07:00
Ryan Houdek 9d460e807c Merge pull request #1288 from Sonicadvance1/libclang_definition_extract
Scripts: Adds a new script for extracting function definitions
2021-10-02 11:05:36 -07:00
Ryan Houdek 185f265f5c Thunks: Adds a new Thunks database config file
This adds a new `ThunksDB.json` file to the config folder.
This file lets users describe thunks in a meaningful way without
duplicating it amongst multiple configuration files.

eg:
```
{
  "DB": {
    "GL": {
      "Library" : "libGL-guest.so",
      "Depends": [
        "X11"
      ],
      "Overlay": [
        "/usr/lib/x86_64-linux-gnu/libGL.so",
        "/usr/lib/x86_64-linux-gnu/libGL.so.1",
        "/usr/lib/x86_64-linux-gnu/libGL.so.1.2.0",
        "/usr/lib/x86_64-linux-gnu/libGL.so.1.7.0",
        "/lib/x86_64-linux-gnu/libGL.so",
        "/lib/x86_64-linux-gnu/libGL.so.1",
        "/lib/x86_64-linux-gnu/libGL.so.1.2.0",
        "/lib/x86_64-linux-gnu/libGL.so.1.7.0"
      ]
    },
    "X11": {
      "Library": "libX11-guest.so",
      "Overlay": [
        "/usr/lib/x86_64-linux-gnu/libX11.so.6",
        "/lib/x86_64-linux-gnu/libX11.so.6"
      ]
    }
  }
}
```

This file lets the user describe the library with an nicer name, in this instance
`GL` instead of `libGL-guest.so`.
It also tracks depedencies, like how GL currently has a hard dependency on X11.
This allows the loader to automatically enable the dependencies if described.
The `Overlays` array is like the regular Thunks config file but now in this DB file.

With the DB file now describing the libraries, this allows us to then stick a lighter
description inside of the Thunk Config file.

```
{
 "ThunksDB": {
   "GL": 1
 }
}
```

With this example Thunk config file (Which can be configured per application), There is
a new property of name `ThunksDB`.
All this takes is key:value pairs which describe the user friendly library name and an Integer
to state if the thunk should be enabled or not.
This allows very quick toggling of thunks directly inside of the configuration files rather than
breaking the configuration to disable it.
2021-10-02 11:03:08 -07:00
Ryan Houdek 591fc001cc Merge pull request #1294 from neobrain/fix_jitsymbols_build
Build fix for ENABLE_JITSYMBOLS
2021-10-01 10:25:50 -07:00
Tony Wasserka d71add78ae Build fix for ENABLE_JITSYMBOLS 2021-10-01 17:20:26 +02:00
Ryan Houdek d93edb2da8 Merge pull request #1285 from Sonicadvance1/thunk_config_fixes
Thunks: Minor fixes to the config and loading
2021-09-30 22:25:33 -07:00
Ryan Houdek 2360f9cec1 Thunks: ThunkHelpers script improvements
Allows having a library filename be different from the name.
This will fix a quirk in future thunks where the library name and
filename don't match

Also allow custom callback unpacks. A future thunk will need this
2021-09-30 19:13:28 -07:00