FWIW, it looks good to me.<br><br>Marek<br><br><div class="gmail_quote">On Wed, Nov 24, 2010 at 8:18 PM, Brian Paul <span dir="ltr"><<a href="mailto:brianp@vmware.com">brianp@vmware.com</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;">
<div><div></div><div class="h5">On 11/24/2010 12:10 PM, Brian Paul wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On 11/24/2010 10:20 AM, Brian Paul wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
On 11/24/2010 05:23 AM, Marek Olšák wrote:<br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
In order to be able to create and render to textures of size 8192x8192<br>
on r600 and nv50, including 3D textures like 8192x4x4.<br>
<br>
Two new piglit tests have been added to test this: fbo-maxsize and<br>
tex3d-maxsize.<br>
<br>
Driver status:<br>
swrast passes fbo-maxsize and segfaults in tex3d-maxsize.<br>
softpipe and r300g pass both.<br>
(r300g returns GL_OUT_OF_MEMORY in tex3d-maxsize).<br>
<br>
Cc: Brian Paul<<a href="mailto:brianp@vmware.com" target="_blank">brianp@vmware.com</a>><br>
Signed-off-by: Marek Olšák<<a href="mailto:maraeo@gmail.com" target="_blank">maraeo@gmail.com</a>><br>
---<br>
src/mesa/main/config.h | 14 +++++++-------<br>
1 files changed, 7 insertions(+), 7 deletions(-)<br>
<br>
diff --git a/src/mesa/main/config.h b/src/mesa/main/config.h<br>
index 0f2d1a8..5388069 100644<br>
--- a/src/mesa/main/config.h<br>
+++ b/src/mesa/main/config.h<br>
@@ -98,16 +98,16 @@<br>
#define MAX_COLOR_TABLE_SIZE 256<br>
<br>
/** Number of 1D/2D texture mipmap levels */<br>
-#define MAX_TEXTURE_LEVELS 13<br>
+#define MAX_TEXTURE_LEVELS 14<br>
<br>
/** Number of 3D texture mipmap levels */<br>
-#define MAX_3D_TEXTURE_LEVELS 9<br>
+#define MAX_3D_TEXTURE_LEVELS 14<br>
<br>
/** Number of cube texture mipmap levels - GL_ARB_texture_cube_map */<br>
-#define MAX_CUBE_TEXTURE_LEVELS 13<br>
+#define MAX_CUBE_TEXTURE_LEVELS 14<br>
<br>
/** Maximum rectangular texture size - GL_NV_texture_rectangle */<br>
-#define MAX_TEXTURE_RECT_SIZE 4096<br>
+#define MAX_TEXTURE_RECT_SIZE 8192<br>
<br>
/** Maximum number of layers in a 1D or 2D array texture -<br>
GL_MESA_texture_array */<br>
#define MAX_ARRAY_TEXTURE_LAYERS 64<br>
@@ -140,11 +140,11 @@<br>
*/<br>
<br>
#ifndef MAX_WIDTH<br>
-# define MAX_WIDTH 4096<br>
+# define MAX_WIDTH 8192<br>
#endif<br>
/** Maximum viewport/image height */<br>
#ifndef MAX_HEIGHT<br>
-# define MAX_HEIGHT 4096<br>
+# define MAX_HEIGHT 8192<br>
#endif<br>
<br>
/** Maxmimum size for CVA. May be overridden by the drivers. */<br>
@@ -168,7 +168,7 @@<br>
#define MAX_TEXTURE_MAX_ANISOTROPY 16.0<br>
<br>
/** For GL_EXT_texture_lod_bias (typically MAX_TEXTURE_LEVELS - 1) */<br>
-#define MAX_TEXTURE_LOD_BIAS 12.0<br>
+#define MAX_TEXTURE_LOD_BIAS 13.0<br>
<br>
/** For any program target/extension */<br>
/*@{*/<br>
</blockquote>
<br>
I'm OK w/ increasing the limits but there's a few other issues that need<br>
to be fixed before this patch can be applied. I'm working on it now...<br>
</blockquote>
<br>
Here's a more elaborate patch.<br>
<br>
It checks if the memory used by the texture is less than some limit. If<br>
the limit is exceeded, GL_OUT_OF_MEMORY is generated (unless it's a<br>
proxy texture). This lets us advertise GL_MAX_3D_TEXTURE_SIZE to be 8K<br>
(or larger) while preventing actual 8Kx8Kx8K textures but allowing<br>
8Kx32x16, for example. This could have been implemented in each of the<br>
drivers using the ctx->Driver.TestProxyImage() hook but this patch<br>
avoids all that redundant code.<br>
<br>
I'll leave it up to driver maintainers to set the new<br>
ctx->Const.MaxTextureMBytes field to a reasonable driver. The default is<br>
currently 1GB.<br>
<br>
The max texture size is also bumped up to 16K, Alex.<br>
<br>
Ideally, we should also have a piglit test that exercises rasterization<br>
with the max possible texture/surface size to see if the fixed point<br>
rasterization really falls apart as I fear.<br>
<br>
If there's no comments/concerns I'll commit in a day or two.<br>
<br>
I've also posted a patch to the tex3d-maxsize.c test to the piglit test.<br>
</blockquote>
<br></div></div>
Attachment.<br><font color="#888888">
<br>
-Brian<br>
<br>
</font><br>_______________________________________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">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>
<br></blockquote></div><br>