diff options
author | Stéphane Marchesin <[email protected]> | 2011-06-27 22:40:03 -0700 |
---|---|---|
committer | Stéphane Marchesin <[email protected]> | 2011-06-28 00:59:40 -0700 |
commit | 6f62a25448b765867ca9f424870abf5108d3a96d (patch) | |
tree | d32cce11158b123cb3951ae25a45311cf35ef35d /src/gallium/drivers/i915/i915_state_inlines.h | |
parent | 24137afb315007c4e686b494d4565c5bd3d2d97f (diff) |
i915g: fix shadow compare.
"Works" as well as i915c now.
Diffstat (limited to 'src/gallium/drivers/i915/i915_state_inlines.h')
-rw-r--r-- | src/gallium/drivers/i915/i915_state_inlines.h | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/src/gallium/drivers/i915/i915_state_inlines.h b/src/gallium/drivers/i915/i915_state_inlines.h index b589117fbfe..aa992f75c51 100644 --- a/src/gallium/drivers/i915/i915_state_inlines.h +++ b/src/gallium/drivers/i915/i915_state_inlines.h @@ -60,6 +60,31 @@ i915_translate_compare_func(unsigned func) } static INLINE unsigned +i915_translate_shadow_compare_func(unsigned func) +{ + switch (func) { + case PIPE_FUNC_NEVER: + return COMPAREFUNC_ALWAYS; + case PIPE_FUNC_LESS: + return COMPAREFUNC_LEQUAL; + case PIPE_FUNC_LEQUAL: + return COMPAREFUNC_LESS; + case PIPE_FUNC_GREATER: + return COMPAREFUNC_GEQUAL; + case PIPE_FUNC_GEQUAL: + return COMPAREFUNC_GREATER; + case PIPE_FUNC_NOTEQUAL: + return COMPAREFUNC_EQUAL; + case PIPE_FUNC_EQUAL: + return COMPAREFUNC_NOTEQUAL; + case PIPE_FUNC_ALWAYS: + return COMPAREFUNC_NEVER; + default: + return COMPAREFUNC_NEVER; + } +} + +static INLINE unsigned i915_translate_stencil_op(unsigned op) { switch (op) { |