aboutsummaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorJason Ekstrand <[email protected]>2016-07-20 20:32:31 -0700
committerJason Ekstrand <[email protected]>2016-07-22 16:48:53 -0700
commitd9156efc5292b4ac7cea9d12e68882fc7b5da5fd (patch)
tree63e329f50e45f3b3ade53eb690851cb05db5ea42 /src/compiler/nir/nir.h
parent843fc8f3e782379899976f6f6f6dcdeb58153fa1 (diff)
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 <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]> Cc: "12.0" <[email protected]>
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 5a69e7858d4..f23d0b256a8 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.