[Mesa-dev] [PATCH 01/10] gallium: cleanup set_tess_state

Rob Clark robdclark at gmail.com
Tue Jun 14 16:27:11 UTC 2016


On Tue, Jun 14, 2016 at 12:13 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
> [trimming cc's because mesa-dev hates them]
>
> On Tue, Jun 14, 2016 at 12:09 PM, Rob Clark <robdclark at gmail.com> wrote:
>> On Tue, Jun 14, 2016 at 12:02 PM, Ilia Mirkin <imirkin at alum.mit.edu> wrote:
>>> Can you explain the motivation behind this change? I'm adding a
>>> ->set_window_rectangles thing which also takes multiple parameters.
>>> What's the advantage of stuffing things into a struct first?
>>
>> consistency with the other pipe->set_xyz APIs, and adding support for
>> it in rsq would then be a one line addition on rsq_state.py rather
>> than writing a bunch of code by hand ;-)
>
> Sounds like it should be easy to extend your new script to handle
> different argument types easily, no? I don't know that the "this new
> script I wrote doesn't handle this situation well, so let's change a
> bunch of code" logic is the right one...

maybe.. in the best case it makes the script more complicated.  And,
IMHO, it is nice when the API is more consistent.  Plus having a
struct gives other drivers a convenient way to store the information.
So I think it makes sense on it's own, even ignoring the script.

BR,
-R

>   -ilia


More information about the mesa-dev mailing list