aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/dri/i965/brw_vs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_vs.c')
-rw-r--r--src/mesa/drivers/dri/i965/brw_vs.c40
1 files changed, 18 insertions, 22 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_vs.c b/src/mesa/drivers/dri/i965/brw_vs.c
index a7f89f390dd..5d1c8e0c707 100644
--- a/src/mesa/drivers/dri/i965/brw_vs.c
+++ b/src/mesa/drivers/dri/i965/brw_vs.c
@@ -112,16 +112,15 @@ brw_codegen_vs_prog(struct brw_context *brw,
mem_ctx = ralloc_context(NULL);
- brw_assign_common_binding_table_offsets(MESA_SHADER_VERTEX,
- devinfo,
- prog, &vp->program.Base,
- &prog_data.base.base, 0);
+ brw_assign_common_binding_table_offsets(MESA_SHADER_VERTEX, devinfo, prog,
+ &vp->program, &prog_data.base.base,
+ 0);
/* Allocate the references to the uniforms that will end up in the
* prog_data associated with the compiled program, and which will be freed
* by the state cache.
*/
- int param_count = vp->program.Base.nir->num_uniforms / 4;
+ int param_count = vp->program.nir->num_uniforms / 4;
if (vs)
prog_data.base.base.nr_image_params = vs->base.NumImages;
@@ -141,25 +140,25 @@ brw_codegen_vs_prog(struct brw_context *brw,
stage_prog_data->nr_params = param_count;
if (prog) {
- brw_nir_setup_glsl_uniforms(vp->program.Base.nir, prog, &vp->program.Base,
+ brw_nir_setup_glsl_uniforms(vp->program.nir, prog, &vp->program,
&prog_data.base.base,
compiler->scalar_stage[MESA_SHADER_VERTEX]);
} else {
- brw_nir_setup_arb_uniforms(vp->program.Base.nir, &vp->program.Base,
+ brw_nir_setup_arb_uniforms(vp->program.nir, &vp->program,
&prog_data.base.base);
}
uint64_t outputs_written =
- brw_vs_outputs_written(brw, key, vp->program.Base.info.outputs_written);
- prog_data.inputs_read = vp->program.Base.info.inputs_read;
+ brw_vs_outputs_written(brw, key, vp->program.info.outputs_written);
+ prog_data.inputs_read = vp->program.info.inputs_read;
if (key->copy_edgeflag) {
prog_data.inputs_read |= VERT_BIT_EDGEFLAG;
}
prog_data.base.cull_distance_mask =
- ((1 << vp->program.Base.CullDistanceArraySize) - 1) <<
- vp->program.Base.ClipDistanceArraySize;
+ ((1 << vp->program.CullDistanceArraySize) - 1) <<
+ vp->program.ClipDistanceArraySize;
brw_compute_vue_map(devinfo,
&prog_data.base.vue_map, outputs_written,
@@ -168,8 +167,7 @@ brw_codegen_vs_prog(struct brw_context *brw,
: false);
if (0) {
- _mesa_fprint_program_opt(stderr, &vp->program.Base, PROG_PRINT_DEBUG,
- true);
+ _mesa_fprint_program_opt(stderr, &vp->program, PROG_PRINT_DEBUG, true);
}
if (unlikely(brw->perf_debug)) {
@@ -179,7 +177,7 @@ brw_codegen_vs_prog(struct brw_context *brw,
}
if (unlikely(INTEL_DEBUG & DEBUG_VS)) {
- brw_dump_ir("vertex", prog, vs ? &vs->base : NULL, &vp->program.Base);
+ brw_dump_ir("vertex", prog, vs ? &vs->base : NULL, &vp->program);
fprintf(stderr, "VS Output ");
brw_print_vue_map(stderr, &prog_data.base.vue_map);
@@ -187,13 +185,13 @@ brw_codegen_vs_prog(struct brw_context *brw,
int st_index = -1;
if (INTEL_DEBUG & DEBUG_SHADER_TIME)
- st_index = brw_get_shader_time_index(brw, prog, &vp->program.Base, ST_VS);
+ st_index = brw_get_shader_time_index(brw, prog, &vp->program, ST_VS);
/* Emit GEN4 code.
*/
char *error_str;
- program = brw_compile_vs(compiler, brw, mem_ctx, key,
- &prog_data, vp->program.Base.nir,
+ program = brw_compile_vs(compiler, brw, mem_ctx, key, &prog_data,
+ vp->program.nir,
brw_select_clip_planes(&brw->ctx),
!_mesa_is_gles3(&brw->ctx),
st_index, &program_size, &error_str);
@@ -321,9 +319,8 @@ brw_vs_populate_key(struct brw_context *brw,
key->program_string_id = vp->id;
if (ctx->Transform.ClipPlanesEnabled != 0 &&
- (ctx->API == API_OPENGL_COMPAT ||
- ctx->API == API_OPENGLES) &&
- vp->program.Base.ClipDistanceArraySize == 0) {
+ (ctx->API == API_OPENGL_COMPAT || ctx->API == API_OPENGLES) &&
+ vp->program.ClipDistanceArraySize == 0) {
key->nr_userclip_plane_consts =
_mesa_logbase2(ctx->Transform.ClipPlanesEnabled) + 1;
}
@@ -392,8 +389,7 @@ brw_vs_precompile(struct gl_context *ctx,
struct brw_stage_prog_data *old_prog_data = brw->vs.base.prog_data;
bool success;
- struct gl_vertex_program *vp = (struct gl_vertex_program *) prog;
- struct brw_vertex_program *bvp = brw_vertex_program(vp);
+ struct brw_vertex_program *bvp = brw_vertex_program(prog);
memset(&key, 0, sizeof(key));