aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vs.c
diff options
context:
space:
mode:
authorKenneth Graunke <[email protected]>2015-08-27 18:24:39 -0700
committerKenneth Graunke <[email protected]>2015-09-03 22:31:04 -0700
commit4f4b7c4711d98606270133dfd456acabfa8267a6 (patch)
treea2a58f43db646bed0b8bce6720c094ce65f7759a /src/mesa/drivers/dri/i965/brw_vs.c
parent323962182547aeafcdb3bac28434ef81f70eb785 (diff)
i965: Remove the brw_vue_prog_key base class.
The legacy userclip fields are only used for the vertex shader, and at that point there's only program_string_id and the tex struct, which are common to all keys. So there's no need for a "VUE" key base class. Signed-off-by: Kenneth Graunke <[email protected]> Reviewed-by: Chris Forbes <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index 365396825dc..df7e5314d6e 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -130,7 +130,7 @@ brw_codegen_vs_prog(struct brw_context *brw,
/* vec4_visitor::setup_uniform_clipplane_values() also uploads user clip
* planes as uniforms.
*/
- param_count += key->base.nr_userclip_plane_consts * 4;
+ param_count += key->nr_userclip_plane_consts * 4;
stage_prog_data->param =
rzalloc_array(NULL, const gl_constant_value *, param_count);
@@ -172,7 +172,7 @@ brw_codegen_vs_prog(struct brw_context *brw,
* distance varying slots whenever clipping is enabled, even if the vertex
* shader doesn't write to gl_ClipDistance.
*/
- if (key->base.nr_userclip_plane_consts > 0) {
+ if (key->nr_userclip_plane_consts > 0) {
outputs_written |= BITFIELD64_BIT(VARYING_SLOT_CLIP_DIST0);
outputs_written |= BITFIELD64_BIT(VARYING_SLOT_CLIP_DIST1);
}
@@ -237,7 +237,7 @@ brw_vs_debug_recompile(struct brw_context *brw,
if (c->cache_id == BRW_CACHE_VS_PROG) {
old_key = c->key;
- if (old_key->base.program_string_id == key->base.program_string_id)
+ if (old_key->program_string_id == key->program_string_id)
break;
}
}
@@ -258,8 +258,8 @@ brw_vs_debug_recompile(struct brw_context *brw,
}
found |= key_debug(brw, "legacy user clipping",
- old_key->base.nr_userclip_plane_consts,
- key->base.nr_userclip_plane_consts);
+ old_key->nr_userclip_plane_consts,
+ key->nr_userclip_plane_consts);
found |= key_debug(brw, "copy edgeflag",
old_key->copy_edgeflag, key->copy_edgeflag);
@@ -268,8 +268,7 @@ brw_vs_debug_recompile(struct brw_context *brw,
found |= key_debug(brw, "vertex color clamping",
old_key->clamp_vertex_color, key->clamp_vertex_color);
- found |= brw_debug_recompile_sampler_key(brw, &old_key->base.tex,
- &key->base.tex);
+ found |= brw_debug_recompile_sampler_key(brw, &old_key->tex, &key->tex);
if (!found) {
perf_debug(" Something else\n");
@@ -306,11 +305,11 @@ brw_vs_populate_key(struct brw_context *brw,
/* Just upload the program verbatim for now. Always send it all
* the inputs it asks for, whether they are varying or not.
*/
- key->base.program_string_id = vp->id;
+ key->program_string_id = vp->id;
if (ctx->Transform.ClipPlanesEnabled != 0 &&
!vp->program.Base.UsesClipDistanceOut) {
- key->base.nr_userclip_plane_consts =
+ key->nr_userclip_plane_consts =
_mesa_logbase2(ctx->Transform.ClipPlanesEnabled) + 1;
}
@@ -336,7 +335,7 @@ brw_vs_populate_key(struct brw_context *brw,
/* _NEW_TEXTURE */
brw_populate_sampler_prog_key_data(ctx, prog, brw->vs.base.sampler_count,
- &key->base.tex);
+ &key->tex);
/* BRW_NEW_VS_ATTRIB_WORKAROUNDS */
memcpy(key->gl_attrib_wa_flags, brw->vb.attrib_wa_flags,
@@ -398,7 +397,8 @@ brw_vs_precompile(struct gl_context *ctx,
memset(&key, 0, sizeof(key));
- brw_vue_setup_prog_key_for_precompile(ctx, &key.base, bvp->id, &vp->Base);
+ brw_setup_tex_for_precompile(brw, &key.tex, prog);
+ key.program_string_id = bvp->id;
key.clamp_vertex_color =
(prog->OutputsWritten & (VARYING_BIT_COL0 | VARYING_BIT_COL1 |
VARYING_BIT_BFC0 | VARYING_BIT_BFC1));