diff options
author | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-08-26 16:59:42 +0000 |
---|---|---|
committer | Jonathan Gray <jsg@cvs.openbsd.org> | 2017-08-26 16:59:42 +0000 |
commit | 81ece42815e80818f160cdd85fab57d65b56ad15 (patch) | |
tree | 1059ff094da1aa50334115952fcb1cfcbda3acc6 /lib/mesa/src/gallium/drivers/svga/svga_resource_buffer.h | |
parent | b0244145d5bb49623d58f6b5cab8143ada692b60 (diff) |
Revert to Mesa 13.0.6 to hopefully address rendering issues a handful of
people have reported with xpdf/fvwm on ivy bridge with modesetting driver.
Diffstat (limited to 'lib/mesa/src/gallium/drivers/svga/svga_resource_buffer.h')
-rw-r--r-- | lib/mesa/src/gallium/drivers/svga/svga_resource_buffer.h | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/lib/mesa/src/gallium/drivers/svga/svga_resource_buffer.h b/lib/mesa/src/gallium/drivers/svga/svga_resource_buffer.h index e838beb66..2804a99c0 100644 --- a/lib/mesa/src/gallium/drivers/svga/svga_resource_buffer.h +++ b/lib/mesa/src/gallium/drivers/svga/svga_resource_buffer.h @@ -65,6 +65,9 @@ struct svga_buffer { struct u_resource b; + /** This is a superset of b.b.bind */ + unsigned bind_flags; + /** * Regular (non DMA'able) memory. * @@ -187,17 +190,28 @@ struct svga_buffer struct list_head head; unsigned size; /**< Approximate size in bytes */ + + boolean dirty; /**< Need to do a readback before mapping? */ + + /** In some cases we try to keep the results of the translate_indices() + * function from svga_draw_elements.c + */ + struct { + enum pipe_prim_type orig_prim, new_prim; + struct pipe_resource *buffer; + unsigned index_size; + unsigned offset; /**< first index */ + unsigned count; /**< num indices */ + } translated_indices; }; static inline struct svga_buffer * -svga_buffer(struct pipe_resource *buffer) +svga_buffer(struct pipe_resource *resource) { - if (buffer) { - assert(((struct svga_buffer *)buffer)->b.vtbl == &svga_buffer_vtbl); - return (struct svga_buffer *)buffer; - } - return NULL; + struct svga_buffer *buf = (struct svga_buffer *) resource; + assert(buf == NULL || buf->b.vtbl == &svga_buffer_vtbl); + return buf; } @@ -248,6 +262,9 @@ svga_buffer_hw_storage_map(struct svga_context *svga, unsigned flags, boolean *retry) { struct svga_winsys_screen *sws = svga_buffer_winsys_screen(sbuf); + + svga->hud.num_buffers_mapped++; + if (sws->have_gb_objects) { return svga->swc->surface_map(svga->swc, sbuf->handle, flags, retry); } else { |