diff options
author | Eric Anholt <[email protected]> | 2018-12-14 14:46:48 -0800 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2018-12-14 17:48:01 -0800 |
commit | 29927e7524b07d491c555b8ed06c9b89cd0856f8 (patch) | |
tree | d56ee7ab4e0a9067a7f9daa65fb2ba1559847e51 /src/gallium | |
parent | 248a7fb392ba9ed0f3d25b599e214b456cefa910 (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')
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_draw.c | 9 | ||||
-rw-r--r-- | src/gallium/drivers/v3d/v3dx_rcl.c | 5 |
2 files changed, 13 insertions, 1 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 */ diff --git a/src/gallium/drivers/v3d/v3dx_rcl.c b/src/gallium/drivers/v3d/v3dx_rcl.c index 01a907b0a86..17b30465c9d 100644 --- a/src/gallium/drivers/v3d/v3dx_rcl.c +++ b/src/gallium/drivers/v3d/v3dx_rcl.c @@ -761,7 +761,10 @@ v3dX(emit_rcl)(struct v3d_job *job) v3d_rcl_emit_generic_per_tile_list(job, nr_cbufs - 1); - /* XXX: Use Morton order */ + /* XXX perf: We should expose GL_MESA_tile_raster_order to improve X11 + * performance, but we should use Morton order otherwise to improve + * cache locality. + */ uint32_t supertile_w_in_pixels = job->tile_width * supertile_w; uint32_t supertile_h_in_pixels = job->tile_height * supertile_h; uint32_t min_x_supertile = job->draw_min_x / supertile_w_in_pixels; |