// Copyright (c) 2019-2020 NVIDIA Corporation
//
// SPDX-License-Identifier: CC-BY-4.0

include::{generated}/meta/{refprefix}VK_NV_coverage_reduction_mode.adoc[]

=== Other Extension Metadata

*Last Modified Date*::
  2019-01-29
*Contributors*::
  - Kedarnath Thangudu, NVIDIA
  - Jeff Bolz, NVIDIA

=== Description

When using a framebuffer with mixed samples, a per-fragment coverage
reduction operation is performed which generates color sample coverage from
the pixel coverage.
This extension defines the following modes to control how this reduction is
performed.

  * Merge: When there are more samples in the pixel coverage than color
    samples, there is an implementation-dependent association of each pixel
    coverage sample to a color sample.
    In the merge mode, the color sample coverage is computed such that only
    if any associated sample in the pixel coverage is covered, the color
    sample is covered.
    This is the default mode.

  * Truncate: When there are more raster samples (N) than color samples(M),
    there is one to one association of the first M raster samples to the M
    color samples; other raster samples are ignored.

When the number of raster samples is equal to the color samples, there is a
one to one mapping between them in either of the above modes.

The new command
flink:vkGetPhysicalDeviceSupportedFramebufferMixedSamplesCombinationsNV can
be used to query the various raster, color, depth/stencil sample count and
reduction mode combinations that are supported by the implementation.
This extension would allow an implementation to support the behavior of both
`VK_NV_framebuffer_mixed_samples` and `VK_AMD_mixed_attachment_samples`
extensions simultaneously.

include::{generated}/interfaces/VK_NV_coverage_reduction_mode.adoc[]

=== Version History

  * Revision 1, 2019-01-29 (Kedarnath Thangudu)
  ** Internal revisions
