Re: [Mesa-dev] [PATCH] gallium/u_transfer_helper: Fix MSAA mappings with nonzero x/y.

2018-07-10 Thread Rob Clark
On Mon, Jul 9, 2018 at 5:13 PM, Eric Anholt  wrote:
> We created a temporary with box->{width,height} and then tried to map
> width,height from a nonzero offset when we meant to just map the whole
> temporary.
>
> Fixes segfaults in V3D in dEQP-GLES3.functional.prerequisite.read_pixels
> with --deqp-egl-config-name=rgbad24s8ms4 and also piglit's read-front
> clear-front-first -samples=4

Reviewed-by: Rob Clark 

> ---
>  src/gallium/auxiliary/util/u_transfer_helper.c | 6 +-
>  1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/util/u_transfer_helper.c 
> b/src/gallium/auxiliary/util/u_transfer_helper.c
> index 3b085fd99f09..fd8a5c3a0895 100644
> --- a/src/gallium/auxiliary/util/u_transfer_helper.c
> +++ b/src/gallium/auxiliary/util/u_transfer_helper.c
> @@ -207,7 +207,11 @@ transfer_map_msaa(struct pipe_context *pctx,
>pctx->blit(pctx, );
> }
>
> -   void *ss_map = pctx->transfer_map(pctx, trans->ss, 0, usage, box,
> +   struct pipe_box map_box = *box;
> +   map_box.x = 0;
> +   map_box.y = 0;
> +
> +   void *ss_map = pctx->transfer_map(pctx, trans->ss, 0, usage, _box,
>   >trans);
> if (!ss_map) {
>free(trans);
> --
> 2.18.0
>
> ___
> mesa-dev mailing list
> mesa-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] [PATCH] gallium/u_transfer_helper: Fix MSAA mappings with nonzero x/y.

2018-07-09 Thread Eric Anholt
We created a temporary with box->{width,height} and then tried to map
width,height from a nonzero offset when we meant to just map the whole
temporary.

Fixes segfaults in V3D in dEQP-GLES3.functional.prerequisite.read_pixels
with --deqp-egl-config-name=rgbad24s8ms4 and also piglit's read-front
clear-front-first -samples=4
---
 src/gallium/auxiliary/util/u_transfer_helper.c | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/util/u_transfer_helper.c 
b/src/gallium/auxiliary/util/u_transfer_helper.c
index 3b085fd99f09..fd8a5c3a0895 100644
--- a/src/gallium/auxiliary/util/u_transfer_helper.c
+++ b/src/gallium/auxiliary/util/u_transfer_helper.c
@@ -207,7 +207,11 @@ transfer_map_msaa(struct pipe_context *pctx,
   pctx->blit(pctx, );
}
 
-   void *ss_map = pctx->transfer_map(pctx, trans->ss, 0, usage, box,
+   struct pipe_box map_box = *box;
+   map_box.x = 0;
+   map_box.y = 0;
+
+   void *ss_map = pctx->transfer_map(pctx, trans->ss, 0, usage, _box,
  >trans);
if (!ss_map) {
   free(trans);
-- 
2.18.0

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