Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

objects.c File Reference

#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "re.h"
#include <GL/gl.h>
#include "nv_hw.h"
#include "nv_objects.h"
#include "objects.h"

Include dependency graph for objects.c:


Data Structures

struct  obj_s
struct  _dmarec

Defines

#define message(fmt,)   printf(fmt "\n", ##__VA_ARGS__)
#define INSTANCE_MEM(i)   all_regs[(NV_PRAMIN + (instanceMem << 4) + i * 4)/4]
#define N_(name)   name, # name
 create a, "a" from the macro name a
#define __(name)   name, 1, 1, # name
 define a single element
#define A_(name)   name(0), name ## __SIZE, (name (name ## __SIZE) - name(0))/name ## __SIZE , # name "(%d)"
#define PRINT_BITFIELD(bf, func, data, name)   {0?bf, 1?bf, func, data, name}
 Interpret data as a bitfield.
#define PRINT_FP32   {0, 31, &print_float, NULL, NULL}
 Print parameter as float.
#define PRINT_X32   {0, 31, &print_format, "0x%08x", NULL}
 32 Bit Hex
#define PRINT_UINT   {0, 31, &print_format, "%u", NULL}
 parameter is unsigned int
#define PRINT_MACRO(data)   {0, 31, &print_macro, data, NULL}
#define PRINT_MACRO16(data)   {0, 31, &print_macro16, data, NULL}
#define PRINT_FUNC(func)   {0, 31, &func, NULL, NULL}
#define PRINT_ENABLE_BIT(bit, name)   {bit, bit, &print_enable, name, NULL}
#define PRINT_OBJECT   {0, 31, &print_object, NULL, NULL}
#define NV04_TEXTURE_FORMAT
#define NV04_TEXTURE_FILTER
#define NV04_TRIANGLE_BLEND
#define NV04_TRIANGLE_CONTROL
#define NV04_MULTITEX_COMBINE_UNIT(a)
#define NV10_TCL_PRIMITIVE_3D_TX_UNIT(n)
#define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE(n)
#define NV10_TCL_PRIMITIVE_3D_LIGHT(n)
#define NV20_TCL_PRIMITIVE_3D_CLIP_PLANE(n)
#define NV20_TCL_PRIMITIVE_3D_TX_UNIT(n)
#define NV20_TCL_PRIMITIVE_3D_RC_UNIT(n)
#define NV20_TCL_PRIMITIVE_3D_LIGHT(n)
#define NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_R(n)   {__(NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ROW(n)), {PRINT_X32, {}} },
#define NV20_TCL_TX_UNIT(n)
#define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE(n)
#define NV30_TCL_PRIMITIVE_3D_LIGHT(n)
#define NV30_TCL_VTX_ATTR(n)
#define NV30_TCL_TX_UNIT(n)
#define MAX_DMARECS   100

Typedefs

typedef obj_s obj_t
typedef _dmarec dmarec

Functions

const char * print_format (unsigned int value, void *format)
const char * print_float (unsigned int value, void *format)
const char * print_macro (unsigned int value, void *data)
const char * print_macro16 (unsigned int value, void *data)
const char * print_object (unsigned int value, void *data)
const char * print_enable (unsigned int value, void *data)
const char * print_class (unsigned int value, void *data)
const char * print_clip_planes (unsigned int value, void *data)
 Print out, which clipping planes are active.
const char * print_store (unsigned int value, void *data)
const char * print_query (unsigned int value, void *data)
static int format_data (char *buf, int len, const data_print_store *dp, unsigned int value)
const char * nv30_tx_swizzle_print (unsigned int value, void *data)
void object_create (unsigned int parent, unsigned int name, unsigned int type)
unsigned int get_object_type (unsigned int name)
static unsigned int find_object_instance (unsigned int name)
unsigned int find_object_type (unsigned int name)
char * format_load (int object_type, int offset, unsigned int value)
const char * record_offset_in (unsigned int value, void *data)
const char * record_offset_out (unsigned int value, void *data)
const char * record_length_in (unsigned int value, void *data)
const char * record_dma_op (unsigned int value, void *data)
unsigned int find_dma_src_from_dest (unsigned int to)
void clean_dmarecs ()

Variables

static const object_store nv_objects []
static data_store begin_end_data []
 stores all parameter for NV30_TCL_PRIMITIVE_3D_BEGIN_END
static data_store bool_data []
static data_store gl_data []
static data_store gl_logic_op []
static data_store nv10_prim_2d []
static data_store nv10_rc_mapping []
static data_store nv10_rc_cu_alpha []
static data_store nv10_rc_cu_rgb []
static data_store nv10_rc_input []
static data_store nv10_rc_scale []
static data_store nv10_rc_bias []
static data_store nv10_tx_format []
static data_store nv10_fog_mode []
static data_store nv10_fog_coord_dist []
static data_store nv10_light_model_color_control []
static data_store vertex_data_type []
static data_store nv10_tx_anisotropy []
static data_store nv20_point_sprite_r_mode []
static data_store nv40_tx_anisotropy []
static data_store nv30_tx_type []
static data_store nv30_tx_format []
static data_store nv30_tx_wrap []
static data_store nv30_tx_filter []
static data_store nv04_image_pattern_format []
static data_store nv04_image_pattern_shape []
static data_store nv04_image_pattern_select []
static data_store nv04_surface_format []
static data_store nv04_context_surfaces_3d_cmft []
static data_store nv04_context_surfaces_3d_type []
static data_store nv04_dx5_func []
static data_store nv04_dx5_bfunc []
static data_store nv04_dx5_shademode []
static data_store nv05_image_from_cpu_format []
static data_store nv04_dx5_wrap []
static data_store nv04_dx5_tx_color []
static data_store nv04_dx5_textureblend []
static data_store nv04_multitex_alpha []
static data_store nv04_multitex_color []
static data_store nv04_multitex_arg []
static data_store nv04_multitex_operation []
static data_store nv04_scaled_image_from_memory_format []
static data_store nv04_operations []
static data_store nv04_gdi_rectangle_text_format []
static data_store nv05_scaled_image_from_memory_conversion []
static data_store nv_dac_format []
static data_store nv04_dx5_cullmode []
static data_store nv04_stencilop []
static data_store nv_mono_format []
static data_store nv_context_color_format []
static data_store nv20_tx_shader_op []
static data_store nv20_tx_shader_cull_mode []
static obj_tmt_object_list = NULL
static data_store dither_str []
static data_store dma_access []
static data_store dma_target []
static const object_store nv3_imem []
static dmarec dmarecs [MAX_DMARECS]
static int next_rec = 0
static unsigned int cur_offset_in
static unsigned int cur_offset_out
static unsigned int cur_length_in

Define Documentation

#define INSTANCE_MEM  )     all_regs[(NV_PRAMIN + (instanceMem << 4) + i * 4)/4]
 

#define MAX_DMARECS   100
 

#define message fmt   )     printf(fmt "\n", ##__VA_ARGS__)
 

#define NV04_MULTITEX_COMBINE_UNIT  ) 
 

Value:

PRINT_BITFIELD(31:29, print_macro, nv04_multitex_operation, NULL),  \
        PRINT_BITFIELD(1:0, print_macro, nv04_multitex_ ## a, NULL),    \
        PRINT_BITFIELD(4:2, print_macro, nv04_multitex_arg, "arg0"),    \
        PRINT_BITFIELD(9:8, print_macro, nv04_multitex_ ## a, NULL),    \
        PRINT_BITFIELD(12:10, print_macro, nv04_multitex_arg, "arg1"),  \
        PRINT_BITFIELD(17:16, print_macro, nv04_multitex_ ## a, NULL),  \
        PRINT_BITFIELD(20:18, print_macro, nv04_multitex_arg, "arg2"),  \
        PRINT_BITFIELD(25:24, print_macro, nv04_multitex_ ## a, NULL),  \
        PRINT_BITFIELD(28:26, print_macro, nv04_multitex_arg, "arg3"),  \
        {}

#define NV04_TEXTURE_FILTER
 

Value:

#define NV04_TEXTURE_FORMAT
 

Value:

#define NV04_TRIANGLE_BLEND
 

Value:

#define NV04_TRIANGLE_CONTROL
 

Value:

#define NV10_TCL_PRIMITIVE_3D_CLIP_PLANE  ) 
 

Value:

#define NV10_TCL_PRIMITIVE_3D_LIGHT  ) 
 

Value:

#define NV10_TCL_PRIMITIVE_3D_TX_UNIT  ) 
 

#define NV20_TCL_PRIMITIVE_3D_CLIP_PLANE  ) 
 

Value:

#define NV20_TCL_PRIMITIVE_3D_LIGHT  ) 
 

Value:

{__(NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(n)),             {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(n)),             {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(n)),             {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_HVEC_AND_DIR(n)),           {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(n)),   {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(n)),   {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_C(n)),   {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(n)),   {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(n)),   {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_C(n)),   {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(n)),  {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(n)),  {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_C(n)),  {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_BACK_SIDE_PRODUCT_AMBIENT(n)),      {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_BACK_SIDE_PRODUCT_DIFFUSE(n)),      {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_BACK_SIDE_PRODUCT_SPECULAR(n)),     {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(n)),       {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(n)),         {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(n)),      {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(n)),          {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(n)),          {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(n)),          {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(n)),             {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Y(n)),             {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Z(n)),             {PRINT_FP32,    {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(n)),          {PRINT_FP32,    {}} },

#define NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_R  )     {__(NV20_TCL_PRIMITIVE_3D_POLYGON_STIPPLE_ROW(n)), {PRINT_X32, {}} },
 

#define NV20_TCL_PRIMITIVE_3D_RC_UNIT  ) 
 

#define NV20_TCL_PRIMITIVE_3D_TX_UNIT  ) 
 

Value:

{__(NV20_TCL_PRIMITIVE_3D_TX_OFFSET(n)),    {PRINT_X32, {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_TX_FORMAT(n)),    {   \
            PRINT_BITFIELD(27:24, print_format, "%d", "log2(height)"),  \
            PRINT_BITFIELD(23:20, print_format, "%d", "log2(width)"),   \
            PRINT_BITFIELD(19:16, print_format, "%d", "lod"),       \
            PRINT_BITFIELD(15:8, print_macro, nv10_tx_format, "format"),    \
            PRINT_BITFIELD(2:2, print_macro, bool_data, "cube_map"),    \
            {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_TX_ENABLE(n)),    {   \
            PRINT_BITFIELD(30:30, print_macro, bool_data, "enable"),    \
            PRINT_BITFIELD(5:4, print_macro, nv10_tx_anisotropy, "anisotropy"), \
            {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_TX_NPOT_PITCH(n)),    {   \
            PRINT_BITFIELD(31:16, print_macro, "%d", "pitch"),      \
            {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_TX_FILTER(n)),    {   \
            PRINT_BITFIELD(31:24, print_macro, nv30_tx_filter, "mag_filter"),   \
            PRINT_BITFIELD(23:16, print_macro, nv30_tx_filter, "min_filter"),   \
            {}} },  \
        {__(NV20_TCL_PRIMITIVE_3D_TX_NPOT_SIZE(n)), {   \
            PRINT_BITFIELD(31:16, print_macro, "%d", "width"),  \
            PRINT_BITFIELD(15:0, print_macro, "%d", "height"),  \
            {}} },

#define NV20_TCL_TX_UNIT  ) 
 

Value:

{__(NV20_TCL_PRIMITIVE_3D_TX_ADDRESS_UNIT(n)), {PRINT_X32, {}} }, \
        {__(NV20_TCL_PRIMITIVE_3D_TX_FORMAT_UNIT(n)), { \
            PRINT_BITFIELD(NV20_TCL_PRIMITIVE_3D_TX_FORMAT_MIPMAP_COUNT, print_format, "%d", "mipmap"), \
            PRINT_BITFIELD(NV20_TCL_PRIMITIVE_3D_TX_FORMAT_TYPE, print_macro, nv30_tx_type, "type"), \
            PRINT_BITFIELD(NV20_TCL_PRIMITIVE_3D_TX_FORMAT_FORMAT, print_macro, nv30_tx_format, "format"), \
            PRINT_BITFIELD(NV20_TCL_PRIMITIVE_3D_TX_FORMAT_NCOMP, print_format, "%d", "ncomp"), \
            PRINT_BITFIELD(NV20_TCL_PRIMITIVE_3D_TX_FORMAT_CUBIC, print_macro, bool_data, "cubic"), \
                                            {}} }, \
        {__(NV20_TCL_PRIMITIVE_3D_TX_WRAP_UNIT(n)), { \
            PRINT_BITFIELD(NV20_TCL_PRIMITIVE_3D_TX_WRAP_S, print_macro, nv30_tx_wrap, "wrap_s"),   \
            PRINT_BITFIELD(NV20_TCL_PRIMITIVE_3D_TX_WRAP_T, print_macro, nv30_tx_wrap, "wrap_t"),   \
            PRINT_BITFIELD(NV20_TCL_PRIMITIVE_3D_TX_WRAP_R, print_macro, nv30_tx_wrap, "wrap_r"),   \
                                            {}} }, \
        {__(NV20_TCL_PRIMITIVE_3D_TX_UNK03_UNIT(n)), {      {}} }, \
        {__(NV20_TCL_PRIMITIVE_3D_TX_SWIZZLE_UNIT(n)), {PRINT_FUNC(nv30_tx_swizzle_print), {}} }, \
        {__(NV20_TCL_PRIMITIVE_3D_TX_FILTER_UNIT(n)), { \
            PRINT_BITFIELD(NV20_TCL_PRIMITIVE_3D_TX_FILTER_MIN, print_macro, nv30_tx_filter, "filter_min"), \
            PRINT_BITFIELD(NV20_TCL_PRIMITIVE_3D_TX_FILTER_MAG, print_macro, nv30_tx_filter, "filter_mag"), \
                                            {}} }, \
        {__(NV20_TCL_PRIMITIVE_3D_TX_XY_DIM_UNIT(n)), { \
            PRINT_BITFIELD(31:16, print_format, "%d", "width"), \
            PRINT_BITFIELD(15:0, print_format, "%d", "height"), \
                                            {}} }, \
        {__(NV20_TCL_PRIMITIVE_3D_TX_UNK07_UNIT(n)), {      {}} }, \
        {__(NV20_TCL_PRIMITIVE_3D_TX_DEPTH_UNIT(n)), {  \
            PRINT_BITFIELD(31:20, print_format, "%d", "depth"), \
            PRINT_BITFIELD(7:7, print_macro, bool_data, "height"),  \
                                            {}} },

#define NV30_TCL_PRIMITIVE_3D_CLIP_PLANE  ) 
 

Value:

#define NV30_TCL_PRIMITIVE_3D_LIGHT  ) 
 

Value:

{__(NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_A(n)),   {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_B(n)),   {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_AMBIENT_C(n)),   {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_A(n)),   {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_B(n)),   {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_DIFFUSE_C(n)),   {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_A(n)),  {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_B(n)),  {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_FRONT_SIDE_PRODUCT_SPECULAR_C(n)),  {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_CONSTANT_ATTENUATION(n)),       {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_LINEAR_ATTENUATION(n)),         {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_QUADRATIC_ATTENUATION(n)),      {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_A(n)),          {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_EXPONENT(n)),          {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_B(n)),          {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_X(n)),             {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Y(n)),             {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_DIR_Z(n)),             {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_SPOT_CUTOFF_C(n)),          {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_X(n)),             {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_Y(n)),             {PRINT_FP32,    {}} },  \
        {__(NV30_TCL_PRIMITIVE_3D_LIGHT_POSITION_Z(n)),             {PRINT_FP32,    {}} },

#define NV30_TCL_TX_UNIT  ) 
 

#define NV30_TCL_VTX_ATTR  ) 
 

Value:


Typedef Documentation

typedef struct _dmarec dmarec
 

typedef struct obj_s obj_t
 


Function Documentation

void clean_dmarecs  ) 
 

unsigned int find_dma_src_from_dest unsigned int  to  ) 
 

static unsigned int find_object_instance unsigned int  name  )  [static]
 

unsigned int find_object_type unsigned int  name  ) 
 

static int format_data char *  buf,
int  len,
const data_print_store dp,
unsigned int  value
[static]
 

char* format_load int  object_type,
int  offset,
unsigned int  value
 

unsigned int get_object_type unsigned int  name  ) 
 

const char* nv30_tx_swizzle_print unsigned int  value,
void *  data
 

void object_create unsigned int  parent,
unsigned int  name,
unsigned int  type
 

\]

const char* print_class unsigned int  value,
void *  data
 

const char * print_clip_planes unsigned int  value,
void *  data
 

Print out, which clipping planes are active.

See NV30_TCL_PRIMITIVE_3D_SET_CLIPPING_PLANES for some more infos

const char* print_enable unsigned int  value,
void *  data
 

const char* print_float unsigned int  value,
void *  format
 

const char* print_format unsigned int  value,
void *  format
 

const char* print_macro unsigned int  value,
void *  data
 

const char* print_macro16 unsigned int  value,
void *  data
 

const char* print_object unsigned int  value,
void *  data
 

const char* print_query unsigned int  value,
void *  data
 

const char* print_store unsigned int  value,
void *  data
 

const char* record_dma_op unsigned int  value,
void *  data
 

const char* record_length_in unsigned int  value,
void *  data
 

const char* record_offset_in unsigned int  value,
void *  data
 

const char* record_offset_out unsigned int  value,
void *  data
 


Variable Documentation

begin_end_data [static]
 

Initial value:

 {
    { N_(STOP)              },    
    { N_(POINTS)            },    
    { N_(LINES)             },    
    { N_(LINE_LOOP)         },    
    { N_(LINE_STRIP)            },    
    { N_(TRIANGLES)         },    
    { N_(TRIANGLE_STRIP)        },
    { N_(TRIANGLE_FAN)          },
    { N_(QUADS)             },    
    { N_(QUAD_STRIP)            },
    { N_(POLYGON)           },    
    {}
}
stores all parameter for NV30_TCL_PRIMITIVE_3D_BEGIN_END

After NV30_TCL_PRIMITIVE_3D_BEGIN_END you will see the values for the primitive after a NV30_TCL_PRIMITIVE_3D_VERTEX_DATA command. If the creation is finished, NV30_TCL_PRIMITIVE_3D_BEGIN_END with a STOP will be issued.

data_store bool_data[] [static]
 

Initial value:

 {
    { N_(TRUE)              },
    { N_(FALSE)             },
    {}
}

unsigned int cur_length_in [static]
 

unsigned int cur_offset_in [static]
 

unsigned int cur_offset_out [static]
 

data_store dither_str[] [static]
 

Initial value:

 {
    { 0, "compat"   },
    { 1, "dither"   },
    { 2, "truncate" },
    { 3, "subtract_truncate" },
    {}
}

data_store dma_access[] [static]
 

Initial value:

 {
    { 0, "rw"       },
    { 1, "ro"       },
    { 2, "wo"       },
    {}
}

data_store dma_target[] [static]
 

Initial value:

 {
    { 0, "NV mem"       },
    { 1, "NV mem tiled" },
    { 2, "PCI"      },
    { 3, "AGP"      },
    {}
}

dmarec dmarecs[MAX_DMARECS] [static]
 

data_store gl_data[] [static]
 

data_store gl_logic_op[] [static]
 

Initial value:

 {
    { 0x00, "CLEAR"     },
    { 0x01, "NOR"       },
    { 0x02, "AND_INVERTED"  },
    { 0x03, "COPY_INVERTED" },
    { 0x04, "AND_REVERSE"   },
    { 0x05, "INVERT"        },
    { 0x06, "XOR"       },
    { 0x07, "NAND"      },
    { 0x08, "AND"       },
    { 0x09, "EQUIV"     },
    { 0x0a, "NOOP"      }, 
    { 0x0b, "OR_INVERTED"   },
    { 0x0c, "COPY"      },
    { 0x0d, "OR_REVERSE"    },
    { 0x0e, "OR"        },
    { 0x0f, "SET"       },
    {}
}

obj_t* mt_object_list = NULL [static]
 

int next_rec = 0 [static]
 

data_store nv04_context_surfaces_3d_cmft[] [static]
 

Initial value:

 {
    { 0x01, "X1R5G5B5_Z1R5G5B5" },
    { 0x02, "X1R5G5B5_O1R5G5B5" },
    { 0x03, "R5G6B5"        },
    { 0x04, "X8R8G8B8_Z8R8G8B8" },
    { 0x05, "X8R8G8B8_O8R8G8B8" },
    { 0x06, "X1A7R8G8B8_Z1A7R8G8B8" },
    { 0x07, "X1A7R8G8B8_O1A7R8G8B8" },
    { 0x08, "A8R8G8B8"      },
    {}
}

data_store nv04_context_surfaces_3d_type[] [static]
 

Initial value:

 {
    { 1, "pitch"            },
    { 2, "swizzle"          },
    {}
}

data_store nv04_dx5_bfunc[] [static]
 

Initial value:

 {
    { 0x01, "0"         },
    { 0x02, "1"         },
    { 0x03, "src_col"       },
    { 0x04, "1-src_col"     },
    { 0x05, "src_a"         },
    { 0x06, "1-src_a"       },
    { 0x09, "dst_col"       },
    { 0x0a, "1-dst_col"     },
    {}
}

data_store nv04_dx5_cullmode[] [static]
 

Initial value:

 {
    { 0x01, "NONE"  },
    { 0x02, "CW"    },
    { 0x03, "CCW"   },
    {}
}

data_store nv04_dx5_func[] [static]
 

Initial value:

 {
    { 0x01, "NEVER"         },
    { 0x02, "LESS"          },
    { 0x03, "EQUAL"         },
    { 0x04, "LEQUAL"        },
    { 0x05, "GREATER"       },
    { 0x06, "NOTEQUAL"      },
    { 0x07, "GEQUAL"        },
    { 0x08, "ALWAYS"        },
    {}
}

data_store nv04_dx5_shademode[] [static]
 

Initial value:

 {
    { 0x01, "FLAT"      },
    { 0x02, "SMOOTH"    },
    {}
}

data_store nv04_dx5_textureblend[] [static]
 

Initial value:

 {
                       
                       
    { 0x01, "DECAL"         }, 
    { 0x02, "MODULATE"      }, 
    { 0x03, "DECAL_ALPHA"       }, 
    { 0x04, "MODULATE_ALPHA"    }, 
    { 0x05, "DECAL_MASK"        }, 
    { 0x06, "MODULATE_MASK"     },
    { 0x07, "COPY"          },
    { 0x08, "ADD"           }, 
    {}
}

data_store nv04_dx5_tx_color[] [static]
 

Initial value:

 {
    { 0x01, "Y8"        },
    { 0x02, "A1R5G5B5"  },
    { 0x03, "X1R5G5B5"  },
    { 0x04, "A4R4G4B4"  },
    { 0x05, "R5G6B5"    },
    { 0x06, "A8R8G8B8"  },
    { 0x07, "X8R8G8B8"  },
    {}
}

data_store nv04_dx5_wrap[] [static]
 

Initial value:

 {
    { 0x01, "REPEAT"    },
    { 0x02, "MIRRORED"  },
    { 0x03, "CLAMP"     },
    {}
}

data_store nv04_gdi_rectangle_text_format[] [static]
 

Initial value:

 {
    { 0x01, "X16R5G6B5" },
    { 0x02, "X17R5G5B5" },
    { 0x03, "X8R8G8B8"  },
    {}
}

data_store nv04_image_pattern_format[] [static]
 

Initial value:

 {
    { 1,    "A16R5G6B5"     },
    { 2,    "X16A1R5G5B5"       },
    { 3,    "A8R8G8B8"      },
    {}
}

data_store nv04_image_pattern_select[] [static]
 

Initial value:

 {
    { 0x01, "MONOCHROME"    },
    { 0x02, "COLOR"     },
    {}
}

data_store nv04_image_pattern_shape[] [static]
 

Initial value:

 {
    { 0, "8x8"  },
    { 1, "64x1" },
    { 2, "1x64" },
    {}
}

data_store nv04_multitex_alpha[] [static]
 

Initial value:

 {
    { 0x00, "a" },
    { 0x01, "1-a"   },
    
    {}
}

data_store nv04_multitex_arg[] [static]
 

Initial value:

 {
    { 0x01, "ZERO"      },
    { 0x02, "FACTOR"    },  
    { 0x03, "PRIMARY_COLOR" },
    { 0x04, "PREVIOUS"  },
    { 0x05, "TEXTURE0"  },
    { 0x06, "TEXTURE1"  },
    { 0x07, "TEXTURELOD"    },  
    {}
}

data_store nv04_multitex_color[] [static]
 

Initial value:

 {
    { 0x00, "c" },
    { 0x01, "1-c"   },
    { 0x02, "a" },
    { 0x03, "1-a"   },
    {}
}

data_store nv04_multitex_operation[] [static]
 

Initial value:

 {
    { 0x01, "ADD"       },  
    { 0x02, "ADD2"      },
    { 0x03, "ADD4"      },
    { 0x04, "ADDSIGNED" },
    { 0x05, "MUX"       },  
    { 0x06, "ADDCOMPLEMENT" },  
    { 0x07, "ADDSIGNED2"    },
    {}
}

data_store nv04_operations[] [static]
 

Initial value:

 {
    { 0x0, "SRCCOPY_AND"    },
    { 0x1, "ROP_AND"    },
    { 0x2, "BLEND_AND"  },
    { 0x3, "SRCCOPY"    },
    { 0x4, "SRCCOPY_PREMULT"},
    { 0x5, "BLEND_PREMULT"  },
    {}
}

data_store nv04_scaled_image_from_memory_format[] [static]
 

Initial value:

 {
    { 0x01, "A1R5G5B5"      },
    { 0x02, "X1R5G5B5"      },
    { 0x03, "A8R8G8B8"      },
    { 0x04, "X8R8G8B8"      },
    { 0x05, "V8YB8U8YA8"        },
    { 0x06, "YB8V8YA8U8"        },
    { 0x07, "R5G6B5"        },
    {}
}

data_store nv04_stencilop[] [static]
 

Initial value:

 {
    { 0x01, "KEEP"      },
    { 0x02, "ZERO"      },
    { 0x03, "REPLACE"   },
    { 0x04, "INCR"      },
    { 0x05, "DECR"      },
    { 0x06, "INVERT"    },
    { 0x07, "INCR_WRAP" },
    { 0x08, "DECR_WRAP" },
    {}
}

data_store nv04_surface_format[] [static]
 

Initial value:

 {
    { 0x01, "Y8"            },
    { 0x02, "X1R5G5B5_Z1R5G5B5" },
    { 0x03, "X1R5G5B5_O1R5G5B5" },
    { 0x04, "R5G6B5"        },
    { 0x05, "Y16"           },
    { 0x06, "X8R8G8B8_Z8R8G8B8" },
    { 0x07, "X8R8G8B8_O8R8G8B8" },
    { 0x08, "X1A7R8G8B8_Z1A7R8G8B8" },
    { 0x09, "X1A7R8G8B8_O1A7R8G8B8" },
    { 0x0a, "A8R8G8B8"      },
    { 0x0b, "Y32"           },
    {}
}

data_store nv05_image_from_cpu_format[] [static]
 

Initial value:

 {
    { 0x01, "R5G6B5"        },
    { 0x02, "A1R5G5B5"  },
    { 0x03, "X1R5G5B5"  },
    { 0x04, "A8R8G8B8"  },
    { 0x05, "X8R8G8B8"  },
    {}
}

data_store nv05_scaled_image_from_memory_conversion[] [static]
 

Initial value:

 {
    { 0x00, "dither"    },
    { 0x01, "truncate"  },
    { 0x02, "subtr_truncate"},
    {}
}

data_store nv10_fog_coord_dist[] [static]
 

Initial value:

{
    { 0x00, "coord_src = FOG_COORDINATE"    },
    { 0x01, "coord_src = FRAGMENT_DEPTH | distance_mode = EYE_RADIAL_NV"    },
    { 0x02, "coord_src = FRAGMENT_DEPTH | distance_mode = EYE_PLANE"        },
    { 0x03, "coord_src = FRAGMENT_DEPTH | distance_mode = EYE_PLANE_ABSOLUTE_NV"},
    {}
}

data_store nv10_fog_mode[] [static]
 

Initial value:

{
    { 0x0802, "EXP" },  
    { 0x0803, "EXP2"    },  
    { 0x2601, "LINEAR"},    
    {}
}

data_store nv10_light_model_color_control[] [static]
 

Initial value:

{
    { 0x00, "SINGLE_COLOR"      },
    { 0x01, "SEPARATE_SPECULAR_COLOR"   },
    {}
}

data_store nv10_prim_2d[] [static]
 

Initial value:

 {
    { 0x01, "LINE"      },
    { 0x04, "RECT"      },
    {}
}

data_store nv10_rc_bias[] [static]
 

Initial value:

 {
    { 0x00, "NONE"      },
    { 0x01, "BIAS_BY_NEGATIVE_ONE_HALF_NV"  },
    {}
}

data_store nv10_rc_cu_alpha[] [static]
 

Initial value:

 {
    { 0x00, "BLUE"  },
    { 0x01, "ALPHA" },
    {}
}

data_store nv10_rc_cu_rgb[] [static]
 

Initial value:

 {
    { 0x00, "RGB"   },
    { 0x01, "ALPHA" },
    {}
}

data_store nv10_rc_input[] [static]
 

Initial value:

 {
    { 0x00, "ZERO"      },
    { 0x01, "CONSTANT_COLOR0_NV"},
    { 0x02, "CONSTANT_COLOR1_NV"},
    { 0x03, "FOG"       },
    { 0x04, "PRIMARY_COLOR_NV"  },
    { 0x05, "SECONDARY_COLOR_NV"},
    { 0x08, "TEXTURE1_ARB"  },
    { 0x09, "TEXTURE0_ARB"  },
    { 0x0c, "SPARE0_NV"     },
    { 0x0d, "SPARE1_NV"     },
    { 0x0e, "SPARE0_PLUS_SECONDARY_COLOR_NV"    },
    { 0x0f, "E_TIMES_F_NV"  },
    {}
}

data_store nv10_rc_mapping[] [static]
 

Initial value:

 {
    { 0x00, "UNSIGNED_IDENTITY_NV"  },
    { 0x01, "UNSIGNED_INVERT_NV"    },
    { 0x02, "EXPAND_NORMAL_NV"      },
    { 0x03, "EXPAND_NEGATE_NV"      },
    { 0x04, "HALF_BIAS_NORMAL_NV"   },
    { 0x05, "HALF_BIAS_NEGATE_NV"   },
    { 0x06, "SIGNED_IDENTITY_NV"    },
    { 0x07, "SIGNED_NEGATE_NV"      },
    {}
}

data_store nv10_rc_scale[] [static]
 

Initial value:

 {
    { 0x00, "NONE"      },
    { 0x01, "SCALE_BY_TWO_NV"   },
    { 0x02, "SCALE_BY_FOUR_NV"  },
    { 0x03, "SCALE_BY_ONE_HALF_NV"  },
    {}
}

data_store nv10_tx_anisotropy[] [static]
 

Initial value:

{   
    { 0x00, "1.0"   },
    { 0x01, "2.0"   },
    { 0x02, "4.0"   },  
    { 0x03, "8.0"   },
    {}
}

data_store nv10_tx_format[] [static]
 

Initial value:

 {
    { 0x00, "L8"        },
    { 0x01, "A8"        },
    { 0x02, "R5G5B5A1"  },
    { 0x03, "A8_RECT"   },
    { 0x04, "R4G4B4A4"  },
    { 0x06, "R8G8B8A8"  },
    { 0x0c, "DXT1"      },
    { 0x0e, "DXT3"      },
    { 0x0f, "DXT5"      },
    { 0x10, "R5G5B5A1_RECT" },  
    { 0x12, "R8G8B8A8_RECT" },
    { 0x13, "L8_RECT"   },
    { 0x1a, "L8A8"      },
    { 0x1b, "A8_RECT"   },
    { 0x1d, "R4G4B4A4_RECT" },
    { 0x20, "L8A8_RECT" },
    {}
}

data_store nv20_point_sprite_r_mode[] [static]
 

Initial value:

{
    { 0x00, "GL_ZERO"   },
    { 0x01, "GL_R"  },
    { 0x02, "GL_S"  },
    {}
}

data_store nv20_tx_shader_cull_mode[] [static]
 

Initial value:

 {
    { 0, "gggg" },
    { 1, "lggg" },
    { 2, "glgg" },
    { 3, "llgg" },
    { 4, "gglg" },
    { 5, "lglg" },
    { 6, "gllg" },
    { 7, "lllg" },
    { 8, "gggl" },
    { 9, "lggl" },
    { 10, "glgl"    },
    { 11, "llgl"    },
    { 12, "ggll"    },
    { 13, "lgll"    },
    { 14, "glll"    },
    { 15, "llll"    },
    {}
}

data_store nv20_tx_shader_op[] [static]
 

Initial value:

 {
    { 0x00, "NONE"      },
    { 0x01, "TEXTURE_2D"    },  

    { 0x04, "PASS_THROUGH"  },
    { 0x05, "CULL_FRAGMENT" },

    { 0x09, "DOT_PRODUCT_TEXTURE_2D" },
    { 0x0f, "DEPENDANT_AR"  },
    { 0x10, "DEPENDANT_GB"  },
    { 0x11, "DOT_PRODUCT"   },
    {}
}

data_store nv30_tx_filter[] [static]
 

Initial value:

 {
    { 1,    "NEAREST"       },
    { 2,    "LINEAR"        },
    { 3,    "NEAREST_MIPMAP_NEAREST"},
    { 4,    "LINEAR_MIPMAP_NEAREST" },
    { 5,    "NEAREST_MIPMAP_LINEAR" },
    { 6,    "LINEAR_MIPMAP_LINEAR"  },
    {}
}

data_store nv30_tx_format[] [static]
 

Initial value:

 {
    { 0x01, "L8"    },
    { 0x02, "A1R5G5B5" },
    { 0x03, "A4R4G4B4" },
    { 0x04, "R5G6B5" },
    { 0x05, "A8R8G8B8" },
    { 0x06, "DXT1" },
    { 0x07, "DXT3" },
    { 0x08, "DXT5" },
    { 0x14, "L16" },
    { 0x15, "L16A16" },
    { 0x18, "L8A8" },
    { 0x19, "SL8A8" },
    { 0x1a, "RGBA_F16" },
    { 0x1b, "RGBA_F32" },
    { 0x1c, "L_F32" },
    { 0x1f, "LA_F16" },
    {}
}

data_store nv30_tx_type[] [static]
 

Initial value:

 {
    { 0x0, "POT"    },
    { 0x1, "NPOT"   },
    { 0x3, "RECT"   },
    {}
}

data_store nv30_tx_wrap[] [static]
 

Initial value:

 {
    { 1,    "REPEAT"        },
    { 2,    "MIRRORED_REPEAT"   },
    { 3,    "CLAMP_TO_EDGE" },
    { 4,    "CLAMP_TO_BORDER"   },
    { 5,    "CLAMP" },
    {}
}

const object_store nv3_imem[] [static]
 

data_store nv40_tx_anisotropy[] [static]
 

Initial value:

{   
    { 0x00, "1.0"   },
    { 0x01, "2.0"   },
    { 0x02, "4.0"   },
    { 0x03, "6.0 (nv40) or 8.0 (nv30)"  },
    { 0x04, "8.0"   },
    { 0x05, "10.0"  },
    { 0x06, "12.0"  },
    { 0x07, "16.0"  },
    {}
}

data_store nv_context_color_format[] [static]
 

Initial value:

 {
    { 0x00, "INVALID"       },
    { 0x01, "Y8"            },
    { 0x02, "X16A8Y8"       },
    { 0x03, "X24Y8"         },
    { 0x06, "A1R5G5B5"      },
    { 0x07, "X1R5G5B5"      },
    { 0x08, "X16A1R5G5B5"       },
    { 0x09, "X17R5G5B5"     },
    { 0x0A, "R5G6B5"        },
    { 0x0B, "A16R5G6B5"     },
    { 0x0C, "X16R5G6B5"     },
    { 0x0D, "A8R8G8B8"      },
    { 0x0E, "X8R8G8B8"      },
    { 0x0F, "Y16"           },
    { 0x10, "A16Y16"        },
    { 0x11, "X16Y16"        },
    { 0x12, "V8YB8U8YA8"        },
    { 0x13, "YB8V8YA8U8"        },
    { 0x14, "Y32"           },
    {}
}

data_store nv_dac_format[] [static]
 

Initial value:

 {
    { 0x00, "8 bpp" },
    { 0x01, "16 bpp" },
    { 0x02, "15 bpp" },
    { 0x03, "24 bpp" },
    {}
}

data_store nv_mono_format[] [static]
 

Initial value:

 {
    { 0x01, "lowEndian" },
    { 0x02, "bigEndian" },
    {}
}

static const object_store nv_objects [static]
 

Contains all known commands for the fifo. __(a) extends the define a into a, "a", to make for a shorter typing. Here a shortened simple example:

1:	{__(NV01_CONTEXT_CLIP_RECTANGLE), NV03|NV04|NV10|NV15, {   
2:		{__(NV01_CONTEXT_CLIP_RECTANGLE_SET_POINT),	{
3:			PRINT_BITFIELD(NV01_CONTEXT_CLIP_RECTANGLE_SET_POINT_X, print_format, "%d", "x"),
4:			{}} },
5:		{}},
6:	}
  1. : sets the unique id followed by all the card families which know this command. Finally we start the array definition of object_field_store
  2. : offset of the field, name of the field and followed by the array definition for data_print_store
  3. : Macro which expands to lowbit, hightbit, function, data (here the printf format) and name

data_store vertex_data_type[] [static]
 

Initial value:

{
    { 0x01, "SHORT" },
    { 0x02, "FLOAT" },
    { 0x04, "BYTE"  },
    {}
}


Generated on Sat Aug 19 20:40:54 2006 for Renouveau by  doxygen 1.4.4