summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_cl.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-02-06 14:06:12 -0800
committerEric Anholt <[email protected]>2017-06-30 12:25:45 -0700
commitf6c5c6b9be1a241c095af2da985c25b95ffbaa25 (patch)
treeebc223d7ddc9e367cae229ffb48b93711bdd4fce /src/gallium/drivers/vc4/vc4_cl.h
parentbd1925562ad19e0972e06371dfb695b5e75cb7e4 (diff)
vc4: Move rasterizer state packing to CSO creation time.
This gets our vc4_emit.c size back down a bit: before: 1020 0 0 1020 3fc src/gallium/drivers/vc4/.libs/vc4_emit.o after: 968 0 0 968 3c8 src/gallium/drivers/vc4/.libs/vc4_emit.o
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_cl.h')
-rw-r--r--src/gallium/drivers/vc4/vc4_cl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gallium/drivers/vc4/vc4_cl.h b/src/gallium/drivers/vc4/vc4_cl.h
index c9a988e85b8..ec3713c8a4a 100644
--- a/src/gallium/drivers/vc4/vc4_cl.h
+++ b/src/gallium/drivers/vc4/vc4_cl.h
@@ -279,6 +279,11 @@ cl_get_emit_space(struct vc4_cl_out **cl, size_t size)
_loop_terminate = NULL; \
})) \
+#define cl_emit_prepacked(cl, packet) do { \
+ memcpy((cl)->next, packet, sizeof(*packet)); \
+ cl_advance(&(cl)->next, sizeof(*packet)); \
+} while (0)
+
/**
* Helper function called by the XML-generated pack functions for filling in
* an address field in shader records.