diff options
Diffstat (limited to 'mesalib/src/gallium/auxiliary/util/u_format.h')
-rw-r--r-- | mesalib/src/gallium/auxiliary/util/u_format.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mesalib/src/gallium/auxiliary/util/u_format.h b/mesalib/src/gallium/auxiliary/util/u_format.h index 84f16d503..dc777c35c 100644 --- a/mesalib/src/gallium/auxiliary/util/u_format.h +++ b/mesalib/src/gallium/auxiliary/util/u_format.h @@ -544,6 +544,17 @@ util_format_is_depth_and_stencil(enum pipe_format format) util_format_has_stencil(desc); } + +/** + * Calculates the MRD for the depth format. MRD is used in depth bias + * for UNORM and unbound depth buffers. When the depth buffer is floating + * point, the depth bias calculation does not use the MRD. However, the + * default MRD will be 1.0 / ((1 << 24) - 1). + */ +double +util_get_depth_format_mrd(enum pipe_format format); + + /** * Return whether this is an RGBA, Z, S, or combined ZS format. * Useful for initializing pipe_blit_info::mask. |