[Mesa-dev] [PATCH] gallium: surface remove width/height removal comment
Roland Scheidegger
sroland at vmware.com
Wed Jul 18 17:46:37 UTC 2018
Am 18.07.2018 um 19:29 schrieb Marek Olšák:
> 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.
Alright. I was really just more wondering if the values couldn't be
recalculated always nowadays for some reason. I'm ok with removing the
comment, even if it's just convenience members.
Roland
>
> 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://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.freedesktop.org%2Fmailman%2Flistinfo%2Fmesa-dev&data=02%7C01%7Csroland%40vmware.com%7C452ce5815db4453ae7b908d5ecd42871%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C1%7C0%7C636675318315245680&sdata=P59Ow0j2JORvL0GySNtJZJEIon5%2BEnBAfAFXZa2%2FTYQ%3D&reserved=0
More information about the mesa-dev
mailing list