[quake3-bugzilla] [Bug 4981] New: [PATCH] Fix unaligned pointer accesses in render command buffer
bugzilla-daemon at icculus.org
bugzilla-daemon at icculus.org
Sun May 8 19:03:58 EDT 2011
https://bugzilla.icculus.org/show_bug.cgi?id=4981
Summary: [PATCH] Fix unaligned pointer accesses in render
command buffer
Product: ioquake3
Version: SVN HEAD
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P3
Component: Video
AssignedTo: zakk at icculus.org
ReportedBy: mattst88 at gmail.com
QAContact: quake3-bugzilla at icculus.org
Created attachment 2699
--> https://bugzilla.icculus.org/attachment.cgi?id=2699
Patch to eliminate unaligned accesses
Render commands are stored in a 256kB byte array, which is often dereferenced
as a void or some other type of pointer. On strict architectures, unaligned
accesses such as these are either trapped and handled slowly in the kernel or
disallowed completely.
The attached patch aligns commands to sizeof(void *) boundaries in the command
buffer. Performance should be improved on all platforms and especially so on
platforms where unaligned accesses very slow.
In the time it took to load quake3, and using the keyboard move down to select
Exit from the main screen, it incurred 100904 unaligned traps on my Alpha
system. With the patch, I have not seen a single unaligned trap.
Tested on Alpha/Linux and AMD64/Linux. Please commit.
--
Configure bugmail: https://bugzilla.icculus.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
More information about the quake3-bugzilla
mailing list