summaryrefslogtreecommitdiffstats
path: root/src/mesa/drivers/common/meta.h
diff options
context:
space:
mode:
authorNeil Roberts <[email protected]>2014-07-31 14:07:50 +0100
committerNeil Roberts <[email protected]>2014-08-12 18:23:50 +0100
commita018a3f3f5542534fd3b274673ef2c2e9c2c2c05 (patch)
tree498a56114768f834358a1ebab5d71770c25d89cf /src/mesa/drivers/common/meta.h
parent817051ab5b71b2c00e20f1b92ccf69c71e7ab70e (diff)
mesa/meta: Support decompressing floating-point formats
Previously the Meta implementation of glGetTexImage would fall back to _mesa_get_teximage if the texturing is not using an unsigned normalised format. However in order to support the half-float formats of BPTC textures we can make it render to a floating-point renderbuffer instead. This patch makes decompression_state have two FBOs, one for the GL_RGBA format and one for GL_RGBA32F. If a floating-point texture is encountered it will try setting up a floating-point FBO. It will now also check the status of the FBO and fall back to _mesa_get_teximage if the FBO is not complete. Reviewed-by: Ian Romanick <[email protected]>
Diffstat (limited to 'src/mesa/drivers/common/meta.h')
-rw-r--r--src/mesa/drivers/common/meta.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/mesa/drivers/common/meta.h b/src/mesa/drivers/common/meta.h
index e2da2f4278c..3ec73982258 100644
--- a/src/mesa/drivers/common/meta.h
+++ b/src/mesa/drivers/common/meta.h
@@ -343,13 +343,23 @@ struct gen_mipmap_state
};
/**
+ * One of the FBO states for decompress_state. There will be one for each
+ * required renderbuffer format.
+ */
+struct decompress_fbo_state
+{
+ GLuint FBO, RBO;
+ GLint Width, Height;
+};
+
+/**
* State for texture decompression
*/
struct decompress_state
{
GLuint VAO;
- GLuint VBO, FBO, RBO, Sampler;
- GLint Width, Height;
+ struct decompress_fbo_state byteFBO, floatFBO;
+ GLuint VBO, Sampler;
struct blit_shader_table shaders;
};