Skip to content

st/mesa, iris: Add optional CPU-based ASTC void extent denorm flushing

Kenneth Graunke requested to merge kwg/mesa:astc-void-extent into main

Intel Gen9 GPUs have hardware ASTC support, but have a bug where they don't handle denormalized values in void extent blocks correctly. This isn't that hard to work around - on upload, we can detect such blocks, and flush any denorms to zero. Because we're altering the data behind the application's back, and applications can theoretically ask to download the original unaltered image data, we unfortunately need to maintain shadow copies of the data.

To make sure that we don't accidentally skip the void-extent flushing via any fast-upload paths, and support download correctly, we plug this into the st/mesa compressed texture format fallback paths, which store a CPU copy of the original image data, and upload altered data.

This is unfortunately common code for what's likely to be a single driver's issue (on a single generation), but it beats replicating an entire framework we already have inside the driver.

Fixes dEQP-GLES3.functional.texture.compressed.astc.void_extent_ldr.* using iris on Intel Gen9 GPUs.

+@mattst88 +@anholt

Merge request reports

Loading