Skip to content

Commit

Permalink
change default backend to direct and add egl to NVD_BACKEND options
Browse files Browse the repository at this point in the history
  • Loading branch information
elFarto committed Dec 17, 2023
1 parent cebaa6a commit 2bfe044
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/vabackend.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ static FILE *LOG_OUTPUT;
static int gpu = -1;
static enum {
EGL, DIRECT
} backend = EGL;
} backend = DIRECT;

const NVFormatInfo formatsInfo[] =
{
Expand Down Expand Up @@ -93,8 +93,12 @@ static void init() {
}

char *nvdBackend = getenv("NVD_BACKEND");
if (nvdBackend != NULL && strncmp(nvdBackend, "direct", 6) == 0) {
backend = DIRECT;
if (nvdBackend != NULL) {
if (strncmp(nvdBackend, "direct", 6) == 0) {
backend = DIRECT;
} else if (strncmp(nvdBackend, "egl", 6) == 0) {
backend = EGL;
}
}

//try to detect the Firefox sandbox and skip loading CUDA if detected
Expand Down

0 comments on commit 2bfe044

Please sign in to comment.