[Mesa-dev] [PATCH 4/5] etnaviv: clean up sampler view reference counting
Christian Gmeiner
christian.gmeiner at gmail.com
Thu May 11 12:05:10 UTC 2017
Hi Lucas,
2017-05-11 10:06 GMT+02:00 Lucas Stach <l.stach at pengutronix.de>:
> Hi Christian,
>
> Am Mittwoch, den 10.05.2017, 21:44 +0200 schrieb Christian Gmeiner:
>> Hi Lucas,
>>
>> 2017-05-10 18:01 GMT+02:00 Lucas Stach <l.stach at pengutronix.de>:
>> > Use the proper pipe_resource_reference function instead of
>> > rolling our own.
>>
>> Would it make sense to convert all gallium drivers using this pattern?
>
> I think most of them are already using the proper pattern. I don't know
> where the etnaviv way of doing this did come from.
>
It comes from freedreno. I would not proposed a gallium wide change
without looking at other drivers :)
Here the same pattern as in etnaviv gets used:
src/gallium/drivers/freedreno/a2xx/fd2_texture.c
src/gallium/drivers/freedreno/a3xx/fd3_texture.c
src/gallium/drivers/freedreno/a3xx/fd4_texture.c
src/gallium/drivers/freedreno/a3xx/fd5_texture.c
src/gallium/drivers/r600/evergreen_state.c
src/gallium/drivers/r600/r600_state.c
src/gallium/drivers/radeonsi/si_state.c
src/gallium/drivers/vc4/vc4_state.c
pipe_reference_init(..) not used:
src/gallium/drivers/i915/i915_state.c
src/gallium/drivers/llvmpipe/lp_state_sampler.c:
src/gallium/drivers/llvmpipe/lp_state_so.c:
src/gallium/drivers/nouveau/nv30/nv30_texture.c
src/gallium/drivers/nouveau/nv50/nv50_tex.c
src/gallium/drivers/nouveau/nvc0/nvc0_tex.c
src/gallium/drivers/r300/r300_state.c
src/gallium/drivers/softpipe/sp_state_so.c
src/gallium/drivers/softpipe/sp_tex_sample.c
There are some more files to look at but I think that should be
enough. I am really not a big fan programming the same functionality
with different patterns - me loves consistency in the whole code base.
I will push your series over the weekend (my main etnaviv hacking
time) and will tackle the consistency thing on my own.
greets
--
Christian Gmeiner, MSc
https://www.youtube.com/user/AloryOFFICIAL
https://soundcloud.com/christian-gmeiner
More information about the etnaviv
mailing list