[Mesa-dev] [PATCH v3] mesa/spirv: move and rename nir_spirv_supported_capabilities

Pierre Moreau pierre.morrow at free.fr
Thu Dec 7 19:42:46 UTC 2017


Thank you for the changes!

Reviewed-by: Pierre Moreau <pierre.morrow at free.fr>

On 2017-12-07 — 17:12, Alejandro Piñeiro wrote:
> To avoid any vulkan driver to include the GL mtypes.h. Renamed as
> eventually this could be used by drivers not using nir.
> 
> v2: remove compiler/spirv/spirv.h from mtypes (Alejandro)
> v3: added the definition at compiler/shader_info.h (Jason Ekstrand)
> ---
> 
> Sorry for not realizing that spirv.h was a generated file. I also
> preferred to add it to shader_info.h. Both options 2 and 3 seemed
> somewhat an overkill
> 
>  src/compiler/shader_info.h     | 13 +++++++++++++
>  src/compiler/spirv/nir_spirv.h |  4 ++--
>  src/mesa/main/mtypes.h         | 13 -------------
>  3 files changed, 15 insertions(+), 15 deletions(-)
> 
> diff --git a/src/compiler/shader_info.h b/src/compiler/shader_info.h
> index bcb3f0fffac..c9140ba9752 100644
> --- a/src/compiler/shader_info.h
> +++ b/src/compiler/shader_info.h
> @@ -31,6 +31,19 @@
>  extern "C" {
>  #endif
>  
> +struct spirv_supported_capabilities {
> +   bool float64;
> +   bool image_ms_array;
> +   bool tessellation;
> +   bool draw_parameters;
> +   bool image_read_without_format;
> +   bool image_write_without_format;
> +   bool int64;
> +   bool multiview;
> +   bool variable_pointers;
> +   bool storage_16bit;
> +};
> +
>  typedef struct shader_info {
>     const char *name;
>  
> diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h
> index 113bd710a00..a2c40e57d18 100644
> --- a/src/compiler/spirv/nir_spirv.h
> +++ b/src/compiler/spirv/nir_spirv.h
> @@ -29,7 +29,7 @@
>  #define _NIR_SPIRV_H_
>  
>  #include "compiler/nir/nir.h"
> -#include "main/mtypes.h"
> +#include "compiler/shader_info.h"
>  
>  #ifdef __cplusplus
>  extern "C" {
> @@ -58,7 +58,7 @@ struct spirv_to_nir_options {
>      */
>     bool lower_workgroup_access_to_offsets;
>  
> -   struct nir_spirv_supported_capabilities caps;
> +   struct spirv_supported_capabilities caps;
>  
>     struct {
>        void (*func)(void *private_data,
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 7b7137624c7..397b113dfbc 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -3578,19 +3578,6 @@ struct gl_program_constants
>     GLuint MaxShaderStorageBlocks;
>  };
>  
> -struct nir_spirv_supported_capabilities {
> -   bool float64;
> -   bool image_ms_array;
> -   bool tessellation;
> -   bool draw_parameters;
> -   bool image_read_without_format;
> -   bool image_write_without_format;
> -   bool int64;
> -   bool multiview;
> -   bool variable_pointers;
> -   bool storage_16bit;
> -};
> -
>  /**
>   * Constants which may be overridden by device driver during context creation
>   * but are never changed after that.
> -- 
> 2.11.0
> 
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20171207/0af3c4fd/attachment.sig>


More information about the mesa-dev mailing list