Graphics Programming
TVP4020
Programmers Reference Manual
88
5.8
Texture Read Unit
The texture buffer holds texture data. The buffer shares the same
memory as the localbuffer and framebuffer; texture maps are normally
written to memory through the framebuffer write unit in a similar manner
to image download.
The Texture Read unit receives texture addresses from the Texture
Address unit and reads data from memory. If bilinear filtering is enabled,
several accesses may be done to collect the correct number of texels.
5.8.1
Read Unit
The address calculation implements the following equations:
Bottom left origin -
Address = TextureBaseAddress - T* W + S
Top left origin -
Address = TextureBaseA T * W + S
where:
Address
is the address any read will be made from.
S
is the texel's S coordinate.
T
is the texel's T coordinate.
TextureBaseA
ddress
holds the base address of the current texture.
W
is the texture width. Only a subset of widths are
supported and these are encoded into the PP0, PP1
and PP2 fields in the TextureReadMode register. See
the table in Appendix C for more details.
The TextureMapFormat register specifies how the texture map is held in
memory. This includes the width of the texture map using partial product
codes and the size of the texel. The TextureReadMode register
specifies how the texture map should be handled internally. This sets
the width (maximum S) and height (maximum T) that should be used
when accessing the texture. There are three ways that the address can
be modified if it exceeds either the width or height (or goes negative):
Clamp
clamp the coordinate to 0 or the maximum value.
Repeat
access the map modulo the width or height. This
results in the texture map being repeated.
Mirror
access the map modulo the width or height and mirror
alternate texture maps.
Summary of Contents for TVP4020 PERMEDIA 2
Page 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...
Page 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...
Page 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...
Page 314: ...TVP4020 Programmers Reference Manual Index 305 ...
Page 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...
Page 323: ...Index TVP4020 Programmers Reference Manual 314 ...