[Mesa-dev] RFC uniform packing for gallium V2
Timothy Arceri
tarceri at itsqueeze.com
Sun Jun 25 01:31:32 UTC 2017
There are still a handful of piglit tests failing and I'm yet to test
that there are no regressions in the non-packed path, but I'd really
like some feedback on the approach as Dave has flagged it as a possible
controversial tgsi change.
In order to avoid complicated swizzling and array element adjustments
when dealing with arrays, this series simply adjusts the constant buffer
index to point to the right location. There are some small changes to
deal with indirect indexing but these also remain very simple and easy
to follow.
Dave has raised concerns that others might not like this as it doesn't
strictly follow the tgsi approach that everything is a vec4. I would
argue however that this is by far the simplest approch.
Doing this with swizzles and array adjustments is going to require
something like lower_packed_varyings.cpp which would be unnecessarily
complicated IMO, I started off down that track and soon changed
direction.
The main goal of this series is to reduce the cpu overhead cause by
_mesa_propagate_uniforms_to_driver_storage(). The function is slow since we
need to deal with strides etc because we are copying packed data to an
unpacked destination. It's also copying data that we have only just copied
to anouther duplicate uniform storage that gets created by the linker.
This series fixes both of these issues and also reduces the size of the
drivers const buffer as a side effect.
Patches 2-3 just rework the way we use the param list.
The remaining add the packing support enabled by the
PackedDriverUniformStorage const.
You can get the series in my test4 branch [1].
[1] https://github.com/tarceri/Mesa.git
More information about the mesa-dev
mailing list