diff options
author | Jason Ekstrand <[email protected]> | 2017-07-11 13:17:06 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2017-09-20 17:21:06 -0700 |
commit | 1e5fd2f839187c647b7cbb7256d6c950b219eba3 (patch) | |
tree | c1aa41f7489a113c7fde38d141785329470ae228 /src/intel/blorp | |
parent | 2c8058fb68a1e8cbc835272bd70c65eeac0779b9 (diff) |
anv/image: Support creating uncompressed views of compressed images
In order to get support everywhere, this gets a bit complicated. On Sky
Lake and later, everything is fine because HALIGN/VALIGN are specified
in surface elements and are required to be at least 4 so any offsetting
we may need to do falls neatly within the heavy restrictions placed on
the X/Y Offset parameter of RENDER_SURFACE_STATE. On Broadwell and
earlier, HALIGN/VALIGN are specified in pixels and are hard-coded to
align to exactly the block size of the compressed texture. This means
that, when reinterpreted as a non-compressed texture, the tile offsets
may be anything and we can't rely on X/Y Offset.
In order to work around this issue, we fall back to linear where we can
trivially offset to whatever element we so choose. However, since
linear texturing performance is terrible, we create a tiled shadow copy
of the image to use for texturing. Whenever the user does a layout
transition from anything to SHADER_READ_ONLY_OPTIMAL, we use blorp to
copy the contents of the texture from the linear copy to the tiled
shadow copy. This assumes that the client will use the image far more
for texturing than as a storage image or render target.
Even though we don't need the shadow copy on Sky Lake, we implement it
this way first to make testing easier. Due to the hardware restriction
that ASTC must not be linear, ASTC does not work yet.
Reviewed-by: Lionel Landwerlin <[email protected]>
Diffstat (limited to 'src/intel/blorp')
0 files changed, 0 insertions, 0 deletions