diff options
author | Jason Ekstrand <jason.ekstrand@intel.com> | 2015-04-02 17:04:28 -0700 |
---|---|---|
committer | Jason Ekstrand <jason.ekstrand@intel.com> | 2015-04-03 14:12:49 -0700 |
commit | 1bd1fc248ce5ecc6882309ab64ec61835fea1eda (patch) | |
tree | feedd8187649aeba352a19cca23efa21b7090e19 /src | |
parent | 52e718097fa7dc808b3e8b43a8fd14a5b2b64797 (diff) |
i965: Use brw_nir_cubemap_normalize for NIR shaders
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_fs_nir.cpp | 3 | ||||
-rw-r--r-- | src/mesa/drivers/dri/i965/brw_shader.cpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp index 0f1659db110..e9692aa5c17 100644 --- a/src/mesa/drivers/dri/i965/brw_fs_nir.cpp +++ b/src/mesa/drivers/dri/i965/brw_fs_nir.cpp @@ -104,6 +104,9 @@ fs_visitor::emit_nir_code() nir_lower_tex_projector(nir); nir_validate_shader(nir); + nir_normalize_cubemap_coords(nir); + nir_validate_shader(nir); + nir_split_var_copies(nir); nir_validate_shader(nir); diff --git a/src/mesa/drivers/dri/i965/brw_shader.cpp b/src/mesa/drivers/dri/i965/brw_shader.cpp index 0dda9bb823d..4ef38829beb 100644 --- a/src/mesa/drivers/dri/i965/brw_shader.cpp +++ b/src/mesa/drivers/dri/i965/brw_shader.cpp @@ -173,7 +173,8 @@ brw_link_shader(struct gl_context *ctx, struct gl_shader_program *shProg) brw_lower_texture_gradients(brw, shader->base.ir); do_vec_index_to_cond_assign(shader->base.ir); lower_vector_insert(shader->base.ir, true); - brw_do_cubemap_normalize(shader->base.ir); + if (options->NirOptions == NULL) + brw_do_cubemap_normalize(shader->base.ir); lower_offset_arrays(shader->base.ir); brw_do_lower_unnormalized_offset(shader->base.ir); lower_noise(shader->base.ir); |