Merge branch 'master' into wii-network
# By Ryan Houdek (185) and others # Via degasus (12) and others * master: (625 commits) Revert "Don't open/close file for every file operation." as it was crashing PokePark in Windows builds. Array overrun fixed in VertexShaderCache for the DX11 plugin. Fixed DSPTool build. Windows build fix Go back to assuming every HID device is a wiimote on Windows. Fixed issue 6117. Unfixed issue 6031. VideoSoftware: Improve fog range adjustment by using less magic and more comments. revert RasterFont for VideoSoftware ogl: fix virtual xfb Windows build fix from web interface... Adjusted the audio loop criteria, using >= on the Wii and == on GC. This fixes the audio static that occurred in Wii games after hours of play. Forced the exception check only for ARAM DMA transfers. Removed the Eternal Darkness boot hack and replaced it with an exception check. VideoSoftware: Implement fog range adjustment, fixing issue 6147. implement 4xSSAA for OGL move ogl-only settings into backend Fix description of disable fog, and move it to enhancements tab. Reverted rd76ca5783743 as it was made obsolete by r1d550f4496e4. Removed the tracking of the FIFO Writes as it was made obsolete by r1d550f4496e4. Forced the external exception check to occur sooner by changing the downcount. Mark the Direct3D9 backend deprecated. Prefer D3D11 and OpenGL over D3D9 by default. ... Conflicts: CMakeLists.txt Source/Core/Common/Common.vcxproj.filters Source/Core/Common/Src/CommonPaths.h Source/Core/Core/Core.vcxproj.filters Source/Core/Core/Src/Core.cpp Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_FileIO.cpp Source/VSProps/Dolphin.Win32.props Source/VSProps/Dolphin.x64.props
This commit is contained in:
commit
7784fa4c67
|
@ -36,3 +36,6 @@ Source/Core/Common/Src/scmrev.h
|
|||
.sconsign.dblite
|
||||
Externals/scons-local/*
|
||||
.DS_Store
|
||||
*~
|
||||
#Ignore transifix configuration directory
|
||||
.tx
|
||||
|
|
352
CMakeLists.txt
352
CMakeLists.txt
|
@ -3,8 +3,9 @@
|
|||
#
|
||||
cmake_minimum_required(VERSION 2.6)
|
||||
|
||||
option(USE_GLES "Enables GLES And EGL, disables OGL" OFF)
|
||||
option(ANDROID "Enables a build for Android" OFF)
|
||||
option(USE_EGL "Enables EGL OpenGL Interface" OFF)
|
||||
option(USE_GLES "Enables GLES And EGL, disables OGL" OFF)
|
||||
option(DISABLE_WX "Disable wxWidgets (use CLI interface)" OFF)
|
||||
|
||||
option(FASTLOG "Enable all logs" OFF)
|
||||
|
@ -106,9 +107,22 @@ if(DOLPHIN_IS_STABLE)
|
|||
else()
|
||||
set(DOLPHIN_VERSION_PATCH ${DOLPHIN_WC_REVISION})
|
||||
endif()
|
||||
message(${CMAKE_SYSTEM_PROCESSOR})
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
|
||||
set(_M_GENERIC 1)
|
||||
set(_M_ARM 1)
|
||||
add_definitions(-marm -march=armv7-a)
|
||||
add_definitions(-D_M_ARM=1)
|
||||
add_definitions(-D_M_GENERIC=1)
|
||||
endif()
|
||||
|
||||
# Set these next two lines to test generic
|
||||
#set(_M_GENERIC 1)
|
||||
#add_definitions(-D_M_GENERIC=1)
|
||||
# Various compile flags
|
||||
add_definitions(-msse2)
|
||||
if(NOT _M_GENERIC)
|
||||
add_definitions(-msse2)
|
||||
endif()
|
||||
|
||||
include(CheckCXXCompilerFlag)
|
||||
macro(check_and_add_flag var flag)
|
||||
|
@ -160,8 +174,8 @@ if(APPLE)
|
|||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -x none")
|
||||
|
||||
# Identify the target system:
|
||||
# Ask for 32/64-bit fat binary.
|
||||
set(TARGET_FLAGS "-arch x86_64 -arch i386")
|
||||
# Ask for 64-bit binary.
|
||||
set(TARGET_FLAGS "-arch x86_64")
|
||||
# Minimum OS X version.
|
||||
# This is inserted into the Info.plist as well.
|
||||
# Note that the SDK determines the maximum version of which optional
|
||||
|
@ -183,8 +197,6 @@ if(APPLE)
|
|||
# This avoids a warning when linking with QuickTime.
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-no_arch_warnings")
|
||||
# Specify target CPUs.
|
||||
set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_i386 -msse3")
|
||||
set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_i386 -march=prescott")
|
||||
set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_x86_64 -mssse3")
|
||||
set(TARGET_FLAGS "${TARGET_FLAGS} -Xarch_x86_64 -march=core2")
|
||||
# Target flags apply to both C and C++ compilation.
|
||||
|
@ -271,135 +283,139 @@ if(USE_EGL)
|
|||
endif()
|
||||
add_definitions(-D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE)
|
||||
|
||||
if(ANDROID)
|
||||
message("Building for Android")
|
||||
add_definitions(-DANDROID)
|
||||
endif()
|
||||
########################################
|
||||
# Dependency checking
|
||||
#
|
||||
# TODO: We should have options for dependencies included in the externals to
|
||||
# override autodetection of system libraries and force the usage of the
|
||||
# externals.
|
||||
if(NOT ANDROID)
|
||||
include(CheckLib)
|
||||
|
||||
include(CheckLib)
|
||||
|
||||
include(FindOpenGL)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
if(NOT OPENGL_GLU_FOUND)
|
||||
message(FATAL_ERROR "GLU is required but not found")
|
||||
endif()
|
||||
|
||||
if(OPENMP)
|
||||
include(FindOpenMP OPTIONAL)
|
||||
if(OPENMP_FOUND)
|
||||
message("OpenMP parallelization enabled")
|
||||
add_definitions("${OpenMP_CXX_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
include(FindOpenGL)
|
||||
include_directories(${OPENGL_INCLUDE_DIR})
|
||||
if(NOT OPENGL_GLU_FOUND)
|
||||
message(FATAL_ERROR "GLU is required but not found")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT OPENMP_FOUND)
|
||||
add_definitions(-Wno-unknown-pragmas)
|
||||
message("OpenMP parallelization disabled")
|
||||
endif()
|
||||
|
||||
include(FindALSA OPTIONAL)
|
||||
if(ALSA_FOUND)
|
||||
add_definitions(-DHAVE_ALSA=1)
|
||||
message("ALSA found, enabling ALSA sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_ALSA=0)
|
||||
message("ALSA NOT found, disabling ALSA sound backend")
|
||||
endif(ALSA_FOUND)
|
||||
if(OPENMP)
|
||||
include(FindOpenMP OPTIONAL)
|
||||
if(OPENMP_FOUND)
|
||||
message("OpenMP parallelization enabled")
|
||||
add_definitions("${OpenMP_CXX_FLAGS}")
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
endif()
|
||||
endif()
|
||||
if(NOT OPENMP_FOUND)
|
||||
add_definitions(-Wno-unknown-pragmas)
|
||||
message("OpenMP parallelization disabled")
|
||||
endif()
|
||||
|
||||
check_lib(AO ao QUIET)
|
||||
if(AO_FOUND)
|
||||
add_definitions(-DHAVE_AO=1)
|
||||
message("ao found, enabling ao sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_AO=0)
|
||||
message("ao NOT found, disabling ao sound backend")
|
||||
endif(AO_FOUND)
|
||||
include(FindALSA OPTIONAL)
|
||||
if(ALSA_FOUND)
|
||||
add_definitions(-DHAVE_ALSA=1)
|
||||
message("ALSA found, enabling ALSA sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_ALSA=0)
|
||||
message("ALSA NOT found, disabling ALSA sound backend")
|
||||
endif(ALSA_FOUND)
|
||||
|
||||
check_lib(BLUEZ bluez QUIET)
|
||||
if(BLUEZ_FOUND)
|
||||
add_definitions(-DHAVE_BLUEZ=1)
|
||||
message("bluez found, enabling bluetooth support")
|
||||
else()
|
||||
add_definitions(-DHAVE_BLUEZ=0)
|
||||
message("bluez NOT found, disabling bluetooth support")
|
||||
endif(BLUEZ_FOUND)
|
||||
check_lib(AO ao QUIET)
|
||||
if(AO_FOUND)
|
||||
add_definitions(-DHAVE_AO=1)
|
||||
message("ao found, enabling ao sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_AO=0)
|
||||
message("ao NOT found, disabling ao sound backend")
|
||||
endif(AO_FOUND)
|
||||
|
||||
check_lib(PULSEAUDIO libpulse-simple QUIET)
|
||||
if(PULSEAUDIO_FOUND)
|
||||
add_definitions(-DHAVE_PULSEAUDIO=1)
|
||||
message("PulseAudio found, enabling PulseAudio sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_PULSEAUDIO=0)
|
||||
message("PulseAudio NOT found, disabling PulseAudio sound backend")
|
||||
endif(PULSEAUDIO_FOUND)
|
||||
check_lib(BLUEZ bluez QUIET)
|
||||
if(BLUEZ_FOUND)
|
||||
add_definitions(-DHAVE_BLUEZ=1)
|
||||
message("bluez found, enabling bluetooth support")
|
||||
else()
|
||||
add_definitions(-DHAVE_BLUEZ=0)
|
||||
message("bluez NOT found, disabling bluetooth support")
|
||||
endif(BLUEZ_FOUND)
|
||||
|
||||
include(FindOpenAL OPTIONAL)
|
||||
if(OPENAL_FOUND)
|
||||
add_definitions(-DHAVE_OPENAL=1)
|
||||
include_directories(${OPENAL_INCLUDE_DIR})
|
||||
message("OpenAL found, enabling OpenAL sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_OPENAL=0)
|
||||
message("OpenAL NOT found, disabling OpenAL sound backend")
|
||||
endif(OPENAL_FOUND)
|
||||
check_lib(PULSEAUDIO libpulse-simple QUIET)
|
||||
if(PULSEAUDIO_FOUND)
|
||||
add_definitions(-DHAVE_PULSEAUDIO=1)
|
||||
message("PulseAudio found, enabling PulseAudio sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_PULSEAUDIO=0)
|
||||
message("PulseAudio NOT found, disabling PulseAudio sound backend")
|
||||
endif(PULSEAUDIO_FOUND)
|
||||
|
||||
include(FindOpenAL OPTIONAL)
|
||||
if(OPENAL_FOUND)
|
||||
add_definitions(-DHAVE_OPENAL=1)
|
||||
include_directories(${OPENAL_INCLUDE_DIR})
|
||||
message("OpenAL found, enabling OpenAL sound backend")
|
||||
else()
|
||||
add_definitions(-DHAVE_OPENAL=0)
|
||||
message("OpenAL NOT found, disabling OpenAL sound backend")
|
||||
endif(OPENAL_FOUND)
|
||||
|
||||
# Note: We do not need to explicitly check for X11 as it is done in the cmake
|
||||
# FindOpenGL module on linux.
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(UNIX AND NOT APPLE)
|
||||
if(X11_FOUND)
|
||||
add_definitions(-DHAVE_X11=1)
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
message("X11 found")
|
||||
else()
|
||||
message(FATAL_ERROR "X11 is required but not found")
|
||||
endif(X11_FOUND)
|
||||
else()
|
||||
add_definitions(-DHAVE_X11=0)
|
||||
endif()
|
||||
|
||||
if(X11_FOUND)
|
||||
add_definitions(-DHAVE_X11=1)
|
||||
include_directories(${X11_INCLUDE_DIR})
|
||||
message("X11 found")
|
||||
check_lib(XRANDR Xrandr)
|
||||
endif()
|
||||
if(XRANDR_FOUND)
|
||||
add_definitions(-DHAVE_XRANDR=1)
|
||||
else()
|
||||
message(FATAL_ERROR "X11 is required but not found")
|
||||
endif(X11_FOUND)
|
||||
else()
|
||||
add_definitions(-DHAVE_X11=0)
|
||||
endif()
|
||||
add_definitions(-DHAVE_XRANDR=0)
|
||||
endif(XRANDR_FOUND)
|
||||
|
||||
if(X11_FOUND)
|
||||
check_lib(XRANDR Xrandr)
|
||||
endif()
|
||||
if(XRANDR_FOUND)
|
||||
add_definitions(-DHAVE_XRANDR=1)
|
||||
else()
|
||||
add_definitions(-DHAVE_XRANDR=0)
|
||||
endif(XRANDR_FOUND)
|
||||
if(ENCODE_FRAMEDUMPS)
|
||||
check_libav()
|
||||
endif()
|
||||
|
||||
if(ENCODE_FRAMEDUMPS)
|
||||
check_libav()
|
||||
endif()
|
||||
|
||||
include(CheckCXXSourceRuns)
|
||||
set(CMAKE_REQUIRED_LIBRARIES portaudio)
|
||||
CHECK_CXX_SOURCE_RUNS(
|
||||
"#include <portaudio.h>
|
||||
int main(int argc, char **argv)
|
||||
{ if(Pa_GetVersion() >= 1890) return 0; else return 1; }"
|
||||
PORTAUDIO)
|
||||
if(PORTAUDIO)
|
||||
message("PortAudio found, enabling mic support")
|
||||
add_definitions(-DHAVE_PORTAUDIO=1)
|
||||
set(PORTAUDIO_FOUND TRUE)
|
||||
else()
|
||||
message("PortAudio not found, disabling mic support")
|
||||
add_definitions(-DHAVE_PORTAUDIO=0)
|
||||
set(PORTAUDIO_FOUND FALSE)
|
||||
endif(PORTAUDIO)
|
||||
|
||||
if(OPROFILING)
|
||||
check_lib(OPROFILE opagent opagent.h)
|
||||
check_lib(BFD bfd bfd.h)
|
||||
if(OPROFILE_FOUND AND BFD_FOUND)
|
||||
message("oprofile found, enabling profiling support")
|
||||
add_definitions(-DUSE_OPROFILE=1)
|
||||
include(CheckCXXSourceRuns)
|
||||
set(CMAKE_REQUIRED_LIBRARIES portaudio)
|
||||
CHECK_CXX_SOURCE_RUNS(
|
||||
"#include <portaudio.h>
|
||||
int main(int argc, char **argv)
|
||||
{ if(Pa_GetVersion() >= 1890) return 0; else return 1; }"
|
||||
PORTAUDIO)
|
||||
if(PORTAUDIO)
|
||||
message("PortAudio found, enabling mic support")
|
||||
add_definitions(-DHAVE_PORTAUDIO=1)
|
||||
set(PORTAUDIO_FOUND TRUE)
|
||||
else()
|
||||
message(FATAL_ERROR "oprofile or bfd not found. Can't build profiling support.")
|
||||
message("PortAudio not found, disabling mic support")
|
||||
add_definitions(-DHAVE_PORTAUDIO=0)
|
||||
set(PORTAUDIO_FOUND FALSE)
|
||||
endif(PORTAUDIO)
|
||||
|
||||
if(OPROFILING)
|
||||
check_lib(OPROFILE opagent opagent.h)
|
||||
check_lib(BFD bfd bfd.h)
|
||||
if(OPROFILE_FOUND AND BFD_FOUND)
|
||||
message("oprofile found, enabling profiling support")
|
||||
add_definitions(-DUSE_OPROFILE=1)
|
||||
else()
|
||||
message(FATAL_ERROR "oprofile or bfd not found. Can't build profiling support.")
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
include(FindOpenSSL REQUIRED)
|
||||
|
||||
########################################
|
||||
|
@ -416,7 +432,6 @@ include_directories(Source/Core/InputCommon/Src)
|
|||
include_directories(Source/Core/VideoCommon/Src)
|
||||
include_directories(Source/Core/VideoUICommon/Src)
|
||||
|
||||
|
||||
########################################
|
||||
# Process externals and setup their include directories
|
||||
#
|
||||
|
@ -430,7 +445,7 @@ include_directories(Source/Core/VideoUICommon/Src)
|
|||
add_subdirectory(Externals/Bochs_disasm)
|
||||
include_directories(Externals/Bochs_disasm)
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ANDROID)
|
||||
check_lib(LZO lzo2 lzo/lzo1x.h QUIET)
|
||||
endif()
|
||||
if(LZO_FOUND)
|
||||
|
@ -455,15 +470,16 @@ if(OPENAL_FOUND)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
include(FindSDL2 OPTIONAL)
|
||||
endif()
|
||||
if(SDL2_FOUND)
|
||||
message("Using shared SDL2")
|
||||
include_directories(${SDL2_INCLUDE_DIR})
|
||||
else(SDL2_FOUND)
|
||||
# SDL2 not found, try SDL
|
||||
if(NOT ANDROID)
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
include(FindSDL2 OPTIONAL)
|
||||
endif()
|
||||
if(SDL2_FOUND)
|
||||
message("Using shared SDL2")
|
||||
include_directories(${SDL2_INCLUDE_DIR})
|
||||
else(SDL2_FOUND)
|
||||
# SDL2 not found, try SDL
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
include(FindSDL OPTIONAL)
|
||||
endif()
|
||||
if(SDL_FOUND)
|
||||
|
@ -475,7 +491,8 @@ else(SDL2_FOUND)
|
|||
include_directories(Externals/SDL/SDL Externals/SDL Externals/SDL/include)
|
||||
add_subdirectory(Externals/SDL)
|
||||
endif(SDL_FOUND)
|
||||
endif(SDL2_FOUND)
|
||||
endif(SDL2_FOUND)
|
||||
endif()
|
||||
|
||||
include(FindLibUSB OPTIONAL)
|
||||
if(LIBUSB_FOUND)
|
||||
|
@ -490,7 +507,7 @@ endif(LIBUSB_FOUND)
|
|||
set(SFML_FIND_VERSION TRUE)
|
||||
set(SFML_FIND_VERSION_MAJOR 1)
|
||||
set(SFML_FIND_VERSION_MINOR 5)
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ANDROID)
|
||||
include(FindSFML OPTIONAL)
|
||||
endif()
|
||||
if(SFML_FOUND AND NOT SFML_VERSION_MAJOR) # SFML 1.x doesn't define SFML_VERSION_MAJOR
|
||||
|
@ -501,7 +518,7 @@ else()
|
|||
include_directories(Externals/SFML/include)
|
||||
endif()
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ANDROID)
|
||||
check_lib(SOIL SOIL SOIL/SOIL.h QUIET)
|
||||
endif()
|
||||
if(SOIL_FOUND)
|
||||
|
@ -531,26 +548,19 @@ if(WIN32)
|
|||
find_library(GLEW glew32s PATHS Externals/GLew)
|
||||
include_directories(Externals/GLew/include)
|
||||
else()
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
check_lib(GLEW GLEW GL/glew.h)
|
||||
if(NOT ANDROID)
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
check_lib(GLEW GLEW GL/glew.h)
|
||||
endif()
|
||||
if(NOT GLEW_FOUND)
|
||||
message("Using static GLEW from Externals")
|
||||
add_subdirectory(Externals/GLew)
|
||||
include_directories(Externals/GLew/include)
|
||||
endif(NOT GLEW_FOUND)
|
||||
endif()
|
||||
if(NOT GLEW_FOUND)
|
||||
message("Using static GLEW from Externals")
|
||||
add_subdirectory(Externals/GLew)
|
||||
include_directories(Externals/GLew/include)
|
||||
endif(NOT GLEW_FOUND)
|
||||
|
||||
if(NOT ${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
check_lib(CG Cg Cg/cg.h)
|
||||
endif()
|
||||
if(NOT CG_FOUND)
|
||||
message("Using static Cg from Externals")
|
||||
include_directories(Externals)
|
||||
endif(NOT CG_FOUND)
|
||||
check_lib(CGGL CgGL Cg/cgGL.h)
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND NOT ANDROID)
|
||||
find_library(CL OpenCL)
|
||||
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-weak_framework,OpenCL")
|
||||
else()
|
||||
|
@ -558,10 +568,25 @@ else()
|
|||
add_subdirectory(Externals/CLRun)
|
||||
endif()
|
||||
|
||||
if(NOT DISABLE_WX)
|
||||
if(NOT DISABLE_WX AND NOT ANDROID)
|
||||
include(FindwxWidgets OPTIONAL)
|
||||
FIND_PACKAGE(wxWidgets COMPONENTS core aui adv)
|
||||
|
||||
if(wxWidgets_FOUND)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
|
||||
${wxWidgets_CONFIG_OPTIONS} --version
|
||||
OUTPUT_VARIABLE wxWidgets_VERSION
|
||||
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||
ERROR_QUIET
|
||||
)
|
||||
message("Found wxWidgets version ${wxWidgets_VERSION}")
|
||||
if(${wxWidgets_VERSION} VERSION_LESS "2.8.9")
|
||||
message("At least 2.8.9 is required; ignoring found version")
|
||||
unset(wxWidgets_FOUND)
|
||||
endif()
|
||||
endif(wxWidgets_FOUND)
|
||||
|
||||
if(wxWidgets_FOUND)
|
||||
EXECUTE_PROCESS(
|
||||
COMMAND sh "${wxWidgets_CONFIG_EXECUTABLE}"
|
||||
|
@ -582,26 +607,26 @@ if(NOT DISABLE_WX)
|
|||
endif()
|
||||
endif(wxWidgets_FOUND)
|
||||
|
||||
if(UNIX AND NOT APPLE)
|
||||
# There is a bug in the FindGTK module in cmake version 2.8.2 that
|
||||
# does not find gdk-pixbuf-2.0. On the other hand some 2.8.3
|
||||
# users have complained that pkg-config does not find
|
||||
# gdk-pixbuf-2.0. On yet another hand, cmake version 2.8.3 in
|
||||
# Ubuntu Natty does not find the glib libraries correctly.
|
||||
# Ugly!!!
|
||||
execute_process(COMMAND lsb_release -c -s
|
||||
OUTPUT_VARIABLE DIST_NAME
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}
|
||||
VERSION_EQUAL 2.8.2 OR "${DIST_NAME}" STREQUAL "natty")
|
||||
check_lib(GTK2 gtk+-2.0 gtk.h REQUIRED)
|
||||
else()
|
||||
include(FindGTK2)
|
||||
if(GTK2_FOUND)
|
||||
include_directories(${GTK2_INCLUDE_DIRS})
|
||||
if(UNIX AND NOT APPLE)
|
||||
# There is a bug in the FindGTK module in cmake version 2.8.2 that
|
||||
# does not find gdk-pixbuf-2.0. On the other hand some 2.8.3
|
||||
# users have complained that pkg-config does not find
|
||||
# gdk-pixbuf-2.0. On yet another hand, cmake version 2.8.3 in
|
||||
# Ubuntu Natty does not find the glib libraries correctly.
|
||||
# Ugly!!!
|
||||
execute_process(COMMAND lsb_release -c -s
|
||||
OUTPUT_VARIABLE DIST_NAME
|
||||
ERROR_QUIET OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||
if(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}
|
||||
VERSION_EQUAL 2.8.2 OR "${DIST_NAME}" STREQUAL "natty")
|
||||
check_lib(GTK2 gtk+-2.0 gtk.h REQUIRED)
|
||||
else()
|
||||
include(FindGTK2)
|
||||
if(GTK2_FOUND)
|
||||
include_directories(${GTK2_INCLUDE_DIRS})
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(wxWidgets_FOUND)
|
||||
include(${wxWidgets_USE_FILE})
|
||||
|
@ -633,7 +658,7 @@ if(NOT DISABLE_WX)
|
|||
set(wxWidgets_LIBRARIES "wx")
|
||||
endif(wxWidgets_FOUND)
|
||||
add_definitions(-DHAVE_WX=1)
|
||||
endif(NOT DISABLE_WX)
|
||||
endif(NOT DISABLE_WX AND NOT ANDROID)
|
||||
|
||||
|
||||
########################################
|
||||
|
@ -653,6 +678,7 @@ file(WRITE ${PROJECT_BINARY_DIR}/Source/Core/Common/Src/scmrev.h
|
|||
)
|
||||
include_directories("${PROJECT_BINARY_DIR}/Source/Core/Common/Src")
|
||||
|
||||
|
||||
########################################
|
||||
# Start compiling our code
|
||||
#
|
||||
|
@ -707,4 +733,4 @@ list(APPEND CPACK_SOURCE_IGNORE_FILES "${CMAKE_BINARY_DIR}")
|
|||
|
||||
# CPack must be included after the CPACK_* variables are set in order for those
|
||||
# variables to take effect.
|
||||
include(CPack)
|
||||
Include(CPack)
|
||||
|
|
Binary file not shown.
Binary file not shown.
|
@ -319,4 +319,4 @@ PH_ZFar =
|
|||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 512
|
||||
[Core]
|
||||
FastDiscSpeed = 1
|
||||
|
||||
|
|
|
@ -16,4 +16,4 @@ PH_ZFar =
|
|||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 512
|
||||
[Core]
|
||||
FastDiscSpeed = 1
|
||||
|
||||
|
|
|
@ -16,4 +16,4 @@ PH_ZFar =
|
|||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 512
|
||||
[Core]
|
||||
FastDiscSpeed = 1
|
||||
|
||||
|
|
|
@ -16,4 +16,4 @@ PH_ZFar =
|
|||
[Video_Settings]
|
||||
SafeTextureCacheColorSamples = 512
|
||||
[Core]
|
||||
FastDiscSpeed = 1
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
[Core] Values set here will override the main dolphin settings.
|
||||
EnableFPRF = True
|
||||
TLBHack = 1
|
||||
CPUThread = 0
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Dual core is very unstable/doesn't even boot with most video plugins. Efb to ram is needed for proper shadows.
|
||||
EmulationIssues = Needs Synchronize GPU thread for stability.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[Video]
|
||||
ProjectionHack = 1
|
||||
|
@ -43,7 +43,4 @@ $All Vehicles Unlocked
|
|||
840030C8 FFDC6F00
|
||||
[Gecko]
|
||||
[Video_Hacks]
|
||||
EFBCopyEnable = True
|
||||
EFBToTextureEnable = False
|
||||
EFBCopyCacheEnable = True
|
||||
[Video_Settings]
|
||||
|
|
|
@ -0,0 +1,26 @@
|
|||
# GFZJ01 - F-ZERO GX
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
EnableFPRF = True
|
||||
TLBHack = 1
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Needs Synchronize GPU thread for stability.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[Video]
|
||||
ProjectionHack = 1
|
||||
PH_SZNear = 1
|
||||
PH_SZFar = 1
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear = 20
|
||||
PH_ZFar = 1.7555555
|
||||
[ActionReplay]
|
||||
$Make Save Copyable
|
||||
0C031514 909C0028
|
||||
04031518 48BFFBE8
|
||||
04C31100 38000004
|
||||
04C31104 981C0034
|
||||
04C31108 38000000
|
||||
04C3110C 4B400410
|
||||
[Gecko]
|
||||
|
|
@ -2,10 +2,10 @@
|
|||
[Core] Values set here will override the main dolphin settings.
|
||||
EnableFPRF = True
|
||||
TLBHack = 1
|
||||
CPUThread = 0
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Dual core is very unstable/doesn't even boot with most video plugins. Efb to ram is needed for proper shadows.
|
||||
EmulationIssues = Needs Synchronize GPU thread for stability.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[Video]
|
||||
ProjectionHack = 1
|
||||
|
@ -24,7 +24,4 @@ $Make Save Copyable
|
|||
04C3110C 4B400410
|
||||
[Gecko]
|
||||
[Video_Hacks]
|
||||
EFBCopyEnable = True
|
||||
EFBToTextureEnable = False
|
||||
EFBCopyCacheEnable = True
|
||||
[Video_Settings]
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
# GGZE52 - Madagascar
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
TLBHack = 1
|
||||
FastDiscSpeed = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationIssues = Alot of GFX glitches (black rastering)
|
||||
EmulationStateId = 3
|
||||
EmulationIssues = GFX glitches.
|
||||
EmulationStateId = 4
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video_Hacks]
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
# GGZX52 - Madagascar
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
TLBHack = 1
|
||||
FastDiscSpeed = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationIssues = Alot of GFX glitches (black rastering)
|
||||
EmulationStateId = 3
|
||||
EmulationIssues = GFX glitches.
|
||||
EmulationStateId = 4
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video_Hacks]
|
||||
|
|
|
@ -15,4 +15,4 @@ EmulationIssues = Slow,needs mmu and lle audio plugin for proper audio(r7411).
|
|||
[Video_Settings]
|
||||
[Core]
|
||||
MMU = 1
|
||||
FastDiscSpeed = 1
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# GKBEAF - Baten Kaitos
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues =
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
# GKBPAF - Baten Kaitos
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues =
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# GLSD64 - LucasArts Gladius
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
TLBHack = 1
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Needs Real Xfb for the videos to display.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
UseXFB = True
|
||||
UseRealXFB = True
|
|
@ -1,9 +1,10 @@
|
|||
# GLSE64 - LucasArts Gladius
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
TLBHack = 1
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 1
|
||||
EmulationIssues =
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Needs Real Xfb for the videos to display.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
|
@ -14,3 +15,6 @@ PH_ExtraParam = 0
|
|||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
UseXFB = True
|
||||
UseRealXFB = True
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
# GLSF64 - LucasArts Gladius
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
TLBHack = 1
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Needs Real Xfb for the videos to display.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
UseXFB = True
|
||||
UseRealXFB = True
|
|
@ -0,0 +1,20 @@
|
|||
# GLSP64 - LucasArts Gladius
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
TLBHack = 1
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Needs Real Xfb for the videos to display.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
UseXFB = True
|
||||
UseRealXFB = True
|
|
@ -127,3 +127,5 @@ PH_ExtraParam = 0
|
|||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Core]
|
||||
VBeam = 1
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# GM4J01 - Mario Kart: Double Dash!!
|
||||
[EmuState]
|
||||
#The Emulation State.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Needs LLE audio to prevent BGM from stopping. Disable "emulate format changes" to increase the game speed.
|
||||
[OnFrame]
|
||||
[ActionReplay]
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Core]
|
||||
VBeam = 1
|
|
@ -138,3 +138,5 @@ $Goraud Shading
|
|||
040A9714 4E800020
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
[Core]
|
||||
VBeam = 1
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#Values set here will override the main dolphin settings.
|
||||
[EmuState]
|
||||
#The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 1
|
||||
EmulationIssues =
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Enable the GameCube BIOS to allow the game to boot.
|
||||
[OnFrame]
|
||||
+$Nop Hack
|
||||
0x80025BA0:dword:0x60000000
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# GNOE78 - Nicktoons Unite!
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
TLBHack = 1
|
||||
FastDiscSpeed = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues =
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# GOSE41 - Open Season
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
MMU = 1
|
||||
FastDiscSpeed = 1
|
||||
BlockMerging = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# GOSP41 - Open Season
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
MMU = 1
|
||||
FastDiscSpeed = 1
|
||||
BlockMerging = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# GOSX41 - Open Season
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
MMU = 1
|
||||
FastDiscSpeed = 1
|
||||
BlockMerging = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
# GSZP41 - SPEED CHALLENGE - Jacques Villeneuve's Racing Vision
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues =
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
UseBBox = 1
|
||||
[Gecko]
|
|
@ -1,6 +1,5 @@
|
|||
# GWAE8P - Spartan: Total Warrior
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
FastDiscSpeed = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 0
|
||||
EmulationIssues =
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# GWAF8P - Spartan: Total Warrior
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
FastDiscSpeed = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 0
|
||||
EmulationIssues =
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# GWAP8P - Spartan : Total Warrior (TM)
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
FastDiscSpeed = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 0
|
||||
EmulationIssues =
|
||||
|
|
|
@ -0,0 +1,16 @@
|
|||
# GWKE41 - King Kong
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
TLBHack = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues =
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
|
@ -0,0 +1,18 @@
|
|||
# GWLE6L - Project Zoo
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
TLBHack = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues =
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
+$Bypass FIFO reset
|
||||
0x8028EF00:dword:0x48000638
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
|
@ -1,6 +1,5 @@
|
|||
# GZ2E01 - The Legend of Zelda: Twilight Princess
|
||||
[Core]
|
||||
FastDiscSpeed = 1
|
||||
[EmuState]
|
||||
#The Emulation State.
|
||||
EmulationStateId = 4
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
# GZ2J01 - The Legend of Zelda: Twilight Princess
|
||||
[Core]
|
||||
FastDiscSpeed = 1
|
||||
[EmuState]
|
||||
#The Emulation State.
|
||||
EmulationStateId = 4
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
# GZ2P01 - The Legend of Zelda Twilight Princess
|
||||
[Core]
|
||||
#Values set here will override the main dolphin settings.
|
||||
FastDiscSpeed = 1
|
||||
[Speedhacks]
|
||||
0x803420bc=200
|
||||
[EmuState]
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# RFEE01 - FIRE EMBLEM 10 USA
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationIssues = Disable gamecube controller or wiimote to not have conflicts. Fog appears black ingame in recent builds(issue 4475).
|
||||
EmulationIssues = Disable gamecube controller or wiimote to not have conflicts.
|
||||
EmulationStateId = 4
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
|
@ -15,4 +15,3 @@ PH_ZNear =
|
|||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
DisableFog = True
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# RFEJ01 - Fire Emblem Akatsuki No Megami
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationIssues = Disable gamecube controller or wiimote to not have conflicts. Fog appears black ingame in recent builds(issue 4475).
|
||||
EmulationIssues = Disable gamecube controller or wiimote to not have conflicts.
|
||||
EmulationStateId = 4
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
|
@ -15,4 +15,3 @@ PH_ZNear =
|
|||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
DisableFog = True
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
[Speedhacks]
|
||||
0x80006e00=800
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationIssues = Disable gamecube controller or wiimote to not have conflicts. Fog appears black ingame in recent builds(issue 4475).
|
||||
EmulationIssues = Disable gamecube controller or wiimote to not have conflicts.
|
||||
EmulationStateId = 4
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
|
@ -17,4 +17,3 @@ PH_ZNear =
|
|||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
DisableFog = True
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# RRBE41 - Rayman Raving Rabbids
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
CPUThread = 0
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Dual core is unstable.Use direct3d11 for less glitches. Slow.(r7687)
|
||||
EmulationIssues = Needs Synchronise GPU thread for stability. Use direct3d11 for less glitches.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
|
@ -14,4 +14,4 @@ PH_ExtraParam = 0
|
|||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Wii]
|
||||
[Wii]
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# RRBJ41 - Rayman Raving Rabbids
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
CPUThread = 0
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Dual core is unstable.Use direct3d11 for less glitches. Slow.(r7687)
|
||||
EmulationIssues = Needs Synchronise GPU thread for stability. Use direct3d11 for less glitches.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
# RRBP41 - Rayman Raving Rabbids
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
CPUThread = 0
|
||||
SyncGPU = 1
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Dual core is unstable.Use direct3d11 for less glitches. Slow.(r7687)
|
||||
EmulationIssues = Needs Synchronise GPU thread for stability. Use direct3d11 for less glitches.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
# S72E01 - Kirby's Dream Collection Special Edition
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 3
|
||||
EmulationIssues = Classic games are unplayable.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
UseXFB = True
|
||||
UseRealXFB = False
|
||||
# S72E01 - Kirby's Dream Collection Special Edition
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Kirby's Adventure (Nes classic) has severe graphic glitches.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
UseXFB = True
|
||||
UseRealXFB = False
|
||||
SafeTextureCacheColorSamples = 0
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
# S72J01 - Hoshi No Kirby: 20th Anniversary Edition
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 3
|
||||
EmulationIssues = Classic games are unplayable.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
UseXFB = True
|
||||
UseRealXFB = False
|
||||
# S72J01 - Hoshi No Kirby: 20th Anniversary Edition
|
||||
[Core] Values set here will override the main dolphin settings.
|
||||
[EmuState] The Emulation State. 1 is worst, 5 is best, 0 is not set.
|
||||
EmulationStateId = 4
|
||||
EmulationIssues = Kirby's Adventure (Nes classic) has severe graphic glitches.
|
||||
[OnFrame] Add memory patches to be applied every frame here.
|
||||
[ActionReplay] Add action replay cheats here.
|
||||
[Video]
|
||||
ProjectionHack = 0
|
||||
PH_SZNear = 0
|
||||
PH_SZFar = 0
|
||||
PH_ExtraParam = 0
|
||||
PH_ZNear =
|
||||
PH_ZFar =
|
||||
[Gecko]
|
||||
[Video_Settings]
|
||||
UseXFB = True
|
||||
UseRealXFB = False
|
||||
SafeTextureCacheColorSamples = 0
|
||||
|
|
|
@ -1,109 +1,61 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
|
||||
//Change this number to increase the pixel size.
|
||||
int pixelSize = 3;
|
||||
float pixelSize = 3;
|
||||
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
int val = uv0[0];
|
||||
int val2 = uv0[1];
|
||||
|
||||
val = val % pixelSize;
|
||||
val2 = val2 % pixelSize;
|
||||
|
||||
if(val == 0 && val2 == 0 ){
|
||||
if (c0.r < 0.1 && c0.r >= 0)
|
||||
red = 0.1;
|
||||
if (c0.r < 0.20 && c0.r >= 0.1)
|
||||
red = 0.20;
|
||||
if (c0.r <0.40 && c0.r >= 0.20)
|
||||
red = 0.40;
|
||||
if (c0.r <0.60 && c0.r >= 0.40)
|
||||
red = 0.60;
|
||||
if (c0.r <0.80 && c0.r >= 0.60)
|
||||
red = 0.80;
|
||||
if (c0.r >= 0.80)
|
||||
red = 1;
|
||||
|
||||
if (c0.b < 0.1 && c0.b >= 0)
|
||||
blue = 0.1;
|
||||
if (c0.b < 0.20 && c0.b >= 0.1)
|
||||
blue = 0.20;
|
||||
if (c0.b <0.40 && c0.b >= 0.20)
|
||||
blue = 0.40;
|
||||
if (c0.b <0.60 && c0.b >= 0.40)
|
||||
blue = 0.60;
|
||||
if (c0.b <0.80 && c0.b >= 0.60)
|
||||
blue = 0.80;
|
||||
if (c0.b >= 0.80)
|
||||
blue = 1;
|
||||
|
||||
|
||||
if (c0.g < 0.1 && c0.g >= 0)
|
||||
green = 0.1;
|
||||
if (c0.g < 0.20 && c0.g >= 0.1)
|
||||
green = 0.20;
|
||||
if (c0.g <0.40 && c0.g >= 0.20)
|
||||
green = 0.40;
|
||||
if (c0.g <0.60 && c0.g >= 0.40)
|
||||
green = 0.60;
|
||||
if (c0.g <0.80 && c0.g >= 0.60)
|
||||
green = 0.80;
|
||||
if (c0.g >= 0.80)
|
||||
green = 1;
|
||||
|
||||
}
|
||||
else{
|
||||
float4 c1 = texRECT(samp0, uv0-float2(val, val2)).rgba;
|
||||
|
||||
if (c1.r < 0.1 && c1.r >= 0)
|
||||
red = 0.1;
|
||||
if (c1.r < 0.20 && c1.r >= 0.1)
|
||||
red = 0.20;
|
||||
if (c1.r <0.40 && c1.r >= 0.20)
|
||||
red = 0.40;
|
||||
if (c1.r <0.60 && c1.r >= 0.40)
|
||||
red = 0.60;
|
||||
if (c1.r <0.80 && c1.r >= 0.60)
|
||||
red = 0.80;
|
||||
if (c1.r >= 0.80)
|
||||
red = 1;
|
||||
|
||||
if (c1.b < 0.1 && c1.b >= 0)
|
||||
blue = 0.1;
|
||||
if (c1.b < 0.20 && c1.b >= 0.1)
|
||||
blue = 0.20;
|
||||
if (c1.b <0.40 && c1.b >= 0.20)
|
||||
blue = 0.40;
|
||||
if (c1.b <0.60 && c1.b >= 0.40)
|
||||
blue = 0.60;
|
||||
if (c1.b <0.80 && c1.b >= 0.60)
|
||||
blue = 0.80;
|
||||
if (c1.b >= 0.80)
|
||||
blue = 1;
|
||||
|
||||
|
||||
if (c1.g < 0.1 && c1.g >= 0)
|
||||
green = 0.1;
|
||||
if (c1.g < 0.20 && c1.g >= 0.1)
|
||||
green = 0.20;
|
||||
if (c1.g <0.40 && c1.g >= 0.20)
|
||||
green = 0.40;
|
||||
if (c1.g <0.60 && c1.g >= 0.40)
|
||||
green = 0.60;
|
||||
if (c1.g <0.80 && c1.g >= 0.60)
|
||||
green = 0.80;
|
||||
if (c1.g >= 0.80)
|
||||
green = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
ocol0 = float4(red, green, blue, c0.a);
|
||||
vec2 pos = floor(uv0 * resolution.xy / pixelSize) * pixelSize * resolution.zw;
|
||||
|
||||
vec4 c0 = texture(samp9, pos);
|
||||
|
||||
if (c0.r < 0.1)
|
||||
red = 0.1;
|
||||
else if (c0.r < 0.20)
|
||||
red = 0.20;
|
||||
else if (c0.r < 0.40)
|
||||
red = 0.40;
|
||||
else if (c0.r < 0.60)
|
||||
red = 0.60;
|
||||
else if (c0.r < 0.80)
|
||||
red = 0.80;
|
||||
else
|
||||
red = 1.0;
|
||||
|
||||
if (c0.b < 0.1)
|
||||
blue = 0.1;
|
||||
else if (c0.b < 0.20)
|
||||
blue = 0.20;
|
||||
else if (c0.b < 0.40)
|
||||
blue = 0.40;
|
||||
else if (c0.b < 0.60)
|
||||
blue = 0.60;
|
||||
else if (c0.b < 0.80)
|
||||
blue = 0.80;
|
||||
else
|
||||
blue = 1.0;
|
||||
|
||||
if (c0.g < 0.1)
|
||||
green = 0.1;
|
||||
else if (c0.g < 0.20)
|
||||
green = 0.20;
|
||||
else if (c0.g < 0.40)
|
||||
green = 0.40;
|
||||
else if (c0.g < 0.60)
|
||||
green = 0.60;
|
||||
else if (c0.g < 0.80)
|
||||
green = 0.80;
|
||||
else
|
||||
green = 1.0;
|
||||
|
||||
ocol0 = vec4(red, green, blue, c0.a);
|
||||
}
|
|
@ -1,157 +1,86 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
|
||||
//Change this number to increase the pixel size.
|
||||
int pixelSize = 2;
|
||||
float pixelSize = 2;
|
||||
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
int val = uv0[0];
|
||||
int val2 = uv0[1];
|
||||
|
||||
val = val % pixelSize;
|
||||
val2 = val2 % pixelSize;
|
||||
|
||||
if(val == 0 && val2 == 0 ){
|
||||
if (c0.r < 0.06 && c0.r >= 0)
|
||||
red = 0.06;
|
||||
if (c0.r < 0.13 && c0.r >= 0.06)
|
||||
red = 0.13;
|
||||
if (c0.r < 0.26 && c0.r >= 0.13)
|
||||
red = 0.26;
|
||||
if (c0.r < 0.33 && c0.r >= 0.26)
|
||||
red = 0.33;
|
||||
if (c0.r <0.46 && c0.r >= 0.33)
|
||||
red = 0.46;
|
||||
if (c0.r <0.60 && c0.r >= 0.46)
|
||||
red = 0.60;
|
||||
if (c0.r <0.73 && c0.r >= 0.60)
|
||||
red = 0.73;
|
||||
if (c0.r <0.80 && c0.r >= 0.73)
|
||||
red = 0.80;
|
||||
if (c0.r <0.93 && c0.r >= 0.80)
|
||||
red = 0.93;
|
||||
if (c0.r <=1 && c0.r >= 0.93)
|
||||
red = 1;
|
||||
|
||||
if (c0.b < 0.06 && c0.b >= 0)
|
||||
blue = 0.06;
|
||||
if (c0.b < 0.13 && c0.b >= 0.06)
|
||||
blue = 0.13;
|
||||
if (c0.b < 0.26 && c0.b >= 0.13)
|
||||
blue = 0.26;
|
||||
if (c0.b < 0.33 && c0.b >= 0.26)
|
||||
blue = 0.33;
|
||||
if (c0.b <0.46 && c0.b >= 0.33)
|
||||
blue = 0.46;
|
||||
if (c0.b <0.60 && c0.b >= 0.46)
|
||||
blue = 0.60;
|
||||
if (c0.b <0.73 && c0.b >= 0.60)
|
||||
blue = 0.73;
|
||||
if (c0.b <0.80 && c0.b >= 0.73)
|
||||
blue = 0.80;
|
||||
if( c0.b <0.93 && c0.b >= 0.80)
|
||||
blue = 0.93;
|
||||
if (c0.b <=1 && c0.b >= 0.93)
|
||||
blue = 1;
|
||||
|
||||
|
||||
if (c0.g < 0.06 && c0.g >= 0)
|
||||
green = 0.06;
|
||||
if (c0.g < 0.13 && c0.g >= 0.06)
|
||||
green = 0.13;
|
||||
if (c0.g < 0.26 && c0.g >= 0.13)
|
||||
green = 0.26;
|
||||
if (c0.g < 0.33 && c0.g >= 0.26)
|
||||
green = 0.33;
|
||||
if (c0.g <0.46 && c0.g >= 0.33)
|
||||
green = 0.46;
|
||||
if (c0.g <0.60 && c0.g >= 0.46)
|
||||
green = 0.60;
|
||||
if (c0.g <0.73 && c0.g >= 0.60)
|
||||
green = 0.73;
|
||||
if (c0.g <0.80 && c0.g >= 0.73)
|
||||
green = 0.80;
|
||||
if( c0.g <0.93 && c0.g >= 0.80)
|
||||
green = 0.93;
|
||||
if (c0.g <=1 && c0.g >= 0.93)
|
||||
green = 1;
|
||||
|
||||
}
|
||||
else{
|
||||
float4 c1 = texRECT(samp0, uv0-float2(val, val2)).rgba;
|
||||
|
||||
if (c1.r < 0.06 && c1.r >= 0)
|
||||
red = 0.06;
|
||||
if (c1.r < 0.13 && c1.r >= 0.06)
|
||||
red = 0.13;
|
||||
if (c1.r < 0.26 && c1.r >= 0.13)
|
||||
red = 0.26;
|
||||
if (c1.r < 0.33 && c1.r >= 0.26)
|
||||
red = 0.33;
|
||||
if (c1.r <0.46 && c1.r >= 0.33)
|
||||
red = 0.46;
|
||||
if (c1.r <0.60 && c1.r >= 0.46)
|
||||
red = 0.60;
|
||||
if (c1.r <0.73 && c1.r >= 0.60)
|
||||
red = 0.73;
|
||||
if (c1.r <0.80 && c1.r >= 0.73)
|
||||
red = 0.80;
|
||||
if (c1.r <0.93 && c1.r >= 0.80)
|
||||
red = 0.93;
|
||||
if (c1.r <=1 && c1.r >= 0.93)
|
||||
red = 1;
|
||||
|
||||
if (c1.b < 0.06 && c1.b >= 0)
|
||||
blue = 0.06;
|
||||
if (c1.b < 0.13 && c1.b >= 0.06)
|
||||
blue = 0.13;
|
||||
if (c1.b < 0.26 && c1.b >= 0.13)
|
||||
blue = 0.26;
|
||||
if (c1.b < 0.33 && c1.b >= 0.26)
|
||||
blue = 0.33;
|
||||
if (c1.b <0.46 && c1.b >= 0.33)
|
||||
blue = 0.46;
|
||||
if (c1.b <0.60 && c1.b >= 0.46)
|
||||
blue = 0.60;
|
||||
if (c1.b <0.73 && c1.b >= 0.60)
|
||||
blue = 0.73;
|
||||
if (c1.b <0.80 && c1.b >= 0.73)
|
||||
blue = 0.80;
|
||||
if( c1.b <0.93 && c1.b >= 0.80)
|
||||
blue = 0.93;
|
||||
if (c1.b <=1 && c1.b >= 0.93)
|
||||
blue = 1;
|
||||
|
||||
|
||||
if (c1.g < 0.06 && c1.g >= 0)
|
||||
green = 0.06;
|
||||
if (c1.g < 0.13 && c1.g >= 0.06)
|
||||
green = 0.13;
|
||||
if (c1.g < 0.26 && c1.g >= 0.13)
|
||||
green = 0.26;
|
||||
if (c1.g < 0.33 && c1.g >= 0.26)
|
||||
green = 0.33;
|
||||
if (c1.g <0.46 && c1.g >= 0.33)
|
||||
green = 0.46;
|
||||
if (c1.g <0.60 && c1.g >= 0.46)
|
||||
green = 0.60;
|
||||
if (c1.g <0.73 && c1.g >= 0.60)
|
||||
green = 0.73;
|
||||
if (c1.g <0.80 && c1.g >= 0.73)
|
||||
green = 0.80;
|
||||
if( c1.g <0.93 && c1.g >= 0.80)
|
||||
green = 0.93;
|
||||
if ( c1.g >= 0.93)
|
||||
green = 1;
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
ocol0 = float4(red, green, blue, c0.a);
|
||||
vec2 pos = floor(uv0 * resolution.xy / pixelSize) * pixelSize * resolution.zw;
|
||||
|
||||
vec4 c0 = texture(samp9, pos);
|
||||
|
||||
if (c0.r < 0.06)
|
||||
red = 0.06;
|
||||
else if (c0.r < 0.13)
|
||||
red = 0.13;
|
||||
else if (c0.r < 0.26)
|
||||
red = 0.26;
|
||||
else if (c0.r < 0.33)
|
||||
red = 0.33;
|
||||
else if (c0.r < 0.46)
|
||||
red = 0.46;
|
||||
else if (c0.r < 0.60)
|
||||
red = 0.60;
|
||||
else if (c0.r < 0.73)
|
||||
red = 0.73;
|
||||
else if (c0.r < 0.80)
|
||||
red = 0.80;
|
||||
else if (c0.r < 0.93)
|
||||
red = 0.93;
|
||||
else
|
||||
red = 1.0;
|
||||
|
||||
if (c0.b < 0.06)
|
||||
blue = 0.06;
|
||||
else if (c0.b < 0.13)
|
||||
blue = 0.13;
|
||||
else if (c0.b < 0.26)
|
||||
blue = 0.26;
|
||||
else if (c0.b < 0.33)
|
||||
blue = 0.33;
|
||||
else if (c0.b < 0.46)
|
||||
blue = 0.46;
|
||||
else if (c0.b < 0.60)
|
||||
blue = 0.60;
|
||||
else if (c0.b < 0.73)
|
||||
blue = 0.73;
|
||||
else if (c0.b < 0.80)
|
||||
blue = 0.80;
|
||||
else if( c0.b < 0.93)
|
||||
blue = 0.93;
|
||||
else
|
||||
blue = 1.0;
|
||||
|
||||
|
||||
if (c0.g < 0.06)
|
||||
green = 0.06;
|
||||
else if (c0.g < 0.13)
|
||||
green = 0.13;
|
||||
else if (c0.g < 0.26)
|
||||
green = 0.26;
|
||||
else if (c0.g < 0.33)
|
||||
green = 0.33;
|
||||
else if (c0.g < 0.46)
|
||||
green = 0.46;
|
||||
else if (c0.g < 0.60)
|
||||
green = 0.60;
|
||||
else if (c0.g < 0.73)
|
||||
green = 0.73;
|
||||
else if (c0.g < 0.80)
|
||||
green = 0.80;
|
||||
else if( c0.g < 0.93)
|
||||
green = 0.93;
|
||||
else
|
||||
green = 1.0;
|
||||
|
||||
ocol0 = vec4(red, green, blue, c0.a);
|
||||
}
|
|
@ -1,11 +1,14 @@
|
|||
//dummy shader:
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(c0.r, c0.g, c0.b, c0.a);
|
||||
ocol0 = texture(samp9, uv0);
|
||||
}
|
||||
|
||||
/*
|
||||
And now that's over with, the contents of this readme file!
|
||||
For best results, turn Wordwrap formatting on...
|
||||
|
|
|
@ -1,18 +1,21 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float blue = 0.0;
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
float red = 0.0;
|
||||
float blue = 0.0;
|
||||
|
||||
if (c0.r > 0.15 && c0.b > 0.15)
|
||||
{
|
||||
blue = 0.5;
|
||||
red = 0.5;
|
||||
}
|
||||
|
||||
float green = max(c0.r + c0.b, c0.g);
|
||||
if (c0.r > 0.15 && c0.b > 0.15)
|
||||
{
|
||||
blue = 0.5;
|
||||
red = 0.5;
|
||||
}
|
||||
|
||||
ocol0 = float4(red, green, blue, 1.0);
|
||||
}
|
||||
float green = max(c0.r + c0.b, c0.g);
|
||||
|
||||
ocol0 = vec4(red, green, blue, 1.0);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,11 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
ocol0 = (texRECT(samp0, uv0+1).rgba - texRECT(samp0, uv0-1).rgba)*8;
|
||||
ocol0 = (texture(samp9, uv0+resolution.zw) - texture(samp9, uv0-resolution.zw))*8;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,13 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
ocol0 = texRECT(samp0, uv0+1).rgba * 1.3 * abs(texRECT(samp0, uv0+1).rgba - texRECT(samp0, uv0-1).rgba)*8;
|
||||
vec4 a = texture(samp9, uv0+resolution.zw);
|
||||
vec4 b = texture(samp9, uv0-resolution.zw);
|
||||
ocol0 = ( a*a*1.3 - b )*8;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,95 @@
|
|||
uniform sampler2D samp8; // textures
|
||||
uniform sampler2D samp9;
|
||||
|
||||
const int char_width = 8;
|
||||
const int char_height = 13;
|
||||
const int char_count = 95;
|
||||
const int char_pixels = char_width*char_height;
|
||||
const vec2 char_dim = vec2(char_width, char_height);
|
||||
const vec2 font_scale = vec2(1.0/char_width/char_count, 1.0/char_height);
|
||||
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
vec2 char_pos = floor(uv0*resolution.xy/char_dim);
|
||||
vec2 pixel_offset = floor(uv0*resolution.xy) - char_pos*char_dim;
|
||||
|
||||
float mindiff = char_width*char_height*100; // just a big number
|
||||
float minc = 0.0;
|
||||
vec4 mina = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
vec4 minb = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
for(int i=0; i<char_count; i++) {
|
||||
vec4 ff = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
vec4 f = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
vec4 ft = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
vec4 t = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
vec4 tt = vec4(0.0, 0.0, 0.0, 0.0);
|
||||
|
||||
for(int x=0; x<char_width; x++) {
|
||||
for(int y=0; y<char_height; y++) {
|
||||
|
||||
vec2 tex_pos = char_pos*char_dim + vec2(x,y) + 0.5;
|
||||
vec4 tex = texture(samp9, tex_pos * resolution.zw);
|
||||
|
||||
vec2 font_pos = vec2(x+i*char_width, y) + 0.5;
|
||||
vec4 font = texture(samp8, font_pos * font_scale);
|
||||
|
||||
// generates sum of texture and font and their squares
|
||||
ff += font*font;
|
||||
f += font;
|
||||
ft += font*tex;
|
||||
t += tex;
|
||||
tt += tex*tex;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
The next lines are a bit harder, hf :-)
|
||||
|
||||
The idea is to find the perfect char with the perfect background color and the perfect font color.
|
||||
As this is an equation with three unknowns, we can't just try all chars and color combinations.
|
||||
|
||||
As criterion how "perfect" the selection is, we compare the "mean squared error" of the resulted colors of all chars.
|
||||
So, now the big issue: how to calculate the MSE without knowing the two colors ...
|
||||
|
||||
In the next steps, "a" is the font color, "b" is the background color, "f" is the font value at this pixel, "t" is the texture value
|
||||
|
||||
So the square error of one pixel is:
|
||||
e = ( t - a⋅f - b⋅(1-f) ) ^ 2
|
||||
|
||||
In longer:
|
||||
e = a^2⋅f^2 - 2⋅a⋅b⋅f^2 + 2⋅a⋅b⋅f - 2⋅a⋅f⋅t + b^2⋅f^2 - 2⋅b^2⋅f + b^2 + 2⋅b⋅f⋅t - 2⋅b⋅t + t^2
|
||||
|
||||
The sum of all errors is: (as shortcut, ff,f,ft,t,tt are now the sums like declared above, sum(1) is the count of pixels)
|
||||
sum(e) = a^2⋅ff - 2⋅a^2⋅ff + 2⋅a⋅b⋅f - 2⋅a⋅ft + b^2⋅ff - 2⋅b^2⋅f + b^2⋅sum(1) + 2⋅b⋅ft - 2⋅b⋅t + tt
|
||||
|
||||
To find the minimum, we have to derive this by "a" and "b":
|
||||
d/da sum(e) = 2⋅a⋅ff + 2⋅b⋅f - 2⋅b⋅ff - 2⋅ft
|
||||
d/db sum(e) = 2⋅a⋅f - 2⋅a⋅ff - 4⋅b⋅f + 2⋅b⋅ff + 2⋅b⋅sum(1) + 2⋅ft - 2⋅t
|
||||
|
||||
So, both equations must be zero at minimum and there is only one solution.
|
||||
*/
|
||||
vec4 a = (f*ft - ff*t + f*t - ft*char_pixels) / (f*f - ff*char_pixels);
|
||||
vec4 b = (f*ft - ff*t) / (f*f - ff*char_pixels);
|
||||
|
||||
vec4 diff = a*a*ff + 2.0*a*b*f - 2.0*a*b*ff - 2.0*a*ft + b*b *(-2.0*f + ff + char_pixels) + 2.0*b*ft - 2.0*b*t + tt;
|
||||
float diff_f = dot(diff, vec4(1.0, 1.0, 1.0, 1.0));
|
||||
|
||||
if(diff_f < mindiff) {
|
||||
mindiff = diff_f;
|
||||
minc = i;
|
||||
mina = a;
|
||||
minb = b;
|
||||
}
|
||||
}
|
||||
|
||||
vec2 font_pos_res = vec2(minc*char_width, 0) + pixel_offset + 0.5;
|
||||
|
||||
vec4 col = texture(samp8, font_pos_res * font_scale);
|
||||
ocol0 = mina * col + minb * (vec4(1.0,1.0,1.0,1.0) - col);
|
||||
}
|
|
@ -1,16 +1,22 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 to_gray = float4(0.3,0.59,0.11,0);
|
||||
float x1 = dot(to_gray, texRECT(samp0, uv0+float2(1,1)));
|
||||
float x0 = dot(to_gray, texRECT(samp0, uv0+float2(-1,-1)));
|
||||
float x3 = dot(to_gray, texRECT(samp0, uv0+float2(1,-1)));
|
||||
float x2 = dot(to_gray, texRECT(samp0, uv0+float2(-1,1)));
|
||||
float edge = (x1 - x0) * (x1 - x0);
|
||||
float edge2 = (x3 - x2) * (x3 - x2);
|
||||
edge += edge2;
|
||||
float4 color = texRECT(samp0, uv0).rgba;
|
||||
vec4 to_gray = vec4(0.3,0.59,0.11,0);
|
||||
|
||||
float x1 = dot(to_gray, texture(samp9, uv0+vec2(1,1)*resolution.zw));
|
||||
float x0 = dot(to_gray, texture(samp9, uv0+vec2(-1,-1)*resolution.zw));
|
||||
float x3 = dot(to_gray, texture(samp9, uv0+vec2(1,-1)*resolution.zw));
|
||||
float x2 = dot(to_gray, texture(samp9, uv0+vec2(-1,1)*resolution.zw));
|
||||
|
||||
float edge = (x1 - x0) * (x1 - x0) + (x3 - x2) * (x3 - x2);
|
||||
|
||||
float4 color = texture(samp9, uv0).rgba;
|
||||
|
||||
ocol0 = max(color - float4(edge, edge, edge, edge) * 12, float4(0,0,0,0));
|
||||
ocol0 = color - vec4(edge, edge, edge, edge) * 12.0;
|
||||
}
|
||||
|
|
|
@ -1,24 +1,25 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
//Changethis to increase the number of colors.
|
||||
float numColors =8;
|
||||
int numColors =8;
|
||||
|
||||
float4 to_gray = float4(0.3,0.59,0.11,0);
|
||||
float x1 = dot(to_gray, texRECT(samp0, uv0+float2(1,1)));
|
||||
float x0 = dot(to_gray, texRECT(samp0, uv0+float2(-1,-1)));
|
||||
float x3 = dot(to_gray, texRECT(samp0, uv0+float2(1,-1)));
|
||||
float x2 = dot(to_gray, texRECT(samp0, uv0+float2(-1,1)));
|
||||
float edge = (x1 - x0) * (x1 - x0);
|
||||
float edge2 = (x3 - x2) * (x3 - x2);
|
||||
edge += edge2;
|
||||
float4 color = texRECT(samp0, uv0).rgba;
|
||||
float x1 = dot(to_gray, texture(samp9, uv0+vec2(1,1)*resolution.zw));
|
||||
float x0 = dot(to_gray, texture(samp9, uv0+vec2(-1,-1)*resolution.zw));
|
||||
float x3 = dot(to_gray, texture(samp9, uv0+vec2(1,-1)*resolution.zw));
|
||||
float x2 = dot(to_gray, texture(samp9, uv0+vec2(-1,1)*resolution.zw));
|
||||
float edge = (x1 - x0) * (x1 - x0) + (x3 - x2) * (x3 - x2);
|
||||
float4 color = texture(samp9, uv0).rgba;
|
||||
|
||||
float4 c0 = max(color - float4(edge, edge, edge, edge) * 12, float4(0,0,0,0));
|
||||
float4 c0 = color - float4(edge, edge, edge, edge) * 12;
|
||||
|
||||
//Change this number to increase the pixel size.
|
||||
int pixelSize = 1;
|
||||
|
||||
|
||||
float red = 0.0;
|
||||
|
@ -27,19 +28,11 @@ void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
|||
bool rr = false;
|
||||
bool bb = false;
|
||||
bool gg = false;
|
||||
int val = uv0[0];
|
||||
int val2 = uv0[1];
|
||||
int count = 1;
|
||||
|
||||
double colorN = 0.0;
|
||||
double colorB = 0.0;
|
||||
val = val % pixelSize;
|
||||
val2 = val2 % pixelSize;
|
||||
float colorN = 0.0;
|
||||
float colorB = 0.0;
|
||||
|
||||
//if(val == 0 && val2 == 0 )
|
||||
// c0 = texRECT(samp0, uv0).rgba;
|
||||
//else
|
||||
// c0 = texRECT(samp0, uv0-float2(val, val2)).rgba;
|
||||
|
||||
for(count = 1; count <= numColors ; count++){
|
||||
colorN = count / numColors;
|
||||
|
|
|
@ -1,36 +1,41 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0, in float2 uv1 : TEXCOORD1)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c_center = texRECT(samp0, uv0.xy).rgba;
|
||||
float4 c_center = texture(samp9, uv0);
|
||||
|
||||
float4 bloom_sum = float4(0.0, 0.0, 0.0, 0.0);
|
||||
uv0 += float2(0.3, 0.3);
|
||||
float radius1 = 1.3;
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-1.5, -1.5) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-2.5, 0) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-1.5, 1.5) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(0, 2.5) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(1.5, 1.5) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(2.5, 0) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(1.5, -1.5) * radius1);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(0, -2.5) * radius1);
|
||||
vec2 pos = uv0 + float2(0.3, 0.3) * resolution.zw;
|
||||
float2 radius1 = 1.3 * resolution.zw;
|
||||
bloom_sum += texture(samp9, pos + float2(-1.5, -1.5) * radius1);
|
||||
bloom_sum += texture(samp9, pos + float2(-2.5, 0) * radius1);
|
||||
bloom_sum += texture(samp9, pos + float2(-1.5, 1.5) * radius1);
|
||||
bloom_sum += texture(samp9, pos + float2(0, 2.5) * radius1);
|
||||
bloom_sum += texture(samp9, pos + float2(1.5, 1.5) * radius1);
|
||||
bloom_sum += texture(samp9, pos + float2(2.5, 0) * radius1);
|
||||
bloom_sum += texture(samp9, pos + float2(1.5, -1.5) * radius1);
|
||||
bloom_sum += texture(samp9, pos + float2(0, -2.5) * radius1);
|
||||
|
||||
float radius2 = 4.6;
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-1.5, -1.5) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-2.5, 0) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(-1.5, 1.5) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(0, 2.5) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(1.5, 1.5) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(2.5, 0) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(1.5, -1.5) * radius2);
|
||||
bloom_sum += texRECT(samp0, uv0 + float2(0, -2.5) * radius2);
|
||||
float2 radius2 = 4.6 * resolution.zw;
|
||||
bloom_sum += texture(samp9, pos + float2(-1.5, -1.5) * radius2);
|
||||
bloom_sum += texture(samp9, pos + float2(-2.5, 0) * radius2);
|
||||
bloom_sum += texture(samp9, pos + float2(-1.5, 1.5) * radius2);
|
||||
bloom_sum += texture(samp9, pos + float2(0, 2.5) * radius2);
|
||||
bloom_sum += texture(samp9, pos + float2(1.5, 1.5) * radius2);
|
||||
bloom_sum += texture(samp9, pos + float2(2.5, 0) * radius2);
|
||||
bloom_sum += texture(samp9, pos + float2(1.5, -1.5) * radius2);
|
||||
bloom_sum += texture(samp9, pos + float2(0, -2.5) * radius2);
|
||||
|
||||
bloom_sum *= 0.07;
|
||||
bloom_sum -= float4(0.3, 0.3, 0.3, 0.3);
|
||||
bloom_sum = max(bloom_sum, float4(0,0,0,0));
|
||||
|
||||
float2 vpos = (uv1 - float2(.5, .5)) * 2;
|
||||
float2 vpos = (uv0 - float2(.5, .5)) * 2;
|
||||
float dist = (dot(vpos, vpos));
|
||||
dist = 1 - 0.4*dist;
|
||||
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
c0 += c0 * 2;
|
||||
ocol0 = float4(c0.r, c0.g, c0.b, c0.a);
|
||||
}
|
||||
ocol0 = texture(samp9, uv0) * 3;
|
||||
}
|
||||
|
|
|
@ -1,20 +1,17 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
|
||||
if (c0.r < 0.35 || c0.b > 0.35)
|
||||
{
|
||||
green = c0.g + (c0.b / 2);
|
||||
}
|
||||
else
|
||||
{
|
||||
//red = 1 - c0.r + (c0.b / 2);
|
||||
red = c0.r + 0.4;
|
||||
}
|
||||
|
||||
ocol0 = float4(red, green, 0.0, 1.0);
|
||||
}
|
||||
if (c0.r < 0.35 || c0.b > 0.35)
|
||||
green = c0.g + (c0.b / 2);
|
||||
else
|
||||
red = c0.r + 0.4;
|
||||
ocol0 = vec4(red, green, 0.0, 1.0);
|
||||
}
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
|
||||
if (c0.r < 0.50 || c0.b > 0.5)
|
||||
{
|
||||
blue = c0.r;
|
||||
red = c0.g;
|
||||
}
|
||||
else
|
||||
{
|
||||
blue = c0.r;
|
||||
green = c0.r;
|
||||
}
|
||||
|
||||
ocol0 = float4(red, green, blue, 1.0);
|
||||
}
|
||||
if (c0.r < 0.50 || c0.b > 0.5)
|
||||
{
|
||||
blue = c0.r;
|
||||
red = c0.g;
|
||||
}
|
||||
else
|
||||
{
|
||||
blue = c0.r;
|
||||
green = c0.r;
|
||||
}
|
||||
ocol0 = vec4(red, green, blue, 1.0);
|
||||
}
|
||||
|
|
|
@ -1,12 +1,17 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float4 c1 = texRECT(samp0, uv0 - float2(1, 0)).rgba;
|
||||
float4 c2 = texRECT(samp0, uv0 - float2(0, 1)).rgba;
|
||||
float4 c3 = texRECT(samp0, uv0 + float2(1, 0)).rgba;
|
||||
float4 c4 = texRECT(samp0, uv0 + float2(0, 1)).rgba;
|
||||
float4 c0 = texture(samp9, uv0);
|
||||
float4 c1 = texture(samp9, uv0 - float2(1, 0)*resolution.zw);
|
||||
float4 c2 = texture(samp9, uv0 - float2(0, 1)*resolution.zw);
|
||||
float4 c3 = texture(samp9, uv0 + float2(1, 0)*resolution.zw);
|
||||
float4 c4 = texture(samp9, uv0 + float2(0, 1)*resolution.zw);
|
||||
|
||||
float red = c0.r;
|
||||
float blue = c0.b;
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float4 c1 = texRECT(samp0, uv0 + float2(5,5)).rgba;
|
||||
float4 c0 = texture(samp9, uv0).rgba;
|
||||
float4 c1 = texture(samp9, uv0 + float2(5,5)*resolution.zw).rgba;
|
||||
float y = (0.222 * c1.r) + (0.707 * c1.g) + (0.071 * c1.b);
|
||||
float y2 = ((0.222 * c0.r) + (0.707 * c0.g) + (0.071 * c0.b)) / 3;
|
||||
float red = c0.r;
|
||||
|
|
|
@ -1,39 +1,36 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
|
||||
red = c0.r;
|
||||
|
||||
red = c0.r;
|
||||
|
||||
if (c0.r > 0.0)
|
||||
{
|
||||
if (c0.g > c0.r)
|
||||
{
|
||||
green = (c0.g - (c0.g - c0.r)) / 3;
|
||||
}
|
||||
}
|
||||
|
||||
if (c0.b > 0.0 && c0.r < 0.25)
|
||||
{
|
||||
red = c0.b;
|
||||
green = c0.b / 3;
|
||||
}
|
||||
if (c0.r > 0.0)
|
||||
if (c0.g > c0.r)
|
||||
green = (c0.g - (c0.g - c0.r)) / 3;
|
||||
|
||||
if (c0.g > 0.0 && c0.r < 0.25)
|
||||
{
|
||||
red = c0.g;
|
||||
green = c0.g / 3;
|
||||
}
|
||||
if (c0.b > 0.0 && c0.r < 0.25)
|
||||
{
|
||||
red = c0.b;
|
||||
green = c0.b / 3;
|
||||
}
|
||||
|
||||
if (((c0.r + c0.g + c0.b) / 3) > 0.9)
|
||||
{
|
||||
green = c0.r / 3;
|
||||
}
|
||||
|
||||
ocol0 = float4(red, green, blue, 1.0);
|
||||
}
|
||||
if (c0.g > 0.0 && c0.r < 0.25)
|
||||
{
|
||||
red = c0.g;
|
||||
green = c0.g / 3;
|
||||
}
|
||||
|
||||
if (((c0.r + c0.g + c0.b) / 3) > 0.9)
|
||||
green = c0.r / 3;
|
||||
|
||||
ocol0 = vec4(red, green, blue, 1.0);
|
||||
}
|
||||
|
|
|
@ -1,15 +1,18 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
float avg = (c0.r + c0.g + c0.b) / 3;
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
float avg = (c0.r + c0.g + c0.b) / 3;
|
||||
|
||||
red = c0.r + (c0.g / 2) + (c0.b / 3);
|
||||
green = c0.r / 3;
|
||||
|
||||
ocol0 = float4(red, green, blue, 1.0);
|
||||
}
|
||||
red = c0.r + (c0.g / 2) + (c0.b / 3);
|
||||
green = c0.r / 3;
|
||||
|
||||
ocol0 = vec4(red, green, blue, 1.0);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,15 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float4 c1 = texRECT(samp0, uv0 + float2(1,1)).rgba;
|
||||
float4 c2 = texRECT(samp0, uv0 + float2(-1,-1)).rgba;
|
||||
float4 c0 = texture(samp9, uv0);
|
||||
float4 c1 = texture(samp9, uv0 + float2(1,1)*resolution.zw);
|
||||
float4 c2 = texture(samp9, uv0 + float2(-1,-1)*resolution.zw);
|
||||
float red = c0.r;
|
||||
float green = c0.g;
|
||||
float blue = c0.b;
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float avg = (c0.r + c0.g + c0.b) / 3.0;
|
||||
ocol0 = float4(avg, avg, avg, c0.a);
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
float avg = (c0.r + c0.g + c0.b) / 3.0;
|
||||
ocol0 = vec4(avg, avg, avg, c0.a);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,12 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
// Info: http://www.oreillynet.com/cs/user/view/cs_msg/8691
|
||||
float avg = (0.222 * c0.r) + (0.707 * c0.g) + (0.071 * c0.b);
|
||||
ocol0 = float4(avg, avg, avg, c0.a);
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
// Info: http://www.oreillynet.com/cs/user/view/cs_msg/8691
|
||||
float avg = (0.222 * c0.r) + (0.707 * c0.g) + (0.071 * c0.b);
|
||||
ocol0 = vec4(avg, avg, avg, c0.a);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(1.0, 1.0, 1.0, 1.0) - c0;
|
||||
ocol0 = vec4(1.0, 1.0, 1.0, 1.0) - texture(samp9, uv0);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(0.0, 0.0, 0.7, 1.0) - c0;
|
||||
}
|
||||
ocol0 = vec4(0.0, 0.0, 0.7, 1.0) - texture(samp9, uv0);
|
||||
}
|
||||
|
|
|
@ -1,9 +1,14 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float4 c1 = texRECT(samp0, uv0 + float2(5,5)).rgba;
|
||||
float4 c0 = texture(samp9, uv0);
|
||||
float4 c1 = texture(samp9, uv0 + float2(5,5)*resolution.zw);
|
||||
|
||||
ocol0 = c0 - c1;
|
||||
}
|
|
@ -1,10 +1,15 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 emboss = (texRECT(samp0, uv0+1).rgba - texRECT(samp0, uv0-1).rgba)*2.0f;
|
||||
emboss -= (texRECT(samp0, uv0+float2(1,-1)).rgba - texRECT(samp0, uv0+float2(-1,1)).rgba);
|
||||
float4 color = texRECT(samp0, uv0).rgba;
|
||||
float4 emboss = (texture(samp9, uv0+resolution.zw) - texture(samp9, uv0-resolution.zw))*2.0;
|
||||
emboss -= (texture(samp9, uv0+float2(1,-1)*resolution.zw).rgba - texture(samp9, uv0+float2(-1,1)*resolution.zw).rgba);
|
||||
float4 color = texture(samp9, uv0).rgba;
|
||||
if (color.r > 0.8 && color.b + color.b < 0.2)
|
||||
ocol0 = float4(1,0,0,0);
|
||||
else {
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float4 c0 = texture(samp9, uv0).rgba;
|
||||
float green = c0.g;
|
||||
|
||||
if (c0.g < 0.50)
|
||||
|
|
|
@ -1,21 +1,26 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
//variables
|
||||
int internalresolution = 1278;
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float4 c0 = texture(samp9, uv0).rgba;
|
||||
//blur
|
||||
float4 blurtotal = float4(0, 0, 0, 0);
|
||||
float blursize = 1.5;
|
||||
blurtotal += texRECT(samp0, uv0 + float2(-blursize, -blursize));
|
||||
blurtotal += texRECT(samp0, uv0 + float2(-blursize, blursize));
|
||||
blurtotal += texRECT(samp0, uv0 + float2( blursize, -blursize));
|
||||
blurtotal += texRECT(samp0, uv0 + float2( blursize, blursize));
|
||||
blurtotal += texRECT(samp0, uv0 + float2(-blursize, 0));
|
||||
blurtotal += texRECT(samp0, uv0 + float2( blursize, 0));
|
||||
blurtotal += texRECT(samp0, uv0 + float2( 0, -blursize));
|
||||
blurtotal += texRECT(samp0, uv0 + float2( 0, blursize));
|
||||
blurtotal += texture(samp9, uv0 + float2(-blursize, -blursize)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2(-blursize, blursize)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2( blursize, -blursize)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2( blursize, blursize)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2(-blursize, 0)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2( blursize, 0)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2( 0, -blursize)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2( 0, blursize)*resolution.zw);
|
||||
blurtotal *= 0.125;
|
||||
c0 = blurtotal;
|
||||
//greyscale
|
||||
|
@ -23,8 +28,8 @@ void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
|||
// brighten
|
||||
grey = grey * 0.5 + 0.7;
|
||||
// darken edges
|
||||
float x = uv0[0];
|
||||
float y = uv0[1];
|
||||
float x = uv0.x * resolution.x;
|
||||
float y = uv0.y * resolution.y;
|
||||
if (x > internalresolution/2) x = internalresolution-x;
|
||||
if (y > internalresolution/2) y = internalresolution-y;
|
||||
if (x > internalresolution/2*0.95) x = internalresolution/2*0.95;
|
||||
|
|
|
@ -1,21 +1,26 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
//variables
|
||||
int internalresolution = 1278;
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float4 c0 = texture(samp9, uv0).rgba;
|
||||
//blur
|
||||
float4 blurtotal = float4(0, 0, 0, 0);
|
||||
float blursize = 1.5;
|
||||
blurtotal += texRECT(samp0, uv0 + float2(-blursize, -blursize));
|
||||
blurtotal += texRECT(samp0, uv0 + float2(-blursize, blursize));
|
||||
blurtotal += texRECT(samp0, uv0 + float2( blursize, -blursize));
|
||||
blurtotal += texRECT(samp0, uv0 + float2( blursize, blursize));
|
||||
blurtotal += texRECT(samp0, uv0 + float2(-blursize, 0));
|
||||
blurtotal += texRECT(samp0, uv0 + float2( blursize, 0));
|
||||
blurtotal += texRECT(samp0, uv0 + float2( 0, -blursize));
|
||||
blurtotal += texRECT(samp0, uv0 + float2( 0, blursize));
|
||||
blurtotal += texture(samp9, uv0 + float2(-blursize, -blursize)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2(-blursize, blursize)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2( blursize, -blursize)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2( blursize, blursize)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2(-blursize, 0)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2( blursize, 0)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2( 0, -blursize)*resolution.zw);
|
||||
blurtotal += texture(samp9, uv0 + float2( 0, blursize)*resolution.zw);
|
||||
blurtotal *= 0.125;
|
||||
c0 = blurtotal;
|
||||
//greyscale
|
||||
|
@ -24,12 +29,12 @@ void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
|||
// This would have been much simpler if I could get the stupid modulo (%) to work
|
||||
// If anyone who is more well versed in Cg knows how to do this it'd be slightly more efficient
|
||||
// float lineIntensity = ((uv0[1] % 9) - 4) / 40;
|
||||
float vPos = uv0[1] / 9;
|
||||
float lineIntensity = (((vPos - (int)vPos) * 9) - 4) / 40;
|
||||
float vPos = uv0.y*resolution.y / 9;
|
||||
float lineIntensity = (((vPos - floor(vPos)) * 9) - 4) / 40;
|
||||
grey = grey * 0.5 + 0.7 + lineIntensity;
|
||||
// darken edges
|
||||
float x = uv0[0];
|
||||
float y = uv0[1];
|
||||
float x = uv0.x * resolution.x;
|
||||
float y = uv0.y * resolution.y;
|
||||
if (x > internalresolution/2) x = internalresolution-x;
|
||||
if (y > internalresolution/2) y = internalresolution-y;
|
||||
if (x > internalresolution/2*0.95) x = internalresolution/2*0.95;
|
||||
|
|
|
@ -1,8 +1,11 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float4 c0 = texture(samp9, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
|
|
|
@ -1,6 +1,9 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
inline float bound(float color)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
float bound(float color)
|
||||
{
|
||||
if (color < 0.35)
|
||||
{
|
||||
|
@ -13,9 +16,9 @@ inline float bound(float color)
|
|||
return 1.0;
|
||||
}
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0 + float2(0,0)).rgba;
|
||||
float4 c0 = texture(samp9, uv0);
|
||||
ocol0 = float4(bound(c0.r), bound(c0.g), bound(c0.b), c0.a);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,69 +1,70 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = c0.r;
|
||||
float blue = c0.b;
|
||||
float green = c0.g;
|
||||
float factor = 2;
|
||||
float max = 0.8;
|
||||
float min = 0.3;
|
||||
|
||||
if(c0.r > c0.g && c0.b > c0.g){
|
||||
if(c0.r < c0.b + 0.05 && c0.b < c0.r + 0.05){
|
||||
red = 0.7;
|
||||
blue = 0.7;
|
||||
green = 0.05;
|
||||
}
|
||||
else if(c0.r > c0.b + 0.05){
|
||||
red = 0.7;
|
||||
blue = 0.05;
|
||||
green = 0.05;
|
||||
}
|
||||
else if (c0.b > c0.r + 0.05){
|
||||
red = 0.05;
|
||||
blue = 0.7;
|
||||
green = 0.05;
|
||||
}
|
||||
}
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
float red = c0.r;
|
||||
float blue = c0.b;
|
||||
float green = c0.g;
|
||||
float factor = 2;
|
||||
float max = 0.8;
|
||||
float min = 0.3;
|
||||
|
||||
if(c0.r > c0.b && c0.g > c0.b){
|
||||
if(c0.r < c0.g + 0.05 && c0.g < c0.r + 0.05){
|
||||
red = 0.7;
|
||||
blue = 0.05;
|
||||
green = 0.7;
|
||||
if(c0.r > c0.g && c0.b > c0.g){
|
||||
if(c0.r < c0.b + 0.05 && c0.b < c0.r + 0.05){
|
||||
red = 0.7;
|
||||
blue = 0.7;
|
||||
green = 0.05;
|
||||
}
|
||||
else if(c0.r > c0.b + 0.05){
|
||||
red = 0.7;
|
||||
blue = 0.05;
|
||||
green = 0.05;
|
||||
}
|
||||
else if (c0.b > c0.r + 0.05){
|
||||
red = 0.05;
|
||||
blue = 0.7;
|
||||
green = 0.05;
|
||||
}
|
||||
}
|
||||
else if(c0.r > c0.g + 0.05){
|
||||
red = 0.7;
|
||||
blue = 0.05;
|
||||
green = 0.05;
|
||||
}
|
||||
else if (c0.g > c0.r + 0.05){
|
||||
red = 0.05;
|
||||
blue = 0.05;
|
||||
green = 0.7;
|
||||
}
|
||||
}
|
||||
|
||||
if(c0.g > c0.r && c0.b > c0.r){
|
||||
if(c0.g < c0.b + 0.05 && c0.b < c0.g + 0.05){
|
||||
red = 0.05;
|
||||
blue = 0.7;
|
||||
green = 0.7;
|
||||
if(c0.r > c0.b && c0.g > c0.b){
|
||||
if(c0.r < c0.g + 0.05 && c0.g < c0.r + 0.05){
|
||||
red = 0.7;
|
||||
blue = 0.05;
|
||||
green = 0.7;
|
||||
}
|
||||
else if(c0.r > c0.g + 0.05){
|
||||
red = 0.7;
|
||||
blue = 0.05;
|
||||
green = 0.05;
|
||||
}
|
||||
else if (c0.g > c0.r + 0.05){
|
||||
red = 0.05;
|
||||
blue = 0.05;
|
||||
green = 0.7;
|
||||
}
|
||||
}
|
||||
else if(c0.g > c0.b + 0.05){
|
||||
red = 0.05;
|
||||
blue = 0.05;
|
||||
green = 0.7;
|
||||
}
|
||||
else if (c0.b > c0.g + 0.05){
|
||||
red = 0.05;
|
||||
blue = 0.7;
|
||||
green = 0.05;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
ocol0 = float4(red, green, blue, c0.a);
|
||||
}
|
||||
if(c0.g > c0.r && c0.b > c0.r){
|
||||
if(c0.g < c0.b + 0.05 && c0.b < c0.g + 0.05){
|
||||
red = 0.05;
|
||||
blue = 0.7;
|
||||
green = 0.7;
|
||||
}
|
||||
else if(c0.g > c0.b + 0.05){
|
||||
red = 0.05;
|
||||
blue = 0.05;
|
||||
green = 0.7;
|
||||
}
|
||||
else if (c0.b > c0.g + 0.05){
|
||||
red = 0.05;
|
||||
blue = 0.7;
|
||||
green = 0.05;
|
||||
}
|
||||
}
|
||||
ocol0 = vec4(red, green, blue, c0.a);
|
||||
}
|
||||
|
|
|
@ -1,13 +1,16 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
// Same coefficients as grayscale2 at this point
|
||||
float avg = (0.222 * c0.r) + (0.707 * c0.g) + (0.071 * c0.b);
|
||||
float red=avg;
|
||||
// Not sure about these coefficients, they just seem to produce the proper yellow
|
||||
float green=avg*.75;
|
||||
float blue=avg*.5;
|
||||
ocol0 = float4(red, green, blue, c0.a);
|
||||
}
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
// Same coefficients as grayscale2 at this point
|
||||
float avg = (0.222 * c0.r) + (0.707 * c0.g) + (0.071 * c0.b);
|
||||
float red=avg;
|
||||
// Not sure about these coefficients, they just seem to produce the proper yellow
|
||||
float green=avg*.75;
|
||||
float blue=avg*.5;
|
||||
ocol0 = vec4(red, green, blue, c0.a);
|
||||
}
|
||||
|
|
|
@ -1,17 +1,22 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float4 c0 = texture(samp9, uv0).rgba;
|
||||
float4 tmp = float4(0, 0, 0, 0);
|
||||
tmp += c0 - texRECT(samp0, uv0 + float2(2, 2)).rgba;
|
||||
tmp += c0 - texRECT(samp0, uv0 - float2(2, 2)).rgba;
|
||||
tmp += c0 - texRECT(samp0, uv0 + float2(2, -2)).rgba;
|
||||
tmp += c0 - texRECT(samp0, uv0 - float2(2, -2)).rgba;
|
||||
tmp += c0 - texture(samp9, uv0 + float2(2, 2)*resolution.zw).rgba;
|
||||
tmp += c0 - texture(samp9, uv0 - float2(2, 2)*resolution.zw).rgba;
|
||||
tmp += c0 - texture(samp9, uv0 + float2(2, -2)*resolution.zw).rgba;
|
||||
tmp += c0 - texture(samp9, uv0 - float2(2, -2)*resolution.zw).rgba;
|
||||
float grey = ((0.222 * tmp.r) + (0.707 * tmp.g) + (0.071 * tmp.b));
|
||||
// get rid of the bottom line, as it is incorrect.
|
||||
if (uv0[1] < 163)
|
||||
tmp = 1;
|
||||
c0 = c0+1-grey*7;
|
||||
if (uv0.y*resolution.y < 163)
|
||||
tmp = float4(1.0, 1.0, 1.0, 1.0);
|
||||
c0 = c0+1-grey*7.0;
|
||||
ocol0 = float4(c0.r, c0.g, c0.b, 1);
|
||||
}
|
|
@ -1,20 +1,23 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float blue = 0.0;
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
float red = 0.0;
|
||||
float blue = 0.0;
|
||||
|
||||
if (c0.r < 0.35 || c0.b > 0.5)
|
||||
{
|
||||
red = c0.g + c0.b;
|
||||
}
|
||||
else
|
||||
{
|
||||
red = c0.g + c0.b;
|
||||
blue = c0.r + c0.b;
|
||||
}
|
||||
|
||||
ocol0 = float4(red, 0.0, blue, 1.0);
|
||||
}
|
||||
if (c0.r < 0.35 || c0.b > 0.5)
|
||||
{
|
||||
red = c0.g + c0.b;
|
||||
}
|
||||
else
|
||||
{
|
||||
red = c0.g + c0.b;
|
||||
blue = c0.r + c0.b;
|
||||
}
|
||||
|
||||
ocol0 = vec4(red, 0.0, blue, 1.0);
|
||||
}
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
|
||||
if (c0.r < 0.35 || c0.b > 0.5)
|
||||
{
|
||||
red = c0.g + c0.b;
|
||||
}
|
||||
else
|
||||
{
|
||||
red = c0.g + c0.b;
|
||||
blue = c0.r + c0.b;
|
||||
green = c0.r + c0.b;
|
||||
}
|
||||
|
||||
ocol0 = float4(red, green, blue, 1.0);
|
||||
}
|
||||
if (c0.r < 0.35 || c0.b > 0.5)
|
||||
{
|
||||
red = c0.g + c0.b;
|
||||
}
|
||||
else
|
||||
{
|
||||
red = c0.g + c0.b;
|
||||
blue = c0.r + c0.b;
|
||||
green = c0.r + c0.b;
|
||||
}
|
||||
|
||||
ocol0 = vec4(red, green, blue, 1.0);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,16 @@
|
|||
// Omega's 3D Stereoscopic filtering
|
||||
// TODO: Need depth info!
|
||||
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba; // Source Color
|
||||
float4 c0 = texture(samp9, uv0).rgba; // Source Color
|
||||
float sep = 5;
|
||||
float red = c0.r;
|
||||
float green = c0.g;
|
||||
|
@ -13,11 +18,11 @@ void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
|||
|
||||
|
||||
// Left Eye (Red)
|
||||
float4 c1 = texRECT(samp0, uv0 + float2(sep,0)).rgba;
|
||||
float4 c1 = texture(samp9, uv0 + float2(sep,0)*resolution.zw).rgba;
|
||||
red = max(c0.r, c1.r);
|
||||
|
||||
// Right Eye (Cyan)
|
||||
float4 c2 = texRECT(samp0, uv0 + float2(-sep,0)).rgba;
|
||||
float4 c2 = texture(samp9, uv0 + float2(-sep,0)*resolution.zw).rgba;
|
||||
float cyan = (c2.g + c2.b) / 2;
|
||||
green = max(c0.g, cyan);
|
||||
blue = max(c0.b, cyan);
|
||||
|
|
|
@ -1,24 +1,30 @@
|
|||
// Omega's 3D Stereoscopic filtering (Amber/Blue)
|
||||
// TODO: Need depth info!
|
||||
|
||||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
uniform vec4 resolution;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba; // Source Color
|
||||
float4 c0 = texture(samp9, uv0).rgba; // Source Color
|
||||
float sep = 5;
|
||||
float red = c0.r;
|
||||
float green = c0.g;
|
||||
float blue = c0.b;
|
||||
|
||||
|
||||
// Left Eye (Amber)
|
||||
float4 c2 = texRECT(samp0, uv0 + float2(sep,0)).rgba;
|
||||
float4 c2 = texture(samp9, uv0 + float2(sep,0)*resolution.zw).rgba;
|
||||
float amber = (c2.r + c2.g) / 2;
|
||||
red = max(c0.r, amber);
|
||||
green = max(c0.g, amber);
|
||||
|
||||
// Right Eye (Blue)
|
||||
float4 c1 = texRECT(samp0, uv0 + float2(-sep,0)).rgba;
|
||||
float4 c1 = texture(samp9, uv0 + float2(-sep,0)*resolution.zw).rgba;
|
||||
blue = max(c0.b, c1.b);
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(c0.r*1.5, c0.g*1, c0.b*0.5, c0.a);
|
||||
}
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
ocol0 = vec4(c0.r * 1.5, c0.g * 1, c0.b * 0.5, c0.a);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(c0.b, c0.g, c0.r, c0.a);
|
||||
ocol0 = texture(samp9, uv0).bgra;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(c0.b, c0.r, c0.g, c0.a);
|
||||
}
|
||||
ocol0 = texture(samp9, uv0).brga;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(c0.g, c0.b, c0.r, c0.a);
|
||||
}
|
||||
ocol0 = texture(samp9, uv0).gbra;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(c0.g, c0.r, c0.b, c0.a);
|
||||
}
|
||||
ocol0 = texture(samp9, uv0).grba;
|
||||
}
|
||||
|
|
|
@ -1,7 +1,9 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
ocol0 = float4(c0.r, c0.b, c0.g, c0.a);
|
||||
}
|
||||
ocol0 = texture(samp9, uv0).rbga;
|
||||
}
|
||||
|
|
|
@ -1,22 +1,25 @@
|
|||
uniform samplerRECT samp0 : register(s0);
|
||||
uniform sampler2D samp9;
|
||||
|
||||
void main(out float4 ocol0 : COLOR0, in float2 uv0 : TEXCOORD0)
|
||||
out vec4 ocol0;
|
||||
in vec2 uv0;
|
||||
|
||||
void main()
|
||||
{
|
||||
float4 c0 = texRECT(samp0, uv0).rgba;
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
vec4 c0 = texture(samp9, uv0);
|
||||
float red = 0.0;
|
||||
float green = 0.0;
|
||||
float blue = 0.0;
|
||||
|
||||
if (c0.r < 0.3 || c0.b > 0.5)
|
||||
{
|
||||
blue = c0.r + c0.b;
|
||||
red = c0.g + c0.b / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
red = c0.g + c0.b;
|
||||
green = c0.r + c0.b;
|
||||
}
|
||||
|
||||
ocol0 = float4(red, green, blue, 1.0);
|
||||
}
|
||||
if (c0.r < 0.3 || c0.b > 0.5)
|
||||
{
|
||||
blue = c0.r + c0.b;
|
||||
red = c0.g + c0.b / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
red = c0.g + c0.b;
|
||||
green = c0.r + c0.b;
|
||||
}
|
||||
|
||||
ocol0 = vec4(red, green, blue, 1.0);
|
||||
}
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
set(SRCS clrun/clrun.c
|
||||
clrun/dynamiclib.c
|
||||
clrun/gencl.c
|
||||
clrun/genclgl.c)
|
||||
clrun/genclgl.c
|
||||
clrun/genclext.c
|
||||
clrun/genclglext.c
|
||||
)
|
||||
|
||||
add_library(clrun STATIC ${SRCS})
|
||||
target_link_libraries(clrun ${CMAKE_DL_LIBS})
|
||||
|
|
|
@ -10,6 +10,11 @@ compile: genclrun gencl.c genclgl.c
|
|||
genclrun: ../include/CL/cl.h ../include/CL/cl_gl.h
|
||||
./generateClRun.pl ../include/CL/cl.h > gencl.c
|
||||
./generateClRun.pl ../include/CL/cl_gl.h > genclgl.c
|
||||
./generateClRun.pl ../include/CL/cl_ext.h > genclext.c
|
||||
./generateClRun.pl ../include/CL/cl_gl_ext.h > genclglext.c
|
||||
./generateClRun.pl ../include/CL/cl_d3d10.h > gencld3d10.c
|
||||
./generateClRun.pl ../include/CL/cl_d3d11.h > gencld3d11.c
|
||||
./generateClRun.pl ../include/CL/cl_dx9_media_sharing.h > gencldx9.c
|
||||
|
||||
|
||||
clean:
|
||||
|
|
|
@ -3,398 +3,543 @@
|
|||
#include "../include/CL/cl.h"
|
||||
|
||||
|
||||
static cl_int (CL_API_CALL *clGetPlatformIDs_ptr)(cl_uint, cl_platform_id *, cl_uint *) = NULL;
|
||||
static cl_int (*clGetPlatformIDs_ptr)(cl_uint, cl_platform_id *, cl_uint *) = NULL;
|
||||
cl_int CL_API_CALL clGetPlatformIDs (cl_uint num_entries,cl_platform_id * platforms,cl_uint * num_platforms) {
|
||||
if(!clGetPlatformIDs_ptr) clGetPlatformIDs_ptr = getFunction("clGetPlatformIDs");
|
||||
return (*clGetPlatformIDs_ptr)(num_entries, platforms, num_platforms);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetPlatformInfo_ptr)(cl_platform_id, cl_platform_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetPlatformInfo_ptr)(cl_platform_id, cl_platform_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetPlatformInfo_ptr) clGetPlatformInfo_ptr = getFunction("clGetPlatformInfo");
|
||||
return (*clGetPlatformInfo_ptr)(platform, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetDeviceIDs_ptr)(cl_platform_id, cl_device_type, cl_uint, cl_device_id *, cl_uint *) = NULL;
|
||||
static cl_int (*clGetDeviceIDs_ptr)(cl_platform_id, cl_device_type, cl_uint, cl_device_id *, cl_uint *) = NULL;
|
||||
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) {
|
||||
if(!clGetDeviceIDs_ptr) clGetDeviceIDs_ptr = getFunction("clGetDeviceIDs");
|
||||
return (*clGetDeviceIDs_ptr)(platform, device_type, num_entries, devices, num_devices);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetDeviceInfo_ptr)(cl_device_id, cl_device_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetDeviceInfo_ptr)(cl_device_id, cl_device_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetDeviceInfo_ptr) clGetDeviceInfo_ptr = getFunction("clGetDeviceInfo");
|
||||
return (*clGetDeviceInfo_ptr)(device, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_context (CL_API_CALL *clCreateContext_ptr)(const cl_context_properties *, cl_uint, const cl_device_id *, void (CL_CALLBACK *)(const char *, const void *, size_t, void *), void *, cl_int *) = NULL;
|
||||
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) {
|
||||
static cl_int (*clCreateSubDevices_ptr)(cl_device_id, const cl_device_partition_property *, cl_uint, cl_device_id *, cl_uint *) = NULL;
|
||||
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) {
|
||||
if(!clCreateSubDevices_ptr) clCreateSubDevices_ptr = getFunction("clCreateSubDevices");
|
||||
return (*clCreateSubDevices_ptr)(in_device, properties, num_devices, out_devices, num_devices_ret);
|
||||
}
|
||||
|
||||
static cl_int (*clRetainDevice_ptr)(cl_device_id) = NULL;
|
||||
cl_int CL_API_CALL clRetainDevice (cl_device_id device) {
|
||||
if(!clRetainDevice_ptr) clRetainDevice_ptr = getFunction("clRetainDevice");
|
||||
return (*clRetainDevice_ptr)(device);
|
||||
}
|
||||
|
||||
static cl_int (*clReleaseDevice_ptr)(cl_device_id) = NULL;
|
||||
cl_int CL_API_CALL clReleaseDevice (cl_device_id device) {
|
||||
if(!clReleaseDevice_ptr) clReleaseDevice_ptr = getFunction("clReleaseDevice");
|
||||
return (*clReleaseDevice_ptr)(device);
|
||||
}
|
||||
|
||||
static cl_context (*clCreateContext_ptr)(const cl_context_properties *, cl_uint, const cl_device_id *, void (CL_CALLBACK *pfn_notify)(const char *, const void *, size_t, void *), void*, cl_int*) = NULL;
|
||||
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) {
|
||||
if(!clCreateContext_ptr) clCreateContext_ptr = getFunction("clCreateContext");
|
||||
return (*clCreateContext_ptr)(properties, num_devices, devices, pfn_notify, user_data, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_context (CL_API_CALL *clCreateContextFromType_ptr)(const cl_context_properties *, cl_device_type, void (CL_CALLBACK *)(const char *, const void *, size_t, void *), void *, cl_int *) = NULL;
|
||||
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) {
|
||||
static cl_context (*clCreateContextFromType_ptr)(const cl_context_properties *, cl_device_type, void (CL_CALLBACK * /* pfn_notify */)(const char *, const void *, size_t, void *), void*, cl_int*) = NULL;
|
||||
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) {
|
||||
if(!clCreateContextFromType_ptr) clCreateContextFromType_ptr = getFunction("clCreateContextFromType");
|
||||
return (*clCreateContextFromType_ptr)(properties, device_type, pfn_notify, user_data, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clRetainContext_ptr)(cl_context) = NULL;
|
||||
static cl_int (*clRetainContext_ptr)(cl_context) = NULL;
|
||||
cl_int CL_API_CALL clRetainContext (cl_context context) {
|
||||
if(!clRetainContext_ptr) clRetainContext_ptr = getFunction("clRetainContext");
|
||||
return (*clRetainContext_ptr)(context);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clReleaseContext_ptr)(cl_context) = NULL;
|
||||
static cl_int (*clReleaseContext_ptr)(cl_context) = NULL;
|
||||
cl_int CL_API_CALL clReleaseContext (cl_context context) {
|
||||
if(!clReleaseContext_ptr) clReleaseContext_ptr = getFunction("clReleaseContext");
|
||||
return (*clReleaseContext_ptr)(context);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetContextInfo_ptr)(cl_context, cl_context_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetContextInfo_ptr)(cl_context, cl_context_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetContextInfo_ptr) clGetContextInfo_ptr = getFunction("clGetContextInfo");
|
||||
return (*clGetContextInfo_ptr)(context, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_command_queue (CL_API_CALL *clCreateCommandQueue_ptr)(cl_context, cl_device_id, cl_command_queue_properties, cl_int *) = NULL;
|
||||
static cl_command_queue (*clCreateCommandQueue_ptr)(cl_context, cl_device_id, cl_command_queue_properties, cl_int *) = NULL;
|
||||
cl_command_queue CL_API_CALL clCreateCommandQueue (cl_context context,cl_device_id device,cl_command_queue_properties properties,cl_int * errcode_ret) {
|
||||
if(!clCreateCommandQueue_ptr) clCreateCommandQueue_ptr = getFunction("clCreateCommandQueue");
|
||||
return (*clCreateCommandQueue_ptr)(context, device, properties, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clRetainCommandQueue_ptr)(cl_command_queue) = NULL;
|
||||
static cl_int (*clRetainCommandQueue_ptr)(cl_command_queue) = NULL;
|
||||
cl_int CL_API_CALL clRetainCommandQueue (cl_command_queue command_queue) {
|
||||
if(!clRetainCommandQueue_ptr) clRetainCommandQueue_ptr = getFunction("clRetainCommandQueue");
|
||||
return (*clRetainCommandQueue_ptr)(command_queue);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clReleaseCommandQueue_ptr)(cl_command_queue) = NULL;
|
||||
static cl_int (*clReleaseCommandQueue_ptr)(cl_command_queue) = NULL;
|
||||
cl_int CL_API_CALL clReleaseCommandQueue (cl_command_queue command_queue) {
|
||||
if(!clReleaseCommandQueue_ptr) clReleaseCommandQueue_ptr = getFunction("clReleaseCommandQueue");
|
||||
return (*clReleaseCommandQueue_ptr)(command_queue);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetCommandQueueInfo_ptr)(cl_command_queue, cl_command_queue_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetCommandQueueInfo_ptr)(cl_command_queue, cl_command_queue_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetCommandQueueInfo_ptr) clGetCommandQueueInfo_ptr = getFunction("clGetCommandQueueInfo");
|
||||
return (*clGetCommandQueueInfo_ptr)(command_queue, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clSetCommandQueueProperty_ptr)(cl_command_queue, cl_command_queue_properties, cl_bool, cl_command_queue_properties *) = NULL;
|
||||
cl_int CL_API_CALL clSetCommandQueueProperty (cl_command_queue command_queue,cl_command_queue_properties properties,cl_bool enable,cl_command_queue_properties * old_properties) {
|
||||
if(!clSetCommandQueueProperty_ptr) clSetCommandQueueProperty_ptr = getFunction("clSetCommandQueueProperty");
|
||||
return (*clSetCommandQueueProperty_ptr)(command_queue, properties, enable, old_properties);
|
||||
}
|
||||
|
||||
static cl_mem (CL_API_CALL *clCreateBuffer_ptr)(cl_context, cl_mem_flags, size_t, void *, cl_int *) = NULL;
|
||||
static cl_mem (*clCreateBuffer_ptr)(cl_context, cl_mem_flags, size_t, void *, cl_int *) = NULL;
|
||||
cl_mem CL_API_CALL clCreateBuffer (cl_context context,cl_mem_flags flags,size_t size,void * host_ptr,cl_int * errcode_ret) {
|
||||
if(!clCreateBuffer_ptr) clCreateBuffer_ptr = getFunction("clCreateBuffer");
|
||||
return (*clCreateBuffer_ptr)(context, flags, size, host_ptr, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_mem (CL_API_CALL *clCreateImage2D_ptr)(cl_context, cl_mem_flags, const cl_image_format *, size_t, size_t, size_t, void *, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateImage2D_ptr) clCreateImage2D_ptr = getFunction("clCreateImage2D");
|
||||
return (*clCreateImage2D_ptr)(context, flags, image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret);
|
||||
static cl_mem (*clCreateSubBuffer_ptr)(cl_mem, cl_mem_flags, cl_buffer_create_type, const void *, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateSubBuffer_ptr) clCreateSubBuffer_ptr = getFunction("clCreateSubBuffer");
|
||||
return (*clCreateSubBuffer_ptr)(buffer, flags, buffer_create_type, buffer_create_info, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_mem (CL_API_CALL *clCreateImage3D_ptr)(cl_context, cl_mem_flags, const cl_image_format *, size_t, size_t, size_t, size_t, size_t, void *, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateImage3D_ptr) clCreateImage3D_ptr = getFunction("clCreateImage3D");
|
||||
return (*clCreateImage3D_ptr)(context, flags, image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret);
|
||||
static cl_mem (*clCreateImage_ptr)(cl_context, cl_mem_flags, const cl_image_format *, const cl_image_desc *, void *, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateImage_ptr) clCreateImage_ptr = getFunction("clCreateImage");
|
||||
return (*clCreateImage_ptr)(context, flags, image_format, image_desc, host_ptr, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clRetainMemObject_ptr)(cl_mem) = NULL;
|
||||
static cl_int (*clRetainMemObject_ptr)(cl_mem) = NULL;
|
||||
cl_int CL_API_CALL clRetainMemObject (cl_mem memobj) {
|
||||
if(!clRetainMemObject_ptr) clRetainMemObject_ptr = getFunction("clRetainMemObject");
|
||||
return (*clRetainMemObject_ptr)(memobj);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clReleaseMemObject_ptr)(cl_mem) = NULL;
|
||||
static cl_int (*clReleaseMemObject_ptr)(cl_mem) = NULL;
|
||||
cl_int CL_API_CALL clReleaseMemObject (cl_mem memobj) {
|
||||
if(!clReleaseMemObject_ptr) clReleaseMemObject_ptr = getFunction("clReleaseMemObject");
|
||||
return (*clReleaseMemObject_ptr)(memobj);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetSupportedImageFormats_ptr)(cl_context, cl_mem_flags, cl_mem_object_type, cl_uint, cl_image_format *, cl_uint *) = NULL;
|
||||
static cl_int (*clGetSupportedImageFormats_ptr)(cl_context, cl_mem_flags, cl_mem_object_type, cl_uint, cl_image_format *, cl_uint *) = NULL;
|
||||
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) {
|
||||
if(!clGetSupportedImageFormats_ptr) clGetSupportedImageFormats_ptr = getFunction("clGetSupportedImageFormats");
|
||||
return (*clGetSupportedImageFormats_ptr)(context, flags, image_type, num_entries, image_formats, num_image_formats);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetMemObjectInfo_ptr)(cl_mem, cl_mem_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetMemObjectInfo_ptr)(cl_mem, cl_mem_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetMemObjectInfo_ptr) clGetMemObjectInfo_ptr = getFunction("clGetMemObjectInfo");
|
||||
return (*clGetMemObjectInfo_ptr)(memobj, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetImageInfo_ptr)(cl_mem, cl_image_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetImageInfo_ptr)(cl_mem, cl_image_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetImageInfo_ptr) clGetImageInfo_ptr = getFunction("clGetImageInfo");
|
||||
return (*clGetImageInfo_ptr)(image, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_sampler (CL_API_CALL *clCreateSampler_ptr)(cl_context, cl_bool, cl_addressing_mode, cl_filter_mode, cl_int *) = NULL;
|
||||
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) {
|
||||
/* Sampler APIs */
|
||||
static cl_int (*clSetMemObjectDestructorCallback_ptr)(cl_mem memobj,void (CL_CALLBACK *pfn_notify)( cl_mem memobj, void*) ,void *user_data ) = NULL;
|
||||
cl_int CL_API_CALL clSetMemObjectDestructorCallback (cl_mem memobj,void (CL_CALLBACK *pfn_notify)( cl_mem memobj, void*) ,void *user_data )
|
||||
{
|
||||
if(!clSetMemObjectDestructorCallback_ptr) clSetMemObjectDestructorCallback_ptr = getFunction("clSetMemObjectDestructorCallback");
|
||||
return (*clSetMemObjectDestructorCallback_ptr)(memobj, pfn_notify, user_data);
|
||||
}
|
||||
|
||||
/* Sampler APIs */
|
||||
static cl_sampler (*clCreateSampler_ptr)(cl_context, cl_bool, cl_addressing_mode, cl_filter_mode, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateSampler_ptr) clCreateSampler_ptr = getFunction("clCreateSampler");
|
||||
return (*clCreateSampler_ptr)(context, normalized_coords, addressing_mode, filter_mode, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clRetainSampler_ptr)(cl_sampler) = NULL;
|
||||
static cl_int (*clRetainSampler_ptr)(cl_sampler) = NULL;
|
||||
cl_int CL_API_CALL clRetainSampler (cl_sampler sampler) {
|
||||
if(!clRetainSampler_ptr) clRetainSampler_ptr = getFunction("clRetainSampler");
|
||||
return (*clRetainSampler_ptr)(sampler);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clReleaseSampler_ptr)(cl_sampler) = NULL;
|
||||
static cl_int (*clReleaseSampler_ptr)(cl_sampler) = NULL;
|
||||
cl_int CL_API_CALL clReleaseSampler (cl_sampler sampler) {
|
||||
if(!clReleaseSampler_ptr) clReleaseSampler_ptr = getFunction("clReleaseSampler");
|
||||
return (*clReleaseSampler_ptr)(sampler);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetSamplerInfo_ptr)(cl_sampler, cl_sampler_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetSamplerInfo_ptr)(cl_sampler, cl_sampler_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetSamplerInfo_ptr) clGetSamplerInfo_ptr = getFunction("clGetSamplerInfo");
|
||||
return (*clGetSamplerInfo_ptr)(sampler, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_program (CL_API_CALL *clCreateProgramWithSource_ptr)(cl_context, cl_uint, const char **, const size_t *, cl_int *) = NULL;
|
||||
static cl_program (*clCreateProgramWithSource_ptr)(cl_context, cl_uint, const char **, const size_t *, cl_int *) = NULL;
|
||||
cl_program CL_API_CALL clCreateProgramWithSource (cl_context context,cl_uint count,const char ** strings,const size_t * lengths,cl_int * errcode_ret) {
|
||||
if(!clCreateProgramWithSource_ptr) clCreateProgramWithSource_ptr = getFunction("clCreateProgramWithSource");
|
||||
return (*clCreateProgramWithSource_ptr)(context, count, strings, lengths, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_program (CL_API_CALL *clCreateProgramWithBinary_ptr)(cl_context, cl_uint, const cl_device_id *, const size_t *, const unsigned char **, cl_int *, cl_int *) = NULL;
|
||||
static cl_program (*clCreateProgramWithBinary_ptr)(cl_context, cl_uint, const cl_device_id *, const size_t *, const unsigned char **, cl_int *, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateProgramWithBinary_ptr) clCreateProgramWithBinary_ptr = getFunction("clCreateProgramWithBinary");
|
||||
return (*clCreateProgramWithBinary_ptr)(context, num_devices, device_list, lengths, binaries, binary_status, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clRetainProgram_ptr)(cl_program) = NULL;
|
||||
static cl_program (*clCreateProgramWithBuiltInKernels_ptr)(cl_context, cl_uint, const cl_device_id *, const char *, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateProgramWithBuiltInKernels_ptr) clCreateProgramWithBuiltInKernels_ptr = getFunction("clCreateProgramWithBuiltInKernels");
|
||||
return (*clCreateProgramWithBuiltInKernels_ptr)(context, num_devices, device_list, kernel_names, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (*clRetainProgram_ptr)(cl_program) = NULL;
|
||||
cl_int CL_API_CALL clRetainProgram (cl_program program) {
|
||||
if(!clRetainProgram_ptr) clRetainProgram_ptr = getFunction("clRetainProgram");
|
||||
return (*clRetainProgram_ptr)(program);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clReleaseProgram_ptr)(cl_program) = NULL;
|
||||
static cl_int (*clReleaseProgram_ptr)(cl_program) = NULL;
|
||||
cl_int CL_API_CALL clReleaseProgram (cl_program program) {
|
||||
if(!clReleaseProgram_ptr) clReleaseProgram_ptr = getFunction("clReleaseProgram");
|
||||
return (*clReleaseProgram_ptr)(program);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clBuildProgram_ptr)(cl_program, cl_uint, const cl_device_id *, const char *, void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void *), void *) = NULL;
|
||||
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 *),void * user_data) {
|
||||
static cl_int (*clBuildProgram_ptr)(cl_program, cl_uint, const cl_device_id *, const char *, void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), void *) = NULL;
|
||||
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) {
|
||||
if(!clBuildProgram_ptr) clBuildProgram_ptr = getFunction("clBuildProgram");
|
||||
return (*clBuildProgram_ptr)(program, num_devices, device_list, options, pfn_notify, user_data);
|
||||
return (*clBuildProgram_ptr)(program, num_devices, device_list, options, user_data, user_data);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clUnloadCompiler_ptr)(void) = NULL;
|
||||
cl_int CL_API_CALL clUnloadCompiler (void) {
|
||||
if(!clUnloadCompiler_ptr) clUnloadCompiler_ptr = getFunction("clUnloadCompiler");
|
||||
return (*clUnloadCompiler_ptr)();
|
||||
static cl_int (*clCompileProgram_ptr)(cl_program, cl_uint, const cl_device_id *, const char *, cl_uint, const cl_program *, const char **, void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), void *) = NULL;
|
||||
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) {
|
||||
if(!clCompileProgram_ptr) clCompileProgram_ptr = getFunction("clCompileProgram");
|
||||
return (*clCompileProgram_ptr)(program, num_devices, device_list, options, num_input_headers, input_headers, header_include_names, user_data, user_data);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetProgramInfo_ptr)(cl_program, cl_program_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_program (*clLinkProgram_ptr)(cl_context, cl_uint, const cl_device_id *, const char *, cl_uint, const cl_program *, void (CL_CALLBACK * /* pfn_notify */)(cl_program /* program */, void * /* user_data */), void *, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clLinkProgram_ptr) clLinkProgram_ptr = getFunction("clLinkProgram");
|
||||
return (*clLinkProgram_ptr)(context, num_devices, device_list, options, num_input_programs, input_programs, user_data, user_data, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (*clUnloadPlatformCompiler_ptr)(cl_platform_id) = NULL;
|
||||
cl_int CL_API_CALL clUnloadPlatformCompiler (cl_platform_id platform) {
|
||||
if(!clUnloadPlatformCompiler_ptr) clUnloadPlatformCompiler_ptr = getFunction("clUnloadPlatformCompiler");
|
||||
return (*clUnloadPlatformCompiler_ptr)(platform);
|
||||
}
|
||||
|
||||
static cl_int (*clGetProgramInfo_ptr)(cl_program, cl_program_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetProgramInfo_ptr) clGetProgramInfo_ptr = getFunction("clGetProgramInfo");
|
||||
return (*clGetProgramInfo_ptr)(program, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetProgramBuildInfo_ptr)(cl_program, cl_device_id, cl_program_build_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetProgramBuildInfo_ptr)(cl_program, cl_device_id, cl_program_build_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetProgramBuildInfo_ptr) clGetProgramBuildInfo_ptr = getFunction("clGetProgramBuildInfo");
|
||||
return (*clGetProgramBuildInfo_ptr)(program, device, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_kernel (CL_API_CALL *clCreateKernel_ptr)(cl_program, const char *, cl_int *) = NULL;
|
||||
static cl_kernel (*clCreateKernel_ptr)(cl_program, const char *, cl_int *) = NULL;
|
||||
cl_kernel CL_API_CALL clCreateKernel (cl_program program,const char * kernel_name,cl_int * errcode_ret) {
|
||||
if(!clCreateKernel_ptr) clCreateKernel_ptr = getFunction("clCreateKernel");
|
||||
return (*clCreateKernel_ptr)(program, kernel_name, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clCreateKernelsInProgram_ptr)(cl_program, cl_uint, cl_kernel *, cl_uint *) = NULL;
|
||||
static cl_int (*clCreateKernelsInProgram_ptr)(cl_program, cl_uint, cl_kernel *, cl_uint *) = NULL;
|
||||
cl_int CL_API_CALL clCreateKernelsInProgram (cl_program program,cl_uint num_kernels,cl_kernel * kernels,cl_uint * num_kernels_ret) {
|
||||
if(!clCreateKernelsInProgram_ptr) clCreateKernelsInProgram_ptr = getFunction("clCreateKernelsInProgram");
|
||||
return (*clCreateKernelsInProgram_ptr)(program, num_kernels, kernels, num_kernels_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clRetainKernel_ptr)(cl_kernel) = NULL;
|
||||
static cl_int (*clRetainKernel_ptr)(cl_kernel) = NULL;
|
||||
cl_int CL_API_CALL clRetainKernel (cl_kernel kernel) {
|
||||
if(!clRetainKernel_ptr) clRetainKernel_ptr = getFunction("clRetainKernel");
|
||||
return (*clRetainKernel_ptr)(kernel);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clReleaseKernel_ptr)(cl_kernel) = NULL;
|
||||
static cl_int (*clReleaseKernel_ptr)(cl_kernel) = NULL;
|
||||
cl_int CL_API_CALL clReleaseKernel (cl_kernel kernel) {
|
||||
if(!clReleaseKernel_ptr) clReleaseKernel_ptr = getFunction("clReleaseKernel");
|
||||
return (*clReleaseKernel_ptr)(kernel);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clSetKernelArg_ptr)(cl_kernel, cl_uint, size_t, const void *) = NULL;
|
||||
static cl_int (*clSetKernelArg_ptr)(cl_kernel, cl_uint, size_t, const void *) = NULL;
|
||||
cl_int CL_API_CALL clSetKernelArg (cl_kernel kernel,cl_uint arg_index,size_t arg_size,const void * arg_value) {
|
||||
if(!clSetKernelArg_ptr) clSetKernelArg_ptr = getFunction("clSetKernelArg");
|
||||
return (*clSetKernelArg_ptr)(kernel, arg_index, arg_size, arg_value);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetKernelInfo_ptr)(cl_kernel, cl_kernel_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetKernelInfo_ptr)(cl_kernel, cl_kernel_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetKernelInfo_ptr) clGetKernelInfo_ptr = getFunction("clGetKernelInfo");
|
||||
return (*clGetKernelInfo_ptr)(kernel, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetKernelWorkGroupInfo_ptr)(cl_kernel, cl_device_id, cl_kernel_work_group_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetKernelArgInfo_ptr)(cl_kernel, cl_uint, cl_kernel_arg_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetKernelArgInfo_ptr) clGetKernelArgInfo_ptr = getFunction("clGetKernelArgInfo");
|
||||
return (*clGetKernelArgInfo_ptr)(kernel, arg_indx, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int (*clGetKernelWorkGroupInfo_ptr)(cl_kernel, cl_device_id, cl_kernel_work_group_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetKernelWorkGroupInfo_ptr) clGetKernelWorkGroupInfo_ptr = getFunction("clGetKernelWorkGroupInfo");
|
||||
return (*clGetKernelWorkGroupInfo_ptr)(kernel, device, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clWaitForEvents_ptr)(cl_uint, const cl_event *) = NULL;
|
||||
static cl_int (*clWaitForEvents_ptr)(cl_uint, const cl_event *) = NULL;
|
||||
cl_int CL_API_CALL clWaitForEvents (cl_uint num_events,const cl_event * event_list) {
|
||||
if(!clWaitForEvents_ptr) clWaitForEvents_ptr = getFunction("clWaitForEvents");
|
||||
return (*clWaitForEvents_ptr)(num_events, event_list);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetEventInfo_ptr)(cl_event, cl_event_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetEventInfo_ptr)(cl_event, cl_event_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetEventInfo_ptr) clGetEventInfo_ptr = getFunction("clGetEventInfo");
|
||||
return (*clGetEventInfo_ptr)(event, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clRetainEvent_ptr)(cl_event) = NULL;
|
||||
cl_int CL_API_CALL clRetainEvent (cl_event event) {
|
||||
static cl_event (*clCreateUserEvent_ptr)(cl_context, cl_int * /* errcode_ret */) = NULL;
|
||||
cl_event CL_API_CALL clCreateUserEvent (cl_context context,cl_int * errcode_ret)
|
||||
{
|
||||
if(!clCreateUserEvent_ptr) clCreateUserEvent_ptr = getFunction("clCreateUserEvent");
|
||||
return (*clCreateUserEvent_ptr)(context,errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (*clRetainEvent_ptr)(cl_event) = NULL;
|
||||
cl_int CL_API_CALL clRetainEvent(cl_event event) {
|
||||
if(!clRetainEvent_ptr) clRetainEvent_ptr = getFunction("clRetainEvent");
|
||||
return (*clRetainEvent_ptr)(event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clReleaseEvent_ptr)(cl_event) = NULL;
|
||||
static cl_int (*clReleaseEvent_ptr)(cl_event) = NULL;
|
||||
cl_int CL_API_CALL clReleaseEvent (cl_event event) {
|
||||
if(!clReleaseEvent_ptr) clReleaseEvent_ptr = getFunction("clReleaseEvent");
|
||||
return (*clReleaseEvent_ptr)(event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetEventProfilingInfo_ptr)(cl_event, cl_profiling_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clSetUserEventStatus_ptr)(cl_event, cl_int) = NULL;
|
||||
cl_int CL_API_CALL clSetUserEventStatus (cl_event event,cl_int execution_status) {
|
||||
if(!clSetUserEventStatus_ptr) clSetUserEventStatus_ptr = getFunction("clSetUserEventStatus");
|
||||
return (*clSetUserEventStatus_ptr)(event, execution_status);
|
||||
}
|
||||
|
||||
static cl_int (*clSetEventCallback_ptr)(cl_event, cl_int, void (CL_CALLBACK * /* pfn_notify */)(cl_event, cl_int, void *), void*) = NULL;
|
||||
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) {
|
||||
if(!clSetEventCallback_ptr) clSetEventCallback_ptr = getFunction("clSetEventCallback");
|
||||
return (*clSetEventCallback_ptr)(event, command_exec_callback_type, pfn_notify, user_data);
|
||||
}
|
||||
|
||||
static cl_int (*clGetEventProfilingInfo_ptr)(cl_event, cl_profiling_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetEventProfilingInfo_ptr) clGetEventProfilingInfo_ptr = getFunction("clGetEventProfilingInfo");
|
||||
return (*clGetEventProfilingInfo_ptr)(event, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clFlush_ptr)(cl_command_queue) = NULL;
|
||||
static cl_int (*clFlush_ptr)(cl_command_queue) = NULL;
|
||||
cl_int CL_API_CALL clFlush (cl_command_queue command_queue) {
|
||||
if(!clFlush_ptr) clFlush_ptr = getFunction("clFlush");
|
||||
return (*clFlush_ptr)(command_queue);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clFinish_ptr)(cl_command_queue) = NULL;
|
||||
static cl_int (*clFinish_ptr)(cl_command_queue) = NULL;
|
||||
cl_int CL_API_CALL clFinish (cl_command_queue command_queue) {
|
||||
if(!clFinish_ptr) clFinish_ptr = getFunction("clFinish");
|
||||
return (*clFinish_ptr)(command_queue);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueReadBuffer_ptr)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
cl_int CL_API_CALL clEnqueueReadBuffer (cl_command_queue command_queue,cl_mem buffer,cl_bool blocking_read,size_t offset,size_t cb,void * ptr,cl_uint num_events_in_wait_list,const cl_event * event_wait_list,cl_event * event) {
|
||||
static cl_int (*clEnqueueReadBuffer_ptr)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueReadBuffer_ptr) clEnqueueReadBuffer_ptr = getFunction("clEnqueueReadBuffer");
|
||||
return (*clEnqueueReadBuffer_ptr)(command_queue, buffer, blocking_read, offset, cb, ptr, num_events_in_wait_list, event_wait_list, event);
|
||||
return (*clEnqueueReadBuffer_ptr)(command_queue, buffer, blocking_read, offset, size, ptr, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueWriteBuffer_ptr)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, const void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
cl_int CL_API_CALL clEnqueueWriteBuffer (cl_command_queue command_queue,cl_mem buffer,cl_bool blocking_write,size_t offset,size_t cb,const void * ptr,cl_uint num_events_in_wait_list,const cl_event * event_wait_list,cl_event * event) {
|
||||
static cl_int (*clEnqueueReadBufferRect_ptr)(cl_command_queue, cl_mem, cl_bool, const size_t *, const size_t *, const size_t *, size_t, size_t, size_t, size_t, void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueReadBufferRect_ptr) clEnqueueReadBufferRect_ptr = getFunction("clEnqueueReadBufferRect");
|
||||
return (*clEnqueueReadBufferRect_ptr)(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);
|
||||
}
|
||||
|
||||
static cl_int (*clEnqueueWriteBuffer_ptr)(cl_command_queue, cl_mem, cl_bool, size_t, size_t, const void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueWriteBuffer_ptr) clEnqueueWriteBuffer_ptr = getFunction("clEnqueueWriteBuffer");
|
||||
return (*clEnqueueWriteBuffer_ptr)(command_queue, buffer, blocking_write, offset, cb, ptr, num_events_in_wait_list, event_wait_list, event);
|
||||
return (*clEnqueueWriteBuffer_ptr)(command_queue, buffer, blocking_write, offset, size, ptr, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueCopyBuffer_ptr)(cl_command_queue, cl_mem, cl_mem, size_t, size_t, size_t, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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 cb,cl_uint num_events_in_wait_list,const cl_event * event_wait_list,cl_event * event) {
|
||||
static cl_int (*clEnqueueWriteBufferRect_ptr)(cl_command_queue, cl_mem, cl_bool, const size_t *, const size_t *, const size_t *, size_t, size_t, size_t, size_t, const void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueWriteBufferRect_ptr) clEnqueueWriteBufferRect_ptr = getFunction("clEnqueueWriteBufferRect");
|
||||
return (*clEnqueueWriteBufferRect_ptr)(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);
|
||||
}
|
||||
|
||||
static cl_int (*clEnqueueFillBuffer_ptr)(cl_command_queue, cl_mem, const void *, size_t, size_t, size_t, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueFillBuffer_ptr) clEnqueueFillBuffer_ptr = getFunction("clEnqueueFillBuffer");
|
||||
return (*clEnqueueFillBuffer_ptr)(command_queue, buffer, pattern, pattern_size, offset, size, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (*clEnqueueCopyBuffer_ptr)(cl_command_queue, cl_mem, cl_mem, size_t, size_t, size_t, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueCopyBuffer_ptr) clEnqueueCopyBuffer_ptr = getFunction("clEnqueueCopyBuffer");
|
||||
return (*clEnqueueCopyBuffer_ptr)(command_queue, src_buffer, dst_buffer, src_offset, dst_offset, cb, num_events_in_wait_list, event_wait_list, event);
|
||||
return (*clEnqueueCopyBuffer_ptr)(command_queue, src_buffer, dst_buffer, src_offset, dst_offset, size, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueReadImage_ptr)(cl_command_queue, cl_mem, cl_bool, const size_t *, const size_t *, size_t, size_t, void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
static cl_int (*clEnqueueCopyBufferRect_ptr)(cl_command_queue, cl_mem, cl_mem, const size_t *, const size_t *, const size_t *, size_t, size_t, size_t, size_t, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueCopyBufferRect_ptr) clEnqueueCopyBufferRect_ptr = getFunction("clEnqueueCopyBufferRect");
|
||||
return (*clEnqueueCopyBufferRect_ptr)(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);
|
||||
}
|
||||
|
||||
static cl_int (*clEnqueueReadImage_ptr)(cl_command_queue, cl_mem, cl_bool, const size_t *, const size_t *, size_t, size_t, void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueReadImage_ptr) clEnqueueReadImage_ptr = getFunction("clEnqueueReadImage");
|
||||
return (*clEnqueueReadImage_ptr)(command_queue, image, blocking_read, origin, region, row_pitch, slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueWriteImage_ptr)(cl_command_queue, cl_mem, cl_bool, const size_t *, const size_t *, size_t, size_t, const void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
static cl_int (*clEnqueueWriteImage_ptr)(cl_command_queue, cl_mem, cl_bool, const size_t *, const size_t *, size_t, size_t, const void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueWriteImage_ptr) clEnqueueWriteImage_ptr = getFunction("clEnqueueWriteImage");
|
||||
return (*clEnqueueWriteImage_ptr)(command_queue, image, blocking_write, origin, region, input_row_pitch, input_slice_pitch, ptr, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueCopyImage_ptr)(cl_command_queue, cl_mem, cl_mem, const size_t *, const size_t *, const size_t *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
static cl_int (*clEnqueueFillImage_ptr)(cl_command_queue, cl_mem, const void *, const size_t *, const size_t *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueFillImage_ptr) clEnqueueFillImage_ptr = getFunction("clEnqueueFillImage");
|
||||
return (*clEnqueueFillImage_ptr)(command_queue, image, fill_color, origin, region, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (*clEnqueueCopyImage_ptr)(cl_command_queue, cl_mem, cl_mem, const size_t *, const size_t *, const size_t *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueCopyImage_ptr) clEnqueueCopyImage_ptr = getFunction("clEnqueueCopyImage");
|
||||
return (*clEnqueueCopyImage_ptr)(command_queue, src_image, dst_image, src_origin, dst_origin, region, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueCopyImageToBuffer_ptr)(cl_command_queue, cl_mem, cl_mem, const size_t *, const size_t *, size_t, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
static cl_int (*clEnqueueCopyImageToBuffer_ptr)(cl_command_queue, cl_mem, cl_mem, const size_t *, const size_t *, size_t, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueCopyImageToBuffer_ptr) clEnqueueCopyImageToBuffer_ptr = getFunction("clEnqueueCopyImageToBuffer");
|
||||
return (*clEnqueueCopyImageToBuffer_ptr)(command_queue, src_image, dst_buffer, src_origin, region, dst_offset, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueCopyBufferToImage_ptr)(cl_command_queue, cl_mem, cl_mem, size_t, const size_t *, const size_t *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
static cl_int (*clEnqueueCopyBufferToImage_ptr)(cl_command_queue, cl_mem, cl_mem, size_t, const size_t *, const size_t *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueCopyBufferToImage_ptr) clEnqueueCopyBufferToImage_ptr = getFunction("clEnqueueCopyBufferToImage");
|
||||
return (*clEnqueueCopyBufferToImage_ptr)(command_queue, src_buffer, dst_image, src_offset, dst_origin, region, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static void * (CL_API_CALL *clEnqueueMapBuffer_ptr)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, size_t, size_t, cl_uint, const cl_event *, cl_event *, cl_int *) = NULL;
|
||||
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 cb,cl_uint num_events_in_wait_list,const cl_event * event_wait_list,cl_event * event,cl_int * errcode_ret) {
|
||||
static void * (*clEnqueueMapBuffer_ptr)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, size_t, size_t, cl_uint, const cl_event *, cl_event *, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueMapBuffer_ptr) clEnqueueMapBuffer_ptr = getFunction("clEnqueueMapBuffer");
|
||||
return (*clEnqueueMapBuffer_ptr)(command_queue, buffer, blocking_map, map_flags, offset, cb, num_events_in_wait_list, event_wait_list, event, errcode_ret);
|
||||
return (*clEnqueueMapBuffer_ptr)(command_queue, buffer, blocking_map, map_flags, offset, size, num_events_in_wait_list, event_wait_list, event, errcode_ret);
|
||||
}
|
||||
|
||||
static void * (CL_API_CALL *clEnqueueMapImage_ptr)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, const size_t *, const size_t *, size_t *, size_t *, cl_uint, const cl_event *, cl_event *, cl_int *) = NULL;
|
||||
static void * (*clEnqueueMapImage_ptr)(cl_command_queue, cl_mem, cl_bool, cl_map_flags, const size_t *, const size_t *, size_t *, size_t *, cl_uint, const cl_event *, cl_event *, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueMapImage_ptr) clEnqueueMapImage_ptr = getFunction("clEnqueueMapImage");
|
||||
return (*clEnqueueMapImage_ptr)(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);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueUnmapMemObject_ptr)(cl_command_queue, cl_mem, void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
static cl_int (*clEnqueueUnmapMemObject_ptr)(cl_command_queue, cl_mem, void *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueUnmapMemObject_ptr) clEnqueueUnmapMemObject_ptr = getFunction("clEnqueueUnmapMemObject");
|
||||
return (*clEnqueueUnmapMemObject_ptr)(command_queue, memobj, mapped_ptr, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueNDRangeKernel_ptr)(cl_command_queue, cl_kernel, cl_uint, const size_t *, const size_t *, const size_t *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
static cl_int (*clEnqueueMigrateMemObjects_ptr)(cl_command_queue, cl_uint, const cl_mem *, cl_mem_migration_flags, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueMigrateMemObjects_ptr) clEnqueueMigrateMemObjects_ptr = getFunction("clEnqueueMigrateMemObjects");
|
||||
return (*clEnqueueMigrateMemObjects_ptr)(command_queue, num_mem_objects, mem_objects, flags, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (*clEnqueueNDRangeKernel_ptr)(cl_command_queue, cl_kernel, cl_uint, const size_t *, const size_t *, const size_t *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueNDRangeKernel_ptr) clEnqueueNDRangeKernel_ptr = getFunction("clEnqueueNDRangeKernel");
|
||||
return (*clEnqueueNDRangeKernel_ptr)(command_queue, kernel, work_dim, global_work_offset, global_work_size, local_work_size, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueTask_ptr)(cl_command_queue, cl_kernel, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
static cl_int (*clEnqueueTask_ptr)(cl_command_queue, cl_kernel, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueTask_ptr) clEnqueueTask_ptr = getFunction("clEnqueueTask");
|
||||
return (*clEnqueueTask_ptr)(command_queue, kernel, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueNativeKernel_ptr)(cl_command_queue, void (*)(void *), void *, size_t, cl_uint, const cl_mem *, const void **, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
cl_int CL_API_CALL clEnqueueNativeKernel (cl_command_queue command_queue,void (*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) {
|
||||
static cl_int (*clEnqueueNativeKernel_ptr)(cl_command_queue, void (CL_CALLBACK * /*user_func*/)(void *), void *, size_t, cl_uint, const cl_mem *, const void **, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueNativeKernel_ptr) clEnqueueNativeKernel_ptr = getFunction("clEnqueueNativeKernel");
|
||||
return (*clEnqueueNativeKernel_ptr)(command_queue, user_func, args, cb_args, num_mem_objects, mem_list, args_mem_loc, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueMarker_ptr)(cl_command_queue, cl_event *) = NULL;
|
||||
cl_int CL_API_CALL clEnqueueMarker (cl_command_queue command_queue,cl_event * event) {
|
||||
static cl_int (*clEnqueueMarkerWithWaitList_ptr)(cl_command_queue, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueMarkerWithWaitList_ptr) clEnqueueMarkerWithWaitList_ptr = getFunction("clEnqueueMarkerWithWaitList");
|
||||
return (*clEnqueueMarkerWithWaitList_ptr)(command_queue, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (*clEnqueueBarrierWithWaitList_ptr)(cl_command_queue, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueBarrierWithWaitList_ptr) clEnqueueBarrierWithWaitList_ptr = getFunction("clEnqueueBarrierWithWaitList");
|
||||
return (*clEnqueueBarrierWithWaitList_ptr)(command_queue, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static void * (*clGetExtensionFunctionAddressForPlatform_ptr)(cl_platform_id, const char *) = NULL;
|
||||
void * CL_API_CALL clGetExtensionFunctionAddressForPlatform (cl_platform_id platform,const char * func_name) {
|
||||
if(!clGetExtensionFunctionAddressForPlatform_ptr) clGetExtensionFunctionAddressForPlatform_ptr = getFunction("clGetExtensionFunctionAddressForPlatform");
|
||||
return (*clGetExtensionFunctionAddressForPlatform_ptr)(platform, func_name);
|
||||
}
|
||||
|
||||
static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem (*clCreateImage2D_ptr)(cl_context, cl_mem_flags, const cl_image_format *, size_t, size_t, size_t, void *, cl_int *) = NULL;
|
||||
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED 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) {
|
||||
if(!clCreateImage2D_ptr) clCreateImage2D_ptr = getFunction("clCreateImage2D");
|
||||
return (*clCreateImage2D_ptr)(context, flags, image_format, image_width, image_height, image_row_pitch, host_ptr, errcode_ret);
|
||||
}
|
||||
|
||||
static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem (*clCreateImage3D_ptr)(cl_context, cl_mem_flags, const cl_image_format *, size_t, size_t, size_t, size_t, size_t, void *, cl_int *) = NULL;
|
||||
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED 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) {
|
||||
if(!clCreateImage3D_ptr) clCreateImage3D_ptr = getFunction("clCreateImage3D");
|
||||
return (*clCreateImage3D_ptr)(context, flags, image_format, image_width, image_height, image_depth, image_row_pitch, image_slice_pitch, host_ptr, errcode_ret);
|
||||
}
|
||||
|
||||
static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int (*clEnqueueMarker_ptr)(cl_command_queue, cl_event *) = NULL;
|
||||
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL clEnqueueMarker (cl_command_queue command_queue,cl_event * event) {
|
||||
if(!clEnqueueMarker_ptr) clEnqueueMarker_ptr = getFunction("clEnqueueMarker");
|
||||
return (*clEnqueueMarker_ptr)(command_queue, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueWaitForEvents_ptr)(cl_command_queue, cl_uint, const cl_event *) = NULL;
|
||||
cl_int CL_API_CALL clEnqueueWaitForEvents (cl_command_queue command_queue,cl_uint num_events,const cl_event * event_list) {
|
||||
static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int (*clEnqueueWaitForEvents_ptr)(cl_command_queue, cl_uint, const cl_event *) = NULL;
|
||||
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL clEnqueueWaitForEvents (cl_command_queue command_queue,cl_uint num_events,const cl_event * event_list) {
|
||||
if(!clEnqueueWaitForEvents_ptr) clEnqueueWaitForEvents_ptr = getFunction("clEnqueueWaitForEvents");
|
||||
return (*clEnqueueWaitForEvents_ptr)(command_queue, num_events, event_list);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueBarrier_ptr)(cl_command_queue) = NULL;
|
||||
cl_int CL_API_CALL clEnqueueBarrier (cl_command_queue command_queue) {
|
||||
static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int (*clEnqueueBarrier_ptr)(cl_command_queue) = NULL;
|
||||
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL clEnqueueBarrier (cl_command_queue command_queue) {
|
||||
if(!clEnqueueBarrier_ptr) clEnqueueBarrier_ptr = getFunction("clEnqueueBarrier");
|
||||
return (*clEnqueueBarrier_ptr)(command_queue);
|
||||
}
|
||||
|
||||
static void * (CL_API_CALL *clGetExtensionFunctionAddress_ptr)(const char *) = NULL;
|
||||
void * CL_API_CALL clGetExtensionFunctionAddress (const char * func_name) {
|
||||
static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int (*clUnloadCompiler_ptr)(void) = NULL;
|
||||
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL clUnloadCompiler (void) {
|
||||
if(!clUnloadCompiler_ptr) clUnloadCompiler_ptr = getFunction("clUnloadCompiler");
|
||||
return (*clUnloadCompiler_ptr)();
|
||||
}
|
||||
|
||||
static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * (*clGetExtensionFunctionAddress_ptr)(const char *) = NULL;
|
||||
CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL clGetExtensionFunctionAddress (const char * func_name) {
|
||||
if(!clGetExtensionFunctionAddress_ptr) clGetExtensionFunctionAddress_ptr = getFunction("clGetExtensionFunctionAddress");
|
||||
return (*clGetExtensionFunctionAddress_ptr)(func_name);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,28 @@
|
|||
// Automatically generated by generateClRun.pl
|
||||
#include "dynamiclib.h"
|
||||
#include "../include/CL/cl_ext.h"
|
||||
|
||||
|
||||
static cl_int (*clIcdGetPlatformIDsKHR_ptr)(cl_uint, cl_platform_id *, cl_uint *) = NULL;
|
||||
cl_int CL_API_CALL clIcdGetPlatformIDsKHR (cl_uint num_entries,cl_platform_id * platforms,cl_uint * num_platforms) {
|
||||
if(!clIcdGetPlatformIDsKHR_ptr) clIcdGetPlatformIDsKHR_ptr = getFunction("clIcdGetPlatformIDsKHR");
|
||||
return (*clIcdGetPlatformIDsKHR_ptr)(num_entries, platforms, num_platforms);
|
||||
}
|
||||
static cl_int (* clReleaseDeviceEXT_ptr)(cl_device_id) = NULL;
|
||||
cl_int CL_API_CALL clReleaseDeviceEXT (cl_device_id device) {
|
||||
if(! clReleaseDeviceEXT_ptr) clReleaseDeviceEXT_ptr = getFunction(" clReleaseDeviceEXT");
|
||||
return (* clReleaseDeviceEXT_ptr)(device);
|
||||
}
|
||||
|
||||
static cl_int (* clRetainDeviceEXT_ptr)(cl_device_id) = NULL;
|
||||
cl_int CL_API_CALL clRetainDeviceEXT (cl_device_id device) {
|
||||
if(! clRetainDeviceEXT_ptr) clRetainDeviceEXT_ptr = getFunction(" clRetainDeviceEXT");
|
||||
return (* clRetainDeviceEXT_ptr)(device);
|
||||
}
|
||||
|
||||
static cl_int (* clCreateSubDevicesEXT_ptr)(cl_device_id, const cl_device_partition_property_ext *, cl_uint, cl_device_id *, cl_uint *) = NULL;
|
||||
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) {
|
||||
if(! clCreateSubDevicesEXT_ptr) clCreateSubDevicesEXT_ptr = getFunction(" clCreateSubDevicesEXT");
|
||||
return (* clCreateSubDevicesEXT_ptr)(in_device, properties, num_entries, out_devices, num_devices);
|
||||
}
|
||||
|
|
@ -3,55 +3,61 @@
|
|||
#include "../include/CL/cl_gl.h"
|
||||
|
||||
|
||||
static cl_mem (CL_API_CALL *clCreateFromGLBuffer_ptr)(cl_context, cl_mem_flags, cl_GLuint, int *) = NULL;
|
||||
static cl_mem (*clCreateFromGLBuffer_ptr)(cl_context, cl_mem_flags, cl_GLuint, int *) = NULL;
|
||||
cl_mem CL_API_CALL clCreateFromGLBuffer (cl_context context,cl_mem_flags flags,cl_GLuint bufobj,int * errcode_ret) {
|
||||
if(!clCreateFromGLBuffer_ptr) clCreateFromGLBuffer_ptr = getFunction("clCreateFromGLBuffer");
|
||||
return (*clCreateFromGLBuffer_ptr)(context, flags, bufobj, errcode_ret );
|
||||
return (*clCreateFromGLBuffer_ptr)(context, flags, bufobj, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_mem (CL_API_CALL *clCreateFromGLTexture2D_ptr)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateFromGLTexture2D_ptr) clCreateFromGLTexture2D_ptr = getFunction("clCreateFromGLTexture2D");
|
||||
return (*clCreateFromGLTexture2D_ptr)(context, flags, target, miplevel, texture, errcode_ret);
|
||||
static cl_mem (*clCreateFromGLTexture_ptr)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateFromGLTexture_ptr) clCreateFromGLTexture_ptr = getFunction("clCreateFromGLTexture");
|
||||
return (*clCreateFromGLTexture_ptr)(context, flags, target, miplevel, texture, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_mem (CL_API_CALL *clCreateFromGLTexture3D_ptr)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateFromGLTexture3D_ptr) clCreateFromGLTexture3D_ptr = getFunction("clCreateFromGLTexture3D");
|
||||
return (*clCreateFromGLTexture3D_ptr)(context, flags, target, miplevel, texture, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_mem (CL_API_CALL *clCreateFromGLRenderbuffer_ptr)(cl_context, cl_mem_flags, cl_GLuint, cl_int *) = NULL;
|
||||
static cl_mem (*clCreateFromGLRenderbuffer_ptr)(cl_context, cl_mem_flags, cl_GLuint, cl_int *) = NULL;
|
||||
cl_mem CL_API_CALL clCreateFromGLRenderbuffer (cl_context context,cl_mem_flags flags,cl_GLuint renderbuffer,cl_int * errcode_ret) {
|
||||
if(!clCreateFromGLRenderbuffer_ptr) clCreateFromGLRenderbuffer_ptr = getFunction("clCreateFromGLRenderbuffer");
|
||||
return (*clCreateFromGLRenderbuffer_ptr)(context, flags, renderbuffer, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetGLObjectInfo_ptr)(cl_mem, cl_gl_object_type *, cl_GLuint *) = NULL;
|
||||
static cl_int (*clGetGLObjectInfo_ptr)(cl_mem, cl_gl_object_type *, cl_GLuint *) = NULL;
|
||||
cl_int CL_API_CALL clGetGLObjectInfo (cl_mem memobj,cl_gl_object_type * gl_object_type,cl_GLuint * gl_object_name) {
|
||||
if(!clGetGLObjectInfo_ptr) clGetGLObjectInfo_ptr = getFunction("clGetGLObjectInfo");
|
||||
return (*clGetGLObjectInfo_ptr)(memobj, gl_object_type, gl_object_name);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetGLTextureInfo_ptr)(cl_mem, cl_gl_texture_info, size_t, void *, size_t *) = NULL;
|
||||
static cl_int (*clGetGLTextureInfo_ptr)(cl_mem, cl_gl_texture_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetGLTextureInfo_ptr) clGetGLTextureInfo_ptr = getFunction("clGetGLTextureInfo");
|
||||
return (*clGetGLTextureInfo_ptr)(memobj, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueAcquireGLObjects_ptr)(cl_command_queue, cl_uint, const cl_mem *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
static cl_int (*clEnqueueAcquireGLObjects_ptr)(cl_command_queue, cl_uint, const cl_mem *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueAcquireGLObjects_ptr) clEnqueueAcquireGLObjects_ptr = getFunction("clEnqueueAcquireGLObjects");
|
||||
return (*clEnqueueAcquireGLObjects_ptr)(command_queue, num_objects, mem_objects, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clEnqueueReleaseGLObjects_ptr)(cl_command_queue, cl_uint, const cl_mem *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
static cl_int (*clEnqueueReleaseGLObjects_ptr)(cl_command_queue, cl_uint, const cl_mem *, cl_uint, const cl_event *, cl_event *) = NULL;
|
||||
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) {
|
||||
if(!clEnqueueReleaseGLObjects_ptr) clEnqueueReleaseGLObjects_ptr = getFunction("clEnqueueReleaseGLObjects");
|
||||
return (*clEnqueueReleaseGLObjects_ptr)(command_queue, num_objects, mem_objects, num_events_in_wait_list, event_wait_list, event);
|
||||
}
|
||||
|
||||
static cl_int (CL_API_CALL *clGetGLContextInfoKHR_ptr)(const cl_context_properties *, cl_gl_context_info, size_t, void *, size_t *) = NULL;
|
||||
static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem (*clCreateFromGLTexture2D_ptr)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateFromGLTexture2D_ptr) clCreateFromGLTexture2D_ptr = getFunction("clCreateFromGLTexture2D");
|
||||
return (*clCreateFromGLTexture2D_ptr)(context, flags, target, miplevel, texture, errcode_ret);
|
||||
}
|
||||
|
||||
static CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_mem (*clCreateFromGLTexture3D_ptr)(cl_context, cl_mem_flags, cl_GLenum, cl_GLint, cl_GLuint, cl_int *) = NULL;
|
||||
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) {
|
||||
if(!clCreateFromGLTexture3D_ptr) clCreateFromGLTexture3D_ptr = getFunction("clCreateFromGLTexture3D");
|
||||
return (*clCreateFromGLTexture3D_ptr)(context, flags, target, miplevel, texture, errcode_ret);
|
||||
}
|
||||
|
||||
static cl_int (*clGetGLContextInfoKHR_ptr)(const cl_context_properties *, cl_gl_context_info, size_t, void *, size_t *) = NULL;
|
||||
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) {
|
||||
if(!clGetGLContextInfoKHR_ptr) clGetGLContextInfoKHR_ptr = getFunction("clGetGLContextInfoKHR");
|
||||
return (*clGetGLContextInfoKHR_ptr)(properties, param_name, param_value_size, param_value, param_value_size_ret);
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
// Automatically generated by generateClRun.pl
|
||||
#include "dynamiclib.h"
|
||||
#include "../include/CL/cl_gl_ext.h"
|
||||
|
||||
|
||||
static cl_event (*clCreateEventFromGLsyncKHR_ptr)(cl_context, cl_GLsync, cl_int *) = NULL;
|
||||
cl_event CL_API_CALL clCreateEventFromGLsyncKHR (cl_context context,cl_GLsync cl_GLsync,cl_int * errcode_ret) {
|
||||
if(!clCreateEventFromGLsyncKHR_ptr) clCreateEventFromGLsyncKHR_ptr = getFunction("clCreateEventFromGLsyncKHR");
|
||||
return (*clCreateEventFromGLsyncKHR_ptr)(context, cl_GLsync, errcode_ret);
|
||||
}
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008-2010 The Khronos Group Inc.
|
||||
* Copyright (c) 2008 - 2012 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
|
||||
|
@ -21,8 +21,6 @@
|
|||
* MATERIALS OR THE USE OR OTHER DEALINGS IN THE MATERIALS.
|
||||
******************************************************************************/
|
||||
|
||||
/* $Revision: 11707 $ on $Date: 2010-06-13 23:30:16 -0700 (Sun, 13 Jun 2010) $ */
|
||||
|
||||
#ifndef __OPENCL_CL_H
|
||||
#define __OPENCL_CL_H
|
||||
|
||||
|
@ -53,14 +51,15 @@ typedef cl_ulong cl_bitfield;
|
|||
typedef cl_bitfield cl_device_type;
|
||||
typedef cl_uint cl_platform_info;
|
||||
typedef cl_uint cl_device_info;
|
||||
typedef cl_bitfield cl_device_address_info;
|
||||
typedef cl_bitfield cl_device_fp_config;
|
||||
typedef cl_uint cl_device_mem_cache_type;
|
||||
typedef cl_uint cl_device_local_mem_type;
|
||||
typedef cl_bitfield cl_device_exec_capabilities;
|
||||
typedef cl_bitfield cl_command_queue_properties;
|
||||
typedef intptr_t cl_device_partition_property;
|
||||
typedef cl_bitfield cl_device_affinity_domain;
|
||||
|
||||
typedef intptr_t cl_context_properties;
|
||||
typedef intptr_t cl_context_properties;
|
||||
typedef cl_uint cl_context_info;
|
||||
typedef cl_uint cl_command_queue_info;
|
||||
typedef cl_uint cl_channel_order;
|
||||
|
@ -68,25 +67,50 @@ typedef cl_uint cl_channel_type;
|
|||
typedef cl_bitfield cl_mem_flags;
|
||||
typedef cl_uint cl_mem_object_type;
|
||||
typedef cl_uint cl_mem_info;
|
||||
typedef cl_bitfield cl_mem_migration_flags;
|
||||
typedef cl_uint cl_image_info;
|
||||
typedef cl_uint cl_buffer_create_type;
|
||||
typedef cl_uint cl_addressing_mode;
|
||||
typedef cl_uint cl_filter_mode;
|
||||
typedef cl_uint cl_sampler_info;
|
||||
typedef cl_bitfield cl_map_flags;
|
||||
typedef cl_uint cl_program_info;
|
||||
typedef cl_uint cl_program_build_info;
|
||||
typedef cl_uint cl_program_binary_type;
|
||||
typedef cl_int cl_build_status;
|
||||
typedef cl_uint cl_kernel_info;
|
||||
typedef cl_uint cl_kernel_arg_info;
|
||||
typedef cl_uint cl_kernel_arg_address_qualifier;
|
||||
typedef cl_uint cl_kernel_arg_access_qualifier;
|
||||
typedef cl_bitfield cl_kernel_arg_type_qualifier;
|
||||
typedef cl_uint cl_kernel_work_group_info;
|
||||
typedef cl_uint cl_event_info;
|
||||
typedef cl_uint cl_command_type;
|
||||
typedef cl_uint cl_profiling_info;
|
||||
|
||||
|
||||
typedef struct _cl_image_format {
|
||||
cl_channel_order image_channel_order;
|
||||
cl_channel_type image_channel_data_type;
|
||||
} cl_image_format;
|
||||
|
||||
typedef struct _cl_image_desc {
|
||||
cl_mem_object_type image_type;
|
||||
size_t image_width;
|
||||
size_t image_height;
|
||||
size_t image_depth;
|
||||
size_t image_array_size;
|
||||
size_t image_row_pitch;
|
||||
size_t image_slice_pitch;
|
||||
cl_uint num_mip_levels;
|
||||
cl_uint num_samples;
|
||||
cl_mem buffer;
|
||||
} cl_image_desc;
|
||||
|
||||
typedef struct _cl_buffer_region {
|
||||
size_t origin;
|
||||
size_t size;
|
||||
} cl_buffer_region;
|
||||
|
||||
|
||||
/******************************************************************************/
|
||||
|
@ -105,6 +129,13 @@ typedef struct _cl_image_format {
|
|||
#define CL_IMAGE_FORMAT_NOT_SUPPORTED -10
|
||||
#define CL_BUILD_PROGRAM_FAILURE -11
|
||||
#define CL_MAP_FAILURE -12
|
||||
#define CL_MISALIGNED_SUB_BUFFER_OFFSET -13
|
||||
#define CL_EXEC_STATUS_ERROR_FOR_EVENTS_IN_WAIT_LIST -14
|
||||
#define CL_COMPILE_PROGRAM_FAILURE -15
|
||||
#define CL_LINKER_NOT_AVAILABLE -16
|
||||
#define CL_LINK_PROGRAM_FAILURE -17
|
||||
#define CL_DEVICE_PARTITION_FAILED -18
|
||||
#define CL_KERNEL_ARG_INFO_NOT_AVAILABLE -19
|
||||
|
||||
#define CL_INVALID_VALUE -30
|
||||
#define CL_INVALID_DEVICE_TYPE -31
|
||||
|
@ -140,13 +171,22 @@ typedef struct _cl_image_format {
|
|||
#define CL_INVALID_BUFFER_SIZE -61
|
||||
#define CL_INVALID_MIP_LEVEL -62
|
||||
#define CL_INVALID_GLOBAL_WORK_SIZE -63
|
||||
#define CL_INVALID_PROPERTY -64
|
||||
#define CL_INVALID_IMAGE_DESCRIPTOR -65
|
||||
#define CL_INVALID_COMPILER_OPTIONS -66
|
||||
#define CL_INVALID_LINKER_OPTIONS -67
|
||||
#define CL_INVALID_DEVICE_PARTITION_COUNT -68
|
||||
|
||||
/* OpenCL Version */
|
||||
#define CL_VERSION_1_0 1
|
||||
#define CL_VERSION_1_1 1
|
||||
#define CL_VERSION_1_2 1
|
||||
|
||||
/* cl_bool */
|
||||
#define CL_FALSE 0
|
||||
#define CL_TRUE 1
|
||||
#define CL_BLOCKING CL_TRUE
|
||||
#define CL_NON_BLOCKING CL_FALSE
|
||||
|
||||
/* cl_platform_info */
|
||||
#define CL_PLATFORM_PROFILE 0x0900
|
||||
|
@ -160,6 +200,7 @@ typedef struct _cl_image_format {
|
|||
#define CL_DEVICE_TYPE_CPU (1 << 1)
|
||||
#define CL_DEVICE_TYPE_GPU (1 << 2)
|
||||
#define CL_DEVICE_TYPE_ACCELERATOR (1 << 3)
|
||||
#define CL_DEVICE_TYPE_CUSTOM (1 << 4)
|
||||
#define CL_DEVICE_TYPE_ALL 0xFFFFFFFF
|
||||
|
||||
/* cl_device_info */
|
||||
|
@ -213,8 +254,32 @@ typedef struct _cl_image_format {
|
|||
#define CL_DEVICE_VERSION 0x102F
|
||||
#define CL_DEVICE_EXTENSIONS 0x1030
|
||||
#define CL_DEVICE_PLATFORM 0x1031
|
||||
/* 0x1032 reserved for CL_DEVICE_DOUBLE_FP_CONFIG */
|
||||
#define CL_DEVICE_DOUBLE_FP_CONFIG 0x1032
|
||||
/* 0x1033 reserved for CL_DEVICE_HALF_FP_CONFIG */
|
||||
#define CL_DEVICE_PREFERRED_VECTOR_WIDTH_HALF 0x1034
|
||||
#define CL_DEVICE_HOST_UNIFIED_MEMORY 0x1035
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_CHAR 0x1036
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_SHORT 0x1037
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_INT 0x1038
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_LONG 0x1039
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_FLOAT 0x103A
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_DOUBLE 0x103B
|
||||
#define CL_DEVICE_NATIVE_VECTOR_WIDTH_HALF 0x103C
|
||||
#define CL_DEVICE_OPENCL_C_VERSION 0x103D
|
||||
#define CL_DEVICE_LINKER_AVAILABLE 0x103E
|
||||
#define CL_DEVICE_BUILT_IN_KERNELS 0x103F
|
||||
#define CL_DEVICE_IMAGE_MAX_BUFFER_SIZE 0x1040
|
||||
#define CL_DEVICE_IMAGE_MAX_ARRAY_SIZE 0x1041
|
||||
#define CL_DEVICE_PARENT_DEVICE 0x1042
|
||||
#define CL_DEVICE_PARTITION_MAX_SUB_DEVICES 0x1043
|
||||
#define CL_DEVICE_PARTITION_PROPERTIES 0x1044
|
||||
#define CL_DEVICE_PARTITION_AFFINITY_DOMAIN 0x1045
|
||||
#define CL_DEVICE_PARTITION_TYPE 0x1046
|
||||
#define CL_DEVICE_REFERENCE_COUNT 0x1047
|
||||
#define CL_DEVICE_PREFERRED_INTEROP_USER_SYNC 0x1048
|
||||
#define CL_DEVICE_PRINTF_BUFFER_SIZE 0x1049
|
||||
#define CL_DEVICE_IMAGE_PITCH_ALIGNMENT 0x104A
|
||||
#define CL_DEVICE_IMAGE_BASE_ADDRESS_ALIGNMENT 0x104B
|
||||
|
||||
/* cl_device_fp_config - bitfield */
|
||||
#define CL_FP_DENORM (1 << 0)
|
||||
|
@ -223,6 +288,8 @@ typedef struct _cl_image_format {
|
|||
#define CL_FP_ROUND_TO_ZERO (1 << 3)
|
||||
#define CL_FP_ROUND_TO_INF (1 << 4)
|
||||
#define CL_FP_FMA (1 << 5)
|
||||
#define CL_FP_SOFT_FLOAT (1 << 6)
|
||||
#define CL_FP_CORRECTLY_ROUNDED_DIVIDE_SQRT (1 << 7)
|
||||
|
||||
/* cl_device_mem_cache_type */
|
||||
#define CL_NONE 0x0
|
||||
|
@ -245,9 +312,25 @@ typedef struct _cl_image_format {
|
|||
#define CL_CONTEXT_REFERENCE_COUNT 0x1080
|
||||
#define CL_CONTEXT_DEVICES 0x1081
|
||||
#define CL_CONTEXT_PROPERTIES 0x1082
|
||||
#define CL_CONTEXT_NUM_DEVICES 0x1083
|
||||
|
||||
/* cl_context_info + cl_context_properties */
|
||||
/* cl_context_properties */
|
||||
#define CL_CONTEXT_PLATFORM 0x1084
|
||||
#define CL_CONTEXT_INTEROP_USER_SYNC 0x1085
|
||||
|
||||
/* cl_device_partition_property */
|
||||
#define CL_DEVICE_PARTITION_EQUALLY 0x1086
|
||||
#define CL_DEVICE_PARTITION_BY_COUNTS 0x1087
|
||||
#define CL_DEVICE_PARTITION_BY_COUNTS_LIST_END 0x0
|
||||
#define CL_DEVICE_PARTITION_BY_AFFINITY_DOMAIN 0x1088
|
||||
|
||||
/* cl_device_affinity_domain */
|
||||
#define CL_DEVICE_AFFINITY_DOMAIN_NUMA (1 << 0)
|
||||
#define CL_DEVICE_AFFINITY_DOMAIN_L4_CACHE (1 << 1)
|
||||
#define CL_DEVICE_AFFINITY_DOMAIN_L3_CACHE (1 << 2)
|
||||
#define CL_DEVICE_AFFINITY_DOMAIN_L2_CACHE (1 << 3)
|
||||
#define CL_DEVICE_AFFINITY_DOMAIN_L1_CACHE (1 << 4)
|
||||
#define CL_DEVICE_AFFINITY_DOMAIN_NEXT_PARTITIONABLE (1 << 5)
|
||||
|
||||
/* cl_command_queue_info */
|
||||
#define CL_QUEUE_CONTEXT 0x1090
|
||||
|
@ -262,6 +345,14 @@ typedef struct _cl_image_format {
|
|||
#define CL_MEM_USE_HOST_PTR (1 << 3)
|
||||
#define CL_MEM_ALLOC_HOST_PTR (1 << 4)
|
||||
#define CL_MEM_COPY_HOST_PTR (1 << 5)
|
||||
// reserved (1 << 6)
|
||||
#define CL_MEM_HOST_WRITE_ONLY (1 << 7)
|
||||
#define CL_MEM_HOST_READ_ONLY (1 << 8)
|
||||
#define CL_MEM_HOST_NO_ACCESS (1 << 9)
|
||||
|
||||
/* cl_mem_migration_flags - bitfield */
|
||||
#define CL_MIGRATE_MEM_OBJECT_HOST (1 << 0)
|
||||
#define CL_MIGRATE_MEM_OBJECT_CONTENT_UNDEFINED (1 << 1)
|
||||
|
||||
/* cl_channel_order */
|
||||
#define CL_R 0x10B0
|
||||
|
@ -274,6 +365,11 @@ typedef struct _cl_image_format {
|
|||
#define CL_ARGB 0x10B7
|
||||
#define CL_INTENSITY 0x10B8
|
||||
#define CL_LUMINANCE 0x10B9
|
||||
#define CL_Rx 0x10BA
|
||||
#define CL_RGx 0x10BB
|
||||
#define CL_RGBx 0x10BC
|
||||
#define CL_DEPTH 0x10BD
|
||||
#define CL_DEPTH_STENCIL 0x10BE
|
||||
|
||||
/* cl_channel_type */
|
||||
#define CL_SNORM_INT8 0x10D0
|
||||
|
@ -291,11 +387,16 @@ typedef struct _cl_image_format {
|
|||
#define CL_UNSIGNED_INT32 0x10DC
|
||||
#define CL_HALF_FLOAT 0x10DD
|
||||
#define CL_FLOAT 0x10DE
|
||||
#define CL_UNORM_INT24 0x10DF
|
||||
|
||||
/* cl_mem_object_type */
|
||||
#define CL_MEM_OBJECT_BUFFER 0x10F0
|
||||
#define CL_MEM_OBJECT_IMAGE2D 0x10F1
|
||||
#define CL_MEM_OBJECT_IMAGE3D 0x10F2
|
||||
#define CL_MEM_OBJECT_IMAGE2D_ARRAY 0x10F3
|
||||
#define CL_MEM_OBJECT_IMAGE1D 0x10F4
|
||||
#define CL_MEM_OBJECT_IMAGE1D_ARRAY 0x10F5
|
||||
#define CL_MEM_OBJECT_IMAGE1D_BUFFER 0x10F6
|
||||
|
||||
/* cl_mem_info */
|
||||
#define CL_MEM_TYPE 0x1100
|
||||
|
@ -305,6 +406,8 @@ typedef struct _cl_image_format {
|
|||
#define CL_MEM_MAP_COUNT 0x1104
|
||||
#define CL_MEM_REFERENCE_COUNT 0x1105
|
||||
#define CL_MEM_CONTEXT 0x1106
|
||||
#define CL_MEM_ASSOCIATED_MEMOBJECT 0x1107
|
||||
#define CL_MEM_OFFSET 0x1108
|
||||
|
||||
/* cl_image_info */
|
||||
#define CL_IMAGE_FORMAT 0x1110
|
||||
|
@ -314,12 +417,17 @@ typedef struct _cl_image_format {
|
|||
#define CL_IMAGE_WIDTH 0x1114
|
||||
#define CL_IMAGE_HEIGHT 0x1115
|
||||
#define CL_IMAGE_DEPTH 0x1116
|
||||
#define CL_IMAGE_ARRAY_SIZE 0x1117
|
||||
#define CL_IMAGE_BUFFER 0x1118
|
||||
#define CL_IMAGE_NUM_MIP_LEVELS 0x1119
|
||||
#define CL_IMAGE_NUM_SAMPLES 0x111A
|
||||
|
||||
/* cl_addressing_mode */
|
||||
#define CL_ADDRESS_NONE 0x1130
|
||||
#define CL_ADDRESS_CLAMP_TO_EDGE 0x1131
|
||||
#define CL_ADDRESS_CLAMP 0x1132
|
||||
#define CL_ADDRESS_REPEAT 0x1133
|
||||
#define CL_ADDRESS_MIRRORED_REPEAT 0x1134
|
||||
|
||||
/* cl_filter_mode */
|
||||
#define CL_FILTER_NEAREST 0x1140
|
||||
|
@ -335,6 +443,7 @@ typedef struct _cl_image_format {
|
|||
/* cl_map_flags - bitfield */
|
||||
#define CL_MAP_READ (1 << 0)
|
||||
#define CL_MAP_WRITE (1 << 1)
|
||||
#define CL_MAP_WRITE_INVALIDATE_REGION (1 << 2)
|
||||
|
||||
/* cl_program_info */
|
||||
#define CL_PROGRAM_REFERENCE_COUNT 0x1160
|
||||
|
@ -344,11 +453,20 @@ typedef struct _cl_image_format {
|
|||
#define CL_PROGRAM_SOURCE 0x1164
|
||||
#define CL_PROGRAM_BINARY_SIZES 0x1165
|
||||
#define CL_PROGRAM_BINARIES 0x1166
|
||||
#define CL_PROGRAM_NUM_KERNELS 0x1167
|
||||
#define CL_PROGRAM_KERNEL_NAMES 0x1168
|
||||
|
||||
/* cl_program_build_info */
|
||||
#define CL_PROGRAM_BUILD_STATUS 0x1181
|
||||
#define CL_PROGRAM_BUILD_OPTIONS 0x1182
|
||||
#define CL_PROGRAM_BUILD_LOG 0x1183
|
||||
#define CL_PROGRAM_BINARY_TYPE 0x1184
|
||||
|
||||
/* cl_program_binary_type */
|
||||
#define CL_PROGRAM_BINARY_TYPE_NONE 0x0
|
||||
#define CL_PROGRAM_BINARY_TYPE_COMPILED_OBJECT 0x1
|
||||
#define CL_PROGRAM_BINARY_TYPE_LIBRARY 0x2
|
||||
#define CL_PROGRAM_BINARY_TYPE_EXECUTABLE 0x4
|
||||
|
||||
/* cl_build_status */
|
||||
#define CL_BUILD_SUCCESS 0
|
||||
|
@ -362,17 +480,47 @@ typedef struct _cl_image_format {
|
|||
#define CL_KERNEL_REFERENCE_COUNT 0x1192
|
||||
#define CL_KERNEL_CONTEXT 0x1193
|
||||
#define CL_KERNEL_PROGRAM 0x1194
|
||||
#define CL_KERNEL_ATTRIBUTES 0x1195
|
||||
|
||||
/* cl_kernel_arg_info */
|
||||
#define CL_KERNEL_ARG_ADDRESS_QUALIFIER 0x1196
|
||||
#define CL_KERNEL_ARG_ACCESS_QUALIFIER 0x1197
|
||||
#define CL_KERNEL_ARG_TYPE_NAME 0x1198
|
||||
#define CL_KERNEL_ARG_TYPE_QUALIFIER 0x1199
|
||||
#define CL_KERNEL_ARG_NAME 0x119A
|
||||
|
||||
/* cl_kernel_arg_address_qualifier */
|
||||
#define CL_KERNEL_ARG_ADDRESS_GLOBAL 0x119B
|
||||
#define CL_KERNEL_ARG_ADDRESS_LOCAL 0x119C
|
||||
#define CL_KERNEL_ARG_ADDRESS_CONSTANT 0x119D
|
||||
#define CL_KERNEL_ARG_ADDRESS_PRIVATE 0x119E
|
||||
|
||||
/* cl_kernel_arg_access_qualifier */
|
||||
#define CL_KERNEL_ARG_ACCESS_READ_ONLY 0x11A0
|
||||
#define CL_KERNEL_ARG_ACCESS_WRITE_ONLY 0x11A1
|
||||
#define CL_KERNEL_ARG_ACCESS_READ_WRITE 0x11A2
|
||||
#define CL_KERNEL_ARG_ACCESS_NONE 0x11A3
|
||||
|
||||
/* cl_kernel_arg_type_qualifer */
|
||||
#define CL_KERNEL_ARG_TYPE_NONE 0
|
||||
#define CL_KERNEL_ARG_TYPE_CONST (1 << 0)
|
||||
#define CL_KERNEL_ARG_TYPE_RESTRICT (1 << 1)
|
||||
#define CL_KERNEL_ARG_TYPE_VOLATILE (1 << 2)
|
||||
|
||||
/* cl_kernel_work_group_info */
|
||||
#define CL_KERNEL_WORK_GROUP_SIZE 0x11B0
|
||||
#define CL_KERNEL_COMPILE_WORK_GROUP_SIZE 0x11B1
|
||||
#define CL_KERNEL_LOCAL_MEM_SIZE 0x11B2
|
||||
#define CL_KERNEL_PREFERRED_WORK_GROUP_SIZE_MULTIPLE 0x11B3
|
||||
#define CL_KERNEL_PRIVATE_MEM_SIZE 0x11B4
|
||||
#define CL_KERNEL_GLOBAL_WORK_SIZE 0x11B5
|
||||
|
||||
/* cl_event_info */
|
||||
#define CL_EVENT_COMMAND_QUEUE 0x11D0
|
||||
#define CL_EVENT_COMMAND_TYPE 0x11D1
|
||||
#define CL_EVENT_REFERENCE_COUNT 0x11D2
|
||||
#define CL_EVENT_COMMAND_EXECUTION_STATUS 0x11D3
|
||||
#define CL_EVENT_CONTEXT 0x11D4
|
||||
|
||||
/* cl_command_type */
|
||||
#define CL_COMMAND_NDRANGE_KERNEL 0x11F0
|
||||
|
@ -392,13 +540,24 @@ typedef struct _cl_image_format {
|
|||
#define CL_COMMAND_MARKER 0x11FE
|
||||
#define CL_COMMAND_ACQUIRE_GL_OBJECTS 0x11FF
|
||||
#define CL_COMMAND_RELEASE_GL_OBJECTS 0x1200
|
||||
#define CL_COMMAND_READ_BUFFER_RECT 0x1201
|
||||
#define CL_COMMAND_WRITE_BUFFER_RECT 0x1202
|
||||
#define CL_COMMAND_COPY_BUFFER_RECT 0x1203
|
||||
#define CL_COMMAND_USER 0x1204
|
||||
#define CL_COMMAND_BARRIER 0x1205
|
||||
#define CL_COMMAND_MIGRATE_MEM_OBJECTS 0x1206
|
||||
#define CL_COMMAND_FILL_BUFFER 0x1207
|
||||
#define CL_COMMAND_FILL_IMAGE 0x1208
|
||||
|
||||
/* command execution status */
|
||||
#define CL_COMPLETE 0x0
|
||||
#define CL_RUNNING 0x1
|
||||
#define CL_SUBMITTED 0x2
|
||||
#define CL_QUEUED 0x3
|
||||
|
||||
|
||||
/* cl_buffer_create_type */
|
||||
#define CL_BUFFER_CREATE_TYPE_REGION 0x1220
|
||||
|
||||
/* cl_profiling_info */
|
||||
#define CL_PROFILING_COMMAND_QUEUED 0x1280
|
||||
#define CL_PROFILING_COMMAND_SUBMIT 0x1281
|
||||
|
@ -434,22 +593,35 @@ clGetDeviceInfo(cl_device_id /* device */,
|
|||
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
|
||||
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;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseDevice(cl_device_id /* device */) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
/* Context APIs */
|
||||
extern CL_API_ENTRY cl_context CL_API_CALL
|
||||
clCreateContext(const cl_context_properties * /* properties */,
|
||||
cl_uint /* num_devices */,
|
||||
const cl_device_id * /* devices */,
|
||||
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;
|
||||
void * /* user_data */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_context CL_API_CALL
|
||||
clCreateContextFromType(const cl_context_properties * /* properties */,
|
||||
cl_device_type /* device_type */,
|
||||
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;
|
||||
void * /* user_data */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainContext(cl_context /* context */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -484,13 +656,7 @@ clGetCommandQueueInfo(cl_command_queue /* command_queue */,
|
|||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetCommandQueueProperty(cl_command_queue /* command_queue */,
|
||||
cl_command_queue_properties /* properties */,
|
||||
cl_bool /* enable */,
|
||||
cl_command_queue_properties * /* old_properties */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Memory Object APIs */
|
||||
/* Memory Object APIs */
|
||||
extern CL_API_ENTRY cl_mem CL_API_CALL
|
||||
clCreateBuffer(cl_context /* context */,
|
||||
cl_mem_flags /* flags */,
|
||||
|
@ -499,26 +665,19 @@ clCreateBuffer(cl_context /* context */,
|
|||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY 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 */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
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;
|
||||
|
||||
extern CL_API_ENTRY 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 */) CL_API_SUFFIX__VERSION_1_0;
|
||||
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;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainMemObject(cl_mem /* memobj */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -548,7 +707,12 @@ clGetImageInfo(cl_mem /* image */,
|
|||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Sampler APIs */
|
||||
extern CL_API_ENTRY 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;
|
||||
|
||||
/* Sampler APIs */
|
||||
extern CL_API_ENTRY cl_sampler CL_API_CALL
|
||||
clCreateSampler(cl_context /* context */,
|
||||
cl_bool /* normalized_coords */,
|
||||
|
@ -586,6 +750,13 @@ clCreateProgramWithBinary(cl_context /* context */,
|
|||
cl_int * /* binary_status */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY 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;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainProgram(cl_program /* program */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
|
@ -601,7 +772,30 @@ clBuildProgram(cl_program /* program */,
|
|||
void * /* user_data */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clUnloadCompiler(void) CL_API_SUFFIX__VERSION_1_0;
|
||||
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;
|
||||
|
||||
extern CL_API_ENTRY 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;
|
||||
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clUnloadPlatformCompiler(cl_platform_id /* platform */) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetProgramInfo(cl_program /* program */,
|
||||
|
@ -649,6 +843,14 @@ clGetKernelInfo(cl_kernel /* kernel */,
|
|||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY 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;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetKernelWorkGroupInfo(cl_kernel /* kernel */,
|
||||
cl_device_id /* device */,
|
||||
|
@ -657,7 +859,7 @@ clGetKernelWorkGroupInfo(cl_kernel /* kernel */,
|
|||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Event Object APIs */
|
||||
/* Event Object APIs */
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clWaitForEvents(cl_uint /* num_events */,
|
||||
const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
@ -669,13 +871,27 @@ clGetEventInfo(cl_event /* event */,
|
|||
void * /* param_value */,
|
||||
size_t * /* param_value_size_ret */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_event CL_API_CALL
|
||||
clCreateUserEvent(cl_context /* context */,
|
||||
cl_int * /* errcode_ret */) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clRetainEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clReleaseEvent(cl_event /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Profiling APIs */
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clSetUserEventStatus(cl_event /* event */,
|
||||
cl_int /* execution_status */) CL_API_SUFFIX__VERSION_1_1;
|
||||
|
||||
extern CL_API_ENTRY 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;
|
||||
|
||||
/* Profiling APIs */
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clGetEventProfilingInfo(cl_event /* event */,
|
||||
cl_profiling_info /* param_name */,
|
||||
|
@ -696,34 +912,92 @@ clEnqueueReadBuffer(cl_command_queue /* command_queue */,
|
|||
cl_mem /* buffer */,
|
||||
cl_bool /* blocking_read */,
|
||||
size_t /* offset */,
|
||||
size_t /* cb */,
|
||||
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;
|
||||
|
||||
extern CL_API_ENTRY 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;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueWriteBuffer(cl_command_queue /* command_queue */,
|
||||
cl_mem /* buffer */,
|
||||
cl_bool /* blocking_write */,
|
||||
size_t /* offset */,
|
||||
size_t /* cb */,
|
||||
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;
|
||||
|
||||
extern CL_API_ENTRY 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;
|
||||
|
||||
extern CL_API_ENTRY 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;
|
||||
|
||||
extern CL_API_ENTRY 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 /* cb */,
|
||||
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;
|
||||
|
||||
extern CL_API_ENTRY 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;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueReadImage(cl_command_queue /* command_queue */,
|
||||
cl_mem /* image */,
|
||||
|
@ -750,6 +1024,16 @@ clEnqueueWriteImage(cl_command_queue /* command_queue */,
|
|||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueFillImage(cl_command_queue /* command_queue */,
|
||||
cl_mem /* image */,
|
||||
const void * /* fill_color */,
|
||||
const size_t * /* origin[3] */,
|
||||
const size_t * /* region[3] */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueCopyImage(cl_command_queue /* command_queue */,
|
||||
cl_mem /* src_image */,
|
||||
|
@ -789,7 +1073,7 @@ clEnqueueMapBuffer(cl_command_queue /* command_queue */,
|
|||
cl_bool /* blocking_map */,
|
||||
cl_map_flags /* map_flags */,
|
||||
size_t /* offset */,
|
||||
size_t /* cb */,
|
||||
size_t /* size */,
|
||||
cl_uint /* num_events_in_wait_list */,
|
||||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */,
|
||||
|
@ -817,6 +1101,15 @@ clEnqueueUnmapMemObject(cl_command_queue /* command_queue */,
|
|||
const cl_event * /* event_wait_list */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY 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;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueNDRangeKernel(cl_command_queue /* command_queue */,
|
||||
cl_kernel /* kernel */,
|
||||
|
@ -837,7 +1130,7 @@ clEnqueueTask(cl_command_queue /* command_queue */,
|
|||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueNativeKernel(cl_command_queue /* command_queue */,
|
||||
void (*user_func)(void *),
|
||||
void (CL_CALLBACK * /*user_func*/)(void *),
|
||||
void * /* args */,
|
||||
size_t /* cb_args */,
|
||||
cl_uint /* num_mem_objects */,
|
||||
|
@ -848,16 +1141,17 @@ clEnqueueNativeKernel(cl_command_queue /* command_queue */,
|
|||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueMarker(cl_command_queue /* command_queue */,
|
||||
cl_event * /* event */) CL_API_SUFFIX__VERSION_1_0;
|
||||
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;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueWaitForEvents(cl_command_queue /* command_queue */,
|
||||
cl_uint /* num_events */,
|
||||
const cl_event * /* event_list */) CL_API_SUFFIX__VERSION_1_0;
|
||||
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;
|
||||
|
||||
extern CL_API_ENTRY cl_int CL_API_CALL
|
||||
clEnqueueBarrier(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_0;
|
||||
|
||||
/* Extension function access
|
||||
*
|
||||
|
@ -866,7 +1160,51 @@ clEnqueueBarrier(cl_command_queue /* command_queue */) CL_API_SUFFIX__VERSION_1_
|
|||
* check to make sure the address is not NULL, before using or
|
||||
* calling the returned function address.
|
||||
*/
|
||||
extern CL_API_ENTRY void * CL_API_CALL clGetExtensionFunctionAddress(const char * /* func_name */) CL_API_SUFFIX__VERSION_1_0;
|
||||
extern CL_API_ENTRY void * CL_API_CALL
|
||||
clGetExtensionFunctionAddressForPlatform(cl_platform_id /* platform */,
|
||||
const char * /* func_name */) CL_API_SUFFIX__VERSION_1_2;
|
||||
|
||||
|
||||
// Deprecated OpenCL 1.1 APIs
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED 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 */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED 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 */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
|
||||
clEnqueueMarker(cl_command_queue /* command_queue */,
|
||||
cl_event * /* event */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
|
||||
clEnqueueWaitForEvents(cl_command_queue /* command_queue */,
|
||||
cl_uint /* num_events */,
|
||||
const cl_event * /* event_list */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
|
||||
clEnqueueBarrier(cl_command_queue /* command_queue */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED cl_int CL_API_CALL
|
||||
clUnloadCompiler(void) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
extern CL_API_ENTRY CL_EXT_PREFIX__VERSION_1_1_DEPRECATED void * CL_API_CALL
|
||||
clGetExtensionFunctionAddress(const char * /* func_name */) CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2012 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
|
||||
|
|
@ -0,0 +1,126 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2012 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
|
||||
|
||||
/******************************************************************************/
|
||||
|
||||
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
|
||||
|
|
@ -0,0 +1,127 @@
|
|||
/**********************************************************************************
|
||||
* Copyright (c) 2008-2012 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_DX9_MEDIA_SHARING_H
|
||||
#define __OPENCL_CL_DX9_MEDIA_SHARING_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;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif // __OPENCL_CL_DX9_MEDIA_SHARING_H
|
||||
|
|
@ -0,0 +1,251 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008 - 2012 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 0x200E
|
||||
|
||||
|
||||
/**************************************
|
||||
* cl_khr_terminate_context extension *
|
||||
**************************************/
|
||||
|
||||
#define CL_DEVICE_TERMINATE_CAPABILITY_KHR 0x200F
|
||||
#define CL_CONTEXT_TERMINATE_KHR 0x2010
|
||||
|
||||
#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
|
||||
*/
|
||||
|
||||
/******************************************
|
||||
* 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
|
||||
|
||||
#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_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)
|
||||
|
||||
|
||||
|
||||
#endif /* CL_VERSION_1_1 */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __CL_EXT_H */
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue