diff options
author | Roland Scheidegger <[email protected]> | 2017-09-01 01:48:42 +0200 |
---|---|---|
committer | Roland Scheidegger <[email protected]> | 2017-09-03 03:31:28 +0200 |
commit | 2b2c61f0df5c18355b65772d21be36339ba5e1d9 (patch) | |
tree | 92d3316e60ef41bf0ca06dcb0e9c2379b351cc46 /src/mesa | |
parent | 23b7c7a630aafb2102d3292556eecd84d2739ed5 (diff) |
st/mesa: fix view template initialization in try_pbo_readpixels
I think this is what the code was meant to do, albeit as far as I can tell
the redundant initialization some analyzers complain about should work as
well just fine (only the first layer will be used, if the view contains one
or more layers doesn't really matter).
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=102467
Reviewed-by: Brian Paul <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Cc: [email protected]
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_readpixels.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mesa/state_tracker/st_cb_readpixels.c b/src/mesa/state_tracker/st_cb_readpixels.c index 0bcf2eb4fdf..84dd2d548e3 100644 --- a/src/mesa/state_tracker/st_cb_readpixels.c +++ b/src/mesa/state_tracker/st_cb_readpixels.c @@ -175,7 +175,7 @@ try_pbo_readpixels(struct st_context *st, struct st_renderbuffer *strb, if (view_target != PIPE_TEXTURE_3D) { templ.u.tex.first_layer = surface->u.tex.first_layer; - templ.u.tex.last_layer = templ.u.tex.last_layer; + templ.u.tex.last_layer = templ.u.tex.first_layer; } else { addr.constants.layer_offset = surface->u.tex.first_layer; } |