Hello Thomas,

On 25-03-2017 07:10, T. Modes wrote:
> Hi Mauro,
> 
> Am Donnerstag, 23. März 2017 19:19:59 UTC+1 schrieb Mauro Santos:
> 
> 
>     Logs for a working case are attached just in case it helps in any way.
> 
> 
> The logs shows, that smaller projects with 314 MB work, but with 415 MB
> fails.
> 
> According to the log:
> nona: GL error in
> /build/hugin/src/hugin-2016.2.0/src/hugin_base/vigra_ext/ImageTransformsGPU.cpp:829
> invalid value (0x501)
> the error should be raised in this part:
> 
> const int sourceOdd = (sourceChunks[0].height() & 1);
> GLuint srcTexture;
> glGenTextures(1, &srcTexture);
> glBindTexture(GL_TEXTURE_RECTANGLE_ARB, srcTexture);
> glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MIN_FILTER,
> GL_NEAREST);
> glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_MAG_FILTER,
> GL_NEAREST);
> glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_S,
> GL_CLAMP_TO_BORDER);
> glTexParameteri(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_WRAP_T,
> GL_CLAMP_TO_BORDER);
> glTexParameterfv(GL_TEXTURE_RECTANGLE_ARB, GL_TEXTURE_BORDER_COLOR,
> borderColor);
> glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, XGLMap[srcGLInternalFormat],
> sourceChunks[0].width(), sourceChunks[0].height() + sourceOdd, 0,
> XGLMap[srcGLFormat], XGLMap[srcGLType], NULL);
> CHECK_GL();
> 
> probably in glTexImage2D (all other lines use only constants).
> Maybe you can run nona in the debugger in check which arguments are
> passed in glTexImage2D(..) in both cases.
> (But I'm no OpenGL expert, I'm only maintaining the existing code.)
> 

I've tried rebuilding hugin with debug information (by tweaking Arch's
PKGBUILD a little) and managed to run nona with gdb, but I'm not
familiar with using gdb to debug programs so I don't know how useful
what I got is. Attached is what I got for the working and non-working cases.

> Show your diagnostic tools which maximum textures size your graphic card
> supports? (nona think it is maxTextureSize=16384)

I haven't found many programs that provide all the details about what is
supported. All the tools I'm familiar with (glxinfo and similar) don't
say much of what is needed in this case. I didn't want to run windows
tools with wine because that would mean

However I have stumbled upon a benchmark program (gfxbench) which has a
linux version and provides many detail about the supported GL limits,
when comparing the limits between the intel and amd cards there are only
a few things (that seems to be related to this problem) that really
stand out (format is GL_*: INTEL value/AMD value):

GL_MAX_TEXTURE_SIZE: 16384/16384
GL_MAX_TEXTURE_BUFFER_SIZE: 134217728/1503238553
GL_MAX_RECTANGLE_TEXTURE_SIZE: 4096/16384

As expected the maximum texture size is similar in both cases, otherwise
nona would say otherwise I suppose, but the
GL_MAX_RECTANGLE_TEXTURE_SIZE looks like it fits with the problem.

The GL_MAX_TEXTURE_BUFFER_SIZE does not seem to matter as it is smaller
than what is reported as allocated in the successful case.

I should say that like you I'm not an OpenGL expert, in fact I know
nothing about it so I'm just trying to figure things out as I go, but
after reading this[1] and looking at the code I think I may be on to
something.

[1]
https://www.khronos.org/registry/OpenGL/extensions/ARB/ARB_texture_rectangle.txt

-- 
Mauro Santos

-- 
A list of frequently asked questions is available at: 
http://wiki.panotools.org/Hugin_FAQ
--- 
You received this message because you are subscribed to the Google Groups 
"hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/hugin-ptx/e4b30352-ed6e-1579-c092-137b63bcae41%40gmail.com.
For more options, visit https://groups.google.com/d/optout.
> gdb --args nona -g -o out IMG_0050-IMG_0051.pto 
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from nona...done.
(gdb) break ImageTransformsGPU.cpp:828
No source file named ImageTransformsGPU.cpp.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (ImageTransformsGPU.cpp:828) pending.
(gdb) run
Starting program: /usr/bin/nona -g -o out IMG_0050-IMG_0051.pto
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
nona: using graphics card: Intel Open Source Technology Center Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 

Breakpoint 1, vigra_ext::transformImageGPUIntern (
    coordXformGLSL="    vec2 src = gl_TexCoord[0].st;\n    src -= vec2(3620.", '0' <repeats 16 times>, ", 2715.", '0' <repeats 16 times>, ");\n\n    // rotate_erect(14165.217391304349803, -944.34782608695661565)\n    {\n        src.s += -944.3478260"..., 
    interpolatorGLSL="    float A = -0.75", '0' <repeats 18 times>, ";\n    float c = abs(i - 1.0);\n    float m = (i > 1.0) ? -1.0 : 1.0;\n    float p = c + m * f;\n    if (i == 1.0 || i == 2.0) {\n        return (( A + 2.0 )*p - ( A + "..., interpolatorSize=interpolatorSize@entry=4, 
    photometricGLSL="    // invLutSize = 256.", '0' <repeats 17 times>, "\n    // pixelMax = 255.", '0' <repeats 17 times>, "\n    // destLutSize = 1024.", '0' <repeats 16 times>, "\n    // destExposure = 2.5530830607439579773e-05\n    // srcExposure = 2.4691"..., invLut=std::vector of length 256, capacity 256 = {...}, 
    destLut=std::vector of length 1024, capacity 1024 = {...}, srcSize=..., srcBuffer=<optimized out>, srcGLInternalFormat=<optimized out>, srcGLTransferFormat=<optimized out>, 
    srcGLFormat=<optimized out>, srcGLType=<optimized out>, srcAlphaBuffer=<optimized out>, srcAlphaGLType=<optimized out>, destUL=..., destSize=..., destBuffer=<optimized out>, 
    destGLInternalFormat=<optimized out>, destGLTransferFormat=<optimized out>, destGLFormat=<optimized out>, destGLType=<optimized out>, destAlphaBuffer=<optimized out>, 
    destAlphaGLType=<optimized out>, warparound=false) at /tmpfs/hugin/src/hugin-2016.2.0/src/hugin_base/vigra_ext/ImageTransformsGPU.cpp:828
828	    glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, XGLMap[srcGLInternalFormat], sourceChunks[0].width(), sourceChunks[0].height() + sourceOdd, 0, XGLMap[srcGLFormat], XGLMap[srcGLType], NULL);
(gdb) print GL_TEXTURE_RECTANGLE_ARB
No symbol "GL_TEXTURE_RECTANGLE_ARB" in current context.
(gdb) print XGLMap[srcGLInternalFormat]
value has been optimized out
(gdb) print sourceChunks[0]
$1 = {upperLeft_ = {<vigra::Diff2D> = {x = 0, y = 0}, <No data fields>}, lowerRight_ = {<vigra::Diff2D> = {x = 5184, y = 3456}, <No data fields>}}
(gdb) print sourceOdd
$2 = 0
(gdb) print XGLMap[srcGLFormat]
value has been optimized out
(gdb) print XGLMap[srcGLType]
value has been optimized out
(gdb) cont
Continuing.
nona: GL error in /tmpfs/hugin/src/hugin-2016.2.0/src/hugin_base/vigra_ext/ImageTransformsGPU.cpp:829
invalid value (0x501)
[Inferior 1 (process 22940) exited with code 01]
(gdb)
> gdb --args nona -g -o out DSC00261-DSC00263.pto 
GNU gdb (GDB) 7.12.1
Copyright (C) 2017 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "x86_64-pc-linux-gnu".
Type "show configuration" for configuration details.
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>.
Find the GDB manual and other documentation resources online at:
<http://www.gnu.org/software/gdb/documentation/>.
For help, type "help".
Type "apropos word" to search for commands related to "word"...
Reading symbols from nona...done.
(gdb) break ImageTransformsGPU.cpp:828
No source file named ImageTransformsGPU.cpp.
Make breakpoint pending on future shared library load? (y or [n]) y
Breakpoint 1 (ImageTransformsGPU.cpp:828) pending.
(gdb) run
Starting program: /usr/bin/nona -g -o out DSC00261-DSC00263.pto
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/usr/lib/libthread_db.so.1".
nona: using graphics card: Intel Open Source Technology Center Mesa DRI Intel(R) HD Graphics 520 (Skylake GT2) 

Breakpoint 1, vigra_ext::transformImageGPUIntern (
    coordXformGLSL="    vec2 src = gl_TexCoord[0].st;\n    src -= vec2(1978.", '0' <repeats 16 times>, ", 2607.5", '0' <repeats 15 times>, ");\n\n    // rotate_erect(10789.090909090909918, -0.", '0' <repeats 19 times>, ")\n    {\n        //src.s += -0.0000000"..., 
    interpolatorGLSL="    float c = (i < 16.", '0' <repeats 18 times>, ") ? 1.0 : -1.0;\n    float x = c * (15.", '0' <repeats 18 times>, " - i + f);\n    vec2 xpi = vec2(x, x / 16.", '0' <repeats 18 times>, ") * 3.1415926535897931160;\n    vec2 xsin = si"..., interpolatorSize=interpolatorSize@entry=32, 
    photometricGLSL="    // invLutSize = 256.", '0' <repeats 17 times>, "\n    // pixelMax = 255.", '0' <repeats 17 times>, "\n    // destLutSize = 1024.", '0' <repeats 16 times>, "\n    // destExposure = 0.00031887972686351462965\n    // srcExposure = 0.0003"..., invLut=std::vector of length 256, capacity 256 = {...}, 
    destLut=std::vector of length 1024, capacity 1024 = {...}, srcSize=..., srcBuffer=<optimized out>, srcGLInternalFormat=<optimized out>, srcGLTransferFormat=<optimized out>, 
    srcGLFormat=<optimized out>, srcGLType=<optimized out>, srcAlphaBuffer=<optimized out>, srcAlphaGLType=<optimized out>, destUL=..., destSize=..., destBuffer=<optimized out>, 
    destGLInternalFormat=<optimized out>, destGLTransferFormat=<optimized out>, destGLFormat=<optimized out>, destGLType=<optimized out>, destAlphaBuffer=<optimized out>, 
    destAlphaGLType=<optimized out>, warparound=false) at /tmpfs/hugin/src/hugin-2016.2.0/src/hugin_base/vigra_ext/ImageTransformsGPU.cpp:828
828	    glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, XGLMap[srcGLInternalFormat], sourceChunks[0].width(), sourceChunks[0].height() + sourceOdd, 0, XGLMap[srcGLFormat], XGLMap[srcGLType], NULL);
(gdb) print GL_TEXTURE_RECTANGLE_ARB
No symbol "GL_TEXTURE_RECTANGLE_ARB" in current context.
(gdb) print XGLMap[srcGLInternalFormat]
value has been optimized out
(gdb) print sourceChunks[0]
$1 = {upperLeft_ = {<vigra::Diff2D> = {x = 0, y = 0}, <No data fields>}, lowerRight_ = {<vigra::Diff2D> = {x = 3072, y = 2304}, <No data fields>}}
(gdb) print sourceOdd
$2 = 0
(gdb) print XGLMap[srcGLFormat]
value has been optimized out
(gdb) print XGLMap[srcGLType]
value has been optimized out
(gdb) cont
Continuing.

Breakpoint 1, vigra_ext::transformImageGPUIntern (
    coordXformGLSL="    vec2 src = gl_TexCoord[0].st;\n    src -= vec2(1978.", '0' <repeats 16 times>, ", 2607.5", '0' <repeats 15 times>, ");\n\n    // plane_transfer_to_camera\n    //     distance   : 3434.2742992992980362\n    //     x          : "..., 
    interpolatorGLSL="    float c = (i < 16.", '0' <repeats 18 times>, ") ? 1.0 : -1.0;\n    float x = c * (15.", '0' <repeats 18 times>, " - i + f);\n    vec2 xpi = vec2(x, x / 16.", '0' <repeats 18 times>, ") * 3.1415926535897931160;\n    vec2 xsin = si"..., interpolatorSize=interpolatorSize@entry=32, 
    photometricGLSL="    // invLutSize = 256.", '0' <repeats 17 times>, "\n    // pixelMax = 255.", '0' <repeats 17 times>, "\n    // destLutSize = 1024.", '0' <repeats 16 times>, "\n    // destExposure = 0.00031887972686351462965\n    // srcExposure = 0.0001"..., invLut=std::vector of length 256, capacity 256 = {...}, 
    destLut=std::vector of length 1024, capacity 1024 = {...}, srcSize=..., srcBuffer=<optimized out>, srcGLInternalFormat=<optimized out>, srcGLTransferFormat=<optimized out>, 
    srcGLFormat=<optimized out>, srcGLType=<optimized out>, srcAlphaBuffer=<optimized out>, srcAlphaGLType=<optimized out>, destUL=..., destSize=..., destBuffer=<optimized out>, 
    destGLInternalFormat=<optimized out>, destGLTransferFormat=<optimized out>, destGLFormat=<optimized out>, destGLType=<optimized out>, destAlphaBuffer=<optimized out>, 
    destAlphaGLType=<optimized out>, warparound=false) at /tmpfs/hugin/src/hugin-2016.2.0/src/hugin_base/vigra_ext/ImageTransformsGPU.cpp:828
828	    glTexImage2D(GL_TEXTURE_RECTANGLE_ARB, 0, XGLMap[srcGLInternalFormat], sourceChunks[0].width(), sourceChunks[0].height() + sourceOdd, 0, XGLMap[srcGLFormat], XGLMap[srcGLType], NULL);
(gdb) cont
Continuing.
[Inferior 1 (process 23028) exited normally]
(gdb)

Reply via email to