[Mesa-dev] [PATCH] mesa: Fix copy-and-paste bug in do_row_3D
From: Ian Romanick ian.d.roman...@intel.com Several of the half-float cases used 4 as the texel size when it should have been some smaller value. Signed-off-by: Ian Romanick ian.d.roman...@intel.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43324 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43325 --- src/mesa/main/mipmap.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 03ce536..756316a 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -991,7 +991,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth, } } else if ((datatype == GL_HALF_FLOAT_ARB) (comps == 3)) { - DECLARE_ROW_POINTERS(GLhalfARB, 4); + DECLARE_ROW_POINTERS(GLhalfARB, 3); for (i = j = 0, k = k0; i (GLuint) dstWidth; i++, j += colStride, k += colStride) { @@ -1001,7 +1001,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth, } } else if ((datatype == GL_HALF_FLOAT_ARB) (comps == 2)) { - DECLARE_ROW_POINTERS(GLhalfARB, 4); + DECLARE_ROW_POINTERS(GLhalfARB, 2); for (i = j = 0, k = k0; i (GLuint) dstWidth; i++, j += colStride, k += colStride) { @@ -1010,7 +1010,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth, } } else if ((datatype == GL_HALF_FLOAT_ARB) (comps == 1)) { - DECLARE_ROW_POINTERS(GLhalfARB, 4); + DECLARE_ROW_POINTERS(GLhalfARB, 1); for (i = j = 0, k = k0; i (GLuint) dstWidth; i++, j += colStride, k += colStride) { -- 1.7.6.4 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: Fix copy-and-paste bug in do_row_3D
On 02/01/2012 02:21 PM, Ian Romanick wrote: From: Ian Romanickian.d.roman...@intel.com Several of the half-float cases used 4 as the texel size when it should have been some smaller value. Signed-off-by: Ian Romanickian.d.roman...@intel.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43324 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43325 --- src/mesa/main/mipmap.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 03ce536..756316a 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -991,7 +991,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth, } } else if ((datatype == GL_HALF_FLOAT_ARB) (comps == 3)) { - DECLARE_ROW_POINTERS(GLhalfARB, 4); + DECLARE_ROW_POINTERS(GLhalfARB, 3); for (i = j = 0, k = k0; i (GLuint) dstWidth; i++, j += colStride, k += colStride) { @@ -1001,7 +1001,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth, } } else if ((datatype == GL_HALF_FLOAT_ARB) (comps == 2)) { - DECLARE_ROW_POINTERS(GLhalfARB, 4); + DECLARE_ROW_POINTERS(GLhalfARB, 2); for (i = j = 0, k = k0; i (GLuint) dstWidth; i++, j += colStride, k += colStride) { @@ -1010,7 +1010,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth, } } else if ((datatype == GL_HALF_FLOAT_ARB) (comps == 1)) { - DECLARE_ROW_POINTERS(GLhalfARB, 4); + DECLARE_ROW_POINTERS(GLhalfARB, 1); for (i = j = 0, k = k0; i (GLuint) dstWidth; i++, j += colStride, k += colStride) { Looks good. Reviewed-by: Brian Paul bri...@vmware.com Do we actually have any piglit tests that exercise 3D mipmap generation? I'm not sure I've ever seen an app use it, but anyway. -Brian ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: Fix copy-and-paste bug in do_row_3D
On 02/01/2012 02:28 PM, Brian Paul wrote: On 02/01/2012 02:21 PM, Ian Romanick wrote: From: Ian Romanickian.d.roman...@intel.com Several of the half-float cases used 4 as the texel size when it should have been some smaller value. Signed-off-by: Ian Romanickian.d.roman...@intel.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43324 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43325 --- src/mesa/main/mipmap.c | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mesa/main/mipmap.c b/src/mesa/main/mipmap.c index 03ce536..756316a 100644 --- a/src/mesa/main/mipmap.c +++ b/src/mesa/main/mipmap.c @@ -991,7 +991,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth, } } else if ((datatype == GL_HALF_FLOAT_ARB) (comps == 3)) { - DECLARE_ROW_POINTERS(GLhalfARB, 4); + DECLARE_ROW_POINTERS(GLhalfARB, 3); for (i = j = 0, k = k0; i (GLuint) dstWidth; i++, j += colStride, k += colStride) { @@ -1001,7 +1001,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth, } } else if ((datatype == GL_HALF_FLOAT_ARB) (comps == 2)) { - DECLARE_ROW_POINTERS(GLhalfARB, 4); + DECLARE_ROW_POINTERS(GLhalfARB, 2); for (i = j = 0, k = k0; i (GLuint) dstWidth; i++, j += colStride, k += colStride) { @@ -1010,7 +1010,7 @@ do_row_3D(GLenum datatype, GLuint comps, GLint srcWidth, } } else if ((datatype == GL_HALF_FLOAT_ARB) (comps == 1)) { - DECLARE_ROW_POINTERS(GLhalfARB, 4); + DECLARE_ROW_POINTERS(GLhalfARB, 1); for (i = j = 0, k = k0; i (GLuint) dstWidth; i++, j += colStride, k += colStride) { Looks good. Reviewed-by: Brian Paul bri...@vmware.com Do we actually have any piglit tests that exercise 3D mipmap generation? I'm not sure I've ever seen an app use it, but anyway. I'm sure it's roughly proportional to the number of apps using 3D textures in general... and that number is small. We don't have any piglit tests yet. We hit this in Intel's internal, closed-source test suite. It's on our (very, very long) list of new tests and test infrastructure that need to be written over the next couple months. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [PATCH] mesa: Fix copy-and-paste bug in do_row_3D
On 02/01/2012 01:21 PM, Ian Romanick wrote: From: Ian Romanickian.d.roman...@intel.com Several of the half-float cases used 4 as the texel size when it should have been some smaller value. Signed-off-by: Ian Romanickian.d.roman...@intel.com Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43324 Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=43325 --- src/mesa/main/mipmap.c |6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) Hooray for copy and paste! Nice catch. Reviewed-by: Kenneth Graunke kenn...@whitecape.org ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/mesa-dev