summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon
AgeCommit message (Collapse)Author
2010-06-02Fix some cases of variables being used uninitialized. Also some unusedSoren Jorvang
variables, writeable strings and dangerously shadowed variables. index(), gamma(), exp() and y0() are POSIX functions and using those names can cause namespace confusion. A number of C files were missing the final newline required by ANSI C and some versions of GCC are pedantic enough to complain about this. These changes simply the scons build, allowing us to get rid of filterWarnings which is simply more trouble than it's worth. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5574 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-02Meta:Soren Jorvang
Using Unix tools to operate on a tree containing filename with spaces in them is really annoying, so rename the handful of instances where there were spaces. Host.cpp has never been used. Games tend to lookup the following directories that we don't yet have anything to put in, so prepopulate them in Data/User/Wii: title/00010001 title/00010002 title/00010003 title/00010004 title/00010005 title/00010006 title/00010007 meta shared2/title Set eol-style native on a number of text files which didn't already have it. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5572 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-28Improve iterator usage.Jordan Woyak
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5528 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-27lets apply some mathematical magic:Rodolfo Osvaldo Bogado
* optimize may last commit to make it faster * reorder the code to make it more readable please test and enjoy git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5520 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-27ultra experimental commit. fixed tev functionality, now it must be almost ↵Rodolfo Osvaldo Bogado
perfect emulating native hardware. please test as many games as you can this should impact a lot of games. enjoy git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5511 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-26For these assertions to trip, enums in CPMemory.h which seem pretty much setSoren Jorvang
in stone would have to change. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5496 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-26#if 0 work-in-progress code.Soren Jorvang
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5488 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-26Remove unused variables.Soren Jorvang
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5480 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-24Fix a few compiler/valgrind warnings, kill check for 17th texenv registers, pierre
and one problem reading a truncated sram file. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5474 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-23Rework the logic for avoiding lerp() in shader codepierre
This should give the exact same shader code except for the cases of SELA == SELB and SELC == 1, the latter only for the color combinder. In these two cases the results of the shader should not change in any way. It would have been possible to optimize the SELC == HALF case too, if the actual factor had been 0.5f instead of 0.4980392f. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5472 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22let's keep experimenting:Rodolfo Osvaldo Bogado
almost fixed real xfb in d3d, i say almost because there are some minor scalling problems. hope will fix them soon. implemented a more intelligent index generator to emulate more accurately the behavior of the gc. please give me feedback on this changes. enjoy :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5465 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22Use symbolic names instead of numbers and bump cache versionpierre
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5464 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22Modify r5462 as requested by rodolfoosvaldobogadopierre
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5463 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22The result of the last texenv stage is used regardless of destination registerpierre
The real hardware probably always sends the result of its computations to the alpha test/fog units, in parallel to its registers, but those only take the result of the last texenv stage. This makes grass show up in ZTP, where the last texenv stage oddly writes to reg #3 instead of #0. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5462 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-19after a good commit lets make some experiments:Rodolfo Osvaldo Bogado
implemented fixed efb scale to improve alignment and discard some error caused by incorrect scale. make both plugins work similar. this must improve opengl image quality a lot. also implemented dynamic resizing in opengl, this way the resolution math the windows resolution on resize. this is highly experimental so please test a lot. implemented shader dumping on error thinking in future experiments with shaders. enjoy :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5458 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-17a little optimization in shaders constants setting , based on the same idea ↵Rodolfo Osvaldo Bogado
of nodchip changes. a MAYORRRRRR change in pixel shader generation, please review all games you can and leave comments this must improve accuracy in graphic emulation a lot. for example: mario eyes in super mario galaxy, water pod transparency an water transparency on game intro in super mario sunshine, etc. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5457 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-04fast commit :Rodolfo Osvaldo Bogado
make native mips loading an option to prevent performance lost in game that not need this functionality.( thanks to dorian.fevrier for point the performance lost.) added a patch from pierre@pirsoft.de to avoid vertex drops when index array is full in opengl implementation that do not support large index arrays git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5432 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-22Move fullscreen display resolution control to the GUI with the rest of the ↵Glenn Rice
fullscreen toggling code. This removes redundancy of code that was in several places through the various video plugins. Unfortunately it means the fullscreen resolution setting also had to be moved to the main configuration dialog. I am sure that will meet some resistance. Also added a window size setting for windowed mode. Also pulled some X11 specific code out into a separate file. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5395 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-15Re-added Skies of Arcadia projection hack. Fixes issue 2514.skidau
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5372 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-12a few minor code fixes.nitsuja-
also added a user file that should simplify running from VS for newcomers git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5338 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-12Big restructuring of how the video plugin works. In linux and windows you ↵Glenn Rice
shouldn't see a change in the functionality; however, there are changes in how render to main or not, and fullscreen modes, and such are handled. Input is largely restructured for the video plugin. It is now handled by the host. Keys for pausing and changing fullscreen are configurable. More will probably be later. This is probably classified as highly experimental. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5336 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-10VideoCommon: Fixed the bug that some texture become black in SSSE3.1 codes.nodchip
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5309 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-09VideoCommon: Added automatic selection routines for SSSE3/SSE4.1 codes. It ↵nodchip
selects SSSE3/SSE4.1 codes only if a proper preprocessor definition is defined and the target cpu supports SSSE3/SSE4.1. The selection routines in VertexLoader_* use function pointers. TextureDecoder uses a combination of "#if" and "if" statements. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5302 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-09VideoCommon: merged SSSE3/SSE4.1 codes. Added some additional SSSE3/SSE4.1 ↵nodchip
codes which will be used in "The Legend of Zelda: Twilight Princess". These codes don't work unless "_M_SSE=0x301", for SSSE3, or "_M_SSE=0x401", for SSE4.1, is defined as a preprocessor definition. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5300 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-04Tweaked the widescreen hack: It now "hacks" to and from any aspect ratio, ↵Jordan Woyak
not just from 4:3 to 16:9. When "Stretch to Window" is chosen, the aspect ratio will be adjusted to 5:4, 16:10, or anything (whatever the aspect ratio of the window is). Works for 4:3 and 16:9 games. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5280 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-03back to limit vps instead of fps as this fix fps limit and now it works ↵Rodolfo Osvaldo Bogado
correctly as now the sync between the plug in and the core is almost correct. fixed fps display in the top bar, now it shows the real fps of the game. some code clean up and some corrections to make everything work right in the reference renderer. multiples xfb now is broken even in single core as is was not an error caused by dual core, i really dono where the error is,everything looks correct but if you test a game with multiples xfb or the ipl you will see the error. ector if you can take a look at he code and throw me some ideas i'll thank you. please test. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5272 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-02Fixed bug where the projection hack setting was not being saved in the Game ↵skidau
Properties dialog. Removed the obsolete projection hacks: * Final Fantasy CC Echo of Time * Harvest Moon Magical Melody * Baten Kaitos * Baten Kaitos Origin * Skies of Arcadia git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5271 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-04-01Another one bites the dustSonicadvance1
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5263 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-10Extend the OGL virtual XFB to handle games that use multiple XFBs to make a ↵donkopunchstania
frame. This should allow games that require the XFB to work without using a real XFB in RAM which is slow and limited to the original resolution. To use this enhancement you must check Use XFB in the options. The previous option was renamed Use Real XFB. I don't think this works with the aspect settings yet. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5185 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-09Added scons options "shared_libname=true" to link agains the system shared ↵Glenn Rice
libraries for lzo, sfml, and soil. For example add the scons option "shared_lzo=true" for lzo. This will check for the system libraries and then fall back to building and linking statically against the Externals if not found. You must have liblzo2-dev, libsoil-dev, and libsfml-dev installed. Note that you need version 1.5 or later for sfml. Currently scons doesn't check the version for you. If you are having trouble with segmentation faults in linux try "shared_soil=true". That seems to fix the problem. How do we fix this for the static build? git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5182 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-09Texture coordinates are stored in fixed point format in TEV which allows ↵donkopunchstania
overflows to be emulated correctly. Added logic to calculated texture LOD and use the correct mip. Dumping textures will now dump all mip levels. Added line rendering. Changed data stored in vertex from float arrays to vectors for cleaner math. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5178 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-07Removed more compiler warnings in linux.Glenn Rice
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5170 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-06Fixed the crazy code in r5161.nodchip
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5163 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-06Reverted the comparison function to r5159 and rewrote map to hash_map. I ↵nodchip
confirmed that the code can be compiled and run under Visual Studio 2008. And I confirmed the code can be compiled under gcc 4.4.0 (mingw). I could not confirm that the code run under linux. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5161 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-03-05Rewrote a object-comparison code using a standard function. It's a tiny ↵nodchip
refactoring. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5160 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-28Fixed a wrong type in r5140.nodchip
Commited code that I forgot to commit in r5140. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5141 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-28Refactored VertexLoader::CompileVertexTranslator(). Now texture coordinates ↵nodchip
loaders are also selected from a function table. I will add a hack to increase the speed in the next commit. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5140 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-28Refactored VertexLoader::CompileVertexTranslator(). Now the vertex position ↵nodchip
loader is selected from a function table. I will apply the same kind of refactoring to texture coordinates loader. This is a pre-preparation to optimize texture coordinates loaders. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5139 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-26experimental commit: simplify even more the params. please test and if ↵Rodolfo Osvaldo Bogado
theres something wrong will revert asap thanks for the comments in the prev commit they make my re think the approach. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5136 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-26Simplify the params for the safe texture cacheRodolfo Osvaldo Bogado
after some test the more relevant parameters were the color samples and the tlut max size. so delete the rest of the parameters and define 3 modes: Safe : the two values are set to 0 meaning all the texture data and all the tlut data are hashed this is the most correct and slowwwwwwwwwww way Normal: 37 samples are taken from the color textures an the firs 4096 bytes of the tlut are hashed, is a lot faster than safe mode but in some games i observe small glitches. Fast: 8 samples are taken from the color textures an the first 1024 bytes are hashed from the tlut, is a little slower than the unsafe cache but at least all the games i tested have correct text output and fast frame rate. the glitches in dinamyc color textures are more noticeable in this mode this values could be improved, if you find a better combination please post it and the game it fixes and i will update the source. for the moment, as my time is limited by a lot of work, only implemented the d3d gui, if someone can implement the opengl gui will be a lot of help for me. please test a lot and let me know the results. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5135 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-24Reverted because of some processor and performance issue. I will develop in ↵nodchip
a branch about SSSE3/SSE4.1. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5123 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-24Added SSSE3/SSE4.1 code for speed up. The code does not work in this ↵nodchip
revision because cpu_info is not initialized properly. I will fix the issue in another commit. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5119 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-24Systematically eliminating compiler warnings.Glenn Rice
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5117 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-23First a bugfix:Rodolfo Osvaldo Bogado
fixed a misbehavior in the clear code that causes depth clear problems in reference hardware (Intel as example). add 6 parameters to optimize Safe Texture Cache: SafeTextureCacheColorSamples, SafeTextureCacheIndexedSamples, SafeTextureCacheTlutSamples: this 3 parameters gives the number of samples taken to calculate the final hash value, less samples = more speed, more samples = more accuracy if 0 is specified the hash is calculated using all the data in the texture. SafeTextureCacheColorMaxSize, SafeTextureCacheIndexedMaxSize, SafeTextureCacheTlutMaxSize: this parameters limits the amount of data used for the hash calculation, it could appear as redundant but in some games is better to make a full hash of the first bytes instead of some samples of all the texture. color, indexed, tlut : define the texture type, full color data, indexed, and the tlut memory. the parameters are available in the config , no GUI at this time, if the test are OK will add it to the GUI. if someone needs it will give more examples on how to configure the values for specific games. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5116 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-23Some tiny fix, fixed a crash when activating "overlay some statistics" on ↵sl1nk3.s
OGL plugin (which actually overlays a whole book + 400 chapters of statistics and, indeed, overflows and crash) + memleak fix on LLE plugin and little fix on GBAlink shutdown code. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5113 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-22Revert commit 5105 until we sort out how we want this to work in linux.Glenn Rice
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5110 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-22On linux don't compile and link against lzo, soil, and sfml "Externals."Glenn Rice
Instead use system libraries liblzo2-dev, libsoil-dev, and libsfml-dev git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5105 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-20Some code clean up, and take care of some compiler warnings.Glenn Rice
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5090 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-13Fix crash when stopping and starting a game with OpenCL enabledSonicadvance1
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5047 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-12Fix a memory leak in OpenCLSonicadvance1
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5044 8ced0084-cf51-0410-be5f-012b33b47a6e