[Libre-soc-bugs] [Bug 91] Design and implement texturing opcodes for 3D graphics

bugzilla-daemon at libre-soc.org bugzilla-daemon at libre-soc.org
Sun Sep 20 10:44:20 BST 2020


https://bugs.libre-soc.org/show_bug.cgi?id=91

--- Comment #12 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
You can replace the entire functionality of a texture unit by a few special
instructions in your CPU:

1. an custom instruction for bilinear filtering (you already have that)
2. an instruction for 2x2 matrix transform
3. an instruction to load a 2x2 pixel block from a texture.

About item 3, you can do some complex stuff there if you want. For example, you
can postulate that textures are stored as 4x4 blocks of pixels, alligned, and
the instruction has to handle that. The additional complexity is that the
instruction may need to load pixel data from multiple pixel blocks.


There is one more thing required to replace the functionality of a texture
unit: a texture cache. A texture cache should be shared by all GPU cores on a
die, the cache is read-only, and it has direct access to memory. Each CPU-GPU
has special LOAD instruction(s) to load data from the texture cache.

A texture cache does not need to be very fast (as long as your OoO engine can
find other stuff to do while waiting for data from the cache). A benefit of a
texture cache is that it reduces the required bandwidth to main memory.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the libre-soc-bugs mailing list