summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
Diffstat (limited to 'video')
-rw-r--r--video/out/gpu/shader_cache.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/video/out/gpu/shader_cache.c b/video/out/gpu/shader_cache.c
index 86939083db..28490fda2f 100644
--- a/video/out/gpu/shader_cache.c
+++ b/video/out/gpu/shader_cache.c
@@ -571,10 +571,6 @@ static bool create_pass(struct gl_shader_cache *sc, struct sc_entry *entry)
MP_TARRAY_APPEND(sc, params.inputs, params.num_inputs, ubo_input);
}
- entry->pass = sc->ra->fns->renderpass_create(sc->ra, &params);
- if (!entry->pass)
- goto error;
-
if (sc->ubo_size) {
struct ra_buf_params ubo_params = {
.type = RA_BUF_TYPE_UNIFORM,
@@ -589,6 +585,10 @@ static bool create_pass(struct gl_shader_cache *sc, struct sc_entry *entry)
}
}
+ entry->pass = sc->ra->fns->renderpass_create(sc->ra, &params);
+ if (!entry->pass)
+ goto error;
+
if (entry->pass && cache_filename) {
bstr nc = entry->pass->params.cached_program;
if (nc.len && !bstr_equals(params.cached_program, nc)) {
@@ -869,7 +869,8 @@ static void gl_sc_generate(struct gl_shader_cache *sc,
sc->error_state = true;
MP_TARRAY_APPEND(sc, sc->entries, sc->num_entries, entry);
}
- if (sc->error_state) {
+
+ if (!entry->pass) {
sc->current_shader = NULL;
return;
}