summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/v3d/v3dx_draw.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-12-14 14:46:48 -0800
committerEric Anholt <[email protected]>2018-12-14 17:48:01 -0800
commit29927e7524b07d491c555b8ed06c9b89cd0856f8 (patch)
treed56ee7ab4e0a9067a7f9daa65fb2ba1559847e51 /src/gallium/drivers/v3d/v3dx_draw.c
parent248a7fb392ba9ed0f3d25b599e214b456cefa910 (diff)
v3d: Drop in a bunch of notes about performance improvement opportunities.
These have all been floating in my head, and while I've thought about encoding them in issues on gitlab once they're enabled, they also make sense to just have in the area of the code you'll need to work in.
Diffstat (limited to 'src/gallium/drivers/v3d/v3dx_draw.c')
-rw-r--r--src/gallium/drivers/v3d/v3dx_draw.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/gallium/drivers/v3d/v3dx_draw.c b/src/gallium/drivers/v3d/v3dx_draw.c
index 692f1fe3c04..46e629d0c64 100644
--- a/src/gallium/drivers/v3d/v3dx_draw.c
+++ b/src/gallium/drivers/v3d/v3dx_draw.c
@@ -124,6 +124,11 @@ v3d_predraw_check_stage_inputs(struct pipe_context *pctx,
{
struct v3d_context *v3d = v3d_context(pctx);
+ /* XXX perf: If we're reading from the output of TF in this job, we
+ * should instead be using the wait for transform feedback
+ * functionality.
+ */
+
/* Flush writes to textures we're sampling. */
for (int i = 0; i < v3d->tex[s].num_textures; i++) {
struct pipe_sampler_view *pview = v3d->tex[s].textures[i];
@@ -175,6 +180,10 @@ v3d_emit_gl_shader_state(struct v3d_context *v3d,
cl_packet_length(GL_SHADER_STATE_ATTRIBUTE_RECORD),
32);
+ /* XXX perf: We should move most of the SHADER_STATE_RECORD setup to
+ * compile time, so that we mostly just have to OR the VS and FS
+ * records together at draw time.
+ */
cl_emit(&job->indirect, GL_SHADER_STATE_RECORD, shader) {
shader.enable_clipping = true;
/* VC5_DIRTY_PRIM_MODE | VC5_DIRTY_RASTERIZER */