197g / 197g/zosimos

Support planar binary image layouts

Aberta
#9 0 comentários 0 reações 0 responsáveis Ver no GitHub
enhancement
Linguagem predominante
Rust
Estrelas
11
Forks
1
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

Support planar layouts as input/output. It's explicitly not the goal to support them as the internal representation. Currently, each texture _can_ be represented with up to five buffers / textures on the GPU side with possible data transfer as indicated.

```
inp_buffer (host mappable)
|*
v
quantized buffer <---> staging texture <---> linear access texture
|*
v
out_buffer (host mappable)
```

Each of the textures on the way performs some form of normalization. The copy between `inp_buffer` and `quantized_buffer` –and respectively the other way to `out_buffer`–will currently always involve a `copy_buffer_to_buffer` command. However, we could add another intermediate buffer and a compute shader to the two operations marked with (*). (Note: if we do have the feature `MAPPABLE_PRIMARY_BUFFERS` then this isn't necessary as we can mark the inp/out buffer attachable while using them for their primary purpose of host IO. However, in those cases we might have also elided the original input and output buffers because similarly we don't need them for transferring simple textures).

This compute shader would have the primary purpose of normalizing any planar texture to a block-based rectangular texture. This implies that each so supported planar layout must have an equivalent block layout where the only difference is the order of texel components in memory, with the exact same bit width in components. This restriction doesn't seem too bad. For byte-sized components such a layout should almost always exist anyways and for layouts where one particular plane contains very compressed parts (e.g. 1-bit alpha or 1-bit b/w) we could also introduce additional block layouts with a small number of uninterpreted bits. The architecture comfortably permits such `uint32` encoded blocks to be added to `stage.frag` without too much hassle.

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Direção de pesquisa

A issue descreve a adição de suporte para layouts de imagem binária planar como entrada/saída, não como representação interna. Envolve modificar o fluxo de dados entre buffers e texturas, potencialmente adicionando um compute shader para normalização. Examine o código atual de manipulação de texturas, provavelmente em torno das operações de cópia de buffer para textura marcadas com (*). Entenda o `stage.frag` existente e como os layouts de bloco são definidos. O objetivo é transformar layouts planares em layouts retangulares baseados em blocos, garantindo larguras de bits equivalentes.

Escrita pelo modelo de indexação a partir do texto da issue.

Avaliação

Domínio
computer-graphics
Tipo de issue
Funcionalidade
Dificuldade
4/5
Tempo estimado
3-5 dias
Status de atividade
Estagnada
Clareza
Razoavelmente clara
Facilidade para iniciantes
35/100

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.