[Mesa-dev] Rework uniform storage
Jakob Sinclair
sinclair.jakob at openmailbox.org
Wed Apr 13 22:23:39 UTC 2016
Hi! This idea was first suggested by Tim Arceri and it's about how mesa
handles uniform storage.
If you look at the struct gl_uniform_storage you will notice that we
have two variables here that stores the data:
unsigned num_driver_storage;
struct gl_uniform_driver_storage *driver_storage;
But we also have another one:
gl_constant_value *storage
This is maybe not very efficient because we basicly have to store the
same data twice. It also makes the code more confusing to work with
because there are more interfaces to think about when implementing a
driver.
The reason behind why we have both of these solutions are, as far as I
know, because almost all the drivers use the driver_storage interface.
That is probably due to a historical reason, please correct if I'm
wrong.
Meanwhile gl_constant_value is used for glGetUniform and the
i965 driver. Reworking the uniform storage so it just uses the
gl_constant_value could lead to much simplier, but also more effiecient,
code.
So is it a reasonable idea to implement right now?
What kind of problems could you expect and would anyone benefit from
it?
--
Mvh Jakob Sinclair
More information about the mesa-dev
mailing list