[Mesa-dev] [PATCH v2 0/5] etnaviv: Add sampler TS support
Wladimir J. van der Laan
laanwj at gmail.com
Tue Nov 14 09:21:18 UTC 2017
Sampler TS is an hardware optimization that can be used when rendering
to textures. After rendering to a resource with TS enabled, the
texture unit can use this to bypass lookups to empty tiles. This also
means a resolve-in-place can be avoided to flush the TS.
This patch series adds support for sampler TS on hardware that supports
this. It also contains an optimization when not using sampler TS, as
resolve-in-place will now be skipped if a resource has no (valid) TS.
For example the 'shadow' test in on i.mx8qp glmark2 increases in performance
with:
before: [shadow] <default>: FPS: 130 FrameTime: 7.692 ms
after: [shadow] <default>: FPS: 244 FrameTime: 4.098 ms
Changes since previous version:
- Add a new column to the formats table for the TS format (for all texturable
formats) instead of a trick based on RS format and name, as that didn't cover
depth formats correctly.
- Roll the call to etna_resource_has_valid_ts into etna_resource_needs_flush,
so that resolve-to-self and sampler TS is only used when the resource has a
valid TS in the first place.
- Add a patch that makes sure that the TS cache is flushed to memory before
programming the TS with new state (so before rendering to a new surface
starts). This should prevent missing tile artifacts.
- Remove unused added arguments from etna_update_sampler_source /
etna_configure_sampler_ts / etna_can_use_sampler_ts
Wladimir J. van der Laan (5):
etnaviv: rnndb update
etnaviv: Check that resource has a valid TS in
etna_resource_needs_flush
etnaviv: Add TS_SAMPLER formats to etnaviv_format
etnaviv: Flush TS cache before changing TS configuration
etnaviv: Add sampler TS support
src/gallium/drivers/etnaviv/etnaviv_emit.c | 31 +++++
src/gallium/drivers/etnaviv/etnaviv_format.c | 162 +++++++++++++-----------
src/gallium/drivers/etnaviv/etnaviv_format.h | 3 +
src/gallium/drivers/etnaviv/etnaviv_resource.c | 13 ++
src/gallium/drivers/etnaviv/etnaviv_resource.h | 6 +-
src/gallium/drivers/etnaviv/etnaviv_texture.c | 74 ++++++++++-
src/gallium/drivers/etnaviv/etnaviv_texture.h | 5 +
src/gallium/drivers/etnaviv/hw/common.xml.h | 2 +-
src/gallium/drivers/etnaviv/hw/common_3d.xml.h | 2 +-
src/gallium/drivers/etnaviv/hw/state.xml.h | 4 +-
src/gallium/drivers/etnaviv/hw/state_3d.xml.h | 14 +-
src/gallium/drivers/etnaviv/hw/state_blt.xml.h | 4 +-
src/gallium/drivers/etnaviv/hw/texdesc_3d.xml.h | 3 +-
13 files changed, 233 insertions(+), 90 deletions(-)
--
2.7.4
More information about the mesa-dev
mailing list