[Mesa-dev] [PATCH 07/10] i965: Claim to support rendering to integer FBOs.

Eric Anholt eric at anholt.net
Fri Nov 4 15:01:28 PDT 2011


We're missing support for the software paths still, but basic
rendering is working.
---
 src/mesa/drivers/dri/intel/intel_span.c       |    7 ++++++-
 src/mesa/drivers/dri/intel/intel_tex_format.c |    6 ++++++
 2 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/mesa/drivers/dri/intel/intel_span.c b/src/mesa/drivers/dri/intel/intel_span.c
index 604962d..e66b0f6 100644
--- a/src/mesa/drivers/dri/intel/intel_span.c
+++ b/src/mesa/drivers/dri/intel/intel_span.c
@@ -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));
 }
 
 /**
diff --git a/src/mesa/drivers/dri/intel/intel_tex_format.c b/src/mesa/drivers/dri/intel/intel_tex_format.c
index 6890a69..caef5b2 100644
--- a/src/mesa/drivers/dri/intel/intel_tex_format.c
+++ b/src/mesa/drivers/dri/intel/intel_tex_format.c
@@ -9,6 +9,12 @@
 GLenum
 intel_mesa_format_to_rb_datatype(gl_format format)
 {
+   /* These formats won't be going through the GetRow/PutRow() interfaces, so
+    * just return a type.
+    */
+   if (_mesa_is_format_integer_color(format))
+      return GL_UNSIGNED_INT;
+
    switch (format) {
    case MESA_FORMAT_ARGB8888:
    case MESA_FORMAT_XRGB8888:
-- 
1.7.7



More information about the mesa-dev mailing list