background image

Graphics Register Reference

TVP4020 

Programmers Reference Manual

244

4 = GREATER
5 = NOT EQUAL
6 = GREATER OR EQUAL
7 = ALWAYS

Bit13-14

Stencil Source:

0 = Test Logic
1 = Stencil Register
2 = LBData
3 = LBSourceData

Name:

Suspend until

frameblank

Unit:

Framebuffer R/W

Region: 0

Offset:

0x0000.8C78

Tag:

0x018F

Reset Value:

Undefined

Write

0

8

16

24

31

32 bit integer address

This command causes all outstanding framebuffer writes to be flushed and then

suspension of framebuffer accesses until the next frameblank period. The data field is the
start address of the next frame to be displayed. This address will be used from the next
frameblank until a new address is supplied.

Bit0-31

Address

SuspendUntilFrameblank

Summary of Contents for TVP4020 PERMEDIA 2

Page 1: ...Texas Instruments TVP4020 PERMEDIA 2 Programmer s Reference Manual Issue 4 ...

Page 2: ...OR PRODUCTS ARE NOT DESIGNED INTENDED AUTHORIZED OR WARRANTED TO BE SUITABLE FOR USE IN LIFE SUPPORT APPLICATIONS DEVICES OR SYSTEMS OR OTHER CRITICAL APPLICATIONS Inclusion of TI products in such applications is understood to be fully at the risk of the customer Use of TI products in such applications requires the written approval of an appropriate TI officer Questions concerning potential risk a...

Page 3: ...s Inc Ltd Microsoft Windows and Direct3D are either registered trademarks or trademarks of Microsoft Corp in the United States and or other countries OpenGL is a registered trademark of Silicon Graphics Inc Macintosh and Power Macintosh are registered trademarks and QuickDraw is a trademark of Apple Computer Inc All other trademarks are acknowledged and recognized ...

Page 4: ...anization 25 4 1 Patched Data 25 4 2 Localbuffer 25 4 3 Framebuffer 27 4 4 Double Buffering 33 4 5 Texture Buffer 37 5 Graphics Programming 40 5 1 The Graphics HyperPipeline 40 5 2 Delta Unit 42 5 3 Rasterizer Unit 48 5 4 Scissor Stipple Unit 68 5 5 Localbuffer Read and Write Units 73 5 6 Stencil Depth Test Unit 77 5 7 Texture Address Unit 85 5 8 Texture Read Unit 88 5 9 YUV Unit 95 5 10 Framebuff...

Page 5: ...oads 144 7 5 Multi Buffering 145 7 6 Overlays 146 7 7 Memory Organization 146 7 8 Chroma Test 147 7 9 Configuration for 2D 147 8 Delta Programming Examples 148 Appendix A Graphics Register Reference 162 Appendix B Pseudocode Definitions 272 Appendix C Screen Widths Table 274 Appendix D A Gouraud Shaded Triangle without using the Delta Unit 276 Appendix E Register Tables 284 Appendix F TVP4010 and ...

Page 6: ...5 21 Texture Address Interpolation 85 Figure 5 22 Fixed Point S and T Format 86 Figure 5 23 Fixed Point Q Format 86 Figure 5 24 TextureAddressMode 87 Figure 5 25 TextureReadMode Register 90 Figure 5 26 TextureMapFormat Register 91 Figure 5 27 TextureDataFormat Register 91 Figure 5 28 TexelLUTMode Register 92 Figure 5 29 TexelLUTAddress register 92 Figure 5 30 YUVMode Register 97 Figure 5 31 Chroma...

Page 7: ...e Register Bit Field Assignments 46 Table 5 4 Rasterizer Command Registers 63 Table 5 5 Rasterizer Control Registers 64 Table 5 6 Render Command Register Fields 65 Table 5 7 Rasterizer Mode Register 66 Table 5 8 Localbuffer Read Write Modes 74 Table 5 9 Stencil Comparison Modes 78 Table 5 10 Possible Update Operations for Stencil Planes 78 Table 5 11 Stencil Operations 78 Table 5 12 Stencil Source...

Page 8: ...signers who wish to develop software to drive TVP4020 Information on programming the I O registers can be found in the TVP4020 Hardware Reference Manual TVP4020 is the second generation PERMEDIA device Compared with TVP4010 it provides greater flexibility additional features and enhanced performance Throughout this manual the terms TVP4020 and PERMEDIA are used interchangeably An understanding of ...

Page 9: ...Introduction TVP4020 Programmers Reference Manual 2 Appendix C gives a table used to set up common screen widths ...

Page 10: ...al terms follows the Appendices An extensive index is included 1 2 Further Reading TVP4020 Data Manual Texas Instruments TVP4020 Architecture Overview Texas Instruments OpenGL Programming Guide Jackie Neider et al Reading MA Addison Wesley Microsoft WIN32 Software Development Kit 3 1 Microsoft Windows NT 3 1 Graphics Programming Emeryville CA Ziff Davis Press Computer Graphics Principles and Pract...

Page 11: ...Stretch BLTs monochrome color expansion and logic ops 8 16 24 and 32 bit packed framestore MPEG2 compatible Video playback acceleration YUV 4 4 4 YUV 4 2 2 and YUV 4 2 0 native MPEG2 format Unlimited multiple playback windows occluded Independent XY scaling and mirroring Integrated geometry pipeline set up processor Integrated true color 230 MHz RAMDAC 320x200 to 1600x1200 screen resolution DPMS D...

Page 12: ...ds color data for display Bus Interface Memory Interface VGA GraphicsHyperpipeline Host Bus SGRAM Bypass Figure 2 1 External Interfaces 2 2 2 Host Interface Conceptually PERMEDIA can be viewed as a register file Control registers are primed with the information required for a primitive and then to start the chip drawing a write is made to a Command register PERMEDIA registers can be accessed direc...

Page 13: ...upported Mode hex Alpha Format Char Size Colors Max Page Type Format Resolution 00 0 0 0 40 by 25 40 by 25 40 by 25 8 by 8 8 by 14 9 by 16 16 256K bw 16 256K bw 16 256K bw 8 8 8 Alpha Alpha Alpha 320 by 200 320 by 350 360 by 400 01 1 1 1 40 by 25 40 by 25 40 by 25 8 by 8 8 by 14 9 by 16 16 256K 16 256K 16 256K 8 8 8 Alpha Alpha Alpha 320 by 200 320 by 350 360 by 400 02 2 2 2 80 by 25 80 by 25 80 b...

Page 14: ...TVP4020 Programmers Reference Manual Overview 5 The following VESA SVGA modes are supported Mode hex Pixels Colors 100 640 by 400 256 101 640 by 480 256 Table 2 2 VESA SVGA Modes ModeX is also supported ...

Page 15: ... ROM relocatable SVGA Memory I O SVGA Addresses optional fixed Table 3 1 Memory Regions Address Range Description Byte Swap 0000 0000 0000 0FFF Control Status No 0000 1000 0000 1FFF Memory Control No 0000 2000 0000 2FFF GP FIFO access No 0000 3000 0000 3FFF Video Control No 0000 4000 0000 4FFF RAMDAC No 0000 5000 0000 57FF Video Streams General Purpose Bus No 0000 5800 0000 5FFF Video Streams Cont...

Page 16: ...w a primitive consists of writing values to the appropriate registers followed by a write to a command register This last write triggers the start of drawing PERMEDIA has approximately 200 registers All registers are 32 bits wide and should be 32 bit addressed Many registers are split into bit fields and it should be noted that bit 0 is the least significant bit In future chip revisions the regist...

Page 17: ...p track of changing values Some control registers have corresponding internal registers When a begin draw command is sent and before rendering starts the internal registers are updated with the values in the corresponding control registers If a continue draw command is sent then this update does not happen and drawing continues with the current values in the internal registers For example if a lin...

Page 18: ...riting to any register the host must ensure that there is enough space left in the FIFO The values in this register can be read at any time When using DMA the DMA controller will automatically ensure that there is room in the FIFO before it performs further transfers Thus a buffer of any size up to 64K 32 bit words can be passed to the DMA controller The FIFO and DMA controller are described in mo...

Page 19: ... a new entry The actual register is not updated until PERMEDIA processes this entry In the case where PERMEDIA is busy performing a time consuming operation e g drawing a large texture mapped polygon and not draining the FIFO very quickly it is possible for the FIFO to become full If a write to a register is performed when the FIFO is full no entry is put into the FIFO and that write is effectivel...

Page 20: ...en or where one register is to be written many times Note The FIFO interface can be accessed at 32 bit boundaries This is to allow a direct copy from a DMA format buffer 3 2 4 The DMA Interface Loading registers directly via the FIFO is often an inefficient way to download data to PERMEDIA Given that the FIFO can accommodate only a small number of entries PERMEDIA has to be frequently interrogated...

Page 21: ...rk DMAAddress address of dma_buffer while TRUE count DMACount note this is volatile if count while count wait for count to expire else break DMA completed copy render data into DMA buffer DMACount number of words in DMA buffer return Using DMA leaves the host free to return to the application while in parallel PERMEDIA is performing the DMA and drawing This can increase performance significantly o...

Page 22: ...different types of tag description words that can be used DMA Tag Description Format When DMA is performed each 32 bit tag description in the DMA buffer conforms to the following format reserved 0 8 16 24 31 Count orMask AddressTag reserved Mode 0 Holdtag 1 Increment tag 2 Indexedtag 3 Reserved Figure 3 1 DMA Tag Description Format There are 3 different tag addressing modes for DMA hold increment ...

Page 23: ... low order 16 bits A special case of this format is where the top 16 bits are zero indicating that a single data value follows the tag i e the 32 bit tag description is simply the address tag value itself This allows simple DMA buffers to be constructed which consist of tag data pairs For example to render a horizontal span 10 pixels long starting from 2 5 the DMA buffer could look like this Start...

Page 24: ...s the individual registers with their Major Group and Offset 0 9 4 Major Group Offset 8 Figure 3 2 Indexed Format This format allows up to 16 registers within a group to be loaded while still only specifying a single address tag description word address tag with Mask Mode 2 value 1 value n If the Mode of the address tag description word is set to indexed mode then the high order 16 bits are used a...

Page 25: ...lowing pseudo code shows the previous example of drawing a series of rectangles but this time using the DMA controller This example uses a single DMA buffer and the simplest Hold Mode for the tag description words in the buffer UINT32 pbuf DMAAddress physical address of dma_buffer while DMACount 0 wait for DMA to complete pbuf dma_buffer pbuf PERMEDIATagdXDom pbuf 0 pbuf PERMEDIATagdXSub pbuf 0 pb...

Page 26: ...e host software must wait for each set to be transferred Often the best way to handle these fragmented transfers is via an interrupt handler DMA Interrupts PERMEDIA provides interrupt support as an alternative means of determining when a DMA transfer is complete This can provide considerable speed advantage If enabled the interrupt is generated whenever the DMACount register changes from having a ...

Page 27: ... FilterMode register This register allows filtering of output data in various categories including the following Depth output in this category results from an image upload of the Depth buffer Stencil output in this category results from an image upload of the Stencil buffer Color output in this category results from an image upload of the framebuffer Synchronization synchronization data is sent in...

Page 28: ...t address and use this as the address for the output FIFO All 32 bit addresses in this region perform the same function the range of addresses is provided for data transfer schemes which force the use of incrementing addresses Writing to a location in this address range provides raw access to the input FIFO Again the first address is normally chosen Thus the same address can be used for both input...

Page 29: ...ce See the TVP4020 Hardware Reference Manual for more details of the Graphics Processor FIFO Interface address range 3 3 Interrupts All interrupts can be individually enabled and disabled Refer to the TVP4020 Hardware Reference Manual for more details 3 4 Synchronization There are two main cases where the host must synchronize with PERMEDIA before reading back from PERMEDIA registers before direct...

Page 30: ...ut value will be generated only when a Sync command has actually been sent and PERMEDIA has then completed all processing Rather than polling it is possible to use a Sync interrupt as mentioned in the previous section As well as enabling the interrupt and setting the filter mode the data sent in the Sync command must have the most significant bit set in order to generate the interrupt The interrup...

Page 31: ... Adjacent pixels in the same buffer are separated by 16 bits As some software has difficulty with pixels that are not packed together the memory windows can be configured to remap the data so that only the front or back buffer is visible and it appears packed 3 6 DMA Controller A DMA controller is provided to allow transfer of data from the PCI bus to PERMEDIA memory This controller is independent...

Page 32: ...nd little endian host processors Since the PCI Bus specification defines that byte ordering is preserved regardless of the size of the transfer operation PERMEDIA provides facilities to handle byte swapping See the TVP4020 Hardware Reference Manual for more details of byte swapping via the PCI bus Additional support is provided within the graphics core of the chip to byte swap images and bitmasks ...

Page 33: ...Programming Model TVP4020 Programmers Reference Manual 24 set in the Color Format unit and the Texture Read unit via the DitherMode and TextureDataFormat registers ...

Page 34: ... 2 Kbyte region but imposes a penalty for moving to a new 2 Kbyte region This page structure favors access patterns that move along a scanline but is inefficient for moving vertically as the large change in address may cause a page break Patched data is organized so that there is less penalty for moving vertically in a buffer at the expense of a decrease in performance for moving horizontally This...

Page 35: ...rigin Destination address LBWindowBase Y W X Source address LBWindowBase Y W X LBSourceOffset where X is the pixel s X coordinate Y is the pixel s Y coordinate LBWindowBase holds the base address in the localbuffer of the current window LBSourceOffset is normally zero except during a copy operation where data is read from one address and written to another address The offset between source and des...

Page 36: ...similar to that for the localbuffer except for the addition of FBPixelOffset The WindowOrigin bit in the FBReadMode register selects top left or bottom left as the origin for the framebuffer The actual equations used to calculate the framebuffer address to read and write are Bottom left origin Destination address FBWindowBase Y W X FBPixelOffset Source address FBWindowBase Y W X FBPixelOffset FBSo...

Page 37: ...sizes for instance when rendering to off screen memory such as bitmaps the next largest width from the table must be chosen The difference between the table width and the bitmap width will be an unused strip of pixels down the right hand side of the bitmap Note that such bitmaps can be copied to the screen only as a series of scanlines rather than as a rectangular block unless the Texture Read uni...

Page 38: ...etermines how many of the bytes are written to memory If a 16 bit format is chosen e g 5 5 5 1 then the data is repeated in the upper and lower halves of the word If the pixel size is set to 16 bits then only half the word is written to memory if the pixel size is set to 32 bits then both halves are written with the same data in each A writemask can be used to select which bits are written This is...

Page 39: ...Memory I O and Organization TVP4020 Programmers Reference Manual 30 value CI where each value references an entry in a color look up table that contains RGB values ...

Page 40: ... 5 6 5Front 5 0 6 5 5 11 0 17 BGR 5 6 5Back 5 16 6 21 5 27 0 YUV 18 BGR YUV444 8 0 8 8 8 16 8 24 19 BGR YUV422 8 0 8 8 8 8 0 RGB 0 RGB 8 8 8 8 8 16 8 8 8 0 8 24 1 RGB 5 5 5 1Front 5 10 5 5 5 0 1 15 2 RGB 4 4 4 4 4 8 4 4 4 0 4 12 5 RGB 3 3 2Front 3 5 3 2 2 0 0 6 RGB 3 3 2Back 3 13 3 10 2 8 0 9 RGB 2 3 2 1Front 2 5 3 2 2 0 1 7 10 RGB 2 3 2 1Back 2 13 3 10 2 8 1 15 11 RGB 2 3 2FrontOff 2 5 3 2 2 0 0 ...

Page 41: ...ites Block writes cause consecutive pixels in the framebuffer to be written simultaneously This is useful when filling large areas but does have some restrictions No depth or stencil testing can be done All the pixels must be written with the same value so no color interpolation alpha blending dithering or logical ops can be done Block writes are not restricted to rectangular areas and can be used...

Page 42: ...ent full screen double buffering with PERMEDIA when using the video timing generator To perform full screen double buffering the available display RAM must be partitioned into two parts buffer 0 and buffer 1 each of which contains enough memory to display a full screen of pixel information The partitioning consists of deciding the offset into RAM at which a given buffer starts This offset is used ...

Page 43: ... buffers should not be swapped until all rendering to the back buffer has completed so that the buffer swap does not result in visible tearing or screen break up PERMEDIA reads the ScreenBase register at the end of each vertical blanking period to determine the starting pixel for the next frame to be displayed Thus in principle this register can be written at any time to swap buffers and will only...

Page 44: ...he SuspendUntilFrameBlank command enables PERMEDIA to swap the buffers automatically when the VBLANK occurs by loading a new buffer offset into the ScreenBase register as discussed above For full details see the detailed description in the register reference Appendix A Thus a single command register access ensures that all rendering has completed to the back buffer the chip will wait for VBLANK be...

Page 45: ...w with either one or zero While this is not as quick as full screen double buffering which just requires a single register ScreenBase to be updated it is many times quicker than BitBlt double buffering and like the BitBlt case allows any number of windows to be hardware double buffered simultaneously Note that when rendering GUI data such as window borders titles etc bit 31 must always be set to t...

Page 46: ... by writing raw texture data to the TextureData register Raw data is 32 bits wide with the correct bit pattern to be stored in memory No data formatting or packing is done so the texture must be pre processed if this is required The texture is stored linearly in memory from the address specified in TextureDownLoadOffset which is automatically incremented no patching is done so if the texture is to...

Page 47: ...Memory I O and Organization TVP4020 Programmers Reference Manual 38 Texture address TextureBaseAddress T W S ...

Page 48: ...ns translate a 2D address into a linear address so non power of two texture widths e g 640 are economical in memory Note that the width of the texture map used for these calculations is independent of the width and height used for texture effects such as repeat or clamp The address is in texels the physical byte address is calculated by multiplying the texel address by the number of bytes in the t...

Page 49: ...he HyperPipeline are Delta Unit calculates parameters Rasterizer scan converts the primitive into a series of fragments Scissor Stipple tests fragments against a scissor rectangle and a stipple pattern Localbuffer Read loads localbuffer data for use in the Stencil Depth unit Stencil Depth performs stencil and depth tests Texture Address generates addresses of texels for use in the Texture Read uni...

Page 50: ...e 5 1 Hyperpipeline The order of the Hyperpipeline shows the order in which operations are performed The Scissor Stipple unit is before the texture address generator so any fragments that fail a stipple test will not cause a texture access This makes best use of the processing capacity of the pipeline An awareness of the pipeline is important when programming PERMEDIA all units in the pipeline can...

Page 51: ...dback mechanism will be the clamped floating point IEEE single precision version of the value written The returned value of a parameter may be different from the value written if any of the following conditions has occurred Any clamping has occurred The input number was a NaN or Denormalized IEEE number The input value has exceeded the internal range approximately 232 1This is the range when Norma...

Page 52: ...ngle Fan Individual triangles strips or fans may be backface culled such that triangles that face away from the viewer are not drawn Detection of backfacing triangles is done by the sign of the area of the triangle but whether positive or negative areas should be rejected depends on the definition of the triangle format whether the vertices are considered to go clockwise or counter clockwise It ma...

Page 53: ...rawTriangle RepeatTriangle DrawLine01 DrawLine10 and RepeatLine When using Delta these drawing commands replace the Render command and have the same data field The Draw and Repeat commands cause Delta to calculate the required data for the rendering devices and update the Start dX and dyDom registers in the Rasterizer Color Depth Texture and Fog Units of the Graphics Processor Any additional regis...

Page 54: ...hat due to the DDA algorithm drawing direction may affect the rendered pixels Hence with the same data in V0 and V1 the two DrawLine commands may render different pixels This may be important for operations such as XOR lines or patterned lines 5 2 3 Repeat Commands The RepeatTriangle and RepeatLine commands allow the previously set up triangle or line to be repeated again This is useful when some ...

Page 55: ...ds This field allows the host to alter the set up parameters before sending a Render command 13 ClampEnable When set causes the input values to be clamped to a parameter specific range Note that the texture parameters are not affected by this field 14 15 TextureParameterMode These field causes the texture parameters to be 0 Used as given 1 Clamped to lie in the range 1 0 to 1 0 2 Normalize to lie ...

Page 56: ...TVP4020 Programmers Reference Manual Graphics Programming 47 register bits 4 and 5 are set to zero to select a zero bias for addition to the start X and Y values ...

Page 57: ...s which are a special case of screen aligned trapezoids To render a triangle the approach adopted to determine which fragments are to be drawn is known as edge walking Suppose the aliased triangle shown in Fig 5 5 was to be rendered from top to bottom and the origin was bottom left of the window Starting at X1 Y1 then decrementing Y and using the slope equations for edges 1 2 and 1 3 the intersect...

Page 58: ...dge 1 dXDom Top Trapezoid Bottom Trapezoid X1 Y1 Subordinate Edge 2 3 dXSub 1 2 dXSub 2 3 X2 Y2 X3 Y3 Knee Figure 5 4 Rasterizing a triangle The sequence of actions required to render a triangle with a knee are Load the edge parameters and derivatives for the dominant edge and the first subordinate edges in the first triangle Send the Render command This starts the scan conversion of the first tri...

Page 59: ... of the triangle Render render Set the start and delta for the second half of the triangle StartXSub X2 16 dXSub X3 X2 16 Y3 Y2 Draw lower half of triangle ContinueNewSub abs Y2 Y3 After the Render command has been sent the registers in PERMEDIA can immediately be altered to draw the second half of the triangle For this note that only two registers need be loaded and the command ContinueNewSub be ...

Page 60: ...terizer DDA and not that of any other units it is not suitable for 3D operations 5 3 2 Lines Single pixel wide aliased lines are drawn using a DDA algorithm so all PERMEDIA needs by way of input data is StartX StartY dX dY and length The algorithm calculates while length X X dx Y Y dy plot int X int Y Consider rendering a two segment polyline from X1 Y1 to X2 Y2 to X3 Y3 Both segments are X major ...

Page 61: ...triangle Care must be taken when a continue command is being used for lines Incorrect rendering can occur with operations such as alpha blending and logical ops if a segment draws back over the previous line segment thus attempting to reuse pixels that have just been updated The solution is to send a Sync prior to the ContinueNewLine This will ensure pending writes are flushed before the framebuff...

Page 62: ...and render PrimitiveType PERMEDIA_POINT_PRIMITIVE Render the point Render render 5 3 4 Rectangles The rectangle primitive is restricted to integer pixel positions only rectangles requiring sub pixel positioning should use the trapezoid primitive The rectangle is defined with two registers RectangleOrigin which defines the X and Y start point and RectangleSize which defines the width and height The...

Page 63: ...RMEDIA supports subpixel correction of interpolated values when rendering trapezoids Subpixel correction ensures that all interpolated parameters associated with a fragment color depth fog texture are correctly sampled at the fragment s center This correction is required to ensure consistent shading of objects made from many primitives It should generally be enabled for all rendering which uses in...

Page 64: ...rored that is the pattern is traversed from MSB to LSB rather than LSB to MSB Also the sense of the test can be reversed such that a set bit causes a fragment to be rejected and vice versa This control is found in the RasterizerMode register described in section 5 3 11 When one Bitmap word has been exhausted and pixels in the rectangle still remain then rasterization is suspended until the next wr...

Page 65: ...PERMEDIA_FALSE Issue render command First fragment will be generated on receipt of the BitMaskPattern Render render 8x5 pixel bitmap requires 40 bits and so 2 32 bit words BitMaskPattern patternWord0 BitMaskPattern patternWord1 Rendering will start as soon as the first patternWord is loaded into the BitMaskPattern register 5 3 9 Block Writes and Bitmaps The fastest way to render downloaded bitmap ...

Page 66: ...hose left edge is 3 pixels less than that required in this case we would rasterize the left edge to start at pixel 7 This causes the source bitmap data to be correctly aligned with the mask data produced by the Rasterizer But in order to protect the 3 pixels that we would otherwise overwrite we use the scissor clip and set its bounds to be those of the original rectangle When using a block write o...

Page 67: ...et Y Offset Screen Width X Offset Destination Rectangle Screen Width Increasing Physical Address Offset Offset Y Offset Figure 5 7 Copy Operation PERMEDIA buffer upload downloads are very similar to copies in that the region of interest is generated in the Rasterizer However the localbuffer and framebuffer are generally configured to read or to write only rather than both read and write The host o...

Page 68: ...e test is reversed Fraction Adjust These 2 bits control the action taken by the Rasterizer on receiving a ContinueNewLine command As PERMEDIA uses a DDA algorithm to render lines an error accumulates in the DDA value PERMEDIA provides for greater control of the error by doing one of the following leaving the DDA running which means errors will be propagated along a line or setting the fraction bit...

Page 69: ...e WaitForCompletion command This has no data field and may be inserted into a stream of commands there is no need to wait for PERMEDIA to report that synchronization has taken place Alternatively synchronization must be done with the Sync command but this does require the host processor to poll the chip until it reports that the pipeline is idle see the section on the Host Out unit 5 3 13 X and Y ...

Page 70: ... s complement fixed point The point is kept consistent with a 16 16 format even though some of the integer and fractional bits may not be significant The integer portion should be sign extended to fill unused bits unused bits in the fraction should be set to zero Integer Portion Fractional Portion 0 8 16 24 31 Figure 5 8 Real Coordinate Representation ...

Page 71: ...loaded with the new parameters The dominant edge is carried on from the previous trapezoid This is useful when scan converting triangles with a knee i e two subordinate edges The data field holds the number of scanlines to fill Note this count does not get loaded into the Count register Continue 12 bit integer Allows the rasterization to continue after new delta value s have been loaded but does n...

Page 72: ...prevent a new primitive from starting to be rasterized before the previous primitive is completely finished It would be used for example to separate texture downloads from the surrounding primitives The same functionality can be achieved using the Sync command and waiting for it in the Host Out FIFO However using WaitForCompletion doesn t involve the host and can be inserted into a DMA buffer Tabl...

Page 73: ...rmat Value added to Y to move from one scanline to the next For X major lines this will be some fraction dy dx otherwise it is normally 1 0 depending on the required scanning direction Count 12 bit integer Number of pixels in a line Number of scanlines in a trapezoid Xlimits Xmax 2 s complement 12 bit value in the upper word Xmin 2 s complement 12 bit value in the lower word Defines the X extents ...

Page 74: ...d to load the FogMode and AreaStippleMode registers for every Render operation The bit fields of the Render command register are detailed as follows Bit No Name Description 0 AreaStippleEnable Enable area stippling 1 2 Reserved 3 FastFillEnable Enable fast fill using VRAM block mode 4 5 Reserved 6 7 PrimitiveType Set type of primitive 0 line 1 trapezoid 2 point 3 rectangle 8 9 10 Reserved 11 SyncO...

Page 75: ...ded onto the StartXDom StartXSub and StartY values when they are loaded into the DDA units The original registers are not affected 0 Zero is added 1 Half is added 2 Nearly half i e 0x7fff is added 6 ForceBackgroundColo r This bit when set causes the color to be taken from the Texel0 register instead of the normal color if the bitmask test fails 7 8 BitMaskByteSwapMod e Controls byte swapping of th...

Page 76: ...TVP4020 Programmers Reference Manual Graphics Programming 67 The register BitMaskPattern simply holds the 32 bit mask for bit mask stippling ...

Page 77: ... 4 2 Screen Scissor Tests This test ensures that a pixel lies within the screen boundaries For each fragment the XY origin stored in the WindowOrigin register is added to the fragment coordinates and this is tested against the screen boundaries stored in the ScreenSize register Since the X and Y coordinates are held as 2 s complement numbers the window origin can be moved off the edges of the scre...

Page 78: ...s the test otherwise it is rejected In addition the bit pattern can be inverted or mirrored Inverting the bit pattern has the effect of changing the sense of the accept reject test If the mirror bit is set the most significant bit of the pattern is towards the left of the window the default is the converse In some situations window relative stippling is required but coordinates are only available ...

Page 79: ...register the Y values in the most significant 16 bits of the register The WindowOrigin register has the X coordinate of the origin stored in the least significant 16 bits of the register and the Y coordinate in the most significant 16 bits of the register As each fragment is generated by the Rasterizer unit this origin is added to the coordinates of the fragment to generate its screen coordinates ...

Page 80: ...ion 10 X 500 100 Y 200 with a screen size of 1280x1024 and the window origin at 100 100 Set the screen size screenSize Width 1280 screenSize Height 1024 ScreenSize screenSize Set the window origin windowOrigin X 100 windowOrigin Y 100 Set up the user scissor values minXY X 10 minXY Y 100 maxXY X 500 maxXY Y 200 ScissorMinXY minXY Load the registers ScissorMaxXY maxXY Enable the unit scissorMode Us...

Page 81: ...xAA AreaStipplePattern5 0x55 AreaStipplePattern6 0xAA AreaStipplePattern7 0x55 Set up mode register areaStippleMode UnitEnable PERMEDIA_ENABLE areaStippleMode XOffset 0 areaStippleMode YOffset 0 areaStippleMode Invert 0 areaStippleMode MirrorY 0 areaStippleMode MirrorX 0 Load mode register AreaStippleMode areaStippleMode When issuing a Render command the AreaStippleEnable bit should be set in addi...

Page 82: ...lbuffer reads and writes to be enabled Copy operations Operations which copy all or part of the localbuffer This requires reads and writes enabled Upload download operations Operations which download depth or stencil information to the localbuffer or read back depth or stencil values from the localbuffer to the host The address calculation implements the following equations Bottom left origin Dest...

Page 83: ...ndering Operation Disabled Disabled Disabled Rendering with no Depth or Stencil enabled Disabled Disabled Enabled LBStencil LBDepth Download to localbuffer from host Disabled Enabled Disabled LBStencil LBDepth Upload from localbuffer to host Disabled Enabled Enabled LBDefault Rendering with depth and or stencil updates enabled Enabled Disabled Enabled LBDefault Localbuffer copy operations Table 5 ...

Page 84: ...P2 define the width of the localbuffer They are described in Appendix C ReadSourceEnable and ReadDestinationEnable control localbuffer reads of the destination address and source address respectively DataType controls the format of localbuffer data and WindowOrigin specifies if the window origin is Top Left or Bottom Left 0 8 16 24 31 Reserved WriteEnable Figure 5 13 LBWriteMode Register The local...

Page 85: ...lue used in copy operations LBWindowBase updates the base address of the localbuffer The relative positions of the depth and stencil fields within the localbuffer are fixed If a Stencil field is defined then it occupies bit 15 The depth field always commences at bit 0 5 5 5 Localbuffer Example The following is an example of a rendering operation with localbuffer read and write PERMEDIA is configur...

Page 86: ...ring operations 5 6 Stencil Depth Test Unit The stencil test conditionally rejects fragments based on the outcome of a comparison between the value in the stencil buffer and a reference value The stencil buffer is updated according to the current stencil update mode which depends on the result of the stencil test and the depth test Stencil testing can be used in many different ways e g hidden line...

Page 87: ...nd possible future devices If the stencil test is enabled then the stencil buffer will be updated depending on the outcome of both the stencil and the depth tests if the depth test is disabled the depth result is set to pass Refer to the tables below and the definition of the StencilMode register in section 5 6 4 to fully understand their relationship Stencil Test Pass Fail Depth Test Pass dppass ...

Page 88: ...rom the destination by the value in LBSourceOffset register Source stencil value read from the localbuffer This is used for instance in the OpenGL copy pixels function when the stencil planes in the destination are not to be updated The stencil data will come from the localbuffer data Table 5 12 Stencil Sources See The OpenGL Reference Manual and The OpenGL Programming Guide from Addison Wesley fo...

Page 89: ...ion are not updated The depth data will come from the localbuffer Table 5 14 Depth Sources For a depth buffered trapezoid PERMEDIA interpolates from the dominant edge of a trapezoid to the subordinate edges This means that two increment values are required one to move along the dominant edge and one to move across the span to the subordinate edge This is illustrated in the diagram below The render...

Page 90: ... localbuffer are required setting DisableLBUpdate in the Window register may improve performance 5 6 3 Registers Stencil test is controlled by the StencilMode register 0 8 16 24 31 Unit enable Reserved func dppass UpdateMethod Stencil source dpfail sfail src Unsignedcomparefunction Figure 5 17 StencilMode Register The StencilData register holds the other data associated with the test 0 8 16 24 31 ...

Page 91: ... externally sourced 16 bit depth value If the depth buffer holds 15bits then the user supplied depth value is right justified to the least significant end of the register The unused most significant bit should be set to zero The DDA and other registers are shown below note the increment values are split into two registers Register Description ZStartU Depth start value ZStartL dZdxU Depth derivativ...

Page 92: ...n 5 5 Set the stencil modes stencilMode UnitEnable PERMEDIA_ENABLE stencilMode DPPass PERMEDIA_STENCIL_METHOD_DECREMENT stencilMode DPFail PERMEDIA_STENCIL_METHOD_KEEP stencilMode SFail PERMEDIA_STENCIL_METHOD_KEEP stencilMode CompareFunction PERMEDIA_STENCIL_COMPARE_LESS stencilMode StencilSource PERMEDIA_SOURCE_TEST_LOGIC StencilMode stencilMode Set the reference stencil value and set the compar...

Page 93: ...de NewDepthSource PERMEDIA_NEW_DEPTH_SOURCE_DDA depthMode CompareMode PERMEDIA_DEPTH_COMPARE_MODE_LESS DepthMode depthMode Load the depth start values and deltas for the dominant edge and the body of the trapezoid ZStartU Load upper and lower start values ZStartL dZdxU Load upper and lower dZdx deltas dZdxL dZdyDomU Load upper and lower dominant edge deltas dZdyDomL Render primitive ...

Page 94: ...equired per texture component one to move along the dominant edge and one to move across the span to the subordinate edge This is illustrated for the S component in the diagram below dSdyDom dSdX Subordinate Edges Dominant Edge SStart Initial S value dSdyDom S gradient in the Y direction along the dominant edge dSdx S gradient in the X direction Figure 5 21 Texture Address Interpolation The calcul...

Page 95: ...and T values are in 30 bit 2 s complement format 0 8 16 24 31 Integer Fraction Reserved Figure 5 22 Fixed Point S and T Format The Q values are in 29 bit 2 s complement format 0 8 16 24 31 Reserved Fraction Integer Figure 5 23 Fixed Point Q Format The registers to set up Texture interpolation are Register Data Field Description Sstart 30 bit 2 s comp fix pt S start value dSdx 30 bit 2 s comp fix p...

Page 96: ...ping 1D texture mapping can be achieved by setting TStart dTdx and dTdyDom to zero Load the start values and deltas for the dominant edge and the body of the trapezoid SStart Load S start value TStart Load T start value QStart Load Q start value dSdx Load S delta for X dTdx Load T delta for X dQdx Load Q delta for X dSdyDom Load S dominant edge delta dTdyDom Load T dominant edge delta dQdyDom Load...

Page 97: ...e 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 ma...

Page 98: ... required texture is not resident in local memory and should be copied in Once the copy has been completed and the texture base address in memory is updated with its invalid bit clear the graphics processor re reads this value and restarts Refer to the TVP4020 Hardware Reference Manual for details on loading textures while the Graphics Processor has stalled 5 8 3 Texture Filtering A bilinear filte...

Page 99: ...separately which allows remapping functions such as gamma correction 5 8 5 Registers The TextureReadMode register controls the way that textures are read from memory The S and T wrap modes can be set to clamp repeat or mirror as described earlier With Filter Mode disabled nearest neighbor texture mapping will be performed With this bit set bilinear filtering is enabled The Packed Data bit is used ...

Page 100: ...tureDataFormat register specifies the color format of the texture The TextureFormat combined with the TextureFormat Extension contain one of the modes described in table 4 1 The color order specifies whether the texture is in RGB or BGR color format 0 8 16 24 31 Reserved No AlphaBuffer TextureFormat Color Order TextureFormat Extension AlphaMap SpanFormat Figure 5 27 TextureDataFormat Register 5 8 ...

Page 101: ... fills are not used the lower 3 bits of the X and Y values of each fragment are used to index the LUT the PixelsPerEntry field scales the X and Y values so that an 8 pixel by 8 pixel pattern is supported and the LUTOffset field is added to the index before it is used If the LUT is used for 2D operations the texture application unit should be enabled and set to copy mode so that the texture color g...

Page 102: ...k for the block fill is read from memory as a texture map The texture address unit must be set appropriately so that the S value increments or decrements by one for each block of 32 pixels while T stays at zero The texture address calculated is used to index a texture map and data returned is used as a mask to control which pixels are plotted during a block fill This feature might be used to draw ...

Page 103: ...ing alpha values smooth the transition of the edge of the sprite to the background The registers AlphaMapUpperBound and AlphaMapLowerBound are used to control the range over which the test is done The test is enabled by the TextureDataFormat register 5 8 9 Texture Download Example fbReadMode PatchMode PERMEDIA_TRUE fbReadMode SubPatchMode PERMEDIA_SUBPATCH FBReadMode fbReadMode fbWriteMode Enable ...

Page 104: ...h textureReadMode Height height textureReadMode FilterMode PERMEDIA_FALSE TextureReadMode textureReadMode textureMapFormat PP0 partialProduct0 textureMapFormat PP1 partialProduct1 textureMapFormat PP2 partialProduct2 textureMapFormat SubPatchMode PERMEDIA_TRUE textureMapFormat TexelSize PERMEDIA_8_BITS_PER_TEXEL TextureMapFormat textureMapFormat textureDataFormat TextureFormat PERMEDIA_COLOR_FORMA...

Page 105: ...Texel0 value may be rejected and the texture operation on the fragment suppressed This is achieved by setting the RejectTexel bit in the YUVMode register In this case the underlying color provided by PERMEDIA is used without being modified by the texture color This is useful for applying a logo to a shaded polygon where the underlying color is provided by the Color DDA unit The test modes availabl...

Page 106: ...ccur on the output of the unit clearing it causes the chroma test to occur on the input i e after or before color conversion respectively assuming the Enable bit is set The TestMode can be set to Accept i e pass test if upper bound color lower bound Reject i e fail test if upper bound color lower bound 0 8 16 24 31 Blue Alpha Green Red Figure 5 31 ChromaUpperBound and ChromaLowerBound Registers RG...

Page 107: ...tes must be enabled Image copy operations Here set up depends on whether logical ops software writemasks and or alpha blending are occurring with the copy If any of these are the framebuffer needs two reads one for the source and one for the destination Otherwise only one read is required Image upload This requires reading of the destination framebuffer pixels to be enabled and framebuffer writes ...

Page 108: ...rmally zero except when multi buffer writes are needed when it gives a way to access pixels in alternative buffers without changing the FBWindowBase register This is useful as the window system may be asynchronously changing the window s position on the screen It is held in the FBPixelOffset register FBSourceOffset is normally zero except during a copy operation where data is read from one address...

Page 109: ...eadSourc e ReadDestinati on Writes Read Data Type Rendering Operation Disabled Disabled Enabled Rendering with no logical operations software writemasks or alpha blending Disabled Disabled Enabled Image download Disabled Enabled Disabled FBColor Image upload Enabled Disabled Enabled FBDefault Image copy with hardware writemasks Disabled Enabled Enabled FBDefault Rendering using destination only lo...

Page 110: ...efficient drawing of scanline primitives it also helps line drawing This form is typically used in the localbuffer see 5 5 4 for patching the depth buffer The SubPatch mode re organizes data for efficient texture operations see section 5 8 5 SubPatchPack mode is used when 4 bit textures are loaded as 8 bits i e the subpatch packing takes into account the 2 texels per byte 5 10 4 Packed Copies Pack...

Page 111: ...e so no state needs to be saved and restored Following the receipt of each TextureData value the TextureDownloadOffset value is incremented If this register is read it returns the current count not the original value If fast download is used the texture map on the host must be in exactly the format it will be stored in memory including any color formatting byte swapping or address patching If a te...

Page 112: ... processing these as long as they do not involve writing to the framebuffer The data field of this register is the base address of the buffer to be displayed and is passed to the Internal Video Timing generator 5 10 9 Registers The FBReadMode register layout is as follows 0 8 16 24 31 PP2 Reserved PP1 PP0 Partial product selection ReadSourceenable ReadDestinationenable Datatype Windoworigin PatchE...

Page 113: ...ectangular region of the framebuffer without moving any data in the localbuffer The region extends from the origin 0 0 to 100 100 and will be shifted right by 200 pixels The destination rectangle is scan converted First set up the framebuffer read mode fbReadMode ReadSource PERMEDIA_ENABLE fbReadMode ReadDestination PERMEDIA_DISABLE fbReadMode DataType PERMEDIA_FBDEFAULT FBReadMode fbReadMode Upda...

Page 114: ...is used to associate a color with a fragment produced by the Rasterizer This unit should be enabled for rendering operations and disabled for pixel rectangle operations i e copies uploads and downloads 5 11 1 RGBA and Color Index CI Modes Two color modes are supported by PERMEDIA true color RGBA and color index CI PERMEDIA s internal color representation is RGBA with 8 bits per component 0 8 16 24...

Page 115: ...ross the span to the subordinate edge This is illustrated in the diagram below where C represents a color component red green blue or color index Alpha is not interpolated and stays at its initial value dCdyDom dCdX Subordinate Edges Dominant Edge CStart the initial color value dCdyDom color gradient in the Y direction along the dominant edge dCdx color gradient in the X direction Figure 5 38 Colo...

Page 116: ...olor DDA unit is the ColorDDAMode register 0 8 16 24 31 Reserved Shading Mode Unit Enable Figure 5 40 ColorDDAMode Register The registers to set up Gouraud shading in the Color DDA unit are Register Data Field Description RStart 17 bit 2 s comp fix pt Red start value dRdx 17 bit 2 s comp fix pt Red derivative per unit X dRdyDom 17 bit 2 s comp fix pt Red derivative per unit Y dominant edge GStart ...

Page 117: ...lculate delta values Enable unit in Gouraud shading mode colorDDAMode UnitEnable PERMEDIA_ENABLE colorDDAMode Shade PERMEDIA_GOURAUD_SHADE_MODE ColorDDAMode colorDDAMode Load the color start values and deltas for dominant edge and the body of the trapezoid RStart Set up the red component start value dRdx Set up the red component increments dRdyDom GStart Set up the green component start value dGdx...

Page 118: ...blend 5 12 1 Texture Application There are two major types of texture application one suitable for RGB applications and one suitable for Ramp applications Ramp applications use RGB textures and framebuffer format but are limited to a white light source The enable bit in the TextureColorMode register and the TextureEnable bit in the Render register must both be enabled before texture will be applie...

Page 119: ...terpolated parameter which represents the diffuse light intensity At is the texture alpha CD is the color after the decal operation and AD is the alpha value after the decal operation The next operation is highlight Cf CM Ks Af AM Ks where Cf is the fragment color Ks is an interpolated parameter which represents the specular or highlight intensity At is the texture alpha CM is the color after the ...

Page 120: ... eye to be completely fogged need not be plotted The enable bit in the FogMode register and the FogEnable bit in the Render register must both be enabled before fog will be applied 5 12 3 Fog Index Calculation The Fog DDA The fog DDA is used to interpolate the fog index F across a primitive For a fogged trapezoid PERMEDIA interpolates from the dominant edge of a trapezoid to the subordinate edges ...

Page 121: ...erpolant Fixed Point Format The fog DDA calculates a fog index value which is clamped to lie in the range 0 0 to 1 0 before it is used in the fogging equations described below 5 12 4 Fogging Equation The fogging equation is C fCi 1 f Cf where C outgoing fragment color Cf fog color Ci incoming fragment color f fog index The equation is applied to the color components red green and blue alpha is not...

Page 122: ... so must be converted to the internal format before the blend can be done This is achieved by setting the ColorFormat and ColorFormat Extension fields in the AlphaBlendMode register In some situations blending is desired when no retained alpha buffer is present In this case the alpha value which is considered to be read from the framebuffer will be set to 1 0 The NoAlphaBuffer bit in the AlphaBlen...

Page 123: ...a Blend unit set the operation to Format assuming no alpha blending is needed and set the color mode to RGBA 5 5 5 1 This can all be achieved by setting the appropriate fields in the AlphaBlendMode register Set the Color Format unit to format the color of incoming fragments to an 8 bit RGB 3 3 2 framebuffer format The upload now proceeds as normal This technique can be used to upload data in any s...

Page 124: ...texture Fig 5 44 and 5 45 show texture values in RGB and YUV formats respectively This register is also used to hold the background color for the bitmask and stipple tests If the tests fail then this color can be used in place of that from the Color DDA unit 0 8 16 24 31 Alpha Red Green Blue Figure 5 45 Texel0 Register RGB and YUV formats The six registers KsStart dKsdx dKsdyDom KdStart dKddx and ...

Page 125: ... BlendType Res erved ColorFormatExtension ColorConvers ion AlphaConversion Figure 5 47 AlphaBlendMode Register The color format and order is needed as the destination color is read from the framebuffer and needs to be converted into the internal PERMEDIA representation it should therefore be set as appropriate for the framebuffer The operation can be either format or blend or PreMult 5 12 8 Textur...

Page 126: ...he color start values and deltas for dominant edge and the body of the trapezoid RStart Set up the red component start value dRdx Set up the red component increments dRdyDom GStart Set up the green component start value dGdx Set up the green component increments dGdyDom BStart Set up the blue component start value dBdx Set up the blue component increments dBYDom Load the start value and delta for ...

Page 127: ...not available for trapezoids If the Color Format unit is disabled the color components RGBA are not modified and will be truncated when placed in the framebuffer In CI mode the value is truncated to the nearest integer In both cases the result is clamped to a maximum value to prevent overflow PERMEDIA supports 8888 RGBA format for 2d operations only If this mode is selected and dithering is enable...

Page 128: ...sion fields control color depth and options are given in table 4 1 5 13 5 Dither Example To set the framebuffer format to RGB 3 3 2 and enable dithering 332 Dithering ditherMode UnitEnable PERMEDIA_TRUE ditherMode DitherEnable PERMEDIA_TRUE ditherMode ColorMode PERMEDIA_COLOR_FORMAT_RGB_332 DitherMode ditherMode Load register 5 13 6 Color Format Example To set the framebuffer format to RGB 3 3 2 a...

Page 129: ...eference Manual 120 8888 Dithered No effect as 8 bit components are not dithered ditherMode UnitEnable PERMEDIA_TRUE ditherMode DitherEnable PERMEDIA_FALSE ditherMode ColorMode PERMEDIA_COLOR_FORMAT_RGBA_8888 DitherMode ditherMode Load register ...

Page 130: ...And S D 2 And Reverse S D 3 Copy S 4 And Inverted S D 5 No op D 6 Xor S D 7 Or S D 8 Nor S D 9 Equivalent S D 10 Invert D 11 Or Reverse S D 12 Copy Invert S 13 Or Invert S D 14 Nand S D 15 Set 1 Where S Source fragment Color D Destination framebuffer Color Table 5 20 Logical Operations For correct operation of this unit in a mode which takes the destination color PERMEDIA must be configured to all...

Page 131: ...temasking is explicitly required 5 14 3 Flat Shaded Rendering A special PERMEDIA rendering mode is available which allows rendering of unshaded images Note This method is no longer recommended on TVP4020 Other methods of flat shading are as least as fast and are simpler to set up correctly It has been included here for the benefit of understanding legacy TVP4010 software Flat shaded primitive No d...

Page 132: ...ogicalOpMode Register 5 14 5 XOR Example To set the logical operation to XOR Set framebuffer to allow reads Not shown logicalOpMode UnitEnable PERMEDIA_ENABLE logicalOpMode LogicalOp PERMEDIA_LOGICOP_XOR LogicalOpMode logicalOpMode Load register 5 14 6 Software Writemask Example To set the logical operation to COPY enable the software writemask and write to the green component in an 8 bit framebuf...

Page 133: ...e at the output FIFO There are the following categories Depth Stencil Color These are data values associated with a fragment which has been read from the localbuffer or framebuffer or generated using the UpLoadData flag in the Framebuffer Write Unit This category is normally associated with uploading data to the host Synchronization A single register Sync which is used to synchronize PERMEDIA and ...

Page 134: ...ebuffer can subsequently be cleared Statistic collection is controlled using the StatisticMode register Picking In picking mode the active and or passive fragments have their associated XY coordinates compared against the coordinates specified in the MinRegion and MaxRegion registers If the result is true then the PickResult flag is set otherwise it holds its previous state The compare function ca...

Page 135: ...on and MaxRegion registers This comparison is identical to the one used in the scissor tests Once all the necessary primitives have been rendered the results can be found using the MinHitRegion and MaxHitRegion commands which cause the contents of the MinRegion and MaxRegion registers respectively to be written into the output FIFO under control of the FilterMode register 5 15 3 Synchronization Th...

Page 136: ...e reason for the Sync 5 15 4 Registers Filtering is controlled by the FilterMode register 0 8 16 24 31 Reserved Individual bits defined above Figure 5 50 FilterMode Register Statistic collection is controlled by the StatisticMode register 0 8 16 24 31 Reserved EnableStatistics StatisticsType Monitor CulledFragments CompareFunction IncludeSpans Monitor PixelsWritten Figure 5 51 StatisticMode Regist...

Page 137: ... and X in the least significant part of the word Setting the most significant bit of the Sync register will request a Sync interrupt Bits 0 30 are available for the user 5 15 5 Filter Mode Example Set up Filter mode to only permit read back of synchronization tag and data FilterMode 0x0C00 Set bits 10 11 5 15 6 Picking Example Set the statistic mode to picking and detect any active fragments in th...

Page 138: ...and data FilterMode 0x3C00 Set bits 10 to 13 Write to the PickResult register PickResult 0x0 Data not used Now read the PickResult from the output FIFO not shown 5 15 7 Sync Interrupt Example Generate a synchronization interrupt and encode some user defined data 0x34 in the lower 31 bits of the Sync register Set up Filter mode to only permit read back of synchronization tag and data FilterMode 0x0...

Page 139: ...set but is likely to be updated relatively frequently To make use of the full functionality of PERMEDIA consult the relevant sections of the Graphics Programming chapter chapter 5 Examples are given which make use of the pseudocode conventions given in Appendix B Note In general the graphics registers those listed in Appendix A as opposed to those documented in the TVP4020 Hardware Reference Manua...

Page 140: ... two stages are required Firstly the core VTG must be set up and then VGAControlReg must be loaded the EnableVGADisplay bit set to 0 Details of programming the registers for both VTGs can be found in the TVP4020 Hardware Reference Manual 6 2 4 Screen Width The width of the screen is initialized by setting the three partial products fields in the FBReadMode LBReadMode and TextureMapFormat registers...

Page 141: ...guration might be to allocate 2 screen sized buffers one for the visible screen the other for the 3D back buffer Then allocate a localbuffer this is always 16 bits per pixel and allow the remainder to be used for texture memory The localbuffer and texture memory can be considered to have different shapes to the front and back buffers For example suppose that a screen resolution of 800x600 at 8 bit...

Page 142: ...BWriteFormat and LBReadFormat registers should be set to appropriate values For example lbReadFormat DepthWidth 3 15 bit depth buffer lbReadFormat StencilWidth 3 1 bit stencil LBReadFormat lbReadFormat lbWriteFormat DepthWidth 3 15 bit depth buffer lbWriteFormat StencilWidth 3 1 bit stencil LBWriteMode lbWriteFormat Note it is possible to dynamically change the number of bits allocated to the dept...

Page 143: ...the Graphics Programming chapter chapter 5 for more details on their use window LBUpdateSource PERMEDIA_TRUE window ForceLBUpdate PERMEDIA_FALSE window DisableLBUpdate PERMEDIA_TRUE Window window 6 3 Window Initialization PERMEDIA supports the concept of a window origin and makes it relatively simple to implement systems which allow different color formats to coexist in different windows 6 3 1 Col...

Page 144: ..._WINDOW_ORIGIN FBReadMode fbReadMode lbReadMode WindowOrigin PERMEDIA_BOTTOM_LEFT_WINDOW_ORIGIN LBReadMode lbReadMode textureMapFormat WindowOrigin PERMEDIA_BOTTOM_LEFT_WINDOW_ORIGIN TextureMapFormat textureMapFormat The window origin is set in the Scissor unit This information usually is provided by the window system It will need updating if the window moves As an example if the position of the w...

Page 145: ...easons Performance will be improved if unnecessary reads from and writes to buffers are disabled For example if the current rendering does not use depth or stencil testing then reading and writing to the localbuffer may be disabled The following example initializes the buffers to allow depth buffering and alpha blending fbWriteMode UnitEnable PERMEDIA_ENABLE FBWriteMode fbWriteMode lbWriteMode Uni...

Page 146: ...e UnitEnable PERMEDIA_DISABLE DepthMode depthMode stencilMode UnitEnable PERMEDIA_DISABLE StencilMode stencilMode textureAddressMode UnitEnable PERMEDIA_DISABLE TextureAddressMode textureAddressMode textureReadMode UnitEnable PERMEDIA_DISABLE TextureReadMode textureReadMode texelLUTMode UnitEnable PERMEDIA_DISABLE TexelLUTMode texelLUTMode yuvMode UnitEnable PERMEDIA_DISABLE YUVMode yuvMode colorD...

Page 147: ... In some situations it is useful for an application to have direct access to this memory without going through the graphics processor Initialization of PCI registers in particular the Bypass Writemask register covers initialization of the bypass mechanism The writemask register BypassWriteMask is undefined at boot time and should be set to 1 Refer to the TVP4020 Hardware Reference Manual for furth...

Page 148: ...ling the amount of data to be loaded However to improve bus bandwidth utilization the registers have been grouped into blocks which frequently all need to be updated together and an indexed addressing mode is supported which allows a single address to be loaded followed by the data for a whole set of registers An additional mode is supported which allows a large number of data values to be loaded ...

Page 149: ...a from host memory into the PERMEDIA FIFO The use of PCI bus mastership has a number of benefits PCI bus bandwidth utilization is generally much improved PCI bus bandwidth is further improved because the driver software no longer needs to poll the FIFO flags to find how many entries are empty before loading it Overall system performance may benefit through increased parallelism between PERMEDIA an...

Page 150: ...g the memory accesses will be very high It is also important to set the LBDisableUpdate bit in the Window register if localbuffer writes are not needed For optimal performance hardware writemasks should be used in preference to software masks 7 2 2 Avoid Unnecessary Register Updates PERMEDIA control registers maintain their state between primitives so they do not need to be updated unless the data...

Page 151: ... Render command which would have been corrupted by any intervening context A second requirement of the continue commands is that data written to the framebuffer or localbuffer before the continue should not be read after it This is not a common occurrence but a possible situation is where two lines are drawn the second joining the end of the first and being started by ContinueNewLine If these line...

Page 152: ... range with the depth test set to greater than This loses half of the depth range but avoids the need to clear the depth buffer if every pixel is touched at least once 7 3 3 Trapezoid Fills Block writes are most useful when clearing the framebuffer but can be used to fill any trapezoid Block fills however are limited to the area defined by the Rasterizer and cannot be changed by the stipple test A...

Page 153: ... tip can also be used to pack data during a download to the framebuffer or localbuffer If the Rasterizer is set to sync on FBData the data sent to PERMEDIA must be in the raw memory format Four 8 bit pixels can be written at one time to the chip and the PackedDataLimits register set to mask any unwanted pixels at the left and right edges the RelativeOffset field is used to shift the alignment of t...

Page 154: ...y without changing format The TextureDownloadOffset will automatically increment following each write If the texture is 8 bits per texel then 4 texels must be supplied at a time This method of texture download avoids the need to set up the Rasterizer for image download and allows the state of the chip to be left unchanged Even the framebuffer writes do not have to be enabled 7 5 Multi Buffering 7 ...

Page 155: ...yed is set by bit 31 Bit 31 corresponds to the alpha bit of the 16 bit pixel and this can be forced to either 1 or 0 by the Color Format unit When drawing to the underlay or main image set the Color Format unit to force the alpha to zero set the writemask to allow writes to the lower half of the word When drawing to the overlay set the Color Format unit to force the alpha value to 1 and writemask ...

Page 156: ...gments to be rejected by chroma testing as part of a copy operation The texels are read in and tested and fragments rejected if the colors do not match Setting the TexelDisableUpdate bit discards the data as soon as the test has been done which improves performance This is described in more detail in section 5 9 1 7 9 Configuration for 2D Particular fields of several registers can be set by writin...

Page 157: ...e is clipped by two clip rectangles 10 300 60 100 110 300 310 300 0 0 400 350 Overlapping window 160 100 210 300 110 150 Figure 8 1 Geometry of the Mesh and Clip regions The three examples cover drawing the mesh as a set of points at the vertices as connected line segments and finally as filled triangles For simplicity the triangles in these examples are either flat topped or flat bottomed In prac...

Page 158: ...d int SpecularTextureEnable 1 unsigned int DepthEnable 1 unsigned int SmoothShadingEnable 1 unsigned int TextureEnable 1 unsigned int FogEnable 1 unsigned int Reserved 4 unsigned int TargetChip 2 __DeltaModeFmat The DrawTriangle and DrawLine command fields typedef struct unsigned int pad 14 unsigned int ReuseBitMask 1 unsigned int SubPixelCorrectionEnable 1 unsigned int Reserved 1 unsigned int Fog...

Page 159: ...ed int AreaStippleEnable 1 unsigned int ReservedC 2 unsigned int FastFillEnable 1 unsigned int reserved 2 unsigned int PrimitiveType 2 unsigned int ReservedB 1 unsigned int SyncOnBitMask 1 unsigned int SyncOnHostData 1 unsigned int TextureEnable 1 unsigned int FogEnable 1 unsigned int ReservedA 1 unsigned int SubPixelCorrectionEnable 1 unsigned int pad 14 unsigned int ReuseBitMask 1 __DeltaRenderF...

Page 160: ...rogramming Examples 151 define DrawTriangleTag __DeltaTagDrawTriangle define DrawLine01Tag __DeltaTagDrawLine01 define DrawLine10Tag __DeltaTagDrawLine10 define RepeatTriangleTag __DeltaTagRepeatTriangle define RepeatLineTag __DeltaTagRepeatLine ...

Page 161: ...sh gal cx Simple structure to use in the example code typedef struct float x y z r g b a Vertex typedef struct short x y XY typedef struct XY scissorMin scissorMax ClipRectangle Define some test data define verticesInMesh 7 Vertex mesh verticesInMesh x y z r g b a 10 300 0 1 1 0 1 0 1 0 1 0 60 100 0 2 1 0 1 0 0 0 1 0 110 300 0 3 1 0 0 0 1 0 1 0 160 100 0 4 1 0 0 0 0 0 1 0 210 300 0 5 0 0 1 0 1 0 1...

Page 162: ...mesh as points There is no direct support for points in Delta Unit as they do not need any set up calculations Delta Unit can be used to plot points maybe because you want to always work in floating point by having Delta Unit do the set up calculations for a line but tell the rendering device to render points ...

Page 163: ...able 0 No sub pixel correction deltaMode DiffuseTextureEnable 0 Disable deltaMode SpecularTextureEnable 0 Disable deltaMode DepthEnable 1 Enable deltaMode SmoothShadingEnable 1 Enable deltaMode TextureEnable 0 Disabled deltaMode FogEnable 1 Enabled but controlled from the draw command deltaMode Reserved 0 LD_REG __DeltaTagDeltaMode long deltaMode Set up the draw command data drawCmd pad 0 drawCmd ...

Page 164: ..._Delta_V0FloatTag paramB mesh v b LD_PARAM __Delta_V0FloatTag paramA mesh v a LD_PARAM __Delta_V0FloatTag paramX mesh v x LD_PARAM __Delta_V0FloatTag paramY mesh v y LD_PARAM __Delta_V0FloatTag paramZ mesh v z for rect 0 rect numberClipRectangles rect Load in the scissor rectangle LD_REG ScissorMinXYTag clipRectangles rect scissorMin y 16 clipRectangles rect scissorMin x LD_REG ScissorMaxXYTag cli...

Page 165: ... bias of zero Set up the DeltaMode register deltaMode pad 0 deltamode ColorOrder 0 deltamode BackfaceCallEnable 0 deltaMode TextureParameterMode 2 Auto normalize deltaMode ClampEnable 1 Clamp enabled deltaMode NoDraw 0 Do drawing deltaMode DiamondExit 1 Not needed for this example deltaMode SubPixelCorrectionEnable 1 Enable sub pixel correction deltaMode DiffuseTextureEnable 0 Disable deltaMode Sp...

Page 166: ...rectionEnable 1 Enable drawCmd ReservedA 0 drawCmd FogEnable 0 Disable drawCmd TextureEnable 0 Disable drawCmd SyncOnHostData 0 Disable drawCmd SyncOnBitMask 0 Disable drawCmd ReservedB 0 drawCmd AntialiasingQuality 0 Not used drawCmd AntialiasEnable 0 Disable drawCmd PrimitiveType 0 Line drawCmd reserved 0 drawCmd FastFillEnable 0 Disable drawCmd ReservedC 0 drawCmd AreaStippleEnable 0 Disable ...

Page 167: ... x LD_PARAM vertexStore paramY mesh v y LD_PARAM vertexStore paramZ mesh v z if i 1 We now have enough vertices to draw a line for rect 0 rect numberClipRectangles rect Load in the scissor rectangle LD_REG ScissorMinXYTag clipRectangles rect scissorMin y 16 clipRectangles rect scissorMin x LD_REG ScissorMaxXYTag clipRectangles rect scissorMax y 16 clipRectangles rect scissorMax x if rect 0 if i 1 ...

Page 168: ...tureParameterMode 2 Auto normalize deltaMode ClampEnable 1 Clamp enabled deltaMode NoDraw 0 Do drawing deltaMode DiamondExit 1 Not needed for this example deltaMode SubPixelCorrectionEnable 1 Enable sub pixel correction deltaMode DiffuseTextureEnable 0 Disable deltaMode SpecularTextureEnable 0 Disable deltaMode DepthEnable 1 Enable deltaMode SmoothShadingEnable 1 Enable deltaMode TextureEnable 0 D...

Page 169: ...ogEnable 0 Disable drawCmd TextureEnable 0 Disable drawCmd SyncOnHostData 0 Disable drawCmd ReservedB 0 drawCmd AntialiasEnable 0 Disable drawCmd PrimitiveType 1 Trapezoid drawCmd reserved 0 drawCmd FastFillEnable 0 Disable drawCmd ReservedC 0 drawCmd AreaStippleEnable 0 Disable ...

Page 170: ...re paramX mesh v x LD_PARAM vertexStore paramY mesh v y LD_PARAM vertexStore paramZ mesh v z if v 2 We now have enough vertices to draw a triangle for rect 0 rect numberClipRectangles rect Load in the scissor rectangle LD_REG ScissorMinXYTag clipRectangles rect scissorMin y 16 clipRectangles rect scissorMin x LD_REG ScissorMaxXYTag clipRectangles rect scissorMax y 16 clipRectangles rect scissorMax...

Page 171: ...s of the PERMEDIA family To ensure upwards compatibility any software should not assume a value for these bits when read and should always write them as zeros Not used indicates bits that are adjacent to numeric fields These may be used in future members of the PERMEDIA family but only to extend the dynamic range of these fields The data returned from a read of these bits is undefined When a Not u...

Page 172: ...ng Bit0 Enable 0 Disable 1 Enable alpha blending or color formatting Bit1 7 Operation Bit17 Color Conversion 0 Scale 1 Shift Bit18 Alpha Conversion 0 Scale 1 Shift Mode Operation R G B A 16 Format Rd Gd Bd Ad 84 Blend Rs As Rd 1 As Gs As Gd 1 As Bs As Bd 1 As As As Ad 1 As 81 PreMult Rs Rd 1 As Gs Gd 1 As Bs Bd 1 As As Ad 1 As For correct operation of Apple PreMult blending the BlendType needs to ...

Page 173: ...ont 3 5 3 2 2 0 0 6 RGB 3 3 2 Back 3 13 3 10 2 8 0 9 RGB 2 3 2 1 Front 2 5 3 2 2 0 1 7 10 RGB 2 3 2 1 Back 2 13 3 10 2 8 1 15 11 RGB 2 3 2 FrontOff 2 5 3 2 2 0 0 12 RGB 2 3 2 BackOff 2 13 3 10 2 8 0 13 RGB 5 5 5 1 Back 5 26 5 21 5 16 1 31 14 RGB CI8 8 0 0 0 0 16 RGB 5 6 5 Front 5 11 6 5 5 0 0 17 RGB 5 6 5 Back 5 27 6 21 5 16 0 Notes The format column is also dependent on bit16 n m means n bits sta...

Page 174: ...e Undefined Read write 0 8 16 24 31 Blue Alpha Green Red Specifies the lower and upper bounds for the alpha map test Name Alpha Map Color Test Lower and Upper Bounds Unit Texture Read Region 0 Offset 0x000 8F18 Tag 0x01E3 Reset Value Undefined Read write 0 8 16 24 31 Blue Alpha Green Red Specifies the lower and upper bounds for the alpha map test AlphaMapLowerBound AlphaMapUpperBound ...

Page 175: ...egister must be set to enable the area stipple test Bit0 Unit Enable 0 Disable 1 Enable Bit7 9 XOffset Bit12 14 YOffset Bit17 Invert Stipple Pattern 0 No Invert 1 Invert Bit18 Mirror X 0 No Mirror in X 1 Mirror stipple pattern in X direction Bit19 Mirror Y 0 No Mirror in Y 1 Mirror stipple pattern in Y direction Bit20 ForceBackgroundColor Controls operation of the stipple test If disabled any frag...

Page 176: ... Reset Value Undefined Read write 0 8 16 24 31 Reserved 8 bit mask These 8 registers provide the bitmask which enables and disables corresponding fragments for drawing when rasterizing a primitive with area stippling Both the AreaStippleEnable in the Render command and enable in the AreaStippleMode register must be set to enable the area stipple test AreaStipplePattern 0 7 ...

Page 177: ... a vertex when in Gouraud shading mode The value is 2 s complement 9 11 fixed point format Name Bit Mask Pattern Unit Rasterizer Region 0 Offset 0x0000 8068 Tag 0x000D Reset Value Undefined Write only 0 8 16 24 31 32 bit mask Value used to control the bit mask stipple operation if enabled Fragments are accepted or rejected based on the current BitMask test modes defined by the RasterizerMode regis...

Page 178: ...it YUV Region 0 Offset 0x00008F10 0x0000 8F08 Tag 0x01E2 0x01E1 Reset Value Undefined Read write 0 8 16 24 31 Blue Alpha Green Red 0 8 16 24 31 V Alpha U Y Specifies the lower and upper bounds for the chroma test The test is done against the contents of the Texel0 register which holds data in the internal RGB format or the YUV format before conversion of 8 bits per component The test is done on al...

Page 179: ...er the standard color format or the raw framebuffer format if the Color Format unit is disabled In CI mode the color index is placed in bits 0 7 If there are less than 8 bits in a component it should be left justified and the unused bits set to zero This register cannot be saved and restored as part of a task context switch When used this register should always be reloaded at start of every comman...

Page 180: ...nit Color DDA Region 0 Offset 0x0000 87E0 Tag 0x00FC Reset Value Undefined Read write 0 8 16 24 31 Reserved Shading Mode Unit Enable The bit fields control the mode of operation of the Color DDA unit Bit0 Unit Enable 0 Disable 1 Enable Bit1 Shading mode control 0 Flat 1 Gouraud ColorDDAMode ...

Page 181: ...Region 0 Offset 0x0000 8D90 Tag 0x01B2 Reset Value Undefined Read write 0 8 16 24 31 FBReadMode ReadSource FBReadMode ReadDestination FBWriteMode Enable CoorDDAMode Enable LogicOpMode Enable LogicOpMode LogicOp FBReadMode PackedData Reserved Sets the specified fields in various registers Config ...

Page 182: ...5 3 fixed point for 3D operations or 8 bit integer for 2D operations In CI mode the color index is placed in bits 0 7 If a component has less than 8 bits it should be left justified and the unused bits set to zero Name Continue Unit Rasterizer Region 0 Offset 0x0000 8058 Tag 0x000B Reset Value Undefined Write 0 8 16 24 31 Reserved 12 bit unsigned integer This command causes rasterization to contin...

Page 183: ...holds the number of scanlines to fill Note this count does not get loaded into the Count register Name Continue New Line Segment Unit Rasterizer Region 0 Offset 0x0000 8040 Tag 0x0008 Reset Value Undefined Write 0 8 16 24 31 Reserved 12 bit unsigned integer This command causes rasterization to continue for the next segment in a polyline The XY position is carried on from the previous line however ...

Page 184: ...e is carried on from the previous trapezoid This is very useful when scan converting triangles with a knee i e two subordinate edges The data field holds the number of scanlines to fill Note this count does not get loaded into the Count register Name Count Unit Rasterizer Region 0 Offset 0x0000 8030 Tag 0x0006 Reset Value Undefined Read write 0 8 16 24 31 Reserved 12 bit unsigned integer Interpret...

Page 185: ... value for the interior of a trapezoid when Gouraud shading The value is 2 s complement 9 11 fixed point format Name Y Derivative Dominant Blue Unit Color DDA Region 0 Offset 0x0000 87C0 Tag 0x00F8 Reset Value Undefined Read write 0 8 16 24 31 Integer Not used Fraction Not used Sign This register is used to set the Y derivative dominant for the Blue value along a line or the dominant edge of a tra...

Page 186: ... SpecularEnable DiffuseEnable Subpixel CorrectionEnable DiamondExit Enable No DrawEnable ClampEnable TextureParameterMode Reserved BackfaceCull Enable ColorOrder Reserved Bit4 FogEnable This field is qualified by the FogEnable bit in the Draw command 0 Disable 1 Enable Bit5 TextureEnable This field is qualified by the TextureEnable bit in the Draw command 0 Disable 1 Enable Bit 6 SmoothShadingEnab...

Page 187: ...y affects the Draw commands This field allows the host to alter the set up parameters before sending a Render command 0 Disable 1 Enable Bit 13 ClampEnable When set causes the input values to be clamped to a parameter specific range Note that the texture parameters are not affected by this field 0 Disable 1 Enable Bit 14 15 TextureParameterMode 0 Used as given 1 Clamped to lie in the range 1 0 to ...

Page 188: ...6 24 31 Depth value Not used Holds an externally sourced 16 or 15 bit depth value The unused most significant bits should be set to zero This is used in the draw pixels function where the host supplies the depth values through the Depth register Alternatively this is used when a constant depth value is needed for example when clearing the depth buffer or for 2D rendering where the depth is held co...

Page 189: ...n is LESS and the result is true then the fragment value is less than the source value Bit0 Unit Enable 0 Disable 1 Enable Bit1 Writemask 0 Disable write to depth buffer 1 Enable write to depth buffer Bit2 3 Source of depth value for comparison 0 Fragment s depth value 1 LBData for copy pixels when destination depth planes are not updated 2 Depth register 3 LBSourceData for copy pixels when destin...

Page 190: ...icient derivative per unit X for use in rendering trapezoids The value is in 2 s complement 2 19 fixed point format Name Y Derivative Dominant Fog Unit Texture Fog Blend Region 0 Offset 0x0000 86B0 Tag 0x00D6 Reset Value Undefined Read write 0 8 16 24 31 4 12 20 28 Fractions Not Used Sign Integer Not Used Fog coefficient derivative per unit Y along a line or the dominant edge of a trapezoid The va...

Page 191: ... value for the interior of a trapezoid when Gouraud shading The value is 2 s complement 9 11 fixed point format Name Y Derivative Dominant Green Unit Color DDA Region 0 Offset 0x0000 87A8 Tag 0x00F5 Reset Value Undefined Read write 0 8 16 24 31 Integer Not used Fraction Not used Sign This register is used to set the Y derivative dominant for the Green value along a line or the dominant edge of a t...

Page 192: ...eset Value Undefined Read write 0 8 16 24 31 Color format Reserved Dither enable Unit enable X offset Y offset ForceAlpha Color format extension DitherMethod Reserved Color order Controls the Color Format unit Bit0 Unit Enable 0 Disable 1 Enable Bit1 Dither Enable 0 Disable 1 Enable see overleaf for description of the remaining bits DitherMode ...

Page 193: ...9 RGB 2 3 2 1 Front 2 5 3 2 2 0 1 7 10 RGB 2 3 2 1 Back 2 13 3 10 2 8 1 15 11 RGB 2 3 2 FrontOff 2 5 3 2 2 0 0 12 RGB 2 3 2 BackOff 2 13 3 10 2 8 0 13 RGB 5 5 5 1 Back 5 26 5 21 5 16 1 31 14 RGB CI8 8 0 0 0 0 16 RGB 5 6 5 Front 5 11 6 5 5 0 0 17 RGB 5 6 5 Back 5 27 6 21 5 16 0 Notes The format column is also dependent on bit16 n m means n bits starting at bit m Front and Back modes replicate the c...

Page 194: ...ing texture mapped trapezoids using ramp application mode The value is in 2 s complement 2 19 fixed point format Name Y Derivative Dominant Kd Unit Texture Fog Blend Region 0 Offset 0x0000 86F0 Tag 0x00DE Reset Value Undefined Read write 0 8 16 24 31 4 12 20 28 Fractions Not Used Sign Integer Not Used Diffuse light coefficient derivative per unit Y along a line or for the dominant edge of a trapez...

Page 195: ...ing texture mapped trapezoids using ramp application mode The value is in 2 s complement 2 19 fixed point format Name Y Derivative Dominant Ks Unit Texture Fog Blend Region 0 Offset 0x0000 86D8 Tag 0x00DB Reset Value Undefined Read write 0 8 16 24 31 4 12 20 28 Fractions Not Used Sign Integer Not Used Specular light coefficient derivative per unit Y along a line or for the dominant edge of a trape...

Page 196: ...r Sign Used to set the X derivative for the Q coordinate when texture mapping Format is 2 s complement 2 27 fixed point Name Y Derivative Dominant Homogeneous texture coordinate Unit Texture Address Region 0 Offset 0x0000 83C8 Tag 0x0079 Reset Value Undefined Read write 0 8 16 24 31 Reserved Fraction Integer Sign Used to set the Y dominant derivative for the Q coordinate when texture mapping Forma...

Page 197: ...EDIA primitive to be drawn The primitives supported and the corresponding codes are 0 lines 1 trapezoids 2 points 3 rectangles Bit13 TextureEnable Note that the Texture Units must be suitably enabled as well for any texturing to occur 0 Disable 1 Enable Bit14 FogEnable Note that the Fog Unit must be suitably enabled as well for any fogging to occur 0 Disable 1 Enable Bit16 SubPixelCorrectionEnable...

Page 198: ...EDIA primitive to be drawn The primitives supported and the corresponding codes are 0 lines 1 trapezoids 2 points 3 rectangles Bit13 TextureEnable Note that the Texture Units must be suitably enabled as well for any texturing to occur 0 Disable 1 Enable Bit14 FogEnable Note that the Fog Unit must be suitably enabled as well for any fogging to occur 0 Disable 1 Enable Bit16 SubPixelCorrectionEnable...

Page 199: ...MEDIA primitive to be drawn The primitives supported and the corresponding codes are 0 lines 1 trapezoids 2 points 3 rectangles Bit13 TextureEnable Note that the Texture Units must be suitably enabled as well for any texturing to occur 0 Disable 1 Enable Bit14 FogEnable Note that the Fog Unit must be suitably enabled as well for any fogging to occur 0 Disable 1 Enable Bit16 SubPixelCorrectionEnabl...

Page 200: ... value for the interior of a trapezoid when Gouraud shading The value is 2 s complement 9 11 fixed point format Name Y Derivative Dominant Red Unit Color DDA Region 0 Offset 0x0000 8790 Tag 0x00F2 Reset Value Undefined Read write 0 8 16 24 31 Integer Not used Fraction Not used Sign This register is used to set the Y derivative dominant for the Red value along a line or the dominant edge of a trape...

Page 201: ... Sign Used to set the X derivative for the S coordinate when texture mapping Format is 2 s complement 12 18 fixed point Name Y Derivative Dominant Texture S coordinate Unit Texture Address Region 0 Offset 0x0000 8398 Tag 0x0073 Reset Value Undefined Read write 0 8 16 24 31 Integer Fraction Reserved Sign Used to set the Y dominant derivative for the S coordinate when texture mapping Format is 2 s c...

Page 202: ... Sign Used to set the X derivative for the T coordinate when texture mapping Format is 2 s complement 12 18 fixed point Name Y Derivative Dominant Texture T coordinate Unit Texture Address Region 0 Offset 0x0000 83B0 Tag 0x0076 Reset Value Undefined Read write 0 8 16 24 31 Integer Fraction Reserved Sign Used to set the Y dominant derivative for the T coordinate when texture mapping Format is 2 s c...

Page 203: ... 2 s complement 12 15 fixed point format Also holds the change in X when plotting lines For Y major lines this will be some fraction dx dy otherwise it is normally 1 0 depending on the required scanning direction Name Delta X Subordinate Unit Rasterizer Region 0 Offset 0x0000 8018 Tag 0x0003 Reset Value Undefined Read write 0 8 16 24 31 Not used Sign 15 bit fraction 11 bit integer Not used Value a...

Page 204: ...pth Derivative X Lower Unit Stencil Depth Region 0 Offset 0x0000 89C8 Tag 0x0139 Reset Value Undefined Read write 0 8 16 24 31 11 bit fraction Not used This register holds part of the depth derivative per unit in X used in rendering trapezoids dZdxU holds the most significant bits and dZdxL the least significant bits The combined value is in 2 s complement 17 11 fixed point format dY For X major l...

Page 205: ...gnificant bits and dZdxL the least significant bits The value is in 2 s complement 17 11 fixed point format Name Depth Derivative Y Dominant Lower Unit Stencil Depth Region 0 Offset 0x0000 89D8 Tag 0x013B Reset Value Undefined Read write 0 8 16 24 31 11 bit fraction Not used This register holds part of the depth derivative per unit in Y used for the dominant edge of a trapezoid or along a line dZd...

Page 206: ...11 fixed point format Name Framebuffer Block Fill Color Unit FramebufferWrite Region 0 Offset 0x0000 8AC8 Tag 0x0159 Reset Value Undefined Read write 0 8 16 24 31 32 bit value Note that this register should not be updated immediately after a Render command which performs a block write Contains the color and optionally alpha value to be written to the framebuffer during block writes Note the format...

Page 207: ...of the register If the framebuffer is in 16 bit packed mode then the data must be repeated in both halves of the register Name Framebuffer Block Fill Upper color Unit FramebufferWrite Region 0 Offset 0x0000 8C68 Tag 0x018D Reset Value Undefined Read write 0 8 16 24 31 32 bit value Contains the color and optionally alpha value to be written to the framebuffer during block writes Note the format is ...

Page 208: ...ebuffer Data Unit Framebuffer R W Region 0 Offset 0x0000 8AA0 Tag 0x0154 Reset Value Undefined Write 0 8 16 24 31 32 bit value Supplies the data for image download where subsequent formatting is required The formatting can be achieved by means of the AlphaBlendMode register to convert to the internal PERMEDIA format and then via the DitherMode register to convert to the required format FBColor Int...

Page 209: ...configurations where the framebuffer supports a hardware writemask In cases where it is not supported this register should NOT be written to If hardware writemasks are used then all the bits in the FBSoftwareWriteMask register must be set to 1 so that software writemasking is disabled If the framebuffer is used in 8 bit packed mode then an 8bit hardware writemask must be repeated in all 4 bytes of...

Page 210: ...0 Offset 0x0000 8A90 Tag 0x0152 Reset Value Undefined Read write 0 8 16 24 31 24 bit 2 s complement integer Not used Offset between buffers when operating on multiple buffers in the framebuffer at the same time e g left right top bottom in some OpenGL implementations The offset can be treated as signed or unsigned FBPixelOffset ...

Page 211: ... read if reads are enabled but the same data had just been written with reads disabled To avoid this problem a WaitForCompletion command should be sent after enabling reads but prior to the next primitive Bit0 2 Partial Product 0 See Appendix C for a table of values Bit3 5 Partial Product 1 See Appendix C for a table of values Bit6 8 Partial Product 2 See Appendix C for a table of values Bit9 Read...

Page 212: ...e packed pixels when possible Bit20 22 RelativeOffset 3 bit 2 s compliment value which specifies the number of pixels that the source data has to be adjusted to align with the destination data The PackedDataLimits register also has this field and the last loaded of these two registers takes effect Bit25 26 Patch Mode 0 Patch suitable for depth buffer patching 1 Subpatch suitable for texture buffer...

Page 213: ...mebuffer Read Pixel Unit Framebuffer R W Region 0 Offset 0x0000 8AD0 Tag 0x015A Reset Value Undefined Read write 0 8 16 24 31 Reserved Pixel Size Sets the pixel size for reading from the framebuffer Bit0 1 Pixel Size 0 8 bits 1 16 bits 2 32 bits 3 reserved 4 24 bits FBReadPixel ...

Page 214: ... Offset 0x0000 8D80 Tag 0x01B0 Reset Value Undefined Read write 0 8 16 24 31 24 bit unsigned integer Reserved The base address of source data for framebuffer copies Tracks the value of FBWindowBase so to modify this register it must be loaded after FBWindowBase FBSoftwareWriteMask Contains the software writemask for the framebuffer If a bit is set to one then the corresponding bit in the framebuff...

Page 215: ... than the destination parameter The data supplied should be in raw framebuffer format Name Difference between destination to source data Unit Framebuffer Read Region 0 Offset 0x0000 8D88 Tag 0x01B1 Reset Value Undefined Read write 0 8 16 24 31 Not used 12 bit 2 s complement Y delta Not used 12 bit 2 s complement X delat The difference from destination to source data in the framebuffer Loading this...

Page 216: ...lement integer Not used Sets the offset from destination to source for a copy operation in the framebuffer i e source offset destination address source address Name Framebuffer Window Base Unit Framebuffer R W Region 0 Offset 0x0000 8AB0 Tag 0x0156 Reset Value Undefined Read write 0 8 16 24 31 24 bit unsigned integer Reserved Contains the current base address of the window in the framebuffer FBSou...

Page 217: ...onstantFBWriteData bit of the LogicalOpMode register is set to one Note that the following conditions must be met for this mode of rendering to be used Flat shaded aliased primitive No dithering required No logical operation involving a destination factor No stencil or depth test No texture fog or alpha blending No software writemasking The data is in the raw format of the framebuffer If the pixel...

Page 218: ...te Mode Unit Framebuffer R W Region 0 Offset 0x0000 8AB8 Tag 0x0157 Reset Value Undefined Read write 0 8 16 24 31 Reserved Writeenable Reserved UpLoadData Controls writing to the framebuffer Bit0 Write Enable 0 Disable 1 Enable Bit3 UpLoadData 0 No upload 2 Upload color to host FBWriteMode ...

Page 219: ...it6 Stencil Tag Filter Used in Stencil buffer image upload 0 Cull Stencil Tags from being passed to output FIFO 1 Pass Stencil Tags to output FIFO Bit7 Stencil Data Filter Used in Stencil buffer image upload 0 Cull Stencil data values from being passed to output FIFO 1 Pass Stencil data values to output FIFO Bit8 Color Tag Filter Used in Framebuffer image upload 0 Cull Color Tags from being passed...

Page 220: ...tics Data Filter Used in Picking and Extent read back 0 Cull Statistics data values from being passed to output FIFO 1 Pass Statistics data values to output FIFO Bit14 15 Reserved for future use set to zero Name Fog Color Unit Texture Fog Blend Region 0 Offset 0x0000 8698 Tag 0x00D3 Reset Value Undefined Read write 0 8 16 24 31 Alpha Red Green Blue Provides the color to be blended with the fragmen...

Page 221: ...Undefined Read write 0 8 16 24 31 Reserved Fog Enable Reserved FogTest Controls operation of the Fog unit Enabling FogTest causes fragments with negative fog values to be rejected Note that the FogEnable bit in the Render command must be set for fogging to be applied to a primitive Bit0 Enable Fog 0 Disable 1 Enable Bit2 Fog Test 0 Disable 1 Enable FogMode ...

Page 222: ...rpolation coefficient is used to blend the fragment s color with the color in the FogColor register The value is in 2 s complement 2 19 fixed point format Name Initial Green Color Unit Color DDA Region 0 Offset 0x0000 8798 Tag 0x00F3 Reset Value Undefined Read write 0 8 16 24 31 Integer Not used Fraction Not used Sign This register is used to set the initial value for the Green value for a vertex ...

Page 223: ...iffuse light parameter when texture mapping using ramp application mode The value is in 2 s complement 2 19 fixed point format Name Initial Ks Value Unit Texture Fog Blend Region 0 Offset 0x0000 86C8 Tag 0x00D9 Reset Value Undefined Read write 0 8 16 24 31 4 12 20 28 Fractions Not Used Sign Integer Not Used Start value for specular light parameter when texture mapping using ramp application mode T...

Page 224: ...memory Data should be supplied in the raw localbuffer format Name Localbuffer Depth Upload Unit Localbuffer R W Region 0 Offset 0x0000 88B0 Tag 0x0116 Reset Value Undefined Read write 0 8 16 24 31 0 16 bit Depth value Used to upload depth data from localbuffer memory This register should not be written to It is documented here to give the tag value and format of the data when read from the Host Ou...

Page 225: ...ed Read write 0 8 16 24 31 Reserved DepthWidth Stencil Width Specifies the format used when reading from localbuffer memory The effect of creating a format with overlapping fields is undefined There is no need to synchronize PERMEDIA before changing this register Bit0 1 Depth Width 0 16 1 reserved 2 reserved 3 15 Bit2 3 Stencil Width 0 0 1 reserved 2 reserved 3 1 LBReadFormat ...

Page 226: ...ad just been written with reads disabled To avoid this problem a WaitForCompletion command should be sent after enabling reads but prior to the next primitive Bit0 2 Partial Product 0 See Appendix C for a table of values Bit3 5 Partial Product 1 See Appendix C for a table of values Bit6 8 Partial Product 2 See Appendix C for a table of values Bit9 Read Source Enable 0 no read 1 do read Bit10 Read ...

Page 227: ...ource for a copy operation in the localbuffer i e source offset destination address source address Name Localbuffer Stencil Upload Unit Localbuffer R W Region 0 Offset 0x0000 88A8 Tag 0x0115 Reset Value Undefined Read Output 0 8 16 24 31 0 1 bit Stencil value Used to upload stencil data from localbuffer memory This register should not be written to It is documented here to give the tag value and f...

Page 228: ...ference 219 Name Localbuffer Window Base Unit Localbuffer R W Region 0 Offset 0x0000 88B8 Tag 0x0117 Reset Value Undefined Read write 0 8 16 24 31 24 bit unsigned integer Not used Contains the current base address of the window in the localbuffer LBWindowBase ...

Page 229: ...8C8 Tag 0x0119 Reset Value Undefined Read write 0 8 16 24 31 Reserved DepthWidth Stencil Width Specifies the format used when writing to localbuffer memory The effect of setting a configuration with overlapping fields is undefined Bit0 1 Depth Width 0 16 1 reserved 2 reserved 3 15 Bit2 3 Stencil Width 0 0 1 reserved 2 reserved 3 1 LBWriteFormat ...

Page 230: ...r Reference 221 Name Localbuffer Write Mode Unit Localbuffer R W Region 0 Offset 0x0000 88C0 Tag 0x0118 Reset Value Undefined Read write 0 8 16 24 31 Reserved WriteEnable Bit0 Write Enable 0 Disable 1 Enable LBWriteMode Controls writing to the localbuffer ...

Page 231: ...ebuffer rather than the fragment s color This can achieve higher bandwidth into the framebuffer for flat shaded primitives but may only be used when LogicalOps are disabled bit 0 cleared to 0 Bit0 Logic Op Enable 0 Disable 1 Enable Bit1 4 Logic Op Mode Name Operation Mode Name Operation 0 CLEAR 0 8 NOR S D 1 AND S D 9 EQUIV S D 2 AND REVERSE S D 10 INVERT D 3 COPY S 11 OR REVERSE S D 4 AND INVERTE...

Page 232: ...at of the data input is 0 8 16 24 31 Reserved The format of the data output is 0 8 16 24 31 16 bit 2 s complement integer Max X 16 bit 2 s complement integer Max Y This command causes the maximum coordinates of the hit region to be passed to the Host Out FIFO unless culled by the statistics bits in the FilterMode register The corresponding tag value output is 0x186 MaxHitRegion ...

Page 233: ... 2 During Extent collection it is set to the initial minimum X Y extent and thereafter will be updated whenever an eligible fragment is generated which has a higher X or Y value with that higher value Note eligible fragments can be either those that are written as pixels OR those that were rasterized but were culled from being drawn as controlled by the StatisticMode register This register is unus...

Page 234: ...at of the data input is 0 8 16 24 31 Reserved The format of the data output is 0 8 16 24 31 16 bit 2 s complement integer Min X 16 bit 2 s complement integer Min Y This command causes the minimum coordinates of the hit region to be passed to the Host Out FIFO unless culled by the statistics bits in the FilterMode register The corresponding tag value output is 0x185 MinHitRegion ...

Page 235: ...n 2 During Extent collection it is set to the initial maximum X Y extent and thereafter will be updated whenever an eligible fragment is generated which has a lower X or Y value with that lower value Note eligible fragments can be either those that are written as pixels OR those that were rasterized but were culled from being drawn as controlled by the StatisticMode register This register is unusu...

Page 236: ... packed copies Any pixels lying outside the specified range are not plotted This test is only active when the PackedData bit in FBReadMode is enabled Bit0 11 XEnd 12 bit 2 s complement value Bit16 27 XStart 12 bit 2 s complement value Bit29 31 Relative Offset 3 bit 2 s compliment value which specifies the number of pixels that the source data has to be adjusted to align with the destination data T...

Page 237: ...ed The format of the data output is 0 8 16 24 31 Reserved PickFlag This command causes the current status of the picking result to be passed to the Host Out FIFO unless culled by the statistics bits in the FilterMode register The corresponding tag value output is 0x187 Bit0 PickFlag 0 Miss 1 Hit has occurred Bit1 BusyFlag 0 Idle 1 Busy used to validate the Pick Flag bit if this register is polled ...

Page 238: ...Q value Unit Texture Address Region 0 Offset 0x0000 83B8 Tag 0x0077 Reset Value Undefined Write The format of the data input is 0 8 16 24 31 Reserved Fraction Integer Sign Used to set the initial value for the Q coordinate when texture mapping Format is 2 s complement 2 27 fixed point QStart ...

Page 239: ...ed bitmask Bit2 3 FractionAdjust These bits are for the ContinueNewLine command and specify how the fraction bits in the Y and XDom DDAs are adjusted 0 No adjustment is done 1 Set the fraction bits to zero 2 Set the fraction bits to half 3 Set the fraction to nearly half i e 0x7FFF Bit4 5 BiasCoordinates These bits control how much is added onto the StartXDom StartXSub and StartY values when they ...

Page 240: ...BA Bit9 BitMaskPacking 0 bitmask packed 1 new data every scanline Bit10 14 BitMaskOffset Position of first bit to test in bitmask Bit15 16 HostDataByteSwapMode Controls byte swapping for host data Input ABCD 0 ABCD 1 BADC 2 CDAB 3 DCBA Bit18 LimitsEnable Enable X and Y limits checking 0 disabled 1 enabled Bit19 BitMaskRelative 0 bitmask indexed by counter 1 bit mask indexed by X position ...

Page 241: ...1 Ignored Ignored Y X Bits 0 15 X origin of the rectangle to be drawn Bits 16 31 Y origin of the rectangle to be drawn Name Rectangle Origin Unit Rasterizer Region 0 Offset 0x0000 80D8 Tag 0x001B Reset Value Undefined Write 0 8 16 24 31 Ignored Ignored Height Width Bits 0 15 Width of the rectangle to be drawn Bits 16 31 Height of the rectangle to be drawn RectangleOrigin RectangleSize ...

Page 242: ...e data field defines the short term modes required by this primitive For details see Table 5 4 Bit0 AreaStippleEnable Note that area stipple in the Stipple Unit must be enabled as well for stippling to occur 0 Disable 1 Enable Bit3 FastFillEnable 0 Disable block filling 1 Enable block filling Bit6 7 PrimitiveType These bits indicate the type of PERMEDIA primitive to be drawn The primitives support...

Page 243: ...Unit must be suitably enabled as well for any fogging to occur 0 Disable 1 Enable Bit16 SubPixelCorrectionEnable Enables the sub pixel correction of color depth fog and texture values at the start of a scanline span 0 Disable 1 Enable Bit17 ReuseBitMask Allows the bitmask to be reused when it has expired if enabled the Rasterizer will not wait for a new mask when the current one has been used 0 Di...

Page 244: ...elta Region 0 Offset 0x0000 9328 Tag 0x0265 Reset Value Undefined Write 0 8 16 24 31 Reserved The data field is not used Name Repeat Triangle Unit Delta Region 0 Offset 0x0000 9310 Tag 0x0262 Reset Value Undefined Write 0 8 16 24 31 Reserved The data field is not used RepeatLine RepeatTriangle ...

Page 245: ...rent value of the picking result to be reset to zero The data field is not used Name Initial Red Color Unit Color DDA Region 0 Offset 0x0000 8780 Tag 0x00F0 Reset Value Undefined Read write 0 8 16 24 31 Integer Not used Fraction Not used Sign This register is used to set the initial value for the Red value for a vertex when in Gouraud shading mode The value is 2 s complement 9 11 fixed point forma...

Page 246: ...ment Max Y Not used 12 bit 2 s complement Max X Specifies the user scissor rectangle corner farthest from the screen origin Name Scissor Rectangle Minimum XY Unit Scissor Stipple Region 0 Offset 0x0000 8188 Tag 0x0031 Reset Value Undefined Read write 0 8 16 24 31 Not used 12 bit 2 s complement Min Y Not used 12 bit 2 s complement Min X Specifies the user scissor rectangle corner closest to the scr...

Page 247: ...ng of the screen and user scissor tests Bit0 User Scissor Enable 0 Disable 1 Enable Bit1 Screen Scissor Enable 0 Disable 1 Enable Name Screen Size Unit Scissor Stipple Region 0 Offset 0x0000 8198 Tag 0x0033 Reset Value Undefined Read write 0 8 16 24 31 Not used 11 bit unsigned integer Width Not used 11 bit unsigned integer Height Screen dimensions for screen scissor clip The screen boundaries are ...

Page 248: ...initial value for the S coordinate when texture mapping Format is 2 s complement 12 18 fixed point Name Start X Value Dominant Edge Unit Rasterizer Region 0 Offset 0x0000 8000 Tag 0x0000 Reset Value Undefined Read write 0 8 16 24 31 Not used Sign 15 bit fraction 11 bit integer Not used Initial X value for the dominant edge in trapezoid filling or initial X value in line drawing The value is in 2 s...

Page 249: ... Not used Initial X value for the subordinate edge in trapezoid filling The value is in 2 s complement 12 15 fixed point format Name Start Y Value Unit Rasterizer Region 0 Offset 0x0000 8020 Tag 0x0004 Reset Value Undefined Read write 0 8 16 24 31 Not used Sign 15 bit fraction 11 bit integer Not used Initial scanline in trapezoid filling or initial Y position for line drawing The value is in 2 s c...

Page 250: ...de of statistics collection Bit0 EnableStats 0 Disable Statistics collection 1 Enable Statistics collection Bit1 StatsType 0 Picking mode 1 Extent collection Bit2 Active Steps 0 Excludes Pixels that were drawn 1 Includes Pixels that were drawn Bit3 Passive Steps 0 Excludes fragments that were culled from being drawn 1 Includes fragments that were culled from being drawn Bit4 CompareFunction 0 Insi...

Page 251: ...encil Depth Region 0 Offset 0x0000 8990 Tag 0x0132 Reset Value Undefined Read write 0 8 16 24 31 ReferenceStencil Reserved Reserved Reserved CompareMask WriteMask Holds data used in the stencil test The stencil writemask controls which stencil planes are updated as a result of the test Bit0 Reference Stencil is the reference value for the stencil test Bit8 Compare Mask is the mask used to determin...

Page 252: ...ncilData register If the test is LESS and the result is true then the fragment value is less than the source value Bit0 Unit Enable 0 Disable 1 Enable Bit1 3 Update Method if Depth test passes and Stencil test passes see table below Bit4 6 Update Method if Depth test fails and Stencil test passes see table below Bit7 9 Update Method if Stencil test fails Mode Method Result 0 Keep Source stencil 1 ...

Page 253: ...r R W Region 0 Offset 0x0000 8C78 Tag 0x018F Reset Value Undefined Write 0 8 16 24 31 32 bit integer address This command causes all outstanding framebuffer writes to be flushed and then suspension of framebuffer accesses until the next frameblank period The data field is the start address of the next frame to be displayed This address will be used from the next frameblank until a new address is s...

Page 254: ... such as pending memory accesses It also causes the current status of the picking result to be passed to the Host Out FIFO unless culled by the statistics bits in the FilterMode register Bit0 30 User Defined Bit31 InterruptEnable 0 Disable Interrupt for this command 1 Enable Interrupt for this command The data output is the value written to the register by this command If interrupts are enabled th...

Page 255: ...tures It is also used when downloading YUV data which needs to be converted to RGB the YUV conversion is done on the contents of this register This register is also used to supply the background color if ForceBackgroundColor has been enabled in either the RasterizerMode or the AreaStippleMode registers Name Texel LUT entries 0 to 15 Unit Texture Read Region 0 Offset 0x0000 8E80 0x0000 8EF8 Tag 0x0...

Page 256: ... data to be loaded into the texture look up table If bit 30 is set the LUT resides in system memory rather than local buffer and should be loaded across the PCI bus Bit 31 is ignored if this register is loaded directly If it is loaded indirectly by the TexelLUTID register Name Data for texture LUT Unit Texture Read Region 0 Offset 0x0000 84C8 Tag 0x0099 Reset Value Undefined Read write 0 8 16 24 3...

Page 257: ...egion 0 Offset 0x0000 84C0 Tag 0x00098 Reset Value Undefined Read write 0 8 16 24 31 Reserved Index The TexelLUTIndex register holds the index into the texel LUT where the write of subsequent TexelLUTData will be written The index is held in the lower 8 bits of the TexelLUTIndex register and this is auto incremented after every write to TexelLUTData Reading back from TexelLUTIndex returns the auto...

Page 258: ... 0 8 16 24 31 Reserved Enable DirectIndex Offset PixelsPerEntry Controls the operation of the texture look up table Bit0 Enable 0 No 1 Lookup Bit1 DirectIndex 0 Index from texture data 1 Index from fragment XY values Bit2 9 Offset 0x0000 Offset to add index in DirectIndex mode Bit10 11 PixelsPerEntry number of pixels per entry in LUT 0 1 pixel 1 2 pixels 2 4 pixels TexelLUTMode ...

Page 259: ...o load and the Count field specifies the number of entries to load Name Texture Address Mode Unit Texture Address Region 0 Offset 0x0000 8380 Tag 0x0070 Reset Value Undefined Read write 0 8 16 24 31 Reserved TextureAddressEnable PerspectiveCorrection Controls the calculation of texture addresses If bit 1 is set PERMEDIA performs fast accurate perspective correction Bit0 Texture Address Enable 0 Di...

Page 260: ...r Reserved System Memory Invalid Address Base address of texture map Specified in texels from the base of the memory If bit 3o is set the texture resides in system memory rather than local buffer and should be fetched across the PCI bus Bit 31 is ignored if this register is loaded directly If it is loaded indirectly by the TextureID register bit 31 indicates that the address is invalid and should ...

Page 261: ...Texture Type field differentiates between RGB OpenGL and Ramp Apple application modes With Ramp Application Mode various modes can be simultaneously applied e g decal with highlight Note The TextureEnable bit in the Render command must also be set for a primitive to be texture mapped Bit0 Texture Enable 0 Disable 1 Enable texture application Bit1 3 Application Mode RGB Ramp 0 Modulate Bit 1 Decal ...

Page 262: ... Texture Data Unit Framebuffer R W Region 0 Offset 0x0000 88E8 Tag 0x011D Reset Value Undefined Write 0 8 16 24 31 Data Used with TextureDownloadOffset to load raw texture data into memory This may include multiple texels depending on the texel size Bit0 31 Data TextureData ...

Page 263: ...A 0 BGR 8 8 8 8 8 0 8 8 8 16 8 24 1 BGR 5 5 5 1 Front 5 0 5 5 5 10 1 15 2 BGR 4 4 4 4 4 0 4 4 4 8 4 12 5 BGR 3 3 2 Front 3 0 3 3 2 6 0 6 BGR 3 3 2 Back 3 8 3 11 2 14 0 9 BGR 2 3 2 1 Front 2 0 3 2 2 5 1 7 10 BGR 2 3 2 1 Back 2 8 3 10 2 13 1 15 11 BGR 2 3 2 FrontOff 2 0 3 2 2 5 0 12 BGR 2 3 2 BackOff 2 8 3 10 2 13 0 13 BGR 5 5 5 1 Back 5 16 5 21 5 26 1 31 14 BGR CI8 8 0 0 0 0 15 BGR CI4 4 0 0 0 0 16...

Page 264: ...m Front and Back modes replicate the color value to assist with double buffering CI values are replicated into each byte to assist with double buffering Offset modes have 64 added to the 7 bit formatted value If the format has no alpha bits the alpha field defaults to 0xF8 Bit4 No Alpha Buffer 0 Alpha buffer present 1 Alpha buffer not present Bit5 Color Order 0 BGR 1 RGB Bit6 Texture Format Extens...

Page 265: ...the store has taken place Note if this register is read back it will not necessarily contain the same value as the written value Bit0 21 Address Name Indirect handle for texture map Unit Texture Read Region 0 Offset 0x0000 8F70 Tag 0x001EE Reset Value Undefined Read write 0 8 16 24 31 24 bit unsigned integer Reserved System Memory Reserved The 24 bit field holds the address of the data that should...

Page 266: ...Specifies the organization of the texture map in memory Enabling subpatch addressing improves the performance of texture mapping in typical situations Bit0 2 Partial Product 0 See Appendix C for a table of values Bit3 5 Partial Product 1 See Appendix C for a table of values Bit5 7 Partial Product 2 See Appendix C for a table of values Bit16 Window Origin 0 Top 1 Bottom Left Bit17 Subpatch Mode 0 D...

Page 267: ...ing a single image onto an object Repeat cause the texture pattern to be repeated whilst mirror causes the texture pattern to be alternately reversed The Packed Data bit is used to define how texels are read from memory If this bit is cleared each texel is read one at a time if set several texels can be read simultaneously improving efficiency The actual number of texels read in this case is depen...

Page 268: ...tial texture T value Unit Texture Address Region 0 Offset 0x0000 83A0 Tag 0x0074 Reset Value Undefined Read write 0 8 16 24 31 Integer Fraction Reserved Sign Used to set the initial value for the T coordinate when texture mapping Format is 2 s complement 12 18 fixed point TStart ...

Page 269: ...blue 1 30 us 8 alpha 1 30 us 9 Fog f 10 22 us 10 x 16 16 s 11 Coordinate y 16 16 s 12 z 1 30 us 13 Reserved Reserved 14 PackedColor PackedColor 8888 1This is the range when Normalise is not used When Normalise is enabled the fixed point format can be anything providing it is the same for the s t and q parameters The numbers will be interpreted as if they had 2 30 format for the purpose of conversi...

Page 270: ...blue 1 30 us 8 alpha 1 30 us 9 Fog f 10 22 us 10 x 16 16 s 11 Coordinate y 16 16 s 12 z 1 30 us 13 Reserved Reserved 14 PackedColor PackedColor 8888 1This is the range when Normalise is not used When Normalise is enabled the fixed point format can be anything providing it is the same for the s t and q parameters The numbers will be interpreted as if they had 2 30 format for the purpose of conversi...

Page 271: ...blue 1 30 us 8 alpha 1 30 us 9 Fog f 10 22 us 10 x 16 16 s 11 Coordinate y 16 16 s 12 z 1 30 us 13 Reserved Reserved 14 PackedColor PackedColor 8888 1This is the range when Normalise is not used When Normalise is enabled the fixed point format can be anything providing it is the same for the s t and q parameters The numbers will be interpreted as if they had 2 30 format for the purpose of conversi...

Page 272: ...ws the valid entries Offset Category Parameter IEEE Single Precision Floating Point Range 0 s 1 0 1 0 1 t 1 0 1 0 2 Texture q 1 0 1 0 3 Ks 0 0 2 0 4 Kd 0 0 1 0 5 red 0 0 1 0 6 Color green 0 0 1 0 7 blue 0 0 1 0 8 alpha 0 0 1 0 9 Fog f 512 0 512 0 10 x 32K 32K footnotes 1 2 11 Co ordinate y 32K 32K footnotes 1 2 12 z 0 0 1 0 13 Reserved Reserved 14 PackedColo r PackedColo r 8888 1The normal range h...

Page 273: ...ws the valid entries Offset Category Parameter IEEE Single Precision Floating Point Range 0 s 1 0 1 0 1 Texture t 1 0 1 0 2 q 1 0 1 0 3 Ks 0 0 2 0 4 Kd 0 0 1 0 5 red 0 0 1 0 6 Color green 0 0 1 0 7 blue 0 0 1 0 8 alpha 0 0 1 0 9 Fog f 512 0 512 0 10 x 32K 32K footnotes 1 2 11 Co ordinate y 32K 32K footnotes 1 2 12 z 0 0 1 0 13 Reserved Reserved 14 PackedColo r PackedColo r 8888 1The normal range h...

Page 274: ...ws the valid entries Offset Category Parameter IEEE Single Precision Floating Point Range 0 s 1 0 1 0 1 Texture t 1 0 1 0 2 q 1 0 1 0 3 Ks 0 0 2 0 4 Kd 0 0 1 0 5 red 0 0 1 0 6 Color green 0 0 1 0 7 blue 0 0 1 0 8 alpha 0 0 1 0 9 Fog f 512 0 512 0 10 x 32K 32K footnotes 1 2 11 Co ordinate y 32K 32K footnotes 1 2 12 z 0 0 1 0 13 Reserved Reserved 14 PackedColo r PackedColo r 8888 1The normal range h...

Page 275: ...terizer Region 0 Offset 0x0000 8088 Tag 0x0017 Reset Value Undefined Write 0 8 16 24 31 Reserved This command register causes PERMEDIA to suspend operation until all framebuffer writes have completed Useful to separate say a texture download from subsequent primitives Bit0 31 Reserved WaitForCompletion ...

Page 276: ...to be updated Writes must still be enabled in the LBWriteMode register When this bit is clear any update is conditional on the outcome of the stencil and depth tests If the Disable LB Update bit is set the results of the stencil and depth tests are overridden and the localbuffer not updated even if localbuffer writes are enabled When writes are disabled in LBWriteMode there may be a performance ad...

Page 277: ...r unit generates each fragment the fragment s coordinates are adjusted by the amount of the origin to generate the fragment s screen coordinates This occurs prior to doing the screen scissor test Name X extent for rasterizing Unit Rasterizer Region 0 Offset 0x0000 80C8 Tag 0x0019 Reset Value Undefined Read write 0 8 16 24 31 Not used 12 bit 2 s complement X Min 12 bit 2 s complement X Max Not used...

Page 278: ... Name Y extent for rasterizing Unit Rasterizer Region 0 Offset 0x0000 80A8 Tag 0x0015 Reset Value Undefined Read write 0 8 16 24 31 Not used 12 bit 2 s complement Y Min 12 bit 2 s complement Y Max Not used Defines the Y extent the Rasterizer should fill between YLimits ...

Page 279: ... conversion disabled 1 YUV to RGB color space conversion enabled Bit1 2 TestMode 0 No chroma test 1 Pass if within chroma bounds 2 Fail if within chroma bounds Bit3 TestData 0 Apply chroma test on input data before color space conversion if enabled 1 Apply chroma test on output data after color space conversion if enabled Bit4 RejectTexel 0 Do not plot pixel if chroma test fails 1 Do not texture p...

Page 280: ...most significant bits and ZStartL the least significant bits The combined value is in 2 s complement 17 11 fixed point format Name Depth Start Value Upper Unit Stencil Depth Region 0 Offset 0x0000 89B0 Tag 0x0136 Reset Value Undefined Read write 0 8 16 24 31 Not Used 16 bit integer Sign This register holds part of the start value for depth interpolation ZStartU holds the most significant bits and ...

Page 281: ...rce license agreement Warning the order of loading control registers into the HyperPipeline has also been chosen for clarity rather than efficiency The optimal order is documented in section 7 2 3 Loading of a PERMEDIA register is expressed as register name value When writing directly to the register file i e to a FIFO this would be implemented by writing value to the mapped in address of the regi...

Page 282: ...he field can be ignored completely or set to don t care In some registers values for fields which need to be set but are not readily available will typically be set as appropriate In some fragments simply a list of commands is given e g Sample code to rasterize a rectangle StartXDom Start dominant edge StartXSub Start of subordinate dXDom dXSub Count YStart dY Set up to render an aliased trapezoid...

Page 283: ...dths supported by this technique are tabulated below together with the values for each of the PP fields Screen Width PP0 PP1 PP2 0 0 0 0 32 1 0 0 64 1 1 0 96 1 1 1 128 2 1 1 160 2 2 1 192 2 2 2 224 3 2 1 256 3 2 2 288 3 3 1 320 3 3 2 384 3 3 3 416 4 3 1 448 4 3 2 512 4 3 3 544 4 4 1 576 4 4 2 640 4 4 3 768 4 4 4 800 5 4 1 832 5 4 2 896 5 4 3 1024 5 4 4 1056 5 5 1 1088 5 5 2 1152 5 5 3 1280 5 5 4 1...

Page 284: ...TVP4020 Programmers Reference Manual A Gouraud Shaded Triangle 275 ...

Page 285: ...appendix is included to understand any legacy TVP4010 software to allow alternative rasterization techniques to be used For this example assume the coordinate origin is bottom left of the window and drawing will be from top to bottom PERMEDIA can draw from top to bottom or bottom to top D1 A Gouraud Shaded Triangle Consider a triangle with vertices v1 v2 and v3 where each vertex comprises X Y and ...

Page 286: ... occasionally though not usually on a per primitive basis for instance enabling Gouraud shading and depth buffering A detailed treatment will be found in later sections of this chapter and details are not included here D3 Dominant and Subordinate Sides of a Triangle The dominant side of a triangle is that with the greatest range of Y values The choice of dominant side is optional when the triangle...

Page 287: ...be calculated by adding dRdy13 for each scanline between Y1 and Yn to R1 then adding dRdx for each fragment along scanline Yn from the left edge to Xn The example chosen has the knee i e vertex 2 on the right hand side and drawing is from left to right If the knee were on the left side or drawing was from right to left then the Y deltas for both the subordinate sides would be needed to interpolate...

Page 288: ... X3 Y1 Y3 The divisor shown here as a is the same as for color gradient values The two deltas dZdy13 and dZdx allow the Z value of each fragment in the triangle to be determined by linear interpolation as was described for the color interpolation above D7 Register Set up for Depth Testing Internally PERMEDIA uses fixed point arithmetic The formats for each register are described later Each depth v...

Page 289: ...ated as dX13 X3 X1 Y3 Y1 dX12 X2 X1 Y2 Y1 dX23 X3 X2 Y3 Y2 This triangle will be drawn in two parts top down to the knee i e vertex 2 and then from there to the bottom The dominant side is the left side so for the top half dXDom dX13 dXSub dX12 The start X Y the number of scanlines and the above deltas give PERMEDIA enough information to edge walk the top half of the triangle However to indicate t...

Page 290: ... has interpolated parameters Control of subpixel correction is in the Render command register described in the next section and is selectable on a per primitive basis It does not need to be enabled for any primitive that does not use interpolation including copy operations If it is disabled and interpolators are used the values calculated for the primitive may not be exactly correct enabling sub p...

Page 291: ...E render SubPixelCorrectionEnable TRUE Draw the top half of the triangle Render render After the Render command has been issued the registers in PERMEDIA can immediately be altered to draw the lower half of the triangle Note that only two registers need be loaded and the command ContinueNewSub sent Once PERMEDIA has received ContinueNewSub drawing of this sub triangle will begin Set up the delta a...

Page 292: ...TVP4020 Programmers Reference Manual Register Tables 283 ...

Page 293: ...e read or written but whose contents is passed to the Host Out FIFO under the control of certain commands In addition the table indicates whether the register can be read back A blank entry in this column indicates that the register s contents cannot be read back The following table is a list of registers in unit order Unit Register Major Group hex Offset hex Type Readabl e Delta V0Fixed 14 20 0 D...

Page 294: ...put LBWindowBase 11 7 LBWriteMode 11 8 LBWriteFormat 11 9 Stencil Depth Window 13 0 StencilMode 13 1 StencilData 13 2 Stencil 13 3 Mixed DepthMode 13 4 Depth 13 5 Mixed ZstartU 13 6 ZStartL 13 7 dZdxU 13 8 dZdxL 13 9 dZdyDomU 13 A dZdyDomL 13 B Texture Address TextureAddressMode 07 0 Sstart 07 1 dSdx 07 2 dSdyDom 07 3 Tstart 07 4 dTdx 07 5 dTdyDom 07 6 Qstart 07 7 dQdx 07 8 dQdyDom 07 9 Texture Re...

Page 295: ...adPixel 15 A TextureData 11 D TextureDownloadOffset 11 E SuspendUntilFrameBlan k 18 F Command FBBlockColorU 18 D FBBlockColorL 18 E FBSourceBase 1B 0 FBSourceDelta 1B 1 Command Color DDA Rstart 0F 0 dRdx 0F 1 dRdyDom 0F 2 Gstart 0F 3 dGdx 0F 4 dGdyDom 0F 5 Bstart 0F 6 dBdx 0F 7 dBdyDom 0F 8 Astart 0F 9 ColorDDAMode 0F C ConstantColor 0F D Color 0F E Mixed Texture Fog Blend TextureColorMode 0D 0 Fo...

Page 296: ...gicalOpMode 10 5 Host Out FilterMode 18 0 StatisticMode 18 1 MinRegion 18 2 MaxRegion 18 3 ResetPickResult 18 4 Command MinHitRegion 18 5 Command MaxHitRegion 18 6 Command PickResult 18 7 Command Sync 18 8 Command Multiple Config 1B 2 Table E1 Registers by Unit ...

Page 297: ...1E 1 Color 0F E Mixed ColorDDAMode 0F C Config 1B 2 ConstantColor 0F D Continue 00 B Command ContinueNewDom 00 9 Command ContinueNewLine 00 8 Command ContinueNewSub 00 A Command Count 00 6 dBdx 0F 7 dBdyDom 0F 8 DeltaMode 26 0 Depth 13 5 Mixed DepthMode 13 4 dFdx 0D 5 dFdyDom 0D 6 dGdx 0F 4 dGdyDom 0F 5 DitherMode 10 3 dKddx 0D D dKddyDom 0D E dKsdx 0D A dKsdyDom 0D B dQdx 07 8 dQdyDom 07 9 DrawLi...

Page 298: ... FogMode 0D 2 FStart 0D 4 GStart 0F 3 KdStart 0D C KsStart 0D 9 LBData 11 3 LBDepth 11 6 Output LBReadFormat 11 1 LBReadMode 11 0 LBSourceOffset 11 2 LBStencil 11 5 Output LBWindowBase 11 7 LBWriteFormat 11 9 LBWriteMode 11 8 LogicalOpMode 10 5 MaxHitRegion 18 6 Command MaxRegion 18 3 MinHitRegion 18 5 Command MinRegion 18 2 PackedDataLimits 02 A PickResult 18 7 Command QStart 07 7 RasterizerMode ...

Page 299: ...LUTIndex 09 8 TexelLUTMode 0C F TexelLUTTransfer 09 B TextureAddressMode 07 0 TextureBaseAddress 0B 0 TextureColorMode 0D 0 TextureData 11 D TextureDataFormat 0B 2 TextureDownloadOffset 11 E TextureID 1E E Command TextureMapFormat 0B 1 TextureReadMode 0C E TStart 07 4 V0Fixed 14 20 0 D V0Float 14 23 0 D V1Fixed 14 21 0 D V1Float 14 24 0 D V2Fixed 14 22 0 D V2Float 14 25 0 D WaitForCompletion 01 7 ...

Page 300: ... Ylimits 01 7 WaitForCompletion Command 01 9 XLimits 01 A RectangleOrigin 01 B RectangleSize 02 A PackedDataLimits 03 0 ScissorMode 03 1 ScissorMinXY 03 2 ScissorMaxXY 03 3 ScreenSize 03 4 AreaStippleMode 03 9 WindowOrigin 04 0 7 AreaStipplePattern 0 7 07 0 TextureAddressMode 07 1 SStart 07 2 dSdx 07 3 dSdyDom 07 4 TStart 07 5 dTdx 07 6 dTdyDom 07 7 QStart 07 8 dQdx 07 9 dQdyDom 09 8 TexelLUTIndex...

Page 301: ...AlphaBlendMode 10 3 DitherMode 10 4 FBSoftwareWriteMask 10 5 LogicalOpMode 11 0 LBReadMode 11 1 LBReadFormat 11 2 LBSourceOffset 11 3 LBData 11 5 LBStencil Output 11 6 LBDepth Output 11 7 LBWindowBase 11 8 LBWriteMode 11 9 LBWriteFormat 11 D TextureData 11 E TextureDownloadOffset 13 0 Window 13 1 StencilMode 13 2 StencilData 13 3 Stencil Mixed 13 4 DepthMode 13 5 Depth Mixed 13 6 ZStartU 13 7 ZSta...

Page 302: ...nc Command 18 D FBBlockColorU 18 E FBBlockColorL 18 F SuspendUntilFrameBla nk Command 1B 0 FBSourceBase 1B 1 FBSourceDelta Command 1B 2 Config 1D 0 F TexelLUT 0 15 1E 3 AlphaMapUpperBound 1E 4 AlphaMapLowerBound 1E E TextureID Command 1E F TexelLUTID Command 1E 0 YUVMode 1E 1 ChromaUpperBound 1E 2 ChromaLowerBound 20 0 D V0Fixed 14 21 0 D V1Fixed 14 22 0 D V2Fixed 14 23 0 D V0Float 14 24 0 D V1Flo...

Page 303: ...8 Simultaneous input and output 16 0 Input only Zoom Video port 0 16 Output only Zoom Video port 8 0 Input data with random access parallel bus Input data may be scaled and filtered to reduce memory requirements The output stream may be gamma corrected and converted from RGB to YUV The output video is a slave and supplies data on demand from the external encoder chip Both streams support automatic...

Page 304: ...egrated Delta has been enhanced to support backface culling this is enabled by in the DeltaMode register and rejection of positive or negative area triangles i e front or back faces is controlled by the Render command A packed color format has been added to the Delta vertex interface allowing all four color components to be loaded in a single 32 bit word The data should be written to offset 14 of ...

Page 305: ...eft and right eye screens that are displayed alternately An external pin signals which eye is being displayed and may be used to drive LCD shutter glasses F4 3 Frameblank Control TVP4020 has additional control over behavior at frameblank It continues to support automatic synchronization to frameblank where the new base address for the screen is only accepted during the vertical blank interval In a...

Page 306: ...rectly through a table instead of by the TextureBaseAddress register If the TexureID register is loaded TVP4020 will access memory to fetch the actual base address of the texture Bit 31 of this address is a validity flag and if set to invalid the graphics pipeline halts and an interrupt is generated The host can then load the texture through the bypass and restart the graphics core This mechanism ...

Page 307: ...een added to define the range of colors that should have their alpha value mapped to zero The TVP4010 chroma key registers are used to reject the pixels with an alpha value not equal to one Texels that have failed the alpha map test are not included in filtering so edge effects often seen with filtered cut outs are removed The alpha values of the edge pixels are filtered so that they form a range ...

Page 308: ...des of grey This restriction is due to the operation of the memory devices F5 9 Miscellaneous TVP4020 will calculate the value of FBSourceOffset from an XY delta value removing a multiply from the set up needed for a copy operation The relative offset field in the FBReadMode register is also in the PackedDataLimits register the one used will be the last one set before a primitive is drawn This red...

Page 309: ...sis for techniques such as transparency and painting alpha buffer A memory buffer containing the fourth component of a pixel s color in addition to Red Green and Blue This component is not displayed but may be used for instance to control color blending area stipple A two dimensional binary pattern which is used to cull fragments from being drawn bitblt Bit aligned block transfer Copy of a rectang...

Page 310: ... dictates how PERMEDIA will execute a command culling The process of eliminating a fragment object face or primitive so that it is not drawn DDA Digital Differential Analyzer An algorithm for determining the pixels to draw along a line or polygon edge Also used to interpolate linearly varying values such as color and depth delta A gradient of color fog depth etc in the X or Y directions for a prim...

Page 311: ...lor buffers front back left right overlay underlay their optional associated alpha components and any associated optional window control information This memory is typically separate from the localbuffer Gouraud shading The technique of variable color shading or area filling of a primitive using interpolation to gradually vary the color between vertices Often known as smooth shading hardware write...

Page 312: ...ent A pixel comprises the bits in all the buffers whether stored in the localbuffer or framebuffer corresponding to a particular location in the framebuffer primitive A geometric object to be rendered The PERMEDIA primitives are points lines trapezoids including triangles as a subset and bitmaps Ramp blend mode A method of alpha blending also known as preMult used by QuickDraw3D rasterization The ...

Page 313: ... thread on the host which uses the PERMEDIA co processor Typically tasks assume that they have sole use of PERMEDIA and rely on a device driver to save and restore their PERMEDIA context when they are swapped out texel Texture element An element of an image stored in texture memory which represents the color of the texture to be applied fully or in part to a corresponding fragment texture An image...

Page 314: ...TVP4020 Programmers Reference Manual Index 305 ...

Page 315: ...Index TVP4020 Programmers Reference Manual 306 Index ...

Page 316: ...7 269 273 bypass 4 20 22 33 34 126 Bypass Initialization 126 byte swap 7 byte swapped 54 byte swapping 22 54 59 93 215 Byte Swapping 23 chroma keying 281 chroma test 37 86 87 88 134 149 153 254 281 Chroma Test 134 ChromaLowerBound 88 153 267 269 274 ChromaUpperBound 88 153 267 269 274 CI 28 29 81 96 108 111 148 154 157 168 238 239 CI4 28 Clears 130 Color 14 19 28 92 104 114 122 154 194 218 267 269...

Page 317: ...67 269 273 dFdyDom 101 102 106 107 165 267 269 273 dGdx 98 99 107 261 267 269 273 dGdyDom 98 99 107 261 267 269 273 Difference between destination and source data 190 Dither Example 109 dithering 27 30 108 109 112 123 168 192 282 Dithering 37 108 109 DitherMode 23 29 35 85 108 109 110 113 123 167 183 267 269 273 dKddx 105 169 267 269 273 dKddyDom 105 169 267 269 273 dKsdx 105 170 267 269 273 dKsdy...

Page 318: ...Flat shading 97 Flat shading high speed 112 Flat Shading example 98 fog 49 58 99 103 106 165 172 173 174 192 195 196 197 218 Fog 37 Fog Application 101 Fog DDA 101 Fog Example 106 fog interpolation 102 FogColor 106 107 197 267 270 272 fogging 105 172 173 174 196 218 283 FogMode 58 101 105 107 125 196 267 270 272 fonts 52 ForceAlpha 108 ForceBackgroundColor 54 59 61 214 230 fragment 37 38 44 49 261...

Page 319: ...eMode 66 67 68 122 124 205 251 266 270 273 LineCount 33 Lines 47 49 localbuffer 4 24 53 65 72 116 124 134 283 Localbuffer 24 121 localbuffer clears 130 Localbuffer Coordinates 25 Localbuffer example 68 Localbuffer Read 65 67 68 132 Localbuffer Read unit 37 122 124 129 Localbuffer Read Write units 65 199 200 201 202 203 204 205 Localbuffer Reads 54 Localbuffer Write 54 68 129 132 251 Localbuffer Wr...

Page 320: ...iding 129 Render 9 14 30 48 54 56 57 91 104 129 130 172 173 174 216 217 rendering 284 Repeat line 219 Repeat Triangle 219 reserved 146 reset 112 119 reset value 146 ResetPickResult 8 115 117 118 220 268 270 274 reuse bitmask 218 256 RGB Texture Application 100 RStart 98 99 107 261 267 270 273 scissor 52 Scissor 37 scissor clip 8 9 30 52 55 Scissor example 63 scissor rectangle 37 scissor test 30 60...

Page 321: ...0 15 82 230 266 271 274 TexelLUTData 232 TexelLUTIndex 232 TexelLUTMode 82 125 266 271 272 texture 24 49 52 80 81 87 99 103 132 134 172 173 174 192 218 237 285 texture address 86 234 Texture Address unit 35 37 76 79 171 176 177 213 223 234 243 266 texture allocation 121 texture application 99 236 Texture Application Example 106 texture buffer 4 24 28 187 Texture Buffer 35 Texture Buffer Coordinate...

Page 322: ...32 186 201 250 265 271 272 Window 72 73 74 123 124 129 251 266 271 273 Window Address and Origin 123 Window Initialization 123 WindowOrigin 60 62 252 266 271 272 Windows NT 3 1 Graphics Programming 2 writemask 28 285 writemasking 27 30 writemasks 108 Writemasks 124 Writing enabling 124 X and Y limits 55 X Derivative Blue 160 X Derivative Green 166 X Derivative Red 175 XLimits 55 57 252 266 271 272...

Page 323: ...Index TVP4020 Programmers Reference Manual 314 ...

Reviews: