summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary/util
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-07-09 14:09:07 -0700
committerEric Anholt <[email protected]>2018-07-12 11:31:00 -0700
commit589bb5bd6571f03d85e5bbc835549d9a0d71ead1 (patch)
tree78b607243b37f1ecb6dc5f622c8f3f5d4c8dba9b /src/gallium/auxiliary/util
parentccb8309516792fedd4ed50f8db81d84682b967c3 (diff)
gallium/u_transfer_helper: Fix MSAA mappings with nonzero x/y.
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=rgba8888d24s8ms4 and also piglit's read-front clear-front-first -samples=4 Reviewed-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/gallium/auxiliary/util')
-rw-r--r--src/gallium/auxiliary/util/u_transfer_helper.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_transfer_helper.c b/src/gallium/auxiliary/util/u_transfer_helper.c
index 3b085fd99f0..fd8a5c3a089 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, &blit);
}
- 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, &map_box,
&trans->trans);
if (!ss_map) {
free(trans);