Skip to content

Commit 64b1051

Browse files
committed
vo_gpu{,_next}: allow loading shaders not only from filesystem
1 parent ec4d50f commit 64b1051

2 files changed

Lines changed: 6 additions & 2 deletions

File tree

video/out/gpu/video.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,9 @@ static struct bstr load_cached_file(struct gl_video *p, const char *path)
592592
}
593593
// not found -> load it
594594
char *fname = mp_get_user_path(NULL, p->global, path);
595-
struct bstr s = stream_read_file(fname, p, p->global, 1000000000); // 1GB
595+
struct bstr s = stream_read_file2(fname, p,
596+
STREAM_READ_FILE_FLAGS_DEFAULT & ~STREAM_LOCAL_FS_ONLY,
597+
p->global, 1000000000); // 1GB
596598
talloc_free(fname);
597599
if (s.len) {
598600
struct cached_file new = {

video/out/vo_gpu_next.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2339,7 +2339,9 @@ static const struct pl_hook *load_hook(struct priv *p, const char *path)
23392339
}
23402340

23412341
char *fname = mp_get_user_path(NULL, p->global, path);
2342-
bstr shader = stream_read_file(fname, p, p->global, 1000000000); // 1GB
2342+
bstr shader = stream_read_file2(fname, p,
2343+
STREAM_READ_FILE_FLAGS_DEFAULT & ~STREAM_LOCAL_FS_ONLY,
2344+
p->global, 1000000000); // 1GB
23432345
talloc_free(fname);
23442346

23452347
const struct pl_hook *hook = NULL;

0 commit comments

Comments
 (0)