aboutsummaryrefslogtreecommitdiffstats
path: root/src/mesa/main
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2015-10-27 15:58:59 +0100
committerEduardo Lima Mitev <[email protected]>2016-03-03 15:14:05 +0100
commit45054f9702bd07cd293c1f6c1317eae9530cc4da (patch)
treeb5a5ed1fed0f9e339280d1faff1552e21d0c2985 /src/mesa/main
parent93d30c3de95a1d373285cd7353343817c23dbb64 (diff)
mesa: Add a default QueryInternalFormat() function for drivers
This is a fallback function for drivers not implementing ARB_internalformat_query2. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r--src/mesa/main/formatquery.c16
-rw-r--r--src/mesa/main/formatquery.h5
2 files changed, 21 insertions, 0 deletions
diff --git a/src/mesa/main/formatquery.c b/src/mesa/main/formatquery.c
index 816f12bf9e2..c99dccbd40f 100644
--- a/src/mesa/main/formatquery.c
+++ b/src/mesa/main/formatquery.c
@@ -43,6 +43,22 @@ _mesa_query_samples_for_format(struct gl_context *ctx, GLenum target,
return 1;
}
+/* default implementation of QueryInternalFormat driverfunc, for
+ * drivers not implementing ARB_internalformat_query2.
+ */
+void
+_mesa_query_internal_format_default(struct gl_context *ctx, GLenum target,
+ GLenum internalFormat, GLenum pname,
+ GLint *params)
+{
+ (void) ctx;
+ (void) target;
+ (void) internalFormat;
+ (void) pname;
+ (void) params;
+
+ /* @TODO */
+}
void GLAPIENTRY
_mesa_GetInternalformativ(GLenum target, GLenum internalformat, GLenum pname,
diff --git a/src/mesa/main/formatquery.h b/src/mesa/main/formatquery.h
index 603400059e5..b42299e3128 100644
--- a/src/mesa/main/formatquery.h
+++ b/src/mesa/main/formatquery.h
@@ -32,6 +32,11 @@ size_t
_mesa_query_samples_for_format(struct gl_context *ctx, GLenum target,
GLenum internalFormat, int samples[16]);
+void
+_mesa_query_internal_format_default(struct gl_context *ctx, GLenum target,
+ GLenum internalFormat, GLenum pname,
+ GLint *params);
+
extern void GLAPIENTRY
_mesa_GetInternalformativ(GLenum target, GLenum internalformat,
GLenum pname, GLsizei bufSize, GLint *params);