diff options
author | Eric Anholt <[email protected]> | 2015-07-09 22:51:06 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2015-07-14 11:31:57 -0700 |
commit | 7432017f65174e82a3de7afef3e4e6f60932356c (patch) | |
tree | 4777351f67cfadb00379723d7b918903b08b6353 /src/gallium/drivers/vc4/vc4_cl.c | |
parent | a0d3915663fb7cbd3c1a5561450e256e00ecf11b (diff) |
vc4: Rework cl handling to be friendlier to the compiler.
Drops 680 bytes of code, from avoiding a bunch of extra updates to the
next pointer in the struct.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_cl.c')
-rw-r--r-- | src/gallium/drivers/vc4/vc4_cl.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/gallium/drivers/vc4/vc4_cl.c b/src/gallium/drivers/vc4/vc4_cl.c index 97f6b89024c..ced4f2dfa86 100644 --- a/src/gallium/drivers/vc4/vc4_cl.c +++ b/src/gallium/drivers/vc4/vc4_cl.c @@ -66,8 +66,15 @@ vc4_gem_hindex(struct vc4_context *vc4, struct vc4_bo *bo) return hindex; } - cl_u32(&vc4->bo_handles, bo->handle); - cl_ptr(&vc4->bo_pointers, vc4_bo_reference(bo)); + struct vc4_cl_out *out; + + out = cl_start(&vc4->bo_handles); + cl_u32(&out, bo->handle); + cl_end(&vc4->bo_handles, out); + + out = cl_start(&vc4->bo_pointers); + cl_ptr(&out, vc4_bo_reference(bo)); + cl_end(&vc4->bo_pointers, out); return hindex; } |