[Mesa-dev] [PATCH v3 03/14] spirv: Add support for SPV_KHR_multiview

Bas Nieuwenhuizen bas at basnieuwenhuizen.nl
Thu Apr 27 21:03:13 UTC 2017


Patch 1-3 are

Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>

On Thu, Apr 27, 2017 at 6:31 PM, Jason Ekstrand <jason at jlekstrand.net> wrote:
> Reviewed-by: Iago Toral Quiroga <itoral at igalia.com>
> ---
>  src/compiler/spirv/nir_spirv.h     | 1 +
>  src/compiler/spirv/spirv_to_nir.c  | 4 ++++
>  src/compiler/spirv/vtn_variables.c | 4 ++++
>  3 files changed, 9 insertions(+)
>
> diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h
> index 1779d1c..7f16866 100644
> --- a/src/compiler/spirv/nir_spirv.h
> +++ b/src/compiler/spirv/nir_spirv.h
> @@ -50,6 +50,7 @@ struct nir_spirv_supported_extensions {
>     bool image_read_without_format;
>     bool image_write_without_format;
>     bool int64;
> +   bool multiview;
>  };
>
>  nir_function *spirv_to_nir(const uint32_t *words, size_t word_count,
> diff --git a/src/compiler/spirv/spirv_to_nir.c b/src/compiler/spirv/spirv_to_nir.c
> index d3ad2d1..c120ad6 100644
> --- a/src/compiler/spirv/spirv_to_nir.c
> +++ b/src/compiler/spirv/spirv_to_nir.c
> @@ -2730,6 +2730,10 @@ vtn_handle_preamble_instruction(struct vtn_builder *b, SpvOp opcode,
>           spv_check_supported(image_write_without_format, cap);
>           break;
>
> +      case SpvCapabilityMultiView:
> +         spv_check_supported(multiview, cap);
> +         break;
> +
>        default:
>           unreachable("Unhandled capability");
>        }
> diff --git a/src/compiler/spirv/vtn_variables.c b/src/compiler/spirv/vtn_variables.c
> index 293d07d..365e562 100644
> --- a/src/compiler/spirv/vtn_variables.c
> +++ b/src/compiler/spirv/vtn_variables.c
> @@ -1036,6 +1036,10 @@ vtn_get_builtin_location(struct vtn_builder *b,
>        *location = SYSTEM_VALUE_DRAW_ID;
>        set_mode_system_value(mode);
>        break;
> +   case SpvBuiltInViewIndex:
> +      *location = SYSTEM_VALUE_VIEW_INDEX;
> +      set_mode_system_value(mode);
> +      break;
>     case SpvBuiltInHelperInvocation:
>     default:
>        unreachable("unsupported builtin");
> --
> 2.5.0.400.gff86faf
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list