summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/v3d/v3d_context.h
diff options
context:
space:
mode:
authorIago Toral Quiroga <itoral@igalia.com>2019-06-19 10:23:43 +0200
committerIago Toral Quiroga <itoral@igalia.com>2019-06-21 08:06:13 +0200
commit42572f2f7df91f65ac31145380cd9d170ba4b783 (patch)
treeb305a7a1e3d8b5c544114f8040fa76802574fed5 /src/gallium/drivers/v3d/v3d_context.h
parent00a56acc235e185bb3c7e2e0a7a731cc8f444044 (diff)
v3d: add a helper to check if transform feedback is enabled
v2: We should be safe assuming that bind_vs != NULL (Eric) Reviewed-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'src/gallium/drivers/v3d/v3d_context.h')
-rw-r--r--src/gallium/drivers/v3d/v3d_context.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3d_context.h b/src/gallium/drivers/v3d/v3d_context.h
index 3ab227afb6c..21db9997c90 100644
--- a/src/gallium/drivers/v3d/v3d_context.h
+++ b/src/gallium/drivers/v3d/v3d_context.h
@@ -569,6 +569,13 @@ v3d_ioctl(int fd, unsigned long request, void *arg)
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,