From 00003b at gmail.com Sun Oct 7 04:29:33 2007 From: 00003b at gmail.com (Bart Botta) Date: Sat, 6 Oct 2007 23:29:33 -0500 Subject: [cl-opengl-devel] Patch for faster texture uploads Message-ID: <77cb99c00710062129r13904b9ag4cb2f833bee80d73@mail.gmail.com> gl:tex-image-2d seems a bit slow (~23 sec for a 1k by 1k texture on SBCL 1.0.2 win32), attached patch speeds it up ~100x (to ~0.25 sec). Problem was that the element type in with-opengl-array wasn't constant (since it had been passed as a parameter to tex-image-2d) so cffi couldn't optimize for a specific type. Patch moves the type check out of the copy loop, and duplicates the loop for each type, so each case can be optimized individually. -- Bart -------------- next part -------------- A non-text attachment was scrubbed... Name: with-opengl-array.patch Type: application/octet-stream Size: 13824 bytes Desc: not available URL: From mikael.lax at bredband.net Sun Oct 7 12:35:34 2007 From: mikael.lax at bredband.net (Mikael Lax) Date: Sun, 7 Oct 2007 14:35:34 +0200 Subject: [cl-opengl-devel] Patch for faster texture uploads In-Reply-To: <77cb99c00710062129r13904b9ag4cb2f833bee80d73@mail.gmail.com> References: <77cb99c00710062129r13904b9ag4cb2f833bee80d73@mail.gmail.com> Message-ID: <20071007143534.4e3d335c.mikael.lax@bredband.net> On Sat, 6 Oct 2007 23:29:33 -0500 "Bart Botta" <00003b at gmail.com> wrote: > gl:tex-image-2d seems a bit slow (~23 sec for a 1k by 1k texture on > SBCL 1.0.2 win32), attached patch speeds it up ~100x (to ~0.25 sec). Very nice! There was some discussion about this on cffi-devel as well in case you don't follow that list. Sincerely, Mikael Lax