Commit Graph

432 Commits (ee7fbfc41038bf8078ee62f618c74ba705690bc8)

Author SHA1 Message Date
Jonathan G Rennison 4b256fed36 Codechange: [Blitter] Adjust line-drawing algorithm to reduce wasted off-screen work
This clips the line segment to be within the screen area prior to pixel iteration.
6 years ago
Jonathan G Rennison 0240e90169 Fix: [Blitter] Avoid signed overflow when drawing long lines 6 years ago
Jonathan G Rennison db924a4681 Codechange: [Blitter] Change DrawLine to be templated
This is remove per-pixel overheads due to use of the SetPixel virtual
method.
These overheads included:
* expensive virtual method call which prevents inlining
* palette lookup for every pixel
* branch on whether palette animation is enabled on every pixel

Regenerate project files.
6 years ago
Jonathan G Rennison 9bd98ceeab Blitter: Move DrawLineGeneric to a separate file to fix OSX compilation 6 years ago
Jonathan G Rennison e735c1a51a Merge branch 'master' into jgrpp
# Conflicts:
#	src/aircraft_cmd.cpp
#	src/autoreplace_cmd.cpp
#	src/pathfinder/follow_track.hpp
#	src/pathfinder/yapf/yapf_rail.cpp
#	src/saveload/afterload.cpp
#	src/saveload/saveload.cpp
#	src/script/api/ai/ai_station.hpp.sq
#	src/script/api/game/game_station.hpp.sq
#	src/script/api/script_station.hpp
#	src/track_func.h
#	src/vehicle_base.h
6 years ago
Charles Pigott f5b1115039 Doc: Lots and lots of doxymentation fixes 6 years ago
Jonathan G Rennison 3330e4cef8 Merge branch 'cargo_type_order' into jgrpp
# Conflicts:
#	src/pathfinder/yapf/yapf_common.hpp
#	src/saveload/extended_ver_sl.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/station_sl.cpp
#	src/track_func.h
6 years ago
Charles Pigott 5f86e1a390 Codechange: Silence -Wclass-memaccess warnings with GCC8 6 years ago
Jonathan G Rennison 56be293107 Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_anim.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_anim_sse2.cpp
#	src/blitter/32bpp_base.cpp
#	src/blitter/32bpp_base.hpp
#	src/ground_vehicle.cpp
#	src/linkgraph/linkgraph_gui.h
#	src/main_gui.cpp
#	src/newgrf_house.cpp
#	src/newgrf_house.h
#	src/town_cmd.cpp
#	src/vehicle_base.h
#	src/viewport_gui.cppp
6 years ago
Jonathan G Rennison 17257b9620 Add: 32bpp SSE2 blitter palette animator (#6795)
Create a new blitter mode: 32bpp-sse2-anim, which is 32bpp-anim + this.
32bpp-sse2-anim is now used by default where 32bpp-anim would have been.
Also use this with the 32bpp-sse4-anim blitter.

See issue #6469.
6 years ago
Jonathan G Rennison 1fe0bb76b9 Merge branches 'crashlog_improvements', 'save_ext', 'version_utils' into jgrpp 6 years ago
Michael Lutz 74b7f0a9aa Fix: [OSX] Remove some OSX compiler warnings on newer SDKs/compilers. 6 years ago
Jonathan G Rennison ab1b04055a Fix incorrect handling of over-brightness in non-SSE 32bpp blitter. 6 years ago
Jonathan G Rennison f8193578c1 Blitter: Performance adjustments to 32bpp anim non-SSE blitter 7 years ago
Jonathan G Rennison 11a10299d1 Blitter: Also use sprite flags for non-SSE 32bpp sprite encoder 7 years ago
Jonathan G Rennison 83e6cf50a0 Blitter: Adjust line-drawing algorithm to reduce wasted off-screen work 7 years ago
Jonathan G Rennison 2534c2a162 Blitter: Avoid signed overflow when drawing long lines 7 years ago
Jonathan G Rennison 0c2f49c08d Blitter: Change DrawLine to be templated 7 years ago
Jonathan G Rennison 8317eac918 Merge branch 'save_ext' into jgrpp
# Conflicts:
#	src/lang/german.txt
#	src/lang/korean.txt
#	src/lang/traditional_chinese.txt
#	src/window.cpp
7 years ago
peter1138 86430757bf (svn r27837) -Fix (r26969): Black remap did nothing in 8bpp-simple blitter. 7 years ago
peter1138 60d4d1db3f (svn r27837) -Fix (r26969): Black remap did nothing in 8bpp-simple blitter. 7 years ago
Jonathan G Rennison b3fd11efd2 Merge branch 'master' into jgrpp
# Conflicts:
#	src/blitter/32bpp_anim.cpp
#	src/blitter/32bpp_anim.hpp
#	src/blitter/32bpp_anim_sse4.cpp
7 years ago
frosch 19188818ea (svn r27796) -Fix [FS#6545]: 32bpp-anim blitters assumed that pitch and width of the screen were equal. 7 years ago
frosch 206a0838e9 (svn r27796) -Fix [FS#6545]: 32bpp-anim blitters assumed that pitch and width of the screen were equal. 7 years ago
frosch d5f82bf55b (svn r27774) -Fix [FS#5889]: Enabling palette animation for 32bpp blitters while paused skipped initialisation of the palette and resulted in black windows.
-Revert (r23978): No SDL-specific fix required anymore. The new fix applies to all backends.
7 years ago
frosch 5b7a04ca27 (svn r27774) -Fix [FS#5889]: Enabling palette animation for 32bpp blitters while paused skipped initialisation of the palette and resulted in black windows.
-Revert (r23978): No SDL-specific fix required anymore. The new fix applies to all backends.
7 years ago
Jonathan G Rennison d14d5731d8 Fix wrong palette being used when switching to animated blitter.
Fixes black sprites and UI elements when switching on full
animations on win32 and OSX.
7 years ago
frosch 914d4616ca (svn r27575) -Fix [FS#6404]: Memory leak when disabling palette animation. (JGR) 8 years ago
frosch 7108b0aa3b (svn r27575) -Fix [FS#6404]: Memory leak when disabling palette animation. (JGR) 8 years ago
Jonathan G Rennison 897744ab47 SSE2 anim blitter: fix edge case where medium path was used incorrectly. 9 years ago
Jonathan G Rennison d00fa4d25b Implement a 32bpp SSE2 palette animator. This is ~4x faster than 32bpp-anim's.
Create a new blitter mode: 32bpp-sse2-anim, which is 32bpp-anim + this.
32bpp-sse2-anim is now used by default where 32bpp-anim would have been.
Also use this with the 32bpp-sse4-anim blitter mode.

Fix memory leak in current 32bpp animated blitters.
9 years ago
patch-import 536a95dfd0 Import combined Enhanced viewport: zoom out, overlays & tooltips (r53_27127) patch
https://www.tt-forums.net/viewtopic.php?f=33&t=53394
9 years ago
rubidium 0c2f4bdc2b (svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces) 10 years ago
rubidium d534c80e94 (svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces) 10 years ago
rubidium 9f654b200d (svn r26970) -Fix (r26969): non-sse animated blitter crashed occasionally 10 years ago
rubidium 8c7f376ae1 (svn r26970) -Fix (r26969): non-sse animated blitter crashed occasionally 10 years ago
rubidium eabb35a874 (svn r26969) -Fix (r26869): black palette didn't work very well with unmasked 32bpp sprites 10 years ago
rubidium 9c31ffd893 (svn r26969) -Fix (r26869): black palette didn't work very well with unmasked 32bpp sprites 10 years ago
rubidium beb540ec55 (svn r26538) -Codechange: remove double accounting of the drivers 10 years ago
rubidium b476086c39 (svn r26538) -Codechange: remove double accounting of the drivers 10 years ago
rubidium 034735a54c (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 9ed12b0f07 (svn r26509) -Codechange: replace strdup with stredup (the latter ensures the return is not NULL) 10 years ago
rubidium 2be4215f43 (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
rubidium 0463dbdc9e (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 10 years ago
rubidium 6504817680 (svn r26473) -Fix: make sure there is no uninitialised sprite data; the other blitters cleared the memory too 10 years ago
rubidium c8fffcd5ce (svn r26473) -Fix: make sure there is no uninitialised sprite data; the other blitters cleared the memory too 10 years ago
peter1138 3465686076 (svn r26463) -Fix (r10190ish): Add special handling for PALETTE_CRASH to work for non-8bpp-mapped sprites. 10 years ago
peter1138 209d3e2e9e (svn r26463) -Fix (r10190ish): Add special handling for PALETTE_CRASH to work for non-8bpp-mapped sprites. 10 years ago
frosch da253a33c3 (svn r26334) -Fix: 32bit compilation. 11 years ago
frosch cb7544ea39 (svn r26334) -Fix: 32bit compilation. 11 years ago
rubidium 4f48e99c64 (svn r26260) -Codechange: add template parameters for (non) translucent and (non) animated sprites, so the least expensive variant can be chosen (MJP) 11 years ago
rubidium ef9108bd58 (svn r26260) -Codechange: add template parameters for (non) translucent and (non) animated sprites, so the least expensive variant can be chosen (MJP) 11 years ago
rubidium ec66bd461b (svn r26259) -Codechange: add and maintain some general flags about sprites to prevent unneeded execution of expensive code (MJP) 11 years ago
rubidium eb2c2ef877 (svn r26259) -Codechange: add and maintain some general flags about sprites to prevent unneeded execution of expensive code (MJP) 11 years ago
rubidium 4585f74faa (svn r26258) -Codechange: deduplicate Draw methods (MJP) 11 years ago
rubidium fdf55a1a48 (svn r26258) -Codechange: deduplicate Draw methods (MJP) 11 years ago
rubidium 3df799c1c6 (svn r26257) -Codechange: replace most of the SSE macros by functions 11 years ago
rubidium f5f4f8a4b3 (svn r26257) -Codechange: replace most of the SSE macros by functions 11 years ago
rubidium 2f3c3d2ba6 (svn r26256) -Codechange: do not load some data when it is not (often) used later on (MJP) 11 years ago
rubidium 3a44e22b1a (svn r26256) -Codechange: do not load some data when it is not (often) used later on (MJP) 11 years ago
rubidium 5849290640 (svn r26255) -Codechange: improve performance of brightness adjustment (MJP) 11 years ago
rubidium 70901e04c5 (svn r26255) -Codechange: improve performance of brightness adjustment (MJP) 11 years ago
rubidium d263ec2bd9 (svn r26254) -Codechange: MOVD is better in some cases than PINSRD (MJP) 11 years ago
rubidium 2f7c4f6d12 (svn r26254) -Codechange: MOVD is better in some cases than PINSRD (MJP) 11 years ago
rubidium d27f085ef6 (svn r26253) -Codechange: remove margin limitation to preserve block type (MJP) 11 years ago
rubidium 5b3b533697 (svn r26253) -Codechange: remove margin limitation to preserve block type (MJP) 11 years ago
rubidium 3f1550ed2f (svn r26252) -Codechange: deduplicate code for margin case (MJP) 11 years ago
rubidium 7f6e837b3a (svn r26252) -Codechange: deduplicate code for margin case (MJP) 11 years ago
rubidium 64fb166b74 (svn r26251) -Codechange: prepare Draw code for code deduplication (MJP) 11 years ago
rubidium 9a90bed79b (svn r26251) -Codechange: prepare Draw code for code deduplication (MJP) 11 years ago
rubidium 0d43f2f437 (svn r26250) -Codechange: deduplicate darkening (e.g. shadow) code (MJP) 11 years ago
rubidium 6e34672c6c (svn r26250) -Codechange: deduplicate darkening (e.g. shadow) code (MJP) 11 years ago
rubidium b9823410cc (svn r26249) -Codechange: simplify/cleanup ALPHA_BLEND macro (MJP) 11 years ago
rubidium 76661f2c56 (svn r26249) -Codechange: simplify/cleanup ALPHA_BLEND macro (MJP) 11 years ago
rubidium 1b8b8288b0 (svn r26248) -Fix (r26223): missed compiler warning (MJP) 11 years ago
rubidium 31c6e33878 (svn r26248) -Fix (r26223): missed compiler warning (MJP) 11 years ago
rubidium 08d405ea09 (svn r26247) -Fix [FS#5854, FS#5855]: Possible out of bounds reads with the sse blitters (MJP) 11 years ago
rubidium a942619911 (svn r26247) -Fix [FS#5854, FS#5855]: Possible out of bounds reads with the sse blitters (MJP) 11 years ago
planetmaker b67933bd4d (svn r26223) -Codechange: Silence some compile warnings about unititialized variables in the SSE blitters (MJP) 11 years ago
planetmaker 7b20da8a0a (svn r26223) -Codechange: Silence some compile warnings about unititialized variables in the SSE blitters (MJP) 11 years ago
rubidium b40b95e2ab (svn r26222) -Codechange: use SSE instructions for transparent colour "remap" in the SSE2/SSSE3 blitters as well 11 years ago
rubidium 115c712f4e (svn r26222) -Codechange: use SSE instructions for transparent colour "remap" in the SSE2/SSSE3 blitters as well 11 years ago
rubidium dbec2223b1 (svn r26221) -Codechange: normalize constant names in anim-sse4 with the others (MJP) 11 years ago
rubidium 613fb9c6ef (svn r26221) -Codechange: normalize constant names in anim-sse4 with the others (MJP) 11 years ago
rubidium bf4ea2594a (svn r26215) -Codechange: rework code so one can test if a blitter factory exists before attempting trying to instantiate an instance 11 years ago
rubidium 1e1656110a (svn r26215) -Codechange: rework code so one can test if a blitter factory exists before attempting trying to instantiate an instance 11 years ago
rubidium 793dc27096 (svn r26214) -Add: specialised animated SSE4 blitter (MJP)
With 32bpp base set about 15-20% faster in the Draw function (slower with 8bpp base set). Overall, with 32bpp base set, about 5% faster.
11 years ago
rubidium 4c84d13454 (svn r26214) -Add: specialised animated SSE4 blitter (MJP)
With 32bpp base set about 15-20% faster in the Draw function (slower with 8bpp base set). Overall, with 32bpp base set, about 5% faster.
11 years ago
rubidium e25733c417 (svn r26213) -Add: specialised non-animated SSE4 blitter (MJP)
With 32bpp base set about 40% faster than 32bpp-optimized, or about 10% for 8bpp base sets in the Draw function. Respectively about 8 and 1% of total run time
11 years ago
rubidium 78df732a7b (svn r26213) -Add: specialised non-animated SSE4 blitter (MJP)
With 32bpp base set about 40% faster than 32bpp-optimized, or about 10% for 8bpp base sets in the Draw function. Respectively about 8 and 1% of total run time
11 years ago
rubidium 730127b67e (svn r26212) -Add: specialised non-animated SSSE3 blitter (MJP)
With 32bpp base set about 35% faster than 32bpp-optimized, or about 10% for 8bpp base sets in the Draw function. Respectively about 6 and 1% of total run time
11 years ago
rubidium 71a81a8762 (svn r26212) -Add: specialised non-animated SSSE3 blitter (MJP)
With 32bpp base set about 35% faster than 32bpp-optimized, or about 10% for 8bpp base sets in the Draw function. Respectively about 6 and 1% of total run time
11 years ago
rubidium 0b08fb44f4 (svn r26211) -Add: specialised non-animated SS2 blitter (MJP)
With 32bpp base set about 30% faster than 32bpp-optimized, or about 10% for 8bpp base sets in the Draw function. Respectively about 5 and 1% of total run time
11 years ago
rubidium fb05674cb7 (svn r26211) -Add: specialised non-animated SS2 blitter (MJP)
With 32bpp base set about 30% faster than 32bpp-optimized, or about 10% for 8bpp base sets in the Draw function. Respectively about 5 and 1% of total run time
11 years ago
rubidium 29405f89ed (svn r26210) -Codechange: add infrastructure for not registering a blitter 11 years ago
rubidium 899c0f9cd2 (svn r26210) -Codechange: add infrastructure for not registering a blitter 11 years ago
rubidium 4a911754b5 (svn r26209) -Codechange: remove some template magic and simplify some code 11 years ago
rubidium 2618d960e3 (svn r26209) -Codechange: remove some template magic and simplify some code 11 years ago
rubidium d709a7f465 (svn r26108) -Codechange: some coding style (whitespace) 11 years ago
rubidium defda16eb6 (svn r26108) -Codechange: some coding style (whitespace) 11 years ago