Skip to content

vc4: NIR range analysis #89

Open
Open
@anholt

Description

@anholt

We often unpack values from unorm4x8 in vc4, and we know that those will be between 0.0 and 1.0 so a min(unpack_unorm4x8(a), 1.0) is unnecessary (this pattern appears in vertex shaders a lot). It would be good to have a NIR pass that tracks the ranges of values and removes extra instructions. A GSOC student did some work on this at https://github.com/thohel/mesa/commits/gsoc-final-range-prop but I found the code very hard to review and it languished.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions