summaryrefslogtreecommitdiffstats
path: root/src/mesa/pipe/i915simple
diff options
context:
space:
mode:
authorBrian <[email protected]>2008-01-23 23:27:31 -0700
committerBrian <[email protected]>2008-01-23 23:27:31 -0700
commit2549d79ae5342a2b97c06e3b0db9da6eb7821d2e (patch)
treecdd4e62ff8287042157b0ed845bde1e54f251800 /src/mesa/pipe/i915simple
parent6000dcc973cdc1bd61621b432aed27d21059ae5d (diff)
gallium: rename FORMAT_x to EMIT_x and use EMIT_ALL to emit whole vertex as-is in vbuf code
Diffstat (limited to 'src/mesa/pipe/i915simple')
-rw-r--r--src/mesa/pipe/i915simple/i915_prim_emit.c14
-rw-r--r--src/mesa/pipe/i915simple/i915_state_derived.c18
2 files changed, 16 insertions, 16 deletions
diff --git a/src/mesa/pipe/i915simple/i915_prim_emit.c b/src/mesa/pipe/i915simple/i915_prim_emit.c
index c50a5915899..f74671b39ce 100644
--- a/src/mesa/pipe/i915simple/i915_prim_emit.c
+++ b/src/mesa/pipe/i915simple/i915_prim_emit.c
@@ -73,33 +73,33 @@ emit_hw_vertex( struct i915_context *i915,
uint count = 0; /* for debug/sanity */
for (i = 0; i < vinfo->num_attribs; i++) {
- switch (vinfo->format[i]) {
- case FORMAT_OMIT:
+ switch (vinfo->emit[i]) {
+ case EMIT_OMIT:
/* no-op */
break;
- case FORMAT_1F:
+ case EMIT_1F:
OUT_BATCH( fui(vertex->data[i][0]) );
count++;
break;
- case FORMAT_2F:
+ case EMIT_2F:
OUT_BATCH( fui(vertex->data[i][0]) );
OUT_BATCH( fui(vertex->data[i][1]) );
count += 2;
break;
- case FORMAT_3F:
+ case EMIT_3F:
OUT_BATCH( fui(vertex->data[i][0]) );
OUT_BATCH( fui(vertex->data[i][1]) );
OUT_BATCH( fui(vertex->data[i][2]) );
count += 3;
break;
- case FORMAT_4F:
+ case EMIT_4F:
OUT_BATCH( fui(vertex->data[i][0]) );
OUT_BATCH( fui(vertex->data[i][1]) );
OUT_BATCH( fui(vertex->data[i][2]) );
OUT_BATCH( fui(vertex->data[i][3]) );
count += 4;
break;
- case FORMAT_4UB:
+ case EMIT_4UB:
OUT_BATCH( pack_ub4(float_to_ubyte( vertex->data[i][2] ),
float_to_ubyte( vertex->data[i][1] ),
float_to_ubyte( vertex->data[i][0] ),
diff --git a/src/mesa/pipe/i915simple/i915_state_derived.c b/src/mesa/pipe/i915simple/i915_state_derived.c
index 03a46edc55f..62741e30f80 100644
--- a/src/mesa/pipe/i915simple/i915_state_derived.c
+++ b/src/mesa/pipe/i915simple/i915_state_derived.c
@@ -56,7 +56,7 @@ static void calculate_vertex_layout( struct i915_context *i915 )
memset(&vinfo, 0, sizeof(vinfo));
/* pos */
- draw_emit_vertex_attr(&vinfo, FORMAT_3F, INTERP_LINEAR, src++);
+ draw_emit_vertex_attr(&vinfo, EMIT_3F, INTERP_LINEAR, src++);
/* Note: we'll set the S4_VFMT_XYZ[W] bits below */
for (i = 0; i < fs->num_inputs; i++) {
@@ -65,12 +65,12 @@ static void calculate_vertex_layout( struct i915_context *i915 )
break;
case TGSI_SEMANTIC_COLOR:
if (fs->input_semantic_index[i] == 0) {
- front0 = draw_emit_vertex_attr(&vinfo, FORMAT_4UB, colorInterp, src++);
+ front0 = draw_emit_vertex_attr(&vinfo, EMIT_4UB, colorInterp, src++);
vinfo.hwfmt[0] |= S4_VFMT_COLOR;
}
else {
assert(fs->input_semantic_index[i] == 1);
- front1 = draw_emit_vertex_attr(&vinfo, FORMAT_4UB, colorInterp, src++);
+ front1 = draw_emit_vertex_attr(&vinfo, EMIT_4UB, colorInterp, src++);
vinfo.hwfmt[0] |= S4_VFMT_SPEC_FOG;
}
break;
@@ -80,7 +80,7 @@ static void calculate_vertex_layout( struct i915_context *i915 )
const uint unit = fs->input_semantic_index[i];
uint hwtc;
texCoords[unit] = TRUE;
- draw_emit_vertex_attr(&vinfo, FORMAT_4F, INTERP_PERSPECTIVE, src++);
+ draw_emit_vertex_attr(&vinfo, EMIT_4F, INTERP_PERSPECTIVE, src++);
hwtc = TEXCOORDFMT_4D;
needW = TRUE;
vinfo.hwfmt[1] |= hwtc << (unit * 4);
@@ -88,7 +88,7 @@ static void calculate_vertex_layout( struct i915_context *i915 )
break;
case TGSI_SEMANTIC_FOG:
fprintf(stderr, "i915 fogcoord not implemented yet\n");
- draw_emit_vertex_attr(&vinfo, FORMAT_1F, INTERP_PERSPECTIVE, src++);
+ draw_emit_vertex_attr(&vinfo, EMIT_1F, INTERP_PERSPECTIVE, src++);
break;
default:
assert(0);
@@ -107,11 +107,11 @@ static void calculate_vertex_layout( struct i915_context *i915 )
/* go back and fill in the vertex position info now that we have needW */
if (needW) {
vinfo.hwfmt[0] |= S4_VFMT_XYZW;
- vinfo.format[0] = FORMAT_4F;
+ vinfo.emit[0] = EMIT_4F;
}
else {
vinfo.hwfmt[0] |= S4_VFMT_XYZ;
- vinfo.format[0] = FORMAT_3F;
+ vinfo.emit[0] = EMIT_3F;
}
/* Additional attributes required for setup: Just twosided
@@ -120,10 +120,10 @@ static void calculate_vertex_layout( struct i915_context *i915 )
*/
if (i915->rasterizer->light_twoside) {
if (front0) {
- back0 = draw_emit_vertex_attr(&vinfo, FORMAT_OMIT, colorInterp, src++);
+ back0 = draw_emit_vertex_attr(&vinfo, EMIT_OMIT, colorInterp, src++);
}
if (back0) {
- back1 = draw_emit_vertex_attr(&vinfo, FORMAT_OMIT, colorInterp, src++);
+ back1 = draw_emit_vertex_attr(&vinfo, EMIT_OMIT, colorInterp, src++);
}
}