diff options
author | Jason Ekstrand <[email protected]> | 2015-09-30 17:01:03 -0700 |
---|---|---|
committer | Jason Ekstrand <[email protected]> | 2015-10-02 14:22:53 -0700 |
commit | 30c63571133ed50907ec14172c2f3ef82ee8a34e (patch) | |
tree | e650f0c863422dd22d38cc37f6326c1f3be5214a /src/mesa/drivers/dri/i965/brw_wm.c | |
parent | ea006c4cb5eb2d98d6bfd5a6c32fcae10b636f17 (diff) |
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 <[email protected]>
Diffstat (limited to 'src/mesa/drivers/dri/i965/brw_wm.c')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_wm.c | 10 |
1 files changed, 9 insertions, 1 deletions
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, |