summaryrefslogtreecommitdiffstats
path: root/src/compiler/shader_enums.h
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-02-22 16:53:18 -0800
committerEric Anholt <[email protected]>2017-10-10 11:42:04 -0700
commitc34295b1a3e2bd6ddf8a79bbe391aae1e98cd976 (patch)
tree1f66b4d477702e7c913c18352833138c2e73cb61 /src/compiler/shader_enums.h
parente37b32f80c8ed95a3c3f49ba20d6155820c8bba8 (diff)
nir: Move vc4's alpha test lowering to core NIR.
I've been doing this inside of vc4, but vc5 wants it as well and it may be useful for other drivers (Intel has a related path for pre-gen6 with MRT, and freedreno had a TGSI path for it at one point). This required defining a common enum for the standard comparison functions, but other lowering passes are likely to also want that enum. v2: Add to meson.build as well. Acked-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/compiler/shader_enums.h')
-rw-r--r--src/compiler/shader_enums.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/compiler/shader_enums.h b/src/compiler/shader_enums.h
index 2f20e68c5d6..9d229d4199e 100644
--- a/src/compiler/shader_enums.h
+++ b/src/compiler/shader_enums.h
@@ -670,6 +670,23 @@ enum gl_tess_spacing
TESS_SPACING_FRACTIONAL_EVEN,
};
+/**
+ * A compare function enum for use in compiler lowering passes. This is in
+ * the same order as GL's compare functions (shifted down by GL_NEVER), and is
+ * exactly the same as gallium's PIPE_FUNC_*.
+ */
+enum compare_func
+{
+ COMPARE_FUNC_NEVER,
+ COMPARE_FUNC_LESS,
+ COMPARE_FUNC_EQUAL,
+ COMPARE_FUNC_LEQUAL,
+ COMPARE_FUNC_GREATER,
+ COMPARE_FUNC_NOTEQUAL,
+ COMPARE_FUNC_GEQUAL,
+ COMPARE_FUNC_ALWAYS,
+};
+
#ifdef __cplusplus
} /* extern "C" */
#endif