mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-02 18:10:17 +01:00
remove old/used code
This commit is contained in:
parent
064daf319c
commit
478d1e2c9c
5 changed files with 8 additions and 58 deletions
|
|
@ -45,7 +45,7 @@
|
|||
|
||||
|
||||
static INLINE void
|
||||
emit_vertex_attr(struct vertex_info *vinfo, /*uint vfAttr,*/
|
||||
emit_vertex_attr(struct vertex_info *vinfo,
|
||||
attrib_format format, interp_mode interp)
|
||||
{
|
||||
const uint n = vinfo->num_attribs;
|
||||
|
|
@ -112,15 +112,15 @@ draw_set_vertex_attributes( struct draw_context *draw,
|
|||
/*
|
||||
* First three attribs are always the same: header, clip pos, winpos
|
||||
*/
|
||||
emit_vertex_attr(vinfo, /*TGSI_ATTRIB_VERTEX_HEADER,*/ FORMAT_1F, INTERP_NONE);
|
||||
emit_vertex_attr(vinfo, /*TGSI_ATTRIB_CLIP_POS,*/ FORMAT_4F, INTERP_LINEAR);
|
||||
emit_vertex_attr(vinfo, /*TGSI_ATTRIB_POS,*/ FORMAT_4F_VIEWPORT, INTERP_LINEAR);
|
||||
emit_vertex_attr(vinfo, FORMAT_1F, INTERP_NONE);
|
||||
emit_vertex_attr(vinfo, FORMAT_4F, INTERP_LINEAR);
|
||||
emit_vertex_attr(vinfo, FORMAT_4F_VIEWPORT, INTERP_LINEAR);
|
||||
|
||||
/*
|
||||
* Remaining attribs (color, texcoords, etc)
|
||||
*/
|
||||
for (i = 1; i < nr_attrs; i++) {
|
||||
emit_vertex_attr(vinfo, /*slot_to_vf_attr[i],*/ FORMAT_4F, interps[i]);
|
||||
emit_vertex_attr(vinfo, FORMAT_4F, interps[i]);
|
||||
}
|
||||
|
||||
draw_compute_vertex_size(vinfo);
|
||||
|
|
|
|||
|
|
@ -34,15 +34,9 @@
|
|||
#define DRAW_VERTEX_H
|
||||
|
||||
|
||||
|
||||
#if 0
|
||||
#define MAX_VERT_ATTRIBS 12 /* OK? */
|
||||
#endif
|
||||
|
||||
struct draw_context;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Vertex attribute format
|
||||
*/
|
||||
|
|
@ -92,9 +86,6 @@ draw_emit_vertex_attr(struct vertex_info *vinfo,
|
|||
{
|
||||
const uint n = vinfo->num_attribs;
|
||||
assert(n < PIPE_MAX_SHADER_OUTPUTS);
|
||||
/*
|
||||
vinfo->attr_mask |= (1 << vfAttr);
|
||||
*/
|
||||
vinfo->format[n] = format;
|
||||
vinfo->interp_mode[n] = interp;
|
||||
vinfo->num_attribs++;
|
||||
|
|
|
|||
|
|
@ -94,11 +94,7 @@ run_vertex_program(struct draw_context *draw,
|
|||
const float *trans = draw->viewport.translate;
|
||||
|
||||
assert(count <= 4);
|
||||
#if 0
|
||||
assert(draw->vertex_shader.outputs_written & (1 << TGSI_ATTRIB_POS));
|
||||
#else
|
||||
assert(draw->vertex_shader.output_semantics[0] == TGSI_SEMANTIC_POSITION);
|
||||
#endif
|
||||
|
||||
#ifdef DEBUG
|
||||
memset( &machine, 0, sizeof( machine ) );
|
||||
|
|
|
|||
|
|
@ -103,40 +103,6 @@ static void calculate_vertex_layout( struct i915_context *i915 )
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* color0 */
|
||||
if (inputsRead & (1 << TGSI_ATTRIB_COLOR0)) {
|
||||
front0 = draw_emit_vertex_attr(vinfo, FORMAT_4UB, colorInterp);
|
||||
vinfo->hwfmt[0] |= S4_VFMT_COLOR;
|
||||
}
|
||||
|
||||
/* color 1 */
|
||||
if (inputsRead & (1 << TGSI_ATTRIB_COLOR1)) {
|
||||
assert(0); /* untested */
|
||||
front1 = draw_emit_vertex_attr(vinfo, FORMAT_4UB, colorInterp);
|
||||
vinfo->hwfmt[0] |= S4_VFMT_SPEC_FOG;
|
||||
}
|
||||
|
||||
/* XXX fog? */
|
||||
|
||||
/* texcoords */
|
||||
{
|
||||
uint i;
|
||||
for (i = TGSI_ATTRIB_TEX0; i <= TGSI_ATTRIB_TEX7; i++) {
|
||||
uint hwtc;
|
||||
if (inputsRead & (1 << i)) {
|
||||
draw_emit_vertex_attr(vinfo, FORMAT_4F, INTERP_PERSPECTIVE);
|
||||
hwtc = TEXCOORDFMT_4D;
|
||||
needW = TRUE;
|
||||
}
|
||||
else {
|
||||
hwtc = TEXCOORDFMT_NOT_PRESENT;
|
||||
}
|
||||
vinfo->hwfmt[1] |= hwtc << ((i - TGSI_ATTRIB_TEX0) * 4);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* go back and fill in the vertex position info now that we have needW */
|
||||
if (needW) {
|
||||
vinfo->hwfmt[0] |= S4_VFMT_XYZW;
|
||||
|
|
|
|||
|
|
@ -540,12 +540,6 @@ tgsi_mesa_compile_fp_program(
|
|||
struct tgsi_processor *processor;
|
||||
struct tgsi_full_declaration fulldecl;
|
||||
struct tgsi_full_instruction fullinst;
|
||||
/*
|
||||
struct tgsi_full_dst_register *fulldst;
|
||||
struct tgsi_full_src_register *fullsrc;
|
||||
GLuint inputs_read;
|
||||
GLboolean reads_wpos;
|
||||
*/
|
||||
GLuint preamble_size = 0;
|
||||
|
||||
*(struct tgsi_version *) &tokens[0] = tgsi_build_version();
|
||||
|
|
@ -703,6 +697,9 @@ tgsi_mesa_compile_vp_program(
|
|||
|
||||
ti = 3;
|
||||
|
||||
/* XXX todo: input/output declarations
|
||||
*/
|
||||
|
||||
for( i = 0; i < program->Base.NumInstructions; i++ ) {
|
||||
if( compile_instruction(
|
||||
&program->Base.Instructions[i],
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue