Re: [Mesa-dev] [PATCH] st/mesa: unmap the stream_uploader buffer before drawing

2017-06-11 Thread Marek Olšák
On Sat, Jun 10, 2017 at 5:27 AM, Brian Paul  wrote:
> Some drivers require that the vertex buffers be unmapped prior to
> drawing.  This change unmaps the stream_uploader buffer after we've
> uploaded the zero-stride attributes (unless the driver supports
> rendering with mapped buffers).
>
> This fixes a regression in the VMware driver since 17f776c27be266f2.
> Some Mesa demos such as mandelbrot and brick would display black
> quads instead of the expected rendering.
>
> --
>
> Marek: can you please verify that this is the right place for this
> call (and not in st_draw_vbo())?

Yes, this is the right place.

Reviewed-by: Marek Olšák 

Marek
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] st/mesa: unmap the stream_uploader buffer before drawing

2017-06-09 Thread Brian Paul
Some drivers require that the vertex buffers be unmapped prior to
drawing.  This change unmaps the stream_uploader buffer after we've
uploaded the zero-stride attributes (unless the driver supports
rendering with mapped buffers).

This fixes a regression in the VMware driver since 17f776c27be266f2.
Some Mesa demos such as mandelbrot and brick would display black
quads instead of the expected rendering.

--

Marek: can you please verify that this is the right place for this
call (and not in st_draw_vbo())?
---
 src/mesa/state_tracker/st_atom_array.c | 4 
 1 file changed, 4 insertions(+)

diff --git a/src/mesa/state_tracker/st_atom_array.c 
b/src/mesa/state_tracker/st_atom_array.c
index c7467eb..6af1355 100644
--- a/src/mesa/state_tracker/st_atom_array.c
+++ b/src/mesa/state_tracker/st_atom_array.c
@@ -670,6 +670,10 @@ setup_non_interleaved_attribs(struct st_context *st,
 array->Size, array->Doubles, &attr);
}
 
+   if (!ctx->Const.AllowMappedBuffersDuringExecution) {
+  u_upload_unmap(st->pipe->stream_uploader);
+   }
+
set_vertex_attribs(st, vbuffer, num_vbuffers, velements, num_inputs);
 
/* Unreference uploaded zero-stride vertex buffers. */
-- 
1.9.1

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev