mesa/src
Kenneth Graunke b8be90b8b4 Revert "st/mesa: Transcode ASTC to BC7 (BPTC) where possible"
This reverts commit 68ef895674.

When trying out transcode_astc=true with BPTC on Asphalt 9, we observed
very poor image quality - to the point that basic UI icons were blocky,
and buttons with a black border had smeared pixels on the edges.  Using
DXT5 had no such issues.

I originally suspected there was a bug in the BPTC encoder, but I now
believe the issue is deeper than that.  The commit that introduced the
encoder, 17cde55c53, says:

   "The compressor is written from scratch and takes a very simple
    approach.  It always uses a single mode of the BPTC format (4 for
    unorm and 3 for half-floats) and picks the two endpoints by dividing
    the texels into those which have more or less than the average
    luminance of the block and then calculating an average color of the
    texels within each division.

    It's probably not really sensible to try to use BPTC compression at
    runtime because for example with the Nvidia offline compression tool
    it can take in the order of an hour to compress a full-screen image.
    With that in mind I don't think it's worth having a proper compressor
    in Mesa and this approach gives reasonable results for a usage that
    is basically a corner case."

In other words, the reason our BPTC compressor was so fast is that it
only implements one of the modes and does a low quality approximation.
This honestly should probably be improved somewhat, but the original
use case was for online-compression, the uncommon but mandatory OpenGL
feature where you can supply uncompressed data and trust the driver to
compress it for you (at unknown and uncontrolled quality and speed).

Unfortunately, the compressor as it stands is simply not usable for
transcoding ASTC data where we want to preserve the underlying image
quality as much as possible.

Reviewed-by: Emma Anholt <emma@anholt.net>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16566>
(cherry picked from commit c54555c496)
2022-05-18 11:04:53 -07:00
..
amd radv: always check entry count in descriptor pool when allocating 2022-05-13 10:06:04 -07:00
android_stub android_stub: update platform headers to include atrace 2021-10-09 00:42:32 +00:00
asahi asahi: Port driver to macOS 12.x ABI 2022-03-22 00:19:30 +00:00
broadcom v3dv: Add emulated timeline semaphore support 2022-04-13 17:22:14 +00:00
compiler spirv: fix barrier scope assert 2022-05-17 10:27:31 -07:00
drm-shim drm-shim: Implement a shim function for close 2022-04-12 10:01:39 +00:00
egl egl/kopper: Hook up eglSwapInterval 2022-05-05 14:05:37 -04:00
etnaviv ci: update various ci result files 2022-03-11 09:58:28 +00:00
freedreno tu: Fix indices of drm_msm_gem_submit_cmd when filling them 2022-05-13 10:06:01 -07:00
gallium iris: Add FLUSH_HDC to PIPE_CONTROL_CACHE_FLUSH_BITS 2022-05-18 11:04:28 -07:00
gbm gallium: Learn about kopper 2022-04-07 00:17:40 +00:00
getopt
glx glx: set max values for pbuffer width / height 2022-05-17 10:27:32 -07:00
gtest gtest: Fix output of array ASSERT/EXPECT macros 2021-11-11 09:53:09 -08:00
hgl
imagination pvr: Implement vkCreateQueryPool() and vkDestroyQueryPool(). 2022-04-13 17:58:03 +00:00
imgui
intel anv: disable streamout before emitting mesh shading state 2022-05-13 10:06:04 -07:00
loader gallium/dri: add missing PIPE_BIND_DRI_PRIME handling 2022-02-08 00:13:07 +00:00
mapi glthread: call _mesa_glthread_BindBuffer unconditionally 2022-02-01 06:11:22 +00:00
mesa Revert "st/mesa: Transcode ASTC to BC7 (BPTC) where possible" 2022-05-18 11:04:53 -07:00
microsoft microsoft/compiler: Unload DXIL validator library *after* calling Release() 2022-05-02 10:46:35 -07:00
nouveau
panfrost pan/mdg: Fix multiple spilt writes in the same bundle 2022-05-10 21:23:14 -07:00
tool pps: Open writable renderer node in DrmDevice::create 2022-05-13 10:05:22 -07:00
util util: Keep quiet NaNs quiet when converting to half float. 2022-05-03 09:41:32 -07:00
virtio venus: prepare and feed renderer protocol info into cs 2022-04-09 00:19:05 +00:00
vulkan vulkan/wsi/x11: Ensure we have the required number of images for acquire. 2022-05-10 20:08:49 -07:00
meson.build microsoft: Initial vulkan-on-12 driver 2022-03-25 16:21:45 +00:00