1<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 2<html xml:lang="en-US" lang="en-US" xmlns="http://www.w3.org/1999/xhtml"> 3 <head> 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 5 <meta http-equiv="Content-Style-Type" content="text/css" /> 6 <link rel="stylesheet" href="../css/manpage.css" type="text/css" /> 7 <title>nngxAddMemoryFillCommand</title> 8 </head> 9 <body> 10 <h1><CODE>nngxAddMemoryFillCommand</CODE> Function</h1> 11 <h2>Syntax</h2> 12 <div class="section"> 13 <pre class="definition"> 14NNGX_APICALL void NNGX_APIENTRY nngxAddMemoryFillCommand( 15 GLvoid * startaddr0, 16 GLsizei size0, 17 GLuint data0, 18 GLsizei width0, 19 GLvoid * startaddr1, 20 GLsizei size1, 21 GLuint data1, 22 GLsizei width1 23); 24</pre> 25 </div> 26 <h2>Arguments</h2> 27 <div class="section"> 28 <table class="arguments"> 29 <thead> 30 <tr> 31 <td width="15" /> 32 <th>Name</th> 33 <td>Description</td> 34 </tr> 35 </thead> 36 <tr> 37 <td>in</td> 38 <th>startaddr0</th> 39 <td>Start address of the memory region to fill (channel 0).</td> 40 </tr> 41 <tr> 42 <td>in</td> 43 <th>size0</th> 44 <td>Size in bytes to fill (channel 0)</td> 45 </tr> 46 <tr> 47 <td>in</td> 48 <th>data0</th> 49 <td>Data to use to fill (channel 0)</td> 50 </tr> 51 <tr> 52 <td>in</td> 53 <th>width0</th> 54 <td>Bit width of the pattern to use to fill (16, 24, or 32) (channel 0)</td> 55 </tr> 56 <tr> 57 <td>in</td> 58 <th>startaddr1</th> 59 <td>Start address of the memory region to fill (channel 1).</td> 60 </tr> 61 <tr> 62 <td>in</td> 63 <th>size1</th> 64 <td>Size in bytes to fill (channel 1)</td> 65 </tr> 66 <tr> 67 <td>in</td> 68 <th>data1</th> 69 <td>Data to use to fill (channel 1) *** in *** width1 *** Bit width of the pattern to use to fill (16, 24, or 32) (channel 1)</td> 70 </tr> 71 <tr> 72 <td /> 73 <th>width1</th> 74 <td> 75 </td> 76 </tr> </table> 77 </div> 78 <h2>Return Values</h2> 79 <div class="section">There is no return value. </div> 80 <h2>Description</h2> 81 <div class="section"> 82 <p>Adds a memory fill command.</p><P> 83 By filling memory with a specified data pattern, this function can be used to clear the color and depth (stencil) buffers. The <SPAN class="argument">glClear</SPAN> function provides equivalent functionality, but this function has more general uses. 84 </P><P> 85 You can fill two regions using separate parameters for each. Channel 1 is configured by <SPAN class="argument">startaddr0</SPAN>, <SPAN class="argument">size0</SPAN>, <SPAN class="argument">data0</SPAN>, and <SPAN class="argument">width0</SPAN>. Channel 2 is configured by <SPAN class="argument">startaddr1</SPAN>, <SPAN class="argument">size1</SPAN>, <SPAN class="argument">data1</SPAN>, and <SPAN class="argument">width1</SPAN>. 86 </P><P>Memory is filled starting at addresses <SPAN class="argument">startaddr0</SPAN> and <SPAN class="argument">startaddr1</SPAN>. The <SPAN class="argument">startaddr0</SPAN> and <SPAN class="argument">startaddr1</SPAN> addresses must be 16-byte aligned. If an address is 0, its corresponding channel is not used. 87 </P><P><SPAN class="argument">size0</SPAN> and <SPAN class="argument">size1</SPAN> bytes of memory are filled. Both <span class="argument">size0</span> and <span class="argument">size1</span> must be multiples of 16. 88 </P><P>The <SPAN class="argument">data0</SPAN> and <SPAN class="argument">data1</SPAN> arguments specify the data to use to fill. The data specified in each argument is repeated until the specified size is filled. 89 </P><P>The number of bits in each fill pattern is specified by <SPAN class="argument">width0</SPAN> and <SPAN class="argument">width1</SPAN>. You can specify 16, 24, or 32. Given a value of 16, memory is filled 16 bits at a time using bits [15:0] of <SPAN class="argument">data0</SPAN> and <SPAN class="argument">data1</SPAN>. Given a value of 24, memory is filled 24 bits at a time using bits [23:0] of <SPAN class="argument">data0</SPAN> and <SPAN class="argument">data1</SPAN>. Given a value of 32, memory is filled 32 bits at a time using bits [31:0] of <SPAN class="argument">data0</SPAN> and <SPAN class="argument">data1</SPAN>. 90 </P><P>The following table shows sample argument values for each color buffer format. 91 <TABLE><THEAD><TR><TD>format</TD><TD><SPAN class="argument">data0</SPAN> or <SPAN class="argument">data1</SPAN></TD><TD><SPAN class="argument">width0</SPAN> or <SPAN class="argument">width1</SPAN></TD></TR></THEAD><TR><TD>GL_RGBA8_OES</TD><TD>R[31:24], G[23:16], B[15:8], A[7:0]</TD><TD>32</TD></TR><TR><TD>GL_RGBA4</TD><TD>R[15:12], G[11:8], B[7:4], A[3:0]</TD><TD>16</TD></TR><TR><TD>GL_RGB5_A1</TD><TD>R[15:11], G[10:6], B[5:1], A[0:0]</TD><TD>16</TD></TR><TR><TD>GL_RGB565</TD><TD>R[15:11], G[10:5], B[4:0]</TD><TD>16</TD></TR><TR><TD><CODE>GL_DEPTH24_STENCIL8_EXT</CODE></TD><TD>stencil[31:24], depth[23:0]</TD><TD>32</TD></TR><TR><TD><CODE>GL_DEPTH_COMPONENT24_OES</CODE></TD><TD>depth[23:0]</TD><TD>24</TD></TR><TR><TD><CODE>GL_DEPTH_COMPONENT16</CODE></TD><TD>depth[15:0]</TD><TD>16</TD></TR></TABLE></P><P> 92 The following errors occur in this function. 93 <TABLE><TR><TH>GL_ERROR_8078_DMP</TH><TD>0 is bound to the current command list or the command request queue is full.</TD></TR><TR><TH>GL_ERROR_8079_DMP</TH><TD>The <SPAN class="argument">startaddr0</SPAN> or <SPAN class="argument">startaddr1</SPAN> value is not 16-byte aligned.</TD></TR><TR><TH>GL_ERROR_807A_DMP</TH><TD>The <SPAN class="argument">size0</SPAN> or <SPAN class="argument">size1</SPAN> value is not a multiple of <CODE>16</CODE>.</TD></TR><TR><TH>GL_ERROR_807B_DMP</TH><TD>The <SPAN class="argument">width0</SPAN> or <SPAN class="argument">width1</SPAN> value is invalid.</TD></TR></TABLE> 94 The <SPAN class="argument">size0</SPAN>, <SPAN class="argument">data0</SPAN>, and <SPAN class="argument">width0</SPAN> arguments are not checked for errors when <SPAN class="argument">startaddr0</SPAN> is set to 0. The <SPAN class="argument">size1</SPAN>, <SPAN class="argument">data1</SPAN>, and <SPAN class="argument">width1</SPAN> arguments are not checked for errors when <SPAN class="argument">startaddr1</SPAN> is set to 0. 95 </P><P> 96 Channel 0 and channel 1 are executed simultaneously. If they have overlapping regions, it is undefined which result will ultimately be applied. 97 </P></div> 98 <h2>Revision History</h2> 99 <div class="section"> 100 <dl class="history"> 101 <dt>2010/09/15</dt> 102 <dd>Initial version.<br /> 103 </dd> 104 </dl> 105 </div> 106 <hr><p>CONFIDENTIAL</p></body> 107</html>