summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorEduardo Lima Mitev <[email protected]>2015-10-27 15:18:45 +0100
committerEduardo Lima Mitev <[email protected]>2016-03-03 15:14:05 +0100
commit93d30c3de95a1d373285cd7353343817c23dbb64 (patch)
treee0618d2e0150f6efafecc0fe184fe535a6a127af /src
parent283c8372cb74c3728c7837a85480251313cf002b (diff)
mesa: Add QueryInternalFormat to device driver virtual table
This new function queries different driver parameters for a particular target and texture format. It is basically a driver hook to support ARB_internalformat_query2. Since ARB_internalformat_query2 introduced several new query parameters over ARB_internalformat_query, having one driver hook for each parameter is no longer feasible. So this is the generic entry-point for calls to glGetInternalFormativ and glGetInternalFormati64v. Reviewed-by: Dave Airlie <[email protected]>
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/dd.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/mesa/main/dd.h b/src/mesa/main/dd.h
index 3f5aa5db051..2f151c29654 100644
--- a/src/mesa/main/dd.h
+++ b/src/mesa/main/dd.h
@@ -202,6 +202,26 @@ struct dd_function_table {
int samples[16]);
/**
+ * Queries different driver parameters for a particular target and format.
+ * Since ARB_internalformat_query2 introduced several new query parameters
+ * over ARB_internalformat_query, having one driver hook for each parameter
+ * is no longer feasible. So this is the generic entry-point for calls
+ * to glGetInternalFormativ and glGetInternalFormati64v, after Mesa has
+ * checked errors and default values.
+ *
+ * \param ctx GL context
+ * \param target GL target enum
+ * \param internalFormat GL format enum
+ * \param pname GL enum that specifies the info to query.
+ * \param params Buffer to hold the result of the query.
+ */
+ void (*QueryInternalFormat)(struct gl_context *ctx,
+ GLenum target,
+ GLenum internalFormat,
+ GLenum pname,
+ GLint *params);
+
+ /**
* Called by glTexImage[123]D() and glCopyTexImage[12]D()
* Allocate texture memory and copy the user's image to the buffer.
* The gl_texture_image fields, etc. will be fully initialized.