Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Minor formatting fix * WIP: Added ForcedGpuId and PrimeOffload options * Global.PrimeOffload set to true by default * Remove unnecessary error handling for sysfs IO * Refactor: Merge Prime & ForcedGpuId into ForcedGpu * ForcedGpu is now validated by config.go Also did some refactoring to share validation logic across binaries * prime: Do not redefine existing env vars * prime: handle cases with 3+ gpus and opengl In these circumstances, there's no way for us to determine the right gpu ...so abort and prompt the user to explictly choose it... ...or to try the vulkan renderer * prime: Remove vendor check, only probe driver. It's actually unnecessary to check the card's vendor. Instead, just check for its driver. If it's nvidia, apply the... ...GLX workaround. * prime -> gpu: major codebase refactor * Yet another refactor: removed vid:nid logic Now gpu works entirely around indexes * oops: fixed inverted condition in gpu probe * gpu: validate if index exists by checking length * gpu: use PrimeNone string instead of literal I just noticed this and it was really bothering me. It had to be fixed. * card: Refactor prime logic around new sysinfo Hopefully the last refactor of this code * cardpick: Remove unnecessary env return * cardpick: improve readbility, consolidate prime * setIfUndefined as env method instead of function * Simplify prime check variable names Co-authored-by: sewn <sewn@disroot.org> Signed-off-by: Jrelvas <55360900+Noted-Jrelvas@users.noreply.github.com> * Fix env "set if undefined" method Co-authored-by: sewn <sewn@disroot.org> Signed-off-by: Jrelvas <55360900+Noted-Jrelvas@users.noreply.github.com> * Remove log for env set Co-authored-by: sewn <sewn@disroot.org> Signed-off-by: Jrelvas <55360900+Noted-Jrelvas@users.noreply.github.com> * Update cardpick code for suggestions made * Consolidate BinaryParse into setup method * Do not run pickCard logic if opt is empty string * Reduced complexity of cardpick prime check * The pickCard rewrite. * Turn pickCard into a binary method * config: return error directly in binary setup * cardpick: Declare aIdx and prime in one var clause * cardpick: removed unnecessary opt var * Update internal/config/cardpick.go (format change) Co-authored-by: sewn <sewn@disroot.org> Signed-off-by: Jrelvas <55360900+Noted-Jrelvas@users.noreply.github.com> * env: use self directly in set * binary: Moved setenv from pickCard into setup. --------- Signed-off-by: Jrelvas <55360900+Noted-Jrelvas@users.noreply.github.com> Co-authored-by: sewn <sewn@disroot.org>
- Loading branch information