Nux

Merge lp:~vanvugt/nux/fix-1064834-3.0 into lp:nux/3.0

Proposed by Daniel van Vugt
Status: Merged
Approved by: Timo Jyrinki
Approved revision: 664
Merged at revision: 664
Proposed branch: lp:~vanvugt/nux/fix-1064834-3.0
Merge into: lp:nux/3.0
Diff against target: 40 lines (+2/-7)
1 file modified
NuxGraphics/IOpenGLSurface.cpp (+2/-7)
To merge this branch: bzr merge lp:~vanvugt/nux/fix-1064834-3.0
Reviewer Review Type Date Requested Status
Jay Taoko Approve
Timo Jyrinki (community) Approve
Review via email: mp+129091@code.launchpad.net

Commit message

Remove a massive bottleneck, where almost all the CPU time was spent
loading a black image on texture creation. (LP: #1064834)

CPU time spent in glTexImage2D:
  Before: 93.54%
  After: 0.10%

Description of the change

Backported to Nux 3.x. Already committed to lp:nux.

To post a comment you must log in.
Revision history for this message
Timo Jyrinki (timo-jyrinki) wrote :

Tested and works fine. As discussed in the bug report, it does not fix the root cause for Dash / blur slowness (drawing the Dash content), so at least I'm not still seeing a really smooth dash fade in on sandy bridge yet. On llvmpipe the benefit would be seen very clearly, but we have low graphics mode without active blur there already.

Anyway, a very welcome fix that might help a lot on some combinations of hardware for nux 3.0 users as well.

review: Approve
Revision history for this message
Jay Taoko (jaytaoko) wrote :

+1

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'NuxGraphics/IOpenGLSurface.cpp'
2--- NuxGraphics/IOpenGLSurface.cpp 2012-01-17 03:57:31 +0000
3+++ NuxGraphics/IOpenGLSurface.cpp 2012-10-11 03:24:34 +0000
4@@ -525,8 +525,6 @@
5 nuxAssert( texheight > 0 ); // Should never happen
6 nuxAssert( size > 0 ); // Should never happen
7
8- BYTE *DummyBuffer = (BYTE *) calloc(size, sizeof(BYTE));
9-
10 CHECKGL(glPixelStorei(GL_UNPACK_ALIGNMENT, MemAlignment));
11
12 #ifndef NUX_OPENGLES_20
13@@ -546,7 +544,7 @@
14 texheight,
15 0, // border
16 size, // image Size
17- DummyBuffer // data
18+ NULL // data
19 );
20 CHECKGL_MSG(glCompressedTexImage2DARB);
21 }
22@@ -580,7 +578,7 @@
23 0, // border
24 GPixelFormats[_BaseTexture->_PixelFormat].Format,
25 GPixelFormats[_BaseTexture->_PixelFormat].type,
26- DummyBuffer);
27+ NULL);
28 CHECKGL_MSG(glTexImage2D);
29 #ifndef NUX_OPENGLES_20
30 }
31@@ -602,9 +600,6 @@
32 }
33 #endif
34
35- free(DummyBuffer);
36-
37-
38 // { //[DEBUGGING - Red Texture]
39 // // This is going to put some red in the texture.
40 // // The texture is not compressed.

Subscribers

People subscribed via source and target branches