diff options
author | Eric Anholt <[email protected]> | 2016-08-02 12:28:27 -0700 |
---|---|---|
committer | Eric Anholt <[email protected]> | 2016-08-04 08:48:27 -0700 |
commit | 2a808219b3f9a50bc5bf3c5290db6a55cd707de7 (patch) | |
tree | 031d59393725abe6c51ae74e458dfa859ce4548d /src/mesa/state_tracker/st_draw.h | |
parent | c976e164d262d2d2bfd8087dcbb7bd91995ae887 (diff) |
state_tracker: Initialize the draw context only when needed.
It's only used for rarely-used deprecated GL features
(feedback/rasterpos), so we can skip the memory allocation and
initialization for it most of the time.
Saves about 659k (out of 1605k) of maximum memory size according to massif
on simulated vc4 glsl-algebraic-add-add-1
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_draw.h')
-rw-r--r-- | src/mesa/state_tracker/st_draw.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_draw.h b/src/mesa/state_tracker/st_draw.h index d85c3b7facd..fc863819c7e 100644 --- a/src/mesa/state_tracker/st_draw.h +++ b/src/mesa/state_tracker/st_draw.h @@ -47,6 +47,8 @@ void st_init_draw( struct st_context *st ); void st_destroy_draw( struct st_context *st ); +struct draw_context *st_get_draw_context(struct st_context *st); + extern void st_draw_vbo(struct gl_context *ctx, const struct _mesa_prim *prims, |