struct ir3_shader_variant *v =
shader_variant(shader, key, created);
- if (binning_pass) {
+ if (v && binning_pass) {
if (!v->binning)
v->binning = create_variant(shader, key, true);
return v->binning;
fd6_ctx->prog = fd6_emit_get_prog(&emit);
}
+ /* bail if compile failed: */
+ if (!fd6_ctx->prog)
+ return NULL;
+
emit.dirty = ctx->dirty; /* *after* fixup_shader_state() */
emit.bs = fd6_emit_get_prog(&emit)->bs;
emit.vs = fd6_emit_get_prog(&emit)->vs;
const struct ir3_shader_variant *vp = emit.vs;
const struct ir3_shader_variant *fp = emit.fs;
- /* do regular pass first, since that is more likely to fail compiling: */
-
- if (!vp || !fp)
- return false;
-
ctx->stats.vs_regs += ir3_shader_halfregs(vp);
ctx->stats.fs_regs += ir3_shader_halfregs(fp);
struct ir3_shader_variant *vs = ir3_shader_variant(key->vs, key->key, false, debug);
struct ir3_shader_variant *fs = ir3_shader_variant(key->fs, key->key, false, debug);
+ if (!bs || !vs || !fs) {
+ return NULL;
+ }
+
struct ir3_program_state *state =
cache->funcs->create_state(cache->data, bs, vs, fs, &key->key);
state->key = *key;