update_fp( struct st_context *st )
{
struct st_fragment_program *stfp;
- struct st_fp_varient_key key;
+ struct st_fp_variant_key key;
assert(st->ctx->FragmentProgram._Current);
stfp = st_fragment_program(st->ctx->FragmentProgram._Current);
memset(&key, 0, sizeof(key));
key.st = st;
- st->fp_varient = st_get_fp_varient(st, stfp, &key);
+ st->fp_variant = st_get_fp_variant(st, stfp, &key);
st_reference_fragprog(st, &st->fp, stfp);
}
else {
cso_set_fragment_shader_handle(st->cso_context,
- st->fp_varient->driver_shader);
+ st->fp_variant->driver_shader);
}
}
update_vp( struct st_context *st )
{
struct st_vertex_program *stvp;
- struct st_vp_varient_key key;
+ struct st_vp_variant_key key;
/* find active shader and params -- Should be covered by
* ST_NEW_VERTEX_PROGRAM
st->ctx->Polygon.FrontMode != GL_FILL ||
st->ctx->Polygon.BackMode != GL_FILL));
- st->vp_varient = st_get_vp_varient(st, stvp, &key);
+ st->vp_variant = st_get_vp_variant(st, stvp, &key);
st_reference_vertprog(st, &st->vp, stvp);
cso_set_vertex_shader_handle(st->cso_context,
- st->vp_varient->driver_shader);
+ st->vp_variant->driver_shader);
st->vertex_result_to_slot = stvp->result_to_output;
}
update_gp( struct st_context *st )
{
struct st_geometry_program *stgp;
- struct st_gp_varient_key key;
+ struct st_gp_variant_key key;
if (!st->ctx->GeometryProgram._Current) {
cso_set_geometry_shader_handle(st->cso_context, NULL);
memset(&key, 0, sizeof(key));
key.st = st;
- st->gp_varient = st_get_gp_varient(st, stgp, &key);
+ st->gp_variant = st_get_gp_variant(st, stgp, &key);
st_reference_geomprog(st, &st->gp, stgp);
cso_set_geometry_shader_handle(st->cso_context,
- st->gp_varient->driver_shader);
+ st->gp_variant->driver_shader);
}
const struct st_tracked_state st_update_gp = {
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
struct cso_context *cso = st->cso_context;
- struct st_fp_varient *fpv;
- struct st_fp_varient_key key;
+ struct st_fp_variant *fpv;
+ struct st_fp_variant_key key;
GLuint maxSize;
GLuint offset;
key.st = st;
key.bitmap = GL_TRUE;
- fpv = st_get_fp_varient(st, st->fp, &key);
+ fpv = st_get_fp_variant(st, st->fp, &key);
/* As an optimization, Mesa's fragment programs will sometimes get the
* primary color from a statevar/constant rather than a varying variable.
* Get fragment program variant for a glDrawPixels or glCopyPixels
* command for RGBA data.
*/
-static struct st_fp_varient *
-get_color_fp_varient(struct st_context *st)
+static struct st_fp_variant *
+get_color_fp_variant(struct st_context *st)
{
struct gl_context *ctx = st->ctx;
- struct st_fp_varient_key key;
- struct st_fp_varient *fpv;
+ struct st_fp_variant_key key;
+ struct st_fp_variant *fpv;
memset(&key, 0, sizeof(key));
ctx->Pixel.AlphaScale != 1.0);
key.pixelMaps = ctx->Pixel.MapColorFlag;
- fpv = st_get_fp_varient(st, st->fp, &key);
+ fpv = st_get_fp_variant(st, st->fp, &key);
return fpv;
}
* Get fragment program variant for a glDrawPixels or glCopyPixels
* command for depth/stencil data.
*/
-static struct st_fp_varient *
-get_depth_stencil_fp_varient(struct st_context *st, GLboolean write_depth,
+static struct st_fp_variant *
+get_depth_stencil_fp_variant(struct st_context *st, GLboolean write_depth,
GLboolean write_stencil)
{
- struct st_fp_varient_key key;
- struct st_fp_varient *fpv;
+ struct st_fp_variant_key key;
+ struct st_fp_variant *fpv;
memset(&key, 0, sizeof(key));
key.drawpixels_z = write_depth;
key.drawpixels_stencil = write_stencil;
- fpv = st_get_fp_varient(st, st->fp, &key);
+ fpv = st_get_fp_variant(st, st->fp, &key);
return fpv;
}
struct pipe_sampler_view *sv[2];
int num_sampler_view = 1;
enum pipe_format stencil_format = PIPE_FORMAT_NONE;
- struct st_fp_varient *fpv;
+ struct st_fp_variant *fpv;
if (format == GL_DEPTH_STENCIL)
write_stencil = write_depth = GL_TRUE;
* Get vertex/fragment shaders
*/
if (write_depth || write_stencil) {
- fpv = get_depth_stencil_fp_varient(st, write_depth, write_stencil);
+ fpv = get_depth_stencil_fp_variant(st, write_depth, write_stencil);
driver_fp = fpv->driver_shader;
color = ctx->Current.RasterColor;
}
else {
- fpv = get_color_fp_varient(st);
+ fpv = get_color_fp_variant(st);
driver_fp = fpv->driver_shader;
GLint readX, readY, readW, readH;
GLuint sample_count;
struct gl_pixelstore_attrib pack = ctx->DefaultPacking;
- struct st_fp_varient *fpv;
+ struct st_fp_variant *fpv;
st_validate_state(st);
rbRead = st_get_color_read_renderbuffer(ctx);
color = NULL;
- fpv = get_color_fp_varient(st);
+ fpv = get_color_fp_variant(st);
driver_fp = fpv->driver_shader;
driver_vp = make_passthrough_vertex_shader(st, GL_FALSE);
rbRead = st_renderbuffer(ctx->ReadBuffer->_DepthBuffer);
color = ctx->Current.Attrib[VERT_ATTRIB_COLOR0];
- fpv = get_depth_stencil_fp_varient(st, GL_TRUE, GL_FALSE);
+ fpv = get_depth_stencil_fp_variant(st, GL_TRUE, GL_FALSE);
driver_fp = fpv->driver_shader;
driver_vp = make_passthrough_vertex_shader(st, GL_TRUE);
case GL_VERTEX_PROGRAM_ARB:
{
struct st_vertex_program *stvp = (struct st_vertex_program *) prog;
- st_release_vp_varients( st, stvp );
+ st_release_vp_variants( st, stvp );
}
break;
case MESA_GEOMETRY_PROGRAM:
struct st_geometry_program *stgp =
(struct st_geometry_program *) prog;
- st_release_gp_varients(st, stgp);
+ st_release_gp_variants(st, stgp);
if (stgp->tgsi.tokens) {
st_free_tokens((void *) stgp->tgsi.tokens);
struct st_fragment_program *stfp =
(struct st_fragment_program *) prog;
- st_release_fp_varients(st, stfp);
+ st_release_fp_variants(st, stfp);
if (stfp->tgsi.tokens) {
st_free_tokens(stfp->tgsi.tokens);
/**
* Called via ctx->Driver.ProgramStringNotify()
* Called when the program's text/code is changed. We have to free
- * all shader varients and corresponding gallium shaders when this happens.
+ * all shader variants and corresponding gallium shaders when this happens.
*/
static GLboolean
st_program_string_notify( struct gl_context *ctx,
if (target == GL_FRAGMENT_PROGRAM_ARB) {
struct st_fragment_program *stfp = (struct st_fragment_program *) prog;
- st_release_fp_varients(st, stfp);
+ st_release_fp_variants(st, stfp);
if (stfp->tgsi.tokens) {
st_free_tokens(stfp->tgsi.tokens);
else if (target == MESA_GEOMETRY_PROGRAM) {
struct st_geometry_program *stgp = (struct st_geometry_program *) prog;
- st_release_gp_varients(st, stgp);
+ st_release_gp_variants(st, stgp);
if (stgp->tgsi.tokens) {
st_free_tokens((void *) stgp->tgsi.tokens);
else if (target == GL_VERTEX_PROGRAM_ARB) {
struct st_vertex_program *stvp = (struct st_vertex_program *) prog;
- st_release_vp_varients( st, stvp );
+ st_release_vp_variants( st, stvp );
if (st->vp == stvp)
st->dirty.st |= ST_NEW_VERTEX_PROGRAM;
struct st_fragment_program *fp; /**< Currently bound fragment program */
struct st_geometry_program *gp; /**< Currently bound geometry program */
- struct st_vp_varient *vp_varient;
- struct st_fp_varient *fp_varient;
- struct st_gp_varient *gp_varient;
+ struct st_vp_variant *vp_variant;
+ struct st_fp_variant *fp_variant;
+ struct st_gp_variant *gp_variant;
struct gl_texture_object *default_texture;
}
#endif
- if (st->vp->varients)
- tgsi_dump( st->vp->varients[0].tgsi.tokens, 0 );
+ if (st->vp->variants)
+ tgsi_dump( st->vp->variants[0].tgsi.tokens, 0 );
if (st->vp->Base.Base.Parameters)
_mesa_print_parameter_list(st->vp->Base.Base.Parameters);
*/
static GLboolean
is_interleaved_arrays(const struct st_vertex_program *vp,
- const struct st_vp_varient *vpv,
+ const struct st_vp_variant *vpv,
const struct gl_client_array **arrays,
GLboolean *userSpace)
{
*/
static void
get_arrays_bounds(const struct st_vertex_program *vp,
- const struct st_vp_varient *vpv,
+ const struct st_vp_variant *vpv,
const struct gl_client_array **arrays,
GLuint max_index,
const GLubyte **low, const GLubyte **high)
static void
setup_interleaved_attribs(struct gl_context *ctx,
const struct st_vertex_program *vp,
- const struct st_vp_varient *vpv,
+ const struct st_vp_variant *vpv,
const struct gl_client_array **arrays,
GLuint max_index,
GLboolean userSpace,
static void
setup_non_interleaved_attribs(struct gl_context *ctx,
const struct st_vertex_program *vp,
- const struct st_vp_varient *vpv,
+ const struct st_vp_variant *vpv,
const struct gl_client_array **arrays,
GLuint max_index,
GLboolean *userSpace,
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
const struct st_vertex_program *vp;
- const struct st_vp_varient *vpv;
+ const struct st_vp_variant *vpv;
struct pipe_vertex_buffer vbuffer[PIPE_MAX_SHADER_INPUTS];
GLuint attr;
struct pipe_vertex_element velements[PIPE_MAX_ATTRIBS];
/* must get these after state validation! */
vp = st->vp;
- vpv = st->vp_varient;
+ vpv = st->vp_variant;
#if 0
if (MESA_VERBOSE & VERBOSE_GLSL) {
/* must get these after state validation! */
vp = st->vp;
- vs = &st->vp_varient->tgsi;
+ vs = &st->vp_variant->tgsi;
- if (!st->vp_varient->draw_shader) {
- st->vp_varient->draw_shader = draw_create_vertex_shader(draw, vs);
+ if (!st->vp_variant->draw_shader) {
+ st->vp_variant->draw_shader = draw_create_vertex_shader(draw, vs);
}
/*
draw_set_viewport_state(draw, &st->state.viewport);
draw_set_clip_state(draw, &st->state.clip);
draw_set_rasterizer_state(draw, &st->state.rasterizer, NULL);
- draw_bind_vertex_shader(draw, st->vp_varient->draw_shader);
+ draw_bind_vertex_shader(draw, st->vp_variant->draw_shader);
set_feedback_vertex_format(ctx);
/* loop over TGSI shader inputs to determine vertex buffer
/**
- * Delete a vertex program varient. Note the caller must unlink
- * the varient from the linked list.
+ * Delete a vertex program variant. Note the caller must unlink
+ * the variant from the linked list.
*/
static void
-delete_vp_varient(struct st_context *st, struct st_vp_varient *vpv)
+delete_vp_variant(struct st_context *st, struct st_vp_variant *vpv)
{
if (vpv->driver_shader)
cso_delete_vertex_shader(st->cso_context, vpv->driver_shader);
* Clean out any old compilations:
*/
void
-st_release_vp_varients( struct st_context *st,
+st_release_vp_variants( struct st_context *st,
struct st_vertex_program *stvp )
{
- struct st_vp_varient *vpv;
+ struct st_vp_variant *vpv;
- for (vpv = stvp->varients; vpv; ) {
- struct st_vp_varient *next = vpv->next;
- delete_vp_varient(st, vpv);
+ for (vpv = stvp->variants; vpv; ) {
+ struct st_vp_variant *next = vpv->next;
+ delete_vp_variant(st, vpv);
vpv = next;
}
- stvp->varients = NULL;
+ stvp->variants = NULL;
}
/**
- * Delete a fragment program varient. Note the caller must unlink
- * the varient from the linked list.
+ * Delete a fragment program variant. Note the caller must unlink
+ * the variant from the linked list.
*/
static void
-delete_fp_varient(struct st_context *st, struct st_fp_varient *fpv)
+delete_fp_variant(struct st_context *st, struct st_fp_variant *fpv)
{
if (fpv->driver_shader)
cso_delete_fragment_shader(st->cso_context, fpv->driver_shader);
/**
- * Free all varients of a fragment program.
+ * Free all variants of a fragment program.
*/
void
-st_release_fp_varients(struct st_context *st, struct st_fragment_program *stfp)
+st_release_fp_variants(struct st_context *st, struct st_fragment_program *stfp)
{
- struct st_fp_varient *fpv;
+ struct st_fp_variant *fpv;
- for (fpv = stfp->varients; fpv; ) {
- struct st_fp_varient *next = fpv->next;
- delete_fp_varient(st, fpv);
+ for (fpv = stfp->variants; fpv; ) {
+ struct st_fp_variant *next = fpv->next;
+ delete_fp_variant(st, fpv);
fpv = next;
}
- stfp->varients = NULL;
+ stfp->variants = NULL;
}
/**
- * Delete a geometry program varient. Note the caller must unlink
- * the varient from the linked list.
+ * Delete a geometry program variant. Note the caller must unlink
+ * the variant from the linked list.
*/
static void
-delete_gp_varient(struct st_context *st, struct st_gp_varient *gpv)
+delete_gp_variant(struct st_context *st, struct st_gp_variant *gpv)
{
if (gpv->driver_shader)
cso_delete_geometry_shader(st->cso_context, gpv->driver_shader);
/**
- * Free all varients of a geometry program.
+ * Free all variants of a geometry program.
*/
void
-st_release_gp_varients(struct st_context *st, struct st_geometry_program *stgp)
+st_release_gp_variants(struct st_context *st, struct st_geometry_program *stgp)
{
- struct st_gp_varient *gpv;
+ struct st_gp_variant *gpv;
- for (gpv = stgp->varients; gpv; ) {
- struct st_gp_varient *next = gpv->next;
- delete_gp_varient(st, gpv);
+ for (gpv = stgp->variants; gpv; ) {
+ struct st_gp_variant *next = gpv->next;
+ delete_gp_variant(st, gpv);
gpv = next;
}
- stgp->varients = NULL;
+ stgp->variants = NULL;
}
/**
- * Translate a vertex program to create a new varient.
+ * Translate a vertex program to create a new variant.
*/
-static struct st_vp_varient *
+static struct st_vp_variant *
st_translate_vertex_program(struct st_context *st,
struct st_vertex_program *stvp,
- const struct st_vp_varient_key *key)
+ const struct st_vp_variant_key *key)
{
- struct st_vp_varient *vpv = CALLOC_STRUCT(st_vp_varient);
+ struct st_vp_variant *vpv = CALLOC_STRUCT(st_vp_variant);
struct pipe_context *pipe = st->pipe;
struct ureg_program *ureg;
enum pipe_error error;
/**
- * Find/create a vertex program varient.
+ * Find/create a vertex program variant.
*/
-struct st_vp_varient *
-st_get_vp_varient(struct st_context *st,
+struct st_vp_variant *
+st_get_vp_variant(struct st_context *st,
struct st_vertex_program *stvp,
- const struct st_vp_varient_key *key)
+ const struct st_vp_variant_key *key)
{
- struct st_vp_varient *vpv;
+ struct st_vp_variant *vpv;
- /* Search for existing varient */
- for (vpv = stvp->varients; vpv; vpv = vpv->next) {
+ /* Search for existing variant */
+ for (vpv = stvp->variants; vpv; vpv = vpv->next) {
if (memcmp(&vpv->key, key, sizeof(*key)) == 0) {
break;
}
vpv = st_translate_vertex_program(st, stvp, key);
if (vpv) {
/* insert into list */
- vpv->next = stvp->varients;
- stvp->varients = vpv;
+ vpv->next = stvp->variants;
+ stvp->variants = vpv;
}
}
* the key.
* \return new fragment program variant
*/
-static struct st_fp_varient *
+static struct st_fp_variant *
st_translate_fragment_program(struct st_context *st,
struct st_fragment_program *stfp,
- const struct st_fp_varient_key *key)
+ const struct st_fp_variant_key *key)
{
struct pipe_context *pipe = st->pipe;
- struct st_fp_varient *varient = CALLOC_STRUCT(st_fp_varient);
+ struct st_fp_variant *variant = CALLOC_STRUCT(st_fp_variant);
- if (!varient)
+ if (!variant)
return NULL;
assert(!(key->bitmap && key->drawpixels));
struct gl_fragment_program *fp;
st_make_bitmap_fragment_program(st, &stfp->Base,
- &fp, &varient->bitmap_sampler);
+ &fp, &variant->bitmap_sampler);
- varient->parameters = _mesa_clone_parameter_list(fp->Base.Parameters);
+ variant->parameters = _mesa_clone_parameter_list(fp->Base.Parameters);
stfp = st_fragment_program(fp);
}
else if (key->drawpixels) {
else {
/* RGBA */
st_make_drawpix_fragment_program(st, &stfp->Base, &fp);
- varient->parameters = _mesa_clone_parameter_list(fp->Base.Parameters);
+ variant->parameters = _mesa_clone_parameter_list(fp->Base.Parameters);
}
stfp = st_fragment_program(fp);
}
ureg_destroy( ureg );
}
- /* fill in varient */
- varient->driver_shader = pipe->create_fs_state(pipe, &stfp->tgsi);
- varient->key = *key;
+ /* fill in variant */
+ variant->driver_shader = pipe->create_fs_state(pipe, &stfp->tgsi);
+ variant->key = *key;
if (ST_DEBUG & DEBUG_TGSI) {
tgsi_dump( stfp->tgsi.tokens, 0/*TGSI_DUMP_VERBOSE*/ );
debug_printf("\n");
}
- return varient;
+ return variant;
}
/**
* Translate fragment program if needed.
*/
-struct st_fp_varient *
-st_get_fp_varient(struct st_context *st,
+struct st_fp_variant *
+st_get_fp_variant(struct st_context *st,
struct st_fragment_program *stfp,
- const struct st_fp_varient_key *key)
+ const struct st_fp_variant_key *key)
{
- struct st_fp_varient *fpv;
+ struct st_fp_variant *fpv;
- /* Search for existing varient */
- for (fpv = stfp->varients; fpv; fpv = fpv->next) {
+ /* Search for existing variant */
+ for (fpv = stfp->variants; fpv; fpv = fpv->next) {
if (memcmp(&fpv->key, key, sizeof(*key)) == 0) {
break;
}
fpv = st_translate_fragment_program(st, stfp, key);
if (fpv) {
/* insert into list */
- fpv->next = stfp->varients;
- stfp->varients = fpv;
+ fpv->next = stfp->variants;
+ stfp->variants = fpv;
}
}
/**
- * Translate a geometry program to create a new varient.
+ * Translate a geometry program to create a new variant.
*/
-static struct st_gp_varient *
+static struct st_gp_variant *
st_translate_geometry_program(struct st_context *st,
struct st_geometry_program *stgp,
- const struct st_gp_varient_key *key)
+ const struct st_gp_variant_key *key)
{
GLuint inputMapping[GEOM_ATTRIB_MAX];
GLuint outputMapping[GEOM_RESULT_MAX];
GLuint maxSlot = 0;
struct ureg_program *ureg;
- struct st_gp_varient *gpv;
+ struct st_gp_variant *gpv;
- gpv = CALLOC_STRUCT(st_gp_varient);
+ gpv = CALLOC_STRUCT(st_gp_variant);
if (!gpv)
return NULL;
stgp->tgsi.tokens = ureg_get_tokens( ureg, NULL );
ureg_destroy( ureg );
- /* fill in new varient */
+ /* fill in new variant */
gpv->driver_shader = pipe->create_gs_state(pipe, &stgp->tgsi);
gpv->key = *key;
/**
* Get/create geometry program variant.
*/
-struct st_gp_varient *
-st_get_gp_varient(struct st_context *st,
+struct st_gp_variant *
+st_get_gp_variant(struct st_context *st,
struct st_geometry_program *stgp,
- const struct st_gp_varient_key *key)
+ const struct st_gp_variant_key *key)
{
- struct st_gp_varient *gpv;
+ struct st_gp_variant *gpv;
- /* Search for existing varient */
- for (gpv = stgp->varients; gpv; gpv = gpv->next) {
+ /* Search for existing variant */
+ for (gpv = stgp->variants; gpv; gpv = gpv->next) {
if (memcmp(&gpv->key, key, sizeof(*key)) == 0) {
break;
}
gpv = st_translate_geometry_program(st, stgp, key);
if (gpv) {
/* insert into list */
- gpv->next = stgp->varients;
- stgp->varients = gpv;
+ gpv->next = stgp->variants;
+ stgp->variants = gpv;
}
}
case GL_VERTEX_PROGRAM_ARB:
{
struct st_vertex_program *stvp = (struct st_vertex_program *) program;
- struct st_vp_varient *vpv, **prevPtr = &stvp->varients;
+ struct st_vp_variant *vpv, **prevPtr = &stvp->variants;
- for (vpv = stvp->varients; vpv; ) {
- struct st_vp_varient *next = vpv->next;
+ for (vpv = stvp->variants; vpv; ) {
+ struct st_vp_variant *next = vpv->next;
if (vpv->key.st == st) {
/* unlink from list */
*prevPtr = next;
/* destroy this variant */
- delete_vp_varient(st, vpv);
+ delete_vp_variant(st, vpv);
}
else {
prevPtr = &vpv->next;
{
struct st_fragment_program *stfp =
(struct st_fragment_program *) program;
- struct st_fp_varient *fpv, **prevPtr = &stfp->varients;
+ struct st_fp_variant *fpv, **prevPtr = &stfp->variants;
- for (fpv = stfp->varients; fpv; ) {
- struct st_fp_varient *next = fpv->next;
+ for (fpv = stfp->variants; fpv; ) {
+ struct st_fp_variant *next = fpv->next;
if (fpv->key.st == st) {
/* unlink from list */
*prevPtr = next;
/* destroy this variant */
- delete_fp_varient(st, fpv);
+ delete_fp_variant(st, fpv);
}
else {
prevPtr = &fpv->next;
{
struct st_geometry_program *stgp =
(struct st_geometry_program *) program;
- struct st_gp_varient *gpv, **prevPtr = &stgp->varients;
+ struct st_gp_variant *gpv, **prevPtr = &stgp->variants;
- for (gpv = stgp->varients; gpv; ) {
- struct st_gp_varient *next = gpv->next;
+ for (gpv = stgp->variants; gpv; ) {
+ struct st_gp_variant *next = gpv->next;
if (gpv->key.st == st) {
/* unlink from list */
*prevPtr = next;
/* destroy this variant */
- delete_gp_varient(st, gpv);
+ delete_gp_variant(st, gpv);
}
else {
prevPtr = &gpv->next;
/** Fragment program variant key */
-struct st_fp_varient_key
+struct st_fp_variant_key
{
struct st_context *st; /**< variants are per-context */
/** for glBitmap */
- GLuint bitmap:1; /**< glBitmap varient? */
+ GLuint bitmap:1; /**< glBitmap variant? */
/** for glDrawPixels */
- GLuint drawpixels:1; /**< glDrawPixels varient */
+ GLuint drawpixels:1; /**< glDrawPixels variant */
GLuint scaleAndBias:1; /**< glDrawPixels w/ scale and/or bias? */
GLuint pixelMaps:1; /**< glDrawPixels w/ pixel lookup map? */
GLuint drawpixels_z:1; /**< glDrawPixels(GL_DEPTH) */
/**
* Variant of a fragment program.
*/
-struct st_fp_varient
+struct st_fp_variant
{
/** Parameters which generated this version of fragment program */
- struct st_fp_varient_key key;
+ struct st_fp_variant_key key;
/** Driver's compiled shader */
void *driver_shader;
uint bitmap_sampler;
/** next in linked list */
- struct st_fp_varient *next;
+ struct st_fp_variant *next;
};
struct pipe_shader_state tgsi;
- struct st_fp_varient *varients;
+ struct st_fp_variant *variants;
};
/** Vertex program variant key */
-struct st_vp_varient_key
+struct st_vp_variant_key
{
struct st_context *st; /**< variants are per-context */
boolean passthrough_edgeflags;
* This represents a vertex program, especially translated to match
* the inputs of a particular fragment shader.
*/
-struct st_vp_varient
+struct st_vp_variant
{
/* Parameters which generated this translated version of a vertex
* shader:
*/
- struct st_vp_varient_key key;
+ struct st_vp_variant_key key;
/**
* TGSI tokens (to later generate a 'draw' module shader for
struct draw_vertex_shader *draw_shader;
/** Next in linked list */
- struct st_vp_varient *next;
+ struct st_vp_variant *next;
/** similar to that in st_vertex_program, but with edgeflags info too */
GLuint num_inputs;
ubyte output_semantic_index[VERT_RESULT_MAX];
GLuint num_outputs;
- /** List of translated varients of this vertex program.
+ /** List of translated variants of this vertex program.
*/
- struct st_vp_varient *varients;
+ struct st_vp_variant *variants;
};
-/** Geometry program varient key */
-struct st_gp_varient_key
+/** Geometry program variant key */
+struct st_gp_variant_key
{
struct st_context *st; /**< variants are per-context */
/* no other fields yet */
/**
* Geometry program variant.
*/
-struct st_gp_varient
+struct st_gp_variant
{
/* Parameters which generated this translated version of a vertex */
- struct st_gp_varient_key key;
+ struct st_gp_variant_key key;
void *driver_shader;
- struct st_gp_varient *next;
+ struct st_gp_variant *next;
};
struct pipe_shader_state tgsi;
- struct st_gp_varient *varients;
+ struct st_gp_variant *variants;
};
}
-extern struct st_vp_varient *
-st_get_vp_varient(struct st_context *st,
+extern struct st_vp_variant *
+st_get_vp_variant(struct st_context *st,
struct st_vertex_program *stvp,
- const struct st_vp_varient_key *key);
+ const struct st_vp_variant_key *key);
-extern struct st_fp_varient *
-st_get_fp_varient(struct st_context *st,
+extern struct st_fp_variant *
+st_get_fp_variant(struct st_context *st,
struct st_fragment_program *stfp,
- const struct st_fp_varient_key *key);
+ const struct st_fp_variant_key *key);
-extern struct st_gp_varient *
-st_get_gp_varient(struct st_context *st,
+extern struct st_gp_variant *
+st_get_gp_variant(struct st_context *st,
struct st_geometry_program *stgp,
- const struct st_gp_varient_key *key);
+ const struct st_gp_variant_key *key);
extern void
-st_release_vp_varients( struct st_context *st,
+st_release_vp_variants( struct st_context *st,
struct st_vertex_program *stvp );
extern void
-st_release_fp_varients( struct st_context *st,
+st_release_fp_variants( struct st_context *st,
struct st_fragment_program *stfp );
extern void
-st_release_gp_varients(struct st_context *st,
+st_release_gp_variants(struct st_context *st,
struct st_geometry_program *stgp);