[Mesa-dev] [PATCH] gallium: surface remove width/height removal comment

Marek Olšák maraeo at gmail.com
Wed Jul 18 17:29:48 UTC 2018


On Tue, Jul 17, 2018 at 9:44 AM, Roland Scheidegger <sroland at vmware.com> wrote:
> Initially, width/height were actually needed because not all
> pipe_surface objects were backed by pipe_resource objects (that was ages
> ago...). Hence the comment when that was fixed, since it was always
> actually possible to derive this from the resource (but a bit too
> complex to change all the code...).
> Are there now situations when you can't figure this out from the
> resource? Or do you think it's actually useful as a convenience member?

It's useful and it would complicated to remove.

Marek

>
> Roland
>
> Am 17.07.2018 um 07:37 schrieb Dave Airlie:
>> From: Dave Airlie <airlied at redhat.com>
>>
>> We do need width/height for things, remove the outdated
>> comment.
>> ---
>>  src/gallium/include/pipe/p_state.h | 1 -
>>  1 file changed, 1 deletion(-)
>>
>> diff --git a/src/gallium/include/pipe/p_state.h b/src/gallium/include/pipe/p_state.h
>> index 809aa087ce0..b55624d698d 100644
>> --- a/src/gallium/include/pipe/p_state.h
>> +++ b/src/gallium/include/pipe/p_state.h
>> @@ -435,7 +435,6 @@ struct pipe_surface
>>     struct pipe_resource *texture; /**< resource into which this is a view  */
>>     struct pipe_context *context; /**< context this surface belongs to */
>>
>> -   /* XXX width/height should be removed */
>>     uint16_t width;               /**< logical width in pixels */
>>     uint16_t height;              /**< logical height in pixels */
>>
>>
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list