st_init_atifs_prog(struct gl_context *ctx, struct gl_program *prog)
{
/* we know this is st_fragment_program, because of st_new_ati_fs() */
- struct st_common_program *stfp = (struct st_common_program *) prog;
+ struct st_program *stfp = (struct st_program *) prog;
struct ati_fragment_shader *atifs = stfp->ati_fs;
unsigned pass, i, r, optype, arg;
static void check_program_state( struct st_context *st )
{
struct gl_context *ctx = st->ctx;
- struct st_common_program *old_vp = st->vp;
- struct st_common_program *old_tcp = st->tcp;
- struct st_common_program *old_tep = st->tep;
- struct st_common_program *old_gp = st->gp;
- struct st_common_program *old_fp = st->fp;
+ struct st_program *old_vp = st->vp;
+ struct st_program *old_tcp = st->tcp;
+ struct st_program *old_tep = st->tep;
+ struct st_program *old_gp = st->gp;
+ struct st_program *old_fp = st->fp;
struct gl_program *new_vp = ctx->VertexProgram._Current;
struct gl_program *new_tcp = ctx->TessCtrlProgram._Current;
if (old_vp)
dirty |= old_vp->affected_states;
if (new_vp)
- dirty |= ST_NEW_VERTEX_PROGRAM(st, st_common_program(new_vp));
+ dirty |= ST_NEW_VERTEX_PROGRAM(st, st_program(new_vp));
}
if (unlikely(new_tcp != &old_tcp->Base)) {
if (old_tcp)
dirty |= old_tcp->affected_states;
if (new_tcp)
- dirty |= st_common_program(new_tcp)->affected_states;
+ dirty |= st_program(new_tcp)->affected_states;
}
if (unlikely(new_tep != &old_tep->Base)) {
if (old_tep)
dirty |= old_tep->affected_states;
if (new_tep)
- dirty |= st_common_program(new_tep)->affected_states;
+ dirty |= st_program(new_tep)->affected_states;
}
if (unlikely(new_gp != &old_gp->Base)) {
if (old_gp)
dirty |= old_gp->affected_states;
if (new_gp)
- dirty |= st_common_program(new_gp)->affected_states;
+ dirty |= st_program(new_gp)->affected_states;
}
if (unlikely(new_fp != &old_fp->Base)) {
if (old_fp)
dirty |= old_fp->affected_states;
if (new_fp)
- dirty |= st_common_program(new_fp)->affected_states;
+ dirty |= st_program(new_fp)->affected_states;
}
/* Find out the number of viewports. This determines how many scissors
if (vertdata_edgeflags != st->vertdata_edgeflags) {
st->vertdata_edgeflags = vertdata_edgeflags;
if (vp)
- st->dirty |= ST_NEW_VERTEX_PROGRAM(st, st_common_program(vp));
+ st->dirty |= ST_NEW_VERTEX_PROGRAM(st, st_program(vp));
}
edgeflag_culls_prims = edgeflags_enabled && !vertdata_edgeflags &&
break;
case ST_PIPELINE_COMPUTE: {
- struct st_common_program *old_cp = st->cp;
+ struct st_program *old_cp = st->cp;
struct gl_program *new_cp = ctx->ComputeProgram._Current;
if (new_cp != &old_cp->Base) {
if (old_cp)
st->dirty |= old_cp->affected_states;
assert(new_cp);
- st->dirty |= st_common_program(new_cp)->affected_states;
+ st->dirty |= st_program(new_cp)->affected_states;
}
st->compute_shader_may_be_dirty = false;
#include "main/glheader.h"
struct st_context;
-struct st_common_program;
+struct st_program;
struct st_vp_variant;
struct pipe_vertex_buffer;
struct pipe_vertex_element;
void
st_setup_arrays(struct st_context *st,
- const struct st_common_program *vp,
+ const struct st_program *vp,
const struct st_vp_variant *vp_variant,
struct pipe_vertex_element *velements,
struct pipe_vertex_buffer *vbuffer, unsigned *num_vbuffers);
void
st_setup_current(struct st_context *st,
- const struct st_common_program *vp,
+ const struct st_program *vp,
const struct st_vp_variant *vp_variant,
struct pipe_vertex_element *velements,
struct pipe_vertex_buffer *vbuffer, unsigned *num_vbuffers);
void
st_setup_current_user(struct st_context *st,
- const struct st_common_program *vp,
+ const struct st_program *vp,
const struct st_vp_variant *vp_variant,
struct pipe_vertex_element *velements,
struct pipe_vertex_buffer *vbuffer, unsigned *num_vbuffers);
assert(velement->src_format);
}
-static void init_velement_lowered(const struct st_common_program *vp,
+static void init_velement_lowered(const struct st_program *vp,
struct pipe_vertex_element *velements,
const struct gl_vertex_format *vformat,
int src_offset, int instance_divisor,
void
st_setup_arrays(struct st_context *st,
- const struct st_common_program *vp,
+ const struct st_program *vp,
const struct st_vp_variant *vp_variant,
struct pipe_vertex_element *velements,
struct pipe_vertex_buffer *vbuffer, unsigned *num_vbuffers)
void
st_setup_current(struct st_context *st,
- const struct st_common_program *vp,
+ const struct st_program *vp,
const struct st_vp_variant *vp_variant,
struct pipe_vertex_element *velements,
struct pipe_vertex_buffer *vbuffer, unsigned *num_vbuffers)
GLbitfield curmask = inputs_read & _mesa_draw_current_bits(ctx);
if (curmask) {
/* vertex program validation must be done before this */
- const struct st_common_program *vp = st->vp;
+ const struct st_program *vp = st->vp;
const ubyte *input_to_index = vp->input_to_index;
/* For each attribute, upload the maximum possible size. */
GLubyte data[VERT_ATTRIB_MAX * sizeof(GLdouble) * 4];
void
st_setup_current_user(struct st_context *st,
- const struct st_common_program *vp,
+ const struct st_program *vp,
const struct st_vp_variant *vp_variant,
struct pipe_vertex_element *velements,
struct pipe_vertex_buffer *vbuffer, unsigned *num_vbuffers)
{
/* vertex program validation must be done before this */
/* _NEW_PROGRAM, ST_NEW_VS_STATE */
- const struct st_common_program *vp = st->vp;
+ const struct st_program *vp = st->vp;
const struct st_vp_variant *vp_variant = st->vp_variant;
struct pipe_vertex_buffer vbuffer[PIPE_MAX_ATTRIBS];
void
st_update_gs_constants(struct st_context *st)
{
- struct st_common_program *gp = st->gp;
+ struct st_program *gp = st->gp;
if (gp)
st_upload_constants(st, &gp->Base);
void
st_update_tcs_constants(struct st_context *st)
{
- struct st_common_program *tcp = st->tcp;
+ struct st_program *tcp = st->tcp;
if (tcp)
st_upload_constants(st, &tcp->Base);
void
st_update_tes_constants(struct st_context *st)
{
- struct st_common_program *tep = st->tep;
+ struct st_program *tep = st->tep;
if (tep)
st_upload_constants(st, &tep->Base);
void
st_update_cs_constants(struct st_context *st)
{
- struct st_common_program *cp = st->cp;
+ struct st_program *cp = st->cp;
if (cp)
st_upload_constants(st, &cp->Base);
void
st_update_fp( struct st_context *st )
{
- struct st_common_program *stfp;
+ struct st_program *stfp;
assert(st->ctx->FragmentProgram._Current);
- stfp = st_common_program(st->ctx->FragmentProgram._Current);
+ stfp = st_program(st->ctx->FragmentProgram._Current);
assert(stfp->Base.Target == GL_FRAGMENT_PROGRAM_ARB);
void *shader;
void
st_update_vp( struct st_context *st )
{
- struct st_common_program *stvp;
+ struct st_program *stvp;
/* find active shader and params -- Should be covered by
* ST_NEW_VERTEX_PROGRAM
*/
assert(st->ctx->VertexProgram._Current);
- stvp = st_common_program(st->ctx->VertexProgram._Current);
+ stvp = st_program(st->ctx->VertexProgram._Current);
assert(stvp->Base.Target == GL_VERTEX_PROGRAM_ARB);
if (st->shader_has_one_variant[MESA_SHADER_VERTEX] &&
static void *
st_update_common_program(struct st_context *st, struct gl_program *prog,
- unsigned pipe_shader, struct st_common_program **dst)
+ unsigned pipe_shader, struct st_program **dst)
{
- struct st_common_program *stp;
+ struct st_program *stp;
if (!prog) {
st_reference_prog(st, dst, NULL);
return NULL;
}
- stp = st_common_program(prog);
+ stp = st_program(prog);
st_reference_prog(st, dst, stp);
if (st->shader_has_one_variant[prog->info.stage] && stp->variants)
struct dd_function_table;
struct st_context;
struct gl_program;
-struct st_common_program;
+struct st_program;
extern void
st_init_bitmap_functions(struct dd_function_table *functions);
ctx->Driver.Draw = st_feedback_draw_vbo;
/* need to generate/use a vertex program that emits pos/color/tex */
if (vp)
- st->dirty |= ST_NEW_VERTEX_PROGRAM(st, st_common_program(vp));
+ st->dirty |= ST_NEW_VERTEX_PROGRAM(st, st_program(vp));
}
}
{
switch (target) {
case GL_VERTEX_PROGRAM_ARB: {
- struct st_common_program *prog = rzalloc(NULL,
- struct st_common_program);
+ struct st_program *prog = rzalloc(NULL,
+ struct st_program);
return _mesa_init_gl_program(&prog->Base, target, id, is_arb_asm);
}
case GL_TESS_CONTROL_PROGRAM_NV:
case GL_GEOMETRY_PROGRAM_NV:
case GL_FRAGMENT_PROGRAM_ARB:
case GL_COMPUTE_PROGRAM_NV: {
- struct st_common_program *prog = rzalloc(NULL,
- struct st_common_program);
+ struct st_program *prog = rzalloc(NULL,
+ struct st_program);
return _mesa_init_gl_program(&prog->Base, target, id, is_arb_asm);
}
default:
switch( prog->Target ) {
case GL_VERTEX_PROGRAM_ARB:
{
- struct st_common_program *stvp = (struct st_common_program *) prog;
+ struct st_program *stvp = (struct st_program *) prog;
st_release_vp_variants( st, stvp );
if (stvp->glsl_to_tgsi)
case GL_FRAGMENT_PROGRAM_ARB:
case GL_COMPUTE_PROGRAM_NV:
{
- struct st_common_program *p = st_common_program(prog);
+ struct st_program *p = st_program(prog);
if (prog->Target == GL_FRAGMENT_PROGRAM_ARB)
st_release_fp_variants(st, p);
if (target == GL_FRAGMENT_PROGRAM_ARB ||
target == GL_FRAGMENT_SHADER_ATI) {
- struct st_common_program *stfp = (struct st_common_program *) prog;
+ struct st_program *stfp = (struct st_program *) prog;
if (target == GL_FRAGMENT_SHADER_ATI) {
assert(stfp->ati_fs);
!st_translate_fragment_program(st, stfp))
return false;
} else if (target == GL_VERTEX_PROGRAM_ARB) {
- struct st_common_program *stvp = (struct st_common_program *) prog;
+ struct st_program *stvp = (struct st_program *) prog;
st_release_vp_variants(st, stvp);
if (!stvp->shader_program && /* not GLSL->NIR */
!st_translate_vertex_program(st, stvp))
return false;
} else {
- struct st_common_program *stcp = st_common_program(prog);
+ struct st_program *stcp = st_program(prog);
st_release_common_variants(st, stcp);
if (!stcp->shader_program && /* not GLSL->NIR */
{
struct gl_program *prog = ctx->Driver.NewProgram(ctx, GL_FRAGMENT_PROGRAM_ARB,
curProg->Id, true);
- struct st_common_program *stfp = (struct st_common_program *)prog;
+ struct st_program *stfp = (struct st_program *)prog;
stfp->ati_fs = curProg;
return prog;
}
switch (i) {
case MESA_SHADER_VERTEX:
- if (st_common_program(linked->Program)->vp_variants)
- sh = st_common_program(linked->Program)->vp_variants->driver_shader;
+ if (st_program(linked->Program)->vp_variants)
+ sh = st_program(linked->Program)->vp_variants->driver_shader;
break;
case MESA_SHADER_FRAGMENT:
- if (st_common_program(linked->Program)->fp_variants)
- sh = st_common_program(linked->Program)->fp_variants->driver_shader;
+ if (st_program(linked->Program)->fp_variants)
+ sh = st_program(linked->Program)->fp_variants->driver_shader;
break;
case MESA_SHADER_TESS_CTRL:
case MESA_SHADER_TESS_EVAL:
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_COMPUTE:
- if (st_common_program(linked->Program)->variants)
- sh = st_common_program(linked->Program)->variants->driver_shader;
+ if (st_program(linked->Program)->variants)
+ sh = st_program(linked->Program)->variants->driver_shader;
break;
}
static uint64_t
st_get_active_states(struct gl_context *ctx)
{
- struct st_common_program *vp =
- st_common_program(ctx->VertexProgram._Current);
- struct st_common_program *tcp =
- st_common_program(ctx->TessCtrlProgram._Current);
- struct st_common_program *tep =
- st_common_program(ctx->TessEvalProgram._Current);
- struct st_common_program *gp =
- st_common_program(ctx->GeometryProgram._Current);
- struct st_common_program *fp =
- st_common_program(ctx->FragmentProgram._Current);
- struct st_common_program *cp =
- st_common_program(ctx->ComputeProgram._Current);
+ struct st_program *vp =
+ st_program(ctx->VertexProgram._Current);
+ struct st_program *tcp =
+ st_program(ctx->TessCtrlProgram._Current);
+ struct st_program *tep =
+ st_program(ctx->TessEvalProgram._Current);
+ struct st_program *gp =
+ st_program(ctx->GeometryProgram._Current);
+ struct st_program *fp =
+ st_program(ctx->FragmentProgram._Current);
+ struct st_program *cp =
+ st_program(ctx->ComputeProgram._Current);
uint64_t active_shader_states = 0;
if (vp)
struct draw_stage;
struct gen_mipmap_state;
struct st_context;
-struct st_common_program;
+struct st_program;
struct st_perf_monitor_group;
struct u_upload_mgr;
union {
struct {
- struct st_common_program *vp; /**< Currently bound vertex program */
- struct st_common_program *tcp; /**< Currently bound tess control program */
- struct st_common_program *tep; /**< Currently bound tess eval program */
- struct st_common_program *gp; /**< Currently bound geometry program */
- struct st_common_program *fp; /**< Currently bound fragment program */
- struct st_common_program *cp; /**< Currently bound compute program */
+ struct st_program *vp; /**< Currently bound vertex program */
+ struct st_program *tcp; /**< Currently bound tess control program */
+ struct st_program *tep; /**< Currently bound tess eval program */
+ struct st_program *gp; /**< Currently bound geometry program */
+ struct st_program *fp; /**< Currently bound fragment program */
+ struct st_program *cp; /**< Currently bound compute program */
};
struct gl_program *current_program[MESA_SHADER_STAGES];
};
struct st_context *st = st_context(ctx);
struct pipe_context *pipe = st->pipe;
struct draw_context *draw = st_get_draw_context(st);
- const struct st_common_program *vp;
+ const struct st_program *vp;
struct st_vp_variant *vp_variant;
struct pipe_vertex_buffer vbuffers[PIPE_MAX_SHADER_INPUTS];
unsigned num_vbuffers = 0;
struct gl_shader_program *shader_program,
nir_shader *nir)
{
- struct st_common_program *stvp;
- struct st_common_program *stp;
+ struct st_program *stvp;
+ struct st_program *stp;
switch (prog->info.stage) {
case MESA_SHADER_VERTEX:
- stvp = (struct st_common_program *)prog;
+ stvp = (struct st_program *)prog;
stvp->shader_program = shader_program;
stvp->state.type = PIPE_SHADER_IR_NIR;
stvp->state.ir.nir = nir;
case MESA_SHADER_TESS_EVAL:
case MESA_SHADER_COMPUTE:
case MESA_SHADER_FRAGMENT:
- stp = (struct st_common_program *)prog;
+ stp = (struct st_program *)prog;
stp->shader_program = shader_program;
stp->state.type = PIPE_SHADER_IR_NIR;
stp->state.ir.nir = nir;
/* Initialize st_vertex_program members. */
if (i == MESA_SHADER_VERTEX)
- st_prepare_vertex_program(st_common_program(prog));
+ st_prepare_vertex_program(st_program(prog));
/* Get pipe_stream_output_info. */
if (i == MESA_SHADER_VERTEX ||
return NULL;
}
- struct st_common_program *stvp;
- struct st_common_program *stp;
+ struct st_program *stvp;
+ struct st_program *stp;
switch (shader->Stage) {
case MESA_SHADER_VERTEX:
- stvp = (struct st_common_program *)prog;
+ stvp = (struct st_program *)prog;
stvp->glsl_to_tgsi = v;
break;
case MESA_SHADER_FRAGMENT:
case MESA_SHADER_TESS_EVAL:
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_COMPUTE:
- stp = st_common_program(prog);
+ stp = st_program(prog);
stp->glsl_to_tgsi = v;
break;
default:
switch (prog->info.stage) {
case MESA_SHADER_VERTEX:
- states = &((struct st_common_program*)prog)->affected_states;
+ states = &((struct st_program*)prog)->affected_states;
*states = ST_NEW_VS_STATE |
ST_NEW_RASTERIZER |
break;
case MESA_SHADER_TESS_CTRL:
- states = &(st_common_program(prog))->affected_states;
+ states = &(st_program(prog))->affected_states;
*states = ST_NEW_TCS_STATE;
break;
case MESA_SHADER_TESS_EVAL:
- states = &(st_common_program(prog))->affected_states;
+ states = &(st_program(prog))->affected_states;
*states = ST_NEW_TES_STATE |
ST_NEW_RASTERIZER;
break;
case MESA_SHADER_GEOMETRY:
- states = &(st_common_program(prog))->affected_states;
+ states = &(st_program(prog))->affected_states;
*states = ST_NEW_GS_STATE |
ST_NEW_RASTERIZER;
break;
case MESA_SHADER_FRAGMENT:
- states = &((struct st_common_program*)prog)->affected_states;
+ states = &((struct st_program*)prog)->affected_states;
/* gl_FragCoord and glDrawPixels always use constants. */
*states = ST_NEW_FS_STATE |
break;
case MESA_SHADER_COMPUTE:
- states = &((struct st_common_program*)prog)->affected_states;
+ states = &((struct st_program*)prog)->affected_states;
*states = ST_NEW_CS_STATE;
*/
void
st_release_vp_variants( struct st_context *st,
- struct st_common_program *stvp )
+ struct st_program *stvp )
{
struct st_vp_variant *vpv;
* Free all variants of a fragment program.
*/
void
-st_release_fp_variants(struct st_context *st, struct st_common_program *stfp)
+st_release_fp_variants(struct st_context *st, struct st_program *stfp)
{
struct st_fp_variant *fpv;
* Free all basic program variants.
*/
void
-st_release_common_variants(struct st_context *st, struct st_common_program *p)
+st_release_common_variants(struct st_context *st, struct st_program *p)
{
struct st_common_variant *v;
}
void
-st_prepare_vertex_program(struct st_common_program *stvp)
+st_prepare_vertex_program(struct st_program *stvp)
{
stvp->num_inputs = 0;
memset(stvp->input_to_index, ~0, sizeof(stvp->input_to_index));
/* Translate stream output info. */
struct pipe_stream_output_info *so_info = NULL;
if (prog->info.stage == MESA_SHADER_VERTEX)
- so_info = &((struct st_common_program*)prog)->state.stream_output;
+ so_info = &((struct st_program*)prog)->state.stream_output;
else
- so_info = &((struct st_common_program*)prog)->state.stream_output;
+ so_info = &((struct st_program*)prog)->state.stream_output;
for (unsigned i = 0; i < info->NumOutputs; i++) {
so_info->output[i].register_index =
*/
bool
st_translate_vertex_program(struct st_context *st,
- struct st_common_program *stvp)
+ struct st_program *stvp)
{
struct ureg_program *ureg;
enum pipe_error error;
static struct st_vp_variant *
st_create_vp_variant(struct st_context *st,
- struct st_common_program *stvp,
+ struct st_program *stvp,
const struct st_common_variant_key *key)
{
struct st_vp_variant *vpv = CALLOC_STRUCT(st_vp_variant);
*/
struct st_vp_variant *
st_get_vp_variant(struct st_context *st,
- struct st_common_program *stvp,
+ struct st_program *stvp,
const struct st_common_variant_key *key)
{
struct st_vp_variant *vpv;
*/
bool
st_translate_fragment_program(struct st_context *st,
- struct st_common_program *stfp)
+ struct st_program *stfp)
{
/* Non-GLSL programs: */
if (!stfp->glsl_to_tgsi) {
static struct st_fp_variant *
st_create_fp_variant(struct st_context *st,
- struct st_common_program *stfp,
+ struct st_program *stfp,
const struct st_fp_variant_key *key)
{
struct pipe_context *pipe = st->pipe;
*/
struct st_fp_variant *
st_get_fp_variant(struct st_context *st,
- struct st_common_program *stfp,
+ struct st_program *stfp,
const struct st_fp_variant_key *key)
{
struct st_fp_variant *fpv;
*/
bool
st_translate_common_program(struct st_context *st,
- struct st_common_program *stcp)
+ struct st_program *stcp)
{
struct gl_program *prog = &stcp->Base;
enum pipe_shader_type stage =
*/
struct st_common_variant *
st_get_common_variant(struct st_context *st,
- struct st_common_program *prog,
+ struct st_program *prog,
const struct st_common_variant_key *key)
{
struct pipe_context *pipe = st->pipe;
switch (target->Target) {
case GL_VERTEX_PROGRAM_ARB:
{
- struct st_common_program *stvp = (struct st_common_program *) target;
+ struct st_program *stvp = (struct st_program *) target;
struct st_vp_variant *vpv, **prevPtr = &stvp->vp_variants;
for (vpv = stvp->vp_variants; vpv; ) {
break;
case GL_FRAGMENT_PROGRAM_ARB:
{
- struct st_common_program *stfp =
- (struct st_common_program *) target;
+ struct st_program *stfp =
+ (struct st_program *) target;
struct st_fp_variant *fpv, **prevPtr = &stfp->fp_variants;
for (fpv = stfp->fp_variants; fpv; ) {
case GL_TESS_EVALUATION_PROGRAM_NV:
case GL_COMPUTE_PROGRAM_NV:
{
- struct st_common_program *p = st_common_program(target);
+ struct st_program *p = st_program(target);
struct st_common_variant *v, **prevPtr = &p->variants;
for (v = p->variants; v; ) {
{
switch (prog->Target) {
case GL_VERTEX_PROGRAM_ARB: {
- struct st_common_program *p = (struct st_common_program *)prog;
+ struct st_program *p = (struct st_program *)prog;
struct st_common_variant_key key;
memset(&key, 0, sizeof(key));
}
case GL_FRAGMENT_PROGRAM_ARB: {
- struct st_common_program *p = (struct st_common_program *)prog;
+ struct st_program *p = (struct st_program *)prog;
struct st_fp_variant_key key;
memset(&key, 0, sizeof(key));
case GL_TESS_EVALUATION_PROGRAM_NV:
case GL_GEOMETRY_PROGRAM_NV:
case GL_COMPUTE_PROGRAM_NV: {
- struct st_common_program *p = st_common_program(prog);
+ struct st_program *p = st_program(prog);
struct st_common_variant_key key;
memset(&key, 0, sizeof(key));
{
if (st->current_program[prog->info.stage] == prog) {
if (prog->info.stage == MESA_SHADER_VERTEX)
- st->dirty |= ST_NEW_VERTEX_PROGRAM(st, (struct st_common_program *)prog);
+ st->dirty |= ST_NEW_VERTEX_PROGRAM(st, (struct st_program *)prog);
else
- st->dirty |= ((struct st_common_program *)prog)->affected_states;
+ st->dirty |= ((struct st_program *)prog)->affected_states;
}
/* Create Gallium shaders now instead of on demand. */
/**
* Derived from Mesa gl_program:
*/
-struct st_common_program
+struct st_program
{
struct gl_program Base;
struct pipe_shader_state state;
};
-static inline struct st_common_program *
-st_common_program( struct gl_program *cp )
+static inline struct st_program *
+st_program( struct gl_program *cp )
{
- return (struct st_common_program *)cp;
+ return (struct st_program *)cp;
}
static inline void
st_reference_prog(struct st_context *st,
- struct st_common_program **ptr,
- struct st_common_program *prog)
+ struct st_program **ptr,
+ struct st_program *prog)
{
_mesa_reference_program(st->ctx,
(struct gl_program **) ptr,
extern struct st_vp_variant *
st_get_vp_variant(struct st_context *st,
- struct st_common_program *stvp,
+ struct st_program *stvp,
const struct st_common_variant_key *key);
extern struct st_fp_variant *
st_get_fp_variant(struct st_context *st,
- struct st_common_program *stfp,
+ struct st_program *stfp,
const struct st_fp_variant_key *key);
extern struct st_common_variant *
st_get_common_variant(struct st_context *st,
- struct st_common_program *p,
+ struct st_program *p,
const struct st_common_variant_key *key);
extern void
st_release_vp_variants( struct st_context *st,
- struct st_common_program *stvp );
+ struct st_program *stvp );
extern void
st_release_fp_variants( struct st_context *st,
- struct st_common_program *stfp );
+ struct st_program *stfp );
extern void
-st_release_common_variants(struct st_context *st, struct st_common_program *p);
+st_release_common_variants(struct st_context *st, struct st_program *p);
extern void
st_destroy_program_variants(struct st_context *st);
st_finalize_nir_before_variants(struct nir_shader *nir);
extern void
-st_prepare_vertex_program(struct st_common_program *stvp);
+st_prepare_vertex_program(struct st_program *stvp);
extern void
st_translate_stream_output_info(struct gl_program *prog);
extern bool
st_translate_vertex_program(struct st_context *st,
- struct st_common_program *stvp);
+ struct st_program *stvp);
extern bool
st_translate_fragment_program(struct st_context *st,
- struct st_common_program *stfp);
+ struct st_program *stfp);
extern bool
st_translate_common_program(struct st_context *st,
- struct st_common_program *stcp);
+ struct st_program *stcp);
extern void
st_finalize_program(struct st_context *st, struct gl_program *prog);
switch (prog->info.stage) {
case MESA_SHADER_VERTEX: {
- struct st_common_program *stvp = (struct st_common_program *) prog;
+ struct st_program *stvp = (struct st_program *) prog;
blob_write_uint32(&blob, stvp->num_inputs);
blob_write_bytes(&blob, stvp->index_to_input,
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_FRAGMENT:
case MESA_SHADER_COMPUTE: {
- struct st_common_program *stcp = (struct st_common_program *) prog;
+ struct st_program *stcp = (struct st_program *) prog;
if (prog->info.stage == MESA_SHADER_TESS_EVAL ||
prog->info.stage == MESA_SHADER_GEOMETRY)
switch (prog->info.stage) {
case MESA_SHADER_VERTEX: {
- struct st_common_program *stvp = (struct st_common_program *) prog;
+ struct st_program *stvp = (struct st_program *) prog;
st_release_vp_variants(st, stvp);
case MESA_SHADER_GEOMETRY:
case MESA_SHADER_FRAGMENT:
case MESA_SHADER_COMPUTE: {
- struct st_common_program *stcp = st_common_program(prog);
+ struct st_program *stcp = st_program(prog);
if (prog->info.stage == MESA_SHADER_FRAGMENT)
st_release_fp_variants(st, stcp);