[Mesa-dev] [PATCH 0/3] misc janitorial
Giuseppe Bilotta
giuseppe.bilotta at gmail.com
Fri Dec 4 10:20:15 PST 2015
> Hmm I thought I pushed those in a couple of days ago. Doing it now, thanks !
No, thank you 8-)
>> This is one of those
>> contexts in which things could be done marginally more elegantly with
>> C++. I am proficient enough with C macros and xincludes that I could
>> probably hack together something that avoids the symlinks and the code
>> duplication, but whether or not this would be considered an
>> improvement is very much up to personal taste.
>>
> Before you start moving things around please fish around for
> RADEON_R(12)00. Once things are free of those (either the macros are
> just removed or the functions are split into r100 and r200 variant,
> all the movement comes into play. The last one can be tedious if
> you're unfamiliar with autotools, so just ping me on IRC (not there
> today) and I can guide you around.
I've started looking into the defines and it's not just a matter of
tediousness. The problem with splitting out the conditional functions
is with the callers. Consider for example
radeon_map_renderbuffer_s8z24, which uses get_depth_z32, which has
different forms for R100 and R200. The caller could go in the common
library, since the code is exactly the same, but it would need to know
which get_depth_z32 incarnation to invoke. What would be a nice way to
approach this? Function pointers? Runtime switch? Code duplication of
the entire call chain? Other?
--
Giuseppe "Oblomov" Bilotta
More information about the mesa-dev
mailing list