i965: Claim to support rendering to integer FBOs.
authorEric Anholt <eric@anholt.net>
Wed, 2 Nov 2011 20:51:38 +0000 (13:51 -0700)
committerEric Anholt <eric@anholt.net>
Wed, 9 Nov 2011 20:59:20 +0000 (12:59 -0800)
We're missing support for the software paths still, but basic
rendering is working.

v2: Override RGB_INT32/UINT32 to not be renderable, since the hardware
    can't do it but we do allow texturing from it now.  Drop the
    DataType override, since the _mesa_problem() isn't in that path
    any more.

Reviewed-by: Kenneth Graunke <kenneth@whitecape.org> (v1)
src/mesa/drivers/dri/i965/brw_wm_surface_state.c
src/mesa/drivers/dri/intel/intel_span.c

index 335962217a913fd041b646034406918d9d99f16c..0a00ab9b1668e7e510a24bd5cf6b3d950bee0f52 100644 (file)
@@ -174,6 +174,13 @@ brw_render_target_supported(gl_format format)
    if (format == MESA_FORMAT_RGBA_FLOAT32)
       return true;
 
+   /* While we can texture from these formats, they're not actually supported
+    * for rendering.
+    */
+   if (format == MESA_FORMAT_RGB_UINT32 ||
+       format == MESA_FORMAT_RGB_INT32)
+      return false;
+
    /* Not exactly true, as some of those formats are not renderable.
     * But at least we know how to translate them.
     */
index 191f7761d97105a6b24fefb46ba87d12c785d8f1..478aec86a0261ddbf2026c3afb0e745027ebf03d 100644 (file)
@@ -421,7 +421,12 @@ static span_init_func intel_span_init_funcs[MESA_FORMAT_COUNT] =
 bool
 intel_span_supports_format(gl_format format)
 {
-   return intel_span_init_funcs[format] != NULL;
+   /* Rendering to/from integer textures will be done using MapRenderbuffer,
+    * rather than coding up new paths through GetRow/PutRow(), so claim support
+    * for those formats in here for now.
+    */
+   return (intel_span_init_funcs[format] != NULL ||
+          _mesa_is_format_integer_color(format));
 }
 
 /**