summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorJason Ekstrand <jason.ekstrand@intel.com>2016-07-20 20:32:31 -0700
committerJason Ekstrand <jason.ekstrand@intel.com>2016-07-22 16:48:53 -0700
commitd9156efc5292b4ac7cea9d12e68882fc7b5da5fd (patch)
tree63e329f50e45f3b3ade53eb690851cb05db5ea42 /src/compiler/nir/nir.h
parent843fc8f3e782379899976f6f6f6dcdeb58153fa1 (diff)
downloadexternal_mesa3d-d9156efc5292b4ac7cea9d12e68882fc7b5da5fd.zip
external_mesa3d-d9156efc5292b4ac7cea9d12e68882fc7b5da5fd.tar.gz
external_mesa3d-d9156efc5292b4ac7cea9d12e68882fc7b5da5fd.tar.bz2
nir/lower_tex: Add support for lowering coordinate offsets
On i965, we can't support coordinate offsets for texelFetch or rectangle textures. Previously, we were doing this with a GLSL pass but we need to do it in NIR if we want those workarounds for SPIR-V. Signed-off-by: Jason Ekstrand <jason@jlekstrand.net> Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Cc: "12.0" <mesa-dev@lists.freedesktop.org>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index 5a69e78..f23d0b2 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2409,6 +2409,16 @@ typedef struct nir_lower_tex_options {
unsigned lower_txp;
/**
+ * If true, lower away nir_tex_src_offset for all texelfetch instructions.
+ */
+ bool lower_txf_offset;
+
+ /**
+ * If true, lower away nir_tex_src_offset for all rect textures.
+ */
+ bool lower_rect_offset;
+
+ /**
* If true, lower rect textures to 2D, using txs to fetch the
* texture dimensions and dividing the texture coords by the
* texture dims to normalize.