From 30c63571133ed50907ec14172c2f3ef82ee8a34e Mon Sep 17 00:00:00 2001 From: Jason Ekstrand Date: Wed, 30 Sep 2015 17:01:03 -0700 Subject: i965: Move prog_data uniform setup to the codegen level As of now, uniform setup is more-or-less unified between vec4 and fs and no longer requires the fs_visitor. This makes uniform setup more of a language/API thing than a backend compiler thing. This commit moves setting up the stage_prog_data.params arrays to the same place as we set up the rest of stage_prog_data. Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_wm.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'src/mesa/drivers/dri/i965/brw_wm.c') diff --git a/src/mesa/drivers/dri/i965/brw_wm.c b/src/mesa/drivers/dri/i965/brw_wm.c index 69e4aecd2d2..13139144f89 100644 --- a/src/mesa/drivers/dri/i965/brw_wm.c +++ b/src/mesa/drivers/dri/i965/brw_wm.c @@ -35,7 +35,7 @@ #include "program/prog_parameter.h" #include "program/program.h" #include "intel_mipmap_tree.h" -#include "glsl/nir/nir.h" +#include "brw_nir.h" #include "util/ralloc.h" @@ -211,6 +211,14 @@ brw_codegen_wm_prog(struct brw_context *brw, prog_data.base.nr_image_params); prog_data.base.nr_params = param_count; + if (prog) { + brw_nir_setup_glsl_uniforms(fp->program.Base.nir, prog, &fp->program.Base, + &prog_data.base, true); + } else { + brw_nir_setup_arb_uniforms(fp->program.Base.nir, &fp->program.Base, + &prog_data.base); + } + prog_data.barycentric_interp_modes = brw_compute_barycentric_interp_modes(brw, key->flat_shade, key->persample_shading, -- cgit v1.2.3