libctru  v2.4.0
Data Structures | Enumerations | Functions
shbin.h File Reference

Shader binary support. More...

#include <3ds/gpu/gpu.h>

Go to the source code of this file.

Data Structures

struct  DVLP_s
 DVLP data. More...
 
struct  DVLE_constEntry_s
 DVLE constant entry data. More...
 
struct  DVLE_outEntry_s
 DVLE output entry data. More...
 
struct  DVLE_uniformEntry_s
 DVLE uniform entry data. More...
 
struct  DVLE_s
 DVLE data. More...
 
struct  DVLB_s
 DVLB data. More...
 

Enumerations

enum  DVLE_type {
  VERTEX_SHDR =GPU_VERTEX_SHADER ,
  GEOMETRY_SHDR =GPU_GEOMETRY_SHADER
}
 DVLE type. More...
 
enum  DVLE_constantType {
  DVLE_CONST_BOOL =0x0 ,
  DVLE_CONST_u8 =0x1 ,
  DVLE_CONST_FLOAT24 =0x2
}
 Constant type. More...
 
enum  DVLE_outputAttribute_t {
  RESULT_POSITION = 0x0 ,
  RESULT_NORMALQUAT = 0x1 ,
  RESULT_COLOR = 0x2 ,
  RESULT_TEXCOORD0 = 0x3 ,
  RESULT_TEXCOORD0W = 0x4 ,
  RESULT_TEXCOORD1 = 0x5 ,
  RESULT_TEXCOORD2 = 0x6 ,
  RESULT_VIEW = 0x8 ,
  RESULT_DUMMY = 0x9
}
 Output attribute. More...
 
enum  DVLE_geoShaderMode {
  GSH_POINT = 0 ,
  GSH_VARIABLE_PRIM = 1 ,
  GSH_FIXED_PRIM = 2
}
 Geometry shader operation modes. More...
 

Functions

DVLB_sDVLB_ParseFile (u32 *shbinData, u32 shbinSize)
 Parses a shader binary. More...
 
void DVLB_Free (DVLB_s *dvlb)
 Frees shader binary data. More...
 
s8 DVLE_GetUniformRegister (DVLE_s *dvle, const char *name)
 Gets a uniform register index from a shader. More...
 
void DVLE_GenerateOutmap (DVLE_s *dvle)
 Generates a shader output map. More...
 

Detailed Description

Shader binary support.

Enumeration Type Documentation

◆ DVLE_constantType

Constant type.

Enumerator
DVLE_CONST_BOOL 

Bool.

DVLE_CONST_u8 

Unsigned 8-bit integer.

DVLE_CONST_FLOAT24 

24-bit float.

◆ DVLE_geoShaderMode

Geometry shader operation modes.

Enumerator
GSH_POINT 

Point processing mode.

GSH_VARIABLE_PRIM 

Variable-size primitive processing mode.

GSH_FIXED_PRIM 

Fixed-size primitive processing mode.

◆ DVLE_outputAttribute_t

Output attribute.

Enumerator
RESULT_POSITION 

Position.

RESULT_NORMALQUAT 

Normal Quaternion.

RESULT_COLOR 

Color.

RESULT_TEXCOORD0 

Texture coordinate 0.

RESULT_TEXCOORD0W 

Texture coordinate 0 W.

RESULT_TEXCOORD1 

Texture coordinate 1.

RESULT_TEXCOORD2 

Texture coordinate 2.

RESULT_VIEW 

View.

RESULT_DUMMY 

Dummy attribute (used as passthrough for geometry shader input).

◆ DVLE_type

enum DVLE_type

DVLE type.

Enumerator
VERTEX_SHDR 

Vertex shader.

GEOMETRY_SHDR 

Geometry shader.

Function Documentation

◆ DVLB_Free()

void DVLB_Free ( DVLB_s dvlb)

◆ DVLB_ParseFile()

DVLB_s* DVLB_ParseFile ( u32 shbinData,
u32  shbinSize 
)

◆ DVLE_GenerateOutmap()

void DVLE_GenerateOutmap ( DVLE_s dvle)

Generates a shader output map.

Parameters
dvleShader to generate an output map for.

◆ DVLE_GetUniformRegister()

s8 DVLE_GetUniformRegister ( DVLE_s dvle,
const char *  name 
)

Gets a uniform register index from a shader.

Parameters
dvleShader to get the register from.
nameName of the register.
Returns
The uniform register index.