fd3_emit_get_fp(struct fd3_emit *emit)
{
if (!emit->fp) {
- struct fd3_shader_stateobj *so = emit->prog->fp;
- emit->fp = ir3_shader_variant(so->shader, emit->key);
+ if (emit->key.binning_pass) {
+ /* use dummy stateobj to simplify binning vs non-binning: */
+ static const struct ir3_shader_variant binning_fp = {};
+ emit->fp = &binning_fp;
+ } else {
+ struct fd3_shader_stateobj *so = emit->prog->fp;
+ emit->fp = ir3_shader_variant(so->shader, emit->key);
+ }
}
return emit->fp;
}
debug_assert(nr <= ARRAY_SIZE(color_regid));
vp = fd3_emit_get_vp(emit);
-
- if (emit->key.binning_pass) {
- /* use dummy stateobj to simplify binning vs non-binning: */
- static const struct ir3_shader_variant binning_fp = {};
- fp = &binning_fp;
- } else {
- fp = fd3_emit_get_fp(emit);
- }
+ fp = fd3_emit_get_fp(emit);
vsi = &vp->info;
fsi = &fp->info;