diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-02 08:57:19 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-06-02 08:57:19 +0100 |
commit | 72b6299c1239c53baa38f44bc898c0c184ce3c71 (patch) | |
tree | 3c57a111812feb59d147f86888d07e140449ec8a /src/cairo-gl-composite.c | |
parent | bf1b08d066ebcffa71f5e728dc333f4494ff4ba3 (diff) |
gl: Mark the use-once vertex buffers as DYNAMIC
As we write, use and then immediately discard the vertex buffers, our
usage pattern more closely matches DYNAMIC (as opposed to STREAM). This
improve performance by about 10% on intel.
firefox-talos-gfx(snb) 20.226 -> 18.402
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-gl-composite.c')
-rw-r--r-- | src/cairo-gl-composite.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/cairo-gl-composite.c b/src/cairo-gl-composite.c index bb88f598..27912b38 100644 --- a/src/cairo-gl-composite.c +++ b/src/cairo-gl-composite.c @@ -1018,7 +1018,7 @@ _cairo_gl_composite_flush (cairo_gl_context_t *ctx) ctx->dispatch.UnmapBuffer (GL_ARRAY_BUFFER); else ctx->dispatch.BufferData (GL_ARRAY_BUFFER, ctx->vb_offset, - ctx->vb, GL_STREAM_DRAW); + ctx->vb, GL_DYNAMIC_DRAW); ctx->vb = NULL; ctx->vb_offset = 0; @@ -1051,7 +1051,7 @@ _cairo_gl_composite_prepare_buffer (cairo_gl_context_t *ctx, if (ctx->vb == NULL) { if (ctx->has_map_buffer) { dispatch->BufferData (GL_ARRAY_BUFFER, CAIRO_GL_VBO_SIZE, - NULL, GL_STREAM_DRAW); + NULL, GL_DYNAMIC_DRAW); ctx->vb = dispatch->MapBuffer (GL_ARRAY_BUFFER, GL_WRITE_ONLY); } else { |