[Mesa-dev] [PATCH] radeonsi/nir: add depth layout to scan pass
Samuel Pitoiset
samuel.pitoiset at gmail.com
Fri Feb 9 12:58:10 UTC 2018
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
On 02/09/2018 11:09 AM, Timothy Arceri wrote:
> ---
> src/gallium/drivers/radeonsi/si_shader_nir.c | 19 +++++++++++++++++++
> 1 file changed, 19 insertions(+)
>
> diff --git a/src/gallium/drivers/radeonsi/si_shader_nir.c b/src/gallium/drivers/radeonsi/si_shader_nir.c
> index d42ed5edcc..22787baec3 100644
> --- a/src/gallium/drivers/radeonsi/si_shader_nir.c
> +++ b/src/gallium/drivers/radeonsi/si_shader_nir.c
> @@ -279,6 +279,25 @@ void si_nir_scan_shader(const struct nir_shader *nir,
> if (nir->info.stage == MESA_SHADER_FRAGMENT) {
> info->properties[TGSI_PROPERTY_FS_EARLY_DEPTH_STENCIL] = nir->info.fs.early_fragment_tests;
> info->properties[TGSI_PROPERTY_FS_POST_DEPTH_COVERAGE] = nir->info.fs.post_depth_coverage;
> +
> + if (nir->info.fs.depth_layout != FRAG_DEPTH_LAYOUT_NONE) {
> + switch (nir->info.fs.depth_layout) {
> + case FRAG_DEPTH_LAYOUT_ANY:
> + info->properties[TGSI_PROPERTY_FS_DEPTH_LAYOUT] = TGSI_FS_DEPTH_LAYOUT_ANY;
> + break;
> + case FRAG_DEPTH_LAYOUT_GREATER:
> + info->properties[TGSI_PROPERTY_FS_DEPTH_LAYOUT] = TGSI_FS_DEPTH_LAYOUT_GREATER;
> + break;
> + case FRAG_DEPTH_LAYOUT_LESS:
> + info->properties[TGSI_PROPERTY_FS_DEPTH_LAYOUT] = TGSI_FS_DEPTH_LAYOUT_LESS;
> + break;
> + case FRAG_DEPTH_LAYOUT_UNCHANGED:
> + info->properties[TGSI_PROPERTY_FS_DEPTH_LAYOUT] = TGSI_FS_DEPTH_LAYOUT_UNCHANGED;
> + break;
> + default:
> + unreachable("Unknow depth layout");
> + }
> + }
> }
>
> if (nir->info.stage == MESA_SHADER_COMPUTE) {
>
More information about the mesa-dev
mailing list