summaryrefslogtreecommitdiff
path: root/src/compiler/glsl_types.h
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2020-02-05 14:36:01 -0800
committerMarge Bot <eric+marge@anholt.net>2020-02-24 18:25:02 +0000
commit5072719e66b0f97a572f36e86bd5396ed2ebc915 (patch)
treeee945c454066ac098fb5c56b35fe608631f4c0bd /src/compiler/glsl_types.h
parent12cf484d025e3ed980dbbd8d65f2f9b95c6388db (diff)
downloadmesa-5072719e66b0f97a572f36e86bd5396ed2ebc915.tar.gz
glsl: Factor out the sampler dim coordinate components switch statement.
I want to reuse this in NIR image intrinsics in backends, which just have dim/is_array. Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3728>
Diffstat (limited to 'src/compiler/glsl_types.h')
-rw-r--r--src/compiler/glsl_types.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/compiler/glsl_types.h b/src/compiler/glsl_types.h
index 4b1f0ab09ea..9b64427df67 100644
--- a/src/compiler/glsl_types.h
+++ b/src/compiler/glsl_types.h
@@ -60,10 +60,6 @@ void encode_type_to_blob(struct blob *blob, const struct glsl_type *type);
const struct glsl_type *decode_type_from_blob(struct blob_reader *blob);
-#ifdef __cplusplus
-}
-#endif
-
typedef void (*glsl_type_size_align_func)(const struct glsl_type *type,
unsigned *size, unsigned *align);
@@ -231,6 +227,9 @@ enum glsl_sampler_dim {
GLSL_SAMPLER_DIM_SUBPASS_MS, /* for multisampled vulkan input attachments */
};
+int
+glsl_get_sampler_dim_coordinate_components(enum glsl_sampler_dim dim);
+
enum glsl_matrix_layout {
/**
* The layout of the matrix is inherited from the object containing the
@@ -260,6 +259,8 @@ enum {
};
#ifdef __cplusplus
+} /* extern "C" */
+
#include "GL/gl.h"
#include "util/ralloc.h"
#include "main/menums.h" /* for gl_texture_index, C++'s enum rules are broken */