Commit Graph

22 Commits

Author SHA1 Message Date
Philip Rebohle 1c08725acd [util] Use transcodeString in createDirectory function 2022-07-30 20:30:32 +02:00
Philip Rebohle 65070bd765 [util] Use transcodeString in setThreadName function 2022-07-30 20:30:32 +02:00
Joshua Ashton 08e2ec6c98 [util] Implement env helpers on non-Windows platforms 2022-04-19 17:08:17 +01:00
Philip Rebohle fe00919d5f [util] Handle upper-case file extensions correctly 2021-06-06 03:57:15 -07:00
ishitatsuyuki bb85a4caa8 Handle non-ASCII characters properly in paths 2020-09-10 15:56:38 +02:00
Joshua Ashton bf14371f9e [util] Wide character conversion changes
Replaces tows with an easier helper that fits in nicer with fixed-size arrays in DXGI, etc.

Prefer UTF8 in tows/fromws.
2019-11-26 01:53:49 +01:00
Entryhazard 252d71e55e Retrieve the function pointer once (#1198) 2019-09-22 10:11:17 +02:00
Philip Rebohle c934333a5c [util] Add method to retrieve full exe path 2019-08-17 11:50:39 +02:00
Joshua Ashton a4a4f5a822 [util] Correct return value of SetThreadDescription 2019-06-19 19:43:36 +02:00
Philip Rebohle 9bfa470581
[util] Implement createDirectory function 2019-02-11 21:59:46 +01:00
Entryhazard 7306c3153c [util] Change getEnvVar to use getenv (#859) 2019-01-13 21:27:59 +01:00
Philip Rebohle 3935d2540e
[util] Get rid of explicit wchar_t parameter
We shouldn't be catering to Windows' weird string encoding mechanisms.
2019-01-11 13:43:15 +01:00
Derek Lesho 66bcc4b3d8 Use std::string for util::getEnvVar input
This allows cleaner code when implementing DXVK as a native library
2018-11-16 06:43:45 +01:00
Philip Rebohle 64ffcbc9ef
[util] Code cleanup for winegcc stuff 2018-07-21 12:51:50 +02:00
Jacek Caban cea1f15eab [util] Don't use std::wstring.
std::wstring is problematic, because wchar_t on other platforms might not be what we need. -fshort-wchar can mitigate that partially, but it's more problematic for stdc++ classes.
2018-07-19 08:55:34 +02:00
Jacek Caban c2c10cc207 [util] Reimplement fromws using WideCharToMultiByte and system codepage.
Also, using UTF-8 for convertion may not be what's intended, esp. if such strings end up being passed back to system API (eg. open file). The patch uses CP_ACP on mingw build (which is how Windows APIs will interpret it) or CP_UNIXCP on Wine (which is Wine extension to convert to whatever glibc and other host libs expect).

It's also needed for the next patch.
2018-07-19 08:55:34 +02:00
Jacek Caban 02ae42c7de [util] Remove getTempDirectory
It's not used anywhere.
2018-07-19 08:55:34 +02:00
Philip Rebohle 79a1703aea
[util] Set thread names for DXVK's own threads
Makes it easier to identify the command stream thread and the
queue processing thread easier when using a wine build that
supports SetThreadDescription.
2018-06-21 15:12:04 +02:00
Sebastian Wick 4518b1b76e Shader cache (#188)
* [util] Adds getTempDirectory() function

Will be used by on-disk pipeline caching

* [dxvk] Implement on-disk shader caching

Saving the pipeline cache to disk when the application exits
should be sufficient but the DxvkPipelineCache destructor isn't
reliably called on exit (ref-counting issue?).
As a workaround every frame we check and save the cache if the
size increased by some amount or after one minute elapsed.

* [dxvk] Periodically update shader cache file in separate thread
2018-03-21 02:45:11 +01:00
Philip Rebohle 18835c324e
[util] Added getExeName() function
This will allow DXVK to apply game-specific
features or workarounds in the future.
2018-01-16 11:33:34 +01:00
Philip Rebohle 1a40a272bd
[util] Fixed compiler issue with older GCC versions 2018-01-15 13:08:23 +01:00
Philip Rebohle 4a4f5bea29 [util] Added missing files 2017-12-08 11:18:23 +01:00