summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/vc4/vc4_simulator.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2016-09-08 12:56:11 -0700
committerEric Anholt <eric@anholt.net>2016-09-14 06:25:41 +0100
commitf597ac3966405934e13a9aaa18c73211b5a40c7c (patch)
treef7f09bead790e4cdd210e1ed0ca4c4b150dbe35e /src/gallium/drivers/vc4/vc4_simulator.c
parentf473348468ae1c68e7ef8eaf29f2cc51d17fbec7 (diff)
vc4: Implement job shuffling
Track rendering to each FBO independently and flush rendering only when necessary. This lets us avoid the overhead of storing and loading the frame when an application momentarily switches to rendering to some other texture in order to continue rendering the main scene. Improves glmark -b desktop:effect=shadow:windows=4 by 27% Improves glmark -b desktop:blur-radius=5:effect=blur:passes=1:separable=true:windows=4 by 17% While I haven't tested other apps, this should help X rendering a lot, and I've heard GLBenchmark needed it too.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_simulator.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_simulator.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/gallium/drivers/vc4/vc4_simulator.c b/src/gallium/drivers/vc4/vc4_simulator.c
index 81d34761b41..b802391aa6e 100644
--- a/src/gallium/drivers/vc4/vc4_simulator.c
+++ b/src/gallium/drivers/vc4/vc4_simulator.c
@@ -74,11 +74,10 @@ drm_gem_cma_create(struct drm_device *dev, size_t size)
}
static int
-vc4_simulator_pin_bos(struct drm_device *dev, struct vc4_exec_info *exec)
+vc4_simulator_pin_bos(struct drm_device *dev, struct vc4_job *job,
+ struct vc4_exec_info *exec)
{
struct drm_vc4_submit_cl *args = exec->args;
- struct vc4_context *vc4 = dev->vc4;
- struct vc4_job *job = vc4->job;
struct vc4_bo **bos = job->bo_pointers.base;
exec->bo_count = args->bo_handle_count;
@@ -220,7 +219,8 @@ vc4_dump_to_file(struct vc4_exec_info *exec)
}
int
-vc4_simulator_flush(struct vc4_context *vc4, struct drm_vc4_submit_cl *args)
+vc4_simulator_flush(struct vc4_context *vc4,
+ struct drm_vc4_submit_cl *args, struct vc4_job *job)
{
struct vc4_screen *screen = vc4->screen;
struct vc4_surface *csurf = vc4_surface(vc4->framebuffer.cbufs[0]);
@@ -257,7 +257,7 @@ vc4_simulator_flush(struct vc4_context *vc4, struct drm_vc4_submit_cl *args)
exec.args = args;
- ret = vc4_simulator_pin_bos(dev, &exec);
+ ret = vc4_simulator_pin_bos(dev, job, &exec);
if (ret)
return ret;