Mesa (7.9): i915: Disallow alpha, red, RG, and sRGB as render targets
Ian Romanick
idr at kemper.freedesktop.org
Wed Dec 15 23:15:09 UTC 2010
Module: Mesa
Branch: 7.9
Commit: 1cfd517b15fb4d75e6dd83fb11533767f9fd3c55
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=1cfd517b15fb4d75e6dd83fb11533767f9fd3c55
Author: Ian Romanick <ian.d.romanick at intel.com>
Date: Wed Dec 15 15:11:01 2010 -0800
i915: Disallow alpha, red, RG, and sRGB as render targets
Fixes bugzilla #31832
NOTE: This is a candidate for the 7.9 branch.
(cherry picked from commit 78a340fd487c56468ace7347a53f95a0c751c419)
---
src/mesa/drivers/dri/intel/intel_fbo.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/mesa/drivers/dri/intel/intel_fbo.c b/src/mesa/drivers/dri/intel/intel_fbo.c
index 39d9eab..1761385 100644
--- a/src/mesa/drivers/dri/intel/intel_fbo.c
+++ b/src/mesa/drivers/dri/intel/intel_fbo.c
@@ -439,10 +439,12 @@ intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb,
irb->Base.DataType = GL_UNSIGNED_BYTE;
DBG("Render to XGBA8 texture OK\n");
}
+#ifndef I915
else if (texImage->TexFormat == MESA_FORMAT_SARGB8) {
irb->Base.DataType = GL_UNSIGNED_BYTE;
DBG("Render to SARGB8 texture OK\n");
}
+#endif
else if (texImage->TexFormat == MESA_FORMAT_RGB565) {
irb->Base.DataType = GL_UNSIGNED_BYTE;
DBG("Render to RGB5 texture OK\n");
@@ -455,10 +457,12 @@ intel_update_wrapper(GLcontext *ctx, struct intel_renderbuffer *irb,
irb->Base.DataType = GL_UNSIGNED_BYTE;
DBG("Render to ARGB4444 texture OK\n");
}
+#ifndef I915
else if (texImage->TexFormat == MESA_FORMAT_A8) {
irb->Base.DataType = GL_UNSIGNED_BYTE;
DBG("Render to A8 texture OK\n");
}
+#endif
else if (texImage->TexFormat == MESA_FORMAT_Z16) {
irb->Base.DataType = GL_UNSIGNED_SHORT;
DBG("Render to DEPTH16 texture OK\n");
@@ -665,11 +669,13 @@ intel_validate_framebuffer(GLcontext *ctx, struct gl_framebuffer *fb)
switch (irb->Base.Format) {
case MESA_FORMAT_ARGB8888:
case MESA_FORMAT_XRGB8888:
- case MESA_FORMAT_SARGB8:
case MESA_FORMAT_RGB565:
case MESA_FORMAT_ARGB1555:
case MESA_FORMAT_ARGB4444:
+#ifndef I915
+ case MESA_FORMAT_SARGB8:
case MESA_FORMAT_A8:
+#endif
break;
default:
fb->_Status = GL_FRAMEBUFFER_UNSUPPORTED_EXT;
More information about the mesa-commit
mailing list