[Mesa-dev] [PATCH v2 09/25] mesa: move nir_spirv_supported_capabilities definition
Timothy Arceri
tarceri at itsqueeze.com
Wed Dec 6 09:23:55 UTC 2017
Can we get away with forward declaring this?
There is a section at the top of mtypes you can add it to:
* \name Some forward type declarations
On 01/12/17 04:28, Eduardo Lima Mitev wrote:
> From: Alejandro PiƱeiro <apinheiro at igalia.com>
>
> Due gl_spirv we will use it on more places, specifically on
> gl_constants, where we would like to use it without a pointer.
> ---
> src/compiler/spirv/nir_spirv.h | 15 ++-------------
> src/mesa/main/mtypes.h | 11 +++++++++++
> 2 files changed, 13 insertions(+), 13 deletions(-)
>
> diff --git a/src/compiler/spirv/nir_spirv.h b/src/compiler/spirv/nir_spirv.h
> index 0204e81d091..a14b55cdd4b 100644
> --- a/src/compiler/spirv/nir_spirv.h
> +++ b/src/compiler/spirv/nir_spirv.h
> @@ -28,7 +28,8 @@
> #ifndef _NIR_SPIRV_H_
> #define _NIR_SPIRV_H_
>
> -#include "nir/nir.h"
> +#include "compiler/nir/nir.h"
> +#include "main/mtypes.h"
>
> #ifdef __cplusplus
> extern "C" {
> @@ -42,18 +43,6 @@ struct nir_spirv_specialization {
> };
> };
>
> -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;
> -};
> -
> nir_function *spirv_to_nir(const uint32_t *words, size_t word_count,
> struct nir_spirv_specialization *specializations,
> unsigned num_specializations,
> diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
> index 50a47e0a65d..c8177c9a99a 100644
> --- a/src/mesa/main/mtypes.h
> +++ b/src/mesa/main/mtypes.h
> @@ -3583,6 +3583,17 @@ 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;
> +};
>
> /**
> * Constants which may be overridden by device driver during context creation
>
More information about the mesa-dev
mailing list