View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0006450VTK(No Category)public2008-02-26 23:442009-07-10 13:34
ReporterMichael Halle 
Assigned ToFrançois Bertel 
PrioritynormalSeverityfeatureReproducibilityN/A
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version 
Summary0006450: Patch to add support for non-power-of-two textures in OpenGL 2.0
DescriptionThis patch against the nightly CVS allows for non-power-of-two textures if that feature is supported in OpenGL. The fallback is the current behavior (resample to nearest power of two), which is also used if the texture is too large. For large textures, this step should save both processing time and memory.

The patch is slightly inefficient in that it instantiates an extension manager object at texture creation to query for the appropriate OpenGL extension. This step only happens once, though.
Additional InformationI have the version patched off the current VTK version for Slicer as well, if needed.
TagsNo tags attached.
Project
Type
Attached Filespatch file icon power-of-two.patch [^] (3,087 bytes) 2008-02-26 23:45 [Show Content]
patch file icon power-of-two-unified.patch [^] (4,266 bytes) 2008-10-03 07:51 [Show Content]

 Relationships

  Notes
(0013718)
Mathieu Malaterre (developer)
2008-10-03 07:52

First patch was done using default diff option, which means basically it cannot be applied to any other version than exactly the one used during the patch.
Applied patch to 1.66 version, then redo patch using unified output.
(0013720)
Mathieu Malaterre (developer)
2008-10-03 07:54

Tested unified patch on CVS, even if patch report error, it can safely be discarded.

 patch -p0 < /tmp/power-of-two-unified.patch
patching file vtkOpenGLTexture.cxx
Hunk #1 FAILED at 21.
Hunk #2 succeeded at 40 (offset 3 lines).
Hunk #3 succeeded at 266 (offset 97 lines).
Hunk #4 succeeded at 358 (offset 97 lines).
Hunk #5 succeeded at 614 (offset 132 lines).
1 out of 5 hunks FAILED -- saving rejects to file vtkOpenGLTexture.cxx.rej
patching file vtkOpenGLTexture.h
(0013721)
Mathieu Malaterre (developer)
2008-10-03 07:58

Mike,
Shouldn't the member var: AllowsNonPowerOfTwoTextures now be initialized in the member function: vtkOpenGLTexture::Initialize ?
(0016536)
François Bertel (developer)
2009-05-20 14:02

Fixed:

VTK/Rendering/vtkOpenGLTexture.cxx, revision 1.76
VTK/Rendering/vtkOpenGLTexture.h, revision 1.28
(0016544)
François Bertel (developer)
2009-05-21 14:14

The fix passes with Mesa 7.0.4 (on dash6)

The fix seems to make the builds using Mesa GIT to fail for the following tests:

TestTextureRGBA
TestTextureRGBADepthPeeling
TestTStripsColorsTCoords
TestTStripsNormalsColorsTCoords
TestTStripsNormalsTCoords
TestTStripsTCoords

The builds are:
gargon.hooperlab / Linux-gcc-4.3.2-x86_64-DevelMesa
and
hythloth.kitware / Linux-gcc41

The tests use non-power-of-two textures:
rgba texture is 100x19
beach.jpg is 200x200

Tomorrow (2009/05/22), dash6 will have vtk builds with Mesa 7.4.2 instead of Mesa 7.0.4 to try to locate the bug in Mesa.
(0016545)
François Bertel (developer)
2009-05-22 08:19

Confirmation that it fails with Mesa 7.4.2 on dash6. Revert dash6 to Mesa 7.0.4.
(0016548)
François Bertel (developer)
2009-05-22 09:51

Bug reported to Mesa bug tracker:

https://bugs.freedesktop.org/show_bug.cgi?id=21872 [^]
(0016725)
Brad King (developer)
2009-06-15 16:02

Mesa commit "ad053d90f01852ee27e36a21402543562bf46ad6" causes the problem (thanks to "git bisect"). I've updated the Mesa bug entry with this information.

 Issue History
Date Modified Username Field Change
2008-02-26 23:44 Michael Halle New Issue
2008-02-26 23:45 Michael Halle File Added: power-of-two.patch
2008-10-03 07:51 Mathieu Malaterre File Added: power-of-two-unified.patch
2008-10-03 07:52 Mathieu Malaterre Note Added: 0013718
2008-10-03 07:52 Mathieu Malaterre Status backlog => tabled
2008-10-03 07:52 Mathieu Malaterre Assigned To => François Bertel
2008-10-03 07:54 Mathieu Malaterre Note Added: 0013720
2008-10-03 07:58 Mathieu Malaterre Note Added: 0013721
2009-05-20 14:02 François Bertel Note Added: 0016536
2009-05-20 14:02 François Bertel Status tabled => @80@
2009-05-20 14:02 François Bertel Resolution open => fixed
2009-05-21 14:14 François Bertel Note Added: 0016544
2009-05-21 14:14 François Bertel Status @80@ => @20@
2009-05-21 14:14 François Bertel Resolution fixed => reopened
2009-05-22 08:19 François Bertel Note Added: 0016545
2009-05-22 09:51 François Bertel Note Added: 0016548
2009-06-15 16:02 Brad King Note Added: 0016725
2009-07-10 13:34 François Bertel Status @20@ => closed
2009-07-10 13:34 François Bertel Resolution reopened => fixed
2011-06-16 13:11 Zack Galbreath Category => (No Category)


Copyright © 2000 - 2018 MantisBT Team