nir: make nir_get_texture_size/lod available outside nir_lower_tex

This functions can be useful in other places.

Signed-off-by: Gert Wollny <gert.wollny@collabora.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3286>
This commit is contained in:
Gert Wollny
2019-12-22 17:35:56 +01:00
committed by Gert Wollny
parent f69bf7fe8c
commit 6c9495b392
3 changed files with 117 additions and 110 deletions

View File

@@ -49,6 +49,12 @@ nir_ssa_def* nir_upsample(nir_builder *b, nir_ssa_def *hi, nir_ssa_def *lo);
nir_ssa_def* nir_atan(nir_builder *b, nir_ssa_def *y_over_x);
nir_ssa_def* nir_atan2(nir_builder *b, nir_ssa_def *y, nir_ssa_def *x);
nir_ssa_def *
nir_get_texture_lod(nir_builder *b, nir_tex_instr *tex);
nir_ssa_def *
nir_get_texture_size(nir_builder *b, nir_tex_instr *tex);
static inline nir_ssa_def *
nir_nan_check2(nir_builder *b, nir_ssa_def *x, nir_ssa_def *y, nir_ssa_def *res)
{