[Mesa-dev] [PATCH] st/mesa: fix view template initialization in try_pbo_readpixels
Roland Scheidegger
sroland at vmware.com
Fri Sep 1 01:08:16 UTC 2017
Am 01.09.2017 um 02:32 schrieb Brian Paul:
> On 08/31/2017 05:53 PM, sroland at vmware.com wrote:
>> From: Roland Scheidegger <sroland at vmware.com>
>>
>> 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
>> ---
>> src/mesa/state_tracker/st_cb_readpixels.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/src/mesa/state_tracker/st_cb_readpixels.c
>> b/src/mesa/state_tracker/st_cb_readpixels.c
>> index 0bcf2eb..84dd2d5 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;
>> }
>>
>
> Reviewed-by: Brian Paul <brianp at vmware.com>
>
> Add cc for stable branch?
>
I can do that, though as said while clearly the code was meant to do
something different it looks like it's a cosmetic issue only.
Roland
More information about the mesa-dev
mailing list