Mesa (master): i965: Enable ChooseTexFormat for supported GL_EXT_texture_integer formats.
Eric Anholt
anholt at kemper.freedesktop.org
Thu Nov 10 00:11:58 UTC 2011
Module: Mesa
Branch: master
Commit: a00c5a71cd95d340f9ba54a0360f654414d627d2
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=a00c5a71cd95d340f9ba54a0360f654414d627d2
Author: Eric Anholt <eric at anholt.net>
Date: Wed Oct 5 13:42:19 2011 -0700
i965: Enable ChooseTexFormat for supported GL_EXT_texture_integer formats.
v2: s/GL_TRUE/true/, and re-enable RGB_INT32 based on discussion
yesterday about required RB formats vs texture formats.
Reviewed-by: Kenneth Graunke <kenneth at whitecape.org> (v1)
---
src/mesa/drivers/dri/intel/intel_context.c | 30 ++++++++++++++++++++++++++++
1 files changed, 30 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_context.c b/src/mesa/drivers/dri/intel/intel_context.c
index 3e10ce0..d00d5d4 100644
--- a/src/mesa/drivers/dri/intel/intel_context.c
+++ b/src/mesa/drivers/dri/intel/intel_context.c
@@ -710,6 +710,36 @@ intelInitContext(struct intel_context *intel,
ctx->TextureFormatSupported[MESA_FORMAT_SLA8] = true;
}
+ if (intel->gen >= 4) {
+ /* Each combination of 32-bit ints are supported, but the RGB 32-bit ints
+ * don't support use as a render target (GPU hangs).
+ */
+ ctx->TextureFormatSupported[MESA_FORMAT_R_INT32] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RG_INT32] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGB_INT32] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGBA_INT32] = true;
+
+ ctx->TextureFormatSupported[MESA_FORMAT_R_UINT32] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RG_UINT32] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGB_UINT32] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGBA_UINT32] = true;
+
+ /* For 16 and 8 bits, RGB is unsupported entirely. */
+ ctx->TextureFormatSupported[MESA_FORMAT_R_UINT16] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RG_UINT16] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGBA_UINT16] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_R_INT16] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RG_INT16] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGBA_INT16] = true;
+
+ ctx->TextureFormatSupported[MESA_FORMAT_R_UINT8] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RG_UINT8] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGBA_UINT8] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_R_INT8] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RG_INT8] = true;
+ ctx->TextureFormatSupported[MESA_FORMAT_RGBA_INT8] = true;
+ }
+
#ifdef TEXTURE_FLOAT_ENABLED
ctx->TextureFormatSupported[MESA_FORMAT_RGBA_FLOAT32] = true;
ctx->TextureFormatSupported[MESA_FORMAT_RG_FLOAT32] = true;
More information about the mesa-commit
mailing list