summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir.h
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2016-04-19 08:28:22 -0400
committerRob Clark <[email protected]>2016-04-19 17:13:50 -0400
commiteddfc977096c63dc9699b63b05ad0e1212680fb1 (patch)
tree43504361d69dbfaf60f14b403e47ea1aec57857e /src/compiler/nir/nir.h
parenteb00a0fc581c4040bc2e4640da4ff9f40c951ae8 (diff)
nir/lower-tex: add srgb->linear lowering
Signed-off-by: Rob Clark <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Jason Ekstrand <[email protected]>
Diffstat (limited to 'src/compiler/nir/nir.h')
-rw-r--r--src/compiler/nir/nir.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h
index bbbc2089db3..3b82cfac1b5 100644
--- a/src/compiler/nir/nir.h
+++ b/src/compiler/nir/nir.h
@@ -2301,6 +2301,13 @@ typedef struct nir_lower_tex_options {
* while 4 and 5 represent 0 and 1 respectively.
*/
uint8_t swizzles[32][4];
+
+ /**
+ * Bitmap of textures that need srgb to linear conversion. If
+ * (lower_srgb & (1 << texture_index)) then the rgb (xyz) components
+ * of the texture are lowered to linear.
+ */
+ unsigned lower_srgb;
} nir_lower_tex_options;
bool nir_lower_tex(nir_shader *shader,