radv: optimize CmdClear{Color,DepthStencil}Image() for layered textures
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 23 Nov 2018 16:04:15 +0000 (17:04 +0100)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 29 Nov 2018 09:18:42 +0000 (10:18 +0100)
commit4b9df824f7f64203be7932250d9f642e78d51b52
treef745ce55a75ac869b637edd5457e4861535c871e
parent7484bc894b91331553c28393cee25646dd5a47d6
radv: optimize CmdClear{Color,DepthStencil}Image() for layered textures

If all layers are bound we can perform a fast color or depth clear
instead of iterating over all layers. This has the advantage
to avoid trashing the framebuffer for nothing if you we end up by
doing a fast clear when calling radv_clear_image_layer(), and
clearing all layers in one shot is obviously faster.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_meta_clear.c