diff options
author | Roland Scheidegger <sroland@vmware.com> | 2015-12-19 03:43:14 +0100 |
---|---|---|
committer | Roland Scheidegger <sroland@vmware.com> | 2016-01-07 01:58:05 +0100 |
commit | 2dbc20e45689e09766552517a74e2270e49817b5 (patch) | |
tree | 89b68999153a1304a66923d4ced241fd9beddaba /src/gallium/drivers/i915 | |
parent | 892e2d1395375c6f904af5250371c8d2784c8762 (diff) | |
download | external_mesa3d-2dbc20e45689e09766552517a74e2270e49817b5.zip external_mesa3d-2dbc20e45689e09766552517a74e2270e49817b5.tar.gz external_mesa3d-2dbc20e45689e09766552517a74e2270e49817b5.tar.bz2 |
draw: nuke the interp parameter from vertex_info
draw emit couldn't care less what the interpolation mode is...
This somehow looked like it would matter, all drivers more or less
dutifully filled that in correctly. But this is only used for emit,
if draw needs to know about interpolation mode (for clipping for instance)
it will get that information from the vs anyway.
softpipe actually used to depend on that interpolation parameter, as it
abused that structure quite a bit but no longer.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Diffstat (limited to 'src/gallium/drivers/i915')
-rw-r--r-- | src/gallium/drivers/i915/i915_context.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_state.c | 1 | ||||
-rw-r--r-- | src/gallium/drivers/i915/i915_state_derived.c | 17 |
3 files changed, 8 insertions, 11 deletions
diff --git a/src/gallium/drivers/i915/i915_context.h b/src/gallium/drivers/i915/i915_context.h index 1ed6851..2adaee3 100644 --- a/src/gallium/drivers/i915/i915_context.h +++ b/src/gallium/drivers/i915/i915_context.h @@ -195,7 +195,6 @@ struct i915_rasterizer_state { unsigned light_twoside : 1; unsigned st; - enum interp_mode color_interp; unsigned LIS4; unsigned LIS7; diff --git a/src/gallium/drivers/i915/i915_state.c b/src/gallium/drivers/i915/i915_state.c index d1661fe..b54a9fb 100644 --- a/src/gallium/drivers/i915/i915_state.c +++ b/src/gallium/drivers/i915/i915_state.c @@ -920,7 +920,6 @@ i915_create_rasterizer_state(struct pipe_context *pipe, struct i915_rasterizer_state *cso = CALLOC_STRUCT( i915_rasterizer_state ); cso->templ = *rasterizer; - cso->color_interp = rasterizer->flatshade ? INTERP_CONSTANT : INTERP_LINEAR; cso->light_twoside = rasterizer->light_twoside; cso->ds[0].u = _3DSTATE_DEPTH_OFFSET_SCALE; cso->ds[1].f = rasterizer->offset_scale; diff --git a/src/gallium/drivers/i915/i915_state_derived.c b/src/gallium/drivers/i915/i915_state_derived.c index 7ad88a1..bd0f448 100644 --- a/src/gallium/drivers/i915/i915_state_derived.c +++ b/src/gallium/drivers/i915/i915_state_derived.c @@ -57,7 +57,6 @@ static uint find_mapping(const struct i915_fragment_shader* fs, int unit) static void calculate_vertex_layout(struct i915_context *i915) { const struct i915_fragment_shader *fs = i915->fs; - const enum interp_mode colorInterp = i915->rasterizer->color_interp; struct vertex_info vinfo; boolean texCoords[I915_TEX_UNITS], colors[2], fog, needW, face; uint i; @@ -107,12 +106,12 @@ static void calculate_vertex_layout(struct i915_context *i915) /* pos */ src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_POSITION, 0); if (needW) { - draw_emit_vertex_attr(&vinfo, EMIT_4F, INTERP_LINEAR, src); + draw_emit_vertex_attr(&vinfo, EMIT_4F, src); vinfo.hwfmt[0] |= S4_VFMT_XYZW; vinfo.attrib[0].emit = EMIT_4F; } else { - draw_emit_vertex_attr(&vinfo, EMIT_3F, INTERP_LINEAR, src); + draw_emit_vertex_attr(&vinfo, EMIT_3F, src); vinfo.hwfmt[0] |= S4_VFMT_XYZ; vinfo.attrib[0].emit = EMIT_3F; } @@ -123,21 +122,21 @@ static void calculate_vertex_layout(struct i915_context *i915) /* primary color */ if (colors[0]) { src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_COLOR, 0); - draw_emit_vertex_attr(&vinfo, EMIT_4UB_BGRA, colorInterp, src); + draw_emit_vertex_attr(&vinfo, EMIT_4UB_BGRA, src); vinfo.hwfmt[0] |= S4_VFMT_COLOR; } /* secondary color */ if (colors[1]) { src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_COLOR, 1); - draw_emit_vertex_attr(&vinfo, EMIT_4UB_BGRA, colorInterp, src); + draw_emit_vertex_attr(&vinfo, EMIT_4UB_BGRA, src); vinfo.hwfmt[0] |= S4_VFMT_SPEC_FOG; } /* fog coord, not fog blend factor */ if (fog) { src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_FOG, 0); - draw_emit_vertex_attr(&vinfo, EMIT_1F, INTERP_PERSPECTIVE, src); + draw_emit_vertex_attr(&vinfo, EMIT_1F, src); vinfo.hwfmt[0] |= S4_VFMT_FOG_PARAM; } @@ -147,7 +146,7 @@ static void calculate_vertex_layout(struct i915_context *i915) if (texCoords[i]) { hwtc = TEXCOORDFMT_4D; src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_GENERIC, fs->generic_mapping[i]); - draw_emit_vertex_attr(&vinfo, EMIT_4F, INTERP_PERSPECTIVE, src); + draw_emit_vertex_attr(&vinfo, EMIT_4F, src); } else { hwtc = TEXCOORDFMT_NOT_PRESENT; @@ -164,7 +163,7 @@ static void calculate_vertex_layout(struct i915_context *i915) * module by adding an extra shader output. */ src = draw_find_shader_output(i915->draw, TGSI_SEMANTIC_FACE, 0); - draw_emit_vertex_attr(&vinfo, EMIT_1F, INTERP_CONSTANT, src); + draw_emit_vertex_attr(&vinfo, EMIT_1F, src); vinfo.hwfmt[1] &= ~(TEXCOORDFMT_NOT_PRESENT << (slot * 4)); vinfo.hwfmt[1] |= TEXCOORDFMT_1D << (slot * 4); } @@ -185,7 +184,7 @@ static void calculate_vertex_layout(struct i915_context *i915) struct i915_tracked_state i915_update_vertex_layout = { "vertex_layout", calculate_vertex_layout, - I915_NEW_RASTERIZER | I915_NEW_FS | I915_NEW_VS + I915_NEW_FS | I915_NEW_VS }; |