From 79834f4defc67f76990e21e3a16c55cfa47d4017 Mon Sep 17 00:00:00 2001 From: Dave Airlie Date: Fri, 7 Jan 2022 15:03:47 +1000 Subject: [PATCH] mtypes: move bindless image/sampler objects to shader_types.h Acked-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/mesa/main/mtypes.h | 39 ----------------------------------- src/mesa/main/shader_types.h | 40 ++++++++++++++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 39 deletions(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index a20776be4d4..775db579a42 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -1980,45 +1980,6 @@ struct gl_perf_query_state }; -/** - * A bindless sampler object. - */ -struct gl_bindless_sampler -{ - /** Texture unit (set by glUniform1()). */ - GLubyte unit; - - /** Whether this bindless sampler is bound to a unit. */ - GLboolean bound; - - /** Texture Target (TEXTURE_1D/2D/3D/etc_INDEX). */ - gl_texture_index target; - - /** Pointer to the base of the data. */ - GLvoid *data; -}; - - -/** - * A bindless image object. - */ -struct gl_bindless_image -{ - /** Image unit (set by glUniform1()). */ - GLubyte unit; - - /** Whether this bindless image is bound to a unit. */ - GLboolean bound; - - /** Access qualifier (GL_READ_WRITE, GL_READ_ONLY, GL_WRITE_ONLY, or - * GL_NONE to indicate both read-only and write-only) - */ - GLenum16 access; - - /** Pointer to the base of the data. */ - GLvoid *data; -}; - /** * State common to vertex and fragment programs. */ diff --git a/src/mesa/main/shader_types.h b/src/mesa/main/shader_types.h index 32e4c71c816..ffc17e6c2c9 100644 --- a/src/mesa/main/shader_types.h +++ b/src/mesa/main/shader_types.h @@ -33,6 +33,7 @@ #include "main/config.h" /* for MAX_FEEDBACK_BUFFERS */ #include "main/glheader.h" +#include "main/menums.h" #include "util/mesa-sha1.h" #include "compiler/shader_info.h" #include "compiler/glsl/list.h" @@ -874,4 +875,43 @@ struct gl_uniform_block GLboolean _RowMajor; }; +/** + * A bindless sampler object. + */ +struct gl_bindless_sampler +{ + /** Texture unit (set by glUniform1()). */ + GLubyte unit; + + /** Whether this bindless sampler is bound to a unit. */ + GLboolean bound; + + /** Texture Target (TEXTURE_1D/2D/3D/etc_INDEX). */ + gl_texture_index target; + + /** Pointer to the base of the data. */ + GLvoid *data; +}; + + +/** + * A bindless image object. + */ +struct gl_bindless_image +{ + /** Image unit (set by glUniform1()). */ + GLubyte unit; + + /** Whether this bindless image is bound to a unit. */ + GLboolean bound; + + /** Access qualifier (GL_READ_WRITE, GL_READ_ONLY, GL_WRITE_ONLY, or + * GL_NONE to indicate both read-only and write-only) + */ + GLenum16 access; + + /** Pointer to the base of the data. */ + GLvoid *data; +}; + #endif