mesa: define nir_spirv_supported_capabilities
authorAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 6 Dec 2017 08:57:18 +0000 (09:57 +0100)
committerAlejandro Piñeiro <apinheiro@igalia.com>
Wed, 6 Dec 2017 21:25:52 +0000 (22:25 +0100)
Until now it was part of spirv_to_nir_options. But it will be used on
the implementation of ARB_gl_spirv and ARB_spirv_extensions, and added
to the OpenGL context, as a way to save what SPIR-V capabilities the
current OpenGL implementation supports.

Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/compiler/spirv/nir_spirv.h
src/mesa/main/mtypes.h

index 43ec19d5a50954223fdea339fdafc5ca28ef6b6e..113bd710a00ca93319649c91bcc6f4b11466776b 100644 (file)
@@ -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" {
@@ -57,18 +58,7 @@ struct spirv_to_nir_options {
     */
    bool lower_workgroup_access_to_offsets;
 
-   struct {
-      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;
-   } caps;
+   struct nir_spirv_supported_capabilities caps;
 
    struct {
       void (*func)(void *private_data,
index b478f6158e2e283c2952260a2a55025b20992506..7da05aa3ee9cef267601bf62605330b2249da468 100644 (file)
@@ -3579,6 +3579,18 @@ 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