Skip to content

Commit

Permalink
Use Mesa's lavapipe when "force software rendering" is checked
Browse files Browse the repository at this point in the history
  • Loading branch information
clementgallet committed Dec 24, 2024
1 parent a0c76ce commit 126cd94
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
* Open and seek hex viewer from ram watch
* Show converted values from hex view selection
* Implement `XRRGetCrtcTransform()`
* Use Mesa's lavapipe when "force software rendering" is checked

### Changed

Expand Down
8 changes: 5 additions & 3 deletions src/program/GameThread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -69,13 +69,15 @@ void GameThread::set_env_variables(Context *context, int gameArch)
/* Set additional environment variables regarding Mesa and VDPAU configurations */
if (context->config.sc.opengl_soft) {
setenv("LIBGL_ALWAYS_SOFTWARE", "1", 1);
setenv("VK_DRIVER_FILES", "/usr/share/vulkan/icd.d/lvp_icd.i686.json:/usr/share/vulkan/icd.d/lvp_icd.x86_64.json", 1);
setenv("VDPAU_DRIVER", "va_gl", 1);
setenv("VDPAU_QUIRKS", "AvoidVA", 1);
}
else {
unsetenv("LIBGL_ALWAYS_SOFTWARE");
unsetenv("VDPAU_DRIVER");
unsetenv("VDPAU_QUIRKS");
unsetenv("LIBGL_ALWAYS_SOFTWARE");
unsetenv("VK_DRIVER_FILES");
unsetenv("VDPAU_DRIVER");
unsetenv("VDPAU_QUIRKS");
}

/* If we prefer OpenAL Soft, we'll want to force it to use either SDL2 or ALSA internally */
Expand Down

0 comments on commit 126cd94

Please sign in to comment.