Skip to content

Piero Bosio Social Web Site Personale Logo Fediverso

Social Forum federato con il resto del mondo. Non contano le istanze, contano le persone

I just enabled ASTC on Tegra with, effectively, one line of code and got it right on the first try.

Uncategorized
1 1 0
  • I just enabled ASTC on Tegra with, effectively, one line of code and got it right on the first try.

    Do you have any idea how amazing this is?

    You know. ASTC. The one format that has a non-power-of-two block size. The only format group NVIDIA supports where the block size isn't square.

    First try. Every single Vulkan CTS test for ASTC passes.

    On Intel, getting ASTC working was utter hell. We had so many image layout bugs. Block sizes of 4 were assumed all over everywhere. There were x/y mixups that only mattered for non-square blocks. The whole cooncept of a non-power-of-two didn't exist. Our block compressed format handling was also just plumb wrong.

    Then Lina and I wrote ISL and put a lot of time and thought into how we do layout calculations to avoid a lot of the anti-patterns in the old code. Everything has units. Everything is an isl_extent4d and those have helpers so you aren't banging on them manually. We carefully ensured that the calculation flow only went one direction and we never multiplied and then divided it back out later. ISL fixed so many bugs.

    With NVK, I wrote NIL which was based on our learnings from ISL. After Daniel helped me port NIL to Rust, I took it a step further and encoded the units in Rust types instead of just suffixes on variable names. This means you have to go out of your way to ever screw up a unit conversion.

    The result is ASTC in one line of code.

  • oblomov@sociale.networkundefined oblomov@sociale.network shared this topic on

Gli ultimi otto messaggi ricevuti dalla Federazione
Post suggeriti