spirv/radv: add AMD_gcn_shader capability, remove current extensions
authorAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 8 Mar 2018 11:43:00 +0000 (12:43 +0100)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Thu, 15 Mar 2018 11:08:25 +0000 (12:08 +0100)
commit50767214a790889120975bf0f598996c4f887dfc
tree7801e11655931f4dab04766614d4f78dc1a1814e
parentadf58e59d3d2639ee214087f94bf7a079f8cd9a8
spirv/radv: add AMD_gcn_shader capability, remove current extensions

So now, during spirv_to_nir, it uses the capability instead of the
extension. Note that we are really doing here is treating
SPV_AMD_gcn_shader as other supported extensions. SPV_AMD_gcn_shader
is not the first SPV extension supported. For example, the capability
draw_parameters infers if the extension SPV_KHR_shader_draw_parameters
is supported or not.

This could be seen as counter-intuitive, and that it would be easier
to define which extensions are supported, and based our checks on
that, but we need to take into account that some capabilities are
optional from core, and others came from new extensions.

Also this commit would make the implementation of ARB_spirv_extensions
easier.

v2: AMD_gcn_shader capability renamed to gcn_shader (Daniel Schürmann)

Reviewed-by: Daniel Schürmann <daniel.schuermann@campus.tu-berlin.de>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_shader.c
src/compiler/shader_info.h
src/compiler/spirv/nir_spirv.h
src/compiler/spirv/spirv_to_nir.c