<html><head><style type='text/css'>p { margin: 0; }</style></head><body><div style='font-family: Times New Roman; font-size: 12pt; color: #000000'>I don't want to make further comments about software rendering at this point.<div><br></div><div>But regardless, core Mesa should not have code disabled by <span class="Apple-style-span" style="font-family: Helvetica, Arial, sans-serif; ">TEXTURE_FLOAT_ENABLED, because patent doesn't apply equally to all drivers. For now we can say that svga pipe driver does not infringe. And it's possible that in the future the IHVs come forward and license the patent for their hardware that covers open source drivers. Such drivers can/should enable ARB_float_texture regardless of TEXTURE_FLOAT_ENABLED define.</span><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><br></div><div>Jose<br><div><div><br><hr id="zwchr"><blockquote style="border-left:2px solid rgb(16, 16, 255);margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Marek Olšák" <maraeo@gmail.com><br><b>To: </b>"Eric Anholt" <eric@anholt.net>, "José Fonseca" <jfonseca@vmware.com><br><b>Cc: </b>mesa-dev@lists.freedesktop.org<br><b>Sent: </b>Monday, April 18, 2011 10:10:26 PM<br><b>Subject: </b>Re: [Mesa-dev] [PATCH 02/10] mesa: Add renderbuffer accessors for MESA_FORMAT_RGBA_FLOAT32.<br><br>Hi Eric,<br><br>I think José wanted TEXTURE_FLOAT_ENABLED to apply to hardware drivers only, because there is said to be prior art regarding software implementations. That's why I didn't use TEXTURE_FLOAT_ENABLED in any core components.<br>
<br>Marek<br><br><div class="gmail_quote">On Mon, Apr 18, 2011 at 10:37 PM, Eric Anholt <span dir="ltr"><<a href="mailto:eric@anholt.net" target="_blank">eric@anholt.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
---<br>
src/mesa/main/renderbuffer.c | 33 +++++++++++++++++++++++++++++++++<br>
1 files changed, 33 insertions(+), 0 deletions(-)<br>
<br>
diff --git a/src/mesa/main/renderbuffer.c b/src/mesa/main/renderbuffer.c<br>
index 4a4a917..a255ddd 100644<br>
--- a/src/mesa/main/renderbuffer.c<br>
+++ b/src/mesa/main/renderbuffer.c<br>
@@ -113,6 +113,27 @@ get_row_generic(struct gl_context *ctx, struct gl_renderbuffer *rb,<br>
memcpy(values, src, count * _mesa_get_format_bytes(rb->Format));<br>
}<br>
<br>
+/* Only used for float textures currently, but might also be used for<br>
+ * RGBA8888, RGBA16, etc.<br>
+ */<br>
+#ifdef TEXTURE_FLOAT_ENABLED<br>
+<br>
+static void<br>
+get_values_generic(struct gl_context *ctx, struct gl_renderbuffer *rb,<br>
+ GLuint count, const GLint x[], const GLint y[], void *values)<br>
+{<br>
+ int format_bytes = _mesa_get_format_bytes(rb->Format) / sizeof(GLfloat);<br>
+ GLuint i;<br>
+<br>
+ for (i = 0; i < count; i++) {<br>
+ const void *src = rb->GetPointer(ctx, rb, x[i], y[i]);<br>
+<br>
+ memcpy(values + i * format_bytes, src, format_bytes);<br>
+ }<br>
+}<br>
+<br>
+#endif /* TEXTURE_FLOAT_ENABLED */<br>
+<br>
/* For the GL_RED/GL_RG/GL_RGB format/DataType combinations (and<br>
* GL_LUMINANCE/GL_INTENSITY?), the Put functions are a matter of<br>
* storing those initial components of the value per pixel into the<br>
@@ -1238,6 +1259,18 @@ _mesa_set_renderbuffer_accessors(struct gl_renderbuffer *rb)<br>
rb->PutMonoValues = put_mono_values_uint;<br>
break;<br>
<br>
+#ifdef TEXTURE_FLOAT_ENABLED<br>
+ case MESA_FORMAT_RGBA_FLOAT32:<br>
+ rb->GetRow = get_row_generic;<br>
+ rb->GetValues = get_values_generic;<br>
+ rb->PutRow = put_row_generic;<br>
+ rb->PutRowRGB = NULL;<br>
+ rb->PutMonoRow = put_mono_row_generic;<br>
+ rb->PutValues = put_values_generic;<br>
+ rb->PutMonoValues = put_mono_values_generic;<br>
+ break;<br>
+#endif<br>
+<br>
default:<br>
break;<br>
}<br>
<font color="#888888">--<br>
1.7.4.4<br>
<br>
_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org" target="_blank">mesa-dev@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/mesa-dev" target="_blank">http://lists.freedesktop.org/mailman/listinfo/mesa-dev</a><br>
</font></blockquote></div><br>
</blockquote><br></div></div></div></div></div></body></html>