Support planar binary image layouts
- Ngôn ngữ chính
- Rust
- Star
- 11
- Fork
- 1
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Hướng nghiên cứu
The issue describes adding support for planar binary image layouts as input/output, not as internal representation. It involves modifying the data flow between buffers and textures, potentially adding a compute shader for normalization. Look at the current texture handling code, likely around the buffer-to-texture copy operations marked with (*). Understand the existing `stage.frag` and how block layouts are defined. The goal is to transform planar layouts to block-based rectangular layouts, ensuring equivalent bit widths.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- rust
- Lĩnh vực
- computer-graphics
- Loại issue
- Tính năng
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 35/100