Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[OSX] x86_64 binary graphics issues #4210

Closed
DorpsGek opened this issue Nov 8, 2010 · 5 comments
Closed

[OSX] x86_64 binary graphics issues #4210

DorpsGek opened this issue Nov 8, 2010 · 5 comments
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

DorpsGek commented Nov 8, 2010

planetmaker opened the ticket and wrote:

When compiling an x86_64 binary, the resulting interface suffers serious glitches (see attached screenshot). These glitches are independent of the video backend (cocoa or SDL) and are also visible in screenshots. Giant screenshots don't show that strong glitches, but still show a glitches in a somewhat regular pattern.

Attached a patch which allows to easily only produce a x86_64 binary using
./configure --enable_universal="x86_64"

assert_compile(sizeof(uint) == 4); is not the problem.

Attachments

Reported version: trunk
Operating system: Mac OS X


This issue was imported from FlySpray: https://bugs.openttd.org/task/4210
@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 8, 2010

michi_cc wrote:

Just a quick comment about the patch:
If I've not missed something, the handling of CFLAGS in generate_src_osx() isn't
correct. The CFLAGS for the 32-bit targets are set before the loop, and the 64-bit
flags inside the loop. If $enable_universal contains e.g "ppc64 ppc" the 64-bit flags
will be used for the ppc target.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4210#comment9042

@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 8, 2010

SmatZ wrote:

Can you try running openttd under valgrind, if possible?


This comment was imported from FlySpray: https://bugs.openttd.org/task/4210#comment9044

@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 9, 2010

planetmaker wrote:

I've not yet much experience with valgrind and it might well be possible I'm not yet using a properly configured binary nor proper options for valgrind. A first test yields the attached result

EDIT: Attached also a screenshot which shows the initial configuration which also restored wrt the blackend area in this pattern after a complete redraw of the window e.g. when restoring to initial size from minimized state.

EDIT2:
additional summary after ending OpenTTD:

==97349==
==97349== HEAP SUMMARY:
==97349== in use at exit: 9,694,396 bytes in 22,558 blocks
==97349== total heap usage: 778,659 allocs, 756,101 frees, 744,355,257 bytes allocated
==97349==
==97349== LEAK SUMMARY:
==97349== definitely lost: 4,901 bytes in 85 blocks
==97349== indirectly lost: 684 bytes in 14 blocks
==97349== possibly lost: 7,300 bytes in 14 blocks
==97349== still reachable: 9,681,511 bytes in 22,445 blocks
==97349== suppressed: 0 bytes in 0 blocks
==97349== Rerun with --leak-check=full to see details of leaked memory
==97349==
==97349== For counts of detected and suppressed errors, rerun with: -v
==97349== Use --track-origins=yes to see where uninitialised values come from
==97349== ERROR SUMMARY: 303 errors from 7 contexts (suppressed: 1 from 1)

Attachments


This comment was imported from FlySpray: https://bugs.openttd.org/task/4210#comment9047

@DorpsGek
Copy link
Member Author

DorpsGek commented Nov 9, 2010

frosch wrote:

Turned out as compiler bug:
In viewport.cpp ViewportAddLandscape() "direction ^= 1" is miscompiled.
"direction ^= true" fails as well. "direction = !direction" works. making "direction" a static variable (instead of most likely a register variable) makes it work, too.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4210#comment9052

@DorpsGek
Copy link
Member Author

planetmaker closed the ticket.

Reason for closing: Implemented

In r21149


This comment was imported from FlySpray: https://bugs.openttd.org/task/4210

@DorpsGek DorpsGek added component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) bug labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: interface This is an interface issue flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant