/*
* Mesa 3-D graphics library
- * Version: 6.6
+ * Version: 6.5.2
*
* Copyright (C) 2006 Brian Paul All Rights Reserved.
*
SLANG_SHADER_MAX
};
-/*
+
+/**
* Active variables.
*
- * Active uniforms/attribs can be queried by the application to get a list of
- * uniforms/attribs actually used by shaders (uniforms) or vertex shader only (attribs).
+ * Active uniforms/attribs can be queried by the application to get a
+ * list of uniforms/attribs actually used by shaders (uniforms) or
+ * vertex shader only (attribs).
*/
-
+/*@{*/
typedef struct
{
slang_export_data_quant *quant;
slang_active_variable *table;
GLuint count;
} slang_active_variables;
+/*@}*/
-/*
+
+/**
* Attrib binding override.
*
- * The application can override GL attrib binding by specifying its preferred index assignment
- * for a given attrib name. Those overrides are taken into account while linking the program.
+ * The application can override GL attrib binding by specifying its
+ * preferred index assignment for a given attrib name. Those overrides
+ * are taken into account while linking the program.
*/
-
+/*@{*/
typedef struct
{
GLuint index;
slang_attrib_override *table;
GLuint count;
} slang_attrib_overrides;
+/*@}*/
+
extern GLboolean
_slang_attrib_overrides_add (slang_attrib_overrides *, GLuint, const GLchar *);
-/*
+
+/**
* Uniform bindings.
*
- * Each slang_uniform_binding holds an array of addresses to actual memory locations in those
- * shader types that use that uniform. Uniform bindings are held in an array and accessed
- * by array index which is seen to the application as a uniform location.
+ * Each slang_uniform_binding holds an array of addresses to actual
+ * memory locations in those shader types that use that
+ * uniform. Uniform bindings are held in an array and accessed by
+ * array index which is seen to the application as a uniform location.
*
- * When the application writes to a particular uniform, it specifies its location.
- * This location is treated as an array index to slang_uniform_bindings::table and tested
- * against slang_uniform_bindings::count limit. The result is a pointer to slang_uniform_binding.
- * The type of data being written to uniform is tested against slang_uniform_binding::quant.
- * If the types are compatible, the array slang_uniform_binding::address is iterated for
- * each shader type and if the address is valid (i.e. the uniform is used by this shader type),
- * the new uniform value is written at that address.
+ * When the application writes to a particular uniform, it specifies
+ * its location. This location is treated as an array index to
+ * slang_uniform_bindings::table and tested against
+ * slang_uniform_bindings::count limit. The result is a pointer to
+ * slang_uniform_binding. The type of data being written to uniform
+ * is tested against slang_uniform_binding::quant. If the types are
+ * compatible, the array slang_uniform_binding::address is iterated
+ * for each shader type and if the address is valid (i.e. the uniform
+ * is used by this shader type), the new uniform value is written at
+ * that address.
*/
-
+/*@{*/
typedef struct
{
slang_export_data_quant *quant;
slang_uniform_binding *table;
GLuint count;
} slang_uniform_bindings;
+/*@}*/
-/*
+
+/**
* Attrib bindings.
*
- * There is a fixed number of vertex attrib vectors (attrib slots). The slang_attrib_slot::addr
- * maps vertex attrib index to the actual memory location of the attrib in vertex shader.
- * One vertex attrib can span over many attrib slots (this is the case for matrices). The
- * slang_attrib_binding::first_slot_index holds the first slot index that the attrib is bound to.
+ * There is a fixed number of vertex attrib vectors (attrib
+ * slots). The slang_attrib_slot::addr maps vertex attrib index to the
+ * actual memory location of the attrib in vertex shader. One vertex
+ * attrib can span over many attrib slots (this is the case for
+ * matrices). The slang_attrib_binding::first_slot_index holds the
+ * first slot index that the attrib is bound to.
*/
-
+/*@{*/
typedef struct
{
slang_export_data_quant *quant;
typedef struct
{
- GLuint addr; /* memory location */
- GLuint fill; /* 1..4, number of components used */
+ GLuint addr; /**< memory location */
+ GLuint fill; /**< 1..4, number of components used */
} slang_attrib_slot;
typedef struct
GLuint binding_count;
slang_attrib_slot slots[MAX_VERTEX_ATTRIBS];
} slang_attrib_bindings;
+/*@}*/
-/*
+
+
+/**
* Varying bindings.
*
- * There is a fixed number of varying floats (varying slots). The slang_varying_slot::vert_addr
- * maps varying float index to the actual memory location of the output variable in vertex shader.
- * The slang_varying_slot::frag_addr maps varying float index to the actual memory location of
- * the input variable in fragment shader.
+ * There is a fixed number of varying floats (varying slots). The
+ * slang_varying_slot::vert_addr maps varying float index to the
+ * actual memory location of the output variable in vertex shader.
+ * The slang_varying_slot::frag_addr maps varying float index to the
+ * actual memory location of the input variable in fragment shader.
*/
-
+/*@{*/
typedef struct
{
GLuint vert_addr;
typedef struct
{
- slang_varying_binding bindings[MAX_VARYING_FLOATS];
+ slang_varying_binding bindings[MAX_VARYING * 4];
GLuint binding_count;
- slang_varying_slot slots[MAX_VARYING_FLOATS];
+ slang_varying_slot slots[MAX_VARYING * 4];
GLuint slot_count;
} slang_varying_bindings;
+/*@}*/
-/*
+
+/**
* Texture usage.
*
- * A slang_texture_usage struct holds indirect information about texture image unit usage. The
- * slang_texture_usages::table is derived from active uniform table by extracting only uniforms
- * that are samplers.
+ * A slang_texture_usage struct holds indirect information about
+ * texture image unit usage. The slang_texture_usages::table is
+ * derived from active uniform table by extracting only uniforms that
+ * are samplers.
*
- * To collect current texture usage one must iterate the slang_texture_usages::table and read
- * uniform at address slang_texture_usage::frag_address to get texture unit index. This
- * index, coupled with texture access type (target) taken from slang_texture_usage::quant
- * forms texture usage for that texture unit.
+ * To collect current texture usage one must iterate the
+ * slang_texture_usages::table and read uniform at address
+ * slang_texture_usage::frag_address to get texture unit index. This
+ * index, coupled with texture access type (target) taken from
+ * slang_texture_usage::quant forms texture usage for that texture
+ * unit.
*/
-
+/*@{*/
typedef struct
{
slang_export_data_quant *quant;
slang_texture_usage *table;
GLuint count;
} slang_texture_usages;
+/*@}*/
+
extern GLvoid
_slang_texture_usages_ctr (slang_texture_usages *);
SLANG_COMMON_CODE_MAX
};
+/**
+ * XXX promote this to mtypes.h?
+ */
typedef struct
{
slang_active_variables active_uniforms;
extern GLboolean
_slang_link (slang_program *, slang_code_object **, GLuint);
+
+extern void
+_slang_link2(GLcontext *ctx, GLhandleARB h,
+ struct gl_shader_program *shProg);
+
#ifdef __cplusplus
}
#endif