[Mesa-dev] [PATCH 2/3] etnaviv: Add TS_SAMPLER formats to etnaviv_format

Wladimir laanwj at gmail.com
Sat Nov 11 09:46:26 UTC 2017


On Tue, Nov 7, 2017 at 5:43 PM, Wladimir J. van der Laan
<laanwj at gmail.com> wrote:
> Sampler TS introduces yet another format enumeration for renderable
> formats. Introduce it into etnaviv_format as unobtrusively as possible.
>
> Signed-off-by: Wladimir J. van der Laan <laanwj at gmail.com>
> ---
>  src/gallium/drivers/etnaviv/etnaviv_format.c | 19 +++++++++++++++++++
>  src/gallium/drivers/etnaviv/etnaviv_format.h |  3 +++
>  2 files changed, 22 insertions(+)

I think I found a potential problem with this approach of mapping
name-to-name. Though most of the RS formats map immediately to TS
formats, there are some exceptions, like the depth formats:

  _T(Z16_UNORM,      D16,      SWIZ(X, Y, Z, W), A4R4G4B4),
  _T(X8Z24_UNORM,       D24X8, SWIZ(X, Y, Z, W), A8R8G8B8),
  _T(S8_UINT_Z24_UNORM, D24X8, SWIZ(X, Y, Z, W), A8R8G8B8),

For practical reasons these have been assigned RS formats that happen
to have the same size, which is enough for RS blit.
Sampler TS on the other hand has dedicated formats for depth:

TS_SAMPLER_FORMAT_D24X8
TS_SAMPLER_FORMAT_D16

Not sure how much difference this makes, though... Depth texturing (as
in glmark shadow benchmark) seems to just work.

Wladimir


More information about the mesa-dev mailing list