Skip to content

vc4: Try direct memory access for nearest-filtered raster textures #53

Open
@anholt

Description

@anholt

Right now when we try to texture from a raster texture, we make a shadow copy of the texture that's tiled, because 2708B0's raster texture sampling is broken. This is unfortunate because it means that the cost of sampling from the texture scales with the total size of the texture rather than the size of the sampling being done, and there's definitely an extra load and store even if you were sampling the full texture once.

If we recognized that we were doing non-mipmapped nearest filtering and no complicated wrapping, we could probably lower our texture accesses to direct memory access and do the math in the shader to figure out which texel to fetch. This would save us the whole shadow copy trouble, at the cost of slower per-sample access compared to the shadow alternative.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions