Compare commits

...

890 Commits
v1.2 ... v1.3.1

Author SHA1 Message Date
Avi Halachmi (:avih)
267ff7d196 tag v1.3.1: superficial - align the version for buildbot, pcsx2 and git
We should have tagged v1.3.0 at 1fb3d7dd17
but we didn't, and tagging v1.3.0 now (HEAD or retroactively) would only create
confusion.

Instead we're setting a new baseline version of 1.3.1 which will be displayed
at the buildbot lists, at pcsx2, and at the git tag.

This doesn't indicate any change to pcsx2 other than aligning the version
numbers of the various places which use it.
2015-01-29 14:43:31 +02:00
Avi Halachmi (:avih)
2da3e15aaa patches: move verbose from ELF-log to Dev-verbose
improvements from the previous commit stay (less noisy, better reboot verbose)
2015-01-19 10:12:12 +02:00
Avi Halachmi (:avih)
6305d8d61e patches: reduce console noise for patches/cheats, verbose with ELF-log
1. When changing settings, such as aspect ratio, patches message was spamming
the console, now they don't.

2. Added more verbose patches messages when ELF-log is enabled at the console.
These messages now show whenever patches/cheats are applied, including when
changing settings such as aspect ratio.

3. When rebooting the same game again, some of the cheats messages were not
displayed since it's the same CRC and the logic thought it should remain quiet,
now verbose gets reset on boot which will show all patches messages correctly.

4. Errors/warnings stay the same and not afected by this change.
2015-01-19 01:15:32 +02:00
Gregory Hainaut
9495b8e3e0 Merge pull request #434 from Leucos8/master
Added the latest strings to the Italian translation
2015-01-18 20:56:47 +01:00
Gregory Hainaut
29ef99d2d1 windows build take3: revert previous commit
Use back _Interlocked* function
Use vol_t type for all variables that uses _Interlocked* function
    (so it is compatible with 64 bits)
2015-01-18 19:25:46 +01:00
Gregory Hainaut
6d4039cc85 More fix for windows (extend previous commit) 2015-01-18 13:08:47 +01:00
Leucos
8da5817f8f Added the latest strings to the Italian translation 2015-01-18 11:40:05 +01:00
Gregory Hainaut
4cf1b6068f common: fix windows build (hopefully)
* Use threading wrapper for Mutex.cpp/wxHelpers.cpp
* Cast s32 to long on window

(not tested on windows ;) ping me if it still doesn't work)
2015-01-17 20:39:38 +01:00
Gregory Hainaut
c5e6013d75 Merge pull request #419 from PCSX2/64-bit-crashes-fix
64 bit crashes fix
2015-01-17 12:08:24 +01:00
Gregory Hainaut
0bdeb8d411 Merge pull request #430 from PCSX2/win-ocl-crash-fix
gsdx ocl: check size of array before access
2015-01-17 12:05:52 +01:00
Gregory Hainaut
6bb945f6c8 Merge pull request #428 from pgert/master
Case Mapping & GitHub instead of GoogleCode.
2015-01-16 21:25:36 +01:00
Gregory Hainaut
1295b46a49 Merge pull request #427 from uyjulian/add_forward_compatilbe_gl_core_context
WGL GSdx forward compatible bit

(I think it is for wine)
2015-01-16 21:02:13 +01:00
Johannes Obermayr
149940ffda common: gcc can't inline a couple of function
=> "can never be inlined because it uses variable argument lists"
2015-01-16 20:57:09 +01:00
Gregory Hainaut
70ad09f6ef gsdx ocl: check size of array before access
Potential fix for issue #408 ?
2015-01-16 09:39:50 +01:00
pgert
abb005e6e2 Update pcsx2.1 2015-01-13 13:17:57 +01:00
Gregory Hainaut
079ed2c7a9 Merge pull request #423 from micove/wxconfig-wx30
Search for wx-config-3.0 and wxrc-3.0.
2015-01-12 22:52:24 +01:00
pgert
ad8e800aa5 Update Cfg.c 2015-01-12 13:27:09 +01:00
pgert
6c750b19b3 Update AppInit.cpp 2015-01-12 13:25:50 +01:00
pgert
c0f1738bb9 Update pcsx2.1 2015-01-12 13:24:34 +01:00
Miguel A. Colón Vélez
f160c39814 Remove dead code from cmake/ApiValidation.cmake. 2015-01-12 02:54:49 -05:00
Gregory Hainaut
a5ff4aca80 mvu: add a comment on special 'register'
It explains why first 'register' isn't included in the loop.

Hardware note: it is called a register but in hardware they're just wire
stuck on 0/1, so not a real HW register
2015-01-11 15:37:46 +01:00
uyjulian
446977d126 GSdx forward compatible bit 2015-01-09 19:39:59 -06:00
Miguel A. Colón Vélez
90c4322fc5 Remove check for wxrc since it's not needed. 2015-01-09 07:44:26 -05:00
Miguel A. Colón Vélez
3b83d6d302 Make FindwxWidgets find the correct version/toolkit via wx-config.
WX_vs_SDL() is still needed.
2015-01-09 07:18:16 -05:00
Avi Halachmi (:avih)
7b7a977d11 gzip ISO: fix broken handling of file names with non-english chars
this uses <wxString>.mbc_str() instead of .toUTF8() for all file related
stuff.

also normalizes all Console outputs to use WX_STR(str).

TODO: this was only tested on windows.

if someone could test on linux (wx 2.8 and 3.0) that english-only and not
english-only iso.gz file names work correctly (open the file, create the index,
read the index on next boot and that all console prints are good), please
post a comment.
2015-01-09 12:16:13 +02:00
Miguel A. Colón Vélez
cc9b6fa5a4 Search for wx-config-3.0 and wxrc-3.0.
The comment made it look as an arch-only thing which was misleading.
.
Gentoo uses
wx-config-3.0 and wxrc-3.0
2015-01-08 22:27:16 -05:00
Gregory Hainaut
a3cd81c1bb Merge pull request #421 from micove/fix-issue-402
Fix issues with DOC_DIR_COMPILATION.
2015-01-07 21:59:05 +01:00
Gregory Hainaut
3c11e759a2 Merge pull request #420 from micove/git-cmake
Don't assume .git exists just because git is installed.
2015-01-07 21:58:56 +01:00
Miguel A. Colón Vélez
ed317360ef Fix issues with DOC_DIR_COMPILATION.
This fixes the remaining issues:
- wx2.8 => apparent utf issue.
- wx3.0 => opens the file twice.
.
Fixes #402
2015-01-06 22:02:22 -05:00
Miguel A. Colón Vélez
f392493245 Don't assume .git exists just because git is installed.
find_package(Git) is done in SearchForStuff it could be deleted over there
but it fits better there. The only thing this line did was saying git was
not found for a second time since if it was found then it never triggered.
.
Check for the existance of .git to avoid
fatal: Not a git repository (or any of the parent directories): .git
2015-01-06 21:14:10 -05:00
Gregory Hainaut
b03162747c sVU: add an option to remove it
The goal is to reduce the burden for new architecture port.

Patch is mostly inspired from 3kinox initial patch. The diff are
*/ used ifdef instead of raw removal
*/ gui don't rely on UseMicroVU* option
*/ completely remove sVU_micro.* file
2015-01-06 23:45:43 +01:00
Gregory Hainaut
e0add8003d mvu: mvu VI has only 16 registers
fix issue #417
2015-01-06 23:32:00 +01:00
Gregory Hainaut
678c8a5cd6 cmake: validate wx api
checks wx-config version is compatible with the one requested by the user (wx 2.8 or wx 3.0 with WX28_API option)
2015-01-06 21:55:33 +01:00
Gregory Hainaut
14d4b3fe7a build.sh: add a -no-cross-multilib option
(only for developers)
2015-01-06 21:54:55 +01:00
Gregory Hainaut
a0d54df522 Merge pull request #415 from micove/build-cleanup
Improve build system.
2015-01-06 21:36:24 +01:00
Gregory Hainaut
3f521cc7a0 pcsx2: use %ls for unicode string
%s seems to work because the printed string is single char. Let's be
pedantic
2015-01-05 23:59:08 +01:00
Gregory Hainaut
04ca7f4a2b common: 64 bits intrinsic fixes
long is 8B on linux. Replace it with s32
long long is always 8B but let's replace it with s64 so we are sure
2015-01-05 23:46:18 +01:00
Gregory Hainaut
e447ffc8b2 cmake: fix asan on 64 bits 2015-01-05 23:45:37 +01:00
Gregory Hainaut
aba0a09816 pcsx2 64b: fix crash on string formating function
Call to vsnprintf update the gp_offset of the varargs (at least on x86_64 linux).
Therefore the 2nd call (because buffer was too small) uses out-of-memory arguments

We need to keep a local copy otherwise you will get an awful SIGSEV

Note: I'm sure we have same issue on plugins
2015-01-05 23:38:30 +01:00
Miguel A. Colón Vélez
305942c78b Rely on the user specifying WX28_API. 2015-01-04 15:08:12 -05:00
Gregory Hainaut
90d27bf5f6 cmake: try to validate the user option
* GTK3_API requires a wxWidget that support it too
=> avoid complexe compilation error
* SDL2_API requires a wxWidget without SDL support (wxUSE_LIBSDL = 0)
=> avoid run time  crash

SDL check hypothesis: wx is linked against SDL1.2 and not SDL2. It would need to be improved on a distant future
2015-01-04 20:43:26 +01:00
Gregory Hainaut
0346da2fa0 cmake: both zzogl and gsdx require gtk
Actually everything require GTK
2015-01-04 19:54:05 +01:00
Miguel A. Colón Vélez
7c766e66ad Add the option of cross compiling by default in build.sh.
Revert this or use useCross=0 for normal behaviour.
2015-01-04 01:32:04 -05:00
Miguel A. Colón Vélez
8440d263cd Respect the CC and CXX environment variables when cross building. 2015-01-04 00:56:47 -05:00
Miguel A. Colón Vélez
e23e2ac327 Rely on clang autodetection instead of user input. 2015-01-03 22:07:16 -05:00
Miguel A. Colón Vélez
6e28a8e694 Update the archlinux wx fix.
This fixes it for build.sh and when not using build.sh (packaging).
.
Also fix native 32bit build which should also be broken and attempt to
predict the future and fix it for lib32-wx3.0. Worst case the filenames
have to be fixed which is trivial.
.
When wx2.8 support is dropped then only the lib32-wx3.0 IF should remain.
When crosscompilation support gets dropped then the first IF gets deleted
unless we also dropped wx2.8 support then everything gets deleted.
2015-01-03 22:00:47 -05:00
Avi Halachmi (:avih)
5933db386a gzip ISO: fix compile issues on linux 2015-01-03 18:50:07 +02:00
Gregory Hainaut
aea421cc8e partially revert #403
One define doesn't exists on linux
2015-01-03 15:52:43 +01:00
antoine faravelon
cdd6598e65 Update build.sh with 64bit support and with wx2.8 forced for archlinux
wx3.0 32bit is not in main repositories, better to avoid the use of aur just for pcsx2
2015-01-03 15:15:07 +01:00
Gregory Hainaut
a11286bbc5 Merge pull request #403 from pgert/master
Update i18n.cpp
2015-01-03 14:58:32 +01:00
Gregory Hainaut
798fa11c57 Merge branch 'micove-use-target-arch' 2015-01-03 14:51:12 +01:00
Miguel A. Colón Vélez
c2cba0d4ae Quick regression fix for SDL2 detection.
I only had to add "PATH_SUFFIXES SDL2".
.
include is superfluous
SDL2-2.0 is a distro specific convenience symlink. Use the correct one
as before.
.
I probably did this as an artificial way of disabling pkgconfig when cross
compiling and before disabling pkgconfig for all cross compiling but it's
wrong. I thought I had fixed this already.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez
be1842f4e9 Detect clang and automatically set USE_CLANG.
User may forget or not know about -DUSE_CLANG=TRUE. It could probably
be always autodetected instead of requiring user input.
.
Trivial wording changes to compiler_version.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez
c8c22cf6a0 Notify about cross build option upon failure.
Tell the user to use CMAKE_TOOLCHAIN_FILE upon failure.
.
Cleanup detectOperatingSystem. Should be the same but adding
GNU and kFreeBSD from Debian and filtering out pre OS X Apple.
.
libaio is linux only. Also check for the correct header since
aio.h is the POSIX one. Both are in /usr/include/ anyway.
Only build core if (Linux AND NOT AIO_FOUND) == false.
.
Use Unix for GTK and X11. Macs has gtk-quartzs and xquartz or native X11.
*BSD, linux, etc should have both.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez
b42c9defb1 Avoid PKG_CONFIG_PATH issues.
Even before this pull request it was required to set PKG_CONFIG_PATH
when cross compiling since pkg-config always searches for native
libraries. This would require to backup an already existing ENV
variable if present, detect the distro specific place the pkgconfig folder is,
and restore the original ENV variable if it was present. Cmake as shown in:
.
http://www.cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3df51470
.
added support for this but requires CMAKE_MINIMUM_REQUIRED_VERSION as 3.1
which is kind of strict since it was released 10 days ago.
.
To avoid the ugliness let just avoid pkg-config when cross compiling. This
means only EGL, SDL2 and GTK3 have to be updated since the rest work w/o
pkg-config.
- EGL is fixed with PR #409
- SDL2 is fixed here and it's trivial.
- GTK3 is non-trivial. For this one use pkg-config for native builds since
  the .pc file is kept up to date automatically. For cross compilation
  use the provided FindGTK3 which I made by using the sed documented
  inside the file and updating the dependencies for GTK3. Since I checked
  each and every single .pc file to make sure they are up to date this
  should have the same behaviour as pkg-config. Prefer the .pc files for
  native builds since it does not need to be manually updated and when
  the native 64bit port gets finished all the cross compile options should
  be removed which is quite easy since most of the code got moved to the
  CMAKE_TOOLCHAIN_FILE.
Note:
Cmake Modules are BSD-3-clause therefore GPL compatible.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez
bed7a4f92e Be really strict about dependencies.
The obtained binaries before and after this commit are identical (sha1sum)
when compiled in Debian/Ubuntu/Fedora/ArchLinux.
.
The linker will always pick the 32bit libraries the only thing this does is
make sure we have all the 32bit dependencies installed. Basically we avoid
detecting the 64bit libraries and telling the users the 32bit libraries were
found. We always link with 32bit libraries therefore this avoids having to
wait 5-10min to just be told -lXXX is missing.
.
The only thing really needed are
set(CMAKE_LIBRARY_ARCHITECTURE "../lib32")
set(CMAKE_LIBRARY_ARCHITECTURE ".")
.
which basically ensures we don't pick 64bit headers since
CMAKE_LIBRARY_ARCHITECTURE always gets tested first and for some reason
FindGTK2 test searches lib64 first then lib32/lib. These values are hardcoded.
Right now these arch specific headers are not used but can't say this will
always be true.
.
FIND_LIBRARY_USE_LIB64_PATHS is not needed for native builds and it's covered
by CMAKE_SYSTEM_IGNORE_PATH.
.
NOTE:
We filter out lib32 because multilib is not compatible with multiarch.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez
553536f9cb Fix build in Fedora and print a confimation of cross compilation.
- Fedora only needs --arch if cross compiling.
  + It's only used to select libdir so i386=i686=i986
- Messages are nice to debug build logs.
.
Everything seems to work unless some other distro broke. Other
distros need to add CMAKE_TOOLCHAIN_FILE or --cross-multilib if
they cross compiled amd64 -> i686.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez
b03ca5fcf4 Include some rather simple CMAKE_TOOLCHAIN_FILE.
- Update the build.sh and fix some typos.
  + Don't add the OSX ones because I have not tested them and it won't
    even build anyway due to the libaio dependency. Needs to use POSIX AIO
    or something else.
- They are rather simple and all the magic happens in two lines.
  + First line tells cmake to get ready to compile FOR linux or darwin.
    It also sets CMAKE_CROSSCOMPILING to true which is the only way to
    let cmake known that we are using stuff not from the host.
  + CMAKE_C_COMPILER/CMAKE_CXX_COMPILER are basically used to detect
    the architecture of the target. Since I used generic cc/c++ the
    hardcoded -m32 is needed to ensure we get TARGET=i386. Also
    since I hardcode -m32 and use c++/cc it's to be noted that
    we can only do i386->i386 (trivial), amd64 -> i386, and x32->i386.
    .
    Using something like i586-linux-gnu-{gcc,g++} would also work and
    enable arm -> i386, etc but it's infeasible and impractical to do all
    the combinations. File is simple enough that a distro or user can
    create their own and cross compiling is rather tedious compared
    to using a chroot to compile it.
- I tested it in Debian with "dpkg-buildpackage -ai386" but installing the
  build dependencies was rather tedious.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez
d6d06d243c Begin cleaning up the cross build code.
http://www.vtk.org/Wiki/CMake_Cross_Compiling
http://www.cmake.org/cmake/help/v3.0/manual/cmake-toolchains.7.html
.
The official way that cmake does cross compiling is via the use of a
CMAKE_TOOLCHAIN_FILE. This has to be given by the user and can't be
included from within a Cmake file since setting up the toolchain has
to be the first thing that happens.
.
After the file is given and validated cmake behaves nicely and all the
workarounds and hacks are not really needed anymore.
.
The consequence of this change is that without this file cmake will
try to build for the HOST architecture as expected and with the file
it will build for the TARGET architecture of the given toolchain. Due to
this remove 64BIT_BUILD_DONT_WORK and just ERROR out if the user tries
in the same way as before.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez
8ea0766773 Use TargetArch to correctly detect the target.
Currently crosscompiling was broken since we detected the cpu of the host
not of the target. Building arm -> i386, i386->amd64, etc resulted in
interesting stuff.
.
CMAKE_HOST_SYSTEM_PROCESSOR and CMAKE_SYSTEM_PROCESSOR should have done this
but they are incredibly broken and unreliable. I use
CMAKE_HOST_SYSTEM_PROCESSOR just to retain the format of the old message
and is not used for critical stuff so it does not matter.
.
This code also allows scalability so that if one day in the very distant
and unlikely future the x86/x86_64 specific code gets made portable
by replacing asm/MMX/SSE*/AVX/etc code with generic/portable code then
it also would work on all architectures.
.
For *BSD/OS X it probably would need to use POSIX AIO instead of linux
specific libaio but that is a different issue.
.
Error out the x86_64 builds.
Also the 64BIT_BUILD_DONT_WORK option became obsolete more info in following
commit.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez
e548ada1e9 Disable the use of multiple architectures in darwin.
- Update copyright due to incoming changes.
- Don't support universal binaries until they actually work therefore
  only allow 1 architecture in CMAKE_OSX_ARCHITECTURES.
- Don't allow an empty ARCH list.
  We probably asked for ppc or ppc64 w/o support for it.
2015-01-03 14:51:04 +01:00
Miguel A. Colón Vélez
b18b0fdf28 Add TargetArch.cmake.
For now just dump the original and add the BSD-2-Clause.
.
It's GPL compatible so it's okay.
.
I was writting one myself but found this one and it handles apple
which I did not consider since I can't test it.
2015-01-03 14:51:04 +01:00
Gregory Hainaut
806cefb0c6 64 bit: use uptr instead of int 2015-01-03 14:50:54 +01:00
Gregory Hainaut
f33027f24d Merge pull request #409 from micove/small-cleanup
Fix GSdx build and enhance the desktop file.
2015-01-03 14:47:54 +01:00
Avi Halachmi (:avih)
b07aeb892a cheats_ws.zip: now has 1763 files - 583 new, 105 modified, 14 removed
This is the cheats_ws folder inside Devina's archive from 2014-12-18, with 5
removed WIP patches (CRCs: 0E7F91DA, 4C33FA2A, 1771BFE4, C77AF2CA, DA3DD765),
zipped and replacing the existing cheats_ws.zip file.

See http://forums.pcsx2.net/Thread-PCSX2-Widescreen-Game-Patches?pid=423433#pid423433
2015-01-02 04:08:58 +02:00
Avi Halachmi (:avih)
e525f95f22 gzip ISO: allow custom index file name/location via a template
At PCSX2_ui.ini: default:  GzipIsoIndexTemplate=$(f).pindex.tmp
The rules:
- must contain one and only one instance of '$(f)' (without the quotes)
- if starts with $(f) then it expands to the full path + file name.
- if doesn't start with $(f) then the path is ignored (name+ext only)
- if doesn't start with $(f) and ends up relative,
  then it's relative to pcsx2.exe (not to cwd)
- No checks are performed if the result file name can be created, so the dir
  should exist.
- PCSX2 will not try to rename/move older index files to the new name/location.
  If it's modified - the user should take care of rename/move before loading
  gzipped iso files or else it will create a new index according to the template

Examples:
$(f).pindex.tmp - the default - same dir as the iso, loads older index files.
$(f).pindex     - a popular request.
cache.gz/$(f)   - relative to pcsx2.exe (if the dir exists).
%appdata%/pcsx2/cache.gz/$(f) - should end up at the default install docs dir.
2015-01-02 03:27:06 +02:00
avih
1c869450c1 Merge pull request #413 from monsterjamp/master
Small update to GameIndex
2015-01-01 04:42:48 +02:00
monsterjamp
7082102631 Small update to GameIndex 2014-12-31 18:50:37 -06:00
Avi Halachmi (:avih)
10040f82e0 UI: change language: more standard dialog and better Apply button
The Apply button was part of the language panel, now it's part of the dialog.
Also, The Apply button is now enabled/disabled correctly.
2014-12-31 12:32:29 +02:00
Avi Halachmi (:avih)
2b567e51ff nogui: don't zombie on suspend. --noguiprompt to prompt before exit
when running with --nogui, PCSX2 knows to exit when the GS window closes.
However, pressing esc (suspend) didn't close the window and instead hidden it.
As a result, PCSX2 didn't exit and remained a zombie process.

this patch closes the gs window on suspend in --nogui mode, which makes PCSX2
exit fully.

it's now also possibly to use --noguiprompt which prompts if esc will exit
PCSX2, and allows the user to abort the suspend and continue using PCSX2.

TODO: if PCSX2 was in full screen - then pressing esc exits full screen. it
would have been ideal to restore full screen, but for now it doesn't.
2014-12-31 03:37:24 +02:00
Avi Halachmi (:avih)
576513a6d0 kb shortcuts: fixed file name PCSX2_keys.ini to PCSX2_keys.ini.default 2014-12-30 22:22:43 +02:00
Avi Halachmi (:avih)
25382d471d kb shortcuts customization: improve messages, add sample PCSX2_keys.ini
- don't display a message if the replacement is the same as the default.
- display a message if the key combination is unknown
- (same as before) display a message when replacing a shortcut
- also added PCSX2_keys.ini.default sample file with some help
2014-12-30 22:15:01 +02:00
Avi Halachmi (:avih)
c4bd50c04c UI: Change Language: use a dialog instead of forcing first-time-wizard
The method of forcing first-time-wizard wasn't very effective because
1. it's ugly, and 2. after selecting the language at the wizard it either
imports the previous settings (together with the previous language thus
overriding the new language) or resets all other settings - which is not fun.

This patch uses a small dialog instead to only change the language, and within
it reuses the language panel from the first time wizard.
2014-12-30 19:31:50 +02:00
Avi Halachmi (:avih)
1779ee42c2 log console: Sources menu - add Restore Default item 2014-12-30 05:29:39 +02:00
Avi Halachmi (:avih)
95e00e0edf cheats[_ws]: don't ignore custom folders for cheat files
The code was searching only at the default paths for cheats and cheats_ws.
Now it's possible to set UseDefaultCheats[WS] at PCSX2_ui.ini to 'disabled'
and set a custom value to Cheats and/or CheatsWS and PCSX2 will respect it.
2014-12-29 14:21:38 +02:00
Miguel A. Colón Vélez
6dd3094802 Fix the rare case in which EGL is not found.
EGL sometimes is not found. Checklib 1st does
.
string(TOLOWER ${lib} lower_lib)
pkg_search_module(${var} QUIET ${lower_lib})
.
Therefore this part should be equivalent since we always compare lower.
.
This part seems to not find anything and then it does.
.
find_library(${var}_LIBRARIES ${lib})
.
Here it also does not find anything since it tries to find libegl
while the library is called libEGL therefore I changed the name to upper.
to avoid
_internal_message("-- ${lib} not found (miss lib)")
.
It could fail in the unlikely event that someone renamed libEGL to libegl.
This bug is triggered when you combine crosscompiling from amd64 to
i386 with Debian multiarch paths. For other distros it should work with
pkg_search_module normally.
2014-12-24 11:41:04 -05:00
Miguel A. Colón Vélez
9060eadfe7 Add the new Keywords entry to the desktop file.
It was added recently to the xDG specs
http://standards.freedesktop.org/desktop-entry-spec/latest/ar01s05.html
.
It should improve the discoverability of pcsx2 for gnome shell users in any
distro and Ubuntu users at the very least. It's unrelated to the menu
hierarchy so it does not need a special hack for OpenSuse. Also it should
not break anything.
.
It's an optional entry but the "gnome guys" really want software to use it
more.
.
It should be concise and not the name of the software so I just did
game;emulator; since for example gnome-chess uses game;strategy;.
2014-12-24 11:27:49 -05:00
Gregory Hainaut
d4793cc6b6 i18n: update build of various translation 2014-12-23 19:51:03 +01:00
Gregory Hainaut
c5b6216032 Merge pull request #405 from PCSX2/disable-opencl
gsdx ocl: disable it on windows
2014-12-23 19:48:50 +01:00
Gregory Hainaut
ee34bd724f gsdx ocl: avoid a crash if ocl is selected but not enabled 2014-12-23 19:39:02 +01:00
Gregory Hainaut
59847c964c Merge pull request #404 from Leucos8/master
Italian translation and game database update
2014-12-23 19:37:09 +01:00
Gregory Hainaut
d22a2c7961 Merge pull request #407 from josephgbr/master
Updated Brazilian Portuguese translation
2014-12-23 19:36:55 +01:00
Rafael Ferreira
f037a42309 Updated Brazilian Portuguese translation
Signed-off-by: Rafael Ferreira <rafael.f.f1@gmail.com>
2014-12-23 14:05:16 -02:00
Gregory Hainaut
fbb64c4ce7 Merge pull request #406 from nE0sIghT/master
Cmake: Use ${DOC_DIR} variable for docs destination
2014-12-23 10:08:49 +01:00
nE0sIghT
003ac1b762 Use ${DOC_DIR} variable for docs destination 2014-12-22 23:02:44 +03:00
Gregory Hainaut
d00666a4d9 cmake: regression to select SDL/GTK + 64bits fix 2014-12-22 19:31:32 +01:00
Gregory Hainaut
767b841fea gsdx ocl: disable it on windows
Until we found a way to fix a couple of crashes
2014-12-22 19:02:35 +01:00
Leucos
fd89d2145a Game database update
Many game title correction/update/normalization
2014-12-21 16:59:31 +01:00
Gregory Hainaut
6830962c3a i10n: update sv_SE 2014-12-21 16:54:41 +01:00
Gregory Hainaut
0c17d67fa5 cmake: add a new option to select the doc path in package mode
DOC_DIR_COMPILATION=/usr/share/doc/pcsx2

close issue #402
2014-12-21 16:51:41 +01:00
Leucos
bc4eff88a7 Updated the Italian translation 2014-12-21 16:28:13 +01:00
pgert
93cbce82f9 Update i18n.cpp 2014-12-21 14:38:07 +01:00
Gregory Hainaut
8123b5090a Merge pull request #400 from pgert/master
sv_SE translation
2014-12-21 13:21:43 +01:00
Gregory Hainaut
da969ffaeb Merge pull request #401 from PCSX2/unicode-mess
pcsx2:wx3: fix filter selection of iso
2014-12-21 13:21:35 +01:00
Gregory Hainaut
b24c76f12a SafeArray: add a null pointer check
Thanks @ghost for the report.

Close issue #327
2014-12-21 12:49:02 +01:00
Gregory Hainaut
0b77f93154 console: improve readability on consoles that have black backgrounds
Thanks Micove for the patch.

Close issue #383
2014-12-21 12:41:01 +01:00
Gregory Hainaut
2bc4686afa pcsx2:wx3: fix filter selection of iso
On linux, wxChar requires a %ls

It must be tested on windows:
1/ >CDVD>Iso selector>Browse...
2/ try the different filter
2014-12-21 12:34:05 +01:00
Gregory Hainaut
dc1cd3eb25 cmake: forbid user to use experimental flags
Namely GTK3_API and 64BIT_BUILD_DONT_WORK

The former was barely tested and doesn't compile with standard wx
The latter doesn't work at all

Note: I was very close to disable SDL2 too.  If wxWidget was built with
SDL1 support it will crash
2014-12-21 10:46:33 +01:00
pgert
7ab320b5d5 Update pcsx2_Main.po 2014-12-20 21:27:58 +01:00
pgert
4074f1b1ed Update pcsx2_Iconized.po 2014-12-20 21:27:12 +01:00
pgert
f7ffe391f6 Update pcsx2_Main.po 2014-12-20 21:21:46 +01:00
pgert
82c3a5ad5a Update pcsx2_Iconized.po 2014-12-20 21:20:53 +01:00
Gregory Hainaut
1f54bb73aa cmake: enable some aggressive warning
Allow to track strict aliasing issue and overflow
2014-12-20 13:43:25 +01:00
Gregory Hainaut
66d7aa75e2 cmake: move -DNDEBUG to global option 2014-12-20 13:43:25 +01:00
Gregory Hainaut
a99f3ea321 cmake: remove duplicate flags
also use the lighter elseif structure to reduce a bit the size of cmakefile
2014-12-20 13:43:25 +01:00
Gregory Hainaut
4773bcf0ea cmake: s/_LINUX/__linux__/ 2014-12-20 10:54:24 +01:00
Gregory Hainaut
532cc7755c cmake: remove cmake from 3rdparty
3rdparty have been deprecated since a long time on linux.

Files are likely wrong
2014-12-20 10:54:18 +01:00
Gregory Hainaut
4f957feacd onepad: use union instead of stange cast
Nicer this way. Beside it removes the strict aliasing issue.
2014-12-20 10:54:18 +01:00
Gregory Hainaut
43e854fece spu2x: remove duplicated function 2014-12-20 10:54:18 +01:00
Gregory Hainaut
03a88aab0b translation: Refresh all languages 2014-12-15 19:29:44 +01:00
Gregory Hainaut
ff24a5f702 gsdx linux: disable std::thread
Threads are not killed properly therefore GS crashes on reloading (aka F9)

See issue #392
2014-12-14 12:22:40 +01:00
Gregory Hainaut
b9297c6158 Merge pull request #377 from PCSX2/tlb_goemon_v2
goemon gamefix improvement
2014-12-14 11:47:37 +01:00
Gregory Hainaut
316efecaea Merge pull request #393 from CecilHarvey/master
updated zh_CN translations
2014-12-13 17:05:03 +01:00
Wei Mingzhi
f0a9f0ff29 updated zh_CN translations 2014-12-13 23:57:53 +08:00
Gregory Hainaut
63ba78b664 remove zzogl-pg-cg
superseeded by zzogl-pg
2014-12-13 12:28:37 +01:00
Gregory Hainaut
09ec6ebd8e pcsx2: fix a gcc warning 2014-12-13 12:28:37 +01:00
Gregory Hainaut
62bda675e0 build.sh: wx30 is the default, the option is useless 2014-12-13 12:28:37 +01:00
Gregory Hainaut
7d21497c11 clang: no support of f-abi-version=6 option 2014-12-13 12:28:37 +01:00
Gregory Hainaut
768362852e pscx2: s/wxTrap/pxTrap/
wxTrap is only enabled on wxDebug build. pxTrap is always available. It is much nicer for debug on linux
2014-12-13 12:28:37 +01:00
Gregory Hainaut
c5efdb9df9 Merge pull request #391 from micove/flush-color-reset
Don't buffer the changes to the console colors.
2014-12-13 10:55:21 +01:00
Miguel A. Colón Vélez
c7c8b70b22 Don't buffer the changes to the console colors.
After a Console.Write/Writeln that uses colors a call to
ConsoleColorScope::LeaveScope() is made to restore m_old_color. This
restoration command stays buffered until a full line is printed. In the
meantime any console message that happens will use the old coloring
and if the program happens to crash the console would keep using the
color of the last colored text that was printed.
2014-12-12 19:44:45 -05:00
Gregory Hainaut
01b0556419 goemon: reset recompiler after tlb unmap
Let's avoid unvalid virtual address on recompiler block
2014-12-12 22:43:01 +01:00
Gregory Hainaut
18405e2598 gsdx: add goemon comment on some assertion
If someone want to trigger them
2014-12-12 22:31:31 +01:00
Gregory Hainaut
cb73ed4737 pcsx2:tlb:goemon: allocation can be called from 2 places
* game is working :)

Note1: I dissassemble the main exe to search all call of the allocation (unlikely to have more calls)
Note2: it is easier to use the return of the function so allocation is done in the tlb[array] cache
2014-12-12 22:25:56 +01:00
Gregory Hainaut
e6de35f5ac pcsx2:tlb: enable GoemonUnloadTlb on recompiler 2014-12-12 22:14:08 +01:00
Gregory Hainaut
a8ad598153 pcsx2:tlb: improve goemon gamefix log 2014-12-12 22:14:08 +01:00
Gregory Hainaut
2cfbc6e5ef pcsx2:tlb: extend goemon gamefix
Add GoemonUnloadTlb function that invalidate TLB cache.

Currently the function is only used on the interpreter. It fixes TLB error after a reload of data.

Next step: porting to the recompiler
2014-12-12 22:14:08 +01:00
Gregory Hainaut
8d8aa87457 pcsx2: interpreter: better use pc
cpuRegs.pc is the actual pc+4...
2014-12-12 22:14:08 +01:00
Gregory Hainaut
bf9fc521cb disassembler: Allow to print register value
* Create a disBranch to factorize a bit the code

* Add PRINT_REG_CONTENT define that add a 32bits value of registers for
  standard opcode. (Far from perfect, but it very useful)
2014-12-12 22:14:08 +01:00
Gregory Hainaut
cebccea81c gsdx: disable some gl extensions when VMware driver is detected
It is likely the Mesa driver, code seems to have the same issue (separate shader)
2014-12-12 20:44:58 +01:00
Gregory Hainaut
35f26f00bc Merge pull request #386 from PCSX2/remove-tls
spu2x:zzogl: disable TLS
2014-12-11 09:55:17 +01:00
Gregory Hainaut
534b7041f4 Merge pull request #385 from PCSX2/gtk3_compilation_fix
Gtk3 port (require wx built against GTK3).
2014-12-11 09:54:45 +01:00
Gregory Hainaut
3d071e50ad gtk3: gtk_hscale_new_with_range => gtk_scale_new_with_range 2014-12-10 22:09:21 +01:00
Gregory Hainaut
feca2e3faf gtk3: GDK_WINDOW_XID was renamed
Well I guess. Not sure until I can test the behavior.
2014-12-10 22:09:21 +01:00
Gregory Hainaut
5d8b2d8044 gtk2: GtkNotebookPage is useless
And not supported by gtk3
2014-12-10 22:09:21 +01:00
Gregory Hainaut
e9233f4698 gtk2: use text rather than image
Require by GTK3
2014-12-10 22:09:21 +01:00
Gregory Hainaut
7fb548d7c5 gtk2: GTK_OBJECT is useless 2014-12-10 22:09:21 +01:00
Gregory Hainaut
d1389db2f4 gtk2: keyboard macro update 2014-12-10 22:09:21 +01:00
Gregory Hainaut
ba9e998ff5 gtk2: port gtk_combo_box to gtk_combo_box_text
The former was deprecated on gtk2.24 (and removed from gtk3)
2014-12-10 22:09:21 +01:00
Gregory Hainaut
cdd09a2616 gtk2: use a pointer as argument instead of g variable
Easier and compliant with gtk3
2014-12-10 22:09:21 +01:00
Gregory Hainaut
800262fc14 cmake: add a new GTK3.0 option
Thanks #micove for the patch
2014-12-10 22:07:48 +01:00
Gregory Hainaut
4991f9412d Merge pull request #387 from PCSX2/XDG_HOME_CONFIG-use-PCSX2-issue-381
pcsx2: use PCSX2 uppercase for XDG_HOME_CONFIG default value
2014-12-09 09:11:10 +01:00
Gregory Hainaut
87f1e8f77d pcsx2: use PCSX2 uppercase for XDG_HOME_CONFIG default value
This way it will always be the same.

Fix issues #381

Note: potentially we might need to move your previous directory.
mv $HOME/.config/pcsx2 $HOME/.config/PCSX2
2014-12-08 23:51:02 +01:00
Gregory Hainaut
5ce4b85edd build.sh: allow to use cmake option directly
It is handy to test option barely used. New options could be added to the script but there are alredy too much of them.
2014-12-08 23:48:00 +01:00
Gregory Hainaut
a52f598369 spu2x:zzogl: disable TLS
builds an Utilies_NO_TLS.a archive of the common Utilities code. It replaces native TLS by a slower reimplementation

Rational: number of TLS slot is very limited by the GLIBc on linux. I hope it doesn't impact performance.
* Zzogl don't requires TLS AFAIK
* spu2x will likely use it for assertions only.

TLS exhaustion creates issue to dlopen plugins
    issue #384 : https://github.com/PCSX2/pcsx2/issues/384

But also for profiled build (-fprofile-generate)
    http://forums.pcsx2.net/Thread-WORKAROUND-build-with-fprofile-generate

If someone have a better idea, please raise your hand!
2014-12-08 22:26:46 +01:00
Gregory Hainaut
0a4f9e43d9 cmake: clean sdl management
* sdl is mandatory for spu2x
* cmake will include either /usr/include/SDL or /usr/include/SDL2 so no
  need to add extra ifdef
2014-12-07 21:06:21 +01:00
Gregory Hainaut
9e8b0b59ba cmake: remove a duplicated line 2014-12-07 12:47:35 +01:00
Gregory Hainaut
29a14f5667 sed -i -e 's/seperately/separately/'
Thanks micove again
2014-12-07 12:46:16 +01:00
Gregory Hainaut
49d98a4429 pcsx2: move tlb info from warning to COP0_LOG
It will ease debug (pc is printed) and reduce noise for standard users.
2014-12-07 12:20:59 +01:00
Gregory Hainaut
c945aead54 cmake: better support of SDL2
Description: Building with SDL2_API=TRUE is incomplete
 SDL_FOUND does not imply SDL2_FOUND
 Use check_libs for detection
 Only include ${SDL_INCLUDE_DIR} when needed
 Use SDL2_LIBRARIES
Author: Miguel A. Colón Vélez

Gregory: add back SDL_BUILDING_LIBRARY
2014-12-07 12:19:14 +01:00
Gregory Hainaut
16284d0a59 gsdx: fix a couple of typo
From @micove
2014-12-07 12:12:53 +01:00
Gregory Hainaut
4b6632edf4 linux: use wx3.0 by default
+ Wx3.0 fixes various issue on linux (better sizing of box)
+ Debian doesn't provide wx2.8 anymore. Ubuntu will probably follow soon (close issue #342)

If you want to use wx2.8:
* Either you remove wx3.0 from your system
* Either you use the cmake option -DWX28_API=TRUE

Please don't hesitate to report any regresions.
2014-12-06 19:59:32 +01:00
Gregory Hainaut
070dce4c83 Merge pull request #356 from PCSX2/issue-fixes
various bug-tracker fixes
2014-12-06 19:48:13 +01:00
Gregory Hainaut
8afd2edd1d pcsx2:gui:wx3: wrong order of language in wizard
It seems wx3 remove all non alphanumeric character before the sorting
A 0 was added to force default to be the first choice as expected
2014-12-06 17:12:26 +01:00
Gregory Hainaut
7328e55ee9 pcsx2: disable tlb miss on the interpreter
Except on the debug build
2014-12-02 23:10:58 +01:00
Gregory Hainaut
1f5fe7a1db Merge pull request #348 from 3kinox/master
GSdx-ogl linux: std::thread
2014-12-02 22:43:29 +01:00
Gregory Hainaut
ec976743d6 Merge pull request #350 from PCSX2/interpreter-tlb-handler
Interpreter tlb handler
2014-12-02 21:47:56 +01:00
Gregory Hainaut
c9aa04c679 core: EE interpreter major speed boost
Disable the debugger and an useless debugI function

* x2 on dbg build :)
* x2.5 on dev build :)

Note: debugger doesn't work yet with the interpreter so no real drawback.
2014-12-02 21:38:39 +01:00
Gregory Hainaut
9c92a30dbb pcsx2: interpreter: add a typical example to disassemble R5900
Previous examples don't work anymore

v2: merge the cpu dump example
2014-12-02 21:38:39 +01:00
Gregory Hainaut
8a899c4c7b pcsx2: interpreter: increment pc before reading pc content
memRead32 could throw a TLB miss exception, however TLB handler expects pc counter to be incremented

Goemon is now really "playable" with the interpreter (disable automatic gamefix)
2014-12-02 21:38:39 +01:00
Gregory Hainaut
a30bd86311 pcsx2: interpreter: add an exception for tlb miss
When a tlb miss is detected current instruction must be skipped. We need
to immediately switch to the handler

Typical instruction bug case:
 lw a0, 0x8(a0)

a0 mustn't be loaded if we have a miss

v2: create a dedicated exception for tlb miss

v3:
* rename exception to CancelInstruction
* add a basic state machine on the exec loop so we keep same behavior
  for eeloadReplaceOSDSYS and eeGameStarting

v4: remove assert
2014-12-02 21:38:29 +01:00
Gregory Hainaut
374048e1c6 Merge pull request #367 from PCSX2/gabest11-master
GSdx-opencl
2014-12-02 20:59:23 +01:00
Gregory Hainaut
4238261784 gsdx-cl: update linux menu config
Try to use some id to be more robust

The best will be to sort the array first
2014-12-02 00:16:35 +01:00
Gregory Hainaut
76f719e5d0 gsdx-ocl: Add a ENABLE_OPENCL option
* Allow to compile GSdx on linux without opencl yet.
2014-12-02 00:16:35 +01:00
gabest11
b9b02cf749 implemented opencl program caching on disk under the system default temp folder, needs some additional work on linux 2014-12-02 00:16:35 +01:00
gabest11
ba59036a97 fixed a small compiling error in release mode 2014-12-02 00:16:35 +01:00
gabest11
7b466a98d0 replaced opencl.def with dynamic dll loading, god bless search and replace 2014-12-02 00:16:35 +01:00
gabest11
e3ba15de94 opencl device selection in settings dialog 2014-12-02 00:16:34 +01:00
gabest11
6f5cd1cd4d joined some tfx kernel calls, general speed up in most games 2014-12-02 00:16:34 +01:00
gabest11
3d2b0e3766 minor opencl kernel optimizations 2014-12-02 00:16:34 +01:00
gabest11
72cfc6a6ef 3rdparty/opencl 2014-12-02 00:16:34 +01:00
gabest11
9e20387595 Modified for opencl 1.1. While it runs on nvidia cards now, you can't use its sdk to compile gsdx, cl.hpp is missing there. Intel or amd is ok. 2014-12-02 00:16:34 +01:00
gabest11
263c097d13 solution for 32-bit z values in opencl and other minor optimizations 2014-12-02 00:16:34 +01:00
gabest11
c64f9ad9b1 squishing opencl bugs, there aren't many left hopefully 2014-12-02 00:16:34 +01:00
gabest11
ba1e522bbb Less opencl bugs, some games are actually playable now, there are still texture errors. 2014-12-02 00:16:34 +01:00
gabest11
881735b562 minor merging errors 2014-12-02 00:16:33 +01:00
gabest11
db7c26cde7 - Experimental OpenCL renderer (missing features: point, line, texture cache, mipmap, aa1, device selection). Needs any OpenCL SDK for the common headers and stub lib to compile, tested with AMD and Intel. Too bad it is not part of the Windows SDK yet.
- Renumbered renderer ids, compatible with old numbering, but it does not follow the mod3 logic anymore.
2014-12-02 00:16:33 +01:00
Gregory Hainaut
1b555ea3b5 gsdx-linux: Fix GSdx internal counter on linux
The issue is that clock gives the total cpu time of the process whereas
we want the cpu time of the rendering thread
2014-11-24 23:44:32 +01:00
Nicolas Hillegeer
b259a46ab7 linux/threads: simplify timer code
Possibly also changes the semantics. According to the docs, it should now be
equal to the Windows code (up to accuracy issues, of course).

v2: done by gregory38

Fix miscalculation of time. Unit must be in 1s/GetThreadTicksPerSeconds(). (now us)

Factorize a bit GetCpuTime/GetThreadCpuTime

Note: results seems reasonables and mostly equivalent as before.
2014-11-24 23:31:32 +01:00
3kinox
732cbc3ad5 GSDX-ogl linux:
+ Implement threads/mutex using std::thread/std::mutex/std::condition_variable
+ Old implementation can be used by commenting out the "define _STD_THREAD_ in GSThread.h
+ Commit should be much cleaner than previous one.
2014-11-23 14:33:35 +01:00
Gregory Hainaut
5d89454d25 wx: properly overwrite trait creation
The fix move the Pcsx2AppTraits definition from core to common part.
It allows to use it in wxAppWithHelpers::CreateTraits

fix issue #352
2014-11-22 18:51:05 +01:00
ramapcsx2
fda48f3d55 Merge pull request #355 from Asmodean-/master
Add reg.chcr warning check.
2014-11-22 11:52:12 +01:00
Asmodean-
09c13777d8 Add reg.chcr warning check. 2014-11-21 21:55:35 +00:00
Gregory Hainaut
60c0eb7179 gsdx-ogl: windows: properly setup context flags
* Use a core profile context
* Only enable the debug context in debug build

Close issue #353
2014-11-20 22:12:30 +01:00
Gregory Hainaut
d21e6ff45f gsdx-ogl: don't declare a sampler variable
Nvidia was complaining on the fxaa shader. In doubt I also replaced it in Asmodean's shader
2014-11-20 22:07:44 +01:00
Gregory Hainaut
60f7ec03c2 Merge pull request #351 from Asmodean-/master
GSdx: change post-processing directory & some shader fixes.
2014-11-16 14:09:43 +01:00
Gregory Hainaut
7964933507 wx: use wx_pizza on wx2.8
The new method creates a strange gray box for some users.

Unknown status on wx3.0 (which soon will be the default)
2014-11-16 13:54:07 +01:00
Asmodean-
8f42b36a42 It might help if I changed this for d3d9 also :p 2014-11-15 21:40:00 +00:00
Asmodean-
c72af82f73 GSdx: Some post-processing fixes & add shaders directory. 2014-11-15 21:37:05 +00:00
Asmodean-
5b3867dd60 GSdx: change post-processing directory & name. 2014-11-15 21:33:23 +00:00
Gregory Hainaut
276e3d9d1b gsdx-ogl: always set texture parameter
* Avoid bug after a pause
* Not faster anyway
* keep old method only for gl retracer to reduce debugging noise

Remove some old&useless comment
2014-11-14 11:43:42 +01:00
Gregory Hainaut
3311336d0e gsdx-ogl: disable ARB_bindless_texture
I have a crash when I try to delete some texture (for example when the simulator is paused)
2014-11-11 23:45:41 +01:00
Gregory Hainaut
1b5ea0651c debian: only support SSE2 for the default build 2014-11-11 20:56:45 +01:00
Gregory Hainaut
75c96c08f7 git ignore: linux profiled data 2014-11-11 20:56:45 +01:00
Gregory Hainaut
b6a951a9fa gsdx: debug compilation fix
I'm not sure gcc behavior is correct here!
2014-11-11 20:54:34 +01:00
Gregory Hainaut
0ca9bab8b6 Merge pull request #344 from Asmodean-/master
[GSdx] OpenGL PP Updates
2014-11-11 16:14:01 +01:00
Gregory Hainaut
ab4eaea757 Merge pull request #346 from 3kinox/master
Linux : GSdx AVX fix
2014-11-11 16:08:23 +01:00
3kinox
30240b4cbf More robust detection of arch64(or any distrib using same path for wxwidget) 2014-11-11 15:55:31 +01:00
3kinox
06f53b2689 use -fabi_version=6 only for GSdx, solve bug with wxwidget
reenable avx build for GSdx
2014-11-11 15:55:31 +01:00
3kinox
4991ef608d add automatic archlinux build detection(wx path can not be found otherwise) 2014-11-11 15:55:31 +01:00
Asmodean-
1b836ac4a7 Fix Cel Shader for OpenGL. 2014-11-11 14:34:53 +00:00
Gregory Hainaut
e73d8f383b gsdx-ogl: compilation fix for old distribution 2014-11-11 15:01:22 +01:00
Kieran Hanrahan
0e636ce411 A few last bits of cleaning before merge. 2014-11-11 02:41:52 +00:00
Kieran Hanrahan
e8a92ae731 Small oversight fix for "sample_texLevel" 2014-11-11 00:57:11 +00:00
Kieran Hanrahan
b60e5a62fc Rearrange to right spot (I blame github editor ;p) 2014-11-11 00:17:21 +00:00
Kieran Hanrahan
7adc7c4833 Update GSSettingsDlg.cpp
Just add the OGL shader ini params to the file when the user enables post-processing In the options dialog.
2014-11-11 00:01:31 +00:00
Kieran Hanrahan
cf5da56390 Tabbing >.> 2014-11-10 23:49:11 +00:00
Kieran Hanrahan
d228ad3ddd OpenGL Updates - fix effects for both D3D & OGL
I had to edit this via the GitHub editor. I finish up my changes, and for some reason the pcsx2 repository won't let me read or write to it, since the last merge. I checked my other repositories, and they're working fine. ?.?
2014-11-10 23:46:50 +00:00
Gregory Hainaut
e6e534c13a Merge pull request #343 from PCSX2/shader-loading
GSdx ogl: external shader loading + FXAA
2014-11-10 15:43:05 +01:00
Gregory Hainaut
48b3d91768 partially revert previous commit ec1da2805c
It breaks windows...
2014-11-10 12:19:30 +01:00
Gregory Hainaut
cbf2e740e3 gsdx-ogl: port Asmodean shader to GLSL
I only checked the default configuration (on Nvidia). Please report any issue with it.
2014-11-10 10:39:55 +01:00
Gregory Hainaut
8c90e7cafc gsdx-ogl: support latest fxaa version
Only tested on Nvidia, please report any issue with your driver

Note: requires GL4 GPU
2014-11-10 10:39:55 +01:00
Gregory Hainaut
ff39dffe23 gsdx-ogl: add a gui option (linux) to select external shader
Note: of course it requires a glsl shader ;)

On windows, you can set the path on the ini file. Here an example with linux path:
shaderfx_conf = /home/gregory/playstation/emulateur/pcsx2_merge/bin/GSdx_FX_Settings.ini
shaderfx_glsl = /home/gregory/playstation/emulateur/pcsx2_merge/bin/shader.fx
2014-11-10 10:38:52 +01:00
Gregory Hainaut
920ac6695f gsdx-ogl: add preliminary support of external shader fx 2014-11-10 10:37:58 +01:00
Gregory Hainaut
ec1da2805c pcsx2/GSdx: disable AVX for the moment on linux
I need to check carefully the consequence of ABI change. So far wx is very unhappy!

Fatal Error: Mismatch between the program and library build versions detected.
The library used 2.8 (no debug,Unicode,compiler with C++ ABI 1002,wx containers,compatible with 2.6),
and your program used 2.8 (no debug,Unicode,compiler with C++ ABI 1006,wx containers,compatible with 2.6).
2014-11-09 15:45:54 +01:00
Gregory Hainaut
84f844767c gsdx-ogl: micro optimize PSConstantBuffer cache
Might help to save a cache line on the CPU :)
2014-11-08 21:39:17 +01:00
Gregory Hainaut
58bd645d49 gsdx-ogl: BindBufferBase also bind to the generic binding point 2014-11-08 21:39:13 +01:00
Gregory Hainaut
16377f7249 gsdx-ogl: only call PixelStorei when parameters are updated
It won't improve performance but it would reduce a bit the noise in gl retracer tool
2014-11-08 21:30:14 +01:00
Gregory Hainaut
47f40ed79a gsdx-ogl: reduce pbo complexity
Copy the full line into the pbo. Dma will only take GL_UNPACK_ROW_LENGTH
- increase memcpy size by 2 in the pbo
+ single memcpy will be faster and can use sse

Enable buffer_storage extension:
* GL_CLIENT_STORAGE_BIT was required (it is the duty of TexSubImage to copy data into the GPU mem)
* Enable the extension by default
2014-11-08 21:30:14 +01:00
Gregory Hainaut
e62af05496 gsdx-ogl: reduce complexity of clear texture
Null is equivalent to a clear to 0.

Note: Code is not yet used because both stencil and depth are cleared.
Future note: stencil can potentially be replaced by load_store_image
2014-11-08 21:30:14 +01:00
Gregory Hainaut
bd9df9a6ec gsdx: Add some comment on GSTextureCache + schematics
Note: docs/TextureCache.odg was created with libreoffice. Not perfect but give a nice overview
2014-11-08 21:30:14 +01:00
ramapcsx2
b7e5e41afe Merge pull request #333 from PCSX2/linux-avx
Support of AVX build for linux
2014-11-08 14:09:06 +01:00
ramapcsx2
a908d1ab93 Merge pull request #340 from PCSX2/delete-memcpy-leftovers
common: remove old memcpy implementation
2014-11-08 13:44:36 +01:00
ramapcsx2
8434d6c397 Merge pull request #328 from tlbjr/master
GLDEBUGPROC type cast and postBuild.cmd for GSdx on VS2013
2014-11-08 13:11:07 +01:00
ramapcsx2
3d05d706f4 Merge pull request #339 from Asmodean-/master
[Post-Processing] Update GSdx effect suite to latest version.
2014-11-08 12:49:55 +01:00
Asmodean
df0a9c4683 Some small fixes, that I noticed. 2014-11-06 10:56:33 +00:00
ramapcsx2
ed6bf53547 Merge pull request #341 from ramapcsx2/spyro_patch
spyro enter the dragonfly bootup hack
2014-11-04 17:18:15 +01:00
ramapcsx2
a64d641a50 spyro enter the dragonfly bootup hack 2014-11-04 17:16:26 +01:00
Gregory Hainaut
69e88ffed0 common: remove old memcpy implementation
PCSX2 used standard memcpy now (thanks to xsacha)
2014-11-04 09:20:47 +01:00
Asmodean
937e475169 [Post-Processing] Update GSdx FX effect suite to latest version. 2014-11-03 07:15:34 +00:00
Gregory Hainaut
fc480e9bea Merge pull request #335 from tadatada/fix_resizing_loop
Fix resizing loop when the Windows Classic theme with some large resolutions have been chosen.
2014-10-28 10:36:10 +01:00
Gregory Hainaut
d6ba55eebf license:
* stack walk is coming from PPSSPP => GPL2+
* Remaining are from Kingcom => LGPL3+
2014-10-28 08:21:39 +01:00
tadatada
d55aa66751 Fix resizing loop when the Windows Classic theme with some large resolutions have been chosen. 2014-10-28 12:44:12 +09:00
Gregory Hainaut
f0d85d7dcc Merge pull request #329 from tadatada/mod_console_title
Inserted a game CRC in the title of the console log screen.
2014-10-26 21:53:58 +01:00
Gregory Hainaut
a28d2878e0 Merge pull request #326 from tadatada/mod_cheats_logs
Cheats: Added a cheats related log, changed color of a few positive logs.
2014-10-26 15:49:25 +01:00
Gregory Hainaut
a0056f4e05 Merge pull request #325 from tadatada/fix_ts_mixtures
Cheats: Fixed tab/space mixtures in pcsx2/Patch_Memory.cpp
2014-10-26 15:45:04 +01:00
Gregory Hainaut
6af09d8a09 Merge pull request #331 from tadatada/fix_bool
Fixed a C++ bool variable(1 byte) to WINAPI bool(4 bytes) for SystemParametersInfo API.
2014-10-26 15:34:05 +01:00
Gregory Hainaut
4d818f6cd9 ignore multiple linux file 2014-10-26 15:00:28 +01:00
Gregory Hainaut
f25e056914 gsdx: enable AVX with GCC
* Use overloaded function instead of specialized template
=> see http://stackoverflow.com/questions/3052579/explicit-specialization-in-non-namespace-scope

* replace _mm256_slli_si128 by _mm256_slli_si256
  I hope they're equivalent. I didn't find any info on _mm256_slli_si128,
  however srl use _mm256_srli_si256
2014-10-26 14:47:35 +01:00
Gregory Hainaut
679fa65b84 cmake: By default optimize for current arch
Note: it requires GCC 4.7. Otherwise use -DDISABLE_ADVANCE_SIMD=OFF to restore
previous behavior. It will impact Ubuntu precise (12.04)
2014-10-26 14:47:35 +01:00
tadatada
33967649b1 Fixed a C++ bool variable(1 byte) to WINAPI bool(4 bytes) for SystemParametersInfo API. 2014-10-16 07:49:30 +09:00
tadatada
ea6e78ab0d Inserted a game CRC in the title of the console log screen. 2014-10-13 13:26:03 +09:00
Tom Burnett
a1a1c7d0fb Removed svn rev inc file 2014-10-12 01:43:30 -07:00
Tom Burnett
1f734a69a0 Small VS2013 fixes 2014-10-12 01:40:40 -07:00
tadatada
7e89477e6c Cheats: Added a cheats related log, changed color of a few positive logs.
If any cheats file is not found, the "Not found Cheats file" message will appear with its full path of the cheats file on the log screen.

Changed color of a few positive logs to green from grey.
2014-10-08 16:51:09 +09:00
tadatada
8b45caf611 Cheats: Fixed tab/space mixtures in pcsx2/Patch_Memory.cpp 2014-10-08 16:43:08 +09:00
Gregory Hainaut
fa3db52cf7 partially revert commit 9fd2f3dd8a
No need to add Linux sillyness in Windows file... (Hopefully close #323)
2014-10-04 11:33:34 +02:00
Gregory Hainaut
6fe9ee387d gsdx-ogl: optimize the PS cb cache
* Don't use the stack
* Don't compare MinMax parameter (depends of others)
* Don't store not-compared parameter in the cache (HalfTexel/MinMax)

+0.3fps/46fps (well better than nothing)
2014-10-02 20:44:22 +02:00
Gregory Hainaut
a573ce185c gsdx-ogl: mark GL_EXT_shader_io_blocks as mandatory for GLES 2014-10-02 20:44:22 +02:00
Gregory Hainaut
ccc1137e12 gsdx-ogl: merge the two vertex buffer format
* Only a single VAO
    => Format is set once
    => Only a single bind at startup
    => GSVertexBufferStateOGL is nearly useless
    => barely faster but better than nothing :)
2014-10-02 20:44:22 +02:00
Gregory Hainaut
10c7be8c50 gsdx-ogl: Use 32B strides for all VBO 2014-10-02 20:44:22 +02:00
Gregory Hainaut
d37cc8e1e7 gsdx-ogl: GL_ARB_shading_language_420pack is now mandatory
All API/drivers support it so time to remove the fallback.
2014-10-02 20:44:22 +02:00
ramapcsx2
aaf3fe8b19 Merge pull request #319 from aphirst/patch-1
Minor spelling/punctuation fixes in SPU2-X
2014-10-02 20:04:21 +02:00
Adam Hirst
b98e53e059 Minor spelling/punctuation fixes in SPU2-X 2014-10-02 12:35:13 +02:00
Gregory Hainaut
79e8a912cd gsdx-ogl: keep the draw buffer enabled by default
Note: Only DATE requires to disable the draw buffer
2014-09-30 22:18:20 +02:00
Gregory Hainaut
f46e8cc6ac gsdx-ogl: bump base requirement to 3.3
A couple of fallbacks were introduced for the Mesa driver that only support 3.0
DSA will require a recent Mesa which already support GL3.3

Require at least SandyBridge for Intel GPU
2014-09-30 22:18:20 +02:00
Gregory Hainaut
594f6c33a2 gsdx-ogl-ES: require GL_EXT_shader_io_blocks + GLES3.1
Allow to use same shader interface for all API

Note: on the GL API it will require GL3.3 (see next commit)
2014-09-30 22:18:01 +02:00
Gregory Hainaut
1c501047f5 gsdx-ogl: refresh the linux gui with latest extension 2014-09-28 12:23:44 +02:00
Gregory Hainaut
8833afc2fa gsdx-ogl: drop GL_ARB_multi_bind
It will be replaced by DSA so let's reduce the complexity of opengl
2014-09-28 12:23:44 +02:00
Gregory Hainaut
fa43018d10 gsdx-ogl: no DSA isn't mandatory yet... 2014-09-28 12:11:22 +02:00
Gregory Hainaut
1e86e3cb08 gsdx-ogl: rework callback debug
* use DebugOutputToFile as a callback of gl error. Add a breakpoint to
  find the culprit GL call
* use string instead of char[n]

Note: CheckDebugLog is potentially useless now
2014-09-28 12:00:34 +02:00
Gregory Hainaut
b7601a9add gsdx-ogl: Enable various GL4+ extensions
* GL_ARB_clip_control: reduce z fighting
* GL_ARB_clear_texture: no real speed gain (but improve code quality)
* GL_ARB_bindless_texture: +1fps (if you're CPU limited)
2014-09-28 12:00:34 +02:00
Gregory Hainaut
9d8d702aa6 gsdx-ogl: drop GL_NV_depth_clamp extension
superseeded by GL_ARB_clip_control
2014-09-28 12:00:34 +02:00
Gregory Hainaut
4659184cc1 gsdx-ogl: add support of clip_control (depth only)
* replace the [-1;1] depth range of openGL with the DX range [0;1].
2014-09-28 12:00:34 +02:00
Gregory Hainaut
104688e3ee gsdx-ogl: fix ARB_bindless support 2014-09-28 12:00:34 +02:00
Gregory Hainaut
cc24da128c gsdx-ogl: fix for gl_clear_texture
Note: Disabled for depth_stencil texture (I'm not sure we can split the two)
2014-09-28 12:00:34 +02:00
Gregory Hainaut
d720cc16a6 gsdx-ogl: gl4.5: add plumbering to support direct_state_access and clip_control 2014-09-28 12:00:33 +02:00
Gregory Hainaut
0118d578a2 gitignore: debug file (linux) 2014-09-28 11:59:50 +02:00
Gregory Hainaut
1ea86eedc0 debian: force some dependencies
* i686 to use optimized version of the std lib
* libpulse (provide a sound plugin)
2014-09-28 11:59:50 +02:00
Gregory Hainaut
5297bd7b2c Merge pull request #316 from nE0sIghT/master
Use cmake variable "BIN_DIR" for binaries installation
2014-09-28 11:37:31 +02:00
nE0sIghT
7f57692ee3 Use cmake variable "BIN_DIR" for binaries installation 2014-09-27 22:26:42 +04:00
Gregory Hainaut
20b9dbadda pcsx2: replace wxStrtoul by ToUlong method
Close issue #308
2014-09-27 11:50:31 +02:00
Gregory Hainaut
c85221c64f openSuse vs openSUSE 2014-09-27 11:50:31 +02:00
ramapcsx2
962d136cbc Merge pull request #315 from tadatada/patch-1
Cheat code cleanup
2014-09-26 13:15:30 +02:00
tadatada
728840b7c5 Code cleanup
Altered some variable names and comments. Removed some redundant parentheses.
2014-09-26 06:55:00 +09:00
Gregory Hainaut
c66ea9f740 linux: openSuse don't follow the FHS, so manually pick the lib path 2014-09-24 09:02:56 +02:00
Gregory Hainaut
5b3f031654 cmake: fix commit f3a50a01a7
* link common with c lib (required for gold linker)
* fix the macro to properly set the library variable
  => use the variable instead to hardcoded value
2014-09-24 09:02:56 +02:00
ramapcsx2
cee80eb5f4 Merge pull request #279 from Kingcom/StackFrames
Add stack trace and step out
2014-09-22 16:34:52 +02:00
Gregory Hainaut
60297403a2 i10n: update th_TH mo file 2014-09-22 09:27:57 +02:00
Gregory Hainaut
58a8683d7d gsdx-ogl: disable texture compare mode
It seems to be used for depth texture
2014-09-22 09:27:34 +02:00
Gregory Hainaut
d51f008c72 gsdx: openglES fix
* require a 3.1 context
* unattach texture of the fbo when they're not used
(avoid to have a texture and depth_stencil with different size)

Note: except minor shader bug it works on Nvidia 340.23.01
2014-09-22 09:27:31 +02:00
Gregory Hainaut
9656fad0f5 Merge pull request #286 from jobermayr/master
Two patches from openSUSE / Packman
2014-09-21 17:34:14 +02:00
Gregory Hainaut
fd7b692d00 Merge pull request #251 from xsacha/memzero_ptr
Remove redundant memzero_ptr. All compilers use SSE implementation
2014-09-21 17:15:54 +02:00
Gregory Hainaut
39491f789b Merge pull request #309 from blackb1rd/master
Update th_TH po
2014-09-21 13:18:51 +02:00
blackb1rd
c4eca8b3cc Update th_TH po 2014-09-21 00:37:32 +07:00
Gregory Hainaut
47cafaaa7c windows build: fix typo introduced in bf7c29e4cd 2014-09-20 09:59:23 +02:00
Gregory Hainaut
1b6188ee1d Merge pull request #281 from xsacha/memcmp
Remove usages of memcmp_mmx
2014-09-19 21:43:19 +02:00
ramapcsx2
9ee88ad070 Merge pull request #273 from Kingcom/Interpreter
R5900 interpreter breakpoints
2014-09-18 16:40:56 +02:00
Kingcom
a95e55dc54 Add breakpoint support to R5900 interpreter 2014-09-18 16:31:44 +02:00
Johannes Obermayr
9fd2f3dd8a Don't use build date on openSUSE.
Fixes RPMLINT warning:
pcsx2.i586: W: file-contains-date-and-time /usr/bin/pcsx2
Your file uses  __DATE and __TIME__ this causes the package to rebuild when not needed
2014-09-17 22:37:34 +02:00
Johannes Obermayr
7b1d3ba7ea Do commits 2bc2047 and f287754 the right way ... 2014-09-16 19:11:11 +02:00
ramapcsx2
e59c9b0e65 Merge pull request #305 from ramapcsx2/memory_patch
"Support all functions of type D and E codes" for cheat patches (pnach) by tadatada
2014-09-16 11:22:10 +02:00
ramapcsx2
12e8f7d0b4 "Support all functions of type D and E codes" for cheat patches (pnach) by
tadatada
2014-09-16 11:03:10 +02:00
Sacha
bf7c29e4cd Disable memcmp_mmx for non-msvc compilers and 64-bit. Remove MemcpyFast.S (Linux). 2014-09-16 17:53:54 +10:00
blackb1rd
4f2c9a05fb Update th_TH po 2014-09-16 11:20:31 +07:00
Gregory Hainaut
f287754477 linux: add a desktop file that install PCSX2 on system menu
* Some people prefers emulator/system than emulator/game
2014-09-14 13:15:18 +02:00
Johannes Obermayr
2bc2047770 cmake: Fix RPATH/RUNPATH issue with openSuse wxWidgets libdir.
Gregory: Add an if clause to only change the rpath on openSuse

For me it doesn't follow the FHS => http://www.tldp.org/HOWTO/HighQuality-Apps-HOWTO/fhs.html
2014-09-14 13:12:26 +02:00
Gregory Hainaut
73433c25f2 linux build: take 3 :p
close issue #300
2014-09-14 13:02:55 +02:00
Gregory Hainaut
9c81272278 cmake: oups forget to change the usage of 64BIT_BUILD variable 2014-09-13 14:22:41 +02:00
Gregory Hainaut
efa4a50cf5 linux package: update desktop file
get commit 45a09bfa8c4fa347c68799520df921c9554ad2d6 from pseiler

However keep Game instead of System
2014-09-12 20:41:28 +02:00
Gregory Hainaut
27992b16c2 common: fix std type define on windows 2014-09-12 20:41:28 +02:00
Gregory Hainaut
e101a1d77a linux build: let's be clear that 64 bit is not supported
* rename the cmake option to 64BIT_BUILD_DONT_WORK
* add --64-bit-dont-work to build.sh
2014-09-12 20:10:14 +02:00
Gregory Hainaut
20243ff6fb i10n: refresh es_ES/ja_JP
(due to po update)
2014-09-12 20:10:14 +02:00
ramapcsx2
98d22f8b2e Merge pull request #215 from xsacha/memcpy
Remove some slow, redundant memcpy implementations: memcpy_const/memcpy_...
2014-09-12 19:57:57 +02:00
Gregory Hainaut
b9e6024fe9 Merge pull request #282 from xsacha/emitter-cleanup
common: Remove two unused files in emitter, inlines.inl and macros.h
2014-09-12 19:30:34 +02:00
Gregory Hainaut
31a62c18be Merge pull request #294 from aktau/osx-ncpu
linux: build.sh: get number of CPUs on OSX too
2014-09-12 19:28:55 +02:00
Gregory Hainaut
2d4b6273f0 Merge pull request #276 from xsacha/defs-cleanup
pcsx2: require C99 standard for stdint
2014-09-12 19:24:08 +02:00
Kingcom
8dba78abce Add step out feature 2014-09-11 14:17:43 +02:00
Kingcom
d3ffd13c25 Add stack frames list to debugger 2014-09-11 14:17:43 +02:00
Kingcom
4768f293bf Port stack walker from PPSSPP 2014-09-11 14:15:07 +02:00
Nicolas Hillegeer
57b09c371a build.sh: get number of CPUs on OSX too
The linux way (reading /proc/cpuinfo) doesn't work on OSX.
2014-09-10 19:49:17 +02:00
Gregory Hainaut
b9fba8005a cmake: failed to get git version
* add a fallback when the git version can't be fetched

Close issue #122
2014-09-10 14:19:50 +02:00
ramapcsx2
270fc13e2a Merge pull request #289 from ramapcsx2/patch3
OPH flag hack removal for Tomb Raider Angel of Darkness
2014-09-08 17:40:42 +02:00
ramapcsx2
f67941d03b OPH flag hack removal for Tomb Raider Angel of Darkness 2014-09-08 17:38:11 +02:00
ramapcsx2
c89e703bed Merge pull request #250 from gigaherz/sln-changes
Remove some deprecated plugins from the project/build files
2014-09-06 01:01:32 +02:00
gigaherz
d0100548d4 Separate old plugins from the main project files (Windows). 2014-09-06 00:52:23 +02:00
ramapcsx2
f7192b82b1 Merge pull request #274 from Kingcom/Scrollbars
Fix column width in debugger
2014-09-06 00:35:47 +02:00
ramapcsx2
08dc8b40e4 Merge pull request #272 from Kingcom/Scanning
Complete function scanning
2014-09-06 00:32:51 +02:00
Gregory Hainaut
b875f81be3 Merge branch 'uyjulian-CleanCMake' 2014-09-05 20:17:07 +02:00
uyjulian
e8d13090b0 Look for GLESv3 header instead of GLESv2 header 2014-09-05 20:16:50 +02:00
uyjulian
f3a50a01a7 cmake: Use previous macros in CMakeLists.txt files
Gregory: add a c lib for zzogl-pg-cg replayer
2014-09-05 20:16:23 +02:00
uyjulian
1290d0b1a3 Remove unneeded comments 2014-09-05 20:14:09 +02:00
uyjulian
82dfed1512 Remove unneeded Check*.cmake 2014-09-05 20:14:09 +02:00
uyjulian
53e57766c9 Use CheckLib for some libs 2014-09-05 20:14:09 +02:00
uyjulian
dde94da94f Add cleaner svnrev.h code, add macros 2014-09-05 20:14:09 +02:00
uyjulian
5f4fc4701f Add CheckLib.cmake 2014-09-05 20:14:08 +02:00
uyjulian
20716e13e4 change .gitignore 2014-09-05 20:14:05 +02:00
Gregory Hainaut
bf52a4c737 build.sh: allow to replace build directory by a symlink
Use case: redirect the build into a ramdisk (less write on sdd and potentially faster io)
2014-09-02 21:21:46 +02:00
ramapcsx2
82ee28fa39 Merge pull request #283 from nrusef/master
Update ja_JP po
2014-08-30 22:18:04 +02:00
ramapcsx2
f5435f5ba5 Merge pull request #284 from Kingcom/RegisterNames
Fix duplicate register names
2014-08-30 13:28:04 +02:00
Kingcom
b717691901 Fix duplicate f21/fcr21/vf21 2014-08-30 12:49:59 +02:00
Sakura Naruse
7094cc7693 Update ja_JP po 2014-08-29 04:01:46 +09:00
Gregory Hainaut
80df352711 Merge pull request #211 from xsacha/intrinsics
Remove pre-gcc4.1.0 code and a bunch of functions that were never used.
2014-08-28 20:23:55 +02:00
Sacha
378556c0c2 Remove two unused files in emitter, inlines.inl and macros.h 2014-08-27 22:40:26 +10:00
Sacha
b47a4da81f Use 64-bit compatible rdtsc for Linux. Remove some more intrin_x86 functions. 2014-08-27 18:49:44 +10:00
Sacha
1d116cc23b Remove memcpy_amd usages from plugins. No more custom implementations in plugins. 2014-08-27 13:50:55 +10:00
Sacha
ad3b76c4d8 Remove all custom memcpy usage from core pcsx2 and remove memcpy_fast from plugins. 2014-08-27 13:45:23 +10:00
Sacha
3f7cb991e4 Remove some slow, redundant memcpy implementations: memcpy_const/memcpy_qwc/memcpy_aligned. 2014-08-27 13:13:48 +10:00
ramapcsx2
9102e40f9c Merge pull request #280 from ramapcsx2/memcpy
Use generic memcpy from now on. Tests show generics are good enough now. It should be a speedup even on modern CPUs.
2014-08-26 23:13:13 +02:00
ramapcsx2
9168c344b1 Use generic memcpy from now on. Tests show generics are good enough now.
It should be a speedup even on modern CPUs.
2014-08-26 01:02:23 +02:00
Gregory Hainaut
4d4f7ac112 Merge pull request #277 from IlDucci/patch-3
i10n: es_ES: Update pcsx2_Iconized.po
2014-08-25 21:14:36 +02:00
Gregory Hainaut
884876572b Merge pull request #278 from IlDucci/patch-4
i10n: es_ES: Update pcsx2_Main.po
2014-08-25 21:14:07 +02:00
ramapcsx2
ec7fb80a5b Merge pull request #271 from Kingcom/Threads
Add threads list to debugger
2014-08-25 15:56:00 +02:00
IlDucci
c52c378f49 Update pcsx2_Main.po
Update Main file translation with edited lines.
2014-08-25 15:37:55 +02:00
IlDucci
60efb3c4b4 Update pcsx2_Iconized.po
Updating translation with edited lines.
2014-08-25 15:37:13 +02:00
ramapcsx2
d694a3a166 Merge pull request #263 from Kingcom/Recompiler
Fix recompiler breakpoint flushing logic (debugger related)
2014-08-25 15:33:39 +02:00
Sacha
90e59b2704 Clean up the type defines in pcsx2.
The non-stdint fallback was not even working which shows that it was never used. No supported platform would not have stdint anyway.
Remove unused code and do not restrict types to Linux and MSVC. Was there a reason for this?
2014-08-25 16:16:34 +10:00
Sacha
999eb83de8 Remove unused _InterlockeD* functions. 2014-08-25 04:57:03 +10:00
Gregory Hainaut
e019979749 Merge pull request #275 from mbeniamino/master
GSdx: disable automatic use of separate shader objects for Intel driver (likely a mesa bugs).
2014-08-24 17:37:41 +02:00
Matteo Beniamino
15c487e547 GSdx: fixed use of separate shader objects for Intel driver. 2014-08-23 17:09:38 +02:00
Kingcom
d8f3e22f14 Fix column width in debugger lists when scrollbars are present 2014-08-23 15:03:57 +02:00
Pseudonym
3fa5816aab Merge pull request #265 from Sonicadvance1/x86_64-vtlb
Get the VTLB working on x86_64.
2014-08-22 22:40:45 +01:00
Pseudonym
e5f7057539 Merge pull request #255 from Kingcom/Disasm
Add a couple of pseudo instructions to the R5900 disassembler
2014-08-22 22:35:52 +01:00
Kingcom
259a699613 Add shared source and dest register simplifications 2014-08-22 23:28:32 +02:00
Kingcom
d1619af18c Simplify disassembly of memory access with zero offset 2014-08-22 23:28:28 +02:00
Ryan Houdek
bddb2504b5 Get the VTLB working on x86_64.
VTLB does some nonsense with signed integers for the pointers.
We've got to make sure to set the signed bit in the correct bit on 64bit pointers so it works.
2014-08-22 15:31:40 -05:00
Kingcom
769cb6a369 Port the rest of the function scanning over from PPSSPP 2014-08-22 22:23:49 +02:00
Pseudonym
4512306207 Merge pull request #248 from Kingcom/OpcodeFlags
Add flags to R5900 opcodes, use them for the debugger
2014-08-22 20:55:08 +01:00
Kingcom
430c617a95 Use flags for breakpoints and memchecks in the recompiler 2014-08-22 21:50:09 +02:00
Kingcom
9fde236512 Update analyst to use new flags 2014-08-22 21:50:09 +02:00
Kingcom
72c2158b17 Add fcr registers to DebugInterface and rename others 2014-08-22 21:50:06 +02:00
Kingcom
f7ac17b6be Fill in flags for most debugger relevant opcodes 2014-08-22 21:50:05 +02:00
Kingcom
1e3e5c92a8 Add thread list to debugger 2014-08-22 16:11:16 +02:00
Kingcom
5f7a3a8ca9 Read EE threads from bios (thanks @gregory38) 2014-08-22 16:11:13 +02:00
Kingcom
5b14f7de64 Add a list with bios version specific information 2014-08-22 16:11:10 +02:00
Pseudonym
dc4e75a61c Merge pull request #264 from xsacha/icore-cleanup
Remove some unused code such as data moves and tags in iCore.
2014-08-21 16:13:19 +01:00
Sacha
f484f35d85 Remove some unused code such as data moves and tags in iCore.
The code was sitting there only serving to confuse people. The tags were a way of setting an 'isXMMreg' inside a function and the values actually didn't mean anything.
2014-08-22 00:42:40 +10:00
Kingcom
9e6fac5faa Fix recompiler breakpoint flushing logic 2014-08-20 17:12:48 +02:00
Kingcom
b72963ee5f Make simplifcations in the disassembler optional 2014-08-19 15:45:50 +02:00
Kingcom
a696bf0d02 Add branch pseudo opcodes to R5900 disassembler 2014-08-19 14:58:00 +02:00
Kingcom
b0cef1b143 Add a couple of pseudo instructions to the R5900 disassembler and display signed immediates as signed 2014-08-19 14:58:00 +02:00
David Quintana
02b19b7686 Merge pull request #249 from xsacha/3rdparty-cleanup
Remove unused tinyxml from 3rdparty.
2014-08-18 02:33:33 +02:00
ramapcsx2
795211dba6 Merge pull request #253 from ramapcsx2/wsfix2
fix the ws patches, broke them earlier
2014-08-18 01:28:50 +02:00
ramapcsx2
630f869f7f fix the ws patches, broke them earlier 2014-08-18 01:23:29 +02:00
Sacha
7a260c9885 Remove redundant memzero_ptr. All compilers use SSE implementation anyway. 2014-08-17 23:23:55 +10:00
sudonim1
071fbb92df Merge pull request #246 from Hindenburg/cmake-issue
"!64BIT_BUILD" is a variable name. Changed to "NOT 64BIT_BUILD"
2014-08-17 13:26:29 +01:00
Tobias Jakobi
6eb0ecbe7c debugger: fix static/extern issue which broke compilation
Previously (on gcc) compilation would fail with:
pcsx2/DebugTools/DisR5900asm.cpp:58:37: error: ‘R5900::GPR_REG’ was
declared ‘extern’ and later ‘static’ [-fpermissive]
2014-08-17 14:52:13 +02:00
Sacha
357c3160bb Remove unused tinyxml from 3rdparty. 2014-08-17 22:23:14 +10:00
Kingcom
a8c5454724 Add flags field to R5900 opcodes 2014-08-16 20:33:45 +02:00
aga
c963e0b62b "!64BIT_BUILD" is a variable name. Changed to "NOT 64BIT_BUILD" which is
the negation of the 64BIT_BUILD variable defined in
BuildParameters.cmake.
2014-08-16 12:00:50 -06:00
Pseudonym
05b33012b7 Merge pull request #241 from Kingcom/Debugger
Always enable debugger
2014-08-15 23:31:23 +01:00
Pseudonym
91fcad0a93 You know that commit where I removed the GTE? Apparently I didn't. 2014-08-15 23:22:25 +01:00
ramapcsx2
fb344fb646 Merge pull request #242 from Kingcom/ShareIso
Allow to share writing to the ISO through an ini option
2014-08-15 23:53:54 +02:00
Kingcom
f5fe75a73b Allow to share writing to the ISO through an ini option 2014-08-15 23:52:45 +02:00
Kingcom
df0fb9551f Always enable debugger 2014-08-15 21:25:30 +02:00
Pseudonym
7e5b6dee9c Removed System.map symbol file support.
I'm not sure what this is actually to be honest, ancient release notes say it was ps2linux related but I don't think this is Linux System.map compatible... regardless ps2linux isn't exactly high on our priority list.
2014-08-15 18:56:42 +01:00
Pseudonym
174e121034 Load symbols from ELFs. (Thanks Kingcom for this one liner.) 2014-08-15 18:44:01 +01:00
Pseudonym
9ebd9c4447 Removed long disabled code for inserting command line parameters for ELFs into EE memory. We'd have to do this completely differently in the current system anyway. 2014-08-15 18:41:24 +01:00
Pseudonym
4400b56fb5 Removed actual ELF loading from the ELF parser as we leave this up to the BIOS now. 2014-08-15 18:39:24 +01:00
Pseudonym
4de63714ce Replaced some printf(string)s with printf("%s", string) in R5900 block dumping. 2014-08-15 17:37:07 +01:00
Pseudonym
0ca72a7d60 Merge pull request #240 from Kingcom/DisR5900Removal
Remove redundant Disr5900
2014-08-15 16:55:12 +01:00
Pseudonym
2aa34186e1 Scrapped abortive GTE (PSX GPU) support so that certain people can stop fiddling with untestable code. We don't know whether the PS2 even has a hardware GTE and thanks to the miracle that is source control we can revive this module if needed. 2014-08-15 16:47:42 +01:00
Pseudonym
adc76243dc Merge pull request #239 from xsacha/stats_removal
Remove Stats.{cpp,h}, which was not being used by anything.
2014-08-15 16:35:33 +01:00
Pseudonym
565e72d9d7 Merge pull request #209 from xsacha/jASSUME
Remove deprecated jASSUME from pcsx2 core. It is still used in some plugins.

[I should note that this may change the performance of the devel target on msvc as jASSUME was compiling to __assume on devel and release while pxAssume only compiles to __assume on release]
2014-08-15 14:38:06 +01:00
Kingcom
2d7ef30e59 Remove redundant Disr5900 2014-08-15 15:23:45 +02:00
Pseudonym
9284a01346 Removed redundant initialisation code (covered in the resets), reverted a little pointless shuffling. 2014-08-15 14:09:18 +01:00
Pseudonym
b574d06f5f Merge pull request #214 from xsacha/init_vars
Init vars directly instead of using dedicated functions
2014-08-15 14:04:06 +01:00
Pseudonym
1c29874541 Removed unused variables. 2014-08-15 13:55:19 +01:00
Pseudonym
08d8026fa3 Removed a couple of unhelpful comments from today and a bunch from 2003. 2014-08-15 13:55:16 +01:00
Pseudonym
2286ac1c49 Merge pull request #221 from xsacha/vuops-2
Improve readability in the VUops.
2014-08-15 13:55:14 +01:00
Sacha
8d616133d6 Remove Stats.{cpp,h}, which was not being used by anything. 2014-08-15 18:08:03 +10:00
ramapcsx2
7197017e74 Merge pull request #228 from archshift/deb-package
Clarified names of the debian packager folder and script.
2014-08-15 07:33:06 +02:00
Sacha
f542c7232e Use __builtin_unreachable where possible for non-msvc 2014-08-15 14:43:52 +10:00
Sacha
7568f6f2ec Remove deprecated jASSUME from pcsx2 core. It is still used in some plugins 2014-08-15 14:32:56 +10:00
Sacha
3271048ab6 Remove init procedures from Hw.cpp 2014-08-15 14:17:35 +10:00
Sacha
791bfc181b Use a function with u32 inputs and make sure all the casts match, because.. 2014-08-15 13:55:14 +10:00
David Quintana
1facc8efbc Merge pull request #225 from lioncash/ghz-macro
cdvdGigaherz: Remove an unnecessary macro
2014-08-15 02:10:32 +02:00
Lioncash
b2d8e7137f cdvdGigaherz: Remove an unnecessary macro define 2014-08-14 20:07:10 -04:00
sudonim1
ba63fca9d8 Merge pull request #235 from archshift/gitignore
Updated .gitignore to exclude /build and pcsx2 snapshot builds
2014-08-15 01:07:00 +01:00
archshift
655c0efb31 Updated .gitignore to exclude /build and pcsx2 snapshot builds 2014-08-14 16:13:27 -07:00
Pseudonym
52fe7a9f2a Merge pull request #226 from archshift/stdminmax
Removed `using std::min/max` from PCH
2014-08-14 23:12:23 +01:00
archshift
fb9c24b900 Removed using std::min/max from PCH 2014-08-14 14:55:52 -07:00
Pseudonym
05d5f06bb5 Merge pull request #224 from xsacha/sse2-force
Require SSE2 instead of SSE+MMX. SSE2 implies SSE+MMX is supported, so all checks of of 'SSE' and 'MMX' can be removed.
2014-08-14 22:43:06 +01:00
Pseudonym
9dd9448d02 Merge pull request #213 from xsacha:patch_obsolete
Remove cheat patches obsoleted by a change in the UI, more than 4 years ago
2014-08-14 21:23:20 +01:00
Pseudonym
cb2593f2bb Merge pull request #210 from xsacha:plugin_cleanup
Some cleanup to improve readability.
2014-08-14 20:37:41 +01:00
Pseudonym
4c7db9e62d Merge pull request #203 from archshift/using-namespace-std
Removed usages of "using namespace std"
2014-08-14 19:31:07 +01:00
archshift
466e6008ad SamplProf.cpp: Removed "using namespace std" 2014-08-14 11:23:50 -07:00
archshift
396e42e17c sVU_zerorec.cpp: Removed "using namespace std" 2014-08-14 11:23:50 -07:00
archshift
f808593b2d DisR5900asm.cpp: Removed "using namespace std" 2014-08-14 11:23:50 -07:00
archshift
7de0065216 Elfheader.cpp: removed "using namespace std" 2014-08-14 11:23:50 -07:00
archshift
285e07be76 MicroVU: removed usage of "using namespace std" 2014-08-14 11:23:50 -07:00
Pseudonym
66765d827b Merged pull request #199 from xsacha/oldcode
Remove some horrible old code.
2014-08-14 19:12:19 +01:00
Pseudonym
19ea90aff5 Merge pull request #195 from Kingcom/DebuggerLists
Abstract list view behavior
2014-08-14 18:57:50 +01:00
Pseudonym
ad58118df0 Merge pull request #183 from Kingcom/Assembler
Add integrated assembler
2014-08-14 18:47:38 +01:00
Kingcom
2a0be7e91e Abstract list view behavior 2014-08-14 18:32:21 +02:00
ramapcsx2
fbdc364329 Merge pull request #230 from lioncash/void
Core: Get rid of C void parameter carryovers
2014-08-14 11:45:59 +02:00
Lioncash
54798d4743 Core: Get rid of C void parameter carryovers 2014-08-14 03:21:09 -04:00
archshift
5aed2b379a Clarified names of the debian packager folder and script 2014-08-14 00:03:13 -07:00
Sacha
6f5e0f96b4 Require SSE2 instead of SSE+MMX. SSE2 implies SSE+MMX is supported, so all checksOF of 'SSE' and 'MMX' can be removed.
SSE2 is supported on more than decade-old x86 CPUs. Almost(?) every x86 CPU since PS2 was released.
Certainly running the existing code on a non-SSE2 computer resulted in most of the code being disabled anyway and the emulator being incredibly slow.
This removal will hopefully allow the removal of MMX/3DNow code as it has been superceded.
2014-08-14 16:01:34 +10:00
Sacha
9dea86068a Remove giant min/max defines and make their usage more understandable. 2014-08-14 12:46:57 +10:00
Sacha
af3482b7cd Improve readability in the VUops. 2014-08-14 10:58:31 +10:00
ramapcsx2
707d32536c Merge pull request #216 from xsacha/soundtouch
Fix case of 'soundtouch' instead of creating a symlink as a workaround.
2014-08-13 21:53:35 +02:00
ramapcsx2
d247a79e48 Merge pull request #187 from lioncash/bool
Use bool constants instead of magic numbers in microVU
2014-08-13 13:17:24 +02:00
ramapcsx2
5820eea1cb Merge pull request #217 from ramapcsx2/wsfix
Removed "force English" patch line from the widescreen patch for FFX International.
2014-08-13 11:28:32 +02:00
ramapcsx2
b6e0ed43de Merge pull request #206 from ramapcsx2/hackremoval1
PCSX2: Removed the "managed VSync" option. I don't think it saw much use
2014-08-13 11:27:33 +02:00
ramapcsx2
72b28ac2fc Removed "force English" patch line from the widescreen patch for FFX
International.
2014-08-13 11:19:58 +02:00
Sacha
2ae3dd970a Fix case of 'soundtouch' instead of creating a symlink as a workaround. 2014-08-13 18:54:31 +10:00
Sacha
a3bc6a73a3 Remove some horrible old code.
Remove an assert define and instead use the static_assert that all compilers provide.
As an added bonus, assert messages\!
2014-08-13 13:55:32 +10:00
Sacha
e1bf7daf59 Remove cheat patches that were obsoleted by a change in the UI, more than 4 years ago. 2014-08-13 13:27:01 +10:00
Sacha
f0af6460a1 Remove pre-gcc4.1.0 code and a bunch of functions that were never used. 2014-08-13 13:08:19 +10:00
Sacha
9dcaaedf06 Some cleanup to improve readability.
Remove old compiler hacks that are no longer needed.
Fix up some spacing and comments that hid code.
Fix a critical bug in deprecated plugin peopsSPU.
2014-08-13 13:05:33 +10:00
ramapcsx2
9c58537078 PCSX2: Removed the "managed VSync" option. I don't think it saw much use
anyway.
2014-08-12 14:53:51 +02:00
ramapcsx2
c46749f236 Merge pull request #196 from archshift/using
Removed uses of `using std::string`
2014-08-12 10:40:49 +02:00
David Quintana
c09469a71c Merge pull request #204 from archshift/auto-itr
Simplified loops by declaring iterators with 'auto'
2014-08-10 22:07:31 +02:00
archshift
afbb5e2721 Simplified loops by declaring iterators with 'auto' 2014-08-10 01:48:57 -07:00
ramapcsx2
9a702cd0c4 Merge pull request #198 from bositman/master
Added  Lord of the Rings The Two Towers (IT) CRC
2014-08-08 14:05:28 +02:00
bositman
77599bec1c Added Lord of the Rings The Two Towers (IT) CRC
As seen here (SLES 51255):
http://forums.pcsx2.net/Thread-GSdx?pid=392166#pid392166
2014-08-07 13:01:54 +03:00
Gregory Hainaut
a5f54b5ec1 Merge pull request #185 from lioncash/leak
zzogl: Fix a few missing fcloses
2014-08-07 09:08:17 +02:00
Gregory Hainaut
b2df6152af Merge pull request #191 from Sonicadvance1/remove-stupid-define
Removes the usage of __LINUX__ define
2014-08-06 21:56:16 +02:00
ramapcsx2
98aad6ef76 Merge pull request #197 from archshift/no-comprende
PrecompiledHeader.h: Add a comment to clarify redefinition of BOOL
2014-08-06 13:19:24 +02:00
archshift
730d7ec528 Added comment explaining redefinition of BOOL 2014-08-06 04:15:23 -07:00
archshift
c911ba4747 Revert "PrecompiledHeader.h: Removed WTF-redefines"
This reverts commit 9fdb318776.
2014-08-06 04:12:38 -07:00
archshift
9fdb318776 PrecompiledHeader.h: Removed WTF-redefines
Removed redefinition of TRUE and FALSE, and removed typedef of int to BOOL
2014-08-06 03:46:15 -07:00
archshift
d92a621a70 DisR5900: removed using std::string 2014-08-06 03:14:11 -07:00
archshift
7734f2eed8 Gif.cpp: removed redundant using std::min 2014-08-06 03:06:58 -07:00
archshift
10dc0bcfa2 Removed using std::string
`using` classes from namespaces can lead to lack of clarity as to where
the class is coming form.
2014-08-06 03:01:48 -07:00
Gregory Hainaut
5d1f224794 Merge pull request #193 from JustArchi/patch-1
linux: Build.sh improvements
2014-08-05 12:17:42 +02:00
ramapcsx2
d876ff522a Merge pull request #169 from arielsrv/master
Added building support from Windows command line. This feature allow bui...
2014-08-04 20:29:56 +02:00
arielsrv
8f2b51c461 Added usage example and GNU License comments. 2014-08-04 13:14:32 -03:00
Łukasz Domeradzki
cd8d21cf8e Build.sh improvements 2014-08-04 03:58:37 +02:00
Ryan Houdek
3d37a6ce27 Removes the usage of __LINUX__ define
This is defined and set it a ton of different places.
It's checked in a whole lot more
Instead just use __linux__ like a real project should
2014-08-03 13:20:36 -05:00
Gregory Hainaut
82c7bcd761 wx3.0: compilation fix for arch linux
* Manually cast WxGetTranslation
* Accept string as format parameter of pxWindowTextWriter
* Manually convert wxString to wide string

Note: Wx setup.h is not the same between Debian and Arch. Unfortunately it
generated various compilations errors on wx code.

Close issue #172
2014-08-03 14:54:44 +02:00
Gregory Hainaut
3c9367825c wx3.0: partially revert 1fda2a611c
I wrongly removed code that set the language directory on Windows.
Linux uses another way (don't know which one)

close issue #189
2014-08-03 14:53:06 +02:00
Gregory Hainaut
e99540554a wx3.0: clang complains about support of reference in varargs 2014-08-03 14:43:08 +02:00
Gregory Hainaut
86152668c3 cmake: install mo file into Langs/id_code instead of Langs/id_code/LC_MESSAGES
Therefore it uses the same locations as windows.
2014-08-03 14:43:08 +02:00
Gregory Hainaut
61088b71c6 cmake: gcc warning management
* disable unused value warning (don't like the syntax 0&&)
* remove -Wno-ignored-attributes (c option). It replaces gcc warning
    by an unsupported option warning...
2014-08-03 14:43:08 +02:00
ramapcsx2
1bb15fd2cc Merge pull request #188 from ramapcsx2/patch1
Fixed a missing word in gamefixes panel
2014-08-01 15:21:22 +02:00
ramapcsx2
67f934a902 Fixed a missing word in gamefixes panel 2014-08-01 15:04:34 +02:00
sudonim1
a0a54bdd05 Merge pull request #186 from lioncash/early-return
ZZOgl: Fix an early return in ZZoglShadersGLSL4
2014-08-01 12:42:00 +01:00
Lioncash
ed65172308 Use bool constants instead of magic numbers in microVU 2014-07-31 20:34:16 -04:00
Lioncash
0a35a2fac9 Fix missing fclose calls in ZZoglCreate.cpp 2014-07-31 19:08:56 -04:00
Lioncash
a1d2c85d88 ZZOgl: Fix an early return in ZZoglShadersGLSL4 2014-07-31 19:00:53 -04:00
Kingcom
7d49f75317 Replace square character with unicode value 2014-07-31 20:38:26 +02:00
Kingcom
3e883e4be4 Integrate assembler 2014-07-31 20:38:26 +02:00
Pseudonym
3e65c1d0a3 Just killing a couple of latin-1 characters my editor was complaining about. 2014-07-31 16:17:37 +01:00
Pseudonym
e25ad9759a Merge pull request #178 from Sonicadvance1:x86_64-cpudetect
Support grabbing the MXCSR mask on x86_64.
2014-07-31 16:14:49 +01:00
Ryan Houdek
06ccc0121f Support grabbing the MXCSR mask on x86_64.
Instead of using some dynamic code to grab the FXSave information, use an intrinsic if on at least MSVC 2012.
With GCC just use a bit of ASM, and if on MSVC 2010 or older, use the old crappy method.

This method can be removed once MSVC 2010 support is dropped and mandate at least MSVC 2012 minimum.
2014-07-31 10:11:25 -05:00
Pseudonym
03bfffea23 Merge pulled request #174 from Sonicadvance1/x86_64-emitter-fixes
Fix a couple issues in the x86emitter on x86_64.
2014-07-31 15:43:35 +01:00
Pseudonym
de5a55c03e Merge pull request #176 from Sonicadvance1/x86_64-recompiler-casts
Fix a bunch of casts in the x86 recompiler core.
2014-07-31 15:03:26 +01:00
Ryan Houdek
b4771030d3 Fix a couple issues in the x86emitter on x86_64.
This won't fix the billions of errors that will happen at runtime of using the x86 emitter, but chooses to make some better coding practice choices
that enables it to compile on x86_64.

in the xIndirectVoid class, instead of using s32 for the offset, use sptr which will be 32bit or 64bit depending on architecture.
This also fixes a few alignment issues in xAddressVoid's constructors.

In EmitSibMagic we are casting a void* to s32, which won't work on x86_64, so first do a cast from sptr to s32.
Won't work on x86_64, but gets us compiling.
2014-07-31 09:01:56 -05:00
Pseudonym
4d06f982db Merge pull request #181 from lioncash/elif
Remove 'elif' define from Pcsx2Defs and microvu_misc.h
2014-07-31 14:21:47 +01:00
Pseudonym
1fb057462a Merge pull request #180 from lioncash/const
Apply const to some functions in Gif_Unit.h
2014-07-31 13:47:10 +01:00
sudonim1
93374facb8 Merge pull request #179 from moshekaplan/patch-7
Cleanup leaking memory and filehandles
2014-07-31 13:37:22 +01:00
Kingcom
e862047142 Add write32 method to DebugInterface 2014-07-31 14:10:36 +02:00
Kingcom
90eb776310 Add assembler 2014-07-31 14:10:36 +02:00
Pseudonym
9c77b2dfeb Merge pull request #177 from moshekaplan/patch-6
Fix Ztable memory leaks
2014-07-31 12:58:13 +01:00
Pseudonym
6abfd601ba Merge pull request #175 from Sonicadvance1/x86_64-dialog-casts
Fixes a few casts in the DisassemblyDialog and PluginSelectorPanel.
2014-07-31 12:40:29 +01:00
ramapcsx2
38738b2a18 Merge pull request #182 from chinhodado/patch-1
Fix a typo in README
2014-07-31 11:34:00 +02:00
chinhodado
99b5f7badf Fix a typo in README 2014-07-31 00:48:24 -04:00
Lioncash
ac558afc8a Remove 'elif' define from Pcsx2Defs and microvu_misc.h 2014-07-30 23:44:04 -04:00
Moshe Kaplan
d555656a41 Cleanup leaking memory and filehandles 2014-07-30 22:52:34 -04:00
Lioncash
10fd86fd68 Apply const to some functions in Gif_Unit.h 2014-07-30 22:52:00 -04:00
Moshe Kaplan
af58734826 Fix Ztable memory leaks 2014-07-30 22:09:25 -04:00
Ryan Houdek
08a6ff6e6c Fix a bunch of casts in the x86 recompiler core.
There are a load of casts from pointers to 'int' and 'u32' in the JIT core.
This takes a better practices approach to the problem and casts to uptr instead.
Zero functionality change of course, just changes all of these terrible casts to going to uptr which makes the casting style consistant and work on
both x86_32 and x86_64.

This obviously doesn't work around the issue of the recompiler not running on x86_64, but we need compiling before we delve further.
2014-07-30 18:32:36 -05:00
Ryan Houdek
7d13f96e28 Fixes a few casts in the DisassemblyDialog and PluginSelectorPanel.
We are casting wxWidget's events userdata from void* to integers.
So use uptr instead since it'll work on both x86_32 and x86_64.
2014-07-30 18:25:13 -05:00
Pseudonym
e726f82344 Merge pull request #161 from Kingcom/Debugger
Debugger enhancements
2014-07-30 18:24:38 +01:00
Gregory Hainaut
5c054fb486 pcsx2: compilation issue (miss a L for wstring) 2014-07-30 19:19:42 +02:00
sudonim1
904f5de1ea Merge pull request #144 from Sonicadvance1/fix-BitScanFoward
Fix the BitScanForward implementations for x86_64.
2014-07-30 18:19:19 +01:00
Kingcom
c79fe9a1e7 Fix linux issues 2014-07-30 19:02:39 +02:00
Kingcom
15943eddb1 Fix string handling in breakpoint list 2014-07-30 19:01:50 +02:00
Kingcom
8d1e294b32 Also highlight registers accessed by memory opcodes 2014-07-30 19:01:49 +02:00
Kingcom
c4e89bea32 Add function list 2014-07-30 19:01:49 +02:00
Kingcom
b37f6e9df1 Fix display of memory breakpoint enable status and add context menu to breakpoint list 2014-07-30 19:01:49 +02:00
Kingcom
30a5e31b66 Show the cycles passed in the debugger 2014-07-30 19:01:48 +02:00
sudonim1
5415fb361f Merge pull request #166 from moshekaplan/patch-2
Prevent filehandle from leaking
2014-07-30 17:42:01 +01:00
sudonim1
34010c5605 Merge pull request #167 from moshekaplan/patch-5
Avoid leaking `iso` structures
2014-07-30 13:36:24 +01:00
Gregory Hainaut
41d2ea4306 i10n: refresh all languages
Remove the --previous option of po generation. It broke some translations.

Remove the translation of PCSX2 version, no point to translate C format symbol.
2014-07-30 09:21:49 +02:00
Gregory Hainaut
36ea4658f1 Revert "i10n: refresh all languages"
This reverts commit 7a9f4161ea.
2014-07-30 09:21:49 +02:00
Gregory Hainaut
cc0b9bbca9 cmake: drop gtk workaround for ubuntu 10.10
Note: remove also FIND_LIBRARY_USE_LIB64_PATHS that is alredy set in build parameter
2014-07-30 09:21:49 +02:00
Gregory Hainaut
f38c6d0995 Merge pull request #142 from Sonicadvance1/fPIC_x86_64
Enable -fPIC on x86_64.
2014-07-30 00:01:08 +02:00
ramapcsx2
bfa2bbef85 Merge pull request #164 from moshekaplan/patch-1
Avoid leaking `romdir` file handle
2014-07-29 21:53:17 +02:00
Gregory Hainaut
7a9f4161ea i10n: refresh all languages 2014-07-29 21:40:32 +02:00
Gregory Hainaut
5c0702092a i10n: update sv_SE 2014-07-29 21:23:47 +02:00
Gregory Hainaut
0706564215 remove sparsehash from 3rdparty
small deps but the less the merrier

Note: could someone check windows builds :p
2014-07-29 21:06:31 +02:00
Gregory Hainaut
6485bd89d9 common: drop remaining of HashMap
Ryan Houdek removes all use of this code.

Let's remove the left-overs too, beside it will removes the sparsehash depencency
2014-07-29 21:06:31 +02:00
Gregory Hainaut
38f617233d pcsx2: don't rely on 3rdpary to bring back include dependency 2014-07-29 21:06:30 +02:00
Gregory Hainaut
9e774eb41c pcsx2: use int instead of uint on file reader
Fix a crash when offset was negative. Offet becomes bigger than my input file.
2014-07-29 20:52:18 +02:00
Kingcom
6f101c0a0c Add small lines between four byte groups in the memory view and fix status bar text not being displayed 2014-07-29 20:50:58 +02:00
Gregory Hainaut
1d5b250b58 pcsx2/cdvd: kill a small memory leak 2014-07-29 20:49:46 +02:00
Gregory Hainaut
e7d0a0345e pcsx2/: remove ^M eol on 3 files 2014-07-29 20:49:46 +02:00
Gregory Hainaut
50868f14f6 pcsx2: don't access member data directly 2014-07-29 20:45:46 +02:00
Gregory Hainaut
79701aa613 gui:debugger: clean string management
Let's use the FastFormatUnicode infrastructure
2014-07-29 20:45:46 +02:00
Gregory Hainaut
ac41ba1f73 wx3.0: rename some deprecated API call
Avoid various gcc warning

Note: Compatible with recent wx2.8 version
2014-07-29 20:45:45 +02:00
Gregory Hainaut
deb69c4c72 wx3.0: add a stripped down version of wx3.0
Based on the debian version.

Note: it can be surely stripped down further

MS build script must be updated. Note: I keep wx original  script as reference
2014-07-29 20:45:45 +02:00
Gregory Hainaut
76237955c7 wx3.0: fix various string printing on linux
wide-char must use %ls format on linux. Don't rely on non standard %s/%S
2014-07-29 20:45:44 +02:00
Gregory Hainaut
cfa8e94e95 wx3.0: disable an useless symbol on linux
Not used and print an error message for each plugins.
2014-07-29 20:45:44 +02:00
Gregory Hainaut
01de778831 wx3.0: various buggy code (wx assertion)
v3: reenable dc.GetSize, I didn't manage to reproduce the assertion failure
2014-07-29 20:45:44 +02:00
Gregory Hainaut
1fda2a611c wx3.0: various interface update
v3: partially revert previous version

* Keep old behavior for translation on wx2.8
* Revert wxDataObjectSimple parameter change
+ feature is MSW only
+ devs are welcome to improve it
* restore standard path, only update the reference type
2014-07-29 20:45:44 +02:00
Gregory Hainaut
d5d19acb3f wx3.0: lots of cast...
Various string as still wrong but at least it can be compiled now.

I think the remaining issue are w_char with %s format (at least on linux)
2014-07-29 20:45:44 +02:00
Gregory Hainaut
fded22e1b3 wx3.0: extend logger to support wxString as input
Note: only enabled it on 2.8 for windows (because of UTF8 linux is fine)
2014-07-29 20:45:44 +02:00
Gregory Hainaut
91afc2079c wx3.0: force wide char as expected
Note: on linux it would be better to force everythings to use UTF8
2014-07-29 20:45:43 +02:00
Gregory Hainaut
d09fee90ad wx3.0: add cmake support (2.8 by default)
use ./build.sh --wx30 for wx3.0
2014-07-29 20:45:43 +02:00
Moshe Kaplan
e1dbdce91e Update libiso.cpp
Oops, accidentally caused a use-after-free
2014-07-29 12:22:44 -04:00
Pseudonym
28227ea4c4 Merge pull request #123 from Sonicadvance1/fix_interlockedbittestandresetset
Fixes interlockedbittestandreset/set in intrin_x86.h
2014-07-29 14:20:13 +01:00
ramapcsx2
97ad04dfd0 Merge pull request #171 from Dokman/ca_ES
Rername pot files to po
2014-07-29 14:06:12 +02:00
dokman
4ada08c690 Changes acording to compile po files and remove the bin files that doesn't do anything there 2014-07-29 14:00:47 +02:00
dokman
84ee81aba9 I missed to put the files in bin directory 2014-07-29 13:46:14 +02:00
ramapcsx2
32a70a6552 Merge pull request #116 from Dokman/ca_ES
[WIP]Catalan translation files
2014-07-29 09:50:13 +02:00
arielsrv
ae88702e00 Added building support from Windows command line. This feature allow build in parallel (all available core) and use hard links if possible. Also change configuration destiny (i. e. avx2). It really is much faster than Visual Studio GUI.
Usage: build.cmd "Release AVX".
2014-07-28 15:26:30 -03:00
dokman
384fe14ac6 More translations i think that now can be used by people 2014-07-27 01:22:09 +02:00
dokman
c52228278f Huge fuckmind translating more things 2014-07-27 01:22:08 +02:00
Ryan Houdek
8c07d4e7b9 Enable -fPIC on x86_64.
-fPIC is required on x86_64 for shared libraries.
This allows the compilation to get farther in to plugin compiling.
2014-07-26 03:08:35 -05:00
refraction
fb5b7a34e3 VIF: Modification to illegal IRQ's on NOP's Fixes #162 . Some games like Looney Tunes Back In Action use the lower 16 bits for special codes, so we only check the command info area (not the command itself of course, that would be silly). 2014-07-24 18:22:00 +01:00
Moshe Kaplan
1e951605fb Avoid leaking iso structures 2014-07-23 13:58:17 -04:00
Moshe Kaplan
82dd025860 Prevent filehandle from leaking 2014-07-23 13:51:22 -04:00
Moshe Kaplan
f1d5a0a1b3 Avoid leaking romdir file handle 2014-07-23 11:42:05 -04:00
Gregory Hainaut
8a43789db5 zzogl/spu2x: clang warning fix
Nothing critical
2014-07-20 22:07:02 +02:00
Gregory Hainaut
ef0e3fe6c6 gsdx: disable separate shader on radeon driver (linux) 2014-07-19 14:02:37 +02:00
Pseudonym
41d12130c2 Merge pull request #155 from Kingcom/Debugger
Check for alignment when accessing memory with the debugger
2014-07-19 00:36:15 +01:00
Kingcom
b23062c54a Check for alignment when accessing memory with the debugger 2014-07-19 01:05:41 +02:00
Pseudonym
455a20d852 Removed unnecessary #include after pull request #154. 2014-07-18 21:54:46 +01:00
Pseudonym
a3498c506f Merge pull request #154 from from Kingcom/Debugger
Revert part of #140
2014-07-18 21:50:59 +01:00
Kingcom
2505291065 Revert part of #140 2014-07-18 22:17:41 +02:00
Forrest McDonald
81458912f9 pcsx2: remove template and pointer on overload function from wxGuiTools
Fixed clang build.

Note from Gregory:
C++ requests that at least 1 parameters is a class, an enumeration, or a
reference to those objects. Probably to avoid to screw basic type operation.
For example: *p += 4;

The realy buggy code was this one because T could be an int!
template T
f(*ptr, T)

To avoid any issue in the future the Team decide to drop all overload that use pointers.
2014-07-18 19:20:53 +02:00
Forrest McDonald
da93a960af clang fix for narrowing 2014-07-18 19:14:41 +02:00
David Quintana
cea03d91e4 Merge pull request #141 from lioncash/cdvdghz
cdvdGigaherz: Fix a few things
2014-07-16 20:50:40 +02:00
sudonim1
320d22f2a7 Merge pull request #146 from Sonicadvance1/GSdx-x86_64-fixes
Fixes for getting GSdx to compile on x86_64
2014-07-16 19:29:58 +01:00
Ryan Houdek
8ff0f9e869 Update GSSetupPrimCodeGenerator for x86_64.
offsetof requires the expression to be constant to get the offset.
Use a combination of offsetof + sizeof to get the correct offset.
2014-07-16 13:21:45 -05:00
Ryan Houdek
74dd2553a6 Fix function definitions in GSDrawScanlineCodeGenerator.x64
These have been changed since this was last compiled.
Also removes a #error and drops it to a #warning for now while development is in process.
2014-07-16 12:13:09 -05:00
sudonim1
85bb789ffa Merge pull request #148 from Sonicadvance1/remove-dictionary
Remove most of HashTools.
2014-07-16 18:10:56 +01:00
sudonim1
06dfc4e6ef Merge pull request #118 from lioncash/zgs
Minor changes to ZeroGS
2014-07-16 18:08:12 +01:00
Ryan Houdek
ba7b0612dc Use the iterator to get the value from maps to avoid two look ups. 2014-07-16 12:00:50 -05:00
ramapcsx2
c8c4ff39de Merge pull request #152 from josephgbr/master
Update Brazilian Portuguese translation
2014-07-16 18:57:18 +02:00
ramapcsx2
d12e5104e2 Merge pull request #149 from Kingcom/LilyPad
Allow hotplugging XInput devices in LilyPad
2014-07-16 18:55:10 +02:00
sudonim1
90515fdbb0 Merge pull request #150 from Kingcom/Highlight
Highlight arguments from disassembler selection
2014-07-16 17:49:49 +01:00
ramapcsx2
cb9fc6fa3e Merge pull request #100 from lioncash/duplicate-condition
ZeroGS: Remove a duplicate condition in RenderCRTC
2014-07-16 18:33:15 +02:00
Rafael Ferreira
152f04c0a7 Keep previous translation
When updating existing PO files with the newly created POT files, keep previous msgids of translated messsages (as fuzzy). This allows translators to compare previous and current msgid strings and then identify what has changed, resulting in a faster translation activity and a more consistent GUI.
2014-07-16 12:18:58 -03:00
Rafael Ferreira
527d58c9c3 Updated Brazilian Portuguese translation
Updated pt_BR translation for pcsx2_Main file
2014-07-16 12:04:08 -03:00
Rafael Ferreira
839c0af088 Updated Brazilian Portuguese translation
Updated pt_BR translation for pcsx2_Iconized file
2014-07-16 12:02:54 -03:00
Kingcom
3db06d7426 Highlight arguments from disassembler selection 2014-07-16 16:20:03 +02:00
ramapcsx2
ae607e56ca These are also not needed anymore. 2014-07-16 12:46:01 +02:00
ramapcsx2
d6b042f9fe Merge branch 'master' of https://github.com/PCSX2/pcsx2 2014-07-16 12:32:51 +02:00
ramapcsx2
735e441afc Merge pull request #132 from Dokman/patch-1
Deleting avg thing of the full installer
2014-07-16 12:32:12 +02:00
sudonim1
48d00e817f Merge pull request #145 from Sonicadvance1/zzogl-pointer-cast
Fix a pointer cast on x86_64 in zzogl.
2014-07-16 10:53:54 +01:00
Kingcom
ce4dc4ae21 Allow hotplugging XInput devices in LilyPad 2014-07-16 11:18:20 +02:00
Ryan Houdek
0c1087a2e5 Remove HashTools::IHashable/CommonComparisonClass
These are no longer used.
2014-07-15 22:08:11 -05:00
Ryan Houdek
abd605a066 Remove HashTools::HashSet.
This is no longer used.
2014-07-15 22:07:03 -05:00
Ryan Houdek
5bd06d3a02 Remove HashTools::HashMap/SpecializedHashMap
These are no longer used. Wipe them out.
2014-07-15 22:05:36 -05:00
Ryan Houdek
391cf379ae Remove usages of HashTools::Dictionary/HashMap
Replace these usages with unordered_map since they are just as quick
2014-07-15 22:02:14 -05:00
Ryan Houdek
264cce2003 Also remove UnicodeDictionary.
This class isn't used anywhere and we should promote usage of std::unordered_map instead of this class
2014-07-15 21:01:30 -05:00
Ryan Houdek
79dd0958d0 Remove the pxDictionary class since it is no longer needed.
This was only used by the game database, which has now been changed to an unordered_map
2014-07-15 20:58:25 -05:00
Ryan Houdek
2c6188b73f Switch the GameDatabase from using a pxDictionary to a std::unordered_map.
Both implementations are about the same, which is hard to measure since we are limited in speed due to the hashing function.

Both implementations averaged ~220ms to load the full game database on my workstation.
2014-07-15 20:55:52 -05:00
Ryan Houdek
33adabb035 Fix some _M_AMD64 checks in GSdx.
In the future these will be _M_X86_64, but for now this won't be the case.
2014-07-15 18:21:03 -05:00
Ryan Houdek
616500b8f3 Disabled preferred stack boundary on x86_64in GSdx. 2014-07-15 18:18:59 -05:00
Ryan Houdek
2f98f5a6d6 Fix a pointer cast on x86_64 in zzogl. 2014-07-15 18:16:14 -05:00
Ryan Houdek
2a6656050c Fix the BitScanForward implementations for x86_64. 2014-07-15 18:13:32 -05:00
sudonim1
80b22ca2be Merge pull request #140 from Kingcom/Debugger
Various debugger fixes and enhancements
2014-07-15 23:59:07 +01:00
Kingcom
53159a81cf -Add lq/sq preview
-fix potential memory access exceptions
-prevent the disassembly from changing positions when a breakpoint is toggled
-only use the status bar text from the current cpu
2014-07-16 00:51:53 +02:00
sudonim1
6f0f7ce948 Merge pull request #110 from Sonicadvance1/hashmap_64bit
Support 64bit address hashing in the CommonHashClass.
2014-07-15 23:15:03 +01:00
sudonim1
c21dd828d5 Merge pull request #137 from Sonicadvance1/vtlb-64bit
Fix vtlb compiling for x86_64.
2014-07-15 23:13:08 +01:00
Ryan Houdek
97bed8e710 Fix vtlb compiling for x86_64.
This has no functional change on x86_32, it's mostly just changing a few pointer to u32 conversions to uptr and sptr.

I can not yet confirm if this runs on x86_64, but compiling is enough of an issue currently.
2014-07-15 16:42:59 -05:00
sudonim1
aaf70d652b Merge pull request #138 from Sonicadvance1/yuv2rgb-64bit
Let non-x86_32 use the reference yuv2rgb conversion function.
2014-07-15 22:34:38 +01:00
Lioncash
54c21b30c9 cdvdGigaherz: Fix the seek function in FileStream.
Prior to this, it would have ignored any kind of reference position.
2014-07-15 17:28:13 -04:00
sudonim1
91f23938b5 Merge pull request #136 from Sonicadvance1/gui-pointers
Fix two conversions of pointers to integer in the GUI.
2014-07-15 22:20:37 +01:00
Ryan Houdek
0af0db6593 Fix two conversions of pointers to integer in the GUI.
Use uptr instead of 32bit integers fixes the issue of compiling.
2014-07-15 16:18:24 -05:00
sudonim1
7a1ebd22ed Merge pull request #135 from Sonicadvance1/jmp_emitter
Change the x86emitter jmp emitter from using s32 to sptr.
2014-07-15 22:16:04 +01:00
Lioncash
c2e96a081f cdvdGigaherz: Use booleans instead of ints to represent conditionals in CDVD.cpp 2014-07-15 17:06:49 -04:00
sudonim1
1d56035a56 Merge pull request #134 from Sonicadvance1/NOT32-declaration
Fix NOT32M function declaration.
2014-07-15 22:06:48 +01:00
sudonim1
0e68a9e0fc Merge pull request #133 from Sonicadvance1/microvu_ptr
Fix microVU converting pointers to u32.
2014-07-15 22:02:19 +01:00
Ryan Houdek
a143a8b1f6 Let non-x86_32 use the reference yuv2rgb conversion function.
The yuv2rgb_sse2 implementation is x86_32 only, so x86_64 can't take advantage of this optimized code path.

This requires the architecture defines to be working fully, so this can't be merged until it is fixed on the Windows side of things.
2014-07-15 15:31:07 -05:00
Ryan Houdek
5114b37bfa Change the x86emitter jmp emitter from using s32 to sptr.
This doesn't change anything on x86_32, but it is required on x86_64 so we don't lose precision.
Also adds an assert to see if the distance is greater than the maximum 32bit jump, which can't be hit on x86_32, but can be on x86_64.
2014-07-15 15:16:30 -05:00
Ryan Houdek
8c746302a2 Fix NOT32M function declaration.
Use uptr as the argument since it is either u32 or u64 depending on architecture.
2014-07-15 15:05:46 -05:00
Ryan Houdek
a1d6ca2298 Fix microVU converting pointers to u32.
Convert them to uptr instead to make it architecture independent.
2014-07-15 15:04:08 -05:00
dokman
d6a617c225 Deleting avg thing of the full installer
If now you have drop the avg toolbar it does nothing here i think
2014-07-15 18:30:49 +02:00
David Quintana
69f57351b2 Merge pull request #109 from Sonicadvance1/windows_arch_defines
Support _ARCH_32/64 defines on Windows
2014-07-15 17:04:21 +02:00
David Quintana
c4d5267107 Merge pull request #128 from Sonicadvance1/linux_arch_defines
Support _M_X86[_32/_64] on Linux.
2014-07-15 17:04:20 +02:00
Ryan Houdek
6b1ee680a2 Support _ARCH_32/64 _M_X86[_32/_64] defines on Windows
This defines the correct define depending on architecture build target.
Currently Windows doesn't support a x86_64 build target, but once it does the define will be in place.
2014-07-15 09:16:37 -05:00
sudonim1
d3ebdae159 Merge pull request #131 from lioncash/gsdx-wat
GSDX: Replace an FLT_MAX with the appropriate ULONG_MAX
2014-07-15 12:04:14 +01:00
sudonim1
86a0d3faff Merge pull request #124 from lioncash/array-bounds
sVU_zerorec.cpp: Correctly guard against invalid indexes in SuperVUDestroy
2014-07-15 11:27:53 +01:00
sudonim1
3f62ad08e1 Merge pull request #122 from lioncash/indents
COP0: Fix indentation for function TLBR
2014-07-15 11:26:13 +01:00
sudonim1
1a483a7d88 Merge pull request #121 from lioncash/zzogl-fix
ZZOGL: Fix an incorrect formatting argument in the Win32 config.
2014-07-15 11:22:45 +01:00
ramapcsx2
3daff15f34 Merge branch 'master' of https://github.com/PCSX2/pcsx2 2014-07-15 11:56:55 +02:00
David Quintana
1736c1e32e Merge pull request #125 from lioncash/cdghz
cdvdGigaherz: Simplify the loops within readLine and readLineW
2014-07-15 11:53:36 +02:00
David Quintana
764ca25f8d Merge pull request #120 from lioncash/dev9ghzdrk
DEV9ghzdrk: Clarify precedence for a bitwise AND in smap.
2014-07-15 11:53:27 +02:00
David Quintana
79ee48d91b Merge pull request #129 from lioncash/spu2x-warnings
SPU2-X: Fix some signed/unsigned mismatch warnings.
2014-07-15 11:52:02 +02:00
David Quintana
e2f4fc245a Merge pull request #127 from lioncash/dev9-warnings
dev9ghzdrk: Fix a few warnings.
2014-07-15 11:49:37 +02:00
David Quintana
f26319a2b0 Merge pull request #126 from lioncash/dev9-unused
dev9ghzdrk: Remove unreachable code.
2014-07-15 11:49:12 +02:00
Lioncash
637c99a362 GSDX: Replace an FLT_MAX with the appropriate ULONG_MAX 2014-07-15 01:47:26 -04:00
Ryan Houdek
a1a0ed0563 Support _M_X86[_32/_64] on Linux.
These go hand in hand with PR #109 but for Linux as well.

These are much more useful defines than what other compilers give us.
2014-07-14 23:58:02 -05:00
Lioncash
0a825a1aa4 SPU2-X: Fix some signed/unsigned mismatch warnings. 2014-07-15 00:09:48 -04:00
Lioncash
b5f805fc6c dev9ghzdrk: Fix a few warnings.
Mostly unsigned mismatches.
2014-07-14 23:41:51 -04:00
Lioncash
55c8633f9a dev9ghzdrk: Remove unreachable code.
Same as what is in the default switch cases
2014-07-14 23:26:31 -04:00
Lioncash
1fa95de554 cdvdGigaherz: Simplify the loops within readLine and readLineW 2014-07-14 22:58:49 -04:00
Lioncash
a1080f4853 sVU_zerorec.cpp: Correctly guard against invalid VU indexes
recVUHeaders and recVUBlocks are both arrays of size 2. Prior to this, it would allow an index of 2, which is out of range.
2014-07-14 22:44:31 -04:00
Ryan Houdek
48d178886e Fixes interlockedbittestandreset/set in intrin_x86.h
This doesn't update the file to the latest version from mingw32 since this is already a custom header stripped from mingw32.

This also fixes the functions for x86_64(verified that it still works for both architectures) and also updates the version inside of GSdx.
Also removes a comment in the GSdx header saying that these functions are broken since they no longer are.
2014-07-14 21:20:31 -05:00
Lioncash
673bac12a6 COP0: Fix indentation for function TLBR 2014-07-14 22:07:02 -04:00
Lioncash
b0a0508c85 ZZOGL: Fix an incorrect formatting argument in the Win32 config.
the _u32 should be passed, not the direct union itself.
2014-07-14 21:31:44 -04:00
Lioncash
69ecdd3236 DEV9ghzdrk: Clarify precedence for a bitwise and in smap. 2014-07-14 20:49:03 -04:00
sudonim1
9a950cdca6 Merge pull request #119 from lioncash/spu2x
SPU2-X: Fix float truncation warnings
2014-07-15 01:31:44 +01:00
Lioncash
7ec3cf46d6 SPU2-X: Fix float truncation warnings 2014-07-14 20:26:38 -04:00
Lioncash
ba0d3d1a6a ZeroGS: Add a missing formatter to a sprintf call 2014-07-14 18:02:22 -04:00
Lioncash
b9ff3b6c81 ZeroGS: Explicitly convert the LPVOID buffer to a const char*
Also make the failure case for one of these log calls a DEBUG_LOG instead
of a printf.
2014-07-14 18:01:50 -04:00
David Quintana
f4178e41b3 Merge pull request #117 from lioncash/cdvd
Minor changes to cdvdGigaherz
2014-07-14 22:38:48 +02:00
Lioncash
d648227e3d cdvdGigaherz: Get rid of a magic constant in TocStuff 2014-07-14 16:11:51 -04:00
Lioncash
3d0094b611 cdvdGigaherz: Fix some minor tab/space mismatches in TocStuff 2014-07-14 16:11:01 -04:00
Gregory Hainaut
f85a4c0467 clang: don't use clang asm tool
-no-integrated-as fixes most of the asm issue :)
2014-07-14 13:58:06 +02:00
Forrest McDonald
b24d4cce8d Clang doesn't support some flags that GCC does, so conditionally check the compiler and add them if we are doing a GCC build 2014-07-14 13:54:31 +02:00
dokman
a235da9cc5 Windows GS -
Finished
2014-07-13 22:10:01 +02:00
dokman
fa45ea32dc GS Window -
Many translations like a 85%
2014-07-13 21:41:41 +02:00
dokman
a594c444da Starting - Settings
- Finished EE/IOP (Original)
- Finished VUs (Original)
- Finished GS (All Translated)
2014-07-13 21:04:09 +02:00
dokman
210f06d990 Finishing the System Menu now this menu is at 100% 2014-07-13 19:22:38 +02:00
Dokman
899156435c update of copyrights 2014-07-13 19:05:51 +02:00
Dokman
1303b4950f Typo error 2014-07-13 19:05:01 +02:00
Dokman
a24deadb54 update of copyrights 2014-07-13 19:04:33 +02:00
dokman
4b55e6e68e Starting Catalan Translation Files:
-First configuration finished translations
- System Menu at 90% translated
2014-07-13 19:02:20 +02:00
ramapcsx2
0121366f65 Merge branch 'master' of https://github.com/PCSX2/pcsx2 2014-07-12 20:23:01 +02:00
Gregory Hainaut
c60fefa1a6 gcc: support address sanitizer 2014-07-12 19:57:26 +02:00
Gregory Hainaut
8c03d50421 cmake: remove a specific warning for clang 2014-07-12 16:04:57 +02:00
Gregory Hainaut
7318814474 pcsx2: remove/disable brace warning 2014-07-12 16:04:07 +02:00
Gregory Hainaut
afc4f3386a pcsx2: be sure that variables are initialized 2014-07-12 16:03:06 +02:00
Gregory Hainaut
c6c6171841 pcsx2: don't hide base function
As far as I understand you can't mix virtual (select at runtime) and
overloading (select at compile time).
2014-07-12 16:01:21 +02:00
Gregory Hainaut
47bf88ed3f gsdx: miss break / inline function in header 2014-07-12 16:00:10 +02:00
Gregory Hainaut
492d67c6e8 spu2x: use std::abs (c abs support only integer) 2014-07-12 15:59:29 +02:00
ramapcsx2
58b63cb58c Merge branch 'master' of https://github.com/PCSX2/pcsx2 2014-07-12 14:41:50 +02:00
Gregory Hainaut
d4a76b979c ooups a very bad typo 2014-07-12 13:33:24 +02:00
Gregory Hainaut
4fdfd04d3c partially revert c5d2343f51
Parameter name can help to understand the code so let's keep them.
Clang warning was disabled in previous commit
2014-07-12 13:30:34 +02:00
Gregory Hainaut
79f6aacc85 common: various warning fix
* Use c++11 static assert
* Properly cast to parameter template to u32 (help clang)
* Remove lots of useless ASM. Memset it only used with a size of 4096.
* check pthread_mutex_init status
2014-07-12 12:59:23 +02:00
Gregory Hainaut
c73ce3d02d pcsx2: don't use 0&& to remove code
It works but compiler is not happy because it is still parsing the full line.
2014-07-12 12:59:23 +02:00
Gregory Hainaut
f3d03b025a pcsx2: reorder init of member in constructor
Init must be done in the order of declaration
2014-07-12 12:59:23 +02:00
Gregory Hainaut
a1ac59a48a pcsx2: add various default case statement
Note: add a note on some case note handled properly not sure how to fix them.
Actually there are potentially invalid case.
2014-07-12 12:59:23 +02:00
Gregory Hainaut
f401f817ed cmake: sdl opt typo + clean warning management
Add back a lots of warning in the core!
2014-07-12 12:59:23 +02:00
Gregory Hainaut
23c76075e5 Merge pull request #108 from Sonicadvance1/wrong_arch
Remove -march argument on x86_64 build option.
2014-07-12 12:58:04 +02:00
Ryan Houdek
d132e6bce4 Support 64bit address hashing in the CommonHashClass.
The class already supports hashing 64bit values, just break it out to support it in this particular case.
From the 64bit version of the hash, this hash favours values that aren't on the extreme end.
Consdering that hashing is only really used by the class itself it isn't too big of an issue.
2014-07-11 17:16:58 -05:00
Ryan Houdek
1f188b2610 Remove -march argument on x86_64 build option.
GCC doesn't support pentium4 as a arch target for x86_64. It complains that the architecture doesn't support x86_64
Which to be fair the first few models didn't support 64bit.
Just remove the architecture setting since there isn't a need for it.
2014-07-11 14:32:17 -05:00
Gregory Hainaut
a6d8b3b847 linux build: add an easy option to strip binary 2014-07-10 09:17:39 +02:00
Gregory Hainaut
0de6e80093 stupid space 2014-07-09 15:46:46 +02:00
Gregory Hainaut
3d0f8c986f Update contributing.md 2014-07-09 15:41:09 +02:00
ramapcsx2
d41edf21e4 Merge branch 'master' of https://github.com/PCSX2/pcsx2 2014-07-08 20:57:47 +02:00
refraction
06167087b3 Remove SVN checks from installer files. Closes issue #20 2014-07-08 01:38:50 +01:00
ramapcsx2
a3d5d9112a Merge branch 'master' of https://github.com/PCSX2/pcsx2 2014-07-07 09:38:54 +02:00
sudonim1
1cb5ba3efd Merge pull request #98 from Sonicadvance1/minor_cleanup
Some minor cleanups to the codebase.
2014-07-06 12:11:00 +01:00
ramapcsx2
b56d9c9e31 Merge pull request #96 from lioncash/unused-vars
Core: Remove some unused variables
2014-07-05 20:58:12 +02:00
ramapcsx2
a48369dc41 Merge branch 'master' of https://github.com/PCSX2/pcsx2 2014-07-05 20:48:52 +02:00
ramapcsx2
6800753f09 bla 2014-07-05 20:48:45 +02:00
ramapcsx2
e9e08c6576 Merge pull request #95 from lioncash/typo-error
ZeroGS: Fix a sprintf typo in GSopen.
2014-07-05 20:42:45 +02:00
ramapcsx2
5907bbea6e Merge pull request #89 from lioncash/array-bounds
Fix a possibility for out of bound accesses in logging within Cache.cpp
2014-07-05 20:34:56 +02:00
Lioncash
cb5b265dcd ZeroGS: Remove a duplicate condition in RenderCRTC 2014-07-05 14:00:00 -04:00
Gregory Hainaut
f9baf3eb1c Merge branch 'Sonicadvance1-cmake_64bit_option' 2014-07-05 15:09:49 +02:00
Gregory Hainaut
1dba4aceca cmake: reduce a bit cmake syntax cluttering 2014-07-05 15:08:39 +02:00
Gregory Hainaut
e8b3532658 cmake: clean main file and option
Move build configuration from CMakeLists to cmake/BuildParameters.cmake where it belongs
Use option syntax for on/off option
Complete a bit previous commit to force all 64bits path detections (likely done by cmake)
2014-07-05 14:54:56 +02:00
Ryan Houdek
35979bb5a6 Add a CMake compile time option for building a 64bit binary.
By default the cmake build will still cross compile a 32bit binary and spout a message about it if not enabled.
This doesn't fix the 64bit build issues, just makes it easier for someone to test 64bit builds in the future.
Look towards a bright future instead of a dark and gloomy past
2014-07-05 05:09:17 -05:00
Ryan Houdek
182e826dc5 Fix SpatialArrayReserve::SetBlockSize function declaration to match definition.
The function was defined to use uptr, but the declaration was using uint.
2014-07-05 04:59:31 -05:00
Ryan Houdek
08ef4bfbff Wipe the clusterfsck that was the get16bits define in HashTools.
This define takes a pointer(s8* in this case) and grabs 16bits of data from the array it points to.
This can be done the generic way on all compilers, no need for specifying it another way.
2014-07-05 04:39:55 -05:00
Ryan Houdek
1bc3f346b1 Fix HostSys::Munmap function declaration.
It's arguments are defined to be (void*, size_t) but with the function declaration they were (void*, u32).
2014-07-05 04:36:48 -05:00
Lioncash
6dff0b13a4 Core: Remove some unused variables 2014-07-04 22:11:13 -04:00
Lioncash
76796c76cd ZeroGS: Fix a sprintf typo in GSopen.
This 1000 millisecond specifier was intended for the AddMessage call.
2014-07-04 21:50:18 -04:00
Gregory Hainaut
c5d2343f51 pcsx2/common: fix tons of warning spamming on clang
* Don't use parameter name to avoid unused parameter
* Set a default for various case
2014-07-05 00:08:48 +02:00
Gregory Hainaut
e6e7c95e94 linux: add an option for clang
It will be used on the future with clang/cmake cleaning contribution
2014-07-05 00:08:48 +02:00
Pseudonym
f4cb9de8d9 mVU: Corrected a typo in the branch in branch delay slot handling which prevented using the simpler code in the case of the delay slot being that of an unconditional branch. Now hopefully the code in question actually works for that case, since I'm not sure this has been tested. 2014-07-04 12:38:14 +01:00
Pseudonym
6f19551a77 Quick fix for undefined behaviour in the R3000A disassembler. 2014-07-04 12:35:00 +01:00
Gregory Hainaut
efce449550 github: add a CONTRIBUTING.md file
Initial version that likely got a broken syntax :(
2014-07-03 21:22:15 +02:00
Lioncash
ffa216d958 Fix a possibility for out of bound accesses in logging within Cache.cpp 2014-07-03 00:24:16 -04:00
ramapcsx2
ecb42cad9b Thanks Bluefire101 for reporting this (eventually) undefined behavior (depending on who you ask).
Even if there was no problem, code should always be clear on what it does.
2014-07-01 15:43:26 +02:00
refraction
0ddb77c048 VIF: Ignore interrupts caused by obviously bogus NOP and NULL codes. Fixes Onimusha Blade Warriors. 2014-06-30 18:56:10 +01:00
Gregory Hainaut
5bd806ada6 Merge pull request #75 from Leucos8/master
i10n: Updated the it_IT translation files

Thanks
2014-06-30 08:46:02 +02:00
Gregory Hainaut
2582649490 Merge branch 'gigaherz-master' 2014-06-28 11:26:33 +02:00
Gregory Hainaut
2084ead56c spu2x: linux port of Giga lastest update
=> Advanced (per-channel) Volume Adjustment AKA Room Correction

windows: update CfgReadFloat to really return a float
2014-06-28 11:23:44 +02:00
Gregory Hainaut
f2e50d4ffd Merge branch 'master' of git://github.com/gigaherz/pcsx2 into gigaherz-master 2014-06-28 11:00:19 +02:00
Leucos8
6faa7a060c Updated the it_IT translation files 2014-06-27 10:03:56 +02:00
Gregory Hainaut
f998b72e99 sigh I do the mistake every time 2014-06-20 18:55:25 +02:00
Gregory Hainaut
fe30f2e48e pcsx2: tlb fix
* pc is incremented before execution of the instruction => must be
    decremented before exception

* PS2 support 48 tlb => mask need 6 bits
2014-06-20 13:52:05 +02:00
Gregory Hainaut
9a82bed3a5 db: enable autogamefix of goemon + bump to ingame
Note: actually it could even be playable or perfect (let's dream)
2014-06-20 13:52:05 +02:00
Gregory Hainaut
a00b8ecc55 pcsx2: tlb: goemon implement a preload hack tlb
Tlb mapping is stored @0x3d5580 (GoemonTlb[150])
The function that will populate the tlb is around pc = 0x356250, ra = 0x33ad48

The idea is to add a callback on 0x33ad48 block that will populate the tlb based on
ee mem content.

Note: The hack is based on previous Virtual PS2 => Physical PS2 LUT
2014-06-20 13:52:05 +02:00
Gregory Hainaut
9452444a9f pcsx2: tlb: add a new lut (Virtual PS2 to Physical PS2)
note: automatic gamefixes are done after done after the init that why code was splitted.
note2: The LUT is 4MB and only used for only 1 game. So I only allocate it when the gamefix is
    enabled
2014-06-20 13:51:33 +02:00
Gregory Hainaut
2e8f56fc86 pcsx2: tlb: add a new gamefix hack for goemon 2014-06-20 13:17:59 +02:00
Gregory Hainaut
8148148932 Merge pull request #67 from nrusef/master
i10n: ja_JP
2014-06-20 10:25:39 +02:00
Sakura Naruse
e000eeaafb edit ja_JP 2014-06-15 12:35:23 +09:00
Gregory Hainaut
9ac9307b44 gsdx: try to protect more code when togging f9
deassert gsopen_done before delete the gs object. Compiler and CPU will
reordonate the store (or not because it is a global variable). Probably not
perfect but better.

Got a crash on GSKeyEvent which I guess wasn't thread safe. So let's ensure
gs is open.
2014-06-13 23:32:50 +02:00
Gregory Hainaut
cdba010794 zzogl: kill a couple of gcc warning 2014-06-13 23:04:21 +02:00
Gregory Hainaut
eb947dc325 pcsx2:gsdx: support of cross-platform (C11) aligned_malloc 2014-06-13 23:04:21 +02:00
Gregory Hainaut
9e22135f35 i10n: remove various extra % in ar
More C-String compliant
2014-06-13 23:04:20 +02:00
bositman
5c42ced8d3 Update GSCrc.cpp
Missed comma, thanks yxmline
2014-06-10 10:28:52 +03:00
bositman
b5e9a9d451 Merge pull request #62 from Blackbird88/patch-1
Corrected MGS3 comment, because OCD also new CRC
2014-06-10 01:34:26 +03:00
Blackbird88
cd3cfb27de Update GSCrc.cpp 2014-06-09 18:34:23 +02:00
Blackbird88
f7d35ff619 Corrected MGS3 comment, because OCD also new CRC
There is no such thing as MGS3 Substance only Subsistence. Substance is MGS2 :P
Also this new CRC is US Disc 2 of Subsistence. The blue stripes should be fixed now I guess.
2014-06-09 18:23:29 +02:00
refraction
81dd3b46c5 Modified behavior of the Delay VIF1 Stall hack to work with Spy Hunter. This is another one of those games which relies on a FIFO which we won't implement because it will just slow things down. 2014-06-06 22:29:33 +01:00
bositman
96d3b41989 Misspell fix for someone special at the forum :P 2014-06-06 09:53:24 +03:00
ramapcsx2
ff837a767b Merge pull request #60 from MrColdbird/master
Fixing DEV9 Adapter Detection
2014-06-05 16:25:40 +02:00
Coldbird
002dc80d48 Fixing DEV9 Adapter Detection 2014-06-05 12:33:43 +02:00
Gregory Hainaut
c64d7483db Merge pull request #57 from IlDucci/patch-2
i18n: (es/ES) Update pcsx2_Main.po
2014-06-05 08:10:28 +02:00
IlDucci
ef0f473199 Update pcsx2_Main.po
Updating translation.
2014-06-02 21:35:27 +02:00
refraction
fd8161c523 Removed a hack which broke Midnight Club in r3285 to fix Batman Begins. Doesn't seem to be needed anymore. 2014-05-29 00:11:04 +01:00
ramapcsx2
53e2824937 cdvdGigaherz: Some improvements to smooth out the "experience" when playing from CDs. A keepalive thread polls the drive every 30 seconds to prevent it from spinning down. When the plugin starts, it now tries to limit the spindle speed so it is less noisy and doesn't wear out as much (32x speed for CD games, 8x speed for DVD games).
Version bump to 0.9.
2014-05-26 14:28:56 +02:00
ramapcsx2
71ebb2493e Merge pull request #52 from Bigpet/master
Dev9 plugin - prevent null dereference if no device is set
2014-05-25 16:49:49 +02:00
Peter Tissen
ad9ec44228 prevent null dereference if no network device is selected in dev9 2014-05-24 22:12:26 +02:00
Gregory Hainaut
8775e51ebd Merge pull request #28 from Kingcom/Breakpoints
If a memcheck or breakpoint is triggered in a delay slot, stop on branch
2014-05-24 10:59:04 +02:00
Gregory Hainaut
f11877e72c Merge pull request #48 from nE0sIghT/master
Fix Cg find for Gentoo amd64
2014-05-20 09:03:00 +02:00
nE0sIghT
66785be691 Fix Cg find for Gentoo amd64 2014-05-18 22:51:09 +04:00
gigaherz
1fb3de2960 cdvdGigaherz: Change the order in which the different reading modes are attempted. Seems to fix some CD-Rom games. While at it, renamed a rude variable with a better name. ;P 2014-05-16 22:36:16 +02:00
gigaherz
654343f875 Advanced (per-channel) Volume Adjustment AKA Room Correction (Windows-only, need someone to fix the linux counterpart) 2014-05-11 17:26:00 +02:00
Gregory Hainaut
0bf7a35a53 pcsx2: improve the GS read fifo API
1/ initReadFifo will be first called on the GS thread
    (openGL can only be done on the GS thread)

2/ readFifo will be called on the EE thread. It is not safe too access eeMem from GS
 because of memory is virtual

Fix "recent" regression (crash) on Kingdom heart and others game too.

v2: add a len check on GSState::InitReadFIFO
2014-05-06 20:28:18 +02:00
Gregory Hainaut
3a46634f4a gcc: fix a couple of gcc warning (sign compare)
My gosh, they're like rabbit :p
2014-05-06 09:25:00 +02:00
Kingcom
67f7eaabc7 If a memcheck or breakpoint is triggered in a delay slot, stop on the branch 2014-05-05 23:50:37 +02:00
Avi Halachmi (:avih)
d28669761f gzip-iso: Speedup some cases by using more memory.
Significant speedup on some cases by using roughly another index size
in ram. The ram usage is now up to roughly cache size plus 2x index size.

This patch adds another index-like direct access point for each span we've
visited. This replaces the single z-state which was used for
sequential extraction, and does the same, but now it can continue
sequentially on most previously visited spans instead of only from
the last read.
2014-05-05 15:07:48 +03:00
Avi Halachmi (:avih)
8684596d66 gzip-iso: bugfix in zstate setup, cosmetic refactoring 2014-05-05 14:58:44 +03:00
Gregory Hainaut
460ee7f5de Merge branch 'Mirrors' of git://github.com/Kingcom/pcsx2 2014-05-05 09:39:35 +02:00
Gregory Hainaut
b7536ca94b zzogl: gcc warning fix
Let's hope variadic macro work on visual

cmake: reenable various warning. With previous fixes it just a matter of a couple of warnings
2014-05-03 10:37:58 +02:00
Gregory Hainaut
58077c63a7 gcc-warning: check c function return. Print error when bad.
v2: properly check return code of fread/getcwd function
2014-05-03 10:32:05 +02:00
Gregory Hainaut
22b65489e2 gcc warning: constify const string 2014-05-03 10:18:27 +02:00
Gregory Hainaut
2816188c83 zzogl: bad function declaration 2014-05-03 10:18:27 +02:00
Gregory Hainaut
4d78b6be31 pcsx2/plugin: sign compare mismatch extra 2014-05-03 10:18:27 +02:00
Gregory Hainaut
5087d13de8 gsdx: remove/comment unused variable 2014-05-03 10:18:27 +02:00
Gregory Hainaut
4d6d5c870c pcsx2: remove useless volatile
Volatile is only useful as argument not the returned value
2014-05-03 10:18:26 +02:00
Gregory Hainaut
dd8666036c pcsx2: sign compare mismatch 3/3 2014-05-03 10:18:26 +02:00
Gregory Hainaut
27a4bc5a39 pcsx2: sign compare mismatch 2/3 2014-05-03 10:18:26 +02:00
Gregory Hainaut
88f4d1e3a7 pcsx2: sign compare mismatch 1/3 2014-05-03 10:18:26 +02:00
Gregory Hainaut
c6d8b52d26 pcsx2: try to ensure better sync with FIFO read call
First wait will ensure correctness of GS register.
2nd wait will ensure that the GS fifo read call is finished

(If I understand MTGS correctly)
2014-05-01 16:43:12 +02:00
Avi Halachmi
14efa6fbda gzip-iso: update VS2010/2012 projects (2012 untested) 2014-04-30 13:21:08 +03:00
Avi Halachmi (:avih)
e859d3f3d1 gzip-iso: change zlib_indexed.c to .h 2014-04-29 23:33:28 +03:00
Avi Halachmi (:avih)
0f26be85b5 gzip-iso: fix compiler warning/error 2014-04-29 23:23:07 +03:00
Avi Halachmi (:avih)
49505ab93f gzip-iso: optimal small chunks sequential access 2014-04-29 11:26:35 +03:00
Avi Halachmi (:avih)
86a6fcddc0 gzip-iso: Better cache, more cpu for quicker extract 2014-04-29 02:41:30 +03:00
Gregory Hainaut
c92de149a2 pcsx2: quick linux fix of recent addition 2014-04-27 22:45:28 +02:00
Avi Halachmi (:avih)
36fe83afcc Gzip ISO: add cache (50 chunks of 4M) 2014-04-27 22:51:58 +03:00
Avi Halachmi (:avih)
5771e6eae8 Indexed gzipped ISO support (slow - no caching) 2014-04-27 19:58:20 +03:00
Avi Halachmi (:avih)
7d491cb230 Adding zlib example files 2014-04-27 01:33:37 +03:00
Gregory Hainaut
a86f2615be cmake: git compilation issue + useless warning message
* avoid compilation failure when git -C isn't supported
* don't print missing dependency when EXTRA_PLUGINS isn't activated
* sed /endif(.*)/endif/ because I don't like it
2014-04-17 20:42:56 +02:00
Gregory Hainaut
c37d9c10f7 cmake: git compilation issue + useless warning message
* avoid compilation failure when git -C isn't supported
* don't print missing dependency when EXTRA_PLUGINS isn't activated
* sed /endif(.*)/endif/ because I don't like it
2014-04-17 20:26:16 +02:00
avih
e39db3f9ad Merge pull request #30 from bositman/master
Added Metal Gear Solid 3 Subsistence Spanish
2014-04-17 13:59:51 +03:00
bositman
82f347403a Added Metal Gear Solid 3 Subsistence Spanish
to GSdx CRC hacks.
Refer here: http://forums.pcsx2.net/Thread-Metal-Gear-Solid-3-SLES-820-48-not-included-to-GSdx-fix
2014-04-17 13:53:06 +03:00
Avi Halachmi (:avih)
916d7502c8 Lilypad: Better focus/capture/uncapture handling.
1. After ALT-Tab to another window and back, now it accepts PCSX2
shortcuts properly (e.g. Esc or F6 etc) - focus changes were not
always recognized before.

2. If Lilypad is set to capture mouse, now it releases it on Escape. This
part is a small hack because the code looks as if it should handle it,
but in practice doesn't. This adds explicit uncapture on Escape.
2014-04-16 18:39:07 +03:00
Kingcom
42651c1500 Check mirrors in breakpoints and memchecks 2014-04-13 18:37:42 +02:00
Gregory Hainaut
da4a785fae debian: make create tarball script compatible with git 2014-04-13 10:48:37 +02:00
Gregory Hainaut
c2b78c6fdf license: again not yet perfect but much better
Remove old tsvn of zzogl
Add various header
add "is in public domain" for license in public domain so Debian's script catch it
2014-04-13 10:41:24 +02:00
Gregory Hainaut
c260decf58 gsdx: add bsd3 clause on gsdx xbyak files 2014-04-13 10:06:52 +02:00
Gregory Hainaut
17eb468f38 win build fix: set utf8-bom 2014-04-13 10:05:26 +02:00
Gregory Hainaut
75c64e12aa license: add missing header
Still miss lots of copyright header but we are better
2014-04-12 19:42:41 +02:00
Gregory Hainaut
ea25d12405 gsdx-gles: nvidia driver quick trial (only GLES3.0)
* Fix to create a 3.0 GLES context
* set a default precision to fix most of shader compilation issue
* Crash later because of GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT
    => need to test opensource driver
2014-04-12 12:40:23 +02:00
Gregory Hainaut
ca8c5b041d cmake: drop sparsehash_new module
It was a workaround for a buggy version of the lib.
2014-04-12 10:25:40 +02:00
Gregory Hainaut
414ce3589a cmake: new option -DEXTRA_PLUGINS=TRUE|FALSE
--extra for ./build.sh script

By default only build the pricipal plugin: GSdx|zzogl/spu2-x/onepad/UsbNull/Dev9Null

Extra plugins are: GsNull|zzogl-cg/Spu2Null|zerospu/PadNull

The purpose is to improve compilation time on linux
2014-04-11 09:18:31 +02:00
Gregory Hainaut
37b1d3ae42 codeblock: remove build file => linux is cmake only
They are completely out-dated. And nobody have time to update them.
2014-04-11 09:18:31 +02:00
Gregory Hainaut
f984339404 pcsx2: reduce gamefix panel size
Move 2 sentences into the tooltip. Reduce both box and the useless empty space.

Unfortunately, translation would need to updated too.

Thanks Avih for the idea
2014-04-11 09:18:30 +02:00
Gregory Hainaut
86895cbf45 pcsx2 license: add missing nice header on various files
Remains 3 files that I don't know the source
pcsx2/windows/DwmSetup.cpp: *No copyright* UNKNOWN
pcsx2/windows/SamplProf.cpp: *No copyright* UNKNOWN
pcsx2/windows/VCprojects/IopSif.cpp: *No copyright* UNKNOWN

Remains 1 files in common that I don't know the source
common/include/comptr.h: *No copyright* UNKNOWN

Remains too much files in plugins that I don't know the source :(
2014-04-11 09:18:30 +02:00
Avi Halachmi (:avih)
18953e81bc Visual Studio re-Fix: and also build if git is available 2014-04-06 14:38:54 +03:00
Avi Halachmi (:avih)
bae75d234a Merge branch 'master' of https://github.com/PCSX2/pcsx2 2014-04-06 12:59:56 +03:00
Avi Halachmi (:avih)
2f634bddd3 Visual Studio Fix: build even if git is not available 2014-04-06 12:58:56 +03:00
Gregory Hainaut
187f0bea3b i18n: update all googlecode -> github stuff
Note: translation are still marked as fuzzy
2014-04-06 11:54:36 +02:00
Gregory Hainaut
605afeff74 cmake: enable -g for debug/dev build
otherwise it is a PITA on gdb
2014-04-06 11:43:40 +02:00
Gregory Hainaut
0d45e6d70e gsdx-ogl: avoid to send constant to the GPU
It was a waste of bandwith
2014-04-06 10:44:40 +02:00
gigaherz
4362cc0e9a Fixed a few references to Googlecode, and a few mentions of the "svn" word in comments.
Other instances of "svn" in filenames and such remain, but they are not high priority and I didn't want to mess with updating all the project systems.
Closes #19.
2014-04-05 18:38:41 +02:00
bositman
5af88a3e2b Merge pull request #17 from nrusef/master
Japanese translation improvement (further)
2014-04-01 16:17:56 +03:00
nrusef
9628700ced further improvement 2014-04-01 21:20:06 +09:00
Gregory Hainaut
32ed98a9a5 Merge pull request #15 from nrusef/jpn_translate
i18n: Japanese translation improvement

Note: mo not yet regenerated
2014-03-31 09:39:11 +02:00
nrusef
ea032b4b3e po format correction 2014-03-31 07:31:28 +09:00
nrusef
449192e565 Japanese translation fix 2014-03-31 04:31:00 +09:00
Roel Aaij
9d1840e37a Fix out of tree build.
Tell git to look in the source dir for the repository.
2014-03-30 16:59:29 +02:00
Roel Aaij
ec0f9e49c3 Fix segfault in non-dev build by adding extra check for NULL. 2014-03-30 16:59:28 +02:00
Gregory Hainaut
390245806a cmake: sed /PROJECT_SOURCE_DIR/CMAKE_SOURCE_DIR/
The former depends on the project command. Whereas the latter is the true absolute path
of the project
2014-03-30 16:36:02 +02:00
Gregory Hainaut
22e02b545e cmake: fatal error when path contains some parenthesis 2014-03-30 16:36:02 +02:00
Gregory Hainaut
b020bd76c6 gsdx-ogl: restore gles build
Add the --gles build option to the linux main script
Ifdef all gl code not supported on gles3 (note some will be reenabled for gles3.1)

Note: it probably doesn't run anymore. My Nvidia driver doesn't support
yet egl/gles so I can't test it. Feel free to contribute.
2014-03-29 11:55:02 +01:00
Gregory Hainaut
483b5a75e8 gsdx ogl: automatic setup of geometry shader
* disable it for gallium Mesa driver
* Re-enable it for Nvidia driver
2014-03-29 10:47:53 +01:00
Gregory Hainaut
70d1719b7d cmake: handle gracefully wxwidget 3.0-dev
1/ print a nice message
2/ replace 3.0 to 2.8 so it could still compile on system that both version
   are installed but wrongly configured
2014-03-26 11:37:49 +01:00
Gregory Hainaut
30ba964f9d fix visual studio compilation 2014-03-25 18:35:02 +01:00
gigaherz
3ef93addd0 It doesn't seem to be needed with vs, but those numbers are technically long longs. 2014-03-25 17:51:38 +01:00
Gregory Hainaut
0980591fa2 pcsx2 debugger: be more friendly with linux
* Fix a couple of gcc warning and replace deprecated function
* Fix the redraw of the memory zone
* Avoid a crash if we breakpoint before running
* Use %s on linux because %S isn't supported
* Properly check .result in recMemCheck. Add some code to print hit
  breakpoint.
* breakpoint window isn't properly resized so used a static size as a
  temporary workaround
2014-03-25 17:31:52 +01:00
Gregory Hainaut
e59b252cc0 ignore vim tmp file 2014-03-25 17:31:19 +01:00
Gregory Hainaut
4496093cf8 cmake version:
Use same version as window based on git
drop subversion code
use lld on onepad
2014-03-25 17:29:47 +01:00
Gregory Hainaut
8b78551b92 gsdx-ogl: improve debugging capabilities
allow to print memory transfer usage
Check gl call in dev build
2014-03-25 16:36:29 +01:00
Gregory Hainaut
bde2e3956d gsdx-ogl: automatic dectection of buffer_storage 2014-03-25 16:36:29 +01:00
Gregory Hainaut
c85ba4c259 gsdx ogl: add buffer_storage for vertex upload
A bit slower. Maybe because SubData does the copy in the driver thread. My memcpy is done on
the main thread. I'm not sure it would worth an extra thread to copy vertex data to the GPU

Note: testers are welcome. You need to edit the ini file.
"ogl_vertex_storage=1" <= enable the extension
"ogl_vertex_storage=0" <= disable the extension

Again you need the support of GL_arb_buffer_storage (i.e. not catalyst)
2014-03-25 16:36:29 +01:00
Gregory Hainaut
403518e852 gsdx-ogl: texture management
Improve arb_buffer_storage implementation
Try harder to align the texture buffer

Strangely arb_buffer_storage is 3 times slower on my PC (nvidia)

Tester are welcome! Open the ini file
"ogl_texture_storage = 1" <= enable the extension
"ogl_texture_storage = 0" <= disable the extension

Note: you need an opengl 4.4 driver or one that support arb_buffer_storage (i.e. not catalyst)
2014-03-25 16:36:29 +01:00
Gregory Hainaut
41091f8ebf gsdx ogl: remove multithread hack
This hack was used because GSReadFifo was called from the EE thread.
Previous commit move the call to the GSThread.

Hopefully avoid flushing the full GPU contex would improve openGL
performance (at least avoid some hiccups ;) )

Note: newer GSdx ogl won't be compatible with older PCSX2
2014-03-25 16:36:29 +01:00
Gregory Hainaut
f78c39cc98 pcsx2: call GSReadFIFO from GS thread (was EE) 2014-03-25 16:36:29 +01:00
Gregory Hainaut
39a9b7b721 local: refresh all language
* Mark "enable widescreen hack" as fuzzy in most translation
* update zh_TW/es_ES
2014-03-25 16:36:29 +01:00
Gregory Hainaut
9d2b6cb589 locale: remove garbage files 2014-03-25 16:36:28 +01:00
David Quintana
87c42c8c5d Merge pull request #7 from Kingcom/master
Fix VS2010 build
2014-03-25 16:18:52 +01:00
Kingcom
e31afb5885 Fix VS2010 build 2014-03-25 16:15:21 +01:00
David Quintana
2fbac107ca Merge pull request #5 from Kingcom/master
More debugger enhancements and fixes
2014-03-25 14:42:59 +01:00
David Quintana
a1239ee6a8 Update README.md 2014-03-25 14:19:30 +01:00
David Quintana
15ac8d9ffc Update README.md 2014-03-25 14:17:48 +01:00
David Quintana
f57be52061 Update README.md 2014-03-25 14:17:18 +01:00
David Quintana
f68918c5a9 Update README.md 2014-03-25 14:07:43 +01:00
David Quintana
1b481f1946 Update README.md 2014-03-25 14:02:45 +01:00
David Quintana
127c1ef8bf Create README.md 2014-03-25 13:53:36 +01:00
gigaherz
189c8701d7 Git ignore. 2014-03-25 13:31:56 +01:00
gigaherz
f7c1b6e060 Git-based versioning. 2014-03-25 13:31:36 +01:00
Kingcom
c25020765c Display memory view page when setting its position 2014-03-23 13:30:11 +01:00
Kingcom
10c3928eef Focus disassembly when a breakpoint triggered 2014-03-23 13:30:11 +01:00
Kingcom
100fe404a5 Load symbols from file 2014-03-23 13:30:10 +01:00
Kingcom
0ade0a44b5 Detect and skip padding nops at the end of functions 2014-03-23 13:30:10 +01:00
Kingcom
7a20d94536 Fix breakpoint window on Linux 2014-03-23 13:30:10 +01:00
Kingcom
4e2e178417 Add list to show, edit and delete breakpoints 2014-03-23 13:30:10 +01:00
Kingcom
aad9ea0e05 Memory breakpoints 2014-03-23 13:27:50 +01:00
Kingcom
074da1fedf Use CPU cycles to determine if we should skip a breakpoint after resuming 2014-03-23 13:27:50 +01:00
Kingcom
c8a760832b Change register value 2014-03-23 13:27:50 +01:00
Kingcom
b69dcb51a0 Always enable debugger in devbuilds, but keep function scanning restricted to the enable state 2014-03-23 13:27:50 +01:00
Kingcom
e55229db40 A hackish attempt at step into 2014-03-23 13:27:49 +01:00
Kingcom
d8abd04a8e Only capture F10, not all system keys 2014-03-23 13:27:49 +01:00
Kingcom
5935572458 Better valid ranges 2014-03-23 13:27:49 +01:00
Kingcom
807521f91b Add debugger config to ini, and put it to use 2014-03-23 13:27:49 +01:00
Kingcom
8ee14a8039 Address mask for breakpoints, always clear whole instruction cache (until there's a better solution) 2014-03-23 13:27:49 +01:00
Kingcom
8cd45189c3 Step over ERET 2014-03-23 13:27:48 +01:00
Kingcom
fbb0a77ce3 Allow re-opening the debugger after closing it 2014-03-23 13:27:48 +01:00
Kingcom
854574af66 Enable debugger in release builds. Let's see if it negatively affects anythi 2014-03-23 13:27:48 +01:00
Kingcom
1f7d6461c5 Help button/window in debugger (Windows only) 2014-03-23 13:27:48 +01:00
gregory.hainaut
30d5135fdd gsdx-ogl: sigh.. this one was hidden :p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5932 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-23 08:25:54 +00:00
gregory.hainaut
192c5d2c4a gsdx-ogl: one more
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5931 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-22 22:00:46 +00:00
gregory.hainaut
6c87673e57 gsdx-ogl: forget a pointer
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5930 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-22 21:14:57 +00:00
gregory.hainaut
ba46b25e2f GSdx-ogl: GL4.1 program shader is optional
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5929 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-22 09:08:37 +00:00
gregory.hainaut
d044147698 linux: fix compilation issue with recent Mesa (gentoo)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5928 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-13 17:37:40 +00:00
ramapcsx2.code
689405732c VS2012 project file changes. Took a bit of trickery since I don't have 2012 installed but I hope it works.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5927 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-07 00:04:03 +00:00
ramapcsx2.code
bae54f312d VS2010 project file changes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5926 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-06 23:44:56 +00:00
ramapcsx2.code
8fbe363f3c Gte.cpp fix for VS2013.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5925 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-06 23:34:23 +00:00
gregory.hainaut
141c5e60c5 mirror, mirror
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5924 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-06 23:32:56 +00:00
gregory.hainaut
9d41fe251b linux fix:
rename Gte.c into Gte.cpp need to be done on windows too
rename a duplicated function. Until we get a nice name for it.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5923 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-06 23:30:11 +00:00
ramapcsx2.code
6ccebbf7a8 These files go with last commit.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5922 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-06 23:16:50 +00:00
ramapcsx2.code
ef27358a82 Initial work on getting further with PSX mode. Because the PSX rules!
All work done by Refraction, I'm just the commit guy for this.

Note: Missing Visual Studio 2012 / 2010 project files and Linux makefile additions.
Note2: PSX games don't work yet :p

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5921 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-06 23:00:09 +00:00
refraction@gmail.com
fb13a502d2 Don't know how/why these changed in the DMA commit, but reverting to what it should be.
(seriously, i don't remember changing this!)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5920 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-03-05 10:11:28 +00:00
refraction
e6b363ef54 Path3 Masking: Lower the Intermediate mode threshold for smaller packets, fixes some small texture glitches on Path3 masking games such as Wallace & Gromit
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5919 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-28 21:38:04 +00:00
ramapcsx2.code
8fd3fd7259 These logs never helped solve issues and they tend to spam in some games. Removing them.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5918 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-28 01:36:44 +00:00
refraction
3f2f799248 DMA: Fix for FFXII in r5915. Apparently it tries to use an invalid DMA mode, so we shall assume they meant "chain" mode.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5917 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-27 22:22:28 +00:00
gigaherz@gmail.com
b460019846 [15:33] (Kingcom): it seems inline breaks gcc, as it can't extern a function declared with inline
[15:34] (Kingcom): other functions in other units use it, and get linker errors like this

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5916 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-27 14:41:44 +00:00
refraction
35b5e6a923 GIF:
-Implemented GIF_MODE Masking fixed the All Star Pro Wrestling series slowness/hanging.

DMA: 
-Standardize the IPU and SIF dma's to use the standard chain handling in hw.c, fixed up some DMA resuming stuff in the forementioned units, VIF, GIF and SPR.

-Added some warnings for DMA stall control which isn't implemented, hopefully somebody will find a game that does it so we can add/test it :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5915 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-26 22:34:02 +00:00
gregory.hainaut
e24f3585d4 pcsx2: fix window compilation + a couple of extra ;)
* Fix some issue with the new debugger on linux
* Enable the previous tlb miss fix on the interpreter
* disable the building of po by default. It pollute too much my env.



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5914 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-23 16:00:55 +00:00
gregory.hainaut
220f55d760 linux compilation fix:
* use c++11 for pcsx2
* rename __rdtsc so I won't conflict with gnu version
* add a bunch of .data() method to get string data



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5913 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-23 09:57:01 +00:00
ramapcsx2.code
c374343ae9 GSdx:
Crashfix for a weird GIF_FLG_IMAGE2 situation in Wallace and Gromit Project Zoo. Needs further investigation.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5912 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-22 20:04:32 +00:00
gregory.hainaut
ca3035fe07 pcsx2: on going work to better support tlb miss
Currenty code isn't activated because it will crash any game that do a tlb miss (with the recompiler)

However if you activate the code with the interpreter, the exception will be fired and new tlb setting
will be loaded => got nice picture with "Bouken Jidai Katsugeki"



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5911 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-22 16:23:31 +00:00
gregory.hainaut
5af621056a gsdx ogl: new option for free driver
reduce_gl_requirement_for_free_driver => set it to 1 to only required a 3.0 context (you still required the good extensions)



git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5910 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-22 16:12:42 +00:00
ramapcsx2.code
44d43495a7 Kingcom fixed a small annoyance where the savestate hotkeys would defocus the GS window, causing them to not work after one use.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5909 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-22 14:54:37 +00:00
ramapcsx2.code
8a92ad1434 Added insane EE cycle rate multipliers because they get requested so much.
Requires editing the pcsx2_vm.ini directly. Set EECycleRate = whatever (between 3 and 99). 

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5908 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-22 14:04:41 +00:00
gigaherz
182d51eb34 Really, svn? those files clearly were in the patch I gave you, you created them on disk, how did you forget to add them to the commit?!
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5907 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-21 14:43:13 +00:00
gigaherz
22dc1e7f86 Missed these files while juggling with git<->svn
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5906 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-21 14:38:10 +00:00
gigaherz
babd8868d9 Initial debugger work by Kingcom. Features:
- Advanced disassembly view for R5900 and R3000
  - Register list with change highlight
  - Editable memory view
  - Conditional execute breakpoints (r5900 only)
  - Step over
  - Scan for functions (incomplete), show macros
  - Enable C++11 for debug tools.
  - Expression parser
  - Disasm updates for thread safety
Squashed from: https://github.com/PCSX2/pcsx2/pull/1
Thanks to Kingcom for coding it all and mziab for Linux patches


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5905 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-21 14:29:13 +00:00
refraction
038d3bea87 If you're gonna do a revert, you might as well do it properly :P If you don't want it doing properly, give it to me.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5904 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-16 16:21:08 +00:00
refraction
f3399ead26 Vsync: Put it back to half slices, there seems to be games which don't like the vsync timing more accurate either way. Until i can work out why we will go back to the old half n half timing which all known games seem happy with.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5903 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-16 16:07:14 +00:00
gigaherz
888f0a27da Remove vs2008 project files, since they have become outdated, and complicated to maintain.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5902 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-15 18:24:06 +00:00
refraction
c979181bd7 Counters/Vsync: Adjusted VSync according to an older test we had. Fixes Legendz Gekitou! Saga Battle. Also adjusted the number of scanlines depending on if the game is using interlacing or not.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5900 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-13 22:16:21 +00:00
ramapcsx2.code
916537b0f8 These might be needed, dunno.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5899 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-12 12:52:03 +00:00
ramapcsx2.code
65152066ca Just a bit of GSdx debugging.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5898 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-11 21:47:43 +00:00
Asmodean.pcsx2
0651e45460 GSdx: Just some cleaning.
Reformatted fx files that were causing issues on certain text editors. They should now display correctly in those editors.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5897 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-11 04:27:32 +00:00
Asmodean.pcsx2
7d96af950e GSdx: A few small post-processing changes, to accommodate future updates.
Also removed the fallback recovery ps, and replaced the compile fail catch to a simple console print. Which I think is safer, and faster.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5894 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-09 01:01:41 +00:00
refraction
82d5194a4f SPU2-X: Just fixing up a small error i came across while looking into something else. Nothing to see here.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5893 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-08 17:52:33 +00:00
refraction
9d479ab64b GameGB: Syphon Filter - Omega Strain Europe patch for Flashlight. Removed an incorrect/pointless patch on the US version.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5892 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-08 12:38:08 +00:00
gregory.hainaut
1922598f0f the "don't let users shoot themself in the foot" commit
UserHacks_AlphaStencil will take precedence on override_GL_ARB_shader_image_load_store


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5891 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-08 11:22:51 +00:00
gregory.hainaut
3d7b86660a gsdx ogl: Enable by default advance DATE effect on nvidia (GL4 GPU)
Note: DATE is used for shadows (persona 3) and others effect

You can disable it when you disable gl image extension (override_GL_ARB_shader_image_load_store = 0)
You can also enable it on AMD too (set it to 1 this time) but no guarantee.

If you feel the extension is too slow, you can try disable some gl barrier (aka "damn the torpedo full steam ahead!").
It can be done with the option UserHacks_DateGL4 = 1. Otherwise just disable the extension.

Note: don't enable UserHacks_AlphaStencil in the same time. GL_ARB_shader_image_load_store is an alternative implementation.
Enabling both in the same time will lead to undefined (well surely wrong) behavior.




git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5890 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-08 11:05:26 +00:00
refraction
907964a7d1 Langs: Change the Arabic name properly, update relevant files (thanks for the heads up Gregory :) )
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5889 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-07 20:34:36 +00:00
gregory.hainaut
384c0c12ea gsdx ogl:
* properly detect gl nv depth extension
* Always show the hack on the gui. Add a new hack option for DATE (gl4.2) only
* Save the scan mode on linux too (f7)
* hopefully fix some crash on some drivers... (ensure aligment 256 bits alignment, and if not use std memcpy)


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5888 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-07 19:53:01 +00:00
ramapcsx2.code
749568f290 It might be a good idea to notify the emulator that the disc changed on a disc swap.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5886 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-07 10:02:53 +00:00
refraction
0403bd8c3c rename Arabic folder, one user suggested it fixed some problem causing PCSX2 to boot. Makes it more uniform so it can't hurt i guess.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5885 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-06 21:57:36 +00:00
refraction
eafadaf15a GSDX: Fix up the GUI that displays during the First Run Wizard
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5884 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-05 22:42:02 +00:00
Asmodean.pcsx2
ea06e2e403 GSdx: Dialog label fix.
Extra rendering threads label text was getting cut off early.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5882 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-05 00:23:02 +00:00
Asmodean.pcsx2
11a15ca58a GSdx: Just tidying up a few last things, to wrap up the AF changes.
Also disabled the gsdx AF options for the OGL renderer (because it's not implemented for that yet). 

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5881 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-04 21:42:43 +00:00
avihal@gmail.com
93cb647091 Games db: normalize (4 missing games name, few places where compat appeared after the hacks section, removed 2 almost duplicate entries (-T at the serial).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5880 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-04 01:43:50 +00:00
Asmodean.pcsx2
42b879e6b8 GSdx: Anisotropic Filtering.
Fixes a small oversight on my part. Which was setting the maximum anisotropy to (0,1,2,3,4) respectively, instead of (1,2,4,8,16). So when you selected x16 for example, you were actually only getting x4 >.>

Corrected now, and you will be getting the full x16 when selected :)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5879 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-03 20:06:00 +00:00
Asmodean.pcsx2
b8f8459275 GSdx: Anisotropic Filtering.
Adds anisotropic texture filtering (1x-16x) to the hardware settings. Enhances the visual quality of textures that are at oblique viewing angles.

Anisotropic filtering is automatically disabled if: 8-bit textures are enabled.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5878 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-03 16:58:11 +00:00
refraction
3bc5779f68 GSDX: Just correcting some typo's
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5875 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-02 22:46:06 +00:00
Asmodean.pcsx2
644f0e61ba GSdx: Store the user selected F7 shader to the ini, as TVShader.
As before: use the hotkey(f7) to switch between them. It will now save the chosen scanline effect, instead of always defaulting to disabled, on load.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5874 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-02 20:40:28 +00:00
refraction
5a8f01edf4 VIF MFIFO: Missed the MFIFO when i did my VIF change in r5843 which would have stopped some games working.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5873 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-02 20:19:54 +00:00
Asmodean.pcsx2
02afca3bb6 GSdx: Just some small post processing cleanup changes, should lower the FXAA compiling time on pause/resumes.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5872 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-02 17:50:32 +00:00
ramapcsx2.code
1fb3d7dd17 Regular version numbering for SVN again. We're at 1.3 now :)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5870 96395faa-99c1-11dd-bbfe-3dabce05a288
2014-02-02 13:56:09 +00:00
3941 changed files with 1102841 additions and 142584 deletions

136
.gitignore vendored Normal file
View File

@@ -0,0 +1,136 @@
.*.swp
.*.swn
.*.swo
*.suo
*.ncb
*.sdf
*.opensdf
*.user
*.log
*.dsp
*.dsw
*.bsc
*.mo
*.trace
*.asm
*.dump
_ReSharper.*
pcsx2.snapshot_*
postBuild.inc.cmd
postBuild.cmd
svnrev.h
build
.DS_Store
Thumbs.db
Debug.txt
install_log.txt
Debug
Release
Devel
oprofile_data/
/BuildLog.htm
/UpgradeLog.XML
/UpgradeLog2.XML
/UpgradeLog3.XML
/bin/pcsx2*
/bin/bios
/bin/dumps
/bin/help
/bin/inis
/bin/logs
/bin/memcards
/bin/plugins
/bin/snaps
/bin/sstates
/deps
/ipch
/nsis/output/
/3rdparty/soundtouch/Win32
/3rdparty/bzip2/Win32
/3rdparty/libjpeg/Win32
/3rdparty/portaudio/portaudio-2.0.pc
/3rdparty/portaudio/bin
/3rdparty/portaudio/bin-*
/3rdparty/portaudio/autom4te.cache
/3rdparty/portaudio/libtool
/3rdparty/portaudio/config.*
/3rdparty/portaudio/lib-stamp
/3rdparty/portaudio/Makefile
/3rdparty/portaudio/build/*
/3rdparty/portaudio/bindings
/3rdparty/portaudio/test
/3rdparty/portaudio/testcvs
/3rdparty/portaudio/build/msvc/Win32
/3rdparty/portaudio/build/msvc/Release (NO ASIO)
/3rdparty/portaudio/build/msvc/x64
/3rdparty/portaudio/src/hostapi/asio/ASIOSDK/common
/3rdparty/portaudio/src/hostapi/asio/ASIOSDK/host
/3rdparty/portaudio/src/hostapi/wasapi/mingw-include
/3rdparty/w32pthreads/Win32
/3rdparty/wxWidgets/deps
/3rdparty/wxWidgets/build/msw/Win32
/3rdparty/wxWidgets/lib/vc_lib/msw/wx/setup.h
/3rdparty/wxWidgets/lib/vc_lib/mswd/wx/setup.h
/3rdparty/wxWidgets/lib/vc_lib/mswd/wx/msw/rcdefs.h
/3rdparty/zlib/Win32
/common/deps
/common/build/Utilities/Win32
/common/build/x86emitter/Win32
/nsis/svnrev_cdvdiso.nsh
/nsis/svnrev_gsdx.nsh
/nsis/svnrev_lilypad.nsh
/nsis/svnrev_pcsx2.nsh
/nsis/svnrev_spu2x.nsh
/nsis/svnrev_zerogs.nsh
/nsis/svnrev_zerospu2.nsh
/nsis/vcredist_x86.exe
/nsis/vcredist_2008_sp1_x86.exe
/nsis/vcredist_2010_x86.exe
/nsis/dxwebsetup.exe
/pcsx2/gui/Resources/Thumbs.db
/pcsx2/gui/Resources/*.h
/pcsx2/windows/VCprojects/Win32
/plugins/CDVDiso/src/Windows/Win32
/plugins/CDVDnull/Windows/Win32
/plugins/CDVDolio/Win32
/plugins/CDVDolio/x64
/plugins/CDVDolio/Template
/plugins/CDVDolio/Debug SSE4
/plugins/FWnull/Windows/Win32
/plugins/GSdx/Win32
/plugins/GSdx/Release SSE2
/plugins/GSdx/x64
/plugins/GSdx/Template
/plugins/GSnull/Windows/Win32
/plugins/LilyPad/Win32
/plugins/LilyPad/x64
/plugins/PadNull/Windows/Win32
/plugins/SSSPSXPAD/Win32
/plugins/USBnull/Windows/Win32
/plugins/USBqemu/Win32/bin
/plugins/USBqemu/Win32/Win32
/plugins/cdvdGigaherz/src/Windows/Win32
/plugins/dev9null/Windows/Win32
/plugins/spu2-x/src/Windows/Win32
/plugins/xpad/Win32
/plugins/xpad/x64
/plugins/xpad/Template
/plugins/zerogs/dx/Windows/Win32
/plugins/zerospu2/Windows/Win32
/plugins/zerospu2/Windows/dsound51.cpp
/plugins/zzogl-pg/opengl/Win32/Win32
/plugins/zzogl-pg-cg/opengl/Win32/Win32
/tools/bin
/tools/GSDumpGUI/bin
/tools/GSDumpGUI/obj

View File

@@ -1,26 +0,0 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="3rdparty"
OutputDirectory="$(SvnRootDir)\deps\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
DeleteExtensionsOnClean="*.bsc;*.idb;*.sbr;*.res;*.pch;*.pdb;*.obj;*.tlb;*.tli;*.tlh;*.tmp;*.rsp;*.pgc;*.pgd;*.meta;$(TargetPath)"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;"
PreprocessorDefinitions="__WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
StructMemberAlignment="5"
EnableFunctionLevelLinking="true"
RuntimeTypeInfo="false"
WarningLevel="3"
DebugInformationFormat="3"
CompileAs="0"
/>
<Tool
Name="VCLinkerTool"
GenerateDebugInformation="true"
SubSystem="2"
/>
</VisualStudioPropertySheet>

View File

@@ -1,30 +0,0 @@
<?xml version="1.0" encoding="windows-1250"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="3rdpartyDLL"
OutputDirectory="$(SvnRootDir)\deps\$(PlatformName)\$(ConfigurationName)"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectDir)&quot;"
PreprocessorDefinitions="__WIN32__;WIN32;_WINDOWS;_CRT_SECURE_NO_WARNINGS;_CRT_SECURE_NO_DEPRECATE"
StructMemberAlignment="5"
RuntimeTypeInfo="false"
WarningLevel="3"
DebugInformationFormat="3"
/>
<Tool
Name="VCLinkerTool"
OutputFile="$(SolutionDir)\bin\$(ProjectName).dll"
LinkIncremental="1"
GenerateDebugInformation="true"
SubSystem="2"
ImportLibrary="$(OutDir)\$(ProjectName).lib"
/>
<Tool
Name="VCResourceCompilerTool"
AdditionalIncludeDirectories="&quot;$(SvnRootDir)/common/include&quot;"
/>
</VisualStudioPropertySheet>

View File

@@ -1,8 +0,0 @@
# Check that people use the good file
if(NOT TOP_CMAKE_WAS_SOURCED)
message(FATAL_ERROR "
You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir.
It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt")
endif(NOT TOP_CMAKE_WAS_SOURCED)
### 3rd party was dropped

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="DefaultProjectRootDir"
>
<UserMacro
Name="ProjectRootDir"
Value="$(ProjectDir)"
/>
<UserMacro
Name="SvnRootDir"
Value="$(ProjectRootDir)\..\.."
/>
</VisualStudioPropertySheet>

View File

@@ -1,67 +0,0 @@
# SoundTouch library
# library name
set(Output pcsx2_SoundTouch)
set(CommonFlags
-march=athlon-xp
-march=prescott
)
set(OptimizationFlags
-Os
-W
)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(${CommonFlags} -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this library
set(SoundTouchSources
AAFilter.cpp
FIFOSampleBuffer.cpp
FIRFilter.cpp
RateTransposer.cpp
SoundTouch.cpp
TDStretch.cpp
# WavFile.cpp # directly include in spu2x
cpu_detect_x86_gcc.cpp
mmx_optimized.cpp
sse_optimized.cpp)
# variable with all headers of this library
set(SoundTouchHeaders
AAFilter.h
BPMDetect.h
FIFOSampleBuffer.h
FIFOSamplePipe.h
FIRFilter.h
RateTransposer.h
STTypes.h
SoundTouch.h
TDStretch.h
# WavFile.h # directly include in spu2x
cpu_detect.h)
# add library
add_library(${Output} STATIC ${SoundTouchSources} ${SoundTouchHeaders})
# User flags options
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

View File

@@ -1,86 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="SoundTouch" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="../../deps/debug/libsoundtouch-dbg" prefix_auto="1" extension_auto="1" />
<Option working_dir="" />
<Option object_output="./.objs/debug" />
<Option type="2" />
<Option compiler="gcc" />
<Option createDefFile="1" />
<Compiler>
<Add option="-g" />
<Add option="-O0" />
</Compiler>
</Target>
<Target title="Devel">
<Option output="../../deps/devel/libsoundtouch-dev" prefix_auto="1" extension_auto="1" />
<Option working_dir="" />
<Option object_output="./.objs/devel" />
<Option type="2" />
<Option compiler="gcc" />
<Option createDefFile="1" />
<Compiler>
<Add option="-O1" />
<Add option="-W" />
<Add option="-g" />
<Add option="-DNDEBUG" />
</Compiler>
</Target>
<Target title="Release">
<Option output="../../deps/libsoundtouch" prefix_auto="1" extension_auto="1" />
<Option working_dir="" />
<Option object_output="./.objs/release" />
<Option type="2" />
<Option compiler="gcc" />
<Option createDefFile="1" />
<Compiler>
<Add option="-fexpensive-optimizations" />
<Add option="-O3" />
<Add option="-W" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-march=athlon-xp" />
<Add option="-march=prescott" />
</Compiler>
<Unit filename="AAFilter.cpp" />
<Unit filename="AAFilter.h" />
<Unit filename="BPMDetect.h" />
<Unit filename="FIFOSampleBuffer.cpp" />
<Unit filename="FIFOSampleBuffer.h" />
<Unit filename="FIFOSamplePipe.h" />
<Unit filename="FIRFilter.cpp" />
<Unit filename="FIRFilter.h" />
<Unit filename="RateTransposer.cpp" />
<Unit filename="RateTransposer.h" />
<Unit filename="STTypes.h" />
<Unit filename="SoundTouch.cpp" />
<Unit filename="SoundTouch.h" />
<Unit filename="TDStretch.cpp" />
<Unit filename="TDStretch.h" />
<Unit filename="WavFile.cpp" />
<Unit filename="WavFile.h" />
<Unit filename="cpu_detect.h" />
<Unit filename="cpu_detect_x86_gcc.cpp" />
<Unit filename="mmx_optimized.cpp" />
<Unit filename="soundtouch_config.h" />
<Unit filename="sse_optimized.cpp" />
<Extensions>
<envvars />
<code_completion />
<lib_finder disable_auto="1" />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>

View File

@@ -1,285 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="SoundTouch"
ProjectGUID="{E9B51944-7E6D-4BCD-83F2-7BBD5A46182D}"
RootNamespace="SoundTouch"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\DefaultProjectRootDir.vsprops;..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
WarningLevel="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\DefaultProjectRootDir.vsprops;..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
WarningLevel="3"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Devel|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\DefaultProjectRootDir.vsprops;..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\3dnow_win.cpp"
>
</File>
<File
RelativePath=".\AAFilter.cpp"
>
</File>
<File
RelativePath=".\cpu_detect_x86_win.cpp"
>
</File>
<File
RelativePath=".\FIFOSampleBuffer.cpp"
>
</File>
<File
RelativePath=".\FIRFilter.cpp"
>
</File>
<File
RelativePath=".\mmx_optimized.cpp"
>
</File>
<File
RelativePath=".\RateTransposer.cpp"
>
</File>
<File
RelativePath=".\SoundTouch.cpp"
>
</File>
<File
RelativePath=".\sse_optimized.cpp"
>
</File>
<File
RelativePath=".\TDStretch.cpp"
>
</File>
<File
RelativePath=".\WavFile.cpp"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\AAFilter.h"
>
</File>
<File
RelativePath=".\BPMDetect.h"
>
</File>
<File
RelativePath=".\cpu_detect.h"
>
</File>
<File
RelativePath=".\FIFOSampleBuffer.h"
>
</File>
<File
RelativePath=".\FIFOSamplePipe.h"
>
</File>
<File
RelativePath=".\FIRFilter.h"
>
</File>
<File
RelativePath=".\RateTransposer.h"
>
</File>
<File
RelativePath=".\SoundTouch.h"
>
</File>
<File
RelativePath=".\STTypes.h"
>
</File>
<File
RelativePath=".\TDStretch.h"
>
</File>
<File
RelativePath=".\WavFile.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1,55 +0,0 @@
# bzip2 library
# library name
set(Output pcsx2_bzip2)
set(CommonFlags
-march=athlon-xp
-march=prescott
)
set(OptimizationFlags
-Os
-W
)
# Debug - Build
if(CMAKE_BUILD_TYPE STREQUAL Debug)
# add defines
add_definitions(${CommonFlags} -g)
endif(CMAKE_BUILD_TYPE STREQUAL Debug)
# Devel - Build
if(CMAKE_BUILD_TYPE STREQUAL Devel)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags} -g)
endif(CMAKE_BUILD_TYPE STREQUAL Devel)
# Release - Build
if(CMAKE_BUILD_TYPE STREQUAL Release)
# add defines
add_definitions(${CommonFlags} ${OptimizationFlags})
endif(CMAKE_BUILD_TYPE STREQUAL Release)
# variable with all sources of this library
set(bzip2Sources
blocksort.c
bzlib.c
compress.c
crctable.c
decompress.c
huffman.c
randtable.c)
# variable with all headers of this library
set(bzip2Headers
bzlib.h
bzlib_private.h)
# add library
add_library(${Output} STATIC ${bzip2Sources} ${bzip2Headers})
# User flags options
if(NOT USER_CMAKE_LD_FLAGS STREQUAL "")
target_link_libraries(${Output} "${USER_CMAKE_LD_FLAGS}")
endif(NOT USER_CMAKE_LD_FLAGS STREQUAL "")

View File

@@ -1,87 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<CodeBlocks_project_file>
<FileVersion major="1" minor="6" />
<Project>
<Option title="bzip2" />
<Option pch_mode="2" />
<Option compiler="gcc" />
<Build>
<Target title="Debug">
<Option output="../../deps/debug/libbzip2" prefix_auto="1" extension_auto="1" />
<Option working_dir="" />
<Option object_output="./.objs/debug" />
<Option type="2" />
<Option compiler="gcc" />
<Option createDefFile="1" />
<Compiler>
<Add option="-g" />
<Add option="-O0" />
</Compiler>
</Target>
<Target title="Devel">
<Option output="../../deps/devel/libbzip2" prefix_auto="1" extension_auto="1" />
<Option working_dir="" />
<Option object_output="./.objs/devel" />
<Option type="2" />
<Option compiler="gcc" />
<Option createDefFile="1" />
<Compiler>
<Add option="-O1" />
<Add option="-W" />
<Add option="-g" />
<Add option="-DNDEBUG" />
</Compiler>
</Target>
<Target title="Release">
<Option output="../../deps/release/libbzip2" prefix_auto="1" extension_auto="1" />
<Option working_dir="" />
<Option object_output="./.objs/release" />
<Option type="2" />
<Option compiler="gcc" />
<Option createDefFile="1" />
<Compiler>
<Add option="-fexpensive-optimizations" />
<Add option="-O3" />
<Add option="-W" />
<Add option="-DNDEBUG" />
</Compiler>
<Linker>
<Add option="-s" />
</Linker>
</Target>
</Build>
<Compiler>
<Add option="-march=athlon-xp" />
<Add option="-march=prescott" />
</Compiler>
<Unit filename="blocksort.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="bzlib.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="bzlib.h" />
<Unit filename="bzlib_private.h" />
<Unit filename="compress.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="crctable.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="decompress.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="huffman.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="randtable.c">
<Option compilerVar="CC" />
</Unit>
<Extensions>
<envvars />
<code_completion />
<lib_finder disable_auto="1" />
<debugger />
</Extensions>
</Project>
</CodeBlocks_project_file>

View File

@@ -1,231 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="bzip2"
ProjectGUID="{F4EB4AB2-C595-4B05-8BC0-059024BC796C}"
RootNamespace="bzip2"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\DefaultProjectRootDir.vsprops;..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\DefaultProjectRootDir.vsprops;..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="2"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Devel|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\DefaultProjectRootDir.vsprops;..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="2"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\blocksort.c"
>
</File>
<File
RelativePath=".\bzlib.c"
>
</File>
<File
RelativePath=".\compress.c"
>
</File>
<File
RelativePath=".\crctable.c"
>
</File>
<File
RelativePath=".\decompress.c"
>
</File>
<File
RelativePath=".\huffman.c"
>
</File>
<File
RelativePath=".\randtable.c"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath=".\bzlib.h"
>
</File>
<File
RelativePath=".\bzlib_private.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1,261 +0,0 @@
// Copyright (c) 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ----
// Author: Craig Silverstein
//
// This is just a very thin wrapper over densehashtable.h, just
// like sgi stl's stl_hash_map is a very thin wrapper over
// stl_hashtable. The major thing we define is operator[], because
// we have a concept of a data_type which stl_hashtable doesn't
// (it only has a key and a value).
//
// NOTE: this is exactly like sparse_hash_map.h, with the word
// "sparse" replaced by "dense", except for the addition of
// set_empty_key().
//
// YOU MUST CALL SET_EMPTY_KEY() IMMEDIATELY AFTER CONSTRUCTION.
//
// Otherwise your program will die in mysterious ways.
//
// In other respects, we adhere mostly to the STL semantics for
// hash-map. One important exception is that insert() invalidates
// iterators entirely. On the plus side, though, erase() doesn't
// invalidate iterators at all, or even change the ordering of elements.
//
// Here are a few "power user" tips:
//
// 1) set_deleted_key():
// If you want to use erase() you must call set_deleted_key(),
// in addition to set_empty_key(), after construction.
// The deleted and empty keys must differ.
//
// 2) resize(0):
// When an item is deleted, its memory isn't freed right
// away. This allows you to iterate over a hashtable,
// and call erase(), without invalidating the iterator.
// To force the memory to be freed, call resize(0).
//
// 3) set_resizing_parameters(0.0, 0.8):
// Setting the shrink_resize_percent to 0.0 guarantees
// that the hash table will never shrink.
//
// Guide to what kind of hash_map to use:
// (1) dense_hash_map: fastest, uses the most memory
// (2) sparse_hash_map: slowest, uses the least memory
// (3) hash_map (STL): in the middle
// Typically I use sparse_hash_map when I care about space and/or when
// I need to save the hashtable on disk. I use hash_map otherwise. I
// don't personally use dense_hash_map ever; the only use of
// dense_hash_map I know of is to work around malloc() bugs in some
// systems (dense_hash_map has a particularly simple allocation scheme).
//
// - dense_hash_map has, typically, a factor of 2 memory overhead (if your
// data takes up X bytes, the hash_map uses X more bytes in overhead).
// - sparse_hash_map has about 2 bits overhead per entry.
// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
// especially, inserts. See time_hash_map.cc for details.
//
// See /usr/(local/)?doc/sparsehash-0.1/dense_hash_map.html
// for information about how to use this class.
#ifndef _DENSE_HASH_MAP_H_
#define _DENSE_HASH_MAP_H_
#include <google/sparsehash/sparseconfig.h>
#include <stdio.h> // for FILE * in read()/write()
#include <algorithm> // for the default template args
#include <functional> // for equal_to
#include <memory> // for alloc<>
#include <utility> // for pair<>
#include HASH_FUN_H // defined in config.h
#include <google/sparsehash/densehashtable.h>
_START_GOOGLE_NAMESPACE_
using STL_NAMESPACE::pair;
template <class Key, class T,
class HashFcn = SPARSEHASH_HASH<Key>, // defined in sparseconfig.h
class EqualKey = STL_NAMESPACE::equal_to<Key>,
class Alloc = STL_NAMESPACE::allocator<T> >
class dense_hash_map {
private:
// Apparently select1st is not stl-standard, so we define our own
struct SelectKey {
const Key& operator()(const pair<const Key, T>& p) const {
return p.first;
}
};
// The actual data
typedef dense_hashtable<pair<const Key, T>, Key, HashFcn,
SelectKey, EqualKey, Alloc> ht;
ht rep;
public:
typedef typename ht::key_type key_type;
typedef T data_type;
typedef T mapped_type;
typedef typename ht::value_type value_type;
typedef typename ht::hasher hasher;
typedef typename ht::key_equal key_equal;
typedef typename ht::size_type size_type;
typedef typename ht::difference_type difference_type;
typedef typename ht::pointer pointer;
typedef typename ht::const_pointer const_pointer;
typedef typename ht::reference reference;
typedef typename ht::const_reference const_reference;
typedef typename ht::iterator iterator;
typedef typename ht::const_iterator const_iterator;
// Iterator functions
iterator begin() { return rep.begin(); }
iterator end() { return rep.end(); }
const_iterator begin() const { return rep.begin(); }
const_iterator end() const { return rep.end(); }
// Accessor functions
hasher hash_funct() const { return rep.hash_funct(); }
key_equal key_eq() const { return rep.key_eq(); }
// Constructors
explicit dense_hash_map(size_type expected_max_items_in_table = 0,
const hasher& hf = hasher(),
const key_equal& eql = key_equal())
: rep(expected_max_items_in_table, hf, eql) { }
template <class InputIterator>
dense_hash_map(InputIterator f, InputIterator l,
size_type expected_max_items_in_table = 0,
const hasher& hf = hasher(),
const key_equal& eql = key_equal())
: rep(expected_max_items_in_table, hf, eql) {
rep.insert(f, l);
}
// We use the default copy constructor
// We use the default operator=()
// We use the default destructor
void clear() { rep.clear(); }
// This clears the hash map without resizing it down to the minimum
// bucket count, but rather keeps the number of buckets constant
void clear_no_resize() { rep.clear_no_resize(); }
void swap(dense_hash_map& hs) { rep.swap(hs.rep); }
// Functions concerning size
size_type size() const { return rep.size(); }
size_type max_size() const { return rep.max_size(); }
bool empty() const { return rep.empty(); }
size_type bucket_count() const { return rep.bucket_count(); }
size_type max_bucket_count() const { return rep.max_bucket_count(); }
void resize(size_type hint) { rep.resize(hint); }
void set_resizing_parameters(float shrink, float grow) {
return rep.set_resizing_parameters(shrink, grow);
}
// Lookup routines
iterator find(const key_type& key) { return rep.find(key); }
const_iterator find(const key_type& key) const { return rep.find(key); }
data_type& operator[](const key_type& key) { // This is our value-add!
iterator it = find(key);
if (it != end()) {
return it->second;
} else {
return insert(value_type(key, data_type())).first->second;
}
}
size_type count(const key_type& key) const { return rep.count(key); }
pair<iterator, iterator> equal_range(const key_type& key) {
return rep.equal_range(key);
}
pair<const_iterator, const_iterator> equal_range(const key_type& key) const {
return rep.equal_range(key);
}
// Insertion routines
pair<iterator, bool> insert(const value_type& obj) { return rep.insert(obj); }
template <class InputIterator>
void insert(InputIterator f, InputIterator l) { rep.insert(f, l); }
void insert(const_iterator f, const_iterator l) { rep.insert(f, l); }
// required for std::insert_iterator; the passed-in iterator is ignored
iterator insert(iterator, const value_type& obj) { return insert(obj).first; }
// Deletion and empty routines
// THESE ARE NON-STANDARD! I make you specify an "impossible" key
// value to identify deleted and empty buckets. You can change the
// deleted key as time goes on, or get rid of it entirely to be insert-only.
void set_empty_key(const key_type& key) { // YOU MUST CALL THIS!
rep.set_empty_key(value_type(key, data_type())); // rep wants a value
}
void set_deleted_key(const key_type& key) {
rep.set_deleted_key(value_type(key, data_type())); // rep wants a value
}
void clear_deleted_key() { rep.clear_deleted_key(); }
// These are standard
size_type erase(const key_type& key) { return rep.erase(key); }
void erase(iterator it) { rep.erase(it); }
void erase(iterator f, iterator l) { rep.erase(f, l); }
// Comparison
bool operator==(const dense_hash_map& hs) const { return rep == hs.rep; }
bool operator!=(const dense_hash_map& hs) const { return rep != hs.rep; }
// I/O -- this is an add-on for writing metainformation to disk
bool write_metadata(FILE *fp) { return rep.write_metadata(fp); }
bool read_metadata(FILE *fp) { return rep.read_metadata(fp); }
bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
bool read_nopointer_data(FILE *fp) { return rep.read_nopointer_data(fp); }
};
// We need a global swap as well
template <class Key, class T, class HashFcn, class EqualKey, class Alloc>
inline void swap(dense_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm1,
dense_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm2) {
hm1.swap(hm2);
}
_END_GOOGLE_NAMESPACE_
#endif /* _DENSE_HASH_MAP_H_ */

View File

@@ -1,245 +0,0 @@
// Copyright (c) 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ---
// Author: Craig Silverstein
//
// This is just a very thin wrapper over densehashtable.h, just
// like sgi stl's stl_hash_set is a very thin wrapper over
// stl_hashtable. The major thing we define is operator[], because
// we have a concept of a data_type which stl_hashtable doesn't
// (it only has a key and a value).
//
// This is more different from dense_hash_map than you might think,
// because all iterators for sets are const (you obviously can't
// change the key, and for sets there is no value).
//
// NOTE: this is exactly like sparse_hash_set.h, with the word
// "sparse" replaced by "dense", except for the addition of
// set_empty_key().
//
// YOU MUST CALL SET_EMPTY_KEY() IMMEDIATELY AFTER CONSTRUCTION.
//
// Otherwise your program will die in mysterious ways.
//
// In other respects, we adhere mostly to the STL semantics for
// hash-set. One important exception is that insert() invalidates
// iterators entirely. On the plus side, though, erase() doesn't
// invalidate iterators at all, or even change the ordering of elements.
//
// Here are a few "power user" tips:
//
// 1) set_deleted_key():
// If you want to use erase() you must call set_deleted_key(),
// in addition to set_empty_key(), after construction.
// The deleted and empty keys must differ.
//
// 2) resize(0):
// When an item is deleted, its memory isn't freed right
// away. This allows you to iterate over a hashtable,
// and call erase(), without invalidating the iterator.
// To force the memory to be freed, call resize(0).
//
// 3) set_resizing_parameters(0.0, 0.8):
// Setting the shrink_resize_percent to 0.0 guarantees
// that the hash table will never shrink.
//
// Guide to what kind of hash_set to use:
// (1) dense_hash_set: fastest, uses the most memory
// (2) sparse_hash_set: slowest, uses the least memory
// (3) hash_set (STL): in the middle
// Typically I use sparse_hash_set when I care about space and/or when
// I need to save the hashtable on disk. I use hash_set otherwise. I
// don't personally use dense_hash_set ever; the only use of
// dense_hash_set I know of is to work around malloc() bugs in some
// systems (dense_hash_set has a particularly simple allocation scheme).
//
// - dense_hash_set has, typically, a factor of 2 memory overhead (if your
// data takes up X bytes, the hash_set uses X more bytes in overhead).
// - sparse_hash_set has about 2 bits overhead per entry.
// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
// especially, inserts. See time_hash_map.cc for details.
//
// See /usr/(local/)?doc/sparsehash-0.1/dense_hash_set.html
// for information about how to use this class.
#ifndef _DENSE_HASH_SET_H_
#define _DENSE_HASH_SET_H_
#include <google/sparsehash/sparseconfig.h>
#include <stdio.h> // for FILE * in read()/write()
#include <algorithm> // for the default template args
#include <functional> // for equal_to
#include <memory> // for alloc<>
#include <utility> // for pair<>
#include HASH_FUN_H // defined in config.h
#include <google/sparsehash/densehashtable.h>
_START_GOOGLE_NAMESPACE_
using STL_NAMESPACE::pair;
template <class Value,
class HashFcn = SPARSEHASH_HASH<Value>, // defined in sparseconfig.h
class EqualKey = STL_NAMESPACE::equal_to<Value>,
class Alloc = STL_NAMESPACE::allocator<Value> >
class dense_hash_set {
private:
// Apparently identity is not stl-standard, so we define our own
struct Identity {
Value& operator()(Value& v) const { return v; }
const Value& operator()(const Value& v) const { return v; }
};
// The actual data
typedef dense_hashtable<Value, Value, HashFcn, Identity, EqualKey, Alloc> ht;
ht rep;
public:
typedef typename ht::key_type key_type;
typedef typename ht::value_type value_type;
typedef typename ht::hasher hasher;
typedef typename ht::key_equal key_equal;
typedef typename ht::size_type size_type;
typedef typename ht::difference_type difference_type;
typedef typename ht::const_pointer pointer;
typedef typename ht::const_pointer const_pointer;
typedef typename ht::const_reference reference;
typedef typename ht::const_reference const_reference;
typedef typename ht::const_iterator iterator;
typedef typename ht::const_iterator const_iterator;
// Iterator functions -- recall all iterators are const
iterator begin() const { return rep.begin(); }
iterator end() const { return rep.end(); }
// Accessor functions
hasher hash_funct() const { return rep.hash_funct(); }
key_equal key_eq() const { return rep.key_eq(); }
// Constructors
explicit dense_hash_set(size_type expected_max_items_in_table = 0,
const hasher& hf = hasher(),
const key_equal& eql = key_equal())
: rep(expected_max_items_in_table, hf, eql) { }
template <class InputIterator>
dense_hash_set(InputIterator f, InputIterator l,
size_type expected_max_items_in_table = 0,
const hasher& hf = hasher(),
const key_equal& eql = key_equal())
: rep(expected_max_items_in_table, hf, eql) {
rep.insert(f, l);
}
// We use the default copy constructor
// We use the default operator=()
// We use the default destructor
void clear() { rep.clear(); }
// This clears the hash set without resizing it down to the minimum
// bucket count, but rather keeps the number of buckets constant
void clear_no_resize() { rep.clear_no_resize(); }
void swap(dense_hash_set& hs) { rep.swap(hs.rep); }
// Functions concerning size
size_type size() const { return rep.size(); }
size_type max_size() const { return rep.max_size(); }
bool empty() const { return rep.empty(); }
size_type bucket_count() const { return rep.bucket_count(); }
size_type max_bucket_count() const { return rep.max_bucket_count(); }
void resize(size_type hint) { rep.resize(hint); }
void set_resizing_parameters(float shrink, float grow) {
return rep.set_resizing_parameters(shrink, grow);
}
// Lookup routines
iterator find(const key_type& key) const { return rep.find(key); }
size_type count(const key_type& key) const { return rep.count(key); }
pair<iterator, iterator> equal_range(const key_type& key) const {
return rep.equal_range(key);
}
// Insertion routines
pair<iterator, bool> insert(const value_type& obj) {
pair<typename ht::iterator, bool> p = rep.insert(obj);
return pair<iterator, bool>(p.first, p.second); // const to non-const
}
template <class InputIterator>
void insert(InputIterator f, InputIterator l) { rep.insert(f, l); }
void insert(const_iterator f, const_iterator l) { rep.insert(f, l); }
// required for std::insert_iterator; the passed-in iterator is ignored
iterator insert(iterator, const value_type& obj) { return insert(obj).first; }
// Deletion and empty routines
// THESE ARE NON-STANDARD! I make you specify an "impossible" key
// value to identify deleted and empty buckets. You can change the
// deleted key as time goes on, or get rid of it entirely to be insert-only.
void set_empty_key(const key_type& key) { rep.set_empty_key(key); }
void set_deleted_key(const key_type& key) { rep.set_deleted_key(key); }
void clear_deleted_key() { rep.clear_deleted_key(); }
// These are standard
size_type erase(const key_type& key) { return rep.erase(key); }
void erase(iterator it) { rep.erase(it); }
void erase(iterator f, iterator l) { rep.erase(f, l); }
// Comparison
bool operator==(const dense_hash_set& hs) const { return rep == hs.rep; }
bool operator!=(const dense_hash_set& hs) const { return rep != hs.rep; }
// I/O -- this is an add-on for writing metainformation to disk
bool write_metadata(FILE *fp) { return rep.write_metadata(fp); }
bool read_metadata(FILE *fp) { return rep.read_metadata(fp); }
bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
bool read_nopointer_data(FILE *fp) { return rep.read_nopointer_data(fp); }
};
template <class Val, class HashFcn, class EqualKey, class Alloc>
inline void swap(dense_hash_set<Val, HashFcn, EqualKey, Alloc>& hs1,
dense_hash_set<Val, HashFcn, EqualKey, Alloc>& hs2) {
hs1.swap(hs2);
}
_END_GOOGLE_NAMESPACE_
#endif /* _DENSE_HASH_SET_H_ */

View File

@@ -1,246 +0,0 @@
// Copyright (c) 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ---
// Author: Craig Silverstein
//
// This is just a very thin wrapper over sparsehashtable.h, just
// like sgi stl's stl_hash_map is a very thin wrapper over
// stl_hashtable. The major thing we define is operator[], because
// we have a concept of a data_type which stl_hashtable doesn't
// (it only has a key and a value).
//
// We adhere mostly to the STL semantics for hash-map. One important
// exception is that insert() invalidates iterators entirely. On the
// plus side, though, delete() doesn't invalidate iterators at all, or
// even change the ordering of elements.
//
// Here are a few "power user" tips:
//
// 1) set_deleted_key():
// Unlike STL's hash_map, if you want to use erase() you
// must call set_deleted_key() after construction.
//
// 2) resize(0):
// When an item is deleted, its memory isn't freed right
// away. This is what allows you to iterate over a hashtable
// and call erase() without invalidating the iterator.
// To force the memory to be freed, call resize(0).
//
// 3) set_resizing_parameters(0.0, 0.8):
// Setting the shrink_resize_percent to 0.0 guarantees
// that the hash table will never shrink.
//
// Guide to what kind of hash_map to use:
// (1) dense_hash_map: fastest, uses the most memory
// (2) sparse_hash_map: slowest, uses the least memory
// (3) hash_map (STL): in the middle
// Typically I use sparse_hash_map when I care about space and/or when
// I need to save the hashtable on disk. I use hash_map otherwise. I
// don't personally use dense_hash_map ever; the only use of
// dense_hash_map I know of is to work around malloc() bugs in some
// systems (dense_hash_map has a particularly simple allocation scheme).
//
// - dense_hash_map has, typically, a factor of 2 memory overhead (if your
// data takes up X bytes, the hash_map uses X more bytes in overhead).
// - sparse_hash_map has about 2 bits overhead per entry.
// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
// especially, inserts. See time_hash_map.cc for details.
//
// See /usr/(local/)?doc/sparsehash-0.1/sparse_hash_map.html
// for information about how to use this class.
#ifndef _SPARSE_HASH_MAP_H_
#define _SPARSE_HASH_MAP_H_
#include <google/sparsehash/sparseconfig.h>
#include <stdio.h> // for FILE * in read()/write()
#include <algorithm> // for the default template args
#include <functional> // for equal_to
#include <memory> // for alloc<>
#include <utility> // for pair<>
#include HASH_FUN_H // defined in config.h
#include <google/sparsehash/sparsehashtable.h>
_START_GOOGLE_NAMESPACE_
using STL_NAMESPACE::pair;
template <class Key, class T,
class HashFcn = SPARSEHASH_HASH<Key>, // defined in sparseconfig.h
class EqualKey = STL_NAMESPACE::equal_to<Key>,
class Alloc = STL_NAMESPACE::allocator<T> >
class sparse_hash_map {
private:
// Apparently select1st is not stl-standard, so we define our own
struct SelectKey {
const Key& operator()(const pair<const Key, T>& p) const {
return p.first;
}
};
// The actual data
typedef sparse_hashtable<pair<const Key, T>, Key, HashFcn,
SelectKey, EqualKey, Alloc> ht;
ht rep;
public:
typedef typename ht::key_type key_type;
typedef T data_type;
typedef T mapped_type;
typedef typename ht::value_type value_type;
typedef typename ht::hasher hasher;
typedef typename ht::key_equal key_equal;
typedef typename ht::size_type size_type;
typedef typename ht::difference_type difference_type;
typedef typename ht::pointer pointer;
typedef typename ht::const_pointer const_pointer;
typedef typename ht::reference reference;
typedef typename ht::const_reference const_reference;
typedef typename ht::iterator iterator;
typedef typename ht::const_iterator const_iterator;
// Iterator functions
iterator begin() { return rep.begin(); }
iterator end() { return rep.end(); }
const_iterator begin() const { return rep.begin(); }
const_iterator end() const { return rep.end(); }
// Accessor functions
hasher hash_funct() const { return rep.hash_funct(); }
key_equal key_eq() const { return rep.key_eq(); }
// Constructors
explicit sparse_hash_map(size_type expected_max_items_in_table = 0,
const hasher& hf = hasher(),
const key_equal& eql = key_equal())
: rep(expected_max_items_in_table, hf, eql) { }
template <class InputIterator>
sparse_hash_map(InputIterator f, InputIterator l,
size_type expected_max_items_in_table = 0,
const hasher& hf = hasher(),
const key_equal& eql = key_equal())
: rep(expected_max_items_in_table, hf, eql) {
rep.insert(f, l);
}
// We use the default copy constructor
// We use the default operator=()
// We use the default destructor
void clear() { rep.clear(); }
void swap(sparse_hash_map& hs) { rep.swap(hs.rep); }
// Functions concerning size
size_type size() const { return rep.size(); }
size_type max_size() const { return rep.max_size(); }
bool empty() const { return rep.empty(); }
size_type bucket_count() const { return rep.bucket_count(); }
size_type max_bucket_count() const { return rep.max_bucket_count(); }
void resize(size_type hint) { rep.resize(hint); }
void set_resizing_parameters(float shrink, float grow) {
return rep.set_resizing_parameters(shrink, grow);
}
// Lookup routines
iterator find(const key_type& key) { return rep.find(key); }
const_iterator find(const key_type& key) const { return rep.find(key); }
data_type& operator[](const key_type& key) { // This is our value-add!
iterator it = find(key);
if (it != end()) {
return it->second;
} else {
return insert(value_type(key, data_type())).first->second;
}
}
size_type count(const key_type& key) const { return rep.count(key); }
pair<iterator, iterator> equal_range(const key_type& key) {
return rep.equal_range(key);
}
pair<const_iterator, const_iterator> equal_range(const key_type& key) const {
return rep.equal_range(key);
}
// Insertion routines
pair<iterator, bool> insert(const value_type& obj) { return rep.insert(obj); }
template <class InputIterator>
void insert(InputIterator f, InputIterator l) { rep.insert(f, l); }
void insert(const_iterator f, const_iterator l) { rep.insert(f, l); }
// required for std::insert_iterator; the passed-in iterator is ignored
iterator insert(iterator, const value_type& obj) { return insert(obj).first; }
// Deletion routines
// THESE ARE NON-STANDARD! I make you specify an "impossible" key
// value to identify deleted buckets. You can change the key as
// time goes on, or get rid of it entirely to be insert-only.
void set_deleted_key(const key_type& key) {
rep.set_deleted_key(value_type(key, data_type())); // rep wants a value
}
void clear_deleted_key() { rep.clear_deleted_key(); }
// These are standard
size_type erase(const key_type& key) { return rep.erase(key); }
void erase(iterator it) { rep.erase(it); }
void erase(iterator f, iterator l) { rep.erase(f, l); }
// Comparison
bool operator==(const sparse_hash_map& hs) const { return rep == hs.rep; }
bool operator!=(const sparse_hash_map& hs) const { return rep != hs.rep; }
// I/O -- this is an add-on for writing metainformation to disk
bool write_metadata(FILE *fp) { return rep.write_metadata(fp); }
bool read_metadata(FILE *fp) { return rep.read_metadata(fp); }
bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
bool read_nopointer_data(FILE *fp) { return rep.read_nopointer_data(fp); }
};
// We need a global swap as well
template <class Key, class T, class HashFcn, class EqualKey, class Alloc>
inline void swap(sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm1,
sparse_hash_map<Key, T, HashFcn, EqualKey, Alloc>& hm2) {
hm1.swap(hm2);
}
_END_GOOGLE_NAMESPACE_
#endif /* _SPARSE_HASH_MAP_H_ */

View File

@@ -1,231 +0,0 @@
// Copyright (c) 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ---
// Author: Craig Silverstein
//
// This is just a very thin wrapper over sparsehashtable.h, just
// like sgi stl's stl_hash_set is a very thin wrapper over
// stl_hashtable. The major thing we define is operator[], because
// we have a concept of a data_type which stl_hashtable doesn't
// (it only has a key and a value).
//
// This is more different from sparse_hash_map than you might think,
// because all iterators for sets are const (you obviously can't
// change the key, and for sets there is no value).
//
// We adhere mostly to the STL semantics for hash-set. One important
// exception is that insert() invalidates iterators entirely. On the
// plus side, though, delete() doesn't invalidate iterators at all, or
// even change the ordering of elements.
//
// Here are a few "power user" tips:
//
// 1) set_deleted_key():
// Unlike STL's hash_map, if you want to use erase() you
// must call set_deleted_key() after construction.
//
// 2) resize(0):
// When an item is deleted, its memory isn't freed right
// away. This allows you to iterate over a hashtable,
// and call erase(), without invalidating the iterator.
// To force the memory to be freed, call resize(0).
//
// 3) set_resizing_parameters(0.0, 0.8):
// Setting the shrink_resize_percent to 0.0 guarantees
// that the hash table will never shrink.
//
// Guide to what kind of hash_set to use:
// (1) dense_hash_set: fastest, uses the most memory
// (2) sparse_hash_set: slowest, uses the least memory
// (3) hash_set (STL): in the middle
// Typically I use sparse_hash_set when I care about space and/or when
// I need to save the hashtable on disk. I use hash_set otherwise. I
// don't personally use dense_hash_set ever; the only use of
// dense_hash_set I know of is to work around malloc() bugs in some
// systems (dense_hash_set has a particularly simple allocation scheme).
//
// - dense_hash_set has, typically, a factor of 2 memory overhead (if your
// data takes up X bytes, the hash_set uses X more bytes in overhead).
// - sparse_hash_set has about 2 bits overhead per entry.
// - sparse_hash_map can be 3-7 times slower than the others for lookup and,
// especially, inserts. See time_hash_map.cc for details.
//
// See /usr/(local/)?doc/sparsehash-0.1/sparse_hash_set.html
// for information about how to use this class.
#ifndef _SPARSE_HASH_SET_H_
#define _SPARSE_HASH_SET_H_
#include <google/sparsehash/sparseconfig.h>
#include <stdio.h> // for FILE * in read()/write()
#include <algorithm> // for the default template args
#include <functional> // for equal_to
#include <memory> // for alloc<>
#include <utility> // for pair<>
#include HASH_FUN_H // defined in config.h
#include <google/sparsehash/sparsehashtable.h>
_START_GOOGLE_NAMESPACE_
using STL_NAMESPACE::pair;
template <class Value,
class HashFcn = SPARSEHASH_HASH<Value>, // defined in sparseconfig.h
class EqualKey = STL_NAMESPACE::equal_to<Value>,
class Alloc = STL_NAMESPACE::allocator<Value> >
class sparse_hash_set {
private:
// Apparently identity is not stl-standard, so we define our own
struct Identity {
Value& operator()(Value& v) const { return v; }
const Value& operator()(const Value& v) const { return v; }
};
// The actual data
typedef sparse_hashtable<Value, Value, HashFcn, Identity, EqualKey, Alloc> ht;
ht rep;
public:
typedef typename ht::key_type key_type;
typedef typename ht::value_type value_type;
typedef typename ht::hasher hasher;
typedef typename ht::key_equal key_equal;
typedef typename ht::size_type size_type;
typedef typename ht::difference_type difference_type;
typedef typename ht::const_pointer pointer;
typedef typename ht::const_pointer const_pointer;
typedef typename ht::const_reference reference;
typedef typename ht::const_reference const_reference;
typedef typename ht::const_iterator iterator;
typedef typename ht::const_iterator const_iterator;
// Iterator functions -- recall all iterators are const
iterator begin() const { return rep.begin(); }
iterator end() const { return rep.end(); }
// Accessor functions
hasher hash_funct() const { return rep.hash_funct(); }
key_equal key_eq() const { return rep.key_eq(); }
// Constructors
explicit sparse_hash_set(size_type expected_max_items_in_table = 0,
const hasher& hf = hasher(),
const key_equal& eql = key_equal())
: rep(expected_max_items_in_table, hf, eql) { }
template <class InputIterator>
sparse_hash_set(InputIterator f, InputIterator l,
size_type expected_max_items_in_table = 0,
const hasher& hf = hasher(),
const key_equal& eql = key_equal())
: rep(expected_max_items_in_table, hf, eql) {
rep.insert(f, l);
}
// We use the default copy constructor
// We use the default operator=()
// We use the default destructor
void clear() { rep.clear(); }
void swap(sparse_hash_set& hs) { rep.swap(hs.rep); }
// Functions concerning size
size_type size() const { return rep.size(); }
size_type max_size() const { return rep.max_size(); }
bool empty() const { return rep.empty(); }
size_type bucket_count() const { return rep.bucket_count(); }
size_type max_bucket_count() const { return rep.max_bucket_count(); }
void resize(size_type hint) { rep.resize(hint); }
void set_resizing_parameters(float shrink, float grow) {
return rep.set_resizing_parameters(shrink, grow);
}
// Lookup routines
iterator find(const key_type& key) const { return rep.find(key); }
size_type count(const key_type& key) const { return rep.count(key); }
pair<iterator, iterator> equal_range(const key_type& key) const {
return rep.equal_range(key);
}
// Insertion routines
pair<iterator, bool> insert(const value_type& obj) {
pair<typename ht::iterator, bool> p = rep.insert(obj);
return pair<iterator, bool>(p.first, p.second); // const to non-const
}
template <class InputIterator>
void insert(InputIterator f, InputIterator l) { rep.insert(f, l); }
void insert(const_iterator f, const_iterator l) { rep.insert(f, l); }
// required for std::insert_iterator; the passed-in iterator is ignored
iterator insert(iterator, const value_type& obj) { return insert(obj).first; }
// Deletion routines
// THESE ARE NON-STANDARD! I make you specify an "impossible" key
// value to identify deleted buckets. You can change the key as
// time goes on, or get rid of it entirely to be insert-only.
void set_deleted_key(const key_type& key) { rep.set_deleted_key(key); }
void clear_deleted_key() { rep.clear_deleted_key(); }
// These are standard
size_type erase(const key_type& key) { return rep.erase(key); }
void erase(iterator it) { rep.erase(it); }
void erase(iterator f, iterator l) { rep.erase(f, l); }
// Comparison
bool operator==(const sparse_hash_set& hs) const { return rep == hs.rep; }
bool operator!=(const sparse_hash_set& hs) const { return rep != hs.rep; }
// I/O -- this is an add-on for writing metainformation to disk
bool write_metadata(FILE *fp) { return rep.write_metadata(fp); }
bool read_metadata(FILE *fp) { return rep.read_metadata(fp); }
bool write_nopointer_data(FILE *fp) { return rep.write_nopointer_data(fp); }
bool read_nopointer_data(FILE *fp) { return rep.read_nopointer_data(fp); }
};
template <class Val, class HashFcn, class EqualKey, class Alloc>
inline void swap(sparse_hash_set<Val, HashFcn, EqualKey, Alloc>& hs1,
sparse_hash_set<Val, HashFcn, EqualKey, Alloc>& hs2) {
hs1.swap(hs2);
}
_END_GOOGLE_NAMESPACE_
#endif /* _SPARSE_HASH_SET_H_ */

View File

@@ -1,986 +0,0 @@
// Copyright (c) 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ---
// Author: Craig Silverstein
//
// A dense hashtable is a particular implementation of
// a hashtable: one that is meant to minimize memory allocation.
// It does this by using an array to store all the data. We
// steal a value from the key space to indicate "empty" array
// elements (ie indices where no item lives) and another to indicate
// "deleted" elements.
//
// (Note it is possible to change the value of the delete key
// on the fly; you can even remove it, though after that point
// the hashtable is insert_only until you set it again. The empty
// value however can't be changed.)
//
// To minimize allocation and pointer overhead, we use internal
// probing, in which the hashtable is a single table, and collisions
// are resolved by trying to insert again in another bucket. The
// most cache-efficient internal probing schemes are linear probing
// (which suffers, alas, from clumping) and quadratic probing, which
// is what we implement by default.
//
// Type requirements: value_type is required to be Copy Constructible
// and Default Constructible. It is not required to be (and commonly
// isn't) Assignable.
//
// You probably shouldn't use this code directly. Use
// <google/dense_hash_map> or <google/dense_hash_set> instead.
// You can change the following below:
// HT_OCCUPANCY_FLT -- how full before we double size
// HT_EMPTY_FLT -- how empty before we halve size
// HT_MIN_BUCKETS -- default smallest bucket size
//
// You can also change enlarge_resize_percent (which defaults to
// HT_OCCUPANCY_FLT), and shrink_resize_percent (which defaults to
// HT_EMPTY_FLT) with set_resizing_parameters().
//
// How to decide what values to use?
// shrink_resize_percent's default of .4 * OCCUPANCY_FLT, is probably good.
// HT_MIN_BUCKETS is probably unnecessary since you can specify
// (indirectly) the starting number of buckets at construct-time.
// For enlarge_resize_percent, you can use this chart to try to trade-off
// expected lookup time to the space taken up. By default, this
// code uses quadratic probing, though you can change it to linear
// via _JUMP below if you really want to.
//
// From http://www.augustana.ca/~mohrj/courses/1999.fall/csc210/lecture_notes/hashing.html
// NUMBER OF PROBES / LOOKUP Successful Unsuccessful
// Quadratic collision resolution 1 - ln(1-L) - L/2 1/(1-L) - L - ln(1-L)
// Linear collision resolution [1+1/(1-L)]/2 [1+1/(1-L)2]/2
//
// -- enlarge_resize_percent -- 0.10 0.50 0.60 0.75 0.80 0.90 0.99
// QUADRATIC COLLISION RES.
// probes/successful lookup 1.05 1.44 1.62 2.01 2.21 2.85 5.11
// probes/unsuccessful lookup 1.11 2.19 2.82 4.64 5.81 11.4 103.6
// LINEAR COLLISION RES.
// probes/successful lookup 1.06 1.5 1.75 2.5 3.0 5.5 50.5
// probes/unsuccessful lookup 1.12 2.5 3.6 8.5 13.0 50.0 5000.0
#ifndef _DENSEHASHTABLE_H_
#define _DENSEHASHTABLE_H_
// The probing method
// Linear probing
// #define JUMP_(key, num_probes) ( 1 )
// Quadratic-ish probing
#define JUMP_(key, num_probes) ( num_probes )
// Hashtable class, used to implement the hashed associative containers
// hash_set and hash_map.
#include <google/sparsehash/sparseconfig.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h> // for abort()
#include <algorithm> // For swap(), eg
#include <iostream> // For cerr
#include <memory> // For uninitialized_fill, uninitialized_copy
#include <utility> // for pair<>
#include <iterator> // for facts about iterator tags
#include <google/type_traits.h> // for true_type, integral_constant, etc.
_START_GOOGLE_NAMESPACE_
using STL_NAMESPACE::pair;
template <class Value, class Key, class HashFcn,
class ExtractKey, class EqualKey, class Alloc>
class dense_hashtable;
template <class V, class K, class HF, class ExK, class EqK, class A>
struct dense_hashtable_iterator;
template <class V, class K, class HF, class ExK, class EqK, class A>
struct dense_hashtable_const_iterator;
// We're just an array, but we need to skip over empty and deleted elements
template <class V, class K, class HF, class ExK, class EqK, class A>
struct dense_hashtable_iterator {
public:
typedef dense_hashtable_iterator<V,K,HF,ExK,EqK,A> iterator;
typedef dense_hashtable_const_iterator<V,K,HF,ExK,EqK,A> const_iterator;
typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
typedef V value_type;
typedef ptrdiff_t difference_type;
typedef size_t size_type;
typedef V& reference; // Value
typedef V* pointer;
// "Real" constructor and default constructor
dense_hashtable_iterator(const dense_hashtable<V,K,HF,ExK,EqK,A> *h,
pointer it, pointer it_end, bool advance)
: ht(h), pos(it), end(it_end) {
if (advance) advance_past_empty_and_deleted();
}
dense_hashtable_iterator() { }
// The default destructor is fine; we don't define one
// The default operator= is fine; we don't define one
// Happy dereferencer
reference operator*() const { return *pos; }
pointer operator->() const { return &(operator*()); }
// Arithmetic. The only hard part is making sure that
// we're not on an empty or marked-deleted array element
void advance_past_empty_and_deleted() {
while ( pos != end && (ht->test_empty(*this) || ht->test_deleted(*this)) )
++pos;
}
iterator& operator++() {
assert(pos != end); ++pos; advance_past_empty_and_deleted(); return *this;
}
iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
// Comparison.
bool operator==(const iterator& it) const { return pos == it.pos; }
bool operator!=(const iterator& it) const { return pos != it.pos; }
// The actual data
const dense_hashtable<V,K,HF,ExK,EqK,A> *ht;
pointer pos, end;
};
// Now do it all again, but with const-ness!
template <class V, class K, class HF, class ExK, class EqK, class A>
struct dense_hashtable_const_iterator {
public:
typedef dense_hashtable_iterator<V,K,HF,ExK,EqK,A> iterator;
typedef dense_hashtable_const_iterator<V,K,HF,ExK,EqK,A> const_iterator;
typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
typedef V value_type;
typedef ptrdiff_t difference_type;
typedef size_t size_type;
typedef const V& reference; // Value
typedef const V* pointer;
// "Real" constructor and default constructor
dense_hashtable_const_iterator(const dense_hashtable<V,K,HF,ExK,EqK,A> *h,
pointer it, pointer it_end, bool advance)
: ht(h), pos(it), end(it_end) {
if (advance) advance_past_empty_and_deleted();
}
dense_hashtable_const_iterator() { }
// This lets us convert regular iterators to const iterators
dense_hashtable_const_iterator(const iterator &it)
: ht(it.ht), pos(it.pos), end(it.end) { }
// The default destructor is fine; we don't define one
// The default operator= is fine; we don't define one
// Happy dereferencer
reference operator*() const { return *pos; }
pointer operator->() const { return &(operator*()); }
// Arithmetic. The only hard part is making sure that
// we're not on an empty or marked-deleted array element
void advance_past_empty_and_deleted() {
while ( pos != end && (ht->test_empty(*this) || ht->test_deleted(*this)) )
++pos;
}
const_iterator& operator++() {
assert(pos != end); ++pos; advance_past_empty_and_deleted(); return *this;
}
const_iterator operator++(int) { const_iterator tmp(*this); ++*this; return tmp; }
// Comparison.
bool operator==(const const_iterator& it) const { return pos == it.pos; }
bool operator!=(const const_iterator& it) const { return pos != it.pos; }
// The actual data
const dense_hashtable<V,K,HF,ExK,EqK,A> *ht;
pointer pos, end;
};
template <class Value, class Key, class HashFcn,
class ExtractKey, class EqualKey, class Alloc>
class dense_hashtable {
public:
typedef Key key_type;
typedef Value value_type;
typedef HashFcn hasher;
typedef EqualKey key_equal;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef value_type* pointer;
typedef const value_type* const_pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef dense_hashtable_iterator<Value, Key, HashFcn,
ExtractKey, EqualKey, Alloc>
iterator;
typedef dense_hashtable_const_iterator<Value, Key, HashFcn,
ExtractKey, EqualKey, Alloc>
const_iterator;
// How full we let the table get before we resize. Knuth says .8 is
// good -- higher causes us to probe too much, though saves memory
static const float HT_OCCUPANCY_FLT; // = 0.8;
// How empty we let the table get before we resize lower.
// (0.0 means never resize lower.)
// It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
static const float HT_EMPTY_FLT; // = 0.4 * HT_OCCUPANCY_FLT
// Minimum size we're willing to let hashtables be.
// Must be a power of two, and at least 4.
// Note, however, that for a given hashtable, the initial size is a
// function of the first constructor arg, and may be >HT_MIN_BUCKETS.
static const size_t HT_MIN_BUCKETS = 4;
// By default, if you don't specify a hashtable size at
// construction-time, we use this size. Must be a power of two, and
// at least HT_MIN_BUCKETS.
static const size_t HT_DEFAULT_STARTING_BUCKETS = 32;
// ITERATOR FUNCTIONS
iterator begin() { return iterator(this, table,
table + num_buckets, true); }
iterator end() { return iterator(this, table + num_buckets,
table + num_buckets, true); }
const_iterator begin() const { return const_iterator(this, table,
table+num_buckets,true);}
const_iterator end() const { return const_iterator(this, table + num_buckets,
table+num_buckets,true);}
// ACCESSOR FUNCTIONS for the things we templatize on, basically
hasher hash_funct() const { return hash; }
key_equal key_eq() const { return equals; }
// Annoyingly, we can't copy values around, because they might have
// const components (they're probably pair<const X, Y>). We use
// explicit destructor invocation and placement new to get around
// this. Arg.
private:
void set_value(value_type* dst, const value_type& src) {
dst->~value_type();
new(dst) value_type(src);
}
void destroy_buckets(size_type first, size_type last) {
for ( ; first != last; ++first)
table[first].~value_type();
}
// DELETE HELPER FUNCTIONS
// This lets the user describe a key that will indicate deleted
// table entries. This key should be an "impossible" entry --
// if you try to insert it for real, you won't be able to retrieve it!
// (NB: while you pass in an entire value, only the key part is looked
// at. This is just because I don't know how to assign just a key.)
private:
void squash_deleted() { // gets rid of any deleted entries we have
if ( num_deleted ) { // get rid of deleted before writing
dense_hashtable tmp(*this); // copying will get rid of deleted
swap(tmp); // now we are tmp
}
assert(num_deleted == 0);
}
public:
void set_deleted_key(const value_type &val) {
// the empty indicator (if specified) and the deleted indicator
// must be different
assert(!use_empty || !equals(get_key(val), get_key(emptyval)));
// It's only safe to change what "deleted" means if we purge deleted guys
squash_deleted();
use_deleted = true;
set_value(&delval, val);
}
void clear_deleted_key() {
squash_deleted();
use_deleted = false;
}
// These are public so the iterators can use them
// True if the item at position bucknum is "deleted" marker
bool test_deleted(size_type bucknum) const {
// The num_deleted test is crucial for read(): after read(), the ht values
// are garbage, and we don't want to think some of them are deleted.
return (use_deleted && num_deleted > 0 &&
equals(get_key(delval), get_key(table[bucknum])));
}
bool test_deleted(const iterator &it) const {
return (use_deleted && num_deleted > 0 &&
equals(get_key(delval), get_key(*it)));
}
bool test_deleted(const const_iterator &it) const {
return (use_deleted && num_deleted > 0 &&
equals(get_key(delval), get_key(*it)));
}
// Set it so test_deleted is true. true if object didn't used to be deleted
// See below (at erase()) to explain why we allow const_iterators
bool set_deleted(const_iterator &it) {
assert(use_deleted); // bad if set_deleted_key() wasn't called
bool retval = !test_deleted(it);
// &* converts from iterator to value-type
set_value(const_cast<value_type*>(&(*it)), delval);
return retval;
}
// Set it so test_deleted is false. true if object used to be deleted
bool clear_deleted(const_iterator &it) {
assert(use_deleted); // bad if set_deleted_key() wasn't called
// happens automatically when we assign something else in its place
return test_deleted(it);
}
// EMPTY HELPER FUNCTIONS
// This lets the user describe a key that will indicate empty (unused)
// table entries. This key should be an "impossible" entry --
// if you try to insert it for real, you won't be able to retrieve it!
// (NB: while you pass in an entire value, only the key part is looked
// at. This is just because I don't know how to assign just a key.)
public:
// These are public so the iterators can use them
// True if the item at position bucknum is "empty" marker
bool test_empty(size_type bucknum) const {
assert(use_empty); // we always need to know what's empty!
return equals(get_key(emptyval), get_key(table[bucknum]));
}
bool test_empty(const iterator &it) const {
assert(use_empty); // we always need to know what's empty!
return equals(get_key(emptyval), get_key(*it));
}
bool test_empty(const const_iterator &it) const {
assert(use_empty); // we always need to know what's empty!
return equals(get_key(emptyval), get_key(*it));
}
private:
// You can either set a range empty or an individual element
void set_empty(size_type bucknum) {
assert(use_empty);
set_value(&table[bucknum], emptyval);
}
void fill_range_with_empty(value_type* table_start, value_type* table_end) {
// Like set_empty(range), but doesn't destroy previous contents
STL_NAMESPACE::uninitialized_fill(table_start, table_end, emptyval);
}
void set_empty(size_type buckstart, size_type buckend) {
assert(use_empty);
destroy_buckets(buckstart, buckend);
fill_range_with_empty(table + buckstart, table + buckend);
}
public:
// TODO(csilvers): change all callers of this to pass in a key instead,
// and take a const key_type instead of const value_type.
void set_empty_key(const value_type &val) {
// Once you set the empty key, you can't change it
assert(!use_empty);
// The deleted indicator (if specified) and the empty indicator
// must be different.
assert(!use_deleted || !equals(get_key(val), get_key(delval)));
use_empty = true;
set_value(&emptyval, val);
assert(!table); // must set before first use
// num_buckets was set in constructor even though table was NULL
table = (value_type *) malloc(num_buckets * sizeof(*table));
assert(table);
fill_range_with_empty(table, table + num_buckets);
}
// FUNCTIONS CONCERNING SIZE
public:
size_type size() const { return num_elements - num_deleted; }
// Buckets are always a power of 2
size_type max_size() const { return (size_type(-1) >> 1U) + 1; }
bool empty() const { return size() == 0; }
size_type bucket_count() const { return num_buckets; }
size_type max_bucket_count() const { return max_size(); }
size_type nonempty_bucket_count() const { return num_elements; }
private:
// Because of the above, size_type(-1) is never legal; use it for errors
static const size_type ILLEGAL_BUCKET = size_type(-1);
private:
// This is the smallest size a hashtable can be without being too crowded
// If you like, you can give a min #buckets as well as a min #elts
size_type min_size(size_type num_elts, size_type min_buckets_wanted) {
size_type sz = HT_MIN_BUCKETS; // min buckets allowed
while ( sz < min_buckets_wanted || num_elts >= sz * enlarge_resize_percent )
sz *= 2;
return sz;
}
// Used after a string of deletes
void maybe_shrink() {
assert(num_elements >= num_deleted);
assert((bucket_count() & (bucket_count()-1)) == 0); // is a power of two
assert(bucket_count() >= HT_MIN_BUCKETS);
// If you construct a hashtable with < HT_DEFAULT_STARTING_BUCKETS,
// we'll never shrink until you get relatively big, and we'll never
// shrink below HT_DEFAULT_STARTING_BUCKETS. Otherwise, something
// like "dense_hash_set<int> x; x.insert(4); x.erase(4);" will
// shrink us down to HT_MIN_BUCKETS buckets, which is too small.
if (shrink_threshold > 0 &&
(num_elements-num_deleted) < shrink_threshold &&
bucket_count() > HT_DEFAULT_STARTING_BUCKETS ) {
size_type sz = bucket_count() / 2; // find how much we should shrink
while ( sz > HT_DEFAULT_STARTING_BUCKETS &&
(num_elements - num_deleted) < sz * shrink_resize_percent )
sz /= 2; // stay a power of 2
dense_hashtable tmp(*this, sz); // Do the actual resizing
swap(tmp); // now we are tmp
}
consider_shrink = false; // because we just considered it
}
// We'll let you resize a hashtable -- though this makes us copy all!
// When you resize, you say, "make it big enough for this many more elements"
void resize_delta(size_type delta) {
if ( consider_shrink ) // see if lots of deletes happened
maybe_shrink();
if ( bucket_count() > HT_MIN_BUCKETS &&
(num_elements + delta) <= enlarge_threshold )
return; // we're ok as we are
// Sometimes, we need to resize just to get rid of all the
// "deleted" buckets that are clogging up the hashtable. So when
// deciding whether to resize, count the deleted buckets (which
// are currently taking up room). But later, when we decide what
// size to resize to, *don't* count deleted buckets, since they
// get discarded during the resize.
const size_type needed_size = min_size(num_elements + delta, 0);
if ( needed_size > bucket_count() ) { // we don't have enough buckets
const size_type resize_to = min_size(num_elements - num_deleted + delta,
0);
dense_hashtable tmp(*this, resize_to);
swap(tmp); // now we are tmp
}
}
// Increase number of buckets, assuming value_type has trivial copy
// constructor and destructor. (Really, we want it to have "trivial
// move", because that's what realloc does. But there's no way to
// capture that using type_traits, so we pretend that move(x, y) is
// equivalent to "x.~T(); new(x) T(y);" which is pretty much
// correct, if a bit conservative.)
void expand_array(size_t resize_to, true_type) {
table = (value_type *) realloc(table, resize_to * sizeof(value_type));
assert(table);
fill_range_with_empty(table + num_buckets, table + resize_to);
}
// Increase number of buckets, without special assumptions about value_type.
// TODO(austern): make this exception safe. Handle exceptions from
// value_type's copy constructor.
void expand_array(size_t resize_to, false_type) {
value_type* new_table =
(value_type *) malloc(resize_to * sizeof(value_type));
assert(new_table);
STL_NAMESPACE::uninitialized_copy(table, table + num_buckets, new_table);
fill_range_with_empty(new_table + num_buckets, new_table + resize_to);
destroy_buckets(0, num_buckets);
free(table);
table = new_table;
}
// Used to actually do the rehashing when we grow/shrink a hashtable
void copy_from(const dense_hashtable &ht, size_type min_buckets_wanted) {
clear(); // clear table, set num_deleted to 0
// If we need to change the size of our table, do it now
const size_type resize_to = min_size(ht.size(), min_buckets_wanted);
if ( resize_to > bucket_count() ) { // we don't have enough buckets
typedef integral_constant<bool,
(has_trivial_copy<value_type>::value &&
has_trivial_destructor<value_type>::value)>
realloc_ok; // we pretend mv(x,y) == "x.~T(); new(x) T(y)"
expand_array(resize_to, realloc_ok());
num_buckets = resize_to;
reset_thresholds();
}
// We use a normal iterator to get non-deleted bcks from ht
// We could use insert() here, but since we know there are
// no duplicates and no deleted items, we can be more efficient
assert((bucket_count() & (bucket_count()-1)) == 0); // a power of two
for ( const_iterator it = ht.begin(); it != ht.end(); ++it ) {
size_type num_probes = 0; // how many times we've probed
size_type bucknum;
const size_type bucket_count_minus_one = bucket_count() - 1;
for (bucknum = hash(get_key(*it)) & bucket_count_minus_one;
!test_empty(bucknum); // not empty
bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one) {
++num_probes;
assert(num_probes < bucket_count()); // or else the hashtable is full
}
set_value(&table[bucknum], *it); // copies the value to here
num_elements++;
}
}
// Required by the spec for hashed associative container
public:
// Though the docs say this should be num_buckets, I think it's much
// more useful as req_elements. As a special feature, calling with
// req_elements==0 will cause us to shrink if we can, saving space.
void resize(size_type req_elements) { // resize to this or larger
if ( consider_shrink || req_elements == 0 )
maybe_shrink();
if ( req_elements > num_elements )
return resize_delta(req_elements - num_elements);
}
// Change the value of shrink_resize_percent and
// enlarge_resize_percent. The description at the beginning of this
// file explains how to choose the values. Setting the shrink
// parameter to 0.0 ensures that the table never shrinks.
void set_resizing_parameters(float shrink, float grow) {
assert(shrink >= 0.0);
assert(grow <= 1.0);
assert(shrink <= grow/2.0);
shrink_resize_percent = shrink;
enlarge_resize_percent = grow;
reset_thresholds();
}
// CONSTRUCTORS -- as required by the specs, we take a size,
// but also let you specify a hashfunction, key comparator,
// and key extractor. We also define a copy constructor and =.
// DESTRUCTOR -- needs to free the table
explicit dense_hashtable(size_type expected_max_items_in_table = 0,
const HashFcn& hf = HashFcn(),
const EqualKey& eql = EqualKey(),
const ExtractKey& ext = ExtractKey())
: hash(hf), equals(eql), get_key(ext), num_deleted(0),
use_deleted(false), use_empty(false),
delval(), emptyval(), enlarge_resize_percent(HT_OCCUPANCY_FLT),
shrink_resize_percent(HT_EMPTY_FLT), table(NULL),
num_buckets(expected_max_items_in_table == 0
? HT_DEFAULT_STARTING_BUCKETS
: min_size(expected_max_items_in_table, 0)),
num_elements(0) {
// table is NULL until emptyval is set. However, we set num_buckets
// here so we know how much space to allocate once emptyval is set
reset_thresholds();
}
// As a convenience for resize(), we allow an optional second argument
// which lets you make this new hashtable a different size than ht
dense_hashtable(const dense_hashtable& ht,
size_type min_buckets_wanted = HT_DEFAULT_STARTING_BUCKETS)
: hash(ht.hash), equals(ht.equals), get_key(ht.get_key), num_deleted(0),
use_deleted(ht.use_deleted), use_empty(ht.use_empty),
delval(ht.delval), emptyval(ht.emptyval),
enlarge_resize_percent(ht.enlarge_resize_percent),
shrink_resize_percent(ht.shrink_resize_percent), table(NULL),
num_buckets(0), num_elements(0) {
reset_thresholds();
copy_from(ht, min_buckets_wanted); // copy_from() ignores deleted entries
}
dense_hashtable& operator= (const dense_hashtable& ht) {
if (&ht == this) return *this; // don't copy onto ourselves
clear();
hash = ht.hash;
equals = ht.equals;
get_key = ht.get_key;
use_deleted = ht.use_deleted;
use_empty = ht.use_empty;
set_value(&delval, ht.delval);
set_value(&emptyval, ht.emptyval);
enlarge_resize_percent = ht.enlarge_resize_percent;
shrink_resize_percent = ht.shrink_resize_percent;
copy_from(ht, HT_MIN_BUCKETS); // sets num_deleted to 0 too
return *this;
}
~dense_hashtable() {
if (table) {
destroy_buckets(0, num_buckets);
free(table);
}
}
// Many STL algorithms use swap instead of copy constructors
void swap(dense_hashtable& ht) {
STL_NAMESPACE::swap(hash, ht.hash);
STL_NAMESPACE::swap(equals, ht.equals);
STL_NAMESPACE::swap(get_key, ht.get_key);
STL_NAMESPACE::swap(num_deleted, ht.num_deleted);
STL_NAMESPACE::swap(use_deleted, ht.use_deleted);
STL_NAMESPACE::swap(use_empty, ht.use_empty);
STL_NAMESPACE::swap(enlarge_resize_percent, ht.enlarge_resize_percent);
STL_NAMESPACE::swap(shrink_resize_percent, ht.shrink_resize_percent);
{ value_type tmp; // for annoying reasons, swap() doesn't work
set_value(&tmp, delval);
set_value(&delval, ht.delval);
set_value(&ht.delval, tmp);
}
{ value_type tmp; // for annoying reasons, swap() doesn't work
set_value(&tmp, emptyval);
set_value(&emptyval, ht.emptyval);
set_value(&ht.emptyval, tmp);
}
STL_NAMESPACE::swap(table, ht.table);
STL_NAMESPACE::swap(num_buckets, ht.num_buckets);
STL_NAMESPACE::swap(num_elements, ht.num_elements);
reset_thresholds();
ht.reset_thresholds();
}
// It's always nice to be able to clear a table without deallocating it
void clear() {
if (table)
destroy_buckets(0, num_buckets);
num_buckets = min_size(0,0); // our new size
reset_thresholds();
table = (value_type *) realloc(table, num_buckets * sizeof(*table));
assert(table);
fill_range_with_empty(table, table + num_buckets);
num_elements = 0;
num_deleted = 0;
}
// Clear the table without resizing it.
// Mimicks the stl_hashtable's behaviour when clear()-ing in that it
// does not modify the bucket count
void clear_no_resize() {
if (table) {
set_empty(0, num_buckets);
}
// don't consider to shrink before another erase()
reset_thresholds();
num_elements = 0;
num_deleted = 0;
}
// LOOKUP ROUTINES
private:
// Returns a pair of positions: 1st where the object is, 2nd where
// it would go if you wanted to insert it. 1st is ILLEGAL_BUCKET
// if object is not found; 2nd is ILLEGAL_BUCKET if it is.
// Note: because of deletions where-to-insert is not trivial: it's the
// first deleted bucket we see, as long as we don't find the key later
pair<size_type, size_type> find_position(const key_type &key) const {
size_type num_probes = 0; // how many times we've probed
const size_type bucket_count_minus_one = bucket_count() - 1;
size_type bucknum = hash(key) & bucket_count_minus_one;
size_type insert_pos = ILLEGAL_BUCKET; // where we would insert
while ( 1 ) { // probe until something happens
if ( test_empty(bucknum) ) { // bucket is empty
if ( insert_pos == ILLEGAL_BUCKET ) // found no prior place to insert
return pair<size_type,size_type>(ILLEGAL_BUCKET, bucknum);
else
return pair<size_type,size_type>(ILLEGAL_BUCKET, insert_pos);
} else if ( test_deleted(bucknum) ) {// keep searching, but mark to insert
if ( insert_pos == ILLEGAL_BUCKET )
insert_pos = bucknum;
} else if ( equals(key, get_key(table[bucknum])) ) {
return pair<size_type,size_type>(bucknum, ILLEGAL_BUCKET);
}
++num_probes; // we're doing another probe
bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one;
assert(num_probes < bucket_count()); // don't probe too many times!
}
}
public:
iterator find(const key_type& key) {
if ( size() == 0 ) return end();
pair<size_type, size_type> pos = find_position(key);
if ( pos.first == ILLEGAL_BUCKET ) // alas, not there
return end();
else
return iterator(this, table + pos.first, table + num_buckets, false);
}
const_iterator find(const key_type& key) const {
if ( size() == 0 ) return end();
pair<size_type, size_type> pos = find_position(key);
if ( pos.first == ILLEGAL_BUCKET ) // alas, not there
return end();
else
return const_iterator(this, table + pos.first, table+num_buckets, false);
}
// Counts how many elements have key key. For maps, it's either 0 or 1.
size_type count(const key_type &key) const {
pair<size_type, size_type> pos = find_position(key);
return pos.first == ILLEGAL_BUCKET ? 0 : 1;
}
// Likewise, equal_range doesn't really make sense for us. Oh well.
pair<iterator,iterator> equal_range(const key_type& key) {
const iterator pos = find(key); // either an iterator or end
return pair<iterator,iterator>(pos, pos);
}
pair<const_iterator,const_iterator> equal_range(const key_type& key) const {
const const_iterator pos = find(key); // either an iterator or end
return pair<iterator,iterator>(pos, pos);
}
// INSERTION ROUTINES
private:
// If you know *this is big enough to hold obj, use this routine
pair<iterator, bool> insert_noresize(const value_type& obj) {
// First, double-check we're not inserting delval or emptyval
assert(!use_empty || !equals(get_key(obj), get_key(emptyval)));
assert(!use_deleted || !equals(get_key(obj), get_key(delval)));
const pair<size_type,size_type> pos = find_position(get_key(obj));
if ( pos.first != ILLEGAL_BUCKET) { // object was already there
return pair<iterator,bool>(iterator(this, table + pos.first,
table + num_buckets, false),
false); // false: we didn't insert
} else { // pos.second says where to put it
if ( test_deleted(pos.second) ) { // just replace if it's been del.
const_iterator delpos(this, table + pos.second, // shrug:
table + num_buckets, false);// shouldn't need const
clear_deleted(delpos);
assert( num_deleted > 0);
--num_deleted; // used to be, now it isn't
} else {
++num_elements; // replacing an empty bucket
}
set_value(&table[pos.second], obj);
return pair<iterator,bool>(iterator(this, table + pos.second,
table + num_buckets, false),
true); // true: we did insert
}
}
public:
// This is the normal insert routine, used by the outside world
pair<iterator, bool> insert(const value_type& obj) {
resize_delta(1); // adding an object, grow if need be
return insert_noresize(obj);
}
// When inserting a lot at a time, we specialize on the type of iterator
template <class InputIterator>
void insert(InputIterator f, InputIterator l) {
// specializes on iterator type
insert(f, l, typename STL_NAMESPACE::iterator_traits<InputIterator>::iterator_category());
}
// Iterator supports operator-, resize before inserting
template <class ForwardIterator>
void insert(ForwardIterator f, ForwardIterator l,
STL_NAMESPACE::forward_iterator_tag) {
size_type n = STL_NAMESPACE::distance(f, l); // TODO(csilvers): standard?
resize_delta(n);
for ( ; n > 0; --n, ++f)
insert_noresize(*f);
}
// Arbitrary iterator, can't tell how much to resize
template <class InputIterator>
void insert(InputIterator f, InputIterator l,
STL_NAMESPACE::input_iterator_tag) {
for ( ; f != l; ++f)
insert(*f);
}
// DELETION ROUTINES
size_type erase(const key_type& key) {
// First, double-check we're not trying to erase delval or emptyval
assert(!use_empty || !equals(key, get_key(emptyval)));
assert(!use_deleted || !equals(key, get_key(delval)));
const_iterator pos = find(key); // shrug: shouldn't need to be const
if ( pos != end() ) {
assert(!test_deleted(pos)); // or find() shouldn't have returned it
set_deleted(pos);
++num_deleted;
consider_shrink = true; // will think about shrink after next insert
return 1; // because we deleted one thing
} else {
return 0; // because we deleted nothing
}
}
// This is really evil: really it should be iterator, not const_iterator.
// But...the only reason keys are const is to allow lookup.
// Since that's a moot issue for deleted keys, we allow const_iterators
void erase(const_iterator pos) {
if ( pos == end() ) return; // sanity check
if ( set_deleted(pos) ) { // true if object has been newly deleted
++num_deleted;
consider_shrink = true; // will think about shrink after next insert
}
}
void erase(const_iterator f, const_iterator l) {
for ( ; f != l; ++f) {
if ( set_deleted(f) ) // should always be true
++num_deleted;
}
consider_shrink = true; // will think about shrink after next insert
}
// COMPARISON
bool operator==(const dense_hashtable& ht) const {
if (size() != ht.size()) {
return false;
} else if (this == &ht) {
return true;
} else {
// Iterate through the elements in "this" and see if the
// corresponding element is in ht
for ( const_iterator it = begin(); it != end(); ++it ) {
const_iterator it2 = ht.find(get_key(*it));
if ((it2 == ht.end()) || (*it != *it2)) {
return false;
}
}
return true;
}
}
bool operator!=(const dense_hashtable& ht) const {
return !(*this == ht);
}
// I/O
// We support reading and writing hashtables to disk. Alas, since
// I don't know how to write a hasher or key_equal, you have to make
// sure everything but the table is the same. We compact before writing
//
// NOTE: These functions are currently TODO. They've not been implemented.
bool write_metadata(FILE *fp) {
squash_deleted(); // so we don't have to worry about delval
return false; // TODO
}
bool read_metadata(FILE *fp) {
num_deleted = 0; // since we got rid before writing
assert(use_empty); // have to set this before calling us
if (table) free(table); // we'll make our own
// TODO: read magic number
// TODO: read num_buckets
reset_thresholds();
table = (value_type *) malloc(num_buckets * sizeof(*table));
assert(table);
fill_range_with_empty(table, table + num_buckets);
// TODO: read num_elements
for ( size_type i = 0; i < num_elements; ++i ) {
// TODO: read bucket_num
// TODO: set with non-empty, non-deleted value
}
return false; // TODO
}
// If your keys and values are simple enough, we can write them to
// disk for you. "simple enough" means value_type is a POD type
// that contains no pointers. However, we don't try to normalize
// endianness
bool write_nopointer_data(FILE *fp) const {
for ( const_iterator it = begin(); it != end(); ++it ) {
// TODO: skip empty/deleted values
if ( !fwrite(&*it, sizeof(*it), 1, fp) ) return false;
}
return false;
}
// When reading, we have to override the potential const-ness of *it
bool read_nopointer_data(FILE *fp) {
for ( iterator it = begin(); it != end(); ++it ) {
// TODO: skip empty/deleted values
if ( !fread(reinterpret_cast<void*>(&(*it)), sizeof(*it), 1, fp) )
return false;
}
return false;
}
private:
// The actual data
hasher hash; // required by hashed_associative_container
key_equal equals;
ExtractKey get_key;
size_type num_deleted; // how many occupied buckets are marked deleted
bool use_deleted; // false until delval has been set
bool use_empty; // you must do this before you start
value_type delval; // which key marks deleted entries
value_type emptyval; // which key marks unused entries
float enlarge_resize_percent; // how full before resize
float shrink_resize_percent; // how empty before resize
size_type shrink_threshold; // num_buckets * shrink_resize_percent
size_type enlarge_threshold; // num_buckets * enlarge_resize_percent
value_type *table;
size_type num_buckets;
size_type num_elements;
bool consider_shrink; // true if we should try to shrink before next insert
void reset_thresholds() {
enlarge_threshold = static_cast<size_type>(num_buckets
* enlarge_resize_percent);
shrink_threshold = static_cast<size_type>(num_buckets
* shrink_resize_percent);
consider_shrink = false; // whatever caused us to reset already considered
}
};
// We need a global swap as well
template <class V, class K, class HF, class ExK, class EqK, class A>
inline void swap(dense_hashtable<V,K,HF,ExK,EqK,A> &x,
dense_hashtable<V,K,HF,ExK,EqK,A> &y) {
x.swap(y);
}
#undef JUMP_
template <class V, class K, class HF, class ExK, class EqK, class A>
const typename dense_hashtable<V,K,HF,ExK,EqK,A>::size_type
dense_hashtable<V,K,HF,ExK,EqK,A>::ILLEGAL_BUCKET;
// How full we let the table get before we resize. Knuth says .8 is
// good -- higher causes us to probe too much, though saves memory
template <class V, class K, class HF, class ExK, class EqK, class A>
const float dense_hashtable<V,K,HF,ExK,EqK,A>::HT_OCCUPANCY_FLT = 0.5f;
// How empty we let the table get before we resize lower.
// It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
template <class V, class K, class HF, class ExK, class EqK, class A>
const float dense_hashtable<V,K,HF,ExK,EqK,A>::HT_EMPTY_FLT = 0.4f *
dense_hashtable<V,K,HF,ExK,EqK,A>::HT_OCCUPANCY_FLT;
_END_GOOGLE_NAMESPACE_
#endif /* _DENSEHASHTABLE_H_ */

View File

@@ -1,74 +0,0 @@
#ifndef SPARSEHASH_SPARSECONFIG_H__
#define SPARSEHASH_SPARSECONFIG_H__
// [AIR] : I couldn't make the google "windows" folder concept work.
// This does, and we only care of GCC and MSVC right now anyway.
#if defined( _MSC_VER )
#define GOOGLE_NAMESPACE google
#define HASH_NAMESPACE stdext
#define HASH_FUN_H <hash_map>
#define SPARSEHASH_HASH HASH_NAMESPACE::hash_compare
#undef HAVE_UINT16_T
#undef HAVE_U_INT16_T
#define HAVE___UINT16 1
#define HAVE_LONG_LONG 1
#define HAVE_SYS_TYPES_H 1
#undef HAVE_STDINT_H
#undef HAVE_INTTYPES_H
#define HAVE_MEMCPY 1
#define STL_NAMESPACE std
#define _END_GOOGLE_NAMESPACE_ }
#define _START_GOOGLE_NAMESPACE_ namespace GOOGLE_NAMESPACE {
#else //if defined( GNUC )
/* Namespace for Google classes */
#define GOOGLE_NAMESPACE google
/* the location of <hash_fun.h>/<stl_hash_fun.h> */
#define HASH_FUN_H <backward/hash_fun.h>
/* the namespace of hash_map/hash_set */
#define HASH_NAMESPACE __gnu_cxx
/* Define to 1 if you have the <inttypes.h> header file. */
#define HAVE_INTTYPES_H 1
/* Define to 1 if the system has the type `long long'. */
#define HAVE_LONG_LONG 1
/* Define to 1 if you have the `memcpy' function. */
#define HAVE_MEMCPY 1
/* Define to 1 if you have the <stdint.h> header file. */
#define HAVE_STDINT_H 1
/* Define to 1 if you have the <sys/types.h> header file. */
#define HAVE_SYS_TYPES_H 1
/* Define to 1 if the system has the type `uint16_t'. */
#define HAVE_UINT16_T 1
/* Define to 1 if the system has the type `u_int16_t'. */
#define HAVE_U_INT16_T 1
/* Define to 1 if the system has the type `__uint16'. */
/* #undef HAVE___UINT16 */
/* The system-provided hash function including the namespace. */
#define SPARSEHASH_HASH HASH_NAMESPACE::hash
/* the namespace where STL code like vector<> is defined */
#define STL_NAMESPACE std
/* Stops putting the code inside the Google namespace */
#define _END_GOOGLE_NAMESPACE_ }
/* Puts following code inside the Google namespace */
#define _START_GOOGLE_NAMESPACE_ namespace google {
#endif
#endif

View File

@@ -1,941 +0,0 @@
// Copyright (c) 2005, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ---
// Author: Craig Silverstein
//
// A sparse hashtable is a particular implementation of
// a hashtable: one that is meant to minimize memory use.
// It does this by using a *sparse table* (cf sparsetable.h),
// which uses between 1 and 2 bits to store empty buckets
// (we may need another bit for hashtables that support deletion).
//
// When empty buckets are so cheap, an appealing hashtable
// implementation is internal probing, in which the hashtable
// is a single table, and collisions are resolved by trying
// to insert again in another bucket. The most cache-efficient
// internal probing schemes are linear probing (which suffers,
// alas, from clumping) and quadratic probing, which is what
// we implement by default.
//
// Deleted buckets are a bit of a pain. We have to somehow mark
// deleted buckets (the probing must distinguish them from empty
// buckets). The most principled way is to have another bitmap,
// but that's annoying and takes up space. Instead we let the
// user specify an "impossible" key. We set deleted buckets
// to have the impossible key.
//
// Note it is possible to change the value of the delete key
// on the fly; you can even remove it, though after that point
// the hashtable is insert_only until you set it again.
//
// You probably shouldn't use this code directly. Use
// <google/sparse_hash_table> or <google/sparse_hash_set> instead.
//
// You can modify the following, below:
// HT_OCCUPANCY_FLT -- how full before we double size
// HT_EMPTY_FLT -- how empty before we halve size
// HT_MIN_BUCKETS -- smallest bucket size
// HT_DEFAULT_STARTING_BUCKETS -- default bucket size at construct-time
//
// You can also change enlarge_resize_percent (which defaults to
// HT_OCCUPANCY_FLT), and shrink_resize_percent (which defaults to
// HT_EMPTY_FLT) with set_resizing_parameters().
//
// How to decide what values to use?
// shrink_resize_percent's default of .4 * OCCUPANCY_FLT, is probably good.
// HT_MIN_BUCKETS is probably unnecessary since you can specify
// (indirectly) the starting number of buckets at construct-time.
// For enlarge_resize_percent, you can use this chart to try to trade-off
// expected lookup time to the space taken up. By default, this
// code uses quadratic probing, though you can change it to linear
// via _JUMP below if you really want to.
//
// From http://www.augustana.ca/~mohrj/courses/1999.fall/csc210/lecture_notes/hashing.html
// NUMBER OF PROBES / LOOKUP Successful Unsuccessful
// Quadratic collision resolution 1 - ln(1-L) - L/2 1/(1-L) - L - ln(1-L)
// Linear collision resolution [1+1/(1-L)]/2 [1+1/(1-L)2]/2
//
// -- enlarge_resize_percent -- 0.10 0.50 0.60 0.75 0.80 0.90 0.99
// QUADRATIC COLLISION RES.
// probes/successful lookup 1.05 1.44 1.62 2.01 2.21 2.85 5.11
// probes/unsuccessful lookup 1.11 2.19 2.82 4.64 5.81 11.4 103.6
// LINEAR COLLISION RES.
// probes/successful lookup 1.06 1.5 1.75 2.5 3.0 5.5 50.5
// probes/unsuccessful lookup 1.12 2.5 3.6 8.5 13.0 50.0 5000.0
//
// The value type is required to be copy constructible and default
// constructible, but it need not be (and commonly isn't) assignable.
#ifndef _SPARSEHASHTABLE_H_
#define _SPARSEHASHTABLE_H_
#ifndef SPARSEHASH_STAT_UPDATE
#define SPARSEHASH_STAT_UPDATE(x) ((void) 0)
#endif
// The probing method
// Linear probing
// #define JUMP_(key, num_probes) ( 1 )
// Quadratic-ish probing
#define JUMP_(key, num_probes) ( num_probes )
// Hashtable class, used to implement the hashed associative containers
// hash_set and hash_map.
#include <google/sparsehash/sparseconfig.h>
#include <assert.h>
#include <algorithm> // For swap(), eg
#include <iterator> // for facts about iterator tags
#include <utility> // for pair<>
#include <google/sparsetable> // Since that's basically what we are
_START_GOOGLE_NAMESPACE_
using STL_NAMESPACE::pair;
// Alloc is completely ignored. It is present as a template parameter only
// for the sake of being compatible with the old SGI hashtable interface.
// TODO(csilvers): is that the right thing to do?
template <class Value, class Key, class HashFcn,
class ExtractKey, class EqualKey, class Alloc>
class sparse_hashtable;
template <class V, class K, class HF, class ExK, class EqK, class A>
struct sparse_hashtable_iterator;
template <class V, class K, class HF, class ExK, class EqK, class A>
struct sparse_hashtable_const_iterator;
// As far as iterating, we're basically just a sparsetable
// that skips over deleted elements.
template <class V, class K, class HF, class ExK, class EqK, class A>
struct sparse_hashtable_iterator {
public:
typedef sparse_hashtable_iterator<V,K,HF,ExK,EqK,A> iterator;
typedef sparse_hashtable_const_iterator<V,K,HF,ExK,EqK,A> const_iterator;
typedef typename sparsetable<V>::nonempty_iterator st_iterator;
typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
typedef V value_type;
typedef ptrdiff_t difference_type;
typedef size_t size_type;
typedef V& reference; // Value
typedef V* pointer;
// "Real" constructor and default constructor
sparse_hashtable_iterator(const sparse_hashtable<V,K,HF,ExK,EqK,A> *h,
st_iterator it, st_iterator it_end)
: ht(h), pos(it), end(it_end) { advance_past_deleted(); }
sparse_hashtable_iterator() { } // not ever used internally
// The default destructor is fine; we don't define one
// The default operator= is fine; we don't define one
// Happy dereferencer
reference operator*() const { return *pos; }
pointer operator->() const { return &(operator*()); }
// Arithmetic. The only hard part is making sure that
// we're not on a marked-deleted array element
void advance_past_deleted() {
while ( pos != end && ht->test_deleted(*this) )
++pos;
}
iterator& operator++() {
assert(pos != end); ++pos; advance_past_deleted(); return *this;
}
iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
// Comparison.
bool operator==(const iterator& it) const { return pos == it.pos; }
bool operator!=(const iterator& it) const { return pos != it.pos; }
// The actual data
const sparse_hashtable<V,K,HF,ExK,EqK,A> *ht;
st_iterator pos, end;
};
// Now do it all again, but with const-ness!
template <class V, class K, class HF, class ExK, class EqK, class A>
struct sparse_hashtable_const_iterator {
public:
typedef sparse_hashtable_iterator<V,K,HF,ExK,EqK,A> iterator;
typedef sparse_hashtable_const_iterator<V,K,HF,ExK,EqK,A> const_iterator;
typedef typename sparsetable<V>::const_nonempty_iterator st_iterator;
typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
typedef V value_type;
typedef ptrdiff_t difference_type;
typedef size_t size_type;
typedef const V& reference; // Value
typedef const V* pointer;
// "Real" constructor and default constructor
sparse_hashtable_const_iterator(const sparse_hashtable<V,K,HF,ExK,EqK,A> *h,
st_iterator it, st_iterator it_end)
: ht(h), pos(it), end(it_end) { advance_past_deleted(); }
// This lets us convert regular iterators to const iterators
sparse_hashtable_const_iterator() { } // never used internally
sparse_hashtable_const_iterator(const iterator &it)
: ht(it.ht), pos(it.pos), end(it.end) { }
// The default destructor is fine; we don't define one
// The default operator= is fine; we don't define one
// Happy dereferencer
reference operator*() const { return *pos; }
pointer operator->() const { return &(operator*()); }
// Arithmetic. The only hard part is making sure that
// we're not on a marked-deleted array element
void advance_past_deleted() {
while ( pos != end && ht->test_deleted(*this) )
++pos;
}
const_iterator& operator++() {
assert(pos != end); ++pos; advance_past_deleted(); return *this;
}
const_iterator operator++(int) { const_iterator tmp(*this); ++*this; return tmp; }
// Comparison.
bool operator==(const const_iterator& it) const { return pos == it.pos; }
bool operator!=(const const_iterator& it) const { return pos != it.pos; }
// The actual data
const sparse_hashtable<V,K,HF,ExK,EqK,A> *ht;
st_iterator pos, end;
};
// And once again, but this time freeing up memory as we iterate
template <class V, class K, class HF, class ExK, class EqK, class A>
struct sparse_hashtable_destructive_iterator {
public:
typedef sparse_hashtable_destructive_iterator<V,K,HF,ExK,EqK,A> iterator;
typedef typename sparsetable<V>::destructive_iterator st_iterator;
typedef STL_NAMESPACE::forward_iterator_tag iterator_category;
typedef V value_type;
typedef ptrdiff_t difference_type;
typedef size_t size_type;
typedef V& reference; // Value
typedef V* pointer;
// "Real" constructor and default constructor
sparse_hashtable_destructive_iterator(const
sparse_hashtable<V,K,HF,ExK,EqK,A> *h,
st_iterator it, st_iterator it_end)
: ht(h), pos(it), end(it_end) { advance_past_deleted(); }
sparse_hashtable_destructive_iterator() { } // never used internally
// The default destructor is fine; we don't define one
// The default operator= is fine; we don't define one
// Happy dereferencer
reference operator*() const { return *pos; }
pointer operator->() const { return &(operator*()); }
// Arithmetic. The only hard part is making sure that
// we're not on a marked-deleted array element
void advance_past_deleted() {
while ( pos != end && ht->test_deleted(*this) )
++pos;
}
iterator& operator++() {
assert(pos != end); ++pos; advance_past_deleted(); return *this;
}
iterator operator++(int) { iterator tmp(*this); ++*this; return tmp; }
// Comparison.
bool operator==(const iterator& it) const { return pos == it.pos; }
bool operator!=(const iterator& it) const { return pos != it.pos; }
// The actual data
const sparse_hashtable<V,K,HF,ExK,EqK,A> *ht;
st_iterator pos, end;
};
template <class Value, class Key, class HashFcn,
class ExtractKey, class EqualKey, class Alloc>
class sparse_hashtable {
public:
typedef Key key_type;
typedef Value value_type;
typedef HashFcn hasher;
typedef EqualKey key_equal;
typedef size_t size_type;
typedef ptrdiff_t difference_type;
typedef value_type* pointer;
typedef const value_type* const_pointer;
typedef value_type& reference;
typedef const value_type& const_reference;
typedef sparse_hashtable_iterator<Value, Key, HashFcn,
ExtractKey, EqualKey, Alloc>
iterator;
typedef sparse_hashtable_const_iterator<Value, Key, HashFcn,
ExtractKey, EqualKey, Alloc>
const_iterator;
typedef sparse_hashtable_destructive_iterator<Value, Key, HashFcn,
ExtractKey, EqualKey, Alloc>
destructive_iterator;
// How full we let the table get before we resize. Knuth says .8 is
// good -- higher causes us to probe too much, though saves memory
static const float HT_OCCUPANCY_FLT; // = 0.8f;
// How empty we let the table get before we resize lower.
// It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
static const float HT_EMPTY_FLT; // = 0.4 * HT_OCCUPANCY_FLT;
// Minimum size we're willing to let hashtables be.
// Must be a power of two, and at least 4.
// Note, however, that for a given hashtable, the minimum size is
// determined by the first constructor arg, and may be >HT_MIN_BUCKETS.
static const size_t HT_MIN_BUCKETS = 4;
// By default, if you don't specify a hashtable size at
// construction-time, we use this size. Must be a power of two, and
// at least HT_MIN_BUCKETS.
static const size_t HT_DEFAULT_STARTING_BUCKETS = 32;
// ITERATOR FUNCTIONS
iterator begin() { return iterator(this, table.nonempty_begin(),
table.nonempty_end()); }
iterator end() { return iterator(this, table.nonempty_end(),
table.nonempty_end()); }
const_iterator begin() const { return const_iterator(this,
table.nonempty_begin(),
table.nonempty_end()); }
const_iterator end() const { return const_iterator(this,
table.nonempty_end(),
table.nonempty_end()); }
// This is used when resizing
destructive_iterator destructive_begin() {
return destructive_iterator(this, table.destructive_begin(),
table.destructive_end());
}
destructive_iterator destructive_end() {
return destructive_iterator(this, table.destructive_end(),
table.destructive_end());
}
// ACCESSOR FUNCTIONS for the things we templatize on, basically
hasher hash_funct() const { return hash; }
key_equal key_eq() const { return equals; }
// We need to copy values when we set the special marker for deleted
// elements, but, annoyingly, we can't just use the copy assignment
// operator because value_type might not be assignable (it's often
// pair<const X, Y>). We use explicit destructor invocation and
// placement new to get around this. Arg.
private:
void set_value(value_type* dst, const value_type src) {
dst->~value_type(); // delete the old value, if any
new(dst) value_type(src);
}
// This is used as a tag for the copy constructor, saying to destroy its
// arg We have two ways of destructively copying: with potentially growing
// the hashtable as we copy, and without. To make sure the outside world
// can't do a destructive copy, we make the typename private.
enum MoveDontCopyT {MoveDontCopy, MoveDontGrow};
// DELETE HELPER FUNCTIONS
// This lets the user describe a key that will indicate deleted
// table entries. This key should be an "impossible" entry --
// if you try to insert it for real, you won't be able to retrieve it!
// (NB: while you pass in an entire value, only the key part is looked
// at. This is just because I don't know how to assign just a key.)
private:
void squash_deleted() { // gets rid of any deleted entries we have
if ( num_deleted ) { // get rid of deleted before writing
sparse_hashtable tmp(MoveDontGrow, *this);
swap(tmp); // now we are tmp
}
assert(num_deleted == 0);
}
public:
void set_deleted_key(const value_type &val) {
// It's only safe to change what "deleted" means if we purge deleted guys
squash_deleted();
use_deleted = true;
set_value(&delval, val); // save the key (and rest of val too)
}
void clear_deleted_key() {
squash_deleted();
use_deleted = false;
}
// These are public so the iterators can use them
// True if the item at position bucknum is "deleted" marker
bool test_deleted(size_type bucknum) const {
// The num_deleted test is crucial for read(): after read(), the ht values
// are garbage, and we don't want to think some of them are deleted.
return (use_deleted && num_deleted > 0 && table.test(bucknum) &&
equals(get_key(delval), get_key(table.get(bucknum))));
}
bool test_deleted(const iterator &it) const {
return (use_deleted && num_deleted > 0 &&
equals(get_key(delval), get_key(*it)));
}
bool test_deleted(const const_iterator &it) const {
return (use_deleted && num_deleted > 0 &&
equals(get_key(delval), get_key(*it)));
}
bool test_deleted(const destructive_iterator &it) const {
return (use_deleted && num_deleted > 0 &&
equals(get_key(delval), get_key(*it)));
}
// Set it so test_deleted is true. true if object didn't used to be deleted
// See below (at erase()) to explain why we allow const_iterators
bool set_deleted(const_iterator &it) {
assert(use_deleted); // bad if set_deleted_key() wasn't called
bool retval = !test_deleted(it);
// &* converts from iterator to value-type
set_value(const_cast<value_type*>(&(*it)), delval);
return retval;
}
// Set it so test_deleted is false. true if object used to be deleted
bool clear_deleted(const_iterator &it) {
assert(use_deleted); // bad if set_deleted_key() wasn't called
// happens automatically when we assign something else in its place
return test_deleted(it);
}
// FUNCTIONS CONCERNING SIZE
size_type size() const { return table.num_nonempty() - num_deleted; }
// Buckets are always a power of 2
size_type max_size() const { return (size_type(-1) >> 1U) + 1; }
bool empty() const { return size() == 0; }
size_type bucket_count() const { return table.size(); }
size_type max_bucket_count() const { return max_size(); }
private:
// Because of the above, size_type(-1) is never legal; use it for errors
static const size_type ILLEGAL_BUCKET = size_type(-1);
private:
// This is the smallest size a hashtable can be without being too crowded
// If you like, you can give a min #buckets as well as a min #elts
size_type min_size(size_type num_elts, size_type min_buckets_wanted) {
size_type sz = HT_MIN_BUCKETS;
while ( sz < min_buckets_wanted || num_elts >= sz * enlarge_resize_percent )
sz *= 2;
return sz;
}
// Used after a string of deletes
void maybe_shrink() {
assert(table.num_nonempty() >= num_deleted);
assert((bucket_count() & (bucket_count()-1)) == 0); // is a power of two
assert(bucket_count() >= HT_MIN_BUCKETS);
// If you construct a hashtable with < HT_DEFAULT_STARTING_BUCKETS,
// we'll never shrink until you get relatively big, and we'll never
// shrink below HT_DEFAULT_STARTING_BUCKETS. Otherwise, something
// like "dense_hash_set<int> x; x.insert(4); x.erase(4);" will
// shrink us down to HT_MIN_BUCKETS buckets, which is too small.
if (shrink_threshold > 0
&& (table.num_nonempty()-num_deleted) < shrink_threshold &&
bucket_count() > HT_DEFAULT_STARTING_BUCKETS ) {
size_type sz = bucket_count() / 2; // find how much we should shrink
while ( sz > HT_DEFAULT_STARTING_BUCKETS &&
(table.num_nonempty() - num_deleted) <= sz *
shrink_resize_percent )
sz /= 2; // stay a power of 2
sparse_hashtable tmp(MoveDontCopy, *this, sz);
swap(tmp); // now we are tmp
}
consider_shrink = false; // because we just considered it
}
// We'll let you resize a hashtable -- though this makes us copy all!
// When you resize, you say, "make it big enough for this many more elements"
void resize_delta(size_type delta) {
if ( consider_shrink ) // see if lots of deletes happened
maybe_shrink();
if ( bucket_count() >= HT_MIN_BUCKETS &&
(table.num_nonempty() + delta) <= enlarge_threshold )
return; // we're ok as we are
// Sometimes, we need to resize just to get rid of all the
// "deleted" buckets that are clogging up the hashtable. So when
// deciding whether to resize, count the deleted buckets (which
// are currently taking up room). But later, when we decide what
// size to resize to, *don't* count deleted buckets, since they
// get discarded during the resize.
const size_type needed_size = min_size(table.num_nonempty() + delta, 0);
if ( needed_size > bucket_count() ) { // we don't have enough buckets
const size_type resize_to = min_size(table.num_nonempty() - num_deleted
+ delta, 0);
sparse_hashtable tmp(MoveDontCopy, *this, resize_to);
swap(tmp); // now we are tmp
}
}
// Used to actually do the rehashing when we grow/shrink a hashtable
void copy_from(const sparse_hashtable &ht, size_type min_buckets_wanted) {
clear(); // clear table, set num_deleted to 0
// If we need to change the size of our table, do it now
const size_type resize_to = min_size(ht.size(), min_buckets_wanted);
if ( resize_to > bucket_count() ) { // we don't have enough buckets
table.resize(resize_to); // sets the number of buckets
reset_thresholds();
}
// We use a normal iterator to get non-deleted bcks from ht
// We could use insert() here, but since we know there are
// no duplicates and no deleted items, we can be more efficient
assert( (bucket_count() & (bucket_count()-1)) == 0); // a power of two
for ( const_iterator it = ht.begin(); it != ht.end(); ++it ) {
size_type num_probes = 0; // how many times we've probed
size_type bucknum;
const size_type bucket_count_minus_one = bucket_count() - 1;
for (bucknum = hash(get_key(*it)) & bucket_count_minus_one;
table.test(bucknum); // not empty
bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one) {
++num_probes;
assert(num_probes < bucket_count()); // or else the hashtable is full
}
table.set(bucknum, *it); // copies the value to here
}
}
// Implementation is like copy_from, but it destroys the table of the
// "from" guy by freeing sparsetable memory as we iterate. This is
// useful in resizing, since we're throwing away the "from" guy anyway.
void move_from(MoveDontCopyT mover, sparse_hashtable &ht,
size_type min_buckets_wanted) {
clear(); // clear table, set num_deleted to 0
// If we need to change the size of our table, do it now
size_t resize_to;
if ( mover == MoveDontGrow )
resize_to = ht.bucket_count(); // keep same size as old ht
else // MoveDontCopy
resize_to = min_size(ht.size(), min_buckets_wanted);
if ( resize_to > bucket_count() ) { // we don't have enough buckets
table.resize(resize_to); // sets the number of buckets
reset_thresholds();
}
// We use a normal iterator to get non-deleted bcks from ht
// We could use insert() here, but since we know there are
// no duplicates and no deleted items, we can be more efficient
assert( (bucket_count() & (bucket_count()-1)) == 0); // a power of two
// THIS IS THE MAJOR LINE THAT DIFFERS FROM COPY_FROM():
for ( destructive_iterator it = ht.destructive_begin();
it != ht.destructive_end(); ++it ) {
size_type num_probes = 0; // how many times we've probed
size_type bucknum;
for ( bucknum = hash(get_key(*it)) & (bucket_count()-1); // h % buck_cnt
table.test(bucknum); // not empty
bucknum = (bucknum + JUMP_(key, num_probes)) & (bucket_count()-1) ) {
++num_probes;
assert(num_probes < bucket_count()); // or else the hashtable is full
}
table.set(bucknum, *it); // copies the value to here
}
}
// Required by the spec for hashed associative container
public:
// Though the docs say this should be num_buckets, I think it's much
// more useful as num_elements. As a special feature, calling with
// req_elements==0 will cause us to shrink if we can, saving space.
void resize(size_type req_elements) { // resize to this or larger
if ( consider_shrink || req_elements == 0 )
maybe_shrink();
if ( req_elements > table.num_nonempty() ) // we only grow
resize_delta(req_elements - table.num_nonempty());
}
// Change the value of shrink_resize_percent and
// enlarge_resize_percent. The description at the beginning of this
// file explains how to choose the values. Setting the shrink
// parameter to 0.0 ensures that the table never shrinks.
void set_resizing_parameters(float shrink, float grow) {
assert(shrink >= 0.0);
assert(grow <= 1.0);
assert(shrink <= grow/2.0);
shrink_resize_percent = shrink;
enlarge_resize_percent = grow;
reset_thresholds();
}
// CONSTRUCTORS -- as required by the specs, we take a size,
// but also let you specify a hashfunction, key comparator,
// and key extractor. We also define a copy constructor and =.
// DESTRUCTOR -- the default is fine, surprisingly.
explicit sparse_hashtable(size_type expected_max_items_in_table = 0,
const HashFcn& hf = HashFcn(),
const EqualKey& eql = EqualKey(),
const ExtractKey& ext = ExtractKey())
: hash(hf), equals(eql), get_key(ext), num_deleted(0), use_deleted(false),
delval(), enlarge_resize_percent(HT_OCCUPANCY_FLT),
shrink_resize_percent(HT_EMPTY_FLT),
table(expected_max_items_in_table == 0
? HT_DEFAULT_STARTING_BUCKETS
: min_size(expected_max_items_in_table, 0)) {
reset_thresholds();
}
// As a convenience for resize(), we allow an optional second argument
// which lets you make this new hashtable a different size than ht.
// We also provide a mechanism of saying you want to "move" the ht argument
// into us instead of copying.
sparse_hashtable(const sparse_hashtable& ht,
size_type min_buckets_wanted = HT_DEFAULT_STARTING_BUCKETS)
: hash(ht.hash), equals(ht.equals), get_key(ht.get_key),
num_deleted(0), use_deleted(ht.use_deleted), delval(ht.delval),
enlarge_resize_percent(ht.enlarge_resize_percent),
shrink_resize_percent(ht.shrink_resize_percent),
table() {
reset_thresholds();
copy_from(ht, min_buckets_wanted); // copy_from() ignores deleted entries
}
sparse_hashtable(MoveDontCopyT mover, sparse_hashtable& ht,
size_type min_buckets_wanted = HT_DEFAULT_STARTING_BUCKETS)
: hash(ht.hash), equals(ht.equals), get_key(ht.get_key),
num_deleted(0), use_deleted(ht.use_deleted), delval(ht.delval),
enlarge_resize_percent(ht.enlarge_resize_percent),
shrink_resize_percent(ht.shrink_resize_percent),
table() {
reset_thresholds();
move_from(mover, ht, min_buckets_wanted); // ignores deleted entries
}
sparse_hashtable& operator= (const sparse_hashtable& ht) {
if (&ht == this) return *this; // don't copy onto ourselves
clear();
hash = ht.hash;
equals = ht.equals;
get_key = ht.get_key;
use_deleted = ht.use_deleted;
set_value(&delval, ht.delval);
copy_from(ht, HT_MIN_BUCKETS); // sets num_deleted to 0 too
return *this;
}
// Many STL algorithms use swap instead of copy constructors
void swap(sparse_hashtable& ht) {
STL_NAMESPACE::swap(hash, ht.hash);
STL_NAMESPACE::swap(equals, ht.equals);
STL_NAMESPACE::swap(get_key, ht.get_key);
STL_NAMESPACE::swap(num_deleted, ht.num_deleted);
STL_NAMESPACE::swap(use_deleted, ht.use_deleted);
STL_NAMESPACE::swap(enlarge_resize_percent, ht.enlarge_resize_percent);
STL_NAMESPACE::swap(shrink_resize_percent, ht.shrink_resize_percent);
{ value_type tmp; // for annoying reasons, swap() doesn't work
set_value(&tmp, delval);
set_value(&delval, ht.delval);
set_value(&ht.delval, tmp);
}
table.swap(ht.table);
reset_thresholds();
ht.reset_thresholds();
}
// It's always nice to be able to clear a table without deallocating it
void clear() {
table.clear();
reset_thresholds();
num_deleted = 0;
}
// LOOKUP ROUTINES
private:
// Returns a pair of positions: 1st where the object is, 2nd where
// it would go if you wanted to insert it. 1st is ILLEGAL_BUCKET
// if object is not found; 2nd is ILLEGAL_BUCKET if it is.
// Note: because of deletions where-to-insert is not trivial: it's the
// first deleted bucket we see, as long as we don't find the key later
pair<size_type, size_type> find_position(const key_type &key) const {
size_type num_probes = 0; // how many times we've probed
const size_type bucket_count_minus_one = bucket_count() - 1;
size_type bucknum = hash(key) & bucket_count_minus_one;
size_type insert_pos = ILLEGAL_BUCKET; // where we would insert
SPARSEHASH_STAT_UPDATE(total_lookups += 1);
while ( 1 ) { // probe until something happens
if ( !table.test(bucknum) ) { // bucket is empty
SPARSEHASH_STAT_UPDATE(total_probes += num_probes);
if ( insert_pos == ILLEGAL_BUCKET ) // found no prior place to insert
return pair<size_type,size_type>(ILLEGAL_BUCKET, bucknum);
else
return pair<size_type,size_type>(ILLEGAL_BUCKET, insert_pos);
} else if ( test_deleted(bucknum) ) {// keep searching, but mark to insert
if ( insert_pos == ILLEGAL_BUCKET )
insert_pos = bucknum;
} else if ( equals(key, get_key(table.get(bucknum))) ) {
SPARSEHASH_STAT_UPDATE(total_probes += num_probes);
return pair<size_type,size_type>(bucknum, ILLEGAL_BUCKET);
}
++num_probes; // we're doing another probe
bucknum = (bucknum + JUMP_(key, num_probes)) & bucket_count_minus_one;
assert(num_probes < bucket_count()); // don't probe too many times!
}
}
public:
iterator find(const key_type& key) {
if ( size() == 0 ) return end();
pair<size_type, size_type> pos = find_position(key);
if ( pos.first == ILLEGAL_BUCKET ) // alas, not there
return end();
else
return iterator(this, table.get_iter(pos.first), table.nonempty_end());
}
const_iterator find(const key_type& key) const {
if ( size() == 0 ) return end();
pair<size_type, size_type> pos = find_position(key);
if ( pos.first == ILLEGAL_BUCKET ) // alas, not there
return end();
else
return const_iterator(this,
table.get_iter(pos.first), table.nonempty_end());
}
// Counts how many elements have key key. For maps, it's either 0 or 1.
size_type count(const key_type &key) const {
pair<size_type, size_type> pos = find_position(key);
return pos.first == ILLEGAL_BUCKET ? 0 : 1;
}
// Likewise, equal_range doesn't really make sense for us. Oh well.
pair<iterator,iterator> equal_range(const key_type& key) {
const iterator pos = find(key); // either an iterator or end
return pair<iterator,iterator>(pos, pos);
}
pair<const_iterator,const_iterator> equal_range(const key_type& key) const {
const const_iterator pos = find(key); // either an iterator or end
return pair<iterator,iterator>(pos, pos);
}
// INSERTION ROUTINES
private:
// If you know *this is big enough to hold obj, use this routine
pair<iterator, bool> insert_noresize(const value_type& obj) {
// First, double-check we're not inserting delval
assert(!use_deleted || !equals(get_key(obj), get_key(delval)));
const pair<size_type,size_type> pos = find_position(get_key(obj));
if ( pos.first != ILLEGAL_BUCKET) { // object was already there
return pair<iterator,bool>(iterator(this, table.get_iter(pos.first),
table.nonempty_end()),
false); // false: we didn't insert
} else { // pos.second says where to put it
if ( test_deleted(pos.second) ) { // just replace if it's been del.
// The set() below will undelete this object. We just worry about stats
assert(num_deleted > 0);
--num_deleted; // used to be, now it isn't
}
table.set(pos.second, obj);
return pair<iterator,bool>(iterator(this, table.get_iter(pos.second),
table.nonempty_end()),
true); // true: we did insert
}
}
public:
// This is the normal insert routine, used by the outside world
pair<iterator, bool> insert(const value_type& obj) {
resize_delta(1); // adding an object, grow if need be
return insert_noresize(obj);
}
// When inserting a lot at a time, we specialize on the type of iterator
template <class InputIterator>
void insert(InputIterator f, InputIterator l) {
// specializes on iterator type
insert(f, l, typename STL_NAMESPACE::iterator_traits<InputIterator>::iterator_category());
}
// Iterator supports operator-, resize before inserting
template <class ForwardIterator>
void insert(ForwardIterator f, ForwardIterator l,
STL_NAMESPACE::forward_iterator_tag) {
size_type n = STL_NAMESPACE::distance(f, l); // TODO(csilvers): standard?
resize_delta(n);
for ( ; n > 0; --n, ++f)
insert_noresize(*f);
}
// Arbitrary iterator, can't tell how much to resize
template <class InputIterator>
void insert(InputIterator f, InputIterator l,
STL_NAMESPACE::input_iterator_tag) {
for ( ; f != l; ++f)
insert(*f);
}
// DELETION ROUTINES
size_type erase(const key_type& key) {
// First, double-check we're not erasing delval
assert(!use_deleted || !equals(key, get_key(delval)));
const_iterator pos = find(key); // shrug: shouldn't need to be const
if ( pos != end() ) {
assert(!test_deleted(pos)); // or find() shouldn't have returned it
set_deleted(pos);
++num_deleted;
consider_shrink = true; // will think about shrink after next insert
return 1; // because we deleted one thing
} else {
return 0; // because we deleted nothing
}
}
// This is really evil: really it should be iterator, not const_iterator.
// But...the only reason keys are const is to allow lookup.
// Since that's a moot issue for deleted keys, we allow const_iterators
void erase(const_iterator pos) {
if ( pos == end() ) return; // sanity check
if ( set_deleted(pos) ) { // true if object has been newly deleted
++num_deleted;
consider_shrink = true; // will think about shrink after next insert
}
}
void erase(const_iterator f, const_iterator l) {
for ( ; f != l; ++f) {
if ( set_deleted(f) ) // should always be true
++num_deleted;
}
consider_shrink = true; // will think about shrink after next insert
}
// COMPARISON
bool operator==(const sparse_hashtable& ht) const {
// We really want to check that the hash functions are the same
// but alas there's no way to do this. We just hope.
return ( num_deleted == ht.num_deleted && table == ht.table );
}
bool operator!=(const sparse_hashtable& ht) const {
return !(*this == ht);
}
// I/O
// We support reading and writing hashtables to disk. NOTE that
// this only stores the hashtable metadata, not the stuff you've
// actually put in the hashtable! Alas, since I don't know how to
// write a hasher or key_equal, you have to make sure everything
// but the table is the same. We compact before writing.
bool write_metadata(FILE *fp) {
squash_deleted(); // so we don't have to worry about delkey
return table.write_metadata(fp);
}
bool read_metadata(FILE *fp) {
num_deleted = 0; // since we got rid before writing
bool result = table.read_metadata(fp);
reset_thresholds();
return result;
}
// Only meaningful if value_type is a POD.
bool write_nopointer_data(FILE *fp) {
return table.write_nopointer_data(fp);
}
// Only meaningful if value_type is a POD.
bool read_nopointer_data(FILE *fp) {
return table.read_nopointer_data(fp);
}
private:
// The actual data
hasher hash; // required by hashed_associative_container
key_equal equals;
ExtractKey get_key;
size_type num_deleted; // how many occupied buckets are marked deleted
bool use_deleted; // false until delval has been set
value_type delval; // which key marks deleted entries
float enlarge_resize_percent; // how full before resize
float shrink_resize_percent; // how empty before resize
size_type shrink_threshold; // table.size() * shrink_resize_percent
size_type enlarge_threshold; // table.size() * enlarge_resize_percent
sparsetable<value_type> table; // holds num_buckets and num_elements too
bool consider_shrink; // true if we should try to shrink before next insert
void reset_thresholds() {
enlarge_threshold = static_cast<size_type>(table.size()
* enlarge_resize_percent);
shrink_threshold = static_cast<size_type>(table.size()
* shrink_resize_percent);
consider_shrink = false; // whatever caused us to reset already considered
}
};
// We need a global swap as well
template <class V, class K, class HF, class ExK, class EqK, class A>
inline void swap(sparse_hashtable<V,K,HF,ExK,EqK,A> &x,
sparse_hashtable<V,K,HF,ExK,EqK,A> &y) {
x.swap(y);
}
#undef JUMP_
template <class V, class K, class HF, class ExK, class EqK, class A>
const typename sparse_hashtable<V,K,HF,ExK,EqK,A>::size_type
sparse_hashtable<V,K,HF,ExK,EqK,A>::ILLEGAL_BUCKET;
// How full we let the table get before we resize. Knuth says .8 is
// good -- higher causes us to probe too much, though saves memory
template <class V, class K, class HF, class ExK, class EqK, class A>
const float sparse_hashtable<V,K,HF,ExK,EqK,A>::HT_OCCUPANCY_FLT = 0.8f;
// How empty we let the table get before we resize lower.
// It should be less than OCCUPANCY_FLT / 2 or we thrash resizing
template <class V, class K, class HF, class ExK, class EqK, class A>
const float sparse_hashtable<V,K,HF,ExK,EqK,A>::HT_EMPTY_FLT = 0.4f *
sparse_hashtable<V,K,HF,ExK,EqK,A>::HT_OCCUPANCY_FLT;
_END_GOOGLE_NAMESPACE_
#endif /* _SPARSEHASHTABLE_H_ */

File diff suppressed because it is too large Load Diff

View File

@@ -1,250 +0,0 @@
// Copyright (c) 2006, Google Inc.
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the names of its
// contributors may be used to endorse or promote products derived from
// this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ----
// Author: Matt Austern
//
// Define a small subset of tr1 type traits. The traits we define are:
// is_integral
// is_floating_point
// is_pointer
// is_reference
// is_pod
// has_trivial_constructor
// has_trivial_copy
// has_trivial_assign
// has_trivial_destructor
// remove_const
// remove_volatile
// remove_cv
// remove_reference
// remove_pointer
// is_convertible
// We can add more type traits as required.
#ifndef BASE_TYPE_TRAITS_H_
#define BASE_TYPE_TRAITS_H_
#include <google/sparsehash/sparseconfig.h>
#include <utility> // For pair
_START_GOOGLE_NAMESPACE_
// integral_constant, defined in tr1, is a wrapper for an integer
// value. We don't really need this generality; we could get away
// with hardcoding the integer type to bool. We use the fully
// general integer_constant for compatibility with tr1.
template<class T, T v>
struct integral_constant {
static const T value = v;
typedef T value_type;
typedef integral_constant<T, v> type;
};
template <class T, T v> const T integral_constant<T, v>::value;
// Abbreviations: true_type and false_type are structs that represent
// boolean true and false values.
typedef integral_constant<bool, true> true_type;
typedef integral_constant<bool, false> false_type;
// Types small_ and big_ are guaranteed such that sizeof(small_) <
// sizeof(big_)
typedef char small_;
struct big_ {
char dummy[2];
};
// is_integral is false except for the built-in integer types.
template <class T> struct is_integral : false_type { };
template<> struct is_integral<bool> : true_type { };
template<> struct is_integral<char> : true_type { };
template<> struct is_integral<unsigned char> : true_type { };
template<> struct is_integral<signed char> : true_type { };
#if defined(_MSC_VER)
// wchar_t is not by default a distinct type from unsigned short in
// Microsoft C.
// See http://msdn2.microsoft.com/en-us/library/dh8che7s(VS.80).aspx
template<> struct is_integral<__wchar_t> : true_type { };
#else
template<> struct is_integral<wchar_t> : true_type { };
#endif
template<> struct is_integral<short> : true_type { };
template<> struct is_integral<unsigned short> : true_type { };
template<> struct is_integral<int> : true_type { };
template<> struct is_integral<unsigned int> : true_type { };
template<> struct is_integral<long> : true_type { };
template<> struct is_integral<unsigned long> : true_type { };
#ifdef HAVE_LONG_LONG
template<> struct is_integral<long long> : true_type { };
template<> struct is_integral<unsigned long long> : true_type { };
#endif
// is_floating_point is false except for the built-in floating-point types.
template <class T> struct is_floating_point : false_type { };
template<> struct is_floating_point<float> : true_type { };
template<> struct is_floating_point<double> : true_type { };
template<> struct is_floating_point<long double> : true_type { };
// is_pointer is false except for pointer types.
template <class T> struct is_pointer : false_type { };
template <class T> struct is_pointer<T*> : true_type { };
// is_reference is false except for reference types.
template<typename T> struct is_reference : false_type {};
template<typename T> struct is_reference<T&> : true_type {};
// We can't get is_pod right without compiler help, so fail conservatively.
// We will assume it's false except for arithmetic types and pointers,
// and const versions thereof. Note that std::pair is not a POD.
template <class T> struct is_pod
: integral_constant<bool, (is_integral<T>::value ||
is_floating_point<T>::value ||
is_pointer<T>::value)> { };
template <class T> struct is_pod<const T> : is_pod<T> { };
// We can't get has_trivial_constructor right without compiler help, so
// fail conservatively. We will assume it's false except for: (1) types
// for which is_pod is true. (2) std::pair of types with trivial
// constructors. (3) array of a type with a trivial constructor.
// (4) const versions thereof.
template <class T> struct has_trivial_constructor : is_pod<T> { };
template <class T, class U> struct has_trivial_constructor<std::pair<T, U> >
: integral_constant<bool,
(has_trivial_constructor<T>::value &&
has_trivial_constructor<U>::value)> { };
template <class A, int N> struct has_trivial_constructor<A[N]>
: has_trivial_constructor<A> { };
template <class T> struct has_trivial_constructor<const T>
: has_trivial_constructor<T> { };
// We can't get has_trivial_copy right without compiler help, so fail
// conservatively. We will assume it's false except for: (1) types
// for which is_pod is true. (2) std::pair of types with trivial copy
// constructors. (3) array of a type with a trivial copy constructor.
// (4) const versions thereof.
template <class T> struct has_trivial_copy : is_pod<T> { };
template <class T, class U> struct has_trivial_copy<std::pair<T, U> >
: integral_constant<bool,
(has_trivial_copy<T>::value &&
has_trivial_copy<U>::value)> { };
template <class A, int N> struct has_trivial_copy<A[N]>
: has_trivial_copy<A> { };
template <class T> struct has_trivial_copy<const T> : has_trivial_copy<T> { };
// We can't get has_trivial_assign right without compiler help, so fail
// conservatively. We will assume it's false except for: (1) types
// for which is_pod is true. (2) std::pair of types with trivial copy
// constructors. (3) array of a type with a trivial assign constructor.
template <class T> struct has_trivial_assign : is_pod<T> { };
template <class T, class U> struct has_trivial_assign<std::pair<T, U> >
: integral_constant<bool,
(has_trivial_assign<T>::value &&
has_trivial_assign<U>::value)> { };
template <class A, int N> struct has_trivial_assign<A[N]>
: has_trivial_assign<A> { };
// We can't get has_trivial_destructor right without compiler help, so
// fail conservatively. We will assume it's false except for: (1) types
// for which is_pod is true. (2) std::pair of types with trivial
// destructors. (3) array of a type with a trivial destructor.
// (4) const versions thereof.
template <class T> struct has_trivial_destructor : is_pod<T> { };
template <class T, class U> struct has_trivial_destructor<std::pair<T, U> >
: integral_constant<bool,
(has_trivial_destructor<T>::value &&
has_trivial_destructor<U>::value)> { };
template <class A, int N> struct has_trivial_destructor<A[N]>
: has_trivial_destructor<A> { };
template <class T> struct has_trivial_destructor<const T>
: has_trivial_destructor<T> { };
// Specified by TR1 [4.7.1]
template<typename T> struct remove_const { typedef T type; };
template<typename T> struct remove_const<T const> { typedef T type; };
template<typename T> struct remove_volatile { typedef T type; };
template<typename T> struct remove_volatile<T volatile> { typedef T type; };
template<typename T> struct remove_cv {
typedef typename remove_const<typename remove_volatile<T>::type>::type type;
};
// Specified by TR1 [4.7.2]
template<typename T> struct remove_reference { typedef T type; };
template<typename T> struct remove_reference<T&> { typedef T type; };
// Specified by TR1 [4.7.4] Pointer modifications.
template<typename T> struct remove_pointer { typedef T type; };
template<typename T> struct remove_pointer<T*> { typedef T type; };
template<typename T> struct remove_pointer<T* const> { typedef T type; };
template<typename T> struct remove_pointer<T* volatile> { typedef T type; };
template<typename T> struct remove_pointer<T* const volatile> {
typedef T type; };
// Specified by TR1 [4.6] Relationships between types
#ifndef _MSC_VER
namespace internal {
// This class is an implementation detail for is_convertible, and you
// don't need to know how it works to use is_convertible. For those
// who care: we declare two different functions, one whose argument is
// of type To and one with a variadic argument list. We give them
// return types of different size, so we can use sizeof to trick the
// compiler into telling us which function it would have chosen if we
// had called it with an argument of type From. See Alexandrescu's
// _Modern C++ Design_ for more details on this sort of trick.
template <typename From, typename To>
struct ConvertHelper {
static small_ Test(To);
static big_ Test(...);
static From Create();
};
} // namespace internal
// Inherits from true_type if From is convertible to To, false_type otherwise.
template <typename From, typename To>
struct is_convertible
: integral_constant<bool,
sizeof(internal::ConvertHelper<From, To>::Test(
internal::ConvertHelper<From, To>::Create()))
== sizeof(small_)> {
};
#endif
_END_GOOGLE_NAMESPACE_
#endif // BASE_TYPE_TRAITS_H_

View File

@@ -1,442 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="libjpeg7"
ProjectGUID="{BC236261-77E8-4567-8D09-45CD02965EB6}"
RootNamespace="libjpeg"
Keyword="Win32Proj"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
<DefaultToolFile
FileName="masm.rules"
/>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\DefaultProjectRootDir.vsprops;..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\DefaultProjectRootDir.vsprops;..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Release.vsprops"
CharacterSet="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
WholeProgramOptimization="false"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Devel|Win32"
ConfigurationType="4"
InheritedPropertySheets="..\DefaultProjectRootDir.vsprops;..\3rdparty.vsprops;..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\common\vsprops\IncrementalLinking.vsprops"
CharacterSet="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="MASM"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
<File
RelativePath=".\jaricom.c"
>
</File>
<File
RelativePath=".\jcapimin.c"
>
</File>
<File
RelativePath=".\jcapistd.c"
>
</File>
<File
RelativePath=".\jcarith.c"
>
</File>
<File
RelativePath=".\jccoefct.c"
>
</File>
<File
RelativePath=".\jccolor.c"
>
</File>
<File
RelativePath=".\jcdctmgr.c"
>
</File>
<File
RelativePath=".\jchuff.c"
>
</File>
<File
RelativePath=".\jcinit.c"
>
</File>
<File
RelativePath=".\jcmainct.c"
>
</File>
<File
RelativePath=".\jcmarker.c"
>
</File>
<File
RelativePath=".\jcmaster.c"
>
</File>
<File
RelativePath=".\jcomapi.c"
>
</File>
<File
RelativePath=".\jconfig.h"
>
</File>
<File
RelativePath=".\jcparam.c"
>
</File>
<File
RelativePath=".\jcprepct.c"
>
</File>
<File
RelativePath=".\jcsample.c"
>
</File>
<File
RelativePath=".\jctrans.c"
>
</File>
<File
RelativePath=".\jdapimin.c"
>
</File>
<File
RelativePath=".\jdapistd.c"
>
</File>
<File
RelativePath=".\jdarith.c"
>
</File>
<File
RelativePath=".\jdatadst.c"
>
</File>
<File
RelativePath=".\jdatasrc.c"
>
</File>
<File
RelativePath=".\jdcoefct.c"
>
</File>
<File
RelativePath=".\jdcolor.c"
>
</File>
<File
RelativePath=".\jdct.h"
>
</File>
<File
RelativePath=".\jddctmgr.c"
>
</File>
<File
RelativePath=".\jdhuff.c"
>
</File>
<File
RelativePath=".\jdinput.c"
>
</File>
<File
RelativePath=".\jdmainct.c"
>
</File>
<File
RelativePath=".\jdmarker.c"
>
</File>
<File
RelativePath=".\jdmaster.c"
>
</File>
<File
RelativePath=".\jdmerge.c"
>
</File>
<File
RelativePath=".\jdpostct.c"
>
</File>
<File
RelativePath=".\jdsample.c"
>
</File>
<File
RelativePath=".\jdtrans.c"
>
</File>
<File
RelativePath=".\jerror.c"
>
</File>
<File
RelativePath=".\jerror.h"
>
</File>
<File
RelativePath=".\jfdctflt.c"
>
</File>
<File
RelativePath=".\jfdctfst.c"
>
</File>
<File
RelativePath=".\jfdctint.c"
>
</File>
<File
RelativePath=".\jidctflt.c"
>
</File>
<File
RelativePath=".\jidctfst.c"
>
</File>
<File
RelativePath=".\jidctint.c"
>
</File>
<File
RelativePath=".\jinclude.h"
>
</File>
<File
RelativePath=".\jmemansi.c"
>
</File>
<File
RelativePath=".\jmemmgr.c"
>
</File>
<File
RelativePath=".\jmemsys.h"
>
</File>
<File
RelativePath=".\jmorecfg.h"
>
</File>
<File
RelativePath=".\jpegint.h"
>
</File>
<File
RelativePath=".\jpeglib.h"
>
</File>
<File
RelativePath=".\jquant1.c"
>
</File>
<File
RelativePath=".\jquant2.c"
>
</File>
<File
RelativePath=".\jutils.c"
>
</File>
<File
RelativePath=".\jversion.h"
>
</File>
</Filter>
<File
RelativePath=".\change.log"
>
</File>
<File
RelativePath=".\filelist.txt"
>
</File>
<File
RelativePath=".\README"
>
</File>
<File
RelativePath=".\readme.pcsx2.txt"
>
</File>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

1383
3rdparty/opencl/CL/cl.h vendored Normal file

File diff suppressed because it is too large Load Diff

12456
3rdparty/opencl/CL/cl.hpp vendored Normal file

File diff suppressed because it is too large Load Diff

126
3rdparty/opencl/CL/cl_d3d10.h vendored Normal file
View File

@@ -0,0 +1,126 @@
/**********************************************************************************
* Copyright (c) 2008-2013 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
**********************************************************************************/
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
#ifndef __OPENCL_CL_D3D10_H
#define __OPENCL_CL_D3D10_H
#include <d3d10.h>
#include <CL/cl.h>
#include <CL/cl_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************
* cl_khr_d3d10_sharing */
#define cl_khr_d3d10_sharing 1
typedef cl_uint cl_d3d10_device_source_khr;
typedef cl_uint cl_d3d10_device_set_khr;
/******************************************************************************/
/* Error Codes */
#define CL_INVALID_D3D10_DEVICE_KHR -1002
#define CL_INVALID_D3D10_RESOURCE_KHR -1003
#define CL_D3D10_RESOURCE_ALREADY_ACQUIRED_KHR -1004
#define CL_D3D10_RESOURCE_NOT_ACQUIRED_KHR -1005
/* cl_d3d10_device_source_nv */
#define CL_D3D10_DEVICE_KHR 0x4010
#define CL_D3D10_DXGI_ADAPTER_KHR 0x4011
/* cl_d3d10_device_set_nv */
#define CL_PREFERRED_DEVICES_FOR_D3D10_KHR 0x4012
#define CL_ALL_DEVICES_FOR_D3D10_KHR 0x4013
/* cl_context_info */
#define CL_CONTEXT_D3D10_DEVICE_KHR 0x4014
#define CL_CONTEXT_D3D10_PREFER_SHARED_RESOURCES_KHR 0x402C
/* cl_mem_info */
#define CL_MEM_D3D10_RESOURCE_KHR 0x4015
/* cl_image_info */
#define CL_IMAGE_D3D10_SUBRESOURCE_KHR 0x4016
/* cl_command_type */
#define CL_COMMAND_ACQUIRE_D3D10_OBJECTS_KHR 0x4017
#define CL_COMMAND_RELEASE_D3D10_OBJECTS_KHR 0x4018
/******************************************************************************/
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D10KHR_fn)(
cl_platform_id platform,
cl_d3d10_device_source_khr d3d_device_source,
void * d3d_object,
cl_d3d10_device_set_khr d3d_device_set,
cl_uint num_entries,
cl_device_id * devices,
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10BufferKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Buffer * resource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture2DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Texture2D * resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D10Texture3DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D10Texture3D * resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D10ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D10ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_0;
#ifdef __cplusplus
}
#endif
#endif /* __OPENCL_CL_D3D10_H */

132
3rdparty/opencl/CL/cl_d3d11.h vendored Normal file
View File

@@ -0,0 +1,132 @@
/**********************************************************************************
* Copyright (c) 2008-2013 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
**********************************************************************************/
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
#ifndef __OPENCL_CL_D3D11_H
#define __OPENCL_CL_D3D11_H
#include <d3d11.h>
#include <CL/cl.h>
#include <CL/cl_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************
* cl_khr_d3d11_sharing */
#define cl_khr_d3d11_sharing 1
typedef cl_uint cl_d3d11_device_source_khr;
typedef cl_uint cl_d3d11_device_set_khr;
/******************************************************************************/
/* Error Codes */
#define CL_INVALID_D3D11_DEVICE_KHR -1006
#define CL_INVALID_D3D11_RESOURCE_KHR -1007
#define CL_D3D11_RESOURCE_ALREADY_ACQUIRED_KHR -1008
#define CL_D3D11_RESOURCE_NOT_ACQUIRED_KHR -1009
/* cl_d3d11_device_source */
#define CL_D3D11_DEVICE_KHR 0x4019
#define CL_D3D11_DXGI_ADAPTER_KHR 0x401A
/* cl_d3d11_device_set */
#define CL_PREFERRED_DEVICES_FOR_D3D11_KHR 0x401B
#define CL_ALL_DEVICES_FOR_D3D11_KHR 0x401C
/* cl_context_info */
#define CL_CONTEXT_D3D11_DEVICE_KHR 0x401D
#define CL_CONTEXT_D3D11_PREFER_SHARED_RESOURCES_KHR 0x402D
/* cl_mem_info */
#define CL_MEM_D3D11_RESOURCE_KHR 0x401E
/* cl_image_info */
#define CL_IMAGE_D3D11_SUBRESOURCE_KHR 0x401F
/* cl_command_type */
#define CL_COMMAND_ACQUIRE_D3D11_OBJECTS_KHR 0x4020
#define CL_COMMAND_RELEASE_D3D11_OBJECTS_KHR 0x4021
// object types
#define CL_D3D11_OBJECT_BUFFER 0x3000
#define CL_D3D11_OBJECT_TEXTURE2D 0x3001
#define CL_D3D11_OBJECT_TEXTURE3D 0x3003
/******************************************************************************/
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D11KHR_fn)(
cl_platform_id platform,
cl_d3d11_device_source_khr d3d_device_source,
void * d3d_object,
cl_d3d11_device_set_khr d3d_device_set,
cl_uint num_entries,
cl_device_id * devices,
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11BufferKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D11Buffer * resource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture2DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D11Texture2D * resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D11Texture3DKHR_fn)(
cl_context context,
cl_mem_flags flags,
ID3D11Texture3D * resource,
UINT subresource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D11ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D11ObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
#ifdef __cplusplus
}
#endif
#endif /* __OPENCL_CL_D3D11_H */

331
3rdparty/opencl/CL/cl_d3d9.h vendored Normal file
View File

@@ -0,0 +1,331 @@
/**********************************************************************************
* Copyright (c) 2008-2013 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
**********************************************************************************/
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
#ifndef __OPENCL_CL_D3D9_H
#define __OPENCL_CL_D3D9_H
#include <CL/cl.h>
#include <CL/cl_platform.h>
#ifdef __cplusplus
extern "C" {
#endif
/******************************************************************************/
/* cl_khr_dx9_media_sharing */
#define cl_khr_dx9_media_sharing 1
typedef cl_uint cl_dx9_media_adapter_type_khr;
typedef cl_uint cl_dx9_media_adapter_set_khr;
#if defined(_WIN32)
#include <d3d9.h>
typedef struct _cl_dx9_surface_info_khr
{
IDirect3DSurface9 *resource;
HANDLE shared_handle;
} cl_dx9_surface_info_khr;
#endif
/******************************************************************************/
/* Error Codes */
#define CL_INVALID_DX9_MEDIA_ADAPTER_KHR -1010
#define CL_INVALID_DX9_MEDIA_SURFACE_KHR -1011
#define CL_DX9_MEDIA_SURFACE_ALREADY_ACQUIRED_KHR -1012
#define CL_DX9_MEDIA_SURFACE_NOT_ACQUIRED_KHR -1013
/* cl_media_adapter_type_khr */
#define CL_ADAPTER_D3D9_KHR 0x2020
#define CL_ADAPTER_D3D9EX_KHR 0x2021
#define CL_ADAPTER_DXVA_KHR 0x2022
/* cl_media_adapter_set_khr */
#define CL_PREFERRED_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2023
#define CL_ALL_DEVICES_FOR_DX9_MEDIA_ADAPTER_KHR 0x2024
/* cl_context_info */
#define CL_CONTEXT_ADAPTER_D3D9_KHR 0x2025
#define CL_CONTEXT_ADAPTER_D3D9EX_KHR 0x2026
#define CL_CONTEXT_ADAPTER_DXVA_KHR 0x2027
/* cl_mem_info */
#define CL_MEM_DX9_MEDIA_ADAPTER_TYPE_KHR 0x2028
#define CL_MEM_DX9_MEDIA_SURFACE_INFO_KHR 0x2029
/* cl_image_info */
#define CL_IMAGE_DX9_MEDIA_PLANE_KHR 0x202A
/* cl_command_type */
#define CL_COMMAND_ACQUIRE_DX9_MEDIA_SURFACES_KHR 0x202B
#define CL_COMMAND_RELEASE_DX9_MEDIA_SURFACES_KHR 0x202C
/******************************************************************************/
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromDX9MediaAdapterKHR_fn)(
cl_platform_id platform,
cl_uint num_media_adapters,
cl_dx9_media_adapter_type_khr * media_adapter_type,
void * media_adapters[],
cl_dx9_media_adapter_set_khr media_adapter_set,
cl_uint num_entries,
cl_device_id * devices,
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceKHR_fn)(
cl_context context,
cl_mem_flags flags,
cl_dx9_media_adapter_type_khr adapter_type,
void * surface_info,
cl_uint plane,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9MediaSurfacesKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9MediaSurfacesKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event) CL_API_SUFFIX__VERSION_1_2;
#if defined CL_DX9_MEDIA_SHARING_INTEL_EXT
#ifndef _WIN32
#include <d3d9.h>
#endif
#include <d3d9.h>
#include <dxvahd.h>
#include <wtypes.h>
#include <d3d9types.h>
/******************************************************************************/
/* cl_intel_dx9_media_sharing extension */
#define cl_intel_dx9_media_sharing 1
typedef cl_uint cl_dx9_device_source_intel;
typedef cl_uint cl_dx9_device_set_intel;
/******************************************************************************/
// Error Codes
#define CL_INVALID_DX9_DEVICE_INTEL -1010
#define CL_INVALID_DX9_RESOURCE_INTEL -1011
#define CL_DX9_RESOURCE_ALREADY_ACQUIRED_INTEL -1012
#define CL_DX9_RESOURCE_NOT_ACQUIRED_INTEL -1013
// cl_dx9_device_source_intel
#define CL_D3D9_DEVICE_INTEL 0x4022
#define CL_D3D9EX_DEVICE_INTEL 0x4070
#define CL_DXVA_DEVICE_INTEL 0x4071
// cl_dx9_device_set_intel
#define CL_PREFERRED_DEVICES_FOR_DX9_INTEL 0x4024
#define CL_ALL_DEVICES_FOR_DX9_INTEL 0x4025
// cl_context_info
#define CL_CONTEXT_D3D9_DEVICE_INTEL 0x4026
#define CL_CONTEXT_D3D9EX_DEVICE_INTEL 0x4072
#define CL_CONTEXT_DXVA_DEVICE_INTEL 0x4073
// cl_mem_info
#define CL_MEM_DX9_RESOURCE_INTEL 0x4027
#define CL_MEM_DX9_SHARED_HANDLE_INTEL 0x4074
// cl_image_info
#define CL_IMAGE_DX9_PLANE_INTEL 0x4075
// cl_command_type
#define CL_COMMAND_ACQUIRE_DX9_OBJECTS_INTEL 0x402A
#define CL_COMMAND_RELEASE_DX9_OBJECTS_INTEL 0x402B
//packed YUV channel order
#define CL_YUYV_INTEL 0x4076
#define CL_UYVY_INTEL 0x4077
#define CL_YVYU_INTEL 0x4078
#define CL_VYUY_INTEL 0x4079
/******************************************************************************/
typedef CL_API_ENTRY cl_int (CL_API_CALL* clGetDeviceIDsFromDX9INTEL_fn)(
cl_platform_id /*platform*/,
cl_dx9_device_source_intel /*dx9_device_source*/,
void* /*dx9_object*/,
cl_dx9_device_set_intel /*dx9_device_set*/,
cl_uint /*num_entries*/,
cl_device_id* /*devices*/,
cl_uint* /*num_devices*/);
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromDX9MediaSurfaceINTEL_fn)(
cl_context /*context*/,
cl_mem_flags /*flags*/,
IDirect3DSurface9 * /*resource*/,
HANDLE /*sharedHandle*/,
UINT /*plane*/,
cl_int * /*errcode_ret*/);
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireDX9ObjectsINTEL_fn)(
cl_command_queue /*command_queue*/,
cl_uint /*num_objects*/,
const cl_mem * /*mem_objects*/,
cl_uint /*num_events_in_wait_list*/,
const cl_event * /*event_wait_list*/,
cl_event * /*event*/);
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseDX9ObjectsINTEL_fn)(
cl_command_queue /*command_queue*/,
cl_uint /*num_objects*/,
cl_mem * /*mem_objects*/,
cl_uint /*num_events_in_wait_list*/,
const cl_event * /*event_wait_list*/,
cl_event * /*event*/);
#endif // CL_DX9_MEDIA_SHARING_INTEL_EXT
#if defined CL_DX9_MEDIA_SHARING_NV_EXT
#ifndef _WIN32
#include <d3d9.h>
#endif
/******************************************************************************
* cl_nv_d3d9_sharing */
typedef cl_uint cl_d3d9_device_source_nv;
typedef cl_uint cl_d3d9_device_set_nv;
/******************************************************************************/
// Error Codes
#define CL_INVALID_D3D9_DEVICE_NV -1010
#define CL_INVALID_D3D9_RESOURCE_NV -1011
#define CL_D3D9_RESOURCE_ALREADY_ACQUIRED_NV -1012
#define CL_D3D9_RESOURCE_NOT_ACQUIRED_NV -1013
// cl_d3d9_device_source_nv
#define CL_D3D9_DEVICE_NV 0x4022
#define CL_D3D9_ADAPTER_NAME_NV 0x4023
// cl_d3d9_device_set_nv
#define CL_PREFERRED_DEVICES_FOR_D3D9_NV 0x4024
#define CL_ALL_DEVICES_FOR_D3D9_NV 0x4025
// cl_context_info
#define CL_CONTEXT_D3D9_DEVICE_NV 0x4026
// cl_mem_info
#define CL_MEM_D3D9_RESOURCE_NV 0x4027
// cl_image_info
#define CL_IMAGE_D3D9_FACE_NV 0x4028
#define CL_IMAGE_D3D9_LEVEL_NV 0x4029
// cl_command_type
#define CL_COMMAND_ACQUIRE_D3D9_OBJECTS_NV 0x402A
#define CL_COMMAND_RELEASE_D3D9_OBJECTS_NV 0x402B
/******************************************************************************/
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetDeviceIDsFromD3D9NV_fn)(
cl_platform_id platform,
cl_d3d9_device_source_nv d3d_device_source,
void * d3d_object,
cl_d3d9_device_set_nv d3d_device_set,
cl_uint num_entries,
cl_device_id * devices,
cl_uint * num_devices) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D9VertexBufferNV_fn)(
cl_context context,
cl_mem_flags flags,
IDirect3DVertexBuffer9 * resource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D9IndexBufferNV_fn)(
cl_context context,
cl_mem_flags flags,
IDirect3DIndexBuffer9 * resource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D9SurfaceNV_fn)(
cl_context context,
cl_mem_flags flags,
IDirect3DSurface9 * resource,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D9TextureNV_fn)(
cl_context context,
cl_mem_flags flags,
IDirect3DTexture9 *resource,
UINT miplevel,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D9CubeTextureNV_fn)(
cl_context context,
cl_mem_flags flags,
IDirect3DCubeTexture9 * resource,
D3DCUBEMAP_FACES facetype,
UINT miplevel,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromD3D9VolumeTextureNV_fn)(
cl_context context,
cl_mem_flags flags,
IDirect3DVolumeTexture9 * resource,
UINT miplevel,
cl_int * errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireD3D9ObjectsNV_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseD3D9ObjectsNV_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
cl_mem *mem_objects,
cl_uint num_events_in_wait_list,
const cl_event *event_wait_list,
cl_event *event) CL_API_SUFFIX__VERSION_1_0;
#endif // CL_DX9_MEDIA_SHARING_NV_EXT
#ifdef __cplusplus
}
#endif
#endif /* __OPENCL_CL_DX9_MEDIA_SHARING_H */

133
3rdparty/opencl/CL/cl_egl.h vendored Normal file
View File

@@ -0,0 +1,133 @@
/*******************************************************************************
* Copyright (c) 2008-2010 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
******************************************************************************/
#ifndef __OPENCL_CL_EGL_H
#define __OPENCL_CL_EGL_H
#ifdef __APPLE__
#else
#include <CL/cl.h>
#include <EGL/egl.h>
#include <EGL/eglext.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Command type for events created with clEnqueueAcquireEGLObjectsKHR */
#define CL_COMMAND_EGL_FENCE_SYNC_OBJECT_KHR 0x202F
#define CL_COMMAND_ACQUIRE_EGL_OBJECTS_KHR 0x202D
#define CL_COMMAND_RELEASE_EGL_OBJECTS_KHR 0x202E
/* Error type for clCreateFromEGLImageKHR */
#define CL_INVALID_EGL_OBJECT_KHR -1093
#define CL_EGL_RESOURCE_NOT_ACQUIRED_KHR -1092
/* CLeglImageKHR is an opaque handle to an EGLImage */
typedef void* CLeglImageKHR;
/* CLeglDisplayKHR is an opaque handle to an EGLDisplay */
typedef void* CLeglDisplayKHR;
/* CLeglSyncKHR is an opaque handle to an EGLSync object */
typedef void* CLeglSyncKHR;
/* properties passed to clCreateFromEGLImageKHR */
typedef intptr_t cl_egl_image_properties_khr;
#define cl_khr_egl_image 1
extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromEGLImageKHR(cl_context /* context */,
CLeglDisplayKHR /* egldisplay */,
CLeglImageKHR /* eglimage */,
cl_mem_flags /* flags */,
const cl_egl_image_properties_khr * /* properties */,
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_mem (CL_API_CALL *clCreateFromEGLImageKHR_fn)(
cl_context context,
CLeglDisplayKHR egldisplay,
CLeglImageKHR eglimage,
cl_mem_flags flags,
const cl_egl_image_properties_khr * properties,
cl_int * errcode_ret);
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueAcquireEGLObjectsKHR(cl_command_queue /* command_queue */,
cl_uint /* num_objects */,
const cl_mem * /* mem_objects */,
cl_uint /* num_events_in_wait_list */,
const cl_event * /* event_wait_list */,
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueAcquireEGLObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event);
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReleaseEGLObjectsKHR(cl_command_queue /* command_queue */,
cl_uint /* num_objects */,
const cl_mem * /* mem_objects */,
cl_uint /* num_events_in_wait_list */,
const cl_event * /* event_wait_list */,
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clEnqueueReleaseEGLObjectsKHR_fn)(
cl_command_queue command_queue,
cl_uint num_objects,
const cl_mem * mem_objects,
cl_uint num_events_in_wait_list,
const cl_event * event_wait_list,
cl_event * event);
#define cl_khr_egl_event 1
extern CL_API_ENTRY cl_event CL_API_CALL
clCreateEventFromEGLSyncKHR(cl_context /* context */,
CLeglSyncKHR /* sync */,
CLeglDisplayKHR /* display */,
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_event (CL_API_CALL *clCreateEventFromEGLSyncKHR_fn)(
cl_context context,
CLeglSyncKHR sync,
CLeglDisplayKHR display,
cl_int * errcode_ret);
#ifdef __cplusplus
}
#endif
#endif /* __OPENCL_CL_EGL_H */

458
3rdparty/opencl/CL/cl_ext.h vendored Normal file
View File

@@ -0,0 +1,458 @@
/*******************************************************************************
* Copyright (c) 2008-2013 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
******************************************************************************/
/* $Revision: 11928 $ on $Date: 2010-07-13 09:04:56 -0700 (Tue, 13 Jul 2010) $ */
/* cl_ext.h contains OpenCL extensions which don't have external */
/* (OpenGL, D3D) dependencies. */
#ifndef __CL_EXT_H
#define __CL_EXT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __APPLE__
#include <OpenCL/cl.h>
#include <AvailabilityMacros.h>
#else
#include <CL/cl.h>
#endif
/* cl_khr_fp16 extension - no extension #define since it has no functions */
#define CL_DEVICE_HALF_FP_CONFIG 0x1033
/* Memory object destruction
*
* Apple extension for use to manage externally allocated buffers used with cl_mem objects with CL_MEM_USE_HOST_PTR
*
* Registers a user callback function that will be called when the memory object is deleted and its resources
* freed. Each call to clSetMemObjectCallbackFn registers the specified user callback function on a callback
* stack associated with memobj. The registered user callback functions are called in the reverse order in
* which they were registered. The user callback functions are called and then the memory object is deleted
* and its resources freed. This provides a mechanism for the application (and libraries) using memobj to be
* notified when the memory referenced by host_ptr, specified when the memory object is created and used as
* the storage bits for the memory object, can be reused or freed.
*
* The application may not call CL api's with the cl_mem object passed to the pfn_notify.
*
* Please check for the "cl_APPLE_SetMemObjectDestructor" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
* before using.
*/
#define cl_APPLE_SetMemObjectDestructor 1
cl_int CL_API_ENTRY clSetMemObjectDestructorAPPLE( cl_mem /* memobj */,
void (* /*pfn_notify*/)( cl_mem /* memobj */, void* /*user_data*/),
void * /*user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
/* Context Logging Functions
*
* The next three convenience functions are intended to be used as the pfn_notify parameter to clCreateContext().
* Please check for the "cl_APPLE_ContextLoggingFunctions" extension using clGetDeviceInfo(CL_DEVICE_EXTENSIONS)
* before using.
*
* clLogMessagesToSystemLog fowards on all log messages to the Apple System Logger
*/
#define cl_APPLE_ContextLoggingFunctions 1
extern void CL_API_ENTRY clLogMessagesToSystemLogAPPLE( const char * /* errstr */,
const void * /* private_info */,
size_t /* cb */,
void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
/* clLogMessagesToStdout sends all log messages to the file descriptor stdout */
extern void CL_API_ENTRY clLogMessagesToStdoutAPPLE( const char * /* errstr */,
const void * /* private_info */,
size_t /* cb */,
void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
/* clLogMessagesToStderr sends all log messages to the file descriptor stderr */
extern void CL_API_ENTRY clLogMessagesToStderrAPPLE( const char * /* errstr */,
const void * /* private_info */,
size_t /* cb */,
void * /* user_data */ ) CL_EXT_SUFFIX__VERSION_1_0;
/************************
* cl_khr_icd extension *
************************/
#define cl_khr_icd 1
/* cl_platform_info */
#define CL_PLATFORM_ICD_SUFFIX_KHR 0x0920
/* Additional Error Codes */
#define CL_PLATFORM_NOT_FOUND_KHR -1001
extern CL_API_ENTRY cl_int CL_API_CALL
clIcdGetPlatformIDsKHR(cl_uint /* num_entries */,
cl_platform_id * /* platforms */,
cl_uint * /* num_platforms */);
typedef CL_API_ENTRY cl_int (CL_API_CALL *clIcdGetPlatformIDsKHR_fn)(
cl_uint /* num_entries */,
cl_platform_id * /* platforms */,
cl_uint * /* num_platforms */);
/* Extension: cl_khr_image2D_buffer
*
* This extension allows a 2D image to be created from a cl_mem buffer without a copy.
* The type associated with a 2D image created from a buffer in an OpenCL program is image2d_t.
* Both the sampler and sampler-less read_image built-in functions are supported for 2D images
* and 2D images created from a buffer. Similarly, the write_image built-ins are also supported
* for 2D images created from a buffer.
*
* When the 2D image from buffer is created, the client must specify the width,
* height, image format (i.e. channel order and channel data type) and optionally the row pitch
*
* The pitch specified must be a multiple of CL_DEVICE_IMAGE_PITCH_ALIGNMENT pixels.
* The base address of the buffer must be aligned to CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT pixels.
*/
/*************************************
* cl_khr_initalize_memory extension *
*************************************/
#define CL_CONTEXT_MEMORY_INITIALIZE_KHR 0x2030
/**************************************
* cl_khr_terminate_context extension *
**************************************/
#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x2031
#define CL_CONTEXT_TERMINATE_KHR 0x2032
#define cl_khr_terminate_context 1
extern CL_API_ENTRY cl_int CL_API_CALL clTerminateContextKHR(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clTerminateContextKHR_fn)(cl_context /* context */) CL_EXT_SUFFIX__VERSION_1_2;
/*
* Extension: cl_khr_spir
*
* This extension adds support to create an OpenCL program object from a
* Standard Portable Intermediate Representation (SPIR) instance
*/
#define CL_DEVICE_SPIR_VERSIONS 0x40E0
#define CL_PROGRAM_BINARY_TYPE_INTERMEDIATE 0x40E1
/******************************************
* cl_nv_device_attribute_query extension *
******************************************/
/* cl_nv_device_attribute_query extension - no extension #define since it has no functions */
#define CL_DEVICE_COMPUTE_CAPABILITY_MAJOR_NV 0x4000
#define CL_DEVICE_COMPUTE_CAPABILITY_MINOR_NV 0x4001
#define CL_DEVICE_REGISTERS_PER_BLOCK_NV 0x4002
#define CL_DEVICE_WARP_SIZE_NV 0x4003
#define CL_DEVICE_GPU_OVERLAP_NV 0x4004
#define CL_DEVICE_KERNEL_EXEC_TIMEOUT_NV 0x4005
#define CL_DEVICE_INTEGRATED_MEMORY_NV 0x4006
/*********************************
* cl_amd_device_attribute_query *
*********************************/
#define CL_DEVICE_PROFILING_TIMER_OFFSET_AMD 0x4036
/*********************************
* cl_arm_printf extension
*********************************/
#define CL_PRINTF_CALLBACK_ARM 0x40B0
#define CL_PRINTF_BUFFERSIZE_ARM 0x40B1
/*********************************
* cl_intel_accelerator extension *
*********************************/
#define cl_intel_accelerator 1
#define cl_intel_motion_estimation 1
typedef struct _cl_accelerator_intel* cl_accelerator_intel;
typedef cl_uint cl_accelerator_type_intel;
typedef cl_uint cl_accelerator_info_intel;
typedef struct _cl_motion_estimation_desc_intel {
cl_uint mb_block_type;
cl_uint subpixel_mode;
cl_uint sad_adjust_mode;
cl_uint search_path_type;
} cl_motion_estimation_desc_intel;
/* Error Codes */
#define CL_INVALID_ACCELERATOR_INTEL -1094
#define CL_INVALID_ACCELERATOR_TYPE_INTEL -1095
#define CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL -1096
#define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL -1097
/* Deprecated Error Codes */
#define CL_INVALID_ACCELERATOR_INTEL_DEPRECATED -6000
#define CL_INVALID_ACCELERATOR_TYPE_INTEL_DEPRECATED -6001
#define CL_INVALID_ACCELERATOR_DESCRIPTOR_INTEL_DEPRECATED -6002
#define CL_ACCELERATOR_TYPE_NOT_SUPPORTED_INTEL_DEPRECATED -6003
/* cl_accelerator_type_intel */
#define CL_ACCELERATOR_TYPE_MOTION_ESTIMATION_INTEL 0x0
/* cl_accelerator_info_intel */
#define CL_ACCELERATOR_DESCRIPTOR_INTEL 0x4090
#define CL_ACCELERATOR_REFERENCE_COUNT_INTEL 0x4091
#define CL_ACCELERATOR_CONTEXT_INTEL 0x4092
#define CL_ACCELERATOR_TYPE_INTEL 0x4093
/*cl_motion_detect_desc_intel flags */
#define CL_ME_MB_TYPE_16x16_INTEL 0x0
#define CL_ME_MB_TYPE_8x8_INTEL 0x1
#define CL_ME_MB_TYPE_4x4_INTEL 0x2
#define CL_ME_SUBPIXEL_MODE_INTEGER_INTEL 0x0
#define CL_ME_SUBPIXEL_MODE_HPEL_INTEL 0x1
#define CL_ME_SUBPIXEL_MODE_QPEL_INTEL 0x2
#define CL_ME_SAD_ADJUST_MODE_NONE_INTEL 0x0
#define CL_ME_SAD_ADJUST_MODE_HAAR_INTEL 0x1
#define CL_ME_SEARCH_PATH_RADIUS_2_2_INTEL 0x0
#define CL_ME_SEARCH_PATH_RADIUS_4_4_INTEL 0x1
#define CL_ME_SEARCH_PATH_RADIUS_16_12_INTEL 0x5
extern CL_API_ENTRY cl_accelerator_intel CL_API_CALL
clCreateAcceleratorINTEL(
cl_context /* context */,
cl_accelerator_type_intel /* accelerator_type */,
size_t /* descriptor_size */,
const void* /* descriptor */,
cl_int* /* errcode_ret */ ) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_accelerator_intel
(CL_API_CALL *clCreateAcceleratorINTEL_fn)(
cl_context /* context */,
cl_accelerator_type_intel /* accelerator_type */,
size_t /* descriptor_size */,
const void* /* descriptor */,
cl_int* /* errcode_ret */ ) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clGetAcceleratorInfoINTEL
(
cl_accelerator_intel /* accelerator */,
cl_accelerator_info_intel /* param_name */,
size_t /* param_value_size */,
void* /* param_value */,
size_t* /* param_value_size_ret */ ) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int
(CL_API_CALL *clGetAcceleratorInfoINTEL_fn)(
cl_accelerator_intel /* accelerator */,
cl_accelerator_info_intel /* param_name */,
size_t /* param_value_size */,
void* /* param_value */,
size_t* /* param_value_size_ret */ ) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clRetainAcceleratorINTEL(
cl_accelerator_intel /* accelerator */ ) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int
(CL_API_CALL *clRetainAcceleratorINTEL_fn)(
cl_accelerator_intel /* accelerator */ ) CL_EXT_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_int CL_API_CALL
clReleaseAcceleratorINTEL(
cl_accelerator_intel /* accelerator */ ) CL_EXT_SUFFIX__VERSION_1_2;
typedef CL_API_ENTRY cl_int
(CL_API_CALL *clReleaseAcceleratorINTEL_fn)(
cl_accelerator_intel /* accelerator */ ) CL_EXT_SUFFIX__VERSION_1_2;
#ifdef CL_VERSION_1_1
/***********************************
* cl_ext_device_fission extension *
***********************************/
#define cl_ext_device_fission 1
extern CL_API_ENTRY cl_int CL_API_CALL
clReleaseDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
typedef CL_API_ENTRY cl_int
(CL_API_CALL *clReleaseDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
extern CL_API_ENTRY cl_int CL_API_CALL
clRetainDeviceEXT( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
typedef CL_API_ENTRY cl_int
(CL_API_CALL *clRetainDeviceEXT_fn)( cl_device_id /*device*/ ) CL_EXT_SUFFIX__VERSION_1_1;
typedef cl_ulong cl_device_partition_property_ext;
extern CL_API_ENTRY cl_int CL_API_CALL
clCreateSubDevicesEXT( cl_device_id /*in_device*/,
const cl_device_partition_property_ext * /* properties */,
cl_uint /*num_entries*/,
cl_device_id * /*out_devices*/,
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
typedef CL_API_ENTRY cl_int
( CL_API_CALL * clCreateSubDevicesEXT_fn)( cl_device_id /*in_device*/,
const cl_device_partition_property_ext * /* properties */,
cl_uint /*num_entries*/,
cl_device_id * /*out_devices*/,
cl_uint * /*num_devices*/ ) CL_EXT_SUFFIX__VERSION_1_1;
/* cl_device_partition_property_ext */
#define CL_DEVICE_PARTITION_EQUALLY_EXT 0x4050
#define CL_DEVICE_PARTITION_BY_COUNTS_EXT 0x4051
#define CL_DEVICE_PARTITION_BY_NAMES_EXT 0x4052
#define CL_DEVICE_PARTITION_BY_NAMES_INTEL 0x4052
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN_EXT 0x4053
/* clDeviceGetInfo selectors */
#define CL_DEVICE_PARENT_DEVICE_EXT 0x4054
#define CL_DEVICE_PARTITION_TYPES_EXT 0x4055
#define CL_DEVICE_AFFINITY_DOMAINS_EXT 0x4056
#define CL_DEVICE_REFERENCE_COUNT_EXT 0x4057
#define CL_DEVICE_PARTITION_STYLE_EXT 0x4058
/* error codes */
#define CL_DEVICE_PARTITION_FAILED_EXT -1057
#define CL_INVALID_PARTITION_COUNT_EXT -1058
#define CL_INVALID_PARTITION_NAME_EXT -1059
/* CL_AFFINITY_DOMAINs */
#define CL_AFFINITY_DOMAIN_L1_CACHE_EXT 0x1
#define CL_AFFINITY_DOMAIN_L2_CACHE_EXT 0x2
#define CL_AFFINITY_DOMAIN_L3_CACHE_EXT 0x3
#define CL_AFFINITY_DOMAIN_L4_CACHE_EXT 0x4
#define CL_AFFINITY_DOMAIN_NUMA_EXT 0x10
#define CL_AFFINITY_DOMAIN_NEXT_FISSIONABLE_EXT 0x100
/* cl_device_partition_property_ext list terminators */
#define CL_PROPERTIES_LIST_END_EXT ((cl_device_partition_property_ext) 0)
#define CL_PARTITION_BY_COUNTS_LIST_END_EXT ((cl_device_partition_property_ext) 0)
#define CL_PARTITION_BY_NAMES_LIST_END_EXT ((cl_device_partition_property_ext) 0 - 1)
#define CL_PARTITION_BY_NAMES_LIST_END_INTEL ((cl_device_partition_property_ext) 0 - 1)
#define CL_QUEUE_THREAD_LOCAL_EXEC_ENABLE_INTEL (1 << 31)
/*********************************
* cl_qcom_ext_host_ptr extension
*********************************/
#define CL_MEM_EXT_HOST_PTR_QCOM (1 << 29)
#define CL_DEVICE_EXT_MEM_PADDING_IN_BYTES_QCOM 0x40A0
#define CL_DEVICE_PAGE_SIZE_QCOM 0x40A1
#define CL_IMAGE_ROW_ALIGNMENT_QCOM 0x40A2
#define CL_IMAGE_SLICE_ALIGNMENT_QCOM 0x40A3
#define CL_MEM_HOST_UNCACHED_QCOM 0x40A4
#define CL_MEM_HOST_WRITEBACK_QCOM 0x40A5
#define CL_MEM_HOST_WRITETHROUGH_QCOM 0x40A6
#define CL_MEM_HOST_WRITE_COMBINING_QCOM 0x40A7
typedef cl_uint cl_image_pitch_info_qcom;
extern CL_API_ENTRY cl_int CL_API_CALL
clGetDeviceImageInfoQCOM(cl_device_id device,
size_t image_width,
size_t image_height,
const cl_image_format *image_format,
cl_image_pitch_info_qcom param_name,
size_t param_value_size,
void *param_value,
size_t *param_value_size_ret);
typedef struct _cl_mem_ext_host_ptr
{
/* Type of external memory allocation. */
/* Legal values will be defined in layered extensions. */
cl_uint allocation_type;
/* Host cache policy for this external memory allocation. */
cl_uint host_cache_policy;
} cl_mem_ext_host_ptr;
/*********************************
* cl_qcom_ion_host_ptr extension
*********************************/
#define CL_MEM_ION_HOST_PTR_QCOM 0x40A8
typedef struct _cl_mem_ion_host_ptr
{
/* Type of external memory allocation. */
/* Must be CL_MEM_ION_HOST_PTR_QCOM for ION allocations. */
cl_mem_ext_host_ptr ext_host_ptr;
/* ION file descriptor */
int ion_filedesc;
/* Host pointer to the ION allocated memory */
void* ion_hostptr;
} cl_mem_ion_host_ptr;
#endif /* CL_VERSION_1_1 */
#ifdef CL_VERSION_2_0
/*********************************
* cl_khr_sub_groups extension
*********************************/
#define cl_khr_sub_groups 1
typedef cl_uint cl_kernel_sub_group_info;
/* cl_khr_sub_group_info */
#define CL_KERNEL_MAX_SUB_GROUP_SIZE_FOR_NDRANGE_KHR 0x2033
#define CL_KERNEL_SUB_GROUP_COUNT_FOR_NDRANGE_KHR 0x2034
extern CL_API_ENTRY cl_int CL_API_CALL
clGetKernelSubGroupInfoKHR(cl_kernel /* in_kernel */,
cl_device_id /*in_device*/,
const cl_kernel_sub_group_info /* param_name */,
size_t /*input_value_size*/,
const void * /*input_value*/,
size_t /*param_value_size*/,
void* /*param_value*/,
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;
typedef CL_API_ENTRY cl_int
( CL_API_CALL * clGetKernelSubGroupInfoKHR_fn)(cl_kernel /* in_kernel */,
cl_device_id /*in_device*/,
const cl_kernel_sub_group_info /* param_name */,
size_t /*input_value_size*/,
const void * /*input_value*/,
size_t /*param_value_size*/,
void* /*param_value*/,
size_t* /*param_value_size_ret*/ ) CL_EXT_SUFFIX__VERSION_2_0;
#endif /* CL_VERSION_2_0 */
#ifdef __cplusplus
}
#endif
#endif /* __CL_EXT_H */

162
3rdparty/opencl/CL/cl_gl.h vendored Normal file
View File

@@ -0,0 +1,162 @@
/**********************************************************************************
* Copyright (c) 2008 - 2013 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
**********************************************************************************/
#ifndef __OPENCL_CL_GL_H
#define __OPENCL_CL_GL_H
#ifdef __APPLE__
#include <OpenCL/cl.h>
#else
#include <CL/cl.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
typedef cl_uint cl_gl_object_type;
typedef cl_uint cl_gl_texture_info;
typedef cl_uint cl_gl_platform_info;
typedef struct __GLsync *cl_GLsync;
/* cl_gl_object_type = 0x2000 - 0x200F enum values are currently taken */
#define CL_GL_OBJECT_BUFFER 0x2000
#define CL_GL_OBJECT_TEXTURE2D 0x2001
#define CL_GL_OBJECT_TEXTURE3D 0x2002
#define CL_GL_OBJECT_RENDERBUFFER 0x2003
#define CL_GL_OBJECT_TEXTURE2D_ARRAY 0x200E
#define CL_GL_OBJECT_TEXTURE1D 0x200F
#define CL_GL_OBJECT_TEXTURE1D_ARRAY 0x2010
#define CL_GL_OBJECT_TEXTURE_BUFFER 0x2011
/* cl_gl_texture_info */
#define CL_GL_TEXTURE_TARGET 0x2004
#define CL_GL_MIPMAP_LEVEL 0x2005
#define CL_GL_NUM_SAMPLES 0x2012
extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromGLBuffer(cl_context /* context */,
cl_mem_flags /* flags */,
cl_GLuint /* bufobj */,
int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromGLTexture(cl_context /* context */,
cl_mem_flags /* flags */,
cl_GLenum /* target */,
cl_GLint /* miplevel */,
cl_GLuint /* texture */,
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_2;
extern CL_API_ENTRY cl_mem CL_API_CALL
clCreateFromGLRenderbuffer(cl_context /* context */,
cl_mem_flags /* flags */,
cl_GLuint /* renderbuffer */,
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
extern CL_API_ENTRY cl_int CL_API_CALL
clGetGLObjectInfo(cl_mem /* memobj */,
cl_gl_object_type * /* gl_object_type */,
cl_GLuint * /* gl_object_name */) CL_API_SUFFIX__VERSION_1_0;
extern CL_API_ENTRY cl_int CL_API_CALL
clGetGLTextureInfo(cl_mem /* memobj */,
cl_gl_texture_info /* param_name */,
size_t /* param_value_size */,
void * /* param_value */,
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueAcquireGLObjects(cl_command_queue /* command_queue */,
cl_uint /* num_objects */,
const cl_mem * /* mem_objects */,
cl_uint /* num_events_in_wait_list */,
const cl_event * /* event_wait_list */,
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
extern CL_API_ENTRY cl_int CL_API_CALL
clEnqueueReleaseGLObjects(cl_command_queue /* command_queue */,
cl_uint /* num_objects */,
const cl_mem * /* mem_objects */,
cl_uint /* num_events_in_wait_list */,
const cl_event * /* event_wait_list */,
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
/* Deprecated OpenCL 1.1 APIs */
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
clCreateFromGLTexture2D(cl_context /* context */,
cl_mem_flags /* flags */,
cl_GLenum /* target */,
cl_GLint /* miplevel */,
cl_GLuint /* texture */,
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem CL_API_CALL
clCreateFromGLTexture3D(cl_context /* context */,
cl_mem_flags /* flags */,
cl_GLenum /* target */,
cl_GLint /* miplevel */,
cl_GLuint /* texture */,
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
/* cl_khr_gl_sharing extension */
#define cl_khr_gl_sharing 1
typedef cl_uint cl_gl_context_info;
/* Additional Error Codes */
#define CL_INVALID_GL_SHAREGROUP_REFERENCE_KHR -1000
/* cl_gl_context_info */
#define CL_CURRENT_DEVICE_FOR_GL_CONTEXT_KHR 0x2006
#define CL_DEVICES_FOR_GL_CONTEXT_KHR 0x2007
/* Additional cl_context_properties */
#define CL_GL_CONTEXT_KHR 0x2008
#define CL_EGL_DISPLAY_KHR 0x2009
#define CL_GLX_DISPLAY_KHR 0x200A
#define CL_WGL_HDC_KHR 0x200B
#define CL_CGL_SHAREGROUP_KHR 0x200C
extern CL_API_ENTRY cl_int CL_API_CALL
clGetGLContextInfoKHR(const cl_context_properties * /* properties */,
cl_gl_context_info /* param_name */,
size_t /* param_value_size */,
void * /* param_value */,
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
typedef CL_API_ENTRY cl_int (CL_API_CALL *clGetGLContextInfoKHR_fn)(
const cl_context_properties * properties,
cl_gl_context_info param_name,
size_t param_value_size,
void * param_value,
size_t * param_value_size_ret);
#ifdef __cplusplus
}
#endif
#endif /* __OPENCL_CL_GL_H */

69
3rdparty/opencl/CL/cl_gl_ext.h vendored Normal file
View File

@@ -0,0 +1,69 @@
/**********************************************************************************
* Copyright (c) 2008-2013 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
**********************************************************************************/
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
/* cl_gl_ext.h contains vendor (non-KHR) OpenCL extensions which have */
/* OpenGL dependencies. */
#ifndef __OPENCL_CL_GL_EXT_H
#define __OPENCL_CL_GL_EXT_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __APPLE__
#include <OpenCL/cl_gl.h>
#else
#include <CL/cl_gl.h>
#endif
/*
* For each extension, follow this template
* cl_VEN_extname extension */
/* #define cl_VEN_extname 1
* ... define new types, if any
* ... define new tokens, if any
* ... define new APIs, if any
*
* If you need GLtypes here, mirror them with a cl_GLtype, rather than including a GL header
* This allows us to avoid having to decide whether to include GL headers or GLES here.
*/
/*
* cl_khr_gl_event extension
* See section 9.9 in the OpenCL 1.1 spec for more information
*/
#define CL_COMMAND_GL_FENCE_SYNC_OBJECT_KHR 0x200D
extern CL_API_ENTRY cl_event CL_API_CALL
clCreateEventFromGLsyncKHR(cl_context /* context */,
cl_GLsync /* cl_GLsync */,
cl_int * /* errcode_ret */) CL_EXT_SUFFIX__VERSION_1_1;
#ifdef __cplusplus
}
#endif
#endif /* __OPENCL_CL_GL_EXT_H */

1299
3rdparty/opencl/CL/cl_platform.h vendored Normal file

File diff suppressed because it is too large Load Diff

54
3rdparty/opencl/CL/opencl.h vendored Normal file
View File

@@ -0,0 +1,54 @@
/*******************************************************************************
* Copyright (c) 2008-2013 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, modify, merge, publish,
* distribute, sublicense, and/or sell copies of the Materials, and to
* permit persons to whom the Materials are furnished to do so, subject to
* the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Materials.
*
* THE MATERIALS ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
******************************************************************************/
/* $Revision: 11708 $ on $Date: 2010-06-13 23:36:24 -0700 (Sun, 13 Jun 2010) $ */
#ifndef __OPENCL_H
#define __OPENCL_H
#ifdef __cplusplus
extern "C" {
#endif
#ifdef __APPLE__
#include <OpenCL/cl.h>
#include <OpenCL/cl_gl.h>
#include <OpenCL/cl_gl_ext.h>
#include <OpenCL/cl_ext.h>
#else
#include <CL/cl.h>
#include <CL/cl_gl.h>
#include <CL/cl_gl_ext.h>
#include <CL/cl_ext.h>
#endif
#ifdef __cplusplus
}
#endif
#endif /* __OPENCL_H */

824
3rdparty/opencl/opencl.cpp vendored Normal file
View File

@@ -0,0 +1,824 @@
#include "CL/cl.h"
typedef cl_int (CL_API_CALL * clGetPlatformIDsPtr)(cl_uint num_entries, cl_platform_id* platforms, cl_uint* num_platforms) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetPlatformInfoPtr)(cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetDeviceIDsPtr)(cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id* devices, cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetDeviceInfoPtr)(cl_device_id device, cl_device_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clCreateSubDevicesPtr)(cl_device_id in_device, const cl_device_partition_property* properties, cl_uint num_devices, cl_device_id* out_devices, cl_uint* num_devices_ret) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clRetainDevicePtr)(cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clReleaseDevicePtr)(cl_device_id device) CL_API_SUFFIX__VERSION_1_2;
typedef cl_context (CL_API_CALL * clCreateContextPtr)(const cl_context_properties* properties, cl_uint num_devices, const cl_device_id* devices, void (CL_CALLBACK* pfn_notify)(const char*, const void*, size_t, void*), void* user_data, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_context (CL_API_CALL * clCreateContextFromTypePtr)(const cl_context_properties* properties, cl_device_type device_type, void (CL_CALLBACK* pfn_notify)(const char*, const void*, size_t, void*), void* user_data, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clRetainContextPtr)(cl_context context) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clReleaseContextPtr)(cl_context context) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetContextInfoPtr)(cl_context context, cl_context_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_command_queue (CL_API_CALL * clCreateCommandQueueWithPropertiesPtr)(cl_context context, cl_device_id device, const cl_queue_properties* properties, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_0;
typedef cl_int (CL_API_CALL * clRetainCommandQueuePtr)(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clReleaseCommandQueuePtr)(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetCommandQueueInfoPtr)(cl_command_queue command_queue, cl_command_queue_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_mem (CL_API_CALL * clCreateBufferPtr)(cl_context context, cl_mem_flags flags, size_t size, void* host_ptr, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_mem (CL_API_CALL * clCreateSubBufferPtr)(cl_mem buffer, cl_mem_flags flags, cl_buffer_create_type buffer_create_type, const void* buffer_create_info, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
typedef cl_mem (CL_API_CALL * clCreateImagePtr)(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, const cl_image_desc* image_desc, void* host_ptr, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef cl_mem (CL_API_CALL * clCreatePipePtr)(cl_context context, cl_mem_flags flags, cl_uint pipe_packet_size, cl_uint pipe_max_packets, const cl_pipe_properties* properties, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_0;
typedef cl_int (CL_API_CALL * clRetainMemObjectPtr)(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clReleaseMemObjectPtr)(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetSupportedImageFormatsPtr)(cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, cl_image_format* image_formats, cl_uint* num_image_formats) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetMemObjectInfoPtr)(cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetImageInfoPtr)(cl_mem image, cl_image_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetPipeInfoPtr)(cl_mem pipe, cl_pipe_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_0;
typedef cl_int (CL_API_CALL * clSetMemObjectDestructorCallbackPtr)(cl_mem memobj, void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data), void* user_data) CL_API_SUFFIX__VERSION_1_1;
typedef void* (CL_API_CALL * clSVMAllocPtr)(cl_context context, cl_svm_mem_flags flags, size_t size, cl_uint alignment) CL_API_SUFFIX__VERSION_2_0;
typedef void (CL_API_CALL * clSVMFreePtr)(cl_context context, void* svm_pointer) CL_API_SUFFIX__VERSION_2_0;
typedef cl_sampler (CL_API_CALL * clCreateSamplerWithPropertiesPtr)(cl_context context, const cl_sampler_properties* normalized_coords, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_0;
typedef cl_int (CL_API_CALL * clRetainSamplerPtr)(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clReleaseSamplerPtr)(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetSamplerInfoPtr)(cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_program (CL_API_CALL * clCreateProgramWithSourcePtr)(cl_context context, cl_uint count, const char** strings, const size_t* lengths, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_program (CL_API_CALL * clCreateProgramWithBinaryPtr)(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const size_t* lengths, const unsigned char** binaries, cl_int* binary_status, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_program (CL_API_CALL * clCreateProgramWithBuiltInKernelsPtr)(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const char* kernel_names, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clRetainProgramPtr)(cl_program program) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clReleaseProgramPtr)(cl_program program) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clBuildProgramPtr)(cl_program program, cl_uint num_devices, const cl_device_id* device_list, const char* options, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clCompileProgramPtr)(cl_program program, cl_uint num_devices, const cl_device_id* device_list, const char* options, cl_uint num_input_headers, const cl_program* input_headers, const char** header_include_names, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data) CL_API_SUFFIX__VERSION_1_2;
typedef cl_program (CL_API_CALL * clLinkProgramPtr)(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const char* options, cl_uint num_input_programs, const cl_program* input_programs, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clUnloadPlatformCompilerPtr)(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clGetProgramInfoPtr)(cl_program program, cl_program_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetProgramBuildInfoPtr)(cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_kernel (CL_API_CALL * clCreateKernelPtr)(cl_program program, const char* kernel_name, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clCreateKernelsInProgramPtr)(cl_program program, cl_uint num_kernels, cl_kernel* kernels, cl_uint* num_kernels_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clRetainKernelPtr)(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clReleaseKernelPtr)(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clSetKernelArgPtr)(cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clSetKernelArgSVMPointerPtr)(cl_kernel kernel, cl_uint arg_index, const void* arg_value) CL_API_SUFFIX__VERSION_2_0;
typedef cl_int (CL_API_CALL * clSetKernelExecInfoPtr)(cl_kernel kernel, cl_kernel_exec_info param_name, size_t param_value_size, const void* param_value) CL_API_SUFFIX__VERSION_2_0;
typedef cl_int (CL_API_CALL * clGetKernelInfoPtr)(cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetKernelArgInfoPtr)(cl_kernel kernel, cl_uint arg_indx, cl_kernel_arg_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clGetKernelWorkGroupInfoPtr)(cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clWaitForEventsPtr)(cl_uint num_events, const cl_event* event_list) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clGetEventInfoPtr)(cl_event event, cl_event_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_event (CL_API_CALL * clCreateUserEventPtr)(cl_context context, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1;
typedef cl_int (CL_API_CALL * clRetainEventPtr)(cl_event event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clReleaseEventPtr)(cl_event event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clSetUserEventStatusPtr)(cl_event event, cl_int execution_status) CL_API_SUFFIX__VERSION_1_1;
typedef cl_int (CL_API_CALL * clSetEventCallbackPtr)(cl_event event, cl_int command_exec_callback_type, void (CL_CALLBACK* pfn_notify)(cl_event, cl_int, void*), void* user_data) CL_API_SUFFIX__VERSION_1_1;
typedef cl_int (CL_API_CALL * clGetEventProfilingInfoPtr)(cl_event event, cl_profiling_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clFlushPtr)(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clFinishPtr)(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueReadBufferPtr)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t size, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueReadBufferRectPtr)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, const size_t* buffer_offset, const size_t* host_offset, const size_t* region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_1;
typedef cl_int (CL_API_CALL * clEnqueueWriteBufferPtr)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t size, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueWriteBufferRectPtr)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, const size_t* buffer_offset, const size_t* host_offset, const size_t* region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_1;
typedef cl_int (CL_API_CALL * clEnqueueFillBufferPtr)(cl_command_queue command_queue, cl_mem buffer, const void* pattern, size_t pattern_size, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clEnqueueCopyBufferPtr)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueCopyBufferRectPtr)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, const size_t* src_origin, const size_t* dst_origin, const size_t* region, size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch, size_t dst_slice_pitch, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_1;
typedef cl_int (CL_API_CALL * clEnqueueReadImagePtr)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_read, const size_t* origin, const size_t* region, size_t row_pitch, size_t slice_pitch, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueWriteImagePtr)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_write, const size_t* origin, const size_t* region, size_t input_row_pitch, size_t input_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueFillImagePtr)(cl_command_queue command_queue, cl_mem image, const void* fill_color, const size_t* origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clEnqueueCopyImagePtr)(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image, const size_t* src_origin, const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueCopyImageToBufferPtr)(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer, const size_t* src_origin, const size_t* region, size_t dst_offset, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueCopyBufferToImagePtr)(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image, size_t src_offset, const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef void* (CL_API_CALL * clEnqueueMapBufferPtr)(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef void* (CL_API_CALL * clEnqueueMapImagePtr)(cl_command_queue command_queue, cl_mem image, cl_bool blocking_map, cl_map_flags map_flags, const size_t* origin, const size_t* region, size_t* image_row_pitch, size_t* image_slice_pitch, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueUnmapMemObjectPtr)(cl_command_queue command_queue, cl_mem memobj, void* mapped_ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueMigrateMemObjectsPtr)(cl_command_queue command_queue, cl_uint num_mem_objects, const cl_mem* mem_objects, cl_mem_migration_flags flags, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clEnqueueNDRangeKernelPtr)(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t* global_work_offset, const size_t* global_work_size, const size_t* local_work_size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueNativeKernelPtr)(cl_command_queue command_queue, void (CL_CALLBACK* /*user_func*/)(void*), void* args, size_t cb_args, cl_uint num_mem_objects, const cl_mem* mem_list, const void** args_mem_loc, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0;
typedef cl_int (CL_API_CALL * clEnqueueMarkerWithWaitListPtr)(cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clEnqueueBarrierWithWaitListPtr)(cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2;
typedef cl_int (CL_API_CALL * clEnqueueSVMFreePtr)(cl_command_queue command_queue, cl_uint num_svm_pointers, void* svm_pointers[], void (CL_CALLBACK* /*pfn_free_func*/)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data), void* user_data, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0;
typedef cl_int (CL_API_CALL * clEnqueueSVMMemcpyPtr)(cl_command_queue command_queue, cl_bool blocking_copy, void* dst_ptr, const void* src_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0;
typedef cl_int (CL_API_CALL * clEnqueueSVMMemFillPtr)(cl_command_queue command_queue, void* svm_ptr, const void* pattern, size_t pattern_size, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0;
typedef cl_int (CL_API_CALL * clEnqueueSVMMapPtr)(cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags flags, void* svm_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0;
typedef cl_int (CL_API_CALL * clEnqueueSVMUnmapPtr)(cl_command_queue command_queue, void* svm_ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0;
typedef void* (CL_API_CALL * clGetExtensionFunctionAddressForPlatformPtr)(cl_platform_id platform, const char* func_name) CL_API_SUFFIX__VERSION_1_2;
typedef cl_mem (CL_API_CALL * clCreateImage2DPtr)(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, size_t image_width, size_t image_height, size_t image_row_pitch, void* host_ptr, cl_int* errcode_ret);
typedef cl_mem (CL_API_CALL * clCreateImage3DPtr)(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch, void* host_ptr, cl_int* errcode_ret);
typedef cl_int (CL_API_CALL * clEnqueueMarkerPtr)(cl_command_queue command_queue, cl_event* event);
typedef cl_int (CL_API_CALL * clEnqueueWaitForEventsPtr)(cl_command_queue command_queue, cl_uint num_events, const cl_event* event_list);
typedef cl_int (CL_API_CALL * clEnqueueBarrierPtr)(cl_command_queue command_queue);
typedef cl_int (CL_API_CALL * clUnloadCompilerPtr)(void);
typedef void* (CL_API_CALL * clGetExtensionFunctionAddressPtr)(const char* func_name);
typedef cl_command_queue (CL_API_CALL * clCreateCommandQueuePtr)(cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int* errcode_ret);
typedef cl_sampler (CL_API_CALL * clCreateSamplerPtr)(cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int* errcode_ret);
typedef cl_int (CL_API_CALL * clEnqueueTaskPtr)(cl_command_queue command_queue, cl_kernel kernel, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event);
static clGetPlatformIDsPtr cl_GetPlatformIDs = NULL;
static clGetPlatformInfoPtr cl_GetPlatformInfo = NULL;
static clGetDeviceIDsPtr cl_GetDeviceIDs = NULL;
static clGetDeviceInfoPtr cl_GetDeviceInfo = NULL;
static clCreateSubDevicesPtr cl_CreateSubDevices = NULL;
static clRetainDevicePtr cl_RetainDevice = NULL;
static clReleaseDevicePtr cl_ReleaseDevice = NULL;
static clCreateContextPtr cl_CreateContext = NULL;
static clCreateContextFromTypePtr cl_CreateContextFromType = NULL;
static clRetainContextPtr cl_RetainContext = NULL;
static clReleaseContextPtr cl_ReleaseContext = NULL;
static clGetContextInfoPtr cl_GetContextInfo = NULL;
static clCreateCommandQueueWithPropertiesPtr cl_CreateCommandQueueWithProperties = NULL;
static clRetainCommandQueuePtr cl_RetainCommandQueue = NULL;
static clReleaseCommandQueuePtr cl_ReleaseCommandQueue = NULL;
static clGetCommandQueueInfoPtr cl_GetCommandQueueInfo = NULL;
static clCreateBufferPtr cl_CreateBuffer = NULL;
static clCreateSubBufferPtr cl_CreateSubBuffer = NULL;
static clCreateImagePtr cl_CreateImage = NULL;
static clCreatePipePtr cl_CreatePipe = NULL;
static clRetainMemObjectPtr cl_RetainMemObject = NULL;
static clReleaseMemObjectPtr cl_ReleaseMemObject = NULL;
static clGetSupportedImageFormatsPtr cl_GetSupportedImageFormats = NULL;
static clGetMemObjectInfoPtr cl_GetMemObjectInfo = NULL;
static clGetImageInfoPtr cl_GetImageInfo = NULL;
static clGetPipeInfoPtr cl_GetPipeInfo = NULL;
static clSetMemObjectDestructorCallbackPtr cl_SetMemObjectDestructorCallback = NULL;
static clSVMAllocPtr cl_SVMAlloc = NULL;
static clSVMFreePtr cl_SVMFree = NULL;
static clCreateSamplerWithPropertiesPtr cl_CreateSamplerWithProperties = NULL;
static clRetainSamplerPtr cl_RetainSampler = NULL;
static clReleaseSamplerPtr cl_ReleaseSampler = NULL;
static clGetSamplerInfoPtr cl_GetSamplerInfo = NULL;
static clCreateProgramWithSourcePtr cl_CreateProgramWithSource = NULL;
static clCreateProgramWithBinaryPtr cl_CreateProgramWithBinary = NULL;
static clCreateProgramWithBuiltInKernelsPtr cl_CreateProgramWithBuiltInKernels = NULL;
static clRetainProgramPtr cl_RetainProgram = NULL;
static clReleaseProgramPtr cl_ReleaseProgram = NULL;
static clBuildProgramPtr cl_BuildProgram = NULL;
static clCompileProgramPtr cl_CompileProgram = NULL;
static clLinkProgramPtr cl_LinkProgram = NULL;
static clUnloadPlatformCompilerPtr cl_UnloadPlatformCompiler = NULL;
static clGetProgramInfoPtr cl_GetProgramInfo = NULL;
static clGetProgramBuildInfoPtr cl_GetProgramBuildInfo = NULL;
static clCreateKernelPtr cl_CreateKernel = NULL;
static clCreateKernelsInProgramPtr cl_CreateKernelsInProgram = NULL;
static clRetainKernelPtr cl_RetainKernel = NULL;
static clReleaseKernelPtr cl_ReleaseKernel = NULL;
static clSetKernelArgPtr cl_SetKernelArg = NULL;
static clSetKernelArgSVMPointerPtr cl_SetKernelArgSVMPointer = NULL;
static clSetKernelExecInfoPtr cl_SetKernelExecInfo = NULL;
static clGetKernelInfoPtr cl_GetKernelInfo = NULL;
static clGetKernelArgInfoPtr cl_GetKernelArgInfo = NULL;
static clGetKernelWorkGroupInfoPtr cl_GetKernelWorkGroupInfo = NULL;
static clWaitForEventsPtr cl_WaitForEvents = NULL;
static clGetEventInfoPtr cl_GetEventInfo = NULL;
static clCreateUserEventPtr cl_CreateUserEvent = NULL;
static clRetainEventPtr cl_RetainEvent = NULL;
static clReleaseEventPtr cl_ReleaseEvent = NULL;
static clSetUserEventStatusPtr cl_SetUserEventStatus = NULL;
static clSetEventCallbackPtr cl_SetEventCallback = NULL;
static clGetEventProfilingInfoPtr cl_GetEventProfilingInfo = NULL;
static clFlushPtr cl_Flush = NULL;
static clFinishPtr cl_Finish = NULL;
static clEnqueueReadBufferPtr cl_EnqueueReadBuffer = NULL;
static clEnqueueReadBufferRectPtr cl_EnqueueReadBufferRect = NULL;
static clEnqueueWriteBufferPtr cl_EnqueueWriteBuffer = NULL;
static clEnqueueWriteBufferRectPtr cl_EnqueueWriteBufferRect = NULL;
static clEnqueueFillBufferPtr cl_EnqueueFillBuffer = NULL;
static clEnqueueCopyBufferPtr cl_EnqueueCopyBuffer = NULL;
static clEnqueueCopyBufferRectPtr cl_EnqueueCopyBufferRect = NULL;
static clEnqueueReadImagePtr cl_EnqueueReadImage = NULL;
static clEnqueueWriteImagePtr cl_EnqueueWriteImage = NULL;
static clEnqueueFillImagePtr cl_EnqueueFillImage = NULL;
static clEnqueueCopyImagePtr cl_EnqueueCopyImage = NULL;
static clEnqueueCopyImageToBufferPtr cl_EnqueueCopyImageToBuffer = NULL;
static clEnqueueCopyBufferToImagePtr cl_EnqueueCopyBufferToImage = NULL;
static clEnqueueMapBufferPtr cl_EnqueueMapBuffer = NULL;
static clEnqueueMapImagePtr cl_EnqueueMapImage = NULL;
static clEnqueueUnmapMemObjectPtr cl_EnqueueUnmapMemObject = NULL;
static clEnqueueMigrateMemObjectsPtr cl_EnqueueMigrateMemObjects = NULL;
static clEnqueueNDRangeKernelPtr cl_EnqueueNDRangeKernel = NULL;
static clEnqueueNativeKernelPtr cl_EnqueueNativeKernel = NULL;
static clEnqueueMarkerWithWaitListPtr cl_EnqueueMarkerWithWaitList = NULL;
static clEnqueueBarrierWithWaitListPtr cl_EnqueueBarrierWithWaitList = NULL;
static clEnqueueSVMFreePtr cl_EnqueueSVMFree = NULL;
static clEnqueueSVMMemcpyPtr cl_EnqueueSVMMemcpy = NULL;
static clEnqueueSVMMemFillPtr cl_EnqueueSVMMemFill = NULL;
static clEnqueueSVMMapPtr cl_EnqueueSVMMap = NULL;
static clEnqueueSVMUnmapPtr cl_EnqueueSVMUnmap = NULL;
static clGetExtensionFunctionAddressForPlatformPtr cl_GetExtensionFunctionAddressForPlatform = NULL;
static clCreateImage2DPtr cl_CreateImage2D = NULL;
static clCreateImage3DPtr cl_CreateImage3D = NULL;
static clEnqueueMarkerPtr cl_EnqueueMarker = NULL;
static clEnqueueWaitForEventsPtr cl_EnqueueWaitForEvents = NULL;
static clEnqueueBarrierPtr cl_EnqueueBarrier = NULL;
static clUnloadCompilerPtr cl_UnloadCompiler = NULL;
static clGetExtensionFunctionAddressPtr cl_GetExtensionFunctionAddress = NULL;
static clCreateCommandQueuePtr cl_CreateCommandQueue = NULL;
static clCreateSamplerPtr cl_CreateSampler = NULL;
static clEnqueueTaskPtr cl_EnqueueTask = NULL;
#include <Windows.h>
static struct Loader
{
struct Loader()
{
HMODULE hModule = LoadLibrary("OpenCL.dll");
if(hModule == NULL) return;
*(void**)&cl_GetPlatformIDs = GetProcAddress(hModule, "clGetPlatformIDs");
*(void**)&cl_GetPlatformInfo = GetProcAddress(hModule, "clGetPlatformInfo");
*(void**)&cl_GetDeviceIDs = GetProcAddress(hModule, "clGetDeviceIDs");
*(void**)&cl_GetDeviceInfo = GetProcAddress(hModule, "clGetDeviceInfo");
*(void**)&cl_CreateSubDevices = GetProcAddress(hModule, "clCreateSubDevices");
*(void**)&cl_RetainDevice = GetProcAddress(hModule, "clRetainDevice");
*(void**)&cl_ReleaseDevice = GetProcAddress(hModule, "clReleaseDevice");
*(void**)&cl_CreateContext = GetProcAddress(hModule, "clCreateContext");
*(void**)&cl_CreateContextFromType = GetProcAddress(hModule, "clCreateContextFromType");
*(void**)&cl_RetainContext = GetProcAddress(hModule, "clRetainContext");
*(void**)&cl_ReleaseContext = GetProcAddress(hModule, "clReleaseContext");
*(void**)&cl_GetContextInfo = GetProcAddress(hModule, "clGetContextInfo");
*(void**)&cl_CreateCommandQueueWithProperties = GetProcAddress(hModule, "clCreateCommandQueueWithProperties");
*(void**)&cl_RetainCommandQueue = GetProcAddress(hModule, "clRetainCommandQueue");
*(void**)&cl_ReleaseCommandQueue = GetProcAddress(hModule, "clReleaseCommandQueue");
*(void**)&cl_GetCommandQueueInfo = GetProcAddress(hModule, "clGetCommandQueueInfo");
*(void**)&cl_CreateBuffer = GetProcAddress(hModule, "clCreateBuffer");
*(void**)&cl_CreateSubBuffer = GetProcAddress(hModule, "clCreateSubBuffer");
*(void**)&cl_CreateImage = GetProcAddress(hModule, "clCreateImage");
*(void**)&cl_CreatePipe = GetProcAddress(hModule, "clCreatePipe");
*(void**)&cl_RetainMemObject = GetProcAddress(hModule, "clRetainMemObject");
*(void**)&cl_ReleaseMemObject = GetProcAddress(hModule, "clReleaseMemObject");
*(void**)&cl_GetSupportedImageFormats = GetProcAddress(hModule, "clGetSupportedImageFormats");
*(void**)&cl_GetMemObjectInfo = GetProcAddress(hModule, "clGetMemObjectInfo");
*(void**)&cl_GetImageInfo = GetProcAddress(hModule, "clGetImageInfo");
*(void**)&cl_GetPipeInfo = GetProcAddress(hModule, "clGetPipeInfo");
*(void**)&cl_SetMemObjectDestructorCallback = GetProcAddress(hModule, "clSetMemObjectDestructorCallback");
*(void**)&cl_SVMAlloc = GetProcAddress(hModule, "clSVMAlloc");
*(void**)&cl_SVMFree = GetProcAddress(hModule, "clSVMFree");
*(void**)&cl_CreateSamplerWithProperties = GetProcAddress(hModule, "clCreateSamplerWithProperties");
*(void**)&cl_RetainSampler = GetProcAddress(hModule, "clRetainSampler");
*(void**)&cl_ReleaseSampler = GetProcAddress(hModule, "clReleaseSampler");
*(void**)&cl_GetSamplerInfo = GetProcAddress(hModule, "clGetSamplerInfo");
*(void**)&cl_CreateProgramWithSource = GetProcAddress(hModule, "clCreateProgramWithSource");
*(void**)&cl_CreateProgramWithBinary = GetProcAddress(hModule, "clCreateProgramWithBinary");
*(void**)&cl_CreateProgramWithBuiltInKernels = GetProcAddress(hModule, "clCreateProgramWithBuiltInKernels");
*(void**)&cl_RetainProgram = GetProcAddress(hModule, "clRetainProgram");
*(void**)&cl_ReleaseProgram = GetProcAddress(hModule, "clReleaseProgram");
*(void**)&cl_BuildProgram = GetProcAddress(hModule, "clBuildProgram");
*(void**)&cl_CompileProgram = GetProcAddress(hModule, "clCompileProgram");
*(void**)&cl_LinkProgram = GetProcAddress(hModule, "clLinkProgram");
*(void**)&cl_UnloadPlatformCompiler = GetProcAddress(hModule, "clUnloadPlatformCompiler");
*(void**)&cl_GetProgramInfo = GetProcAddress(hModule, "clGetProgramInfo");
*(void**)&cl_GetProgramBuildInfo = GetProcAddress(hModule, "clGetProgramBuildInfo");
*(void**)&cl_CreateKernel = GetProcAddress(hModule, "clCreateKernel");
*(void**)&cl_CreateKernelsInProgram = GetProcAddress(hModule, "clCreateKernelsInProgram");
*(void**)&cl_RetainKernel = GetProcAddress(hModule, "clRetainKernel");
*(void**)&cl_ReleaseKernel = GetProcAddress(hModule, "clReleaseKernel");
*(void**)&cl_SetKernelArg = GetProcAddress(hModule, "clSetKernelArg");
*(void**)&cl_SetKernelArgSVMPointer = GetProcAddress(hModule, "clSetKernelArgSVMPointer");
*(void**)&cl_SetKernelExecInfo = GetProcAddress(hModule, "clSetKernelExecInfo");
*(void**)&cl_GetKernelInfo = GetProcAddress(hModule, "clGetKernelInfo");
*(void**)&cl_GetKernelArgInfo = GetProcAddress(hModule, "clGetKernelArgInfo");
*(void**)&cl_GetKernelWorkGroupInfo = GetProcAddress(hModule, "clGetKernelWorkGroupInfo");
*(void**)&cl_WaitForEvents = GetProcAddress(hModule, "clWaitForEvents");
*(void**)&cl_GetEventInfo = GetProcAddress(hModule, "clGetEventInfo");
*(void**)&cl_CreateUserEvent = GetProcAddress(hModule, "clCreateUserEvent");
*(void**)&cl_RetainEvent = GetProcAddress(hModule, "clRetainEvent");
*(void**)&cl_ReleaseEvent = GetProcAddress(hModule, "clReleaseEvent");
*(void**)&cl_SetUserEventStatus = GetProcAddress(hModule, "clSetUserEventStatus");
*(void**)&cl_SetEventCallback = GetProcAddress(hModule, "clSetEventCallback");
*(void**)&cl_GetEventProfilingInfo = GetProcAddress(hModule, "clGetEventProfilingInfo");
*(void**)&cl_Flush = GetProcAddress(hModule, "clFlush");
*(void**)&cl_Finish = GetProcAddress(hModule, "clFinish");
*(void**)&cl_EnqueueReadBuffer = GetProcAddress(hModule, "clEnqueueReadBuffer");
*(void**)&cl_EnqueueReadBufferRect = GetProcAddress(hModule, "clEnqueueReadBufferRect");
*(void**)&cl_EnqueueWriteBuffer = GetProcAddress(hModule, "clEnqueueWriteBuffer");
*(void**)&cl_EnqueueWriteBufferRect = GetProcAddress(hModule, "clEnqueueWriteBufferRect");
*(void**)&cl_EnqueueFillBuffer = GetProcAddress(hModule, "clEnqueueFillBuffer");
*(void**)&cl_EnqueueCopyBuffer = GetProcAddress(hModule, "clEnqueueCopyBuffer");
*(void**)&cl_EnqueueCopyBufferRect = GetProcAddress(hModule, "clEnqueueCopyBufferRect");
*(void**)&cl_EnqueueReadImage = GetProcAddress(hModule, "clEnqueueReadImage");
*(void**)&cl_EnqueueWriteImage = GetProcAddress(hModule, "clEnqueueWriteImage");
*(void**)&cl_EnqueueFillImage = GetProcAddress(hModule, "clEnqueueFillImage");
*(void**)&cl_EnqueueCopyImage = GetProcAddress(hModule, "clEnqueueCopyImage");
*(void**)&cl_EnqueueCopyImageToBuffer = GetProcAddress(hModule, "clEnqueueCopyImageToBuffer");
*(void**)&cl_EnqueueCopyBufferToImage = GetProcAddress(hModule, "clEnqueueCopyBufferToImage");
*(void**)&cl_EnqueueMapBuffer = GetProcAddress(hModule, "clEnqueueMapBuffer");
*(void**)&cl_EnqueueMapImage = GetProcAddress(hModule, "clEnqueueMapImage");
*(void**)&cl_EnqueueUnmapMemObject = GetProcAddress(hModule, "clEnqueueUnmapMemObject");
*(void**)&cl_EnqueueMigrateMemObjects = GetProcAddress(hModule, "clEnqueueMigrateMemObjects");
*(void**)&cl_EnqueueNDRangeKernel = GetProcAddress(hModule, "clEnqueueNDRangeKernel");
*(void**)&cl_EnqueueNativeKernel = GetProcAddress(hModule, "clEnqueueNativeKernel");
*(void**)&cl_EnqueueMarkerWithWaitList = GetProcAddress(hModule, "clEnqueueMarkerWithWaitList");
*(void**)&cl_EnqueueBarrierWithWaitList = GetProcAddress(hModule, "clEnqueueBarrierWithWaitList");
*(void**)&cl_EnqueueSVMFree = GetProcAddress(hModule, "clEnqueueSVMFree");
*(void**)&cl_EnqueueSVMMemcpy = GetProcAddress(hModule, "clEnqueueSVMMemcpy");
*(void**)&cl_EnqueueSVMMemFill = GetProcAddress(hModule, "clEnqueueSVMMemFill");
*(void**)&cl_EnqueueSVMMap = GetProcAddress(hModule, "clEnqueueSVMMap");
*(void**)&cl_EnqueueSVMUnmap = GetProcAddress(hModule, "clEnqueueSVMUnmap");
*(void**)&cl_GetExtensionFunctionAddressForPlatform = GetProcAddress(hModule, "clGetExtensionFunctionAddressForPlatform");
*(void**)&cl_CreateImage2D = GetProcAddress(hModule, "clCreateImage2D");
*(void**)&cl_CreateImage3D = GetProcAddress(hModule, "clCreateImage3D");
*(void**)&cl_EnqueueMarker = GetProcAddress(hModule, "clEnqueueMarker");
*(void**)&cl_EnqueueWaitForEvents = GetProcAddress(hModule, "clEnqueueWaitForEvents");
*(void**)&cl_EnqueueBarrier = GetProcAddress(hModule, "clEnqueueBarrier");
*(void**)&cl_UnloadCompiler = GetProcAddress(hModule, "clUnloadCompiler");
*(void**)&cl_GetExtensionFunctionAddress = GetProcAddress(hModule, "clGetExtensionFunctionAddress");
*(void**)&cl_CreateCommandQueue = GetProcAddress(hModule, "clCreateCommandQueue");
*(void**)&cl_CreateSampler = GetProcAddress(hModule, "clCreateSampler");
*(void**)&cl_EnqueueTask = GetProcAddress(hModule, "clEnqueueTask");
}
} s_loader;
cl_int CL_API_CALL clGetPlatformIDs(cl_uint num_entries, cl_platform_id* platforms, cl_uint* num_platforms) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetPlatformIDs(num_entries, platforms, num_platforms);
}
cl_int CL_API_CALL clGetPlatformInfo(cl_platform_id platform, cl_platform_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetPlatformInfo(platform, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL clGetDeviceIDs(cl_platform_id platform, cl_device_type device_type, cl_uint num_entries, cl_device_id* devices, cl_uint* num_devices) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetDeviceIDs(platform, device_type, num_entries, devices, num_devices);
}
cl_int CL_API_CALL clGetDeviceInfo(cl_device_id device, cl_device_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetDeviceInfo(device, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL clCreateSubDevices(cl_device_id in_device, const cl_device_partition_property* properties, cl_uint num_devices, cl_device_id* out_devices, cl_uint* num_devices_ret) CL_API_SUFFIX__VERSION_1_2
{
return cl_CreateSubDevices(in_device, properties, num_devices, out_devices, num_devices_ret);
}
cl_int CL_API_CALL clRetainDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2
{
return cl_RetainDevice(device);
}
cl_int CL_API_CALL clReleaseDevice(cl_device_id device) CL_API_SUFFIX__VERSION_1_2
{
return cl_ReleaseDevice(device);
}
cl_context CL_API_CALL clCreateContext(const cl_context_properties* properties, cl_uint num_devices, const cl_device_id* devices, void (CL_CALLBACK* pfn_notify)(const char*, const void*, size_t, void*), void* user_data, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_CreateContext(properties, num_devices, devices, pfn_notify, user_data, errcode_ret);
}
cl_context CL_API_CALL clCreateContextFromType(const cl_context_properties* properties, cl_device_type device_type, void (CL_CALLBACK* pfn_notify)(const char*, const void*, size_t, void*), void* user_data, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_CreateContextFromType(properties, device_type, pfn_notify, user_data, errcode_ret);
}
cl_int CL_API_CALL clRetainContext(cl_context context) CL_API_SUFFIX__VERSION_1_0
{
return cl_RetainContext(context);
}
cl_int CL_API_CALL clReleaseContext(cl_context context) CL_API_SUFFIX__VERSION_1_0
{
return cl_ReleaseContext(context);
}
cl_int CL_API_CALL clGetContextInfo(cl_context context, cl_context_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetContextInfo(context, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_command_queue CL_API_CALL clCreateCommandQueueWithProperties(cl_context context, cl_device_id device, const cl_queue_properties* properties, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_0
{
return cl_CreateCommandQueueWithProperties(context, device, properties, errcode_ret);
}
cl_int CL_API_CALL clRetainCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0
{
return cl_RetainCommandQueue(command_queue);
}
cl_int CL_API_CALL clReleaseCommandQueue(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0
{
return cl_ReleaseCommandQueue(command_queue);
}
cl_int CL_API_CALL clGetCommandQueueInfo(cl_command_queue command_queue, cl_command_queue_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetCommandQueueInfo(command_queue, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_mem CL_API_CALL clCreateBuffer(cl_context context, cl_mem_flags flags, size_t size, void* host_ptr, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_CreateBuffer(context, flags, size, host_ptr, errcode_ret);
}
cl_mem CL_API_CALL clCreateSubBuffer(cl_mem buffer, cl_mem_flags flags, cl_buffer_create_type buffer_create_type, const void* buffer_create_info, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1
{
return cl_CreateSubBuffer(buffer, flags, buffer_create_type, buffer_create_info, errcode_ret);
}
cl_mem CL_API_CALL clCreateImage(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, const cl_image_desc* image_desc, void* host_ptr, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2
{
return cl_CreateImage(context, flags, image_format, image_desc, host_ptr, errcode_ret);
}
cl_mem CL_API_CALL clCreatePipe(cl_context context, cl_mem_flags flags, cl_uint pipe_packet_size, cl_uint pipe_max_packets, const cl_pipe_properties* properties, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_0
{
return cl_CreatePipe(context, flags, pipe_packet_size, pipe_max_packets, properties, errcode_ret);
}
cl_int CL_API_CALL clRetainMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0
{
return cl_RetainMemObject(memobj);
}
cl_int CL_API_CALL clReleaseMemObject(cl_mem memobj) CL_API_SUFFIX__VERSION_1_0
{
return cl_ReleaseMemObject(memobj);
}
cl_int CL_API_CALL clGetSupportedImageFormats(cl_context context, cl_mem_flags flags, cl_mem_object_type image_type, cl_uint num_entries, cl_image_format* image_formats, cl_uint* num_image_formats) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetSupportedImageFormats(context, flags, image_type, num_entries, image_formats, num_image_formats);
}
cl_int CL_API_CALL clGetMemObjectInfo(cl_mem memobj, cl_mem_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetMemObjectInfo(memobj, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL clGetImageInfo(cl_mem image, cl_image_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetImageInfo(image, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL clGetPipeInfo(cl_mem pipe, cl_pipe_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_2_0
{
return cl_GetPipeInfo(pipe, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL clSetMemObjectDestructorCallback(cl_mem memobj, void (CL_CALLBACK* pfn_notify)(cl_mem memobj, void* user_data), void* user_data) CL_API_SUFFIX__VERSION_1_1
{
return cl_SetMemObjectDestructorCallback(memobj, pfn_notify, user_data);
}
void* CL_API_CALL clSVMAlloc(cl_context context, cl_svm_mem_flags flags, size_t size, cl_uint alignment) CL_API_SUFFIX__VERSION_2_0
{
return cl_SVMAlloc(context, flags, size, alignment);
}
void CL_API_CALL clSVMFree(cl_context context, void* svm_pointer) CL_API_SUFFIX__VERSION_2_0
{
cl_SVMFree(context, svm_pointer);
}
cl_sampler CL_API_CALL clCreateSamplerWithProperties(cl_context context, const cl_sampler_properties* normalized_coords, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_2_0
{
return cl_CreateSamplerWithProperties(context, normalized_coords, errcode_ret);
}
cl_int CL_API_CALL clRetainSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0
{
return cl_RetainSampler(sampler);
}
cl_int CL_API_CALL clReleaseSampler(cl_sampler sampler) CL_API_SUFFIX__VERSION_1_0
{
return cl_ReleaseSampler(sampler);
}
cl_int CL_API_CALL clGetSamplerInfo(cl_sampler sampler, cl_sampler_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetSamplerInfo(sampler, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_program CL_API_CALL clCreateProgramWithSource(cl_context context, cl_uint count, const char** strings, const size_t* lengths, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_CreateProgramWithSource(context, count, strings, lengths, errcode_ret);
}
cl_program CL_API_CALL clCreateProgramWithBinary(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const size_t* lengths, const unsigned char** binaries, cl_int* binary_status, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_CreateProgramWithBinary(context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret);
}
cl_program CL_API_CALL clCreateProgramWithBuiltInKernels(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const char* kernel_names, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2
{
return cl_CreateProgramWithBuiltInKernels(context, num_devices, device_list, kernel_names, errcode_ret);
}
cl_int CL_API_CALL clRetainProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0
{
return cl_RetainProgram(program);
}
cl_int CL_API_CALL clReleaseProgram(cl_program program) CL_API_SUFFIX__VERSION_1_0
{
return cl_ReleaseProgram(program);
}
cl_int CL_API_CALL clBuildProgram(cl_program program, cl_uint num_devices, const cl_device_id* device_list, const char* options, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data) CL_API_SUFFIX__VERSION_1_0
{
return cl_BuildProgram(program, num_devices, device_list, options, pfn_notify, user_data);
}
cl_int CL_API_CALL clCompileProgram(cl_program program, cl_uint num_devices, const cl_device_id* device_list, const char* options, cl_uint num_input_headers, const cl_program* input_headers, const char** header_include_names, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data) CL_API_SUFFIX__VERSION_1_2
{
return cl_CompileProgram(program, num_devices, device_list, options, num_input_headers, input_headers, header_include_names, pfn_notify, user_data);
}
cl_program CL_API_CALL clLinkProgram(cl_context context, cl_uint num_devices, const cl_device_id* device_list, const char* options, cl_uint num_input_programs, const cl_program* input_programs, void (CL_CALLBACK* pfn_notify)(cl_program program, void* user_data), void* user_data, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_2
{
return cl_LinkProgram(context, num_devices, device_list, options, num_input_programs, input_programs, pfn_notify, user_data, errcode_ret);
}
cl_int CL_API_CALL clUnloadPlatformCompiler(cl_platform_id platform) CL_API_SUFFIX__VERSION_1_2
{
return cl_UnloadPlatformCompiler(platform);
}
cl_int CL_API_CALL clGetProgramInfo(cl_program program, cl_program_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetProgramInfo(program, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL clGetProgramBuildInfo(cl_program program, cl_device_id device, cl_program_build_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetProgramBuildInfo(program, device, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_kernel CL_API_CALL clCreateKernel(cl_program program, const char* kernel_name, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_CreateKernel(program, kernel_name, errcode_ret);
}
cl_int CL_API_CALL clCreateKernelsInProgram(cl_program program, cl_uint num_kernels, cl_kernel* kernels, cl_uint* num_kernels_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_CreateKernelsInProgram(program, num_kernels, kernels, num_kernels_ret);
}
cl_int CL_API_CALL clRetainKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0
{
return cl_RetainKernel(kernel);
}
cl_int CL_API_CALL clReleaseKernel(cl_kernel kernel) CL_API_SUFFIX__VERSION_1_0
{
return cl_ReleaseKernel(kernel);
}
cl_int CL_API_CALL clSetKernelArg(cl_kernel kernel, cl_uint arg_index, size_t arg_size, const void* arg_value) CL_API_SUFFIX__VERSION_1_0
{
return cl_SetKernelArg(kernel, arg_index, arg_size, arg_value);
}
cl_int CL_API_CALL clSetKernelArgSVMPointer(cl_kernel kernel, cl_uint arg_index, const void* arg_value) CL_API_SUFFIX__VERSION_2_0
{
return cl_SetKernelArgSVMPointer(kernel, arg_index, arg_value);
}
cl_int CL_API_CALL clSetKernelExecInfo(cl_kernel kernel, cl_kernel_exec_info param_name, size_t param_value_size, const void* param_value) CL_API_SUFFIX__VERSION_2_0
{
return cl_SetKernelExecInfo(kernel, param_name, param_value_size, param_value);
}
cl_int CL_API_CALL clGetKernelInfo(cl_kernel kernel, cl_kernel_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetKernelInfo(kernel, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL clGetKernelArgInfo(cl_kernel kernel, cl_uint arg_indx, cl_kernel_arg_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_2
{
return cl_GetKernelArgInfo(kernel, arg_indx, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL clGetKernelWorkGroupInfo(cl_kernel kernel, cl_device_id device, cl_kernel_work_group_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetKernelWorkGroupInfo(kernel, device, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL clWaitForEvents(cl_uint num_events, const cl_event* event_list) CL_API_SUFFIX__VERSION_1_0
{
return cl_WaitForEvents(num_events, event_list);
}
cl_int CL_API_CALL clGetEventInfo(cl_event event, cl_event_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetEventInfo(event, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_event CL_API_CALL clCreateUserEvent(cl_context context, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_1
{
return cl_CreateUserEvent(context, errcode_ret);
}
cl_int CL_API_CALL clRetainEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0
{
return cl_RetainEvent(event);
}
cl_int CL_API_CALL clReleaseEvent(cl_event event) CL_API_SUFFIX__VERSION_1_0
{
return cl_ReleaseEvent(event);
}
cl_int CL_API_CALL clSetUserEventStatus(cl_event event, cl_int execution_status) CL_API_SUFFIX__VERSION_1_1
{
return cl_SetUserEventStatus(event, execution_status);
}
cl_int CL_API_CALL clSetEventCallback(cl_event event, cl_int command_exec_callback_type, void (CL_CALLBACK* pfn_notify)(cl_event, cl_int, void*), void* user_data) CL_API_SUFFIX__VERSION_1_1
{
return cl_SetEventCallback(event, command_exec_callback_type, pfn_notify, user_data);
}
cl_int CL_API_CALL clGetEventProfilingInfo(cl_event event, cl_profiling_info param_name, size_t param_value_size, void* param_value, size_t* param_value_size_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_GetEventProfilingInfo(event, param_name, param_value_size, param_value, param_value_size_ret);
}
cl_int CL_API_CALL clFlush(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0
{
return cl_Flush(command_queue);
}
cl_int CL_API_CALL clFinish(cl_command_queue command_queue) CL_API_SUFFIX__VERSION_1_0
{
return cl_Finish(command_queue);
}
cl_int CL_API_CALL clEnqueueReadBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, size_t offset, size_t size, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueReadBuffer(command_queue, buffer, blocking_read, offset, size, ptr, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueReadBufferRect(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_read, const size_t* buffer_offset, const size_t* host_offset, const size_t* region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_1
{
return cl_EnqueueReadBufferRect(command_queue, buffer, blocking_read, buffer_offset, host_offset, region, buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueWriteBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, size_t offset, size_t size, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueWriteBuffer(command_queue, buffer, blocking_write, offset, size, ptr, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueWriteBufferRect(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_write, const size_t* buffer_offset, const size_t* host_offset, const size_t* region, size_t buffer_row_pitch, size_t buffer_slice_pitch, size_t host_row_pitch, size_t host_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_1
{
return cl_EnqueueWriteBufferRect(command_queue, buffer, blocking_write, buffer_offset, host_offset, region, buffer_row_pitch, buffer_slice_pitch, host_row_pitch, host_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueFillBuffer(cl_command_queue command_queue, cl_mem buffer, const void* pattern, size_t pattern_size, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2
{
return cl_EnqueueFillBuffer(command_queue, buffer, pattern, pattern_size, offset, size, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueCopyBuffer(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, size_t src_offset, size_t dst_offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueCopyBuffer(command_queue, src_buffer, dst_buffer, src_offset, dst_offset, size, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueCopyBufferRect(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_buffer, const size_t* src_origin, const size_t* dst_origin, const size_t* region, size_t src_row_pitch, size_t src_slice_pitch, size_t dst_row_pitch, size_t dst_slice_pitch, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_1
{
return cl_EnqueueCopyBufferRect(command_queue, src_buffer, dst_buffer, src_origin, dst_origin, region, src_row_pitch, src_slice_pitch, dst_row_pitch, dst_slice_pitch, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueReadImage(cl_command_queue command_queue, cl_mem image, cl_bool blocking_read, const size_t* origin, const size_t* region, size_t row_pitch, size_t slice_pitch, void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueReadImage(command_queue, image, blocking_read, origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueWriteImage(cl_command_queue command_queue, cl_mem image, cl_bool blocking_write, const size_t* origin, const size_t* region, size_t input_row_pitch, size_t input_slice_pitch, const void* ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueWriteImage(command_queue, image, blocking_write, origin, region, input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueFillImage(cl_command_queue command_queue, cl_mem image, const void* fill_color, const size_t* origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2
{
return cl_EnqueueFillImage(command_queue, image, fill_color, origin, region, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueCopyImage(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_image, const size_t* src_origin, const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueCopyImage(command_queue, src_image, dst_image, src_origin, dst_origin, region, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueCopyImageToBuffer(cl_command_queue command_queue, cl_mem src_image, cl_mem dst_buffer, const size_t* src_origin, const size_t* region, size_t dst_offset, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueCopyImageToBuffer(command_queue, src_image, dst_buffer, src_origin, region, dst_offset, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueCopyBufferToImage(cl_command_queue command_queue, cl_mem src_buffer, cl_mem dst_image, size_t src_offset, const size_t* dst_origin, const size_t* region, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueCopyBufferToImage(command_queue, src_buffer, dst_image, src_offset, dst_origin, region, num_events_in_wait_list, event_wait_list, event);
}
void* CL_API_CALL clEnqueueMapBuffer(cl_command_queue command_queue, cl_mem buffer, cl_bool blocking_map, cl_map_flags map_flags, size_t offset, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueMapBuffer(command_queue, buffer, blocking_map, map_flags, offset, size, num_events_in_wait_list, event_wait_list, event, errcode_ret);
}
void* CL_API_CALL clEnqueueMapImage(cl_command_queue command_queue, cl_mem image, cl_bool blocking_map, cl_map_flags map_flags, const size_t* origin, const size_t* region, size_t* image_row_pitch, size_t* image_slice_pitch, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event, cl_int* errcode_ret) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueMapImage(command_queue, image, blocking_map, map_flags, origin, region, image_row_pitch, image_slice_pitch, num_events_in_wait_list, event_wait_list, event, errcode_ret);
}
cl_int CL_API_CALL clEnqueueUnmapMemObject(cl_command_queue command_queue, cl_mem memobj, void* mapped_ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueUnmapMemObject(command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueMigrateMemObjects(cl_command_queue command_queue, cl_uint num_mem_objects, const cl_mem* mem_objects, cl_mem_migration_flags flags, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2
{
return cl_EnqueueMigrateMemObjects(command_queue, num_mem_objects, mem_objects, flags, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueNDRangeKernel(cl_command_queue command_queue, cl_kernel kernel, cl_uint work_dim, const size_t* global_work_offset, const size_t* global_work_size, const size_t* local_work_size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueNDRangeKernel(command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueNativeKernel(cl_command_queue command_queue, void (CL_CALLBACK* user_func)(void*), void* args, size_t cb_args, cl_uint num_mem_objects, const cl_mem* mem_list, const void** args_mem_loc, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_0
{
return cl_EnqueueNativeKernel(command_queue, user_func, args, cb_args, num_mem_objects, mem_list, args_mem_loc, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueMarkerWithWaitList(cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2
{
return cl_EnqueueMarkerWithWaitList(command_queue, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueBarrierWithWaitList(cl_command_queue command_queue, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_1_2
{
return cl_EnqueueBarrierWithWaitList(command_queue, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueSVMFree(cl_command_queue command_queue, cl_uint num_svm_pointers, void* svm_pointers[], void (CL_CALLBACK* pfn_free_func)(cl_command_queue queue, cl_uint num_svm_pointers, void* svm_pointers[], void* user_data), void* user_data, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0
{
return cl_EnqueueSVMFree(command_queue, num_svm_pointers, svm_pointers, pfn_free_func, user_data, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueSVMMemcpy(cl_command_queue command_queue, cl_bool blocking_copy, void* dst_ptr, const void* src_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0
{
return cl_EnqueueSVMMemcpy(command_queue, blocking_copy, dst_ptr, src_ptr, size, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueSVMMemFill(cl_command_queue command_queue, void* svm_ptr, const void* pattern, size_t pattern_size, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0
{
return cl_EnqueueSVMMemFill(command_queue, svm_ptr, pattern, pattern_size, size, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueSVMMap(cl_command_queue command_queue, cl_bool blocking_map, cl_map_flags flags, void* svm_ptr, size_t size, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0
{
return cl_EnqueueSVMMap(command_queue, blocking_map, flags, svm_ptr, size, num_events_in_wait_list, event_wait_list, event);
}
cl_int CL_API_CALL clEnqueueSVMUnmap(cl_command_queue command_queue, void* svm_ptr, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event) CL_API_SUFFIX__VERSION_2_0
{
return cl_EnqueueSVMUnmap(command_queue, svm_ptr, num_events_in_wait_list, event_wait_list, event);
}
void* CL_API_CALL clGetExtensionFunctionAddressForPlatform(cl_platform_id platform, const char* func_name) CL_API_SUFFIX__VERSION_1_2
{
return cl_GetExtensionFunctionAddressForPlatform(platform, func_name);
}
cl_mem CL_API_CALL clCreateImage2D(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, size_t image_width, size_t image_height, size_t image_row_pitch, void* host_ptr, cl_int* errcode_ret)
{
return cl_CreateImage2D(context, flags, image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret);
}
cl_mem CL_API_CALL clCreateImage3D(cl_context context, cl_mem_flags flags, const cl_image_format* image_format, size_t image_width, size_t image_height, size_t image_depth, size_t image_row_pitch, size_t image_slice_pitch, void* host_ptr, cl_int* errcode_ret)
{
return cl_CreateImage3D(context, flags, image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret);
}
cl_int CL_API_CALL clEnqueueMarker(cl_command_queue command_queue, cl_event* event)
{
return cl_EnqueueMarker(command_queue, event);
}
cl_int CL_API_CALL clEnqueueWaitForEvents(cl_command_queue command_queue, cl_uint num_events, const cl_event* event_list)
{
return cl_EnqueueWaitForEvents(command_queue, num_events, event_list);
}
cl_int CL_API_CALL clEnqueueBarrier(cl_command_queue command_queue)
{
return cl_EnqueueBarrier(command_queue);
}
cl_int CL_API_CALL clUnloadCompiler(void)
{
return cl_UnloadCompiler();
}
void* CL_API_CALL clGetExtensionFunctionAddress(const char* func_name)
{
return cl_GetExtensionFunctionAddress(func_name);
}
cl_command_queue CL_API_CALL clCreateCommandQueue(cl_context context, cl_device_id device, cl_command_queue_properties properties, cl_int* errcode_ret)
{
return cl_CreateCommandQueue(context, device, properties, errcode_ret);
}
cl_sampler CL_API_CALL clCreateSampler(cl_context context, cl_bool normalized_coords, cl_addressing_mode addressing_mode, cl_filter_mode filter_mode, cl_int* errcode_ret)
{
return cl_CreateSampler(context, normalized_coords, addressing_mode, filter_mode, errcode_ret);
}
cl_int CL_API_CALL clEnqueueTask(cl_command_queue command_queue, cl_kernel kernel, cl_uint num_events_in_wait_list, const cl_event* event_wait_list, cl_event* event)
{
return cl_EnqueueTask(command_queue, kernel, num_events_in_wait_list, event_wait_list, event);
}

160
3rdparty/opencl/opencl.vcxproj vendored Normal file
View File

@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="12.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<ProjectGuid>{D80D4A75-C385-41BD-AE62-83D2E2B595A7}</ProjectGuid>
<Keyword>Win32Proj</Keyword>
<RootNamespace>opencl</RootNamespace>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v120</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>MultiByte</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DefaultProjectRootDir.props" />
<Import Project="..\3rdparty.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DefaultProjectRootDir.props" />
<Import Project="..\3rdparty.props" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DefaultProjectRootDir.props" />
<Import Project="..\3rdparty.props" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
<Import Project="..\DefaultProjectRootDir.props" />
<Import Project="..\3rdparty.props" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" />
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<Lib />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<PrecompiledHeader>
</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<Optimization>Disabled</Optimization>
<PreprocessorDefinitions>WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
<Lib />
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<PrecompiledHeader>
</PrecompiledHeader>
<Optimization>MaxSpeed</Optimization>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<PreprocessorDefinitions>WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="CL\cl.h" />
<ClInclude Include="CL\cl.hpp" />
<ClInclude Include="CL\cl_d3d10.h" />
<ClInclude Include="CL\cl_d3d11.h" />
<ClInclude Include="CL\cl_d3d9.h" />
<ClInclude Include="CL\cl_egl.h" />
<ClInclude Include="CL\cl_ext.h" />
<ClInclude Include="CL\cl_gl.h" />
<ClInclude Include="CL\cl_gl_ext.h" />
<ClInclude Include="CL\cl_platform.h" />
<ClInclude Include="CL\opencl.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="opencl.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>

57
3rdparty/opencl/opencl.vcxproj.filters vendored Normal file
View File

@@ -0,0 +1,57 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="Source Files">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="Header Files">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;hm;inl;inc;xsd</Extensions>
</Filter>
<Filter Include="Resource Files">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CL\cl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CL\cl.hpp">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CL\cl_d3d10.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CL\cl_d3d11.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CL\cl_d3d9.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CL\cl_egl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CL\cl_ext.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CL\cl_gl.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CL\cl_gl_ext.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CL\cl_platform.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="CL\opencl.h">
<Filter>Header Files</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="opencl.cpp">
<Filter>Source Files</Filter>
</ClCompile>
</ItemGroup>
</Project>

View File

@@ -1,349 +0,0 @@
# $Id: $
#
# For a "How-To" please refer to the Portaudio documentation at:
# http://www.portaudio.com/trac/wiki/TutorialDir/Compile/CMake
#
PROJECT( portaudio )
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
OPTION(PA_CONFIG_LIB_OUTPUT_PATH "Make sure that output paths are kept neat" OFF)
IF(CMAKE_CL_64)
SET(TARGET_POSTFIX x64)
IF(PA_CONFIG_LIB_OUTPUT_PATH)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin/x64)
ENDIF(PA_CONFIG_LIB_OUTPUT_PATH)
ELSE(CMAKE_CL_64)
SET(TARGET_POSTFIX x86)
IF(PA_CONFIG_LIB_OUTPUT_PATH)
SET(LIBRARY_OUTPUT_PATH ${CMAKE_CURRENT_BINARY_DIR}/bin/Win32)
ENDIF(PA_CONFIG_LIB_OUTPUT_PATH)
ENDIF(CMAKE_CL_64)
OPTION(PA_ENABLE_DEBUG_OUTPUT "Enable debug output for Portaudio" OFF)
IF(PA_ENABLE_DEBUG_OUTPUT)
ADD_DEFINITIONS(-DPA_ENABLE_DEBUG_OUTPUT)
ENDIF(PA_ENABLE_DEBUG_OUTPUT)
IF(WIN32 AND MSVC)
OPTION(PA_DLL_LINK_WITH_STATIC_RUNTIME "Link with static runtime libraries (minimizes runtime dependencies)" ON)
IF(PA_DLL_LINK_WITH_STATIC_RUNTIME)
FOREACH(flag_var
CMAKE_C_FLAGS CMAKE_C_FLAGS_DEBUG CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_MINSIZEREL CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS CMAKE_CXX_FLAGS_DEBUG CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_MINSIZEREL CMAKE_CXX_FLAGS_RELWITHDEBINFO)
IF(${flag_var} MATCHES "/MD")
STRING(REGEX REPLACE "/MD" "/MT" ${flag_var} "${${flag_var}}")
ENDIF(${flag_var} MATCHES "/MD")
ENDFOREACH(flag_var)
ENDIF(PA_DLL_LINK_WITH_STATIC_RUNTIME)
ENDIF(WIN32 AND MSVC)
IF(WIN32)
OPTION(PA_UNICODE_BUILD "Enable Portaudio Unicode build" ON)
SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake_support)
# Try to find DirectX SDK
FIND_PACKAGE(DXSDK)
# Try to find ASIO SDK (assumes that portaudio and asiosdk folders are side-by-side, see
# http://www.portaudio.com/trac/wiki/TutorialDir/Compile/WindowsASIOMSVC)
FIND_PACKAGE(ASIOSDK)
IF(ASIOSDK_FOUND)
OPTION(PA_USE_ASIO "Enable support for ASIO" ON)
ELSE(ASIOSDK_FOUND)
OPTION(PA_USE_ASIO "Enable support for ASIO" OFF)
ENDIF(ASIOSDK_FOUND)
IF(DXSDK_FOUND)
OPTION(PA_USE_DS "Enable support for DirectSound" ON)
ELSE(DXSDK_FOUND)
OPTION(PA_USE_DS "Enable support for DirectSound" OFF)
ENDIF(DXSDK_FOUND)
OPTION(PA_USE_WMME "Enable support for MME" ON)
OPTION(PA_USE_WASAPI "Enable support for WASAPI" ON)
OPTION(PA_USE_WDMKS "Enable support for WDMKS" ON)
OPTION(PA_USE_WDMKS_DEVICE_INFO "Use WDM/KS API for device info" ON)
MARK_AS_ADVANCED(PA_USE_WDMKS_DEVICE_INFO)
IF(PA_USE_DS)
OPTION(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE "Use DirectSound full duplex create" ON)
MARK_AS_ADVANCED(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE)
ENDIF(PA_USE_DS)
ENDIF(WIN32)
# Set variables for DEF file expansion
IF(NOT PA_USE_ASIO)
SET(DEF_EXCLUDE_ASIO_SYMBOLS ";")
ENDIF(NOT PA_USE_ASIO)
IF(NOT PA_USE_WASAPI)
SET(DEF_EXCLUDE_WASAPI_SYMBOLS ";")
ENDIF(NOT PA_USE_WASAPI)
IF(PA_USE_WDMKS_DEVICE_INFO)
ADD_DEFINITIONS(-DPAWIN_USE_WDMKS_DEVICE_INFO)
ENDIF(PA_USE_WDMKS_DEVICE_INFO)
IF(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE)
ADD_DEFINITIONS(-DPAWIN_USE_DIRECTSOUNDFULLDUPLEXCREATE)
ENDIF(PA_USE_DIRECTSOUNDFULLDUPLEXCREATE)
#######################################
IF(WIN32)
INCLUDE_DIRECTORIES(src/os/win)
ENDIF(WIN32)
IF(PA_USE_ASIO)
INCLUDE_DIRECTORIES(${ASIOSDK_ROOT_DIR}/common)
INCLUDE_DIRECTORIES(${ASIOSDK_ROOT_DIR}/host)
INCLUDE_DIRECTORIES(${ASIOSDK_ROOT_DIR}/host/pc)
SET(PA_ASIO_INCLUDES
include/pa_asio.h
)
SET(PA_ASIO_SOURCES
src/hostapi/asio/pa_asio.cpp
)
SET(PA_ASIOSDK_SOURCES
${ASIOSDK_ROOT_DIR}/common/asio.cpp
${ASIOSDK_ROOT_DIR}/host/pc/asiolist.cpp
${ASIOSDK_ROOT_DIR}/host/asiodrivers.cpp
)
SOURCE_GROUP("hostapi\\ASIO" FILES
${PA_ASIO_SOURCES}
)
SOURCE_GROUP("hostapi\\ASIO\\ASIOSDK" FILES
${PA_ASIOSDK_SOURCES}
)
ENDIF(PA_USE_ASIO)
IF(PA_USE_DS)
INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
INCLUDE_DIRECTORIES(src/os/win)
SET(PA_DS_INCLUDES
include/pa_win_ds.h
src/hostapi/dsound/pa_win_ds_dynlink.h
)
SET(PA_DS_SOURCES
src/hostapi/dsound/pa_win_ds.c
src/hostapi/dsound/pa_win_ds_dynlink.c
)
SOURCE_GROUP("hostapi\\dsound" FILES
${PA_DS_INCLUDES}
${PA_DS_SOURCES}
)
ENDIF(PA_USE_DS)
IF(PA_USE_WMME)
SET(PA_WMME_INCLUDES
include/pa_win_wmme.h
)
SET(PA_WMME_SOURCES
src/hostapi/wmme/pa_win_wmme.c
)
SOURCE_GROUP("hostapi\\wmme" FILES
${PA_WMME_SOURCES}
)
ENDIF(PA_USE_WMME)
IF(PA_USE_WASAPI)
SET(PA_WASAPI_INCLUDES
include/pa_win_wasapi.h
)
SET(PA_WASAPI_SOURCES
src/hostapi/wasapi/pa_win_wasapi.c
)
SOURCE_GROUP("hostapi\\wasapi" FILES
${PA_WASAPI_SOURCES}
)
ENDIF(PA_USE_WASAPI)
IF(PA_USE_WDMKS)
SET(PA_WDMKS_INCLUDES
include/pa_win_wdmks.h
)
SET(PA_WDMKS_SOURCES
src/hostapi/wdmks/pa_win_wdmks.c
)
SOURCE_GROUP("hostapi\\wdmks" FILES
${PA_WDMKS_SOURCES}
)
ENDIF(PA_USE_WDMKS)
SET(PA_SKELETON_SOURCES
src/hostapi/skeleton/pa_hostapi_skeleton.c
)
SOURCE_GROUP("hostapi\\skeleton"
${PA_SKELETON_SOURCES})
#######################################
IF(WIN32)
SET(PA_INCLUDES
include/portaudio.h
${PA_ASIO_INCLUDES}
${PA_DS_INCLUDES}
${PA_WMME_INCLUDES}
${PA_WASAPI_INCLUDES}
${PA_WDMKS_INCLUDES}
)
ENDIF(WIN32)
SOURCE_GROUP("include" FILES
${PA_INCLUDES}
)
SET(PA_COMMON_INCLUDES
src/common/pa_allocation.h
src/common/pa_converters.h
src/common/pa_cpuload.h
src/common/pa_debugprint.h
src/common/pa_dither.h
src/common/pa_endianness.h
src/common/pa_hostapi.h
src/common/pa_memorybarrier.h
src/common/pa_process.h
src/common/pa_ringbuffer.h
src/common/pa_stream.h
src/common/pa_trace.h
src/common/pa_types.h
src/common/pa_util.h
)
SET(PA_COMMON_SOURCES
src/common/pa_allocation.c
src/common/pa_converters.c
src/common/pa_cpuload.c
src/common/pa_debugprint.c
src/common/pa_dither.c
src/common/pa_front.c
src/common/pa_process.c
src/common/pa_ringbuffer.c
src/common/pa_stream.c
src/common/pa_trace.c
)
SOURCE_GROUP("common" FILES
${PA_COMMON_INCLUDES}
${PA_COMMON_SOURCES}
)
SOURCE_GROUP("cmake_generated" FILES
${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def
${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h
)
IF(WIN32)
SET(PA_PLATFORM_SOURCES
src/os/win/pa_win_hostapis.c
src/os/win/pa_win_util.c
src/os/win/pa_win_waveformat.c
src/os/win/pa_win_wdmks_utils.c
src/os/win/pa_win_coinitialize.c
src/os/win/pa_x86_plain_converters.c
)
SOURCE_GROUP("os\\win" FILES
${PA_PLATFORM_SOURCES}
)
ENDIF(WIN32)
INCLUDE_DIRECTORIES( include )
INCLUDE_DIRECTORIES( src/common )
IF(WIN32 AND MSVC)
ADD_DEFINITIONS(-D_CRT_SECURE_NO_WARNINGS)
ENDIF(WIN32 AND MSVC)
ADD_DEFINITIONS(-DPORTAUDIO_CMAKE_GENERATED)
INCLUDE_DIRECTORIES( ${CMAKE_CURRENT_BINARY_DIR} )
SET(SOURCES_LESS_ASIO_SDK
${PA_COMMON_SOURCES}
${PA_ASIO_SOURCES}
${PA_DS_SOURCES}
${PA_WMME_SOURCES}
${PA_WASAPI_SOURCES}
${PA_WDMKS_SOURCES}
${PA_SKELETON_SOURCES}
${PA_PLATFORM_SOURCES}
)
IF(PA_UNICODE_BUILD)
SET_SOURCE_FILES_PROPERTIES(
${SOURCES_LESS_ASIO_SDK}
PROPERTIES
COMPILE_DEFINITIONS "UNICODE;_UNICODE"
)
ENDIF(PA_UNICODE_BUILD)
ADD_LIBRARY(portaudio SHARED
${PA_INCLUDES}
${PA_COMMON_INCLUDES}
${SOURCES_LESS_ASIO_SDK}
${PA_ASIOSDK_SOURCES}
${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def
${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h
)
ADD_LIBRARY(portaudio_static STATIC
${PA_INCLUDES}
${PA_COMMON_INCLUDES}
${SOURCES_LESS_ASIO_SDK}
${PA_ASIOSDK_SOURCES}
${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h
)
# Configure the exports file according to settings
SET(GENERATED_MESSAGE "CMake generated file, do NOT edit! Use CMake-GUI to change configuration instead.")
CONFIGURE_FILE( cmake_support/template_portaudio.def ${CMAKE_CURRENT_BINARY_DIR}/portaudio_cmake.def @ONLY )
# Configure header for options (PA_USE_xxx)
CONFIGURE_FILE( cmake_support/options_cmake.h.in ${CMAKE_CURRENT_BINARY_DIR}/options_cmake.h @ONLY )
IF(WIN32)
# If we use DirectSound, we need this for the library to be found (if not in VS project settings)
IF(PA_USE_DS AND DXSDK_FOUND)
TARGET_LINK_LIBRARIES(portaudio ${DXSDK_DSOUND_LIBRARY})
ENDIF(PA_USE_DS AND DXSDK_FOUND)
# If we use WDM/KS we need setupapi.lib
IF(PA_USE_WDMKS)
TARGET_LINK_LIBRARIES(portaudio setupapi)
ENDIF(PA_USE_WDMKS)
SET_TARGET_PROPERTIES(portaudio PROPERTIES OUTPUT_NAME portaudio_${TARGET_POSTFIX})
SET_TARGET_PROPERTIES(portaudio_static PROPERTIES OUTPUT_NAME portaudio_static_${TARGET_POSTFIX})
ENDIF(WIN32)
OPTION(PA_BUILD_TESTS "Include test projects" OFF)
OPTION(PA_BUILD_EXAMPLES "Include example projects" OFF)
# Prepared for inclusion of test files
IF(PA_BUILD_TESTS)
SUBDIRS(test)
ENDIF(PA_BUILD_TESTS)
# Prepared for inclusion of test files
IF(PA_BUILD_EXAMPLES)
SUBDIRS(examples)
ENDIF(PA_BUILD_EXAMPLES)
#################################

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="ProjectRootDir"
>
<UserMacro
Name="ProjectRootDir"
Value="$(ProjectDir)\..\.."
/>
<UserMacro
Name="SvnRootDir"
Value="$(ProjectRootDir)\..\.."
/>
</VisualStudioPropertySheet>

View File

@@ -1,966 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="portaudio"
ProjectGUID="{0A18A071-125E-442F-AFF7-A3F68ABECF99}"
RootNamespace="portaudio"
TargetFrameworkVersion="131072"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\..\3rdpartyDLL.vsprops;..\..\..\..\common\vsprops\CodeGen_Release.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release_x86/portaudio.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\,..\..\src\os\win"
PreprocessorDefinitions="_USRDLL;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_DS=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;PA_USE_WMME=0;PA_USE_ASIO=1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="ksuser.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\..\3rdpartyDLL.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug_x86/portaudio.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\,..\..\src\os\win"
PreprocessorDefinitions="_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_DS=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;PA_USE_WMME=0;PA_USE_ASIO=1"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="ksuser.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release (NO ASIO)|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\..\3rdpartyDLL.vsprops;..\..\..\..\common\vsprops\CodeGen_Release.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
WholeProgramOptimization="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release_x86/portaudio.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\,..\..\src\os\win"
PreprocessorDefinitions="_USRDLL;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_DS=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;PA_USE_WMME=0;PA_USE_ASIO=0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="ksuser.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Debug (NO ASIO)|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\..\3rdpartyDLL.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="_DEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Debug_x86/portaudio.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\,..\..\src\os\win"
PreprocessorDefinitions="_DEBUG;_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_DS=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;PA_USE_WMME=0;PA_USE_ASIO=0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="_DEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="ksuser.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Devel (NO ASIO)|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\..\3rdpartyDLL.vsprops;..\..\..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
PreprocessorDefinitions="NDEBUG"
MkTypLibCompatible="true"
SuppressStartupBanner="true"
TargetEnvironment="1"
TypeLibraryName=".\Release_x86/portaudio.tlb"
HeaderFileName=""
/>
<Tool
Name="VCCLCompilerTool"
InlineFunctionExpansion="1"
AdditionalIncludeDirectories="..\..\src\common,..\..\include,.\,..\..\src\os\win"
PreprocessorDefinitions="_USRDLL;PA_ENABLE_DEBUG_OUTPUT;_CRT_SECURE_NO_DEPRECATE;PAWIN_USE_WDMKS_DEVICE_INFO;PA_USE_DS=1;PA_USE_WASAPI=1;PA_USE_WDMKS=1;PA_USE_WMME=0;PA_USE_ASIO=0"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
PreprocessorDefinitions="NDEBUG"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
AdditionalDependencies="ksuser.lib"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile="$(PlatformName)\$(ConfigurationName)\portaudio.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
>
<Filter
Name="common"
>
<File
RelativePath="..\..\src\common\pa_allocation.c"
>
</File>
<File
RelativePath="..\..\src\common\pa_converters.c"
>
</File>
<File
RelativePath="..\..\src\common\pa_cpuload.c"
>
</File>
<File
RelativePath="..\..\src\common\pa_debugprint.c"
>
</File>
<File
RelativePath="..\..\src\common\pa_dither.c"
>
</File>
<File
RelativePath="..\..\src\common\pa_front.c"
>
</File>
<File
RelativePath="..\..\src\common\pa_process.c"
>
</File>
<File
RelativePath="..\..\src\common\pa_ringbuffer.c"
>
</File>
<File
RelativePath="..\..\src\common\pa_stream.c"
>
</File>
<File
RelativePath="..\..\src\common\pa_trace.c"
>
</File>
</Filter>
<Filter
Name="hostapi"
>
<Filter
Name="ASIO"
>
<File
RelativePath="..\..\src\hostapi\asio\pa_asio.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Devel (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<Filter
Name="ASIOSDK"
>
<File
RelativePath="..\..\src\hostapi\asio\ASIOSDK\common\asio.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Devel (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\hostapi\asio\ASIOSDK\host\ASIOConvertSamples.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Devel (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\hostapi\asio\ASIOSDK\host\asiodrivers.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Devel (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\hostapi\asio\ASIOSDK\host\pc\asiolist.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Devel (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\hostapi\asio\ASIOSDK\common\combase.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Devel (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\hostapi\asio\ASIOSDK\common\debugmessage.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Devel (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\hostapi\asio\ASIOSDK\common\register.cpp"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Release (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Debug (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
<FileConfiguration
Name="Devel (NO ASIO)|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="..\..\src\hostapi\asio\ASIOSDK\host;..\..\src\hostapi\asio\ASIOSDK\host\pc;..\..\src\hostapi\asio\ASIOSDK\common"
PreprocessorDefinitions=""
/>
</FileConfiguration>
</File>
</Filter>
</Filter>
<Filter
Name="dsound"
>
<File
RelativePath="..\..\src\hostapi\dsound\pa_win_ds.c"
>
</File>
<File
RelativePath="..\..\src\hostapi\dsound\pa_win_ds_dynlink.c"
>
</File>
</Filter>
<Filter
Name="wmme"
>
<File
RelativePath="..\..\src\hostapi\wmme\pa_win_wmme.c"
>
</File>
</Filter>
<Filter
Name="wasapi"
>
<File
RelativePath="..\..\src\hostapi\wasapi\pa_win_wasapi.c"
>
</File>
</Filter>
<Filter
Name="wdmks"
>
<File
RelativePath="..\..\src\hostapi\wdmks\pa_win_wdmks.c"
>
</File>
</Filter>
</Filter>
<Filter
Name="os"
>
<Filter
Name="win"
>
<File
RelativePath="..\..\src\os\win\pa_win_coinitialize.c"
>
</File>
<File
RelativePath="..\..\src\os\win\pa_win_hostapis.c"
>
</File>
<File
RelativePath="..\..\src\os\win\pa_win_util.c"
>
</File>
<File
RelativePath="..\..\src\os\win\pa_win_waveformat.c"
>
</File>
<File
RelativePath="..\..\src\os\win\pa_win_wdmks_utils.c"
>
</File>
<File
RelativePath="..\..\src\os\win\pa_x86_plain_converters.c"
>
</File>
</Filter>
</Filter>
</Filter>
<Filter
Name="Resource Files"
Filter="ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
>
<File
RelativePath="portaudio.def"
>
</File>
<File
RelativePath=".\portaudio_noasio.def"
>
</File>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl"
>
<File
RelativePath="..\..\include\pa_asio.h"
>
</File>
<File
RelativePath="..\..\include\pa_jack.h"
>
</File>
<File
RelativePath="..\..\include\pa_linux_alsa.h"
>
</File>
<File
RelativePath="..\..\include\pa_mac_core.h"
>
</File>
<File
RelativePath="..\..\src\os\win\pa_win_coinitialize.h"
>
</File>
<File
RelativePath="..\..\include\pa_win_ds.h"
>
</File>
<File
RelativePath="..\..\include\pa_win_wasapi.h"
>
</File>
<File
RelativePath="..\..\include\pa_win_waveformat.h"
>
</File>
<File
RelativePath="..\..\include\pa_win_wdmks.h"
>
</File>
<File
RelativePath="..\..\include\pa_win_wmme.h"
>
</File>
<File
RelativePath="..\..\include\portaudio.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -1 +0,0 @@
../SoundTouch

View File

@@ -1,5 +0,0 @@
INCLUDES = -I../
noinst_LIBRARIES = libtinyxml.a
libtinyxml_a_SOURCES = \
tinystr.h tinyxml.h tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp

View File

@@ -1,116 +0,0 @@
/*
www.sourceforge.net/projects/tinyxml
Original file by Yves Berquin.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
/*
* THIS FILE WAS ALTERED BY Tyge L<>vset, 7. April 2005.
*/
#ifndef TIXML_USE_STL
#include "tinystr.h"
// Error value for find primitive
const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1);
// Null rep.
TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, '\0' };
void TiXmlString::reserve (size_type cap)
{
if (cap > capacity())
{
TiXmlString tmp;
tmp.init(length(), cap);
memcpy(tmp.start(), data(), length());
swap(tmp);
}
}
TiXmlString& TiXmlString::assign(const char* str, size_type len)
{
size_type cap = capacity();
if (len > cap || cap > 3*(len + 8))
{
TiXmlString tmp;
tmp.init(len);
memcpy(tmp.start(), str, len);
swap(tmp);
}
else
{
memmove(start(), str, len);
set_size(len);
}
return *this;
}
TiXmlString& TiXmlString::append(const char* str, size_type len)
{
size_type newsize = length() + len;
if (newsize > capacity())
{
reserve (newsize + capacity());
}
memmove(finish(), str, len);
set_size(newsize);
return *this;
}
TiXmlString operator + (const TiXmlString & a, const TiXmlString & b)
{
TiXmlString tmp;
tmp.reserve(a.length() + b.length());
tmp += a;
tmp += b;
return tmp;
}
TiXmlString operator + (const TiXmlString & a, const char* b)
{
TiXmlString tmp;
TiXmlString::size_type b_len = static_cast<TiXmlString::size_type>( strlen(b) );
tmp.reserve(a.length() + b_len);
tmp += a;
tmp.append(b, b_len);
return tmp;
}
TiXmlString operator + (const char* a, const TiXmlString & b)
{
TiXmlString tmp;
TiXmlString::size_type a_len = static_cast<TiXmlString::size_type>( strlen(a) );
tmp.reserve(a_len + b.length());
tmp.append(a, a_len);
tmp += b;
return tmp;
}
#endif // TIXML_USE_STL

View File

@@ -1,319 +0,0 @@
/*
www.sourceforge.net/projects/tinyxml
Original file by Yves Berquin.
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
/*
* THIS FILE WAS ALTERED BY Tyge Lovset, 7. April 2005.
*
* - completely rewritten. compact, clean, and fast implementation.
* - sizeof(TiXmlString) = pointer size (4 bytes on 32-bit systems)
* - fixed reserve() to work as per specification.
* - fixed buggy compares operator==(), operator<(), and operator>()
* - fixed operator+=() to take a const ref argument, following spec.
* - added "copy" constructor with length, and most compare operators.
* - added swap(), clear(), size(), capacity(), operator+().
*/
#ifndef TIXML_USE_STL
#ifndef TIXML_STRING_INCLUDED
#define TIXML_STRING_INCLUDED
#include <assert.h>
#include <string.h>
/* The support for explicit isn't that universal, and it isn't really
required - it is used to check that the TiXmlString class isn't incorrectly
used. Be nice to old compilers and macro it here:
*/
#if defined(_MSC_VER) && (_MSC_VER >= 1200 )
// Microsoft visual studio, version 6 and higher.
#define TIXML_EXPLICIT explicit
#elif defined(__GNUC__) && (__GNUC__ >= 3 )
// GCC version 3 and higher.s
#define TIXML_EXPLICIT explicit
#else
#define TIXML_EXPLICIT
#endif
/*
TiXmlString is an emulation of a subset of the std::string template.
Its purpose is to allow compiling TinyXML on compilers with no or poor STL support.
Only the member functions relevant to the TinyXML project have been implemented.
The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase
a string and there's no more room, we allocate a buffer twice as big as we need.
*/
class TiXmlString
{
public :
// The size type used
typedef size_t size_type;
// Error value for find primitive
static const size_type npos; // = -1;
// TiXmlString empty constructor
TiXmlString () : rep_(&nullrep_)
{
}
// TiXmlString copy constructor
TiXmlString ( const TiXmlString & copy) : rep_(0)
{
init(copy.length());
memcpy(start(), copy.data(), length());
}
// TiXmlString constructor, based on a string
TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0)
{
init( static_cast<size_type>( strlen(copy) ));
memcpy(start(), copy, length());
}
// TiXmlString constructor, based on a string
TIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0)
{
init(len);
memcpy(start(), str, len);
}
// TiXmlString destructor
~TiXmlString ()
{
quit();
}
// = operator
TiXmlString& operator = (const char * copy)
{
return assign( copy, (size_type)strlen(copy));
}
// = operator
TiXmlString& operator = (const TiXmlString & copy)
{
return assign(copy.start(), copy.length());
}
// += operator. Maps to append
TiXmlString& operator += (const char * suffix)
{
return append(suffix, static_cast<size_type>( strlen(suffix) ));
}
// += operator. Maps to append
TiXmlString& operator += (char single)
{
return append(&single, 1);
}
// += operator. Maps to append
TiXmlString& operator += (const TiXmlString & suffix)
{
return append(suffix.data(), suffix.length());
}
// Convert a TiXmlString into a null-terminated char *
const char * c_str () const { return rep_->str; }
// Convert a TiXmlString into a char * (need not be null terminated).
const char * data () const { return rep_->str; }
// Return the length of a TiXmlString
size_type length () const { return rep_->size; }
// Alias for length()
size_type size () const { return rep_->size; }
// Checks if a TiXmlString is empty
bool empty () const { return rep_->size == 0; }
// Return capacity of string
size_type capacity () const { return rep_->capacity; }
// single char extraction
const char& at (size_type index) const
{
assert( index < length() );
return rep_->str[ index ];
}
// [] operator
char& operator [] (size_type index) const
{
assert( index < length() );
return rep_->str[ index ];
}
// find a char in a string. Return TiXmlString::npos if not found
size_type find (char lookup) const
{
return find(lookup, 0);
}
// find a char in a string from an offset. Return TiXmlString::npos if not found
size_type find (char tofind, size_type offset) const
{
if (offset >= length()) return npos;
for (const char* p = c_str() + offset; *p != '\0'; ++p)
{
if (*p == tofind) return static_cast< size_type >( p - c_str() );
}
return npos;
}
void clear ()
{
//Lee:
//The original was just too strange, though correct:
// TiXmlString().swap(*this);
//Instead use the quit & re-init:
quit();
init(0,0);
}
/* Function to reserve a big amount of data when we know we'll need it. Be aware that this
function DOES NOT clear the content of the TiXmlString if any exists.
*/
void reserve (size_type cap);
TiXmlString& assign (const char* str, size_type len);
TiXmlString& append (const char* str, size_type len);
void swap (TiXmlString& other)
{
Rep* r = rep_;
rep_ = other.rep_;
other.rep_ = r;
}
private:
void init(size_type sz) { init(sz, sz); }
void set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\0'; }
char* start() const { return rep_->str; }
char* finish() const { return rep_->str + rep_->size; }
struct Rep
{
size_type size, capacity;
char str[1];
};
void init(size_type sz, size_type cap)
{
if (cap)
{
// Lee: the original form:
// rep_ = static_cast<Rep*>(operator new(sizeof(Rep) + cap));
// doesn't work in some cases of new being overloaded. Switching
// to the normal allocation, although use an 'int' for systems
// that are overly picky about structure alignment.
const size_type bytesNeeded = sizeof(Rep) + cap;
const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int );
rep_ = reinterpret_cast<Rep*>( new int[ intsNeeded ] );
rep_->str[ rep_->size = sz ] = '\0';
rep_->capacity = cap;
}
else
{
rep_ = &nullrep_;
}
}
void quit()
{
if (rep_ != &nullrep_)
{
// The rep_ is really an array of ints. (see the allocator, above).
// Cast it back before delete, so the compiler won't incorrectly call destructors.
delete [] ( reinterpret_cast<int*>( rep_ ) );
}
}
Rep * rep_;
static Rep nullrep_;
} ;
inline bool operator == (const TiXmlString & a, const TiXmlString & b)
{
return ( a.length() == b.length() ) // optimization on some platforms
&& ( strcmp(a.c_str(), b.c_str()) == 0 ); // actual compare
}
inline bool operator < (const TiXmlString & a, const TiXmlString & b)
{
return strcmp(a.c_str(), b.c_str()) < 0;
}
inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); }
inline bool operator > (const TiXmlString & a, const TiXmlString & b) { return b < a; }
inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); }
inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); }
inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; }
inline bool operator == (const char* a, const TiXmlString & b) { return b == a; }
inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); }
inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); }
TiXmlString operator + (const TiXmlString & a, const TiXmlString & b);
TiXmlString operator + (const TiXmlString & a, const char* b);
TiXmlString operator + (const char* a, const TiXmlString & b);
/*
TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString.
Only the operators that we need for TinyXML have been developped.
*/
class TiXmlOutStream : public TiXmlString
{
public :
// TiXmlOutStream << operator.
TiXmlOutStream & operator << (const TiXmlString & in)
{
*this += in;
return *this;
}
// TiXmlOutStream << operator.
TiXmlOutStream & operator << (const char * in)
{
*this += in;
return *this;
}
} ;
#endif // TIXML_STRING_INCLUDED
#endif // TIXML_USE_STL

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,53 +0,0 @@
/*
www.sourceforge.net/projects/tinyxml
Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any
damages arising from the use of this software.
Permission is granted to anyone to use this software for any
purpose, including commercial applications, and to alter it and
redistribute it freely, subject to the following restrictions:
1. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product documentation
would be appreciated but is not required.
2. Altered source versions must be plainly marked as such, and
must not be misrepresented as being the original software.
3. This notice may not be removed or altered from any source
distribution.
*/
#include "tinyxml.h"
// The goal of the seperate error file is to make the first
// step towards localization. tinyxml (currently) only supports
// english error messages, but the could now be translated.
//
// It also cleans up the code a bit.
//
const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =
{
"No error",
"Error",
"Failed to open file",
"Memory allocation failed.",
"Error parsing Element.",
"Failed to read Element name",
"Error reading Element value.",
"Error reading Attributes.",
"Error: empty tag.",
"Error reading end tag.",
"Error parsing Unknown.",
"Error parsing Comment.",
"Error parsing Declaration.",
"Error document empty.",
"Error null (0) or unexpected EOF found in input stream.",
"Error parsing CDATA.",
"Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
};

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -1,15 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="wxCommon"
IntermediateDirectory="$(PlatformName)\$(ConfigurationName)\$(ProjectName)"
>
<Tool
Name="VCCLCompilerTool"
PreprocessorDefinitions="WIN32;__WXMSW__;_LIB;wxUSE_UNICODE=1"
ExceptionHandling="2"
EnableFunctionLevelLinking="true"
CompileAs="0"
/>
</VisualStudioPropertySheet>

View File

@@ -1,19 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioPropertySheet
ProjectType="Visual C++"
Version="8.00"
Name="ProjectRootDir"
>
<UserMacro
Name="ProjectRootDir"
Value="$(ProjectDir)\..\.."
/>
<UserMacro
Name="SvnRootDir"
Value="$(ProjectRootDir)\..\.."
/>
<UserMacro
Name="SvnCommonDir"
Value="$(SvnRootDir)\common"
/>
</VisualStudioPropertySheet>

View File

@@ -1,588 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="wxAdv28"
ProjectGUID="{0E231FB1-F3C9-4724-ACCB-DE8BCB3C089E}"
RootNamespace="wxAdvanced"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\..\3rdparty.vsprops;.\Common.vsprops;..\..\..\..\common\vsprops\CodeGen_Debug.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)\include&quot;;&quot;$(ProjectRootDir)\include\msvc&quot;;&quot;$(SvnRootDir)\3rdparty\zlib&quot;"
PreprocessorDefinitions="_DEBUG;__WXDEBUG__;wxUSE_BASE=0;wxUSE_GUI=1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="wx/wxprec.h"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
WarningLevel="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
OutputFile="$(OutDir)/wxAdv28.lib"
SuppressStartupBanner="true"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
OutputFile=".\..\..\lib\vc_lib/wx_adv.bsc"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\..\3rdparty.vsprops;.\Common.vsprops;..\..\..\..\common\vsprops\CodeGen_Release.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
WholeProgramOptimization="false"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)\include&quot;;&quot;$(ProjectRootDir)\include\msvc&quot;;&quot;$(SvnRootDir)\3rdparty\zlib&quot;"
PreprocessorDefinitions="wxUSE_BASE=0;wxUSE_GUI=1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="wx/wxprec.h"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
WarningLevel="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Devel|Win32"
ConfigurationType="4"
InheritedPropertySheets=".\ProjectRootDir.vsprops;..\..\..\3rdparty.vsprops;.\Common.vsprops;..\..\..\..\common\vsprops\CodeGen_Devel.vsprops;..\..\..\..\common\vsprops\IncrementalLinking.vsprops"
UseOfMFC="0"
ATLMinimizesCRunTimeLibraryUsage="false"
CharacterSet="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCXMLDataGeneratorTool"
/>
<Tool
Name="VCWebServiceProxyGeneratorTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCCLCompilerTool"
AdditionalIncludeDirectories="&quot;$(ProjectRootDir)\include&quot;;&quot;$(ProjectRootDir)\include\msvc&quot;;&quot;$(SvnRootDir)\3rdparty\zlib&quot;"
PreprocessorDefinitions="wxUSE_BASE=0;wxUSE_GUI=1"
UsePrecompiledHeader="2"
PrecompiledHeaderThrough="wx/wxprec.h"
PrecompiledHeaderFile="$(IntDir)\$(TargetName).pch"
WarningLevel="4"
/>
<Tool
Name="VCManagedResourceCompilerTool"
/>
<Tool
Name="VCResourceCompilerTool"
Culture="1033"
/>
<Tool
Name="VCPreLinkEventTool"
/>
<Tool
Name="VCLibrarianTool"
/>
<Tool
Name="VCALinkTool"
/>
<Tool
Name="VCXDCMakeTool"
/>
<Tool
Name="VCBscMakeTool"
SuppressStartupBanner="true"
/>
<Tool
Name="VCFxCopTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Common Sources"
>
<File
RelativePath="..\..\src\common\animatecmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\datavcmn.cpp"
>
</File>
<File
RelativePath="..\..\src\common\dummy.cpp"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
<FileConfiguration
Name="Devel|Win32"
>
<Tool
Name="VCCLCompilerTool"
UsePrecompiledHeader="1"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\src\common\taskbarcmn.cpp"
>
</File>
</Filter>
<Filter
Name="MSW Sources"
>
<File
RelativePath="..\..\src\msw\aboutdlg.cpp"
>
</File>
<File
RelativePath="..\..\src\msw\datectrl.cpp"
>
</File>
<File
RelativePath="..\..\src\msw\joystick.cpp"
>
</File>
<File
RelativePath="..\..\src\msw\sound.cpp"
>
</File>
<File
RelativePath="..\..\src\msw\taskbar.cpp"
>
</File>
<File
RelativePath="..\..\src\msw\version.rc"
>
<FileConfiguration
Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCResourceCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCResourceCompilerTool"
/>
</FileConfiguration>
<FileConfiguration
Name="Devel|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCResourceCompilerTool"
/>
</FileConfiguration>
</File>
</Filter>
<Filter
Name="Generic Sources"
>
<File
RelativePath="..\..\src\generic\aboutdlgg.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\animateg.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\bmpcboxg.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\calctrl.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\datavgen.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\datectlg.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\grid.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\gridctrl.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\gridsel.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\helpext.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\hyperlink.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\laywin.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\odcombo.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\propdlg.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\sashwin.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\splash.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\tipdlg.cpp"
>
</File>
<File
RelativePath="..\..\src\generic\wizard.cpp"
>
</File>
</Filter>
<Filter
Name="Setup Headers"
>
<File
RelativePath="..\..\include\wx\univ\setup.h"
>
</File>
<File
RelativePath="..\..\include\wx\msw\setup.h"
>
</File>
</Filter>
<Filter
Name="MSW Headers"
>
<File
RelativePath="..\..\include\wx\msw\datectrl.h"
>
</File>
<File
RelativePath="..\..\include\wx\msw\genrcdefs.h"
>
</File>
<File
RelativePath="..\..\include\wx\msw\joystick.h"
>
</File>
<File
RelativePath="..\..\include\wx\msw\sound.h"
>
</File>
<File
RelativePath="..\..\include\wx\msw\taskbar.h"
>
</File>
</Filter>
<Filter
Name="Generic Headers"
>
<File
RelativePath="..\..\include\wx\generic\aboutdlgg.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\animate.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\bmpcbox.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\calctrl.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\dataview.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\datectrl.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\grid.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\gridctrl.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\gridsel.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\helpext.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\laywin.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\propdlg.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\sashwin.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\splash.h"
>
</File>
<File
RelativePath="..\..\include\wx\generic\wizard.h"
>
</File>
</Filter>
<Filter
Name="Common Headers"
>
<File
RelativePath="..\..\include\wx\aboutdlg.h"
>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\include\wx\animate.h"
>
</File>
<File
RelativePath="..\..\include\wx\animdecod.h"
>
</File>
<File
RelativePath="..\..\include\wx\bmpcbox.h"
>
</File>
<File
RelativePath="..\..\include\wx\calctrl.h"
>
</File>
<File
RelativePath="..\..\include\wx\dataview.h"
>
</File>
<File
RelativePath="..\..\include\wx\datectrl.h"
>
</File>
<File
RelativePath="..\..\include\wx\dateevt.h"
>
</File>
<File
RelativePath="..\..\include\wx\dcbuffer.h"
>
</File>
<File
RelativePath="..\..\include\wx\grid.h"
>
</File>
<File
RelativePath="..\..\include\wx\hyperlink.h"
>
</File>
<File
RelativePath="..\..\include\wx\joystick.h"
>
</File>
<File
RelativePath="..\..\include\wx\laywin.h"
>
</File>
<File
RelativePath="..\..\include\wx\odcombo.h"
>
</File>
<File
RelativePath="..\..\include\wx\propdlg.h"
>
</File>
<File
RelativePath="..\..\include\wx\sashwin.h"
>
</File>
<File
RelativePath="..\..\include\wx\sound.h"
>
</File>
<File
RelativePath="..\..\include\wx\splash.h"
>
</File>
<File
RelativePath="..\..\include\wx\taskbar.h"
>
</File>
<File
RelativePath="..\..\include\wx\tipdlg.h"
>
</File>
<File
RelativePath="..\..\include\wx\wave.h"
>
</File>
<File
RelativePath="..\..\include\wx\wizard.h"
>
</File>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

File diff suppressed because it is too large Load Diff

View File

@@ -1,144 +0,0 @@
<?xml version="1.0" encoding="Windows-1252"?>
<VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
Name="wxConfig28"
ProjectGUID="{C34487AF-228A-4D11-8E50-27803DF76873}"
RootNamespace="wxConfig"
TargetFrameworkVersion="0"
>
<Platforms>
<Platform
Name="Win32"
/>
</Platforms>
<ToolFiles>
</ToolFiles>
<Configurations>
<Configuration
Name="Debug|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Release|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
<Configuration
Name="Devel|Win32"
OutputDirectory="$(SolutionDir)$(ConfigurationName)"
IntermediateDirectory="$(ConfigurationName)"
ConfigurationType="10"
CharacterSet="1"
WholeProgramOptimization="0"
>
<Tool
Name="VCPreBuildEventTool"
/>
<Tool
Name="VCCustomBuildTool"
/>
<Tool
Name="VCMIDLTool"
/>
<Tool
Name="VCPostBuildEventTool"
/>
</Configuration>
</Configurations>
<References>
</References>
<Files>
<Filter
Name="Source Files"
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
>
</Filter>
<Filter
Name="Header Files"
Filter="h;hpp;hxx;hm;inl;inc;xsd"
UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
>
<File
RelativePath="..\..\include\wx\msw\genrcdefs.h"
>
<FileConfiguration
Name="Debug|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Creating ..\..\lib\vc_lib\mswd\wx\msw\rcdefs.h"
CommandLine="cl /EP /nologo &quot;$(InputPath)&quot; &gt; &quot;..\..\lib\vc_lib\mswd\wx\msw\rcdefs.h&quot;&#x0D;&#x0A;"
Outputs="..\..\lib\vc_lib\mswd\wx\msw\rcdefs.h"
/>
</FileConfiguration>
<FileConfiguration
Name="Release|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Creating ..\..\lib\vc_lib\mswd\wx\msw\rcdefs.h"
CommandLine="cl /EP /nologo &quot;$(InputPath)&quot; &gt; &quot;..\..\lib\vc_lib\mswd\wx\msw\rcdefs.h&quot;&#x0D;&#x0A;"
Outputs="..\..\lib\vc_lib\mswd\wx\msw\rcdefs.h"
/>
</FileConfiguration>
<FileConfiguration
Name="Devel|Win32"
>
<Tool
Name="VCCustomBuildTool"
Description="Creating ..\..\lib\vc_lib\mswd\wx\msw\rcdefs.h"
CommandLine="cl /EP /nologo &quot;$(InputPath)&quot; &gt; &quot;..\..\lib\vc_lib\mswd\wx\msw\rcdefs.h&quot;&#x0D;&#x0A;"
Outputs="..\..\lib\vc_lib\mswd\wx\msw\rcdefs.h"
/>
</FileConfiguration>
</File>
<File
RelativePath="..\..\include\wx\setup.h"
>
</File>
</Filter>
<Filter
Name="Resource Files"
Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
>
</Filter>
</Files>
<Globals>
</Globals>
</VisualStudioProject>

View File

@@ -90,7 +90,7 @@ public:
static wxFont* ms_systemMenuFont;
static int ms_systemMenuButtonWidth; // windows clean install default
static int ms_systemMenuHeight; // windows clean install default
static bool ms_showCues;
static BOOL ms_showCues;
private:
DECLARE_DYNAMIC_CLASS(wxMSWSystemMenuFontModule)
};
@@ -102,7 +102,7 @@ private:
wxFont* wxMSWSystemMenuFontModule::ms_systemMenuFont = NULL;
int wxMSWSystemMenuFontModule::ms_systemMenuButtonWidth = 18; // windows clean install default
int wxMSWSystemMenuFontModule::ms_systemMenuHeight = 18; // windows clean install default
bool wxMSWSystemMenuFontModule::ms_showCues = true;
BOOL wxMSWSystemMenuFontModule::ms_showCues = true;
IMPLEMENT_DYNAMIC_CLASS(wxMSWSystemMenuFontModule, wxModule)

View File

@@ -0,0 +1 @@
debian/patches

View File

@@ -0,0 +1 @@
series

View File

@@ -0,0 +1 @@
2

View File

@@ -0,0 +1,2 @@
wx-config-conditionalise-webview-in-std.patch
gcc4.9-workaround.patch

File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More