v2: We should be safe assuming that bind_vs != NULL (Eric)
Reviewed-by: Eric Anholt <eric@anholt.net>
return drmIoctl(fd, request, arg);
}
+static inline bool
+v3d_transform_feedback_enabled(struct v3d_context *v3d)
+{
+ return v3d->prog.bind_vs->num_tf_specs != 0 &&
+ v3d->active_queries;
+}
+
void v3d_set_shader_uniform_dirty_flags(struct v3d_compiled_shader *shader);
struct v3d_cl_reloc v3d_write_uniforms(struct v3d_context *v3d,
struct v3d_compiled_shader *shader,
v3d->prog.bind_vs->tf_specs);
#if V3D_VERSION >= 40
- bool tf_enabled = (v3d->prog.bind_vs->num_tf_specs != 0 &&
- v3d->active_queries);
+ bool tf_enabled = v3d_transform_feedback_enabled(v3d);
job->tf_enabled |= tf_enabled;
cl_emit(&job->bcl, TRANSFORM_FEEDBACK_SPECS, tfe) {