Skip to content

arb_texture_view: allow a few alternative values

Erik Faye-Lund requested to merge kusma/piglit:texture-view-unorm-fix into main

This test incorrectly assumes "perfect" precision when converting unorm values to float. Extending this test to perfectly handle every legal value would be a big and complicated change.

But in reality, there's really only two sets of values that are "reasonable" here, values computed using "x / 255.0f" or values computed using "x * (1.0f / 255)". There's no obvious way of generating different values here, so let's just "white-list" both variants.

This means we'll have to pass two expected values, one with each equation. To keep things simple, we assume that a single implementation only ever generates values of one of the two kinds at once.

This isn't perfect, but allows us to keep an optimization in LLVMpipe while passing these tests.

Merge request reports