summaryrefslogtreecommitdiff
path: root/Source/Plugins/Plugin_VideoOGL/Src/TextureMngr.cpp
AgeCommit message (Collapse)Author
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-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-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-10test commit: please test if this improve the performance with the safe ↵Rodolfo Osvaldo Bogado
texture cache git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5038 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-08second try to implement a more correct safe texture cache, implemented full ↵Rodolfo Osvaldo Bogado
hashing of tlut textures as they are the more problematic, this should solve virtually all the problems with characters in all the games that have them. sorry to tell but this will bring a speed drop, so let you decide if this change stay or not.( used the fastest open source hash algorithm i know) do not apply full hashing to other format because it kills the performance. for popular request added 9x SSAA believe me will kill your graphic card even if is the best but the image quality is exceptional. as always please test and let me know the results. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5034 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-06D3D and Opengl:Rodolfo Osvaldo Bogado
reverted a tiny leftover of my safe texture cache commit D3D renamed the SSAA modes to use samples as MSAA now they are 2,25x and 4x. OpenGL: fixed a nasty logical bug introduced in 4984 that causes efb corruption when efb to texture is used re enabled shader caching as it was not producing errors. fixed efb misalignment caused by integer rounding still a bit misaligned but many games will look better now git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5020 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-03a lot of modifications here :)Rodolfo Osvaldo Bogado
first fixed scaling when updating backbuffer to make it friendly with encoders, now frame dumping must work without errors in any codec. clean screenshot and frame dumping code now is more correct, faster and stable. improve safe texture cache, improving the distribution of the hash algorithm, including tlut hash in the final hash of the texture, and making use of a 64 bit hash to make it more accurate. clean a lot of code and corrected some missused vertex formats when drawing full screen quads. and biggest change last: implemented pseudo antialiasing: a image post-process algorithm that mimics antialiazing and is fare more easier to implement in this scenario. you can change the intensity of the effect changing the values of the antialiasing combo. the right value depends on the game. for example mkwii looks awesome with 8x. please try all the changes and let me know the results. if something is broken, please let me know and will fix it asap. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5000 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-02-02Linux global build. At least the basic footwork is done here.Glenn Rice
Basic usage: "sudo scons install=global install" Hopefully this doesn't break builds on Macs. I have tested this on linux and windows. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4994 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-07mixed commit:Rodolfo Osvaldo Bogado
in D3D and Opengl: fixed one nasty bug in texture loading where if a dynamic texture keeps his format but the tlut format is changed, the try or reloading the texture in the same texture could cause a hang if the size of the resulting texture is different than the original (size in bytes) Applied a ugly temporal hack to the texture conversor to solve efb to ram misalignments and effect distortions. in D3D: Pseudo implementation of logic ops using basic blending: the first 8 operations are "good approximations", the remaining 8 are bullshit :) if someone have a better approximation to emulate this logic please let me know. please test if i don't break anything in the process and test Mario kart wee you will get a nice surprise.:) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4656 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-03d3d: a little speedup in efb to ram please test and let me know the resultRodolfo Osvaldo Bogado
opengl: a little code cleanup and possible speedup in texture recreation. d3d and opengl :plugins corrected the efb alignment when efb to ram is used. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4637 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-14fix for re missing characters in both plugins, thanks to autoran for the ↵Rodolfo Osvaldo Bogado
testing. also modified depth efb copy behavior to work accordantly to this change. in opengl efb copy, set the destination texture format and not use argb always. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4575 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-31Some errors in the values passed to e pixel shader caused the menu error, no ↵Rodolfo Osvaldo Bogado
they are fixed, thanks to LordMark for help me with the testing. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4490 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-30small code cleanup, and little fixing of errors introduced by mi in my first ↵Rodolfo Osvaldo Bogado
commit :( fixed scissor test in direct 3d git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4480 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-26OpenGL: commit rodolfoosvaldobogado's (what a name!) speedup patches.hrydgard
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4322 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-19D3D various: "Safe texture cache" option, texture replace instead of ↵hrydgard
destroy/create when possible, a commented out "optimization" that didn't speed things up (use DrawPrimitive instead of DrawIndexedPrimitive when possible), reduce code duplication in Flush(), don't periodically clean out the shader caches since it's not really beneficial - shaders are cheap to keep. some code cleanup. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4302 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-13Rename Config.cpp/h to VideoConfig.cpp/h.hrydgard
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4260 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-13Kill some horribly ugly hackery :( It's just not right to pass entire ↵hrydgard
IniFile objects across DLLs. Only POD (plain-old-data, like int, float, char, char[] etc) are safe to pass across DLL boundaries. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4257 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-13Lots of code and warning cleanup. OGL/D3D: Moved to a shared config class in ↵hrydgard
VideoCommon. This lets VideoCommon code read the config without ugly hacks. Fixed various config race conditions by keeping a copy (g_ActiveConfig) of the g_Config struct which is updated once per frame. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4256 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-04DiscIO:Fix the includes up Dolphin should now compile.death2droid
D3D and OGL: A minute clean up with texture dumping git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4199 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-04Fix screen flickering with frameskip on D3D plugin, also fix occasional hang ↵sl1nk3.s
when turning frameskip off git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4194 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-03D3D: Basic EFB copy-to-texture support. Fixes star domes in SMG (but does ↵hrydgard
not fix the pull star, need EFB reads for that) and some other things. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4188 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-03Moving more things out of GL into VideoCommon...hrydgard
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4187 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-03Some housecleaning around the D3D plugin, start of preparations to share ↵hrydgard
even more code with the GL plugin. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4183 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-08-11GFX: Cleanup - Move OGL's GetBlockHeightInTexels and GetBlockWidthInTexels ↵omegadox
code into VideoCommon. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3962 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-08-03Fix framelimiter's accuracy, thanks to sskkiipp !(issue 1237)sl1nk3.s
Also added an "auto" mode which automatically limits the framerate to fullspeed and move it from Interface settings to Basic setttings git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3934 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-28Now ALL copyright dates are fixed to the legally correct year: The year in ↵XTra.KrazzY
which the project began. Now we don't have to change it every year :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3898 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-19Roll back r3833 for render targets but keep it for static textures. Most ↵hrydgard
mirroring issues are OK and we shouldn't see any slowdown. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3844 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-18GL: Delete code for GL_TEXTURE_RECTANGLE_ARB in case of non-pow2 textures - ↵hrydgard
all modern GFX cards that can run Dolphin should support non-pow2 textures anyway. This removes some complexity and reduces the numbers of pixel shaders that need to be generated in some situations. Also fixes some texture mirroring problems. Let me know if this breaks things on ATI for some reason. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3833 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-07-15Code cleanup. Juggling rectangles. I'm about to investigate the problems ↵Nolan Check
with Real XFB's in PAL games, so I wanted to make sure all our rectangles were cleaned up and organized. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3794 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-28Clean up OpenGL code and introduce the Framebuffer Manager. More work is ↵Nolan Check
forthcoming; I plan to implement resolution switching (while the game is running) and also multiple virtual XFBs for game-controlled buffer swapping. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3587 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-22revert last 2 commitsnakeee
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3533 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-22They should be called SU Registers (Setup Unit/Rasterization). BP (Bypass) ↵omegadox
is really the name of the commands that are passed in. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3531 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-06-20Changes for OpenGL plugin:Nolan Check
- Render targets should not have an alpha channel - Use correct source rectangle for render-to-texture effects - Use "GL_INTENSITY8" instead of just "GL_INTENSITY" (makes no difference) The background of the "Stage Clear" screen in SSBM is now fixed! git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3502 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-16Some more modification of texture dumping and loading.death2droid
They now use gameID instead of game name for the folders. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3247 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-15Small little change and clean up.death2droid
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3242 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-15Added features to hires loading and texture dumping so it now dumps the ↵death2droid
files into a specific folder like for Mario Party 7 the textures will be dumped into a folder named Mario Party 7. For texture loading it now only checks the folder with the same name as the game. Like same as before moddified texture of Mario Party 7 would go in the folder named Mario Party 7 :P git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3241 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-15Remove a stupid mistake of minedeath2droid
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3238 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-15Make some updated to hires texture loading ect.death2droid
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3235 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-15Changing where depth is read. Trying to use the same depth buffer GL uses ↵donkopunchstania
when copying depth to a texture. This eliminates some quirky code and gets depth copies working in AA, but may not work on older graphics cards. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3234 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-13TextureDecoder now indicates I4 and IA4 texture formats. It also decodes ↵Nolan Check
paletted textures more efficiently. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3213 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-09A fix by baby.lueshi that fixes the problems with rev 3187death2droid
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3190 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-09Revert r3187 causes games to return lots of errors.death2droid
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3189 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-09Some changes to the hashing by baby.lueshideath2droid
You may have to redump textures. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3188 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-08Use correct width and height for compressed texturesNolan Check
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3187 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-07Add hires texture support to OpenGLdeath2droid
Currently still only dumps files as .tga but supports loading as .png, .bmp,.tga , .dds This is by baby.lueshi git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3166 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-05-06Add PC-native DXT1 support to VideoCommon and VideoOGL. Thanks to ↵Nolan Check
XTra.KrazzY and death2droid. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@3159 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-04-03OpenGL Plugin: code cleanup trying to follow code style wiki and updated ↵omegadox
copyright date git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2850 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-22Clean up OpenGL plugin error handling macros. No longer bother with enabling ↵hrydgard
TEXTURE_2D and TEXTURE_RECTANGLE_ARB - they don't apply when using shaders. Change a PanicAlert when looking for valid plugins into a LOG_WARN. Let me know if this breaks anything - it shouldn't. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2726 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-03-21remove newlines from OGL logging (they get added by logmanager)Shawn Hoffman
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@2720 8ced0084-cf51-0410-be5f-012b33b47a6e