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 <style type="text/css"><!-- 8 span.static_style 9 { 10 font-size : 8pt; 11 color : white; 12 font-weight : bold; 13 background : #44f; 14 border-left : solid 1px #aaf; 15 border-top : solid 1px #aaf; 16 border-right : solid 1px #00c; 17 border-bottom : solid 1px #00c; 18 padding-left : 2px; 19 padding-right : 2px; 20 } 21 span.virtual_style 22 { 23 font-size : 8pt; 24 color : white; 25 font-weight : bold; 26 background : #0a0; 27 border-left : solid 1px #0f0; 28 border-top : solid 1px #0f0; 29 border-right : solid 1px #060; 30 border-bottom : solid 1px #060; 31 padding-left : 2px; 32 padding-right : 2px; 33 } 34 span.protected_style 35 { 36 font-size : 8pt; 37 color : white; 38 font-weight : bold; 39 background : #444; 40 border-left : solid 1px #ccc; 41 border-top : solid 1px #ccc; 42 border-right : solid 1px #222; 43 border-bottom : solid 1px #222; 44 padding-left : 2px; 45 padding-right : 2px; 46 } 47 --></style> 48<title>nn::gr::CTR::Shader</title> 49 </head> 50 <body> 51<h1><CODE>nn::gr::CTR::Shader</CODE> Class</h1> 52<h2>Syntax</h2> 53 <div class="section"> 54 <pre class="definition">class Shader</pre> 55 </div> 56<h2>Description</h2> 57 <div class="section"> 58<p>Class for setting the shader binary.</p><!-- write here --></div> 59 <a name="variable" id="variable"> 60<h2>Member Variables</h2> 61 <div class="section"> 62 <table class="members"> 63 <tr> 64 <td width="100"> 65<span class="protected_style" title="protected">protected</span> </td> 66 <th> 67<span class="argument">m_VtxShaderIndex</span> 68 </th> 69<td>The index of the enabled vertex shader. Its type is <CODE>int</CODE>.</td> 70 </tr> 71 <tr> 72 <td width="100"> 73<span class="protected_style" title="protected">protected</span> </td> 74 <th> 75<span class="argument">m_GeoShaderIndex</span> 76 </th> 77<td>The index of the enabled geometry shader. Its type is <CODE>int</CODE>.</td> 78 </tr> 79 <tr> 80 <td width="100"> 81<span class="protected_style" title="protected">protected</span> </td> 82 <th> 83<span class="argument">m_ExeImageInfoNum</span> 84 </th> 85<td>The number of executable shaders in a shader binary.</td> 86 </tr> 87 <tr> 88 <td width="100"> 89<span class="protected_style" title="protected">protected</span> </td> 90 <th> 91<span class="argument">m_ExeImageInfo</span> 92 </th> 93<td>Holds a pointer to information on the executable shaders in a shader binary. Its type is <CODE><a href="../../../../nn/gr/CTR/Shader/ExeImageInfo/Overview.html">ExeImageInfo</a>[]</CODE>.</td> 94 </tr> 95 <tr> 96 <td width="100"> 97<span class="protected_style" title="protected">protected</span> </td> 98 <th> 99<span class="argument">m_Instruction</span> 100 </th> 101<td>A pointer to the part of the shader binary with executable shader code. The type is <CODE>bit32*</CODE>.</td> 102 </tr> 103 <tr> 104 <td width="100"> 105<span class="protected_style" title="protected">protected</span> </td> 106 <th> 107<span class="argument">m_InstructionCount</span> 108 </th> 109<td>The size of the executable shader code in the shader binary. Type is <CODE>u32</CODE>.</td> 110 </tr> 111 <tr> 112 <td width="100"> 113<span class="protected_style" title="protected">protected</span> </td> 114 <th> 115<span class="argument">m_Swizzle</span> 116 </th> 117<td>Swizzle patterns represented in command format. Its type is <CODE>bit32[]</CODE>.</td> 118 </tr> 119 <tr> 120 <td width="100"> 121<span class="protected_style" title="protected">protected</span> </td> 122 <th> 123<span class="argument">m_SwizzleCount</span> 124 </th> 125<td>The number of swizzle patterns. Type is <CODE>u32</CODE>.</td> 126 </tr> 127 <tr> 128 <td width="100"> 129<span class="protected_style" title="protected">protected</span> </td> 130 <th> 131<span class="argument">m_DrawMode</span> 132 </th> 133<td>Indicates the rendering mode. The default is <CODE>PICA_DATA_DRAW_TRIANGLES</CODE>. Its type is <a href="../../../../nn_gx_CTR_Pica/PicaDataDrawMode.html"><CODE>PicaDataDrawMode</CODE></a>.</td> 134 </tr> 135 <tr> 136 <td width="100"> 137<span class="protected_style" title="protected">protected</span> </td> 138 <th> 139<span class="argument">m_VtxShaderBoolMapUniform</span> 140 </th> 141<td>A vertex shader Boolean map to be made uniform. The type is <CODE>bit32</CODE>.</td> 142 </tr> 143 <tr> 144 <td width="100"> 145<span class="protected_style" title="protected">protected</span> </td> 146 <th> 147<span class="argument">m_GeoShaderBoolMapUniform</span> 148 </th> 149<td>A geometry shader Boolean map to be made uniform. The type is <CODE>bit32</CODE>.</td> 150 </tr> 151 <tr> 152 <td width="100"> 153<span class="protected_style" title="protected">protected</span> </td> 154 <th> 155<span class="argument">m_CmdCacheOutAttr</span> 156 </th> 157<td>The command cache for output attributes. Its type is <CODE>bit32[]</CODE>.</td> 158 </tr> 159 <tr> 160 <td width="100"> 161<span class="protected_style" title="protected">protected</span> </td> 162 <th> 163<span class="argument">m_CmdCacheOutAttrNum</span> 164 </th> 165<td>The number of commands for output attributes. Type is <CODE>u32</CODE>.</td> 166 </tr> 167 <tr> 168 <td width="100"> 169<span class="protected_style" title="protected">protected</span> </td> 170 <th> 171<span class="argument">m_CmdCacheVtxConst</span> 172 </th> 173<td>The command cache for the vertex shader's constant registers. Its type is <CODE>bit32[]</CODE>.</td> 174 </tr> 175 <tr> 176 <td width="100"> 177<span class="protected_style" title="protected">protected</span> </td> 178 <th> 179<span class="argument">m_CmdCacheVtxConstNum</span> 180 </th> 181<td>The number of commands for the vertex shader's constant registers. Type is <CODE>u32</CODE>.</td> 182 </tr> 183 <tr> 184 <td width="100"> 185<span class="protected_style" title="protected">protected</span> </td> 186 <th> 187<span class="argument">m_CmdCacheGeoConst</span> 188 </th> 189<td>The command cache for the geometry shader's constant registers. Its type is <CODE>bit32[]</CODE>.</td> 190 </tr> 191 <tr> 192 <td width="100"> 193<span class="protected_style" title="protected">protected</span> </td> 194 <th> 195<span class="argument">m_CmdCacheGeoConstNum</span> 196 </th> 197<td>The number of commands for the geometry shader's constant registers. Type is <CODE>u32</CODE>.</td> 198 </tr> </table> 199 </div> 200 </a> <a name="function" id="function"> 201<h2>Member Functions</h2> 202 <div class="section"> 203 <table class="members"> 204 <tr> 205 <td width="100"> </td> 206 <th> 207<a href="../../../../nn/gr/CTR/Shader/Shader.html"><CODE>Shader</CODE></a> 208 </th> 209<td>A constructor that initializes shader binary settings.</td> 210 </tr> 211 <tr> 212 <td width="100"> </td> 213 <th> 214<a href="../../../../nn/gr/CTR/Shader/SetupBinary.html"><CODE>SetupBinary</CODE></a> 215 </th> 216<td>Sets up information used for generating commands based on the shader binary. Note: The binary is not copied. Do not destroy the binary until the command is generated. An ASSERT results if the specified index is not a valid shader. For more information about the index to be specified, see the MAP file generated at link time by <CODE>ctr_VertexShaderLinker32.exe</CODE>. Geometry shaders can be disabled by specifying -1 for <CODE>geo_shader_index</CODE>.</td> 217 </tr> 218 <tr> 219 <td width="100"> </td> 220 <th> 221<a href="../../../../nn/gr/CTR/Shader/SetUniformBool.html"><CODE>SetUniformBool</CODE></a> 222 </th> 223<td>Sets a boolean register value for the vertex shader.</td> 224 </tr> 225 <tr> 226 <td width="100"> </td> 227 <th> 228<a href="../../../../nn/gr/CTR/Shader/SetDrawMode.html"><CODE>SetDrawMode</CODE></a> 229 </th> 230<td>Sets the draw mode. The default is <CODE>PICA_DATA_DRAW_TRIANGLES</CODE>.</td> 231 </tr> 232 <tr> 233 <td width="100"> </td> 234 <th> 235<a href="../../../../nn/gr/CTR/Shader/MakeFullCommand.html"><CODE>MakeFullCommand</CODE></a> 236 </th> 237<td>Generates all commands required for switching shaders. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 238 </tr> 239 <tr> 240 <td width="100"> </td> 241 <th> 242<a href="../../../../nn/gr/CTR/Shader/MakeVtxBoolMapCommand.html"><CODE>MakeVtxBoolMapCommand</CODE></a> 243 </th> 244<td>Generates a command for setting a value into the vertex shader boolean register. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 245 </tr> 246 <tr> 247 <td width="100"> </td> 248 <th> 249<a href="../../../../nn/gr/CTR/Shader/MakeGeoBoolMapCommand.html"><CODE>MakeGeoBoolMapCommand</CODE></a> 250 </th> 251<td>Generates a command for setting a value into the geometry shader boolean register. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 252 </tr> 253 <tr> 254 <td width="100"> </td> 255 <th> 256<a href="../../../../nn/gr/CTR/Shader/MakePrepareCommand.html"><CODE>MakePrepareCommand</CODE></a> 257 </th> 258<td>Generates a command for setting the use of a geometry shader. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function. This includes dummy commands and commands for setting enable/disable that are required to enable/disable the geometry shader.</td> 259 </tr> 260 <tr> 261 <td width="100"> </td> 262 <th> 263<a href="../../../../nn/gr/CTR/Shader/MakeVtxProgramCommand.html"><CODE>MakeVtxProgramCommand</CODE></a> 264 </th> 265<td>Generates a program load command for vertex shaders. This includes the entry point address and executable code within the shader binary. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 266 </tr> 267 <tr> 268 <td width="100"> </td> 269 <th> 270<a href="../../../../nn/gr/CTR/Shader/MakeGeoProgramCommand.html"><CODE>MakeGeoProgramCommand</CODE></a> 271 </th> 272<td>Generates a program load command for geometry shaders. This includes the entry point address and executable code within the shader binary. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 273 </tr> 274 <tr> 275 <td width="100"> </td> 276 <th> 277<a href="../../../../nn/gr/CTR/Shader/MakeVtxSwizzleCommand.html"><CODE>MakeVtxSwizzleCommand</CODE></a> 278 </th> 279<td>Generates commands to load swizzle patterns for vertex shaders. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 280 </tr> 281 <tr> 282 <td width="100"> </td> 283 <th> 284<a href="../../../../nn/gr/CTR/Shader/MakeGeoSwizzleCommand.html"><CODE>MakeGeoSwizzleCommand</CODE></a> 285 </th> 286<td>Generates a command for swizzle pattern loading of geometry shaders. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 287 </tr> 288 <tr> 289 <td width="100"> </td> 290 <th> 291<a href="../../../../nn/gr/CTR/Shader/MakeVtxConstRgCommand.html"><CODE>MakeVtxConstRgCommand</CODE></a> 292 </th> 293<td>Generates commands for making constant registers uniform for vertex shaders. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 294 </tr> 295 <tr> 296 <td width="100"> </td> 297 <th> 298<a href="../../../../nn/gr/CTR/Shader/MakeGeoConstRgCommand.html"><CODE>MakeGeoConstRgCommand</CODE></a> 299 </th> 300<td>Generates constant register commands for geometry shaders. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 301 </tr> 302 <tr> 303 <td width="100"> </td> 304 <th> 305<a href="../../../../nn/gr/CTR/Shader/MakeOutAttrCommand.html"><CODE>MakeOutAttrCommand</CODE></a> 306 </th> 307<td>Generates a command for setting shader output attributes. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 308 </tr> 309 <tr> 310 <td width="100"> </td> 311 <th> 312<a href="../../../../nn/gr/CTR/Shader/SearchBindSymbol.html"><CODE>SearchBindSymbol</CODE></a> 313 </th> 314<td>Converts from symbol names to symbol information. Symbol type information and bound register numbers can be obtained by specifying the symbol name set by pragma_bind_symbol() in the shader code as an argument. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 315 </tr> 316 <tr> 317 <td width="100"> </td> 318 <th> 319<a href="../../../../nn/gr/CTR/Shader/SearchBindSymbolNum.html"><CODE>SearchBindSymbolNum</CODE></a> 320 </th> 321<td>Searches how many symbols there are of the specified type. Searches for how many symbols there are of the specified type among those set by pragma_bind_symbol in the shader code. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 322 </tr> 323 <tr> 324 <td width="100"> </td> 325 <th> 326<a href="../../../../nn/gr/CTR/Shader/GetShaderNum.html"><CODE>GetShaderNum</CODE></a> 327 </th> 328<td>Gets the number of executable shaders included in the shader binary.</td> 329 </tr> 330 <tr> 331 <td width="100"> </td> 332 <th> 333<a href="../../../../nn/gr/CTR/Shader/IsEnableGeoShader.html"><CODE>IsEnableGeoShader</CODE></a> 334 </th> 335<td>Gets whether geometry shaders are enabled.</td> 336 </tr> 337 <tr> 338 <td width="100"> </td> 339 <th> 340<a href="../../../../nn/gr/CTR/Shader/GetVtxShaderIndex.html"><CODE>GetVtxShaderIndex</CODE></a> 341 </th> 342<td>Gets the index of the enabled vertex shader.</td> 343 </tr> 344 <tr> 345 <td width="100"> </td> 346 <th> 347<a href="../../../../nn/gr/CTR/Shader/GetGeoShaderIndex.html"><CODE>GetGeoShaderIndex</CODE></a> 348 </th> 349<td>Gets the index of the enabled geometry shader.</td> 350 </tr> 351 <tr> 352 <td width="100"> </td> 353 <th> 354<a href="../../../../nn/gr/CTR/Shader/GetVtxShaderBoolMapUniform.html"><CODE>GetVtxShaderBoolMapUniform</CODE></a> 355 </th> 356<td>Gets the boolean map set for the vertex shader.</td> 357 </tr> 358 <tr> 359 <td width="100"> </td> 360 <th> 361<a href="../../../../nn/gr/CTR/Shader/GetGeoShaderBoolMap.html"><CODE>GetGeoShaderBoolMap</CODE></a> 362 </th> 363<td>Gets the boolean map set for the geometry shader.</td> 364 </tr> 365 <tr> 366 <td width="100"> 367<span class="static_style" title="static">S</span> </td> 368 <th> 369<a href="../../../../nn/gr/CTR/Shader/MakeDisableCommand.html"><CODE>MakeDisableCommand</CODE></a> 370 </th> 371<td>Generates commands to disable this feature.</td> 372 </tr> 373 <tr> 374 <td width="100"> 375<span class="protected_style" title="protected">protected</span> <span class="static_style" title="static">S</span> </td> 376 <th> 377<a href="../../../../nn/gr/CTR/Shader/MakeShaderModeCommand_.html"><CODE>MakeShaderModeCommand_</CODE></a> 378 </th> 379<td>Generates the commands that are required to enable or disable the geometry shader: dummy commands and enable/disable setting commands.</td> 380 </tr> 381 <tr> 382 <td width="100"> 383<span class="protected_style" title="protected">protected</span> <span class="static_style" title="static">S</span> </td> 384 <th> 385<a href="../../../../nn/gr/CTR/Shader/MakeDummyCommand_.html"><CODE>MakeDummyCommand_</CODE></a> 386 </th> 387<td>Generates commands to send dummy commands to a specified register.</td> 388 </tr> 389 <tr> 390 <td width="100"> 391<span class="protected_style" title="protected">protected</span> </td> 392 <th> 393<a href="../../../../nn/gr/CTR/Shader/MakeConstRgCommand_.html"><CODE>MakeConstRgCommand_</CODE></a> 394 </th> 395<td>Generates commands for making constant registers uniform. Call this function after you have configured the shader binary with the <CODE>SetupBinary</CODE> function.</td> 396 </tr> 397 <tr> 398 <td width="100"> 399<span class="protected_style" title="protected">protected</span> </td> 400 <th> 401<a href="../../../../nn/gr/CTR/Shader/MakeOutAttrCommand_.html"><CODE>MakeOutAttrCommand_</CODE></a> 402 </th> 403<td>Generates a command for setting shader output attributes.</td> 404 </tr> 405 <tr> 406 <td width="100"> 407<span class="protected_style" title="protected">protected</span> </td> 408 <th> 409<a href="../../../../nn/gr/CTR/Shader/MakeLoadCommand_.html"><CODE>MakeLoadCommand_</CODE></a> 410 </th> 411<td>Generates commands to send a set of data to a specified register. This does not support SEQ and BE.</td> 412 </tr> </table> 413 </div> 414 </a> 415<h2>Revision History</h2> 416 <div class="section"> 417 <dl class="history"> 418 <dt>2010/09/15</dt> 419<dd>Initial version.<br /> 420 </dd> 421 </dl> 422 </div> 423 <hr><p>CONFIDENTIAL</p></body> 424</html> 425