[Mesa-dev] [PATCH 14/17] i965: Disable rendering to integer GL_RGB textures.
Eric Anholt
eric at anholt.net
Fri Jan 20 15:39:26 PST 2012
We can't really do this because we don't have support for forcing the
alpha to 1 when it gets used for other purposes (readpixels,
texturing).
Fixes the last failure in EXT_texture_integer/fbo-blending
NOTE: This is a candidate for the 8.0 branch.
---
src/mesa/drivers/dri/i965/brw_wm_surface_state.c | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
index f203f98..b1be5e8 100644
--- a/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
+++ b/src/mesa/drivers/dri/i965/brw_wm_surface_state.c
@@ -599,6 +599,13 @@ brw_render_target_supported(struct intel_context *intel,
struct brw_context *brw = brw_context(&intel->ctx);
gl_format format = rb->Format;
+ /* Our GL_RGB formats are promoted to RGBA, but we can't use the alpha
+ * blending trick to force alpha to one like we do for normalized surfaces,
+ * since the hardware can't do blending to integer render targets.
+ */
+ if (rb->_BaseFormat == GL_RGB && _mesa_is_format_integer_color(rb->Format))
+ return false;
+
return brw->format_supported_as_render_target[format];
}
--
1.7.7.3
More information about the mesa-dev
mailing list