summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Src/TextureDecoder.cpp
AgeCommit message (Collapse)Author
2011-03-22fix a memleak and quiet some warningsShawn Hoffman
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7394 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-21Moved per-game graphics configuration to the game-list right click menu. It ↵Jordan Woyak
will be too difficult to make the "profiles" drop-down thing work with 3-state vs 2-state checkboxes. The per-game settings now have "undetermined" states, except for the radio buttons(I'll fix that later). It's super hacky right now. Video config (probably all config stuff) could be redone. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7386 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-19Added a toggle switch for the OpenMP texture decoder in the graphics settings.skidau
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7375 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-07Shut up recent versions of GCC about the OpenMP pragmas.Soren Jorvang
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7316 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-05more fixes for opengl sing openmp, i hope is the last :)Rodolfo Osvaldo Bogado
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7300 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-05more fixes for my openmp commitRodolfo Osvaldo Bogado
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7299 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-05Fix OS X build.Soren Jorvang
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7298 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-05some fixes for my last commitRodolfo Osvaldo Bogado
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7289 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-05Linux build fix.Glenn Rice
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7288 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-03-04First Revert my changes to VertexLoader.cpp, i don't own the games that get ↵Rodolfo Osvaldo Bogado
error so i revert the changes until i can test it myself. Second: A experiment. implemented parallelization in texture decoding using openmp. is most a experiment to test the performance in different os/plataforms. in my system (windows x64 amd 1055t) give a speedup in large textures, but i tested in in intel dual core and gives a slowdown. o i limited the use for large textures and cpus with more than 3 cores. please test an let me know if it improves or degrades the speed. please for linux and osx user. to enable this you will have to enable your compiler support for openmp to test this code. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7284 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-25added the possibility to allocate aligned memory, an use it to allocate the ↵Rodolfo Osvaldo Bogado
buffer utilized in texture decoding, this will make a little easy to use aligned writes when possible in sse2/3 optimized algorithms. some code additions for future use ;). please gcc user test this as i don't have opportunity to test it myself i only use reference code to. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7247 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-02-02Remove the global namespace a bit and remove some dead code.Soren Jorvang
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7043 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-29Link the video plugin statically into the main binary on OS X.Soren Jorvang
This makes the OS X build more robust and should help pave the way for the integration of the video plugins as well as LTO. There are now no more global class level namespace conflicts left, as evidenced by the fact that Dolphin can be linked with -all_load, not that you would want to. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6958 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-09TextureDecoder: Some misc clean ups. Backport code to SSE2 version. Remove ↵xsacha
redundancy in RGBA8 (5% speedup). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6789 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-08Refactor all the SSSE3 functions in TextureDecoder so that the cpu_info ↵xsacha
check isn't looped over. Speeds up most textures dramatically (where it has previously slowed them). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6784 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-08New SSSE3 implementation for I4 texture decode. 14% speedup over the ↵xsacha
previous SSE4 implementation (so it was scrapped). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6783 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-08From my last commit: Fix build on Linux. Use SSSE3 instead of SSE3.xsacha
Remove some unused vars from the SSE2 CMPR. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6781 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-08New SSSE3 implementation of RGB5A3. About 40% improvement (less cycles) on ↵xsacha
the plain C version and 17% on the SSE2 version. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6779 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07This needs to be in the right place to work for <sse4. Going to bed now :P.xsacha
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6776 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07Probably want to store the result for sse4.xsacha
Makes I4 textures appear again for SSE4 codepath. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6775 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07Fix a missing 'else' in last commit.xsacha
Remove more redundancy in CMPR (may make it faster - not tested). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6774 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07Add SSSE3 implementation for RGBA8 texture decode. It is 25% faster (3/4 of ↵xsacha
the cycles) than the SSE2 version. Remove a bit of redundancy in CMPR. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6773 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07An extra 5-10% speedup for I4 texture decoding with SSE4.1 intrinsics.xsacha
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6772 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07SSSE3 implementation of IA8 texture decode. Roughly 50% faster than SSE2 ↵xsacha
version on my computer (SSSE3: 77%, SSE2: 57% vs reference C on Core2 Duo). About half as many cycles. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6770 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07Last commit only requires SSSE3, not SSE4.xsacha
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6769 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-07An SSE4 implementation for I8 texture decode. Slightly faster than SSE2 ↵xsacha
version on my computer (SSE4: 60%, SSE2: 55% vs reference C on Core2 Duo). git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6768 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-06Missed one MSVC-ism. Should fix build for Linux. Last revision should still ↵james.jdunne
work for Windows. No functionality changes this time. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6762 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-06Faster SSE2 optimized GX_TF_CMPR texture decoder which gets ~40% speed ↵james.jdunne
improvement on x64 and ~50% improvement on x86 as compared to reference C code. The code now uses direct pointer access from C code to write the colors to the destination texture instead of trying to force them back up into an __m128i and a single write call. This is what produces the major speed-up. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6761 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-06Kill HAVE_OPENCL.Soren Jorvang
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6756 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-06Enabled SSE2 optimization of GX_TF_CMPR decoder only for x86 builds. It ↵james.jdunne
can't compete with the x64 optimized reference C code. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6755 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-05Fixed Linux build.james.jdunne
Fixed small undiscovered bug in WII_IPC_HLE_Device_FileIO.cpp when looking at 0-length strings. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6745 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-05Fixed S3TC DXT1 decoder implementation. I see ~40% speed improvements ↵james.jdunne
running on x86 Intel hardware and 0% improvements running on x64 AMD hardware. Strange. More investigation to follow! git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6744 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-04Temporarily reverting to unoptimized until I can figure this out. Apologies ↵james.jdunne
for the SNAFU :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6741 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-04~40% speed improvement for decoding GX_TF_CMPR (S3TC) textures using SSE2 ↵james.jdunne
intrinsics. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6740 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-03Fix for bit reduction regression in GX_TF_RGB565 textures from previous commit.james.jdunne
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6726 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-02GX_TF_RGB565 texture decoder optimized with SSE2 producing a ~78% speed ↵james.jdunne
increase over reference C implementation. Fixed crash in debugger when attempting to enable profiler before having run any game. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6724 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-01Possibly fixed game crash issues by switching to unaligned SSE2 loads/stores.james.jdunne
Removed unnecessary work being done in the file system when logging is disabled. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6714 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-01GX_TF_I4 texture decoder optimized with SSE2 producing a ~76% speed increase ↵james.jdunne
over reference C implementation. GX_TF_RGBA8 texture decoder optimized with SSE2 producing a ~68% speed increase over reference C implementation. TABified the entire document per NeoBrainX. :) git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6706 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-31~68% increase in GX_TF_IA8 decoding speed. Not an oft-used texture format. ↵james.jdunne
An example use is the Wii cursor in MKWii in the menus. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6699 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-31~80% speed improvement in decoding GX_TF_I8 textures. Yes, EIGHTY PERCENT. ↵james.jdunne
However, for MKWii movie playback I still can't break the fluffin' 48 FPS boundary on my machine! There's something else at play here because this decoder is ridonkulously fast. ~25% speed improvement in decoding GX_TF_RGB5A3 textures which aren't used very much. I thought it would help for movie playback but I misled myself. Video playback has nothing to do with this texture format. Next I'll see if I can knock out some of these other texture decoders. Byte swizzling I'm sure can somehow be accomplished using _mm_unpacklo_epi8 trickery, so that'd be another big win I hope. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6698 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-30TextureDecoder.cpp: new SSE2 optimized GX_TF_I8 decoder. Probably not ↵james.jdunne
ultimately optimal SSE2 code, but provably better (on my machine) than the memset version. Tested with __rdtsc counts in an independent project. I get about 6-7 FPS more on average during the intro movie playback in Mario Kart Wii. Hope this compiles for GCC okay. TextureDecoder.cpp: merged two functionally identical decode5A3RGBA and decode5A3rgba methods. OpcodeDecoding.cpp and DLCache.cpp: optimization for GX_LOAD_XF_REG. The PSUHFB solution sounds better for SSSE3, but this is a small win for the default case. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6692 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-24CMPR texel blocks are 8x8 in hardware, even though the source format says 4x4.Shawn Hoffman
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6655 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-11-14VideoCommon: An experimental fix for Issue 3493. Changed _mm_load_si128 to ↵nodchip
_mm_loadu_si128. I could not test the bug because I don't have Sonic Colors. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6402 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-08-28sometimes to advance you have to make a step back.Rodolfo Osvaldo Bogado
use plain vertex arrays instead of VBOs to render in Opengl plugin as the nature of the data make VBOs slower. This must bring, depending on the implementation, a good speedup in opengl. in my system now opengl and d3d9 have a difference of 1 to 5 fps depending of the game. some cleanup and a little work pointing to future improvements in the way of rendering. please test and check for any errors. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6139 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-31Newer versions of GCC's <tmmintrin.h> check for __SSSE3__ (-mssse3).Soren Jorvang
No matter. We don't actually need it for our purposes. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6016 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-31Make the SSE3.1 VideoCommon code available in GCC builds.Soren Jorvang
The GCC model for extended instructions like these is that you compile with -msse3 etc. These affect code generation for whole compilation units, so the idea is that you have a separate .c file for each instruction set class and then indirect to the desired one at runtime. Without e.g. -msse4.1, the GCC built-ins used by <foointrin.h> are not available. However, in our specific case of compiling with -msse2 and wanting to use SSE3.1 code, enough built-ins are available that we only need to provide a little hack for pshufb. Upgrading this to also use SSE4.1 instructions doesn't appear feasible without a lot of undesirable duplication of GCC built-in functions and headers, so we'd probably have to move to the GCC model of separate source files for that. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6014 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-22Add a toggle option for OpenCL in Config (in Advanced Settings). Default is off.xsacha
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5768 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-22Refactor and prepare the OpenCL texture decoder for decoding textures to ↵Orphis
RGBA format required by DX11. Fix the decoder codepath when OpenCL is enabled and the DX11 plugin is used. Added the DX11 plugin to the Dolphin project dependencies. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5764 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-19fix for rbga8 decoding that causes problems in nsmbwRodolfo Osvaldo Bogado
fix for screen clearing in opengl and d3d git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5749 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-19add a path to texture decoder to produce only rgba textures, this will make ↵Rodolfo Osvaldo Bogado
texture loading in dx11 a lot easier and give a little performance boost to. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5746 8ced0084-cf51-0410-be5f-012b33b47a6e