From 63ba78b6642b2cf617b4d7c9970a47b7038f492d Mon Sep 17 00:00:00 2001 From: Gregory Hainaut Date: Sat, 13 Dec 2014 12:24:41 +0100 Subject: [PATCH] remove zzogl-pg-cg superseeded by zzogl-pg --- cmake/SelectPcsx2Plugins.cmake | 11 +- debian-packager/create_built_tarball.sh | 2 +- old_plugins_2013.sln | 2 - plugins/CMakeLists.txt | 5 - plugins/zzogl-pg-cg/opengl/CMakeLists.txt | 174 - plugins/zzogl-pg-cg/opengl/CRC.h | 408 - plugins/zzogl-pg-cg/opengl/GLWin.h | 89 - plugins/zzogl-pg-cg/opengl/GLWin32.cpp | 400 - plugins/zzogl-pg-cg/opengl/GLWinX11.cpp | 478 - plugins/zzogl-pg-cg/opengl/GS.h | 987 - plugins/zzogl-pg-cg/opengl/GSDump.cpp | 97 - plugins/zzogl-pg-cg/opengl/GSDump.h | 65 - plugins/zzogl-pg-cg/opengl/GSmain.cpp | 810 - plugins/zzogl-pg-cg/opengl/GifTransfer.cpp | 288 - plugins/zzogl-pg-cg/opengl/GifTransfer.h | 134 - plugins/zzogl-pg-cg/opengl/HostMemory.cpp | 578 - plugins/zzogl-pg-cg/opengl/HostMemory.h | 114 - plugins/zzogl-pg-cg/opengl/Linux/Conf.cpp | 121 - plugins/zzogl-pg-cg/opengl/Linux/Linux.cpp | 519 - plugins/zzogl-pg-cg/opengl/Linux/Linux.h | 31 - plugins/zzogl-pg-cg/opengl/Mem.cpp | 384 - plugins/zzogl-pg-cg/opengl/Mem.h | 531 - plugins/zzogl-pg-cg/opengl/Mem_Swizzle.cpp | 756 - plugins/zzogl-pg-cg/opengl/Mem_Swizzle.h | 63 - plugins/zzogl-pg-cg/opengl/Mem_Tables.cpp | 420 - plugins/zzogl-pg-cg/opengl/Mem_Transmit.h | 319 - plugins/zzogl-pg-cg/opengl/NewRegs.cpp | 1144 - plugins/zzogl-pg-cg/opengl/NewRegs.h | 973 - plugins/zzogl-pg-cg/opengl/Profile.cpp | 266 - plugins/zzogl-pg-cg/opengl/Profile.h | 172 - plugins/zzogl-pg-cg/opengl/README.txt | 13 - plugins/zzogl-pg-cg/opengl/Regs.cpp | 1080 - plugins/zzogl-pg-cg/opengl/Regs.h | 964 - plugins/zzogl-pg-cg/opengl/Util.h | 278 - plugins/zzogl-pg-cg/opengl/Win32/Conf.cpp | 115 - plugins/zzogl-pg-cg/opengl/Win32/Win32.cpp | 325 - plugins/zzogl-pg-cg/opengl/Win32/Win32.h | 9 - plugins/zzogl-pg-cg/opengl/Win32/aviUtil.h | 488 - plugins/zzogl-pg-cg/opengl/Win32/ps2hw.dat | Bin 108445 -> 0 bytes plugins/zzogl-pg-cg/opengl/Win32/resource.h | 50 - plugins/zzogl-pg-cg/opengl/Win32/resrc1.h | 88 - .../opengl/Win32/tsvnrev/svnrev_template.h | 18 - .../opengl/Win32/tsvnrev/svnrev_unknown.h | 23 - .../opengl/Win32/tsvnrev/updateRevision.cmd | 8 - plugins/zzogl-pg-cg/opengl/Win32/wglext.h | 813 - plugins/zzogl-pg-cg/opengl/Win32/zerogs.bmp | Bin 921654 -> 0 bytes plugins/zzogl-pg-cg/opengl/Win32/zerogs.def | 38 - plugins/zzogl-pg-cg/opengl/Win32/zerogs.rc | 328 - .../opengl/Win32/zerogsogl-cg.vcxproj | 280 - .../opengl/Win32/zerogsogl-cg.vcxproj.filters | 217 - .../opengl/Win32/zerogsogl-cg_2008.sln | 42 - .../opengl/Win32/zerogsogl-cg_vs2012.vcxproj | 286 - .../Win32/zerogsogl-cg_vs2012.vcxproj.filters | 217 - .../opengl/Win32/zerogsogl-cg_vs2013.vcxproj | 286 - .../Win32/zerogsogl-cg_vs2013.vcxproj.filters | 217 - plugins/zzogl-pg-cg/opengl/ZZClut.cpp | 1083 - plugins/zzogl-pg-cg/opengl/ZZClut.h | 30 - plugins/zzogl-pg-cg/opengl/ZZGl.h | 144 - plugins/zzogl-pg-cg/opengl/ZZHacks.cpp | 186 - plugins/zzogl-pg-cg/opengl/ZZHacks.h | 118 - plugins/zzogl-pg-cg/opengl/ZZKeyboard.cpp | 247 - plugins/zzogl-pg-cg/opengl/ZZLog.cpp | 342 - plugins/zzogl-pg-cg/opengl/ZZLog.h | 201 - plugins/zzogl-pg-cg/opengl/ZZoglCRTC.cpp | 895 - plugins/zzogl-pg-cg/opengl/ZZoglCRTC.h | 97 - plugins/zzogl-pg-cg/opengl/ZZoglCreate.cpp | 881 - plugins/zzogl-pg-cg/opengl/ZZoglDrawing.cpp | 255 - plugins/zzogl-pg-cg/opengl/ZZoglDrawing.h | 67 - plugins/zzogl-pg-cg/opengl/ZZoglFlush.cpp | 2876 --- plugins/zzogl-pg-cg/opengl/ZZoglFlushHack.cpp | 531 - plugins/zzogl-pg-cg/opengl/ZZoglFlushHack.h | 84 - plugins/zzogl-pg-cg/opengl/ZZoglMath.h | 511 - plugins/zzogl-pg-cg/opengl/ZZoglSave.cpp | 175 - plugins/zzogl-pg-cg/opengl/ZZoglShaders.cpp | 890 - plugins/zzogl-pg-cg/opengl/ZZoglShaders.h | 231 - plugins/zzogl-pg-cg/opengl/ZZoglShoots.cpp | 655 - plugins/zzogl-pg-cg/opengl/ZZoglShoots.h | 35 - plugins/zzogl-pg-cg/opengl/ZZoglVB.cpp | 506 - plugins/zzogl-pg-cg/opengl/ZZoglVB.h | 158 - .../opengl/ZeroGSShaders/CMakeLists.txt | 61 - .../ZeroGSShaders/ZeroGSShaders_2005.sln | 23 - .../opengl/ZeroGSShaders/copytozerogs.bat | 1 - .../opengl/ZeroGSShaders/zerogsshaders.cpp | 362 - .../opengl/ZeroGSShaders/zerogsshaders.h | 120 - .../opengl/ZeroGSShaders/zlib/crc32.h | 441 - .../opengl/ZeroGSShaders/zlib/deflate.h | 331 - .../opengl/ZeroGSShaders/zlib/inffast.h | 11 - .../opengl/ZeroGSShaders/zlib/inffixed.h | 94 - .../opengl/ZeroGSShaders/zlib/inflate.h | 115 - .../opengl/ZeroGSShaders/zlib/inftrees.h | 55 - .../opengl/ZeroGSShaders/zlib/trees.h | 128 - .../opengl/ZeroGSShaders/zlib/zconf.h | 332 - .../opengl/ZeroGSShaders/zlib/zconf.in.h | 332 - .../opengl/ZeroGSShaders/zlib/zlib.h | 1357 -- .../opengl/ZeroGSShaders/zlib/zutil.h | 269 - .../opengl/ZeroGSShaders/zpipe.cpp | 122 - .../zzogl-pg-cg/opengl/ZeroGSShaders/zpipe.h | 26 - plugins/zzogl-pg-cg/opengl/buildshaders.bat | 3 - plugins/zzogl-pg-cg/opengl/common.h | 1164 - plugins/zzogl-pg-cg/opengl/ctx0/ps2hw_ctx.fx | 24 - plugins/zzogl-pg-cg/opengl/ctx1/ps2hw_ctx.fx | 23 - plugins/zzogl-pg-cg/opengl/glprocs.c | 17868 ---------------- plugins/zzogl-pg-cg/opengl/glprocs.h | 2217 -- plugins/zzogl-pg-cg/opengl/linux_replay.cpp | 44 - plugins/zzogl-pg-cg/opengl/ps2hw.dat | Bin 113923 -> 0 bytes plugins/zzogl-pg-cg/opengl/ps2hw.fx | 867 - plugins/zzogl-pg-cg/opengl/rasterfont.cpp | 168 - plugins/zzogl-pg-cg/opengl/rasterfont.h | 43 - plugins/zzogl-pg-cg/opengl/shaders.sh | 18 - plugins/zzogl-pg-cg/opengl/targets.cpp | 3521 --- plugins/zzogl-pg-cg/opengl/targets.h | 607 - plugins/zzogl-pg-cg/opengl/x86-32.S | 716 - plugins/zzogl-pg-cg/opengl/x86-32.asm | 652 - plugins/zzogl-pg-cg/opengl/x86.cpp | 1366 -- plugins/zzogl-pg-cg/opengl/x86.h | 174 - plugins/zzogl-pg-cg/opengl/zerogs.cpp | 442 - plugins/zzogl-pg-cg/opengl/zerogs.h | 86 - plugins/zzogl-pg-cg/opengl/zpipe.cpp | 131 - plugins/zzogl-pg-cg/opengl/zpipe.h | 26 - 119 files changed, 2 insertions(+), 62060 deletions(-) delete mode 100644 plugins/zzogl-pg-cg/opengl/CMakeLists.txt delete mode 100644 plugins/zzogl-pg-cg/opengl/CRC.h delete mode 100644 plugins/zzogl-pg-cg/opengl/GLWin.h delete mode 100644 plugins/zzogl-pg-cg/opengl/GLWin32.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/GLWinX11.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/GS.h delete mode 100644 plugins/zzogl-pg-cg/opengl/GSDump.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/GSDump.h delete mode 100644 plugins/zzogl-pg-cg/opengl/GSmain.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/GifTransfer.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/GifTransfer.h delete mode 100644 plugins/zzogl-pg-cg/opengl/HostMemory.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/HostMemory.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Linux/Conf.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/Linux/Linux.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/Linux/Linux.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Mem.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/Mem.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Mem_Swizzle.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/Mem_Swizzle.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Mem_Tables.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/Mem_Transmit.h delete mode 100644 plugins/zzogl-pg-cg/opengl/NewRegs.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/NewRegs.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Profile.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/Profile.h delete mode 100644 plugins/zzogl-pg-cg/opengl/README.txt delete mode 100644 plugins/zzogl-pg-cg/opengl/Regs.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/Regs.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Util.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/Conf.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/Win32.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/Win32.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/aviUtil.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/ps2hw.dat delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/resource.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/resrc1.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/tsvnrev/svnrev_template.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/tsvnrev/svnrev_unknown.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/tsvnrev/updateRevision.cmd delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/wglext.h delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/zerogs.bmp delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/zerogs.def delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/zerogs.rc delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg.vcxproj delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg.vcxproj.filters delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_2008.sln delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2012.vcxproj delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2012.vcxproj.filters delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2013.vcxproj delete mode 100644 plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2013.vcxproj.filters delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZClut.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZClut.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZGl.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZHacks.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZHacks.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZKeyboard.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZLog.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZLog.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglCRTC.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglCRTC.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglCreate.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglDrawing.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglDrawing.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglFlush.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglFlushHack.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglFlushHack.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglMath.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglSave.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglShaders.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglShaders.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglShoots.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglShoots.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglVB.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZZoglVB.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/CMakeLists.txt delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/ZeroGSShaders_2005.sln delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/copytozerogs.bat delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zerogsshaders.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zerogsshaders.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/crc32.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/deflate.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inffast.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inffixed.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inflate.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inftrees.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/trees.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zconf.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zconf.in.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zlib.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zutil.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zpipe.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zpipe.h delete mode 100644 plugins/zzogl-pg-cg/opengl/buildshaders.bat delete mode 100644 plugins/zzogl-pg-cg/opengl/common.h delete mode 100644 plugins/zzogl-pg-cg/opengl/ctx0/ps2hw_ctx.fx delete mode 100644 plugins/zzogl-pg-cg/opengl/ctx1/ps2hw_ctx.fx delete mode 100644 plugins/zzogl-pg-cg/opengl/glprocs.c delete mode 100644 plugins/zzogl-pg-cg/opengl/glprocs.h delete mode 100644 plugins/zzogl-pg-cg/opengl/linux_replay.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/ps2hw.dat delete mode 100644 plugins/zzogl-pg-cg/opengl/ps2hw.fx delete mode 100644 plugins/zzogl-pg-cg/opengl/rasterfont.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/rasterfont.h delete mode 100755 plugins/zzogl-pg-cg/opengl/shaders.sh delete mode 100644 plugins/zzogl-pg-cg/opengl/targets.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/targets.h delete mode 100644 plugins/zzogl-pg-cg/opengl/x86-32.S delete mode 100644 plugins/zzogl-pg-cg/opengl/x86-32.asm delete mode 100644 plugins/zzogl-pg-cg/opengl/x86.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/x86.h delete mode 100644 plugins/zzogl-pg-cg/opengl/zerogs.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/zerogs.h delete mode 100644 plugins/zzogl-pg-cg/opengl/zpipe.cpp delete mode 100644 plugins/zzogl-pg-cg/opengl/zpipe.h diff --git a/cmake/SelectPcsx2Plugins.cmake b/cmake/SelectPcsx2Plugins.cmake index 11e70f4820..268313a2e5 100644 --- a/cmake/SelectPcsx2Plugins.cmake +++ b/cmake/SelectPcsx2Plugins.cmake @@ -173,25 +173,16 @@ endif() # requires: -GLEW # -OpenGL # -X11 -# -CG (only with cg build +# -CG (only with cg build) # -JPEG # -common_libs #--------------------------------------- if((GLEW_FOUND AND OPENGL_FOUND AND X11_FOUND AND JPEG_FOUND AND common_libs) AND (CG_FOUND OR GLSL_API)) set(zzogl TRUE) - if(CG_FOUND AND NOT GLSL_API AND EXTRA_PLUGINS) - set(zzoglcg TRUE) - else() - set(zzoglcg FALSE) - endif() elseif(NOT EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg") set(zzogl FALSE) - set(zzoglcg FALSE) - set(REBUILD_SHADER FALSE) else() set(zzogl FALSE) - set(zzoglcg FALSE) - set(REBUILD_SHADER FALSE) message(STATUS "Skip build of zzogl: miss some dependencies") message(STATUS "${msg_dep_zzogl}") endif() diff --git a/debian-packager/create_built_tarball.sh b/debian-packager/create_built_tarball.sh index c364fd8d38..7ab5f9a14f 100644 --- a/debian-packager/create_built_tarball.sh +++ b/debian-packager/create_built_tarball.sh @@ -91,7 +91,7 @@ remove_not_yet_free_plugin() { echo "Remove non free plugins" # remove also deprecated plugins - for plugin in CDVDiso CDVDisoEFP CDVDlinuz CDVDolio CDVDpeops dev9ghzdrk PeopsSPU2 SSSPSXPAD USBqemu xpad zerogs zerospu2 zzogl-pg-cg + for plugin in CDVDiso CDVDisoEFP CDVDlinuz CDVDolio CDVDpeops dev9ghzdrk PeopsSPU2 SSSPSXPAD USBqemu xpad zerogs zerospu2 do rm -fr $LOCAL_REPO/plugins/$plugin done diff --git a/old_plugins_2013.sln b/old_plugins_2013.sln index 60ad4909fd..974ad30c4c 100644 --- a/old_plugins_2013.sln +++ b/old_plugins_2013.sln @@ -82,8 +82,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZZOgl", "plugins\zzogl-pg\o EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "USBqemu", "plugins\USBqemu\Win32\USBqemu_vs2013.vcxproj", "{E613DA9F-41B4-4613-9911-E418EF5533BC}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZZOgl-cg", "plugins\zzogl-pg-cg\opengl\Win32\zerogsogl-cg_vs2013.vcxproj", "{019773FA-2DAA-4C12-9511-BD2D4EB2A718}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug AVX|Win32 = Debug AVX|Win32 diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 5abea77ab7..7fff99f288 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -116,11 +116,6 @@ if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg" AND zzogl) add_subdirectory(zzogl-pg/opengl) endif(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg" AND zzogl) -# make zzogl-pg -if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg-cg" AND zzoglcg AND EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg" AND zzogl) - add_subdirectory(zzogl-pg-cg/opengl) -endif(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg-cg" AND zzoglcg AND EXISTS "${CMAKE_SOURCE_DIR}/plugins/zzogl-pg" AND zzogl) - # make zeropad if(EXISTS "${CMAKE_SOURCE_DIR}/plugins/zeropad" AND zeropad) add_subdirectory(zeropad) diff --git a/plugins/zzogl-pg-cg/opengl/CMakeLists.txt b/plugins/zzogl-pg-cg/opengl/CMakeLists.txt deleted file mode 100644 index b4df9f30b0..0000000000 --- a/plugins/zzogl-pg-cg/opengl/CMakeLists.txt +++ /dev/null @@ -1,174 +0,0 @@ -# Check that people use the good file -if(NOT TOP_CMAKE_WAS_SOURCED) - message(FATAL_ERROR " - You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. - It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") -endif(NOT TOP_CMAKE_WAS_SOURCED) - -# plugin name -set(Output zzogl-cg-0.3.0) - -set(CommonFlags - -pthread - -DZEROGS_SSE2 - -fno-regmove - -fno-strict-aliasing - -Wstrict-aliasing # Allow to track strict aliasing issue. - -Wunused-variable - ) - -set(OptimizationFlags - -O2 - -DNDEBUG - ) - -# Debug - Build -if(CMAKE_BUILD_TYPE STREQUAL Debug) - # add defines - set(zzoglFinalFlags - ${CommonFlags} -g -Wall -D_DEBUG - ) -endif(CMAKE_BUILD_TYPE STREQUAL Debug) - -# Devel - Build -if(CMAKE_BUILD_TYPE STREQUAL Devel) - # add defines - set(zzoglFinalFlags - ${CommonFlags} ${OptimizationFlags} -g -W -DZEROGS_DEVBUILD - ) -endif(CMAKE_BUILD_TYPE STREQUAL Devel) - -# Release - Build -if(CMAKE_BUILD_TYPE STREQUAL Release) - # add defines - set(zzoglFinalFlags - ${CommonFlags} ${OptimizationFlags} -W - ) -endif(CMAKE_BUILD_TYPE STREQUAL Release) - -# zzogl sources -set(zzoglSources - GifTransfer.cpp - GLWin32.cpp - GLWinX11.cpp - GSDump.cpp - GSmain.cpp - HostMemory.cpp - Mem.cpp - Mem_Swizzle.cpp - Mem_Tables.cpp - Profile.cpp - rasterfont.cpp - NewRegs.cpp - Regs.cpp - targets.cpp - x86.cpp - zerogs.cpp - zpipe.cpp - ZZClut.cpp - ZZHacks.cpp - ZZKeyboard.cpp - ZZoglDrawing.cpp - ZZLog.cpp - ZZoglCreate.cpp - ZZoglCRTC.cpp - ZZoglFlush.cpp - ZZoglFlushHack.cpp - ZZoglSave.cpp - ZZoglShaders.cpp - ZZoglShoots.cpp - ZZoglVB.cpp - ) - -# zzogl headers -set(zzoglHeaders - common.h - CRC.h - GifTransfer.h - # glprocs.h - GS.h - GSDump.h - HostMemory.h - Mem.h - Mem_Swizzle.h - Mem_Transmit.h - Profile.h - rasterfont.h - NewRegs.h - Regs.h - targets.h - Util.h - x86.h - zerogs.h - zpipe.h - ZZClut.h - ZZGl.h - ZZHacks.h - ZZoglDrawing.h - ZZLog.h - ZZoglCRTC.h - ZZoglMath.h - ZZoglShaders.h - ZZoglShoots.h - ZZoglVB.h - ) - -# zzogl S sources -set(zzoglSSources - x86-32.S) - -# zzogl shader sources -set(zzoglShaderSources - ctx0/ps2hw_ctx.fx - ctx1/ps2hw_ctx.fx) - -# zzogl Linux sources -set(zzoglLinuxSources - Linux/Conf.cpp - Linux/Linux.cpp) - -# zzogl Linux headers -set(zzoglLinuxHeaders - Linux/Linux.h) - -set(zzoglFinalSources - ${zzoglSources} - ${zzoglHeaders} - ${zzoglSSources} - ${zzoglShaderSources} - ${zzoglLinuxSources} - ${zzoglLinuxHeaders} -) - -set(zzoglFinalLibs - Utilities - ${CG_LIBRARIES} - ${GLEW_LIBRARY} - ${OPENGL_LIBRARIES} - ${X11_LIBRARIES} - ${JPEG_LIBRARIES} - ${GTK2_LIBRARIES} - ${ZLIB_LIBRARIES} - ${LIBC_LIBRARIES} -) - -# change language of .S-files to c++ -set_source_files_properties(${zzoglSSources} PROPERTIES LANGUAGE CXX) - -# add additional include directories -include_directories(Linux) - -add_pcsx2_plugin(${Output} "${zzoglFinalSources}" "${zzoglFinalLibs}" "${zzoglFinalFlags}") - -# Trick that allow to compile zzogl with GSOPEN2 and the replayer with GSOPEN -set_target_properties(${Output} PROPERTIES COMPILE_DEFINITIONS USE_GSOPEN2) - -################################### Replay Loader -if(BUILD_REPLAY_LOADERS) - set(Replay pcsx2_ZZCGReplayLoader) - set(zzoglReplayLoaderFinalSources - ${zzoglFinalSources} - linux_replay.cpp - ) - add_pcsx2_executable(${Replay} "${zzoglReplayLoaderFinalSources}" "${zzoglFinalLibs}" "${zzoglFinalFlags}") -endif(BUILD_REPLAY_LOADERS) diff --git a/plugins/zzogl-pg-cg/opengl/CRC.h b/plugins/zzogl-pg-cg/opengl/CRC.h deleted file mode 100644 index 207e2faa33..0000000000 --- a/plugins/zzogl-pg-cg/opengl/CRC.h +++ /dev/null @@ -1,408 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef CRC_H_INCLUDED -#define CRC_H_INCLUDED - -#include "ZZHacks.h" - -// CRC Information -enum Title_Info -{ - Unknown_Title, - MetalSlug6, - TomoyoAfter, - Clannad, - Lamune, - KyuuketsuKitanMoonties, - PiaCarroteYoukosoGPGakuenPrincess, - KazokuKeikakuKokoroNoKizuna, - DuelSaviorDestiny, - FFX, - FFX2, - FFXII, - ShadowHearts, - Okami, - MetalGearSolid3, - DBZBT2, - DBZBT3, - SFEX3, - Bully, - BullyCC, - SoTC, - OnePieceGrandAdventure, - OnePieceGrandBattle, - ICO, - GT4, - WildArms4, - WildArms5, - Manhunt2, - CrashBandicootWoC, - ResidentEvil4, - Spartan, - AceCombat4, - Drakengard2, - Tekken5, - IkkiTousen, - GodOfWar, - GodOfWar2, - JackieChanAdv, - HarvestMoon, - NamcoXCapcom, - GiTS, - Onimusha3, - MajokkoALaMode2, - TalesOfAbyss, - SonicUnleashed, - SimpsonsGame, - Genji, - StarOcean3, - ValkyrieProfile2, - RadiataStories, - SMTNocturne, - SMTDDS1, - SMTDDS2, - RozenMaidenGebetGarden, - Xenosaga, - Espgaluda, - OkageShadowKing, - ShadowTheHedgehog, - AtelierIris1, - AtelierIris2, - AtelierIris3, - AtelierJudie, - AtelierLilie, - AtelierViorate, - ArTonelico1, - ArTonelico2, - ManaKhemia1, - ManaKhemia2, - DarkCloud1, - DarkCloud2, - GhostInTheShell, - TitleCount, - Disgaea, - Disgaea2, - Gradius, - KingdomHearts, - KingdomHeartsFM, - KingdomHearts2, - KingdomHearts2FM, - KingdomHeartsCOM, - Tekken4, - Kaena, - Sims_The_Urbz, - MarvelxCapcom2, - NeoPets_Darkest_Faerie, - CrashnBurn, - Xenosaga2, - HauntingGround, - NightmareBeforeChristmas, - PowershotPinball, - BioHazard4, - NUMBER_OF_TITLES -}; - -enum Region_Info -{ - Unknown_Region, - US, - EU, - JP, - JPUNDUB, - RU, - FR, - DE, - IT, - ES, - ASIA, - RegionCount, -}; - -struct Game_Info -{ - u32 crc; - Title_Info title; - Region_Info region; - u32 flags; - s32 v_thresh, t_thresh; -}; - -static const Game_Info crc_game_list[] = -{ - // This section is straight from GSdx. Ones that also have ZZOgl hacks are commented out. - - {0x00000000, Unknown_Title, Unknown_Region, 0, -1, -1}, - {0x2113EA2E, MetalSlug6, Unknown_Region, 0, -1, -1}, - {0x42E05BAF, TomoyoAfter, JP, 0, -1, -1}, - {0x7800DC84, Clannad, JP, 0, -1, -1}, - {0xA6167B59, Lamune, JP, 0, -1, -1}, - {0xDDB59F46, KyuuketsuKitanMoonties, JP, 0, -1, -1}, - {0xC8EE2562, PiaCarroteYoukosoGPGakuenPrincess, JP, 0, -1, -1}, - {0x6CF94A43, KazokuKeikakuKokoroNoKizuna, JP, 0, -1, -1}, - {0xEDAF602D, DuelSaviorDestiny, JP, 0, -1, -1}, - {0xa39517ab, FFX, EU, 0, -1, -1}, - {0xa39517ae, FFX, FR, 0, -1, -1}, - {0x941bb7d9, FFX, DE, 0, -1, -1}, - {0xa39517a9, FFX, IT, 0, -1, -1}, - {0x941bb7de, FFX, ES, 0, -1, -1}, - {0xb4414ea1, FFX, RU, 0, -1, -1}, - {0xee97db5b, FFX, RU, 0, -1, -1}, - {0xaec495cc, FFX, RU, 0, -1, -1}, - {0xbb3d833a, FFX, US, 0, -1, -1}, - {0x6a4efe60, FFX, JP, 0, -1, -1}, - {0x3866ca7e, FFX, ASIA, 0, -1, -1}, // int. - {0x658597e2, FFX, JP, 0, -1, -1}, // int. - {0x9aac5309, FFX2, EU, 0, -1, -1}, - {0x9aac530c, FFX2, FR, 0, -1, -1}, - {0x9aac530a, FFX2, FR, 0, -1, -1}, // ? - {0x9aac530d, FFX2, DE, 0, -1, -1}, - {0x9aac530b, FFX2, IT, 0, -1, -1}, - {0x48fe0c71, FFX2, US, 0, -1, -1}, - {0xe1fd9a2d, FFX2, JP, 0, -1, -1}, // int. - {0x78da0252, FFXII, EU, 0, -1, -1}, - {0xc1274668, FFXII, EU, 0, -1, -1}, - {0xdc2a467e, FFXII, EU, 0, -1, -1}, - {0xca284668, FFXII, EU, 0, -1, -1}, - {0x280AD120, FFXII, JP, 0, -1, -1}, - {0x08C1ED4D, HauntingGround, Unknown_Region, 0, -1, -1}, - {0x2CD5794C, HauntingGround, EU, 0, -1, -1}, - {0x867BB945, HauntingGround, JP, 0, -1, -1}, - {0xE263BC4B, HauntingGround, JP, 0, -1, -1}, - {0x901AAC09, HauntingGround, US, 0, -1, -1}, - {0x8BE3D7B2, ShadowHearts, Unknown_Region, 0, -1, -1}, - {0xDEFA4763, ShadowHearts, US, 0, -1, -1}, - //{0x21068223, Okami, US, 0, -1, -1}, - //{0x891f223f, Okami, FR, 0, -1, -1}, - //{0xC5DEFEA0, Okami, JP, 0, -1, -1}, - {0x053D2239, MetalGearSolid3, US, 0, -1, -1}, - {0x086273D2, MetalGearSolid3, FR, 0, -1, -1}, - {0x26A6E286, MetalGearSolid3, EU, 0, -1, -1}, - {0xAA31B5BF, MetalGearSolid3, Unknown_Region, 0, -1, -1}, - {0x9F185CE1, MetalGearSolid3, Unknown_Region, 0, -1, -1}, - {0x98D4BC93, MetalGearSolid3, EU, 0, -1, -1}, - {0x86BC3040, MetalGearSolid3, US, 0, -1, -1}, //Subsistance disc 1 - {0x0481AD8A, MetalGearSolid3, JP, 0, -1, -1}, - {0x79ED26AD, MetalGearSolid3, EU, 0, -1, -1}, - {0x5E31EA42, MetalGearSolid3, EU, 0, -1, -1}, - {0xD7ED797D, MetalGearSolid3, EU, 0, -1, -1}, - {0x278722BF, DBZBT2, US, 0, -1, -1}, - {0xFE961D28, DBZBT2, US, 0, -1, -1}, - {0x0393B6BE, DBZBT2, EU, 0, -1, -1}, - {0xE2F289ED, DBZBT2, JP, 0, -1, -1}, // Sparking Neo! - {0x35AA84D1, DBZBT2, Unknown_Region, 0, -1, -1}, - {0x428113C2, DBZBT3, US, 0, -1, -1}, - {0xA422BB13, DBZBT3, EU, 0, -1, -1}, - {0x983C53D2, DBZBT3, Unknown_Region, 0, -1, -1}, - {0x983C53D3, DBZBT3, Unknown_Region, 0, -1, -1}, - {0x72B3802A, SFEX3, US, 0, -1, -1}, - {0x71521863, SFEX3, US, 0, -1, -1}, - {0x28703748, Bully, US, 0, -1, -1}, - {0xC78A495D, BullyCC, US, 0, -1, -1}, - {0xC19A374E, SoTC, US, 0, -1, -1}, - {0x7D8F539A, SoTC, EU, 0, -1, -1}, - {0x3122B508, OnePieceGrandAdventure, US, 0, -1, -1}, - {0x8DF14A24, OnePieceGrandAdventure, EU, 0, -1, -1}, - {0xB049DD5E, OnePieceGrandBattle, US, 0, -1, -1}, - {0x5D02CC5B, OnePieceGrandBattle, Unknown_Region, 0, -1, -1}, - {0x6F8545DB, ICO, US, 0, -1, -1}, - {0xB01A4C95, ICO, JP, 0, -1, -1}, - {0x5C991F4E, ICO, Unknown_Region, 0, -1, -1}, - // FIXME multiple CRC - {0x7ACF7E03, ICO, Unknown_Region, 0, -1, -1}, - {0xAEAD1CA3, GT4, JP, 0, -1, -1}, - {0x44A61C8F, GT4, Unknown_Region, 0, -1, -1}, - {0x0086E35B, GT4, Unknown_Region, 0, -1, -1}, - {0x77E61C8A, GT4, Unknown_Region, 0, -1, -1}, - {0xC164550A, WildArms5, JPUNDUB, 0, -1, -1}, - {0xC1640D2C, WildArms5, US, 0, -1, -1}, - {0x0FCF8FE4, WildArms5, EU, 0, -1, -1}, - {0x2294D322, WildArms5, JP, 0, -1, -1}, - {0x565B6170, WildArms5, JP, 0, -1, -1}, - {0xBBC3EFFA, WildArms4, US, 0, -1, -1}, - {0xBBC396EC, WildArms4, US, 0, -1, -1}, //hmm such a small diff in the CRC.. - {0x8B029334, Manhunt2, Unknown_Region, 0, -1, -1}, - {0x09F49E37, CrashBandicootWoC, Unknown_Region, 0, -1, -1}, - {0x013E349D, ResidentEvil4, US, 0, -1, -1}, - {0x6BA2F6B9, ResidentEvil4, Unknown_Region, 0, -1, -1}, - {0x60FA8C69, ResidentEvil4, JP, 0, -1, -1}, - {0x72E1E60E, Spartan, Unknown_Region, 0, -1, -1}, - {0x5ED8FB53, AceCombat4, JP, 0, -1, -1}, - {0x1B9B7563, AceCombat4, Unknown_Region, 0, -1, -1}, - {0xEC432B24, Drakengard2, Unknown_Region, 0, -1, -1}, - {0xFC46EA61, Tekken5, JP, 0, -1, -1}, - {0x1F88EE37, Tekken5, Unknown_Region, 0, -1, -1}, - {0x652050D2, Tekken5, Unknown_Region, 0, -1, -1}, - {0x9E98B8AE, IkkiTousen, JP, 0, -1, -1}, - //{0xD6385328, GodOfWar, US, 0, -1, -1}, - //{0xFB0E6D72, GodOfWar, EU, 0, -1, -1}, - //{0xEB001875, GodOfWar, EU, 0, -1, -1}, - //{0xA61A4C6D, GodOfWar, Unknown_Region, 0, -1, -1}, - //{0xE23D532B, GodOfWar, Unknown_Region, 0, -1, -1}, - //{0xDF1AF973, GodOfWar, Unknown_Region, 0, -1, -1}, - //{0xD6385328, GodOfWar, Unknown_Region, 0, -1, -1}, - {0x2F123FD8, GodOfWar2, RU, 0, -1, -1}, - {0x2F123FD8, GodOfWar2, US, 0, -1, -1}, - {0x44A8A22A, GodOfWar2, EU, 0, -1, -1}, - {0x4340C7C6, GodOfWar2, Unknown_Region, 0, -1, -1}, - {0xF8CD3DF6, GodOfWar2, Unknown_Region, 0, -1, -1}, - {0x0B82BFF7, GodOfWar2, Unknown_Region, 0, -1, -1}, - {0x5D482F18, JackieChanAdv, Unknown_Region, 0, -1, -1}, - //{0xf0a6d880, HarvestMoon, US, 0, -1, -1}, - {0x75c01a04, NamcoXCapcom, US, 0, -1, -1}, - {0xBF6F101F, GiTS, US, 0, -1, -1}, - {0xA5768F53, GiTS, JP, 0, -1, -1}, - {0x6BF11378, Onimusha3, US, 0, -1, -1}, - {0xF442260C, MajokkoALaMode2, JP, 0, -1, -1}, - {0x14FE77F7, TalesOfAbyss, US, 0, -1, -1}, - {0x045D77E9, TalesOfAbyss, JPUNDUB, 0, -1, -1}, - {0xAA5EC3A3, TalesOfAbyss, JP, 0, -1, -1}, - //{0xFB236A46, SonicUnleashed, US, 0, -1, -1}, - {0x4C7BB3C8, SimpsonsGame, Unknown_Region, 0, -1, -1}, - {0x4C94B32C, SimpsonsGame, Unknown_Region, 0, -1, -1}, - {0xD71B57F4, Genji, Unknown_Region, 0, -1, -1}, - {0x23A97857, StarOcean3, US, 0, -1, -1}, - {0xBEC32D49, StarOcean3, JP, 0, -1, -1}, - {0x8192A241, StarOcean3, JP, 0, -1, -1}, //NTSC JP special directors cut limited extra sugar on top edition (the special one :p) - {0x23A97857, StarOcean3, JPUNDUB, 0, -1, -1}, - {0xCC96CE93, ValkyrieProfile2, US, 0, -1, -1}, - {0x774DE8E2, ValkyrieProfile2, JP, 0, -1, -1}, - {0x04CCB600, ValkyrieProfile2, EU, 0, -1, -1}, - {0xB65E141B, ValkyrieProfile2, EU, 0, -1, -1}, // PAL German - {0x47B9B2FD, RadiataStories, US, 0, -1, -1}, - {0xE8FCF8EC, SMTNocturne, US, 0, -1, -1}, // GSdx saves/reloads z buffer around shadow drawing, same issue with all the SMT games following - {0xF0A31EE3, SMTNocturne, EU, 0, -1, -1}, // SMTNocturne (Lucifers Call in EU) - {0xAE0DE7B7, SMTNocturne, EU, 0, -1, -1}, // SMTNocturne (Lucifers Call in EU) - {0xD60DA6D4, SMTNocturne, JP, 0, -1, -1}, // SMTNocturne - {0x0e762e8d, SMTNocturne, JP, 0, -1, -1}, // SMTNocturne Maniacs - {0x47BA9034, SMTNocturne, JP, 0, -1, -1}, // SMTNocturne Maniacs Chronicle - {0xD7273511, SMTDDS1, US, 0, -1, -1}, // SMT Digital Devil Saga - {0x1683A6BE, SMTDDS1, EU, 0, -1, -1}, // SMT Digital Devil Saga - {0x44865CE1, SMTDDS1, JP, 0, -1, -1}, // SMT Digital Devil Saga - {0xD382C164, SMTDDS2, US, 0, -1, -1}, // SMT Digital Devil Saga 2 - {0xD568B684, SMTDDS2, EU, 0, -1, -1}, // SMT Digital Devil Saga 2 - {0xE47C1A9C, SMTDDS2, JP, 0, -1, -1}, // SMT Digital Devil Saga 2 - {0x0B8AB37B, RozenMaidenGebetGarden, JP, 0, -1, -1}, - - // And these are here for ZZogl hacks. - {0xA3D63039, Xenosaga, JP, GAME_DOPARALLELCTX, 64, 32}, - {0x0E7807B2, Xenosaga, US, GAME_DOPARALLELCTX, 64, 32}, - {0x7D2FE035, Espgaluda, JP, 0/*GAME_BIGVALIDATE*/, 24, -1}, - {0x21068223, Okami, US, GAME_XENOSPECHACK, -1, -1}, - {0x891f223f, Okami, FR, GAME_XENOSPECHACK, -1, -1}, - {0xC5DEFEA0, Okami, JP, GAME_XENOSPECHACK, -1, -1}, - {0xe0426fc6, OkageShadowKing, Unknown_Region, GAME_XENOSPECHACK, -1, -1}, - - {0xD6385328, GodOfWar, US, GAME_FULL16BITRES, -1, -1}, - {0xFB0E6D72, GodOfWar, EU, GAME_FULL16BITRES, -1, -1}, - {0xEB001875, GodOfWar, EU, GAME_FULL16BITRES, -1, -1}, - {0xA61A4C6D, GodOfWar, Unknown_Region, GAME_FULL16BITRES, -1, -1}, - {0xE23D532B, GodOfWar, Unknown_Region, GAME_FULL16BITRES, -1, -1}, - {0xDF1AF973, GodOfWar, Unknown_Region, GAME_FULL16BITRES, -1, -1}, - {0xD6385328, GodOfWar, Unknown_Region, GAME_FULL16BITRES, -1, -1}, - - //{0x2F123FD8, GodOfWar2, Unknown_Region, GAME_FULL16BITRES, -1, -1}, - //{0x44A8A22A, GodOfWar2, Unknown_Region, GAME_FULL16BITRES, -1, -1}, - //{0x4340C7C6, GodOfWar2, Unknown_Region, GAME_FULL16BITRES, -1, -1}, - //{0xF8CD3DF6, GodOfWar2, Unknown_Region, GAME_FULL16BITRES, -1, -1}, - //{0x0B82BFF7, GodOfWar2, Unknown_Region, GAME_FULL16BITRES, -1, -1}, - - {0xF0A6D880, HarvestMoon, US, GAME_NOSTENCIL, -1, -1}, - //{0x304C115C, HarvestMoon, Unknown, GAME_NOSTENCIL, -1, -1}, - {0xFB236A46, SonicUnleashed, US, GAME_FASTUPDATE | GAME_NOALPHAFAIL, -1, -1}, - {0xa5d29941, ShadowTheHedgehog, US, GAME_FASTUPDATE | GAME_NOALPHAFAIL, -1, -1}, - - {0x7acf7e03, AtelierIris1, Unknown_Region, GAME_GUSTHACK, -1, -1}, - {0xF0457CEF, AtelierIris1, Unknown_Region, GAME_GUSTHACK, -1, -1}, - {0xE3981DBB, AtelierIris1, US, GAME_GUSTHACK, -1, -1}, - {0x9AC65D6A, AtelierIris2, US, GAME_GUSTHACK, -1, -1}, - {0x4CCC9212, AtelierIris3, US, GAME_GUSTHACK, -1, -1}, - {0xCA295E61, AtelierIris3, JP, GAME_GUSTHACK, -1, -1}, - //{0x4437F4B1, ArTonelico1, US, GAME_GUSTHACK, -1, -1}, - {0xF95F37EE, ArTonelico2, US, GAME_GUSTHACK, -1, -1}, - {0xF46142D3, ArTonelico2, JPUNDUB, GAME_GUSTHACK, -1, -1}, - - // According to Zeydlitz, Mana Khemia no longer needs the Gust Hack. - //{0x77b0236f, ManaKhemia1, US, GAME_GUSTHACK, -1, -1}, - //{0x433951e7, ManaKhemia2, US, GAME_GUSTHACK, -1, -1}, - //{0xda11c6d4, AtelierJudie, JP, GAME_GUSTHACK, -1, -1}, - //{0x3e72c085, AtelierLilie, JP, GAME_GUSTHACK, -1, -1}, - //{0x6eac076b, AtelierViorate, JP, GAME_GUSTHACK, -1, -1}, - - {0xbaa8dd8, DarkCloud1, US, GAME_NOTARGETRESOLVE, -1, -1}, - {0xA5C05C78, DarkCloud1, Unknown_Region, GAME_NOTARGETRESOLVE, -1, -1}, - //{0x1DF41F33, DarkCloud2, US, 0, -1, -1}, - {0x95cc86ef, GhostInTheShell, Unknown_Region, GAME_NOALPHAFAIL, -1, -1} - -// Game settings that used to be in the Patches folder. Commented out until I decide what to do with them. -// {0x951555A0, Disgaea2, US, GAME_NODEPTHRESOLVE, -1, -1}, -// {0x4334E17D, Disgaea2, JP, GAME_NODEPTHRESOLVE, -1, -1}, -// -// {0x5EB127E7, Gradius, JP, GAME_INTERLACE2X, -1, -1}, -// {0x6ADBC24B, Gradius, EU, GAME_INTERLACE2X, -1, -1}, -// {0xF22CDDAF, Gradius, US, GAME_INTERLACE2X, -1, -1}, -// -// {0xF52FB2BE, KingdomHearts, EU, GAME_QUICKRESOLVE1, -1, -1}, -// {0xAE3EAA05, KingdomHearts, DE, GAME_QUICKRESOLVE1, -1, -1}, -// {0xF6DC728D, KingdomHearts, FR, GAME_QUICKRESOLVE1, -1, -1}, -// {0x0F6B6315, KingdomHearts, US, GAME_QUICKRESOLVE1, -1, -1}, -// {0x3E68955A, KingdomHeartsFM, JP, GAME_QUICKRESOLVE1, -1, -1}, -// -// {0xC398F477, KingdomHearts2, EU, GAME_NODEPTHRESOLVE, -1, -1}, -// {0xDA0535FD, KingdomHearts2, US, GAME_NODEPTHRESOLVE, -1, -1}, -// {0x93F8A60B, KingdomHearts2, JP, GAME_NODEPTHRESOLVE, -1, -1}, -// {0xF266B00B, KingdomHearts2FM, JP, GAME_NODEPTHRESOLVE, -1, -1}, -// -// //The patch claimed to stop characters appearing as wigs on GeForce 8x00 series cards (Disable Alpha Testing) -// {0x2251E14D, Tekken4, EU, GAME_NOALPHATEST, -1, -1}, -// -// // This one is supposed to fix a refresh bug. -// {0x51F91783, Kaena, JP, GAME_NOTARGETRESOLVE, -1, -1}, -// -// {0xDEFA4763, ShadowHearts, EU, GAME_NODEPTHRESOLVE | GAME_NOQUICKRESOLVE | GAME_NOTARGETRESOLVE | GAME_AUTORESET, -1, -1}, -// {0x8BE3D7B2, ShadowHearts, US, GAME_NODEPTHUPDATE | GAME_AUTORESET | GAME_NOQUICKRESOLVE, -1, -1}, -// -// {0x015314A2, Sims_The_Urbz, US, GAME_NOQUICKRESOLVE, -1, -1}, -// -// // "Required fixes to visuals" -// {0x086273D2, MetalGearSolid3, US, GAME_FULL16BITRES | GAME_NODEPTHRESOLVE, -1, -1}, -// -// {0x4D228733, MarvelxCapcom2, US, GAME_QUICKRESOLVE1, -1, -1}, -// {0x934F9081, NeoPets_Darkest_Faerie, US, GAME_RESOLVEPROMOTED | GAME_FULL16BITRES | GAME_NODEPTHRESOLVE, -1, -1}, -// -// {0x21068223, Okami, US, GAME_FULL16BITRES|GAME_NODEPTHRESOLVE|GAME_FASTUPDATE, -1, -1}, -// {0xC5DEFEA0, Okami, JP, GAME_FULL16BITRES|GAME_NODEPTHRESOLVE|GAME_FASTUPDATE, -1, -1}, -// -// // Speed up -// {0x6BA2F6B9, ResidentEvil4, EU, GAME_NOTARGETRESOLVE | GAME_32BITTARGS, -1, -1}, -// {0x013E349D, ResidentEvil4, US, GAME_NOTARGETCLUT, -1, -1}, -// -// {0x2088950A, Xenosaga2, JP, GAME_FULL16BITRES | GAME_NODEPTHRESOLVE, -1, -1}, -// {0x901AAC09, HauntingGround, US, GAME_FULL16BITRES | GAME_NODEPTHRESOLVE, -1, -1}, -// {0x625AF967, NightmareBeforeChristmas, JP, GAME_TEXAHACK, -1, -1}, -// -// {0x3CFE3B37, PowershotPinball, EU, GAME_AUTORESET, -1, -1}, -// {0x60FA8C69, BioHazard4, JP, GAME_NOTARGETCLUT, -1, -1} -// End of game settings from the patch folder. -}; - -#define GAME_INFO_INDEX (sizeof(crc_game_list)/sizeof(Game_Info)) - - -#endif // CRC_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/GLWin.h b/plugins/zzogl-pg-cg/opengl/GLWin.h deleted file mode 100644 index 0a314b25c2..0000000000 --- a/plugins/zzogl-pg-cg/opengl/GLWin.h +++ /dev/null @@ -1,89 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef GLWIN_H_INCLUDED -#define GLWIN_H_INCLUDED - -#ifdef _WIN32 -#define GL_WIN32_WINDOW -#else -#define GL_X11_WINDOW -#endif - -#undef CreateWindow // Undo Windows.h global namespace pollution - -extern void SetDeviceSize(int nNewWidth, int nNewHeight); -extern void OnFKey(int key, int shift); - -class GLWindow -{ - private: -#ifdef GL_X11_WINDOW - Display *glDisplay; - GLXContext context; - XVisualInfo *vi; - - Window glWindow; - XSetWindowAttributes attr; - - bool CreateVisual(); - void GetGLXVersion(); - void GetWindowSize(); - void UpdateGrabKey(); - void Force43Ratio(); - void CreateContextGL(); -#endif - bool fullScreen, doubleBuffered; - u32 width, height, depth; - - public: - char title[256]; - Size backbuffer; - - void SwapGLBuffers(); - bool ReleaseContext(); - -#ifdef GL_X11_WINDOW - void ToggleFullscreen(); -#endif - - bool CreateWindow(void *pDisplay); - void CloseWindow(); - bool DisplayWindow(int _width, int _height); - void SetTitle(char *strtitle); - void ResizeCheck(); - void ProcessEvents(); - - void UpdateWindowSize(int nNewWidth, int nNewHeight) - { - FUNCLOG - backbuffer.w = std::max(nNewWidth, 16); - backbuffer.h = std::max(nNewHeight, 16); - - if (!(conf.fullscreen())) - { - conf.width = nNewWidth; - conf.height = nNewHeight; - } - } -}; - -extern GLWindow GLWin; - -#endif // GLWIN_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/GLWin32.cpp b/plugins/zzogl-pg-cg/opengl/GLWin32.cpp deleted file mode 100644 index d71ca84ae0..0000000000 --- a/plugins/zzogl-pg-cg/opengl/GLWin32.cpp +++ /dev/null @@ -1,400 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" -#include "GLWin.h" - -#ifdef GL_WIN32_WINDOW - -HWND GShwnd = NULL; -HDC hDC = NULL; // Private GDI Device Context -HGLRC hRC = NULL; // Permanent Rendering Context - -LRESULT WINAPI MsgProc(HWND hWnd, UINT msg, WPARAM wParam, LPARAM lParam) -{ - static int nWindowWidth = 0, nWindowHeight = 0; - - switch (msg) - { - case WM_DESTROY: - PostQuitMessage(0); - return 0; - - case WM_KEYDOWN: -// switch(wParam) { -// case VK_ESCAPE: -// SendMessage(hWnd, WM_DESTROY, 0L, 0L); -// break; -// } - break; - - case WM_SIZE: - nWindowWidth = lParam & 0xffff; - nWindowHeight = lParam >> 16; - GLWin.UpdateWindowSize(nWindowWidth, nWindowHeight); - break; - - case WM_SIZING: - // if button is 0, then just released so can resize - if (GetSystemMetrics(SM_SWAPBUTTON) ? !GetAsyncKeyState(VK_RBUTTON) : !GetAsyncKeyState(VK_LBUTTON)) - { - SetDeviceSize(nWindowWidth, nWindowHeight); - } - break; - - case WM_SETCURSOR: - SetCursor(NULL); - break; - } - - return DefWindowProc(hWnd, msg, wParam, lParam); -} - -bool GLWindow::CreateWindow(void *pDisplay) -{ - RECT rc, rcdesktop; - rc.left = 0; - rc.top = 0; - rc.right = conf.width; - rc.bottom = conf.height; - - WNDCLASSEX wc; - HINSTANCE hInstance = GetModuleHandle(NULL); // Grab An Instance For Our Window - DWORD dwExStyle, dwStyle; - - wc.cbSize = sizeof(WNDCLASSEX); - wc.style = CS_HREDRAW | CS_VREDRAW | CS_OWNDC; // Redraw On Move, And Own DC For Window - wc.lpfnWndProc = (WNDPROC) MsgProc; // MsgProc Handles Messages - wc.cbClsExtra = 0; // No Extra Window Data - wc.cbWndExtra = 0; // No Extra Window Data - wc.hInstance = hInstance; // Set The Instance - wc.hIcon = NULL; - wc.hIconSm = NULL; // Load The Default Icon - wc.hCursor = LoadCursor(NULL, IDC_ARROW); // Load The Arrow Pointer - wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH); // No Background Required For GL - wc.lpszMenuName = NULL; // We Don't Want A Menu - wc.lpszClassName = L"PS2EMU_ZEROGS"; // Set The Class Name - - RegisterClassEx(&wc); - - if (conf.fullscreen()) - { - dwExStyle = WS_EX_APPWINDOW; - dwStyle = WS_POPUP; - } - else - { - dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; - dwStyle = WS_OVERLAPPEDWINDOW | WS_BORDER; - } - - dwStyle |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN; - AdjustWindowRectEx(&rc, dwStyle, false, dwExStyle); - - GetWindowRect(GetDesktopWindow(), &rcdesktop); - - GShwnd = CreateWindowEx( dwExStyle, // Extended Style For The Window - L"PS2EMU_ZEROGS", // Class Name - L"ZZOgl", // Window Title - dwStyle, // Selected Window Style - (rcdesktop.right - (rc.right - rc.left)) / 2, // Window Position - (rcdesktop.bottom - (rc.bottom - rc.top)) / 2, // Window Position - rc.right - rc.left, // Calculate Adjusted Window Width - rc.bottom - rc.top, // Calculate Adjusted Window Height - NULL, // No Parent Window - NULL, // No Menu - hInstance, // Instance - NULL); // Don't Pass Anything To WM_CREATE - - if (GShwnd == NULL) - { - ZZLog::Error_Log("Failed to create window. Exiting..."); - return false; - } - - if (pDisplay != NULL) *(HWND*)pDisplay = GShwnd; - - // set just in case - SetWindowLongPtr(GShwnd, GWLP_WNDPROC, (LPARAM)(WNDPROC)MsgProc); - - ShowWindow(GShwnd, SW_SHOWDEFAULT); - - UpdateWindow(GShwnd); - - SetFocus(GShwnd); - - if (pDisplay == NULL) ZZLog::Error_Log("Failed to create window. Exiting..."); - return (pDisplay != NULL); -} - -bool GLWindow::ReleaseContext() -{ - if (hRC) // Do We Have A Rendering Context? - { - if (!wglMakeCurrent(NULL, NULL)) // Are We Able To Release The DC And RC Contexts? - { - MessageBox(NULL, L"Release Of DC And RC Failed.", L"SHUTDOWN ERROR", MB_OK | MB_ICONINFORMATION); - } - - if (!wglDeleteContext(hRC)) // Are We Able To Delete The RC? - { - MessageBox(NULL, L"Release Rendering Context Failed.", L"SHUTDOWN ERROR", MB_OK | MB_ICONINFORMATION); - } - - hRC = NULL; // Set RC To NULL - } - - if (hDC && !ReleaseDC(GShwnd, hDC)) // Are We Able To Release The DC - { - MessageBox(NULL, L"Release Device Context Failed.", L"SHUTDOWN ERROR", MB_OK | MB_ICONINFORMATION); - hDC = NULL; // Set DC To NULL - } - - return true; -} - -void GLWindow::CloseWindow() -{ - if (GShwnd != NULL) - { - DestroyWindow(GShwnd); - GShwnd = NULL; - } -} - -bool GLWindow::DisplayWindow(int _width, int _height) -{ - GLuint PixelFormat; // Holds The Results After Searching For A Match - DWORD dwExStyle; // Window Extended Style - DWORD dwStyle; // Window Style - - RECT rcdesktop; - GetWindowRect(GetDesktopWindow(), &rcdesktop); - - if (conf.fullscreen()) - { - backbuffer.w = rcdesktop.right - rcdesktop.left; - backbuffer.h = rcdesktop.bottom - rcdesktop.top; - - dwExStyle = WS_EX_APPWINDOW; - dwStyle = WS_POPUP; - ShowCursor(false); - } - else - { - dwExStyle = WS_EX_APPWINDOW | WS_EX_WINDOWEDGE; - dwStyle = WS_OVERLAPPEDWINDOW; - backbuffer.w = _width; - backbuffer.h = _height; - } - dwStyle |= WS_CLIPSIBLINGS | WS_CLIPCHILDREN; - - RECT rc; - - rc.left = 0; - rc.top = 0; - rc.right = backbuffer.w; - rc.bottom = backbuffer.h; - AdjustWindowRectEx(&rc, dwStyle, false, dwExStyle); - int X = (rcdesktop.right - rcdesktop.left) / 2 - (rc.right - rc.left) / 2; - int Y = (rcdesktop.bottom - rcdesktop.top) / 2 - (rc.bottom - rc.top) / 2; - - SetWindowLong(GShwnd, GWL_STYLE, dwStyle); - SetWindowLong(GShwnd, GWL_EXSTYLE, dwExStyle); - - SetWindowPos(GShwnd, HWND_TOP, X, Y, rc.right - rc.left, rc.bottom - rc.top, SWP_SHOWWINDOW); - - if (conf.fullscreen()) - { - DEVMODE dmScreenSettings; - memset(&dmScreenSettings, 0, sizeof(dmScreenSettings)); - dmScreenSettings.dmSize = sizeof(dmScreenSettings); - dmScreenSettings.dmPelsWidth = backbuffer.w; - dmScreenSettings.dmPelsHeight = backbuffer.h; - dmScreenSettings.dmBitsPerPel = 32; - dmScreenSettings.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT; - - // Try To Set Selected Mode And Get Results. NOTE: CDS_FULLSCREEN Gets Rid Of Start Bar. - - if (ChangeDisplaySettings(&dmScreenSettings, CDS_FULLSCREEN) != DISP_CHANGE_SUCCESSFUL) - { - if (MessageBox(NULL, - L"The Requested Fullscreen Mode Is Not Supported By\nYour Video Card. Use Windowed Mode Instead?", - L"NeHe GL", - MB_YESNO | MB_ICONEXCLAMATION) == IDYES) - conf.setFullscreen(false); - else - return false; - } - } - else - { - // change to default resolution - ChangeDisplaySettings(NULL, 0); - } - - PIXELFORMATDESCRIPTOR pfd = // pfd Tells Windows How We Want Things To Be - - { - sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor - 1, // Version Number - PFD_DRAW_TO_WINDOW | // Format Must Support Window - PFD_SUPPORT_OPENGL | // Format Must Support OpenGL - PFD_DOUBLEBUFFER, // Must Support Double Buffering - PFD_TYPE_RGBA, // Request An RGBA Format - 32, // Select Our Color Depth - 0, 0, 0, 0, 0, 0, // Color Bits Ignored - 0, // 8bit Alpha Buffer - 0, // Shift Bit Ignored - 0, // No Accumulation Buffer - 0, 0, 0, 0, // Accumulation Bits Ignored - 24, // 24Bit Z-Buffer (Depth Buffer) - 8, // 8bit Stencil Buffer - 0, // No Auxiliary Buffer - PFD_MAIN_PLANE, // Main Drawing Layer - 0, // Reserved - 0, 0, 0 // Layer Masks Ignored - }; - - if (!(hDC = GetDC(GShwnd))) - { - MessageBox(NULL, L"(1) Can't Create A GL Device Context.", L"ERROR", MB_OK | MB_ICONEXCLAMATION); - return false; - } - - if (!(PixelFormat = ChoosePixelFormat(hDC, &pfd))) - { - MessageBox(NULL, L"(2) Can't Find A Suitable PixelFormat.", L"ERROR", MB_OK | MB_ICONEXCLAMATION); - return false; - } - - if (!SetPixelFormat(hDC, PixelFormat, &pfd)) - { - MessageBox(NULL, L"(3) Can't Set The PixelFormat.", L"ERROR", MB_OK | MB_ICONEXCLAMATION); - return false; - } - - if (!(hRC = wglCreateContext(hDC))) - { - MessageBox(NULL, L"(4) Can't Create A GL Rendering Context.", L"ERROR", MB_OK | MB_ICONEXCLAMATION); - return false; - } - - if (!wglMakeCurrent(hDC, hRC)) - { - MessageBox(NULL, L"(5) Can't Activate The GL Rendering Context.", L"ERROR", MB_OK | MB_ICONEXCLAMATION); - return false; - } - - UpdateWindow(GShwnd); - - return true; -} - -void GLWindow::SwapGLBuffers() -{ - static u32 lastswaptime = 0; - - if (glGetError() != GL_NO_ERROR) ZZLog::Debug_Log("glError before swap!"); - - SwapBuffers(hDC); - lastswaptime = timeGetTime(); -} - -void GLWindow::SetTitle(char *strtitle) -{ - if (!conf.fullscreen()) SetWindowText(GShwnd, wxString::FromUTF8(strtitle)); -} - -void GLWindow::ResizeCheck() -{ - -} - - -extern void ChangeDeviceSize(int nNewWidth, int nNewHeight); - -void GLWindow::ProcessEvents() -{ - MSG msg; - - ZeroMemory(&msg, sizeof(msg)); - - while (1) - { - if (PeekMessage(&msg, NULL, 0U, 0U, PM_REMOVE)) - { - switch (msg.message) - { - case WM_KEYDOWN : - int my_KeyEvent = msg.wParam; - bool my_bShift = !!(GetKeyState(VK_SHIFT) & 0x8000); - - switch (msg.wParam) - { - case VK_F5: - case VK_F6: - case VK_F7: - case VK_F9: - OnFKey(msg.wParam - VK_F1 + 1, my_bShift); - break; - - case VK_ESCAPE: - - if (conf.fullscreen()) - { - // destroy that msg - conf.setFullscreen(false); - ChangeDeviceSize(conf.width, conf.height); - UpdateWindow(GShwnd); - continue; // so that msg doesn't get sent - } - else - { - SendMessage(GShwnd, WM_DESTROY, 0, 0); - return; - } - - break; - } - - break; - } - - TranslateMessage(&msg); - DispatchMessage(&msg); - } - else - { - break; - } - } - - if ((GetKeyState(VK_MENU) & 0x8000) && (GetKeyState(VK_RETURN) & 0x8000)) - { - conf.zz_options.fullscreen = !conf.zz_options.fullscreen; - - SetDeviceSize( - (conf.fullscreen()) ? 1280 : conf.width, - (conf.fullscreen()) ? 960 : conf.height); - } -} - - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/GLWinX11.cpp b/plugins/zzogl-pg-cg/opengl/GLWinX11.cpp deleted file mode 100644 index 0730acc214..0000000000 --- a/plugins/zzogl-pg-cg/opengl/GLWinX11.cpp +++ /dev/null @@ -1,478 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "Util.h" -#include "GLWin.h" - -#ifdef GL_X11_WINDOW - -#include -#include - -#ifdef USE_GSOPEN2 -bool GLWindow::CreateWindow(void *pDisplay) -{ - glWindow = (Window)*((u32*)(pDisplay)+1); - // Do not take the display which come from pcsx2 neither change it. - // You need a new one to do the operation in the GS thread - glDisplay = XOpenDisplay(NULL); - - return true; -} -#else -bool GLWindow::CreateWindow(void *pDisplay) -{ - // init support of multi thread - if (!XInitThreads()) - ZZLog::Error_Log("Failed to init the xlib concurent threads"); - - glDisplay = XOpenDisplay(NULL); - - if (pDisplay == NULL) - { - ZZLog::Error_Log("Failed to create window. Exiting..."); - return false; - } - - // Allow pad to use the display - *(Display**)pDisplay = glDisplay; - // Pad can use the window to grab the input. For the moment just set to 0 to avoid - // to grab an unknow window... Anyway GSopen1 might be dropped in the future - *((u32*)(pDisplay)+1) = 0; - - return true; -} -#endif - -bool GLWindow::ReleaseContext() -{ - bool status = true; - if (!glDisplay) return status; - - // free the context - if (context) - { - if (!glXMakeCurrent(glDisplay, None, NULL)) { - ZZLog::Error_Log("Could not release drawing context."); - status = false; - } - - glXDestroyContext(glDisplay, context); - context = NULL; - } - - // free the visual - if (vi) { - XFree(vi); - vi = NULL; - } - - return status; -} - -void GLWindow::CloseWindow() -{ - SaveConfig(); - if (!glDisplay) return; - - XCloseDisplay(glDisplay); - glDisplay = NULL; -} - -bool GLWindow::CreateVisual() -{ - // attributes for a single buffered visual in RGBA format with at least - // 8 bits per color and a 24 bit depth buffer - int attrListSgl[] = {GLX_RGBA, GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_DEPTH_SIZE, 24, - None - }; - - // attributes for a double buffered visual in RGBA format with at least - // 8 bits per color and a 24 bit depth buffer - int attrListDbl[] = { GLX_RGBA, GLX_DOUBLEBUFFER, - GLX_RED_SIZE, 8, - GLX_GREEN_SIZE, 8, - GLX_BLUE_SIZE, 8, - GLX_DEPTH_SIZE, 24, - None - }; - - /* get an appropriate visual */ - vi = glXChooseVisual(glDisplay, DefaultScreen(glDisplay), attrListDbl); - - if (vi == NULL) - { - vi = glXChooseVisual(glDisplay, DefaultScreen(glDisplay), attrListSgl); - doubleBuffered = false; - ZZLog::Error_Log("Only Singlebuffered Visual!"); - } - else - { - doubleBuffered = true; - ZZLog::Error_Log("Got Doublebuffered Visual!"); - } - - if (vi == NULL) - { - ZZLog::Error_Log("Failed to get buffered Visual!"); - return false; - } - return true; -} - -void GLWindow::GetWindowSize() -{ - if (!glDisplay or !glWindow) return; - - unsigned int borderDummy; - Window winDummy; - s32 xDummy; - s32 yDummy; - - XLockDisplay(glDisplay); - XGetGeometry(glDisplay, glWindow, &winDummy, &xDummy, &yDummy, &width, &height, &borderDummy, &depth); - XUnlockDisplay(glDisplay); - - // update the gl buffer size - UpdateWindowSize(width, height); - -#ifndef USE_GSOPEN2 - // too verbose! - ZZLog::Dev_Log("Resolution %dx%d. Depth %d bpp. Position (%d,%d)", width, height, depth, conf.x, conf.y); -#endif -} - -void GLWindow::GetGLXVersion() -{ - int glxMajorVersion, glxMinorVersion; - - glXQueryVersion(glDisplay, &glxMajorVersion, &glxMinorVersion); - - if (glXIsDirect(glDisplay, context)) - ZZLog::Error_Log("glX-Version %d.%d with Direct Rendering", glxMajorVersion, glxMinorVersion); - else - ZZLog::Error_Log("glX-Version %d.%d with Indirect Rendering !!! It will be slow", glxMajorVersion, glxMinorVersion); - -} - -void GLWindow::CreateContextGL() -{ - if (!glDisplay) return; - - // Create a 2.0 opengl context. My understanding, you need it to call the gl function to get the 3.0 context - context = glXCreateContext(glDisplay, vi, NULL, GL_TRUE); - - // FIXME - // On Geforce7, the context 3.0 creation crashes with BadAlloc (insufficient resources for operation) - // So until a better solution is found, keep the 2.0 context -- Gregory - return; - - PFNGLXCREATECONTEXTATTRIBSARBPROC glXCreateContextAttribsARB = (PFNGLXCREATECONTEXTATTRIBSARBPROC) glXGetProcAddress((GLubyte *) "glXCreateContextAttribsARB"); - PFNGLXCHOOSEFBCONFIGPROC glXChooseFBConfig = (PFNGLXCHOOSEFBCONFIGPROC) glXGetProcAddress((GLubyte *) "glXChooseFBConfig"); - if (!glXCreateContextAttribsARB or !glXChooseFBConfig) { - ZZLog::Error_Log("No support of OpenGL 3.0\n"); - return; - } - - // Note this part seems linux specific - int fbcount = 0; - GLXFBConfig *framebuffer_config = glXChooseFBConfig(glDisplay, DefaultScreen(glDisplay), NULL, &fbcount); - if (!framebuffer_config or !fbcount) return; - - // At least create a 3.0 context with compatibility profile - int attribs[] = { - GLX_CONTEXT_MAJOR_VERSION_ARB, 3, - GLX_CONTEXT_MINOR_VERSION_ARB, 0, - GLX_CONTEXT_PROFILE_MASK_ARB, GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB, - 0 - }; - GLXContext context_temp = glXCreateContextAttribsARB(glDisplay, framebuffer_config[0], NULL, true, attribs); - if (context_temp) { - ZZLog::Error_Log("Create a 3.0 opengl context"); - glXDestroyContext(glDisplay, context); - context = context_temp; - } -} - -#ifdef USE_GSOPEN2 -bool GLWindow::DisplayWindow(int _width, int _height) -{ - GetWindowSize(); - - if (!CreateVisual()) return false; - - // connect the glx-context to the window - CreateContextGL(); - glXMakeCurrent(glDisplay, glWindow, context); - - GetGLXVersion(); - - return true; -} -#else -bool GLWindow::DisplayWindow(int _width, int _height) -{ - backbuffer.w = _width; - backbuffer.h = _height; - - if (!CreateVisual()) return false; - - /* create a color map */ - attr.colormap = XCreateColormap(glDisplay, RootWindow(glDisplay, vi->screen), - vi->visual, AllocNone); - attr.border_pixel = 0; - attr.event_mask = ExposureMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | - StructureNotifyMask | SubstructureRedirectMask | SubstructureNotifyMask | - EnterWindowMask | LeaveWindowMask | FocusChangeMask ; - - // Create a window at the last position/size - glWindow = XCreateWindow(glDisplay, RootWindow(glDisplay, vi->screen), - conf.x , conf.y , _width, _height, 0, vi->depth, InputOutput, vi->visual, - CWBorderPixel | CWColormap | CWEventMask, - &attr); - - /* Allow to kill properly the window */ - Atom wmDelete = XInternAtom(glDisplay, "WM_DELETE_WINDOW", True); - XSetWMProtocols(glDisplay, glWindow, &wmDelete, 1); - - // Set icon name - XSetIconName(glDisplay, glWindow, "ZZogl-pg"); - - // Draw the window - XMapRaised(glDisplay, glWindow); - XSync(glDisplay, false); - - // connect the glx-context to the window - CreateContextGL(); - glXMakeCurrent(glDisplay, glWindow, context); - - GetGLXVersion(); - - // Always start in window mode - fullScreen = 0; - GetWindowSize(); - - return true; -} -#endif - -void GLWindow::SwapGLBuffers() -{ - if (glGetError() != GL_NO_ERROR) ZZLog::Debug_Log("glError before swap!"); - // FIXME I think we need to flush when there is only 1 visual buffer - glXSwapBuffers(glDisplay, glWindow); - // glClear(GL_COLOR_BUFFER_BIT); -} - -u32 THR_KeyEvent = 0; // Value for key event processing between threads -bool THR_bShift = false; -bool THR_bCtrl = false; - -void GLWindow::ProcessEvents() -{ - FUNCLOG - -#ifdef USE_GSOPEN2 - GetWindowSize(); -#else - ResizeCheck(); -#endif - - if (THR_KeyEvent) // This value was passed from GSKeyEvents which could be in another thread - { - int my_KeyEvent = THR_KeyEvent; - bool my_bShift = THR_bShift; - bool my_bCtrl = THR_bCtrl; - THR_KeyEvent = 0; - - switch (my_KeyEvent) - { - case XK_F5: - case XK_F6: - case XK_F7: - case XK_F9: - // Note: to avoid some clash with PCSX2 shortcut in GSOpen2. - // GS shortcut will only be activated when ctrl is press - if (my_bCtrl) - OnFKey(my_KeyEvent - XK_F1 + 1, my_bShift); - break; - } - } -} - - -// ************************** Function that are either stub or useless in GSOPEN2 -#define _NET_WM_STATE_REMOVE 0 -#define _NET_WM_STATE_ADD 1 -#define _NET_WM_STATE_TOGGLE 2 - -void GLWindow::Force43Ratio() -{ -#ifndef USE_GSOPEN2 - // avoid black border in fullscreen - if (fullScreen && conf.isWideScreen) { - conf.width = width; - conf.height = height; - } - - if(!fullScreen && !conf.isWideScreen) { - // Compute the width based on height - s32 new_width = (4*height)/3; - // do not bother to resize for 5 pixels. Avoid a loop - // due to round value - if ( ABS(new_width - width) > 5) { - width = new_width; - conf.width = new_width; - // resize the window - XLockDisplay(glDisplay); - XResizeWindow(glDisplay, glWindow, new_width, height); - XSync(glDisplay, False); - XUnlockDisplay(glDisplay); - } - } -#endif -} - -void GLWindow::UpdateGrabKey() -{ - // Do not stole the key in debug mode. It is not breakpoint friendly... -#ifndef _DEBUG - XLockDisplay(glDisplay); - if (fullScreen) { - XGrabPointer(glDisplay, glWindow, True, ButtonPressMask, GrabModeAsync, GrabModeAsync, glWindow, None, CurrentTime); - XGrabKeyboard(glDisplay, glWindow, True, GrabModeAsync, GrabModeAsync, CurrentTime); - } else { - XUngrabPointer(glDisplay, CurrentTime); - XUngrabKeyboard(glDisplay, CurrentTime); - } - XUnlockDisplay(glDisplay); -#endif -} - -void GLWindow::ToggleFullscreen() -{ -#ifndef USE_GSOPEN2 - if (!glDisplay or !glWindow) return; - - Force43Ratio(); - - u32 mask = SubstructureRedirectMask | SubstructureNotifyMask; - // Setup a new event structure - XClientMessageEvent cme; - cme.type = ClientMessage; - cme.send_event = True; - cme.display = glDisplay; - cme.window = glWindow; - cme.message_type = XInternAtom(glDisplay, "_NET_WM_STATE", False); - cme.format = 32; - // Note: can not use _NET_WM_STATE_TOGGLE because the WM can change the fullscreen state - // and screw up the fullscreen variable... The test on fulscreen restore a sane configuration - cme.data.l[0] = fullScreen ? _NET_WM_STATE_REMOVE : _NET_WM_STATE_ADD; - cme.data.l[1] = (u32)XInternAtom(glDisplay, "_NET_WM_STATE_FULLSCREEN", False); - cme.data.l[2] = 0; - cme.data.l[3] = 0; - - // send the event - XLockDisplay(glDisplay); - if (!XSendEvent(glDisplay, RootWindow(glDisplay, vi->screen), False, mask, (XEvent*)(&cme))) - ZZLog::Error_Log("Failed to send event: toggle fullscreen"); - else { - fullScreen = (!fullScreen); - conf.setFullscreen(fullScreen); - } - XUnlockDisplay(glDisplay); - - // Apply the change - XSync(glDisplay, false); - - // Wait a little that the VM does his joes. Actually the best is to check some WM event - // but it not sure it will appear so a time out is necessary. - usleep(100*1000); // 100 us should be far enough for old computer and unnoticeable for users - - // update info structure - GetWindowSize(); - - UpdateGrabKey(); - - // avoid black border in widescreen fullscreen - if (fullScreen && conf.isWideScreen) { - conf.width = width; - conf.height = height; - } - - // Hide the cursor in the right bottom corner - if(fullScreen) - XWarpPointer(glDisplay, None, glWindow, 0, 0, 0, 0, 2*width, 2*height); - -#endif -} - -void GLWindow::ResizeCheck() -{ - XEvent event; - if (!glDisplay or !glWindow) return; - - XLockDisplay(glDisplay); - while (XCheckTypedWindowEvent(glDisplay, glWindow, ConfigureNotify, &event)) - { - if ((event.xconfigure.width != width) || (event.xconfigure.height != height)) - { - width = event.xconfigure.width; - height = event.xconfigure.height; - Force43Ratio(); - UpdateWindowSize(width, height); - } - - if (!fullScreen) { - if ((event.xconfigure.x != conf.x) || (event.xconfigure.y != conf.y)) - { - // Fixme; x&y occassionally gives values near the top left corner rather then the real values, - // causing the window to change positions when adjusting ZZOgl's settings. - conf.x = event.xconfigure.x; - conf.y = event.xconfigure.y; - } - } - } - XUnlockDisplay(glDisplay); -} - -void GLWindow::SetTitle(char *strtitle) -{ -#ifndef USE_GSOPEN2 - if (!glDisplay or !glWindow) return; - if (fullScreen) return; - - XTextProperty prop; - memset(&prop, 0, sizeof(prop)); - - char* ptitle = strtitle; - if (XStringListToTextProperty(&ptitle, 1, &prop)) { - XLockDisplay(glDisplay); - XSetWMName(glDisplay, glWindow, &prop); - XUnlockDisplay(glDisplay); - } - - XFree(prop.value); -#endif -} - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/GS.h b/plugins/zzogl-pg-cg/opengl/GS.h deleted file mode 100644 index 8bded3f4cc..0000000000 --- a/plugins/zzogl-pg-cg/opengl/GS.h +++ /dev/null @@ -1,987 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __GS_H__ -#define __GS_H__ - - -#define USE_OLD_REGS - -#include "Util.h" -#include "GifTransfer.h" -#include "HostMemory.h" - -using namespace std; - -extern float fFPS; - -#ifdef _MSC_VER -#define EXPORT_C_(type) extern "C" type CALLBACK -#else -#define EXPORT_C_(type) extern "C" __attribute__((externally_visible,visibility("default"))) type -#endif - -extern int g_LastCRC; - -struct Vector_16F -{ - u16 x, y, z, w; -}; - -// PS2 vertex - -// Almost same as VertexGPU, controlled by prim.fst flags - -struct Vertex -{ - u16 x, y, f, resv0; // note: xy is 12d3 - u32 rgba; - u32 z; - float s, t, q; - // Texel coordinate of vertex. Used if prim.fst == 1 - // Bits 0-14 and 16-30 of UV - u16 u, v; -}; - -struct VertexGPU -{ - // gained from XYZ2, XYZ3, XYZF2, XYZF3, - // X -- bits 0-15, Y-16-31. Z - 32-63 if no F used, 32-55 otherwise, F (fog) - 56-63 - // X, Y stored in 12d3 format, - s16 x, y; - s16 f, resv0; - - // Vertex color settings. RGB -- luminance of red/green/blue, A -- alpha. 1.0 == 0x80. - // Goes grom RGBAQ register, bits 0-7, 8-15, 16-23 and 24-31 accordingly - u32 rgba; - u32 z; - // Texture coordinates. S & T going from ST register (bits 0-31, and 32-63). - // Q goes from RGBAQ register, bits 32-63 - float s, t, q; - - void move_x(Vertex v, int offset) - { - x = ((((int)v.x - offset) >> 1) & 0xffff); - } - - void move_y(Vertex v, int offset) - { - y = ((((int)v.y - offset) >> 1) & 0xffff); - } - - void move_z(Vertex v, int mask) - { - z = (mask == 0xffff) ? min((u32)0xffff, v.z) : v.z; - } - - void move_fog(Vertex v) - { - f = ((s16)(v).f << 7) | 0x7f; - } - - void set_xy(s16 x1, s16 y1) - { - x = x1; - y = y1; - } - void set_xyz(s16 x1, s16 y1, u32 z1) - { - x = x1; - y = y1; - z = z1; - } - - void set_st(float s1, float t1) - { - s = s1; - t = t1; - } - - void set_stq(float s1, float t1, float q1) - { - s = s1; - t = t1; - q = q1; - } - - void set_xyzst(s16 x1, s16 y1, u32 z1, float s1, float t1) - { - set_xyz(x1, y1, z1); - set_st(s1, t1); - } - -}; - -extern GSconf conf; - -// PSM values -// PSM types == Texture Storage Format -enum PSM_value -{ - PSMCT32 = 0, // 00 0000 - PSMCT24 = 1, // 00 0001 - PSMCT16 = 2, // 00 0010 - PSMCT16S = 10, // 00 1010 - PSMT8 = 19, // 01 0011 - PSMT4 = 20, // 01 0100 - PSMT8H = 27, // 01 1011 - PSMT4HL = 36, // 10 0100 - PSMT4HH = 44, // 10 1100 - PSMT32Z = 48, // 11 0000 - PSMT24Z = 49, // 11 0001 - PSMT16Z = 50, // 11 0010 - PSMT16SZ = 58, // 11 1010 -}; - -// Check target bit mode. PSMCT32 and 32Z return 0, 24 and 24Z - 1 -// 16, 16S, 16Z, 16SZ -- 2, PSMT8 and 8H - 3, PSMT4, 4HL, 4HH -- 4. -// This code returns the same value on Z-textures, so texel storage mode is (BITMODE and !ISZTEX). -inline int PSMT_BITMODE(int psm) {return (psm & 0x7);} - -inline int PSMT_BITS_NUM(int psm) -{ - // Treat these as 32 bit. - if ((psm == PSMT8H) || (psm == PSMT4HL) || (psm == PSMT4HH)) - { - return 4; - } - - switch (PSMT_BITMODE(psm)) - { - case 4: - return 0; - - case 3: - return 1; - - case 2: - return 2; - - default: - return 4; - } -} - -// CLUT = Color look up table. Set proper color to table according CLUT table. -// Used for PSMT8, PSMT8H, PSMT4, PSMT4HH, PSMT4HL textures -inline bool PSMT_ISCLUT(int psm) { return (PSMT_BITMODE(psm) > 2);} - -// PSMCT16, PSMCT16S, PSMT16Z, PSMT16SZ is 16-bit targets and usually there is -// two of them in each 32-bit word. -inline bool PSMT_IS16BIT(int psm) { return (PSMT_BITMODE(psm) == 2);} - -// PSMT32Z, PSMT24Z, PSMT16Z, PSMT16SZ is Z-buffer textures -inline bool PSMT_ISZTEX(int psm) {return ((psm & 0x30) == 0x30);} - -// PSMCT16, PSMCT16S, PSMT8, PSMT8H, PSMT16Z and PSMT16SZ use only half 16 bit per pixel. -inline bool PSMT_ISHALF(int psm) {return ((psm & 2) == 2);} - -// PSMT8 and PSMT8H use IDTEX8 CLUT, PSMT4H, PSMT4HL, PSMT4HH -- IDTEX4. -// Don't use it on non clut entries, please! -inline bool PSMT_IS8CLUT(int psm) {return ((psm & 3) == 3);} - -// PSM16Z and PSMT16SZ use -1 offset to z-buff. Need to check this thesis. -inline bool PSMT_IS16Z(int psm) {return ((psm & 0x32) == 0x32);} - -// Check to see if it is 32 bits. According to code comments, anyways. -// I'll have to look closer at it, because it'd seem like it'd return true for 24 bits. -// Note: the function only works for clut format. Clut PSM is 4 bits only. The possible value are PSMCT32, PSMCT16, PSMCT16S -inline bool PSMT_IS32BIT(int psm) {return !!(psm <= 1);} - -// When color format is RGB24 (PSMCT24) or RGBA16 (PSMCT16 & 16S) alpha value expanded, based on -// TEXA register and AEM status. -inline int PSMT_ALPHAEXP(int psm) {return (psm == PSMCT24 || psm == PSMCT16 || psm == PSMCT16S);} - - -// This function updates the 6th and 5th bit of psm -// 00 or 11 -> 00 ; 01 -> 10 ; 10 -> 01 -inline int Switch_Top_Bytes (int X) { - if ( ( X & 0x30 ) == 0 ) - return X; - else - return (X ^ 0x30); -} - -// How many pixel stored in 1 word. -// PSMT8 has 4 pixels per 32bit, PSMT4 has 8. All 16-bit textures are 2 pixel per bit. And all others are 1 pixel in texture. -inline int PIXELS_PER_WORD(int psm) -{ - if (psm == PSMT8) - return 4; - if (psm == PSMT4) - return 8; - if (PSMT_IS16BIT(psm)) - return 2; - return 1; -} - -// Some storage formats could share the same memory block (2 textures in 1 format). This include following combinations: -// PSMT24(24Z) with either 8H, 4HL, 4HH and PSMT4HL with PSMT4HH. -// We use slightly different versions of this function on comparison with GSDX, Storage format XOR 0x30 made Z-textures -// similar to normal ones and change higher bits on short (8 and 4 bits) textures. -inline bool PSMT_HAS_SHARED_BITS (int fpsm, int tpsm) { - int SUM = Switch_Top_Bytes(fpsm) + Switch_Top_Bytes(tpsm) ; - return (SUM == 0x15 || SUM == 0x1D || SUM == 0x2C || SUM == 0x30); -} - -// If a clut is in 32-bit color, its size is 4 bytes, and 16-bit clut has a 2 byte size. -inline int CLUT_PIXEL_SIZE(int cpsm) {return ((cpsm <= 1) ? 4 : 2); } - -//----------------------- Data from registers ----------------------- - -typedef union -{ - s64 SD; - u64 UD; - s32 SL[2]; - u32 UL[2]; - s16 SS[4]; - u16 US[4]; - s8 SC[8]; - u8 UC[8]; -} reg64; - -/* general purpose regs structs */ - -typedef struct -{ - int fbp; - int fbw; - int fbh; - int psm; - u32 fbm; -} frameInfo; - -// Create frame structure from known data -inline frameInfo CreateFrame(int fbp, int fbw, int fbh, int psm, u32 fbm) -{ - frameInfo frame; - frame.fbp = fbp; - frame.fbw = fbw; - frame.fbh = fbh; - frame.psm = psm; - frame.fbm = fbm; - return frame; -} - -typedef struct -{ - u16 prim; - - union - { - struct - { - u16 iip : 1; - u16 tme : 1; - u16 fge : 1; - u16 abe : 1; - u16 aa1 : 1; - u16 fst : 1; - u16 ctxt : 1; - u16 fix : 1; - u16 resv : 8; - }; - u16 _val; - }; -} primInfo; - -extern primInfo *prim; - -typedef union -{ - struct - { - u32 ate : 1; - u32 atst : 3; - u32 aref : 8; - u32 afail : 2; - u32 date : 1; - u32 datm : 1; - u32 zte : 1; - u32 ztst : 2; - u32 resv : 13; - }; - u32 _val; -} pixTest; - -typedef struct -{ - int bp; - int bw; - int psm; -} bufInfo; - -typedef struct -{ - int tbp0; - int tbw; - int cbp; - u16 tw, th; - u8 psm; - u8 tcc; - u8 tfx; - u8 cpsm; - u8 csm; - u8 csa; - u8 cld; -} tex0Info; - -union tex_0_info -{ - struct - { - u64 tbp0 : 14; - u64 tbw : 6; - u64 psm : 6; - u64 tw : 4; - u64 th : 4; - u64 tcc : 1; - u64 tfx : 2; - u64 cbp : 14; - u64 cpsm : 4; - u64 csm : 1; - u64 csa : 5; - u64 cld : 3; - }; - - u64 _u64; - u32 _u32[2]; - u16 _u16[4]; - u8 _u8[8]; - - tex_0_info(u64 data) { _u64 = data; } - tex_0_info(u32 data) { _u32[0] = data; _u32[1] = 0; } - tex_0_info(u32 data0, u32 data1) { _u32[0] = data0; _u32[1] = data1; } - - u32 tbw_mult() - { - if (tbw == 0) - return 64; - else - return ((u32)tbw << 6); - } - - u32 psm_fix() - { - // ZZLog::Debug_Log("psm %d\n", psm); - if (psm == 9) return 1; - - return psm; - } - - u32 tw_exp() - { - if (tw > 10) return (1 << 10); - - return (1 << tw); - } - - u32 th_exp() - { - if (th > 10) return (1 << 10); - - return (1 << th); - } - - u32 cpsm_fix() - { - return cpsm & 0xe; - } - - u32 csa_fix() - { - if (cpsm < 2) - return (csa & 0xf); - else - return (csa & 0x1f); - } -}; - -#define TEX_MODULATE 0 -#define TEX_DECAL 1 -#define TEX_HIGHLIGHT 2 -#define TEX_HIGHLIGHT2 3 - -bool SaveTexture(const char* filename, u32 textarget, u32 tex, int width, int height); -extern void SaveTex(tex0Info* ptex, int usevid); -extern char* NamedSaveTex(tex0Info* ptex, int usevid); - -typedef struct -{ - int lcm; - int mxl; - int mmag; - int mmin; - int mtba; - int l; - int k; -} tex1Info; - -typedef struct -{ - int wms; - int wmt; - int minu; - int maxu; - int minv; - int maxv; -} clampInfo; - -typedef struct -{ - int cbw; - int cou; - int cov; -} clutInfo; - -typedef struct -{ - int tbp[3]; - int tbw[3]; -} miptbpInfo; - -typedef struct -{ - u16 aem; - u8 ta[2]; - float fta[2]; -} texaInfo; - -typedef struct -{ - int sx; - int sy; - int dx; - int dy; - int diry; - int dirx; -} trxposInfo; - -typedef struct -{ - union - { - struct - { - u8 a : 2; - u8 b : 2; - u8 c : 2; - u8 d : 2; - }; - u8 abcd; - }; - - u8 fix : 8; -} alphaInfo; - -typedef struct -{ - u16 zbp; // u16 address / 64 - u8 psm; - u8 zmsk; -} zbufInfo; - -typedef struct -{ - int fba; -} fbaInfo; - -typedef struct -{ - Vertex gsvertex[4]; // circular buffer that contains the vertex - Vertex gsTriFanVertex; // Base of triangle fan primitive vertex - u32 rgba; // global color for flat shading texture - float q; - Vertex vertexregs; // accumulation buffer that collect current vertex data - - int primC; // number of verts current storing - int primIndex; // current prim index - int nTriFanVert; // remember the index of the base of triangle fan - int new_tri_fan; // 1 if we process a new triangle fan primitive. 0 otherwise - - int prac; - int dthe; - int colclamp; - int fogcol; - int smask; - int pabe; - u64 buff[2]; - int buffsize; - int cbp[2]; // internal cbp registers - - u32 CSRw; - - primInfo _prim[2]; - bufInfo srcbuf, srcbufnew; - bufInfo dstbuf, dstbufnew; - - clutInfo clut; - - texaInfo texa; - trxposInfo trxpos, trxposnew; - - int imageWtemp, imageHtemp; - - int imageTransfer; - int imageWnew, imageHnew, imageX, imageY, imageEndX, imageEndY; - - pathInfo path[4]; - GIFRegDIMX dimx; - GSMemory mem; - GSClut clut_buffer; - int primNext(int inc = 1) - { - // Note: ArraySize(gsvertex) == 2^n => modulo is replaced by an and instruction - return ((primIndex + inc) % ArraySize(gsvertex)); - } - - int primPrev(int dec = 1) - { - // Note: assert( dec <= ArraySize(gsvertex) ); - // Note: ArraySize(gsvertex) == 2^n => modulo is replaced by an and instruction - return ((primIndex + (ArraySize(gsvertex) - dec)) % ArraySize(gsvertex)); - } - - void setRGBA(u32 r, u32 g, u32 b, u32 a) - { - rgba = (r & 0xff) | - ((g & 0xff) << 8) | - ((b & 0xff) << 16) | - ((a & 0xff) << 24); - } - - inline void add_vertex(u16 x, u16 y, u32 z, u16 f) - { - vertexregs.x = x; - vertexregs.y = y; - vertexregs.z = z; - vertexregs.f = f; - if (likely(!new_tri_fan)) { - gsvertex[primIndex] = vertexregs; - } else { - gsTriFanVertex = vertexregs; - new_tri_fan = false; - } - } - - inline void add_vertex(u16 x, u16 y, u32 z) - { - vertexregs.x = x; - vertexregs.y = y; - vertexregs.z = z; - if (likely(!new_tri_fan)) { - gsvertex[primIndex] = vertexregs; - } else { - gsTriFanVertex = vertexregs; - new_tri_fan = false; - } - } -} GSinternal; - -extern GSinternal gs; - -// Note the function is used in a template parameter so it must be declared extern -// Note2: In this case extern is not compatible with __forceinline so just inline it... -extern inline u16 RGBA32to16(u32 c) -{ - return (u16)((((c) & 0x000000f8) >> 3) | - (((c) & 0x0000f800) >> 6) | - (((c) & 0x00f80000) >> 9) | - (((c) & 0x80000000) >> 16)); -} - -static __forceinline u32 RGBA16to32(u16 c) -{ - return (((c) & 0x001f) << 3) | - (((c) & 0x03e0) << 6) | - (((c) & 0x7c00) << 9) | - (((c) & 0x8000) ? 0xff000000 : 0); -} - -#if 0 -// converts float16 [0,1] to BYTE [0,255] (assumes value is in range, otherwise will take lower 8bits) -// f is a u16 -static __forceinline u16 Float16ToBYTE(u16 f) -{ - //assert( !(f & 0x8000) ); - if (f & 0x8000) return 0; - - u16 d = ((((f & 0x3ff) | 0x400) * 255) >> (10 - ((f >> 10) & 0x1f) + 15)); - - return d > 255 ? 255 : d; -} - -static __forceinline u16 Float16ToALPHA(u16 f) -{ - //assert( !(f & 0x8000) ); - if (f & 0x8000) return 0; - - // round up instead of down (crash and burn), too much and charlie breaks - u16 d = (((((f & 0x3ff) | 0x400)) * 255) >> (10 - ((f >> 10) & 0x1f) + 15)); - - d = (d) >> 1; - - return d > 255 ? 255 : d; -} - -#ifndef COLOR_ARGB -#define COLOR_ARGB(a,r,g,b) \ - ((u32)((((a)&0xff)<<24)|(((r)&0xff)<<16)|(((g)&0xff)<<8)|((b)&0xff))) -#endif - -// assumes that positive in [1,2] (then extracts fraction by just looking at the specified bits) -#define Float16ToBYTE_2(f) ((u8)(*(u16*)&f>>2)) -#define Float16To5BIT(f) (Float16ToBYTE(f)>>3) - -#define Float16Alpha(f) (((*(u16*)&f&0x7c00)>=0x3900)?0x8000:0) // alpha is >= 1 - -// converts an array of 4 u16s to a u32 color -// f is a pointer to a u16 -#define Float16ToARGB(f) COLOR_ARGB(Float16ToALPHA(f.w), Float16ToBYTE(f.x), Float16ToBYTE(f.y), Float16ToBYTE(f.z)); - -#define Float16ToARGB16(f) (Float16Alpha(f.w)|(Float16To5BIT(f.x)<<10)|(Float16To5BIT(f.y)<<5)|Float16To5BIT(f.z)) - -// used for Z values -#define Float16ToARGB_Z(f) COLOR_ARGB((u32)Float16ToBYTE_2(f.w), Float16ToBYTE_2(f.x), Float16ToBYTE_2(f.y), Float16ToBYTE_2(f.z)) -#define Float16ToARGB16_Z(f) ((Float16ToBYTE_2(f.y)<<8)|Float16ToBYTE_2(f.z)) -#endif - - -inline float Clamp(float fx, float fmin, float fmax) -{ - if (fx < fmin) return fmin; - - return fx > fmax ? fmax : fx; -} - -// Get pixel storage format from tex0. Clutted textures store pixels in cpsm format. -inline int PIXEL_STORAGE_FORMAT(const tex0Info& tex) { - if (PSMT_ISCLUT(tex.psm)) - return tex.cpsm; - else - return tex.psm; - } - -// If pixel storage format not PSMCT24 ot PSMCT32, then it is 16-bit. -// Z-textures have 0x30 upper bits, so we eliminate them by &&(~0x30) -inline bool PSMT_ISHALF_STORAGE(const tex0Info& tex0) { return ((PIXEL_STORAGE_FORMAT(tex0) & (~0x30)) > 1); } - -//--------------------------- Inlines for bitwise ops -//--------------------------- textures -// Tex0Info (TEXD_x registers) bits, lower word -// The register is really 64-bit, but we use 2 32bit ones to represent it -// Obtain tbp0 -- Texture Buffer Base Pointer (Word Address/64) -- from data. Bits 0-13. -static __forceinline int ZZOglGet_tbp0_TexBits(u32 data) -{ - //return tex_0_info(data).tbp0; - return (data) & 0x3fff; -} - -// Obtain tbw -- Texture Buffer Width (Texels/64) -- from data, do not multiply to 64. Bits 14-19 -// ( data & 0xfc000 ) >> 14 -static __forceinline int ZZOglGet_tbw_TexBits(u32 data) -{ - //return tex_0_info(data).tbw; - return (data >> 14) & 0x3f; -} - -// Obtain tbw -- Texture Buffer Width (Texels) -- from data, do multiply to 64, never return 0. -static __forceinline int ZZOglGet_tbw_TexBitsMult(u32 data) -{ - //return text_0_info(data).tbw_mult(); - int result = ZZOglGet_tbw_TexBits(data); - - if (result == 0) - return 64; - else - return (result << 6); -} - -// Obtain psm -- Pixel Storage Format -- from data. Bits 20-25. -// (data & 0x3f00000) >> 20 -static __forceinline int ZZOglGet_psm_TexBits(u32 data) -{ - //return tex_0_info(data).psm; - return ((data >> 20) & 0x3f); -} - -// Obtain psm -- Pixel Storage Format -- from data. Bits 20-25. Fix incorrect psm == 9 -static __forceinline int ZZOglGet_psm_TexBitsFix(u32 data) -{ - //return tex_0_info(data).psm_fix(); - int result = ZZOglGet_psm_TexBits(data) ; -// ZZLog::Debug_Log("result %d", result); - - if (result == 9) result = 1; - - return result; -} - -// Obtain tw -- Texture Width (Width = 2^TW) -- from data. Bits 26-29 -// (data & 0x3c000000)>>26 -static __forceinline u16 ZZOglGet_tw_TexBits(u32 data) -{ - //return tex_0_info(data).tw; - return ((data >> 26) & 0xf); -} - -// Obtain tw -- Texture Width (Width = TW) -- from data. Width could newer be more than 1024. -static __forceinline u16 ZZOglGet_tw_TexBitsExp(u32 data) -{ - //return tex_0_info(data).tw_exp(); - u16 result = ZZOglGet_tw_TexBits(data); - - if (result > 10) result = 10; - - return (1 << result); -} - -// TH set at the border of upper and higher words. -// Obtain th -- Texture Height (Height = 2^TH) -- from data. Bits 30-31 lower, 0-1 higher -// (dataLO & 0xc0000000) >> 30 + (dataHI & 0x3) * 0x4 -static __forceinline u16 ZZOglGet_th_TexBits(u32 dataLO, u32 dataHI) -{ - //return tex_0_info(dataLO, dataHI).th; - return (((dataLO >> 30) & 0x3) | ((dataHI & 0x3) << 2)); -} - -// Obtain th --Texture Height (Height = 2^TH) -- from data. Height could newer be more than 1024. -static __forceinline u16 ZZOglGet_th_TexBitsExp(u32 dataLO, u32 dataHI) -{ - //return tex_0_info(dataLO, dataHI).th_exp(); - u16 result = ZZOglGet_th_TexBits(dataLO, dataHI); - - if (result > 10) result = 10; - - return (1 << result); -} - -// Tex0Info bits, higher word. -// Obtain tcc -- Texture Color Component 0=RGB, 1=RGBA + use Alpha from TEXA reg when not in PSM -- from data. Bit 3 -// (data & 0x4)>>2 -static __forceinline u8 ZZOglGet_tcc_TexBits(u32 data) -{ - //return tex_0_info(0, data).tcc; - return ((data >> 2) & 0x1); -} - -// Obtain tfx -- Texture Function (0=modulate, 1=decal, 2=hilight, 3=hilight2) -- from data. Bit 4-5 -// (data & 0x18)>>3 -static __forceinline u8 ZZOglGet_tfx_TexBits(u32 data) -{ - //return tex_0_info(0, data).tfx; - return ((data >> 3) & 0x3); -} - -// Obtain cbp from data -- Clut Buffer Base Pointer (Address/256) -- Bits 5-18 -// (data & 0x7ffe0)>>5 -static __forceinline int ZZOglGet_cbp_TexBits(u32 data) -{ - //return tex_0_info(0, data).cbp; - return ((data >> 5) & 0x3fff); -} - -// Obtain cpsm from data -- Clut pixel Storage Format -- Bits 19-22. 22nd is at no use. -// (data & 0x700000)>>19 -// 0000 - psmct32; 0010 - psmct16; 1010 - psmct16s. -static __forceinline u8 ZZOglGet_cpsm_TexBits(u32 data) -{ - //return (tex_0_info(0, data).cpsm & 0xe); - return ((data >> 19) & 0xe); -} - -// Obtain csm -- I don't know what is it -- from data. Bit 23 -// (data & 0x800000)>>23 -// csm is the clut storage mode. 0 for CSM1, 1 for CSM2. -static __forceinline u8 ZZOglGet_csm_TexBits(u32 data) -{ - //return tex_0_info(0, data).csm; - return ((data >> 23) & 0x1); -} - -// Obtain csa -- -- from data. Bits 24-28 -// (data & 0x1f000000)>>24 -static __forceinline u8 ZZOglGet_csa_TexBits(u32 data) -{ - //return tex_0_info(0, data).csa_fix(); - - if ((data & 0x700000) == 0) // it is cpsm < 2 check - return ((data >> 24) & 0xf); - else - return ((data >> 24) & 0x1f); -} - -// Obtain cld -- -- from data. Bits 29-31 -// (data & 0xe0000000)>>29 -static __forceinline u8 ZZOglGet_cld_TexBits(u32 data) -{ - //return tex_0_info(0, data).cld; - return ((data >> 29) & 0x7); -} - -//-------------------------- frames -// FrameInfo bits. -// Obtain fbp -- frame Buffer Base Pointer (Word Address/2048) -- from data. Bits 0-15 -inline int ZZOglGet_fbp_FrameBits(u32 data) -{ - return ((data) & 0x1ff); -} - -// So we got address / 64, henceby frame fbp and tex tbp have the same dimension -- "real address" is x64. -inline int ZZOglGet_fbp_FrameBitsMult(u32 data) -{ - return (ZZOglGet_fbp_FrameBits(data) << 5); -} - -// Obtain fbw -- width (Texels/64) -- from data. Bits 16-23 -inline int ZZOglGet_fbw_FrameBits(u32 data) -{ - return ((data >> 16) & 0x3f); -} - -inline int ZZOglGet_fbw_FrameBitsMult(u32 data) -{ - return (ZZOglGet_fbw_FrameBits(data) << 6); -} - - -// Obtain psm -- Pixel Storage Format -- from data. Bits 24-29. -// (data & 0x3f000000) >> 24 -inline int ZZOglGet_psm_FrameBits(u32 data) -{ - return ((data >> 24) & 0x3f); -} - -// Function for calculating overal height from frame data. -inline int ZZOgl_fbh_Calc(int fbp, int fbw, int psm) -{ - int fbh = (1024 * 1024 - 64 * fbp) / fbw; - fbh &= ~0x1f; - - if (PSMT_ISHALF(psm)) fbh *= 2; - if (fbh > 1024) fbh = 1024; - - //ZZLog::Debug_Log("ZZOgl_fbh_Calc: 0x%x", fbh); - return fbh; -} - -inline int ZZOgl_fbh_Calc(frameInfo frame) -{ - return ZZOgl_fbh_Calc(frame.fbp, frame.fbw, frame.psm); -} - -// Calculate fbh from data, It does not set in register -inline int ZZOglGet_fbh_FrameBitsCalc(u32 data) -{ - int fbh = 0; - int fbp = ZZOglGet_fbp_FrameBits(data); - int fbw = ZZOglGet_fbw_FrameBits(data); - int psm = ZZOglGet_psm_FrameBits(data); - - if (fbw > 0) fbh = ZZOgl_fbh_Calc(fbp, fbw, psm) ; - - return fbh ; -} - -// Obtain fbm -- frame mask -- from data. All higher word. -inline u32 ZZOglGet_fbm_FrameBits(u32 data) -{ - return (data); -} - -// Obtain fbm -- frame mask -- from data. All higher word. Fixed from psm == PCMT24 (without alpha) -inline u32 ZZOglGet_fbm_FrameBitsFix(u32 dataLO, u32 dataHI) -{ - if (PSMT_BITMODE(ZZOglGet_psm_FrameBits(dataLO)) == 1) - return (dataHI | 0xff000000); - else - return dataHI; -} - -// obtain colormask RED -inline u32 ZZOglGet_fbmRed_FrameBits(u32 data) -{ - return (data & 0xff); -} - -// obtain colormask Green -inline u32 ZZOglGet_fbmGreen_FrameBits(u32 data) -{ - return ((data >> 8) & 0xff); -} - -// obtain colormask Blue -inline u32 ZZOglGet_fbmBlue_FrameBits(u32 data) -{ - return ((data >> 16) & 0xff); -} - -// obtain colormask Alpha -inline u32 ZZOglGet_fbmAlpha_FrameBits(u32 data) -{ - return ((data >> 24) & 0xff); -} - -// obtain colormask Alpha -inline u32 ZZOglGet_fbmHighByte(u32 data) -{ - return (!!(data & 0x80000000)); -} - -//-------------------------- tex0 comparison -// Check if old and new tex0 registers have only clut difference -inline bool ZZOglAllExceptClutIsSame(const u32* oldtex, const u32* newtex) -{ - return ((oldtex[0] == newtex[0]) && ((oldtex[1] & 0x1f) == (newtex[1] & 0x1f))); -} - -// Check if the CLUT registers are same, except CLD -inline bool ZZOglClutMinusCLDunchanged(const u32* oldtex, const u32* newtex) -{ - return ((oldtex[1] & 0x1fffffe0) == (newtex[1] & 0x1fffffe0)); -} - -// Check if CLUT storage mode is not changed (CSA, CSM and CSPM) -inline bool ZZOglClutStorageUnchanged(const u32* oldtex, const u32* newtex) -{ - return ((oldtex[1] & 0x1ff10000) == (newtex[1] & 0x1ff10000)); -} - -// call to load CLUT data (depending on CLD) -void texClutWrite(int ctx); - -// Perform clutting for flushed texture. Better check if it needs a prior call. -inline void CluttingForFlushedTex(tex0Info* tex0, u32 Data, int ictx) -{ - tex0->cbp = ZZOglGet_cbp_TexBits(Data); - tex0->cpsm = ZZOglGet_cpsm_TexBits(Data); - tex0->csm = ZZOglGet_csm_TexBits(Data); - tex0->csa = ZZOglGet_csa_TexBits(Data); - tex0->cld = ZZOglGet_cld_TexBits(Data); - - texClutWrite(ictx); - }; - -// CSA and CPSM bitmask 0001 1111 0111 1000 ... -// 60 56 52 -#define CPSM_CSA_BITMASK 0x1f780000 -#define CPSM_CSA_NOTMASK 0xe0870000 - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/GSDump.cpp b/plugins/zzogl-pg-cg/opengl/GSDump.cpp deleted file mode 100644 index 70381c7d98..0000000000 --- a/plugins/zzogl-pg-cg/opengl/GSDump.cpp +++ /dev/null @@ -1,97 +0,0 @@ -/* - * Copyright (C) 2007-2009 Gabest - * http://www.gabest.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#include "GSDump.h" - -GSDump::GSDump() - : m_gs(NULL) - , m_frames(0) -{ -} - -GSDump::~GSDump() -{ - Close(); -} - -void GSDump::Open(const string& fn, u32 crc, const freezeData& fd, u8* regs) -{ - if (m_gs) return; - - m_gs = fopen(fn.c_str(), "wb"); - - m_frames = 0; - - if(m_gs) - { - fwrite(&crc, 4, 1, m_gs); - fwrite(&fd.size, 4, 1, m_gs); - fwrite(fd.data, fd.size, 1, m_gs); - fwrite(regs, 0x2000, 1, m_gs); - } -} - -void GSDump::Close() -{ - if(m_gs) { - fclose(m_gs); - m_gs = NULL; - fprintf(stderr, "Closing GS dump"); - } -} - -void GSDump::Transfer(int index, const u32* mem, size_t size, u32 real_size) -{ - if(m_gs && size > 0) - { - fputc(0, m_gs); - fputc(index, m_gs); - fwrite(&size, 4, 1, m_gs); - fwrite(&real_size, 4, 1, m_gs); - fwrite(mem, size, 1, m_gs); - } -} - -void GSDump::ReadFIFO(u32 size) -{ - if(m_gs && size > 0) - { - fputc(2, m_gs); - fwrite(&size, 4, 1, m_gs); - } -} - -void GSDump::VSync(int field, bool last, u8* regs) -{ - if(m_gs) - { - fputc(3, m_gs); - fwrite(regs, 0x2000, 1, m_gs); - - fputc(1, m_gs); - fwrite(&field, 4, 1, m_gs); - - if((++m_frames & 1) == 0 && last) - { - Close(); - } - } -} diff --git a/plugins/zzogl-pg-cg/opengl/GSDump.h b/plugins/zzogl-pg-cg/opengl/GSDump.h deleted file mode 100644 index 066812bd9d..0000000000 --- a/plugins/zzogl-pg-cg/opengl/GSDump.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * Copyright (C) 2007-2009 Gabest - * http://www.gabest.org - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#pragma once - -#include "Util.h" - -using namespace std; - -/* - -Dump file format: -- [crc/4] [state size/4] [state data/size] [PMODE/0x2000] [id/1] [data/?] .. [id/1] [data/?] - -Transfer data (id == 0) -- [0/1] [path index/1] [size/4] [data/size] - -VSync data (id == 1) -- [1/1] [field/1] - -ReadFIFO2 data (id == 2) -- [2/1] [size/?] - -Regs data (id == 3) -- [PMODE/0x2000] - -*/ - -class GSDump -{ - FILE* m_gs; - int m_frames; - -public: - GSDump(); - virtual ~GSDump(); - - void Open(const string& fn, u32 crc, const freezeData& fd, u8* regs); - void Close(); - void ReadFIFO(u32 size); - void Transfer(int index, const u32* mem, size_t size, u32 real_size); - void VSync(int field, bool last, u8* regs); - operator bool() {return m_gs != NULL;} -}; - -extern GSDump g_dump; - diff --git a/plugins/zzogl-pg-cg/opengl/GSmain.cpp b/plugins/zzogl-pg-cg/opengl/GSmain.cpp deleted file mode 100644 index 618a6dab13..0000000000 --- a/plugins/zzogl-pg-cg/opengl/GSmain.cpp +++ /dev/null @@ -1,810 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "Util.h" -#include "GS.h" -#include "Profile.h" -#include "GLWin.h" -#include "ZZoglFlushHack.h" - - -using namespace std; - -extern void SaveSnapshot(const char* filename); - -#ifdef _MSC_VER -#pragma warning(disable:4244) -#endif - -GLWindow GLWin; -GSinternal gs; -GSconf conf; -GSDump g_dump; - -int ppf, g_GSMultiThreaded, CurrentSavestate = 0; -int g_LastCRC = 0, g_TransferredToGPU = 0, s_frameskipping = 0; -int g_SkipFlushFrame = 0; -GetSkipCount GetSkipCount_Handler = 0; - -int UPDATE_FRAMES = 16, g_nFrame = 0, g_nRealFrame = 0; -float fFPS = 0; - -void (*GSirq)(); -u8* g_pBasePS2Mem = NULL; -wxString s_strIniPath(L"inis"); // Air's new ini path (r2361) - -bool SaveStateExists = true; // We could not know save slot status before first change occured -const char* SaveStateFile = NULL; // Name of SaveFile for access check. - -extern const char* s_aa[5]; -extern const char* pbilinear[]; -// statistics -u32 g_nGenVars = 0, g_nTexVars = 0, g_nAlphaVars = 0, g_nResolve = 0; - -#define VER 3 -const unsigned char zgsversion = PS2E_GS_VERSION; -unsigned char zgsrevision = 0; // revision and build gives plugin version -unsigned char zgsbuild = VER; -unsigned char zgsminor = 0; - -#ifdef _DEBUG -char *libraryName = "ZZ Ogl PG CG (Debug) "; -#elif defined(ZEROGS_DEVBUILD) -char *libraryName = "ZZ Ogl PG CG (Dev) "; -#else -char *libraryName = "ZZ Ogl PG CG "; -#endif - -extern int g_nPixelShaderVer, g_nFrameRender, g_nFramesSkipped; - -extern void WriteAA(); -extern void WriteBilinear(); -extern void ZZDestroy(); -extern bool ZZCreate(int width, int height); -extern void ZZGSStateReset(); -extern int ZZSave(s8* pbydata); -extern bool ZZLoad(s8* pbydata); - -// switches the render target to the real target, flushes the current render targets and renders the real image -extern void RenderCRTC(int interlace); - -#if defined(_WIN32) && defined(_DEBUG) -HANDLE g_hCurrentThread = NULL; -#endif - -extern int VALIDATE_THRESH; -extern u32 TEXDESTROY_THRESH; - -u32 CALLBACK PS2EgetLibType() -{ - return PS2E_LT_GS; -} - -char* CALLBACK PS2EgetLibName() -{ - return libraryName; -} - -u32 CALLBACK PS2EgetLibVersion2(u32 type) -{ - return (zgsversion << 16) | (zgsrevision << 8) | zgsbuild | (zgsminor << 24); -} - -void CALLBACK GSsetBaseMem(void* pmem) -{ - g_pBasePS2Mem = (u8*)pmem; -} - -void CALLBACK GSsetSettingsDir(const char* dir) -{ - s_strIniPath = (dir == NULL) ? wxString(L"inis") : wxString(dir, wxConvFile); -} - -void CALLBACK GSsetLogDir(const char* dir) -{ - ZZLog::SetDir(dir); -} - -void CALLBACK GSsetGameCRC(int crc, int options) -{ - // build a list of function pointer for GetSkipCount (SkipDraw) - static GetSkipCount GSC_list[NUMBER_OF_TITLES]; - static bool inited = false; - - if (!inited) - { - inited = true; - - memset(GSC_list, 0, sizeof(GSC_list)); - - GSC_list[Okami] = GSC_Okami; - GSC_list[MetalGearSolid3] = GSC_MetalGearSolid3; - GSC_list[DBZBT2] = GSC_DBZBT2; - GSC_list[DBZBT3] = GSC_DBZBT3; - GSC_list[SFEX3] = GSC_SFEX3; - GSC_list[Bully] = GSC_Bully; - GSC_list[BullyCC] = GSC_BullyCC; - GSC_list[SoTC] = GSC_SoTC; - GSC_list[OnePieceGrandAdventure] = GSC_OnePieceGrandAdventure; - GSC_list[OnePieceGrandBattle] = GSC_OnePieceGrandBattle; - GSC_list[ICO] = GSC_ICO; - GSC_list[GT4] = GSC_GT4; - GSC_list[WildArms4] = GSC_WildArms4; - GSC_list[WildArms5] = GSC_WildArms5; - GSC_list[Manhunt2] = GSC_Manhunt2; - GSC_list[CrashBandicootWoC] = GSC_CrashBandicootWoC; - GSC_list[ResidentEvil4] = GSC_ResidentEvil4; - GSC_list[Spartan] = GSC_Spartan; - GSC_list[AceCombat4] = GSC_AceCombat4; - GSC_list[Drakengard2] = GSC_Drakengard2; - GSC_list[Tekken5] = GSC_Tekken5; - GSC_list[IkkiTousen] = GSC_IkkiTousen; - GSC_list[GodOfWar] = GSC_GodOfWar; - GSC_list[GodOfWar2] = GSC_GodOfWar2; - GSC_list[GiTS] = GSC_GiTS; - GSC_list[Onimusha3] = GSC_Onimusha3; - GSC_list[TalesOfAbyss] = GSC_TalesOfAbyss; - GSC_list[SonicUnleashed] = GSC_SonicUnleashed; - GSC_list[Genji] = GSC_Genji; - GSC_list[StarOcean3] = GSC_StarOcean3; - GSC_list[ValkyrieProfile2] = GSC_ValkyrieProfile2; - GSC_list[RadiataStories] = GSC_RadiataStories; - } - - // TEXDESTROY_THRESH starts out at 16. - VALIDATE_THRESH = 8; - conf.mrtdepth = (conf.settings().disable_mrt_depth != 0); - - if (!conf.mrtdepth) - ZZLog::WriteLn("Disabling MRT depth writing."); - else - ZZLog::WriteLn("Enabling MRT depth writing."); - - bool CRCValueChanged = (g_LastCRC != crc); - - g_LastCRC = crc; - - if (crc != 0) ZZLog::WriteLn("Current game CRC is %x.", crc); - - if (CRCValueChanged && (crc != 0)) - { - for (int i = 0; i < GAME_INFO_INDEX; i++) - { - if (crc_game_list[i].crc == crc) - { - ZZLog::WriteLn("Found CRC[%x] in crc game list.", crc); - - if (crc_game_list[i].v_thresh > 0) - { - VALIDATE_THRESH = crc_game_list[i].v_thresh; - ZZLog::WriteLn("Setting VALIDATE_THRESH to %d", VALIDATE_THRESH); - } - - if (crc_game_list[i].t_thresh > 0) - { - TEXDESTROY_THRESH = crc_game_list[i].t_thresh; - ZZLog::WriteLn("Setting TEXDESTROY_THRESH to %d", TEXDESTROY_THRESH); - } - - // FIXME need to check SkipDraw is positive (enabled by users) - GetSkipCount_Handler = GSC_list[crc_game_list[i].title]; - - if (!conf.disableHacks) - { - conf.def_hacks._u32 |= crc_game_list[i].flags; - ListHacks(); - } - return; - } - } - } - ListHacks(); -} - -void CALLBACK GSsetFrameSkip(int frameskip) -{ - FUNCLOG - s_frameskipping |= frameskip; - - if (frameskip && g_nFrameRender > 1) - { - SetFrameSkip(true); - } - else if (!frameskip && g_nFrameRender <= 0) - { - SetFrameSkip(false); - } -} - -void CALLBACK GSreset() -{ - FUNCLOG - - memset(&gs, 0, sizeof(gs)); - - ZZGSStateReset(); - - gs.prac = 1; - prim = &gs._prim[0]; - gs.imageTransfer = -1; - gs.q = 1; -} - -void CALLBACK GSgifSoftReset(u32 mask) -{ - FUNCLOG - - if (mask & 1) memset(&gs.path[0], 0, sizeof(gs.path[0])); - if (mask & 2) memset(&gs.path[1], 0, sizeof(gs.path[1])); - if (mask & 4) memset(&gs.path[2], 0, sizeof(gs.path[2])); - - gs.imageTransfer = -1; - gs.q = 1; -} - -s32 CALLBACK GSinit() -{ - FUNCLOG - - ZZLog::Open(); - ZZLog::WriteLn("Calling GSinit."); - - WriteTempRegs(); - GSreset(); - - ZZLog::WriteLn("GSinit finished."); - return 0; -} - -__forceinline void InitMisc() -{ - WriteBilinear(); - WriteAA(); - InitProfile(); - InitPath(); - ResetRegs(); -} - -s32 CALLBACK GSopen(void *pDsp, char *Title, int multithread) -{ - FUNCLOG - - g_GSMultiThreaded = multithread; - - ZZLog::WriteLn("Calling GSopen."); - -#if defined(_WIN32) && defined(_DEBUG) - g_hCurrentThread = GetCurrentThread(); -#endif - - LoadConfig(); - strcpy(GLWin.title, Title); - - ZZLog::GS_Log("Using %s:%d.%d.%d.", libraryName, zgsrevision, zgsbuild, zgsminor); - - ZZLog::WriteLn("Creating ZZOgl window."); - if ((!GLWin.CreateWindow(pDsp)) || (!ZZCreate(conf.width, conf.height))) return -1; - - ZZLog::WriteLn("Initialization successful."); - - InitMisc(); - ZZLog::GS_Log("GSopen finished."); - return 0; -} - -#ifdef USE_GSOPEN2 -EXPORT_C_(s32) GSopen2( void* pDsp, u32 flags ) -{ - FUNCLOG - - g_GSMultiThreaded = true; - - ZZLog::WriteLn("Calling GSopen2."); - -#if defined(_WIN32) && defined(_DEBUG) - g_hCurrentThread = GetCurrentThread(); -#endif - - LoadConfig(); - - ZZLog::GS_Log("Using %s:%d.%d.%d.", libraryName, zgsrevision, zgsbuild, zgsminor); - - ZZLog::WriteLn("Capturing ZZOgl window."); - if ((!GLWin.CreateWindow(pDsp)) || (!ZZCreate(conf.width, conf.height))) return -1; - - ZZLog::WriteLn("Initialization successful."); - - InitMisc(); - ZZLog::GS_Log("GSopen2 finished."); - return 0; - -} -#endif - -void CALLBACK GSshutdown() -{ - FUNCLOG - - ZZLog::Close(); -} -void CALLBACK GSclose() -{ - FUNCLOG - - ZZDestroy(); - GLWin.CloseWindow(); - - SaveStateFile = NULL; - SaveStateExists = true; // default value - g_LastCRC = 0; -} - -void CALLBACK GSirqCallback(void (*callback)()) -{ - FUNCLOG - - GSirq = callback; -} - -void CALLBACK GSwriteCSR(u32 write) -{ - FUNCLOG - - gs.CSRw = write; -} - -#ifdef _WIN32 -#define access _access -#endif - -void CALLBACK GSchangeSaveState(int newstate, const char* filename) -{ - FUNCLOG - - char str[255]; - sprintf(str, "save state %d", newstate); - ZZAddMessage(str); - CurrentSavestate = newstate; - - SaveStateFile = filename; - SaveStateExists = (access(SaveStateFile, 0) == 0); -} - -static bool get_snapshot_filename(char *filename, char* path, const char* extension) -{ - FUNCLOG - - FILE *bmpfile; - u32 snapshotnr = 0; - - // increment snapshot value & try to get filename - - for (;;) - { - snapshotnr++; - - sprintf(filename, "%s/snap%03d.%s", path, snapshotnr, extension); - - bmpfile = fopen(filename, "rb"); - - if (bmpfile == NULL) break; - - fclose(bmpfile); - } - - // try opening new snapshot file - if ((bmpfile = fopen(filename, "wb")) == NULL) - { - char strdir[255]; - sprintf(strdir, "%s", path); - -#ifdef _WIN32 - CreateDirectory(wxString::FromUTF8(strdir), NULL); -#else - mkdir(path, 0777); -#endif - - if ((bmpfile = fopen(filename, "wb")) == NULL) return false; - } - - fclose(bmpfile); - - return true; -} - -void CALLBACK GSmakeSnapshot(char *path) -{ - FUNCLOG - - char filename[256]; - if (get_snapshot_filename(filename, path, (conf.zz_options.tga_snap) ? "bmp" : "jpg")) - SaveSnapshot(filename); -} - -// I'll probably move this somewhere else later, but it's got a ton of dependencies. -static __forceinline void SetGSTitle() -{ - char strtitle[256]; - -#if !defined(ZEROGS_DEVBUILD) - const char* g_pShaders[4] = { "full", "reduced", "accurate", "accurate-reduced" }; - const char* g_pInterlace[3] = { "interlace 0 |", "interlace 1 |", "" }; - const char* g_pBilinear[3] = { "", "bilinear |", "forced bilinear |" }; - - if (SaveStateFile != NULL && !SaveStateExists) - SaveStateExists = (access(SaveStateFile, 0) == 0); - else - SaveStateExists = true; - - sprintf(strtitle, "ZZ Open GL 0.%d.%d | %.1f fps | %s%s%s savestate %d%s | shaders %s | (%.1f)", zgsbuild, zgsminor, fFPS, - g_pInterlace[conf.interlace], g_pBilinear[conf.bilinear], (conf.aa ? s_aa[conf.aa] : ""), - CurrentSavestate, (SaveStateExists ? "" : "*"), - g_pShaders[g_nPixelShaderVer], (ppf&0xfffff) / (float)UPDATE_FRAMES); - -#else - sprintf(strtitle, "%d | %.1f fps (sk:%d%%) | g: %.1f, t: %.1f, a: %.1f, r: %.1f | p: %.1f | tex: %d %d (%d kbpf)", g_nFrame, fFPS, - 100*g_nFramesSkipped / g_nFrame, - g_nGenVars / (float)UPDATE_FRAMES, g_nTexVars / (float)UPDATE_FRAMES, g_nAlphaVars / (float)UPDATE_FRAMES, - g_nResolve / (float)UPDATE_FRAMES, (ppf&0xfffff) / (float)UPDATE_FRAMES, - g_MemTargs.listTargets.size(), g_MemTargs.listClearedTargets.size(), g_TransferredToGPU >> 10); - - //_snprintf(strtitle, 512, "%x %x", *(int*)(g_pbyGSMemory + 256 * 0x3e0c + 4), *(int*)(g_pbyGSMemory + 256 * 0x3e04 + 4)); -#endif - -// if( g_nFrame > 100 && fFPS > 60.0f ) { -// ZZLog::Debug_Log("Set profile."); -// g_bWriteProfile = 1; -// } - GLWin.SetTitle(strtitle); -} - -void CALLBACK GSvsync(int interlace) -{ - FUNCLOG - - //ZZLog::GS_Log("Calling GSvsync."); - - static u32 dwTime = timeGetTime(); - static int nToNextUpdate = 1; -#ifdef _DEBUG - if (conf.dump & 0x1) { - freezeData fd; - fd.size = ZZSave(NULL); - s8* payload = (s8*)malloc(fd.size); - fd.data = payload; - - ZZSave(fd.data); - - char filename[256]; - // FIXME, there is probably a better solution than /tmp ... - // A possibility will be to save the path from GSmakeSnapshot but you still need to call - // GSmakeSnapshot first. - if (get_snapshot_filename(filename, "/tmp", "gs")) - g_dump.Open(filename, g_LastCRC, fd, g_pBasePS2Mem); - conf.dump--; - - free(payload); - } - g_dump.VSync(interlace, (conf.dump == 0), g_pBasePS2Mem); -#endif - - GL_REPORT_ERRORD(); - - g_nRealFrame++; - - // !interlace? Hmmm... Fixme. - RenderCRTC(!interlace); - - GLWin.ProcessEvents(); - - if (--nToNextUpdate <= 0) - { - u32 d = timeGetTime(); - fFPS = UPDATE_FRAMES * 1000.0f / (float)max(d - dwTime, (u32)1); - dwTime = d; - g_nFrame += UPDATE_FRAMES; -#ifndef USE_GSOPEN2 - // let PCSX2 manage the title - SetGSTitle(); -#endif - -// if( g_nFrame > 100 && fFPS > 60.0f ) { -// ZZLog::Debug_Log("Set profile."); -// g_bWriteProfile = 1; -// } - - if (fFPS < 16) - UPDATE_FRAMES = 4; - else if (fFPS < 32) - UPDATE_FRAMES = 8; - else - UPDATE_FRAMES = 16; - - nToNextUpdate = UPDATE_FRAMES; - - ppf = 0; - g_TransferredToGPU = 0; - g_nGenVars = 0; - g_nTexVars = 0; - g_nAlphaVars = 0; - g_nResolve = 0; - g_nFramesSkipped = 0; - g_SkipFlushFrame = 0; - } - -#if defined(ZEROGS_DEVBUILD) - if (g_bWriteProfile) - { - //g_bWriteProfile = 0; - DVProfWrite("prof.txt", UPDATE_FRAMES); - DVProfClear(); - } - -#endif - GL_REPORT_ERRORD(); - -} - -void CALLBACK GSreadFIFO(u64 *pMem) -{ - FUNCLOG - - //ZZLog::GS_Log("Calling GSreadFIFO."); -#ifdef _DEBUG - g_dump.ReadFIFO(1); -#endif - - TransferLocalHost((u32*)pMem, 1); -} - -void CALLBACK GSreadFIFO2(u64 *pMem, int qwc) -{ - FUNCLOG - - //ZZLog::GS_Log("Calling GSreadFIFO2."); -#ifdef _DEBUG - g_dump.ReadFIFO(qwc); -#endif - - TransferLocalHost((u32*)pMem, qwc); -} - -int CALLBACK GSsetupRecording(int start, void* pData) -{ - FUNCLOG - - if (start) - StartCapture(); - else - StopCapture(); - - return 1; -} - -s32 CALLBACK GSfreeze(int mode, freezeData *data) -{ - FUNCLOG - - switch (mode) - { - case FREEZE_LOAD: - if (!ZZLoad(data->data)) ZZLog::Error_Log("GS: Bad load format!"); - g_nRealFrame += 100; - break; - - case FREEZE_SAVE: - ZZSave(data->data); - break; - - case FREEZE_SIZE: - data->size = ZZSave(NULL); - break; - - default: - break; - } - - return 0; -} - -#ifdef __linux__ - -struct Packet -{ - u8 type, param; - u32 size, addr; - u32 real_size; - vector buff; -}; - -EXPORT_C_(void) GSReplay(char* lpszCmdLine) -{ - if(FILE* fp = fopen(lpszCmdLine, "rb")) - { - GSinit(); - - u8 regs[0x2000]; - GSsetBaseMem(regs); - - //s_vsync = !!theApp.GetConfig("vsync", 0); - - void* hWnd = NULL; - - //_GSopen((void**)&hWnd, "", renderer); - GSopen((void**)&hWnd, "", 0); - - u32 crc; - fread(&crc, 4, 1, fp); - GSsetGameCRC(crc, 0); - - freezeData fd; - fread(&fd.size, 4, 1, fp); - fd.data = new s8[fd.size]; - fread(fd.data, fd.size, 1, fp); - GSfreeze(FREEZE_LOAD, &fd); - delete [] fd.data; - - fread(regs, 0x2000, 1, fp); - - long start = ftell(fp); - - GSvsync(1); - - list packets; - vector buff; - int type; - - while((type = fgetc(fp)) != EOF) - { - Packet* p = new Packet(); - - p->type = (u8)type; - - switch(type) - { - case 0: - - p->param = (u8)fgetc(fp); - - fread(&p->size, 4, 1, fp); - fread(&p->real_size, 4, 1, fp); - - switch(p->param) - { - case 0: - p->buff.resize(0x4000); - //p->addr = 0x4000 - p->size; - //fread(&p->buff[p->addr], p->size, 1, fp); - fread(&p->buff[0], p->size, 1, fp); - break; - case 1: - case 2: - case 3: - p->buff.resize(p->size); - fread(&p->buff[0], p->size, 1, fp); - break; - } - - break; - - case 1: - - fread(&p->param, 4, 1, fp); - //p->param = (u8)fgetc(fp); - - break; - - case 2: - - fread(&p->size, 4, 1, fp); - - break; - - case 3: - - p->buff.resize(0x2000); - - fread(&p->buff[0], 0x2000, 1, fp); - - break; - - default: assert(0); - } - - packets.push_back(p); - } - - sleep(1); - - //while(IsWindowVisible(hWnd)) - //FIXME map? - int finished = 2; - while(finished > 0) - { - unsigned long start = timeGetTime(); - unsigned long frame_number = 0; - for(list::iterator i = packets.begin(); i != packets.end(); i++) - { - Packet* p = *i; - - switch(p->type) - { - case 0: - - //fprintf(stderr, "TRANSFER %d size %d\n", p->param, p->real_size); - switch(p->param) - { - //case 0: GSgifTransfer1((u32*)&p->buff[0], p->addr); break; - case 0: _GSgifTransfer<0>(&p->buff[0], p->real_size); break; - case 1: GSgifTransfer2((u32*)&p->buff[0], p->real_size); break; - case 2: GSgifTransfer3((u32*)&p->buff[0], p->real_size); break; - case 3: GSgifTransfer((u32*)&p->buff[0], p->real_size); break; - } - - break; - - case 1: - - GSvsync(p->param); - frame_number++; - - break; - - case 2: - - if(buff.size() < p->size) buff.resize(p->size); - - // FIXME - // GSreadFIFO2(&buff[0], p->size / 16); - fprintf(stderr, "GSreadFIFO2 not yet implemented"); - - break; - - case 3: - - memcpy(regs, &p->buff[0], 0x2000); - - break; - } - } - unsigned long end = timeGetTime(); - fprintf(stderr, "The %ld frames of the scene was render on %ldms\n", frame_number, end - start); - fprintf(stderr, "A means of %fms by frame (limit 16ms/f)\n", (float)(end - start)/(float)frame_number); - - sleep(1); - finished--; - } - - - for(list::iterator i = packets.begin(); i != packets.end(); i++) - { - delete *i; - } - - packets.clear(); - - sleep(1); - - GSclose(); - GSshutdown(); - - fclose(fp); - } -} -#endif diff --git a/plugins/zzogl-pg-cg/opengl/GifTransfer.cpp b/plugins/zzogl-pg-cg/opengl/GifTransfer.cpp deleted file mode 100644 index 04be132299..0000000000 --- a/plugins/zzogl-pg-cg/opengl/GifTransfer.cpp +++ /dev/null @@ -1,288 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" -#include "Mem.h" -#include "GifTransfer.h" - -#ifdef _DEBUG -static int path1_count = 0; -#endif - -static int nPath3Hack = 0; - -void CALLBACK GSgetLastTag(u64* ptag) -{ - FUNCLOG - - *(u32*)ptag = nPath3Hack; - nPath3Hack = 0; -} - -#ifdef _WIN32 -// for debug assertion checks (thread affinity checks) -extern HANDLE g_hCurrentThread; -#endif - -__forceinline void gifTransferLog(int index, const u32 *pMem, u32 size) -{ -#ifdef DEBUG_TRANSFER - - if (conf.log) - { - static int nSaveIndex = 0; - ZZLog::Debug_Log("%d: p:%d %x", nSaveIndex++, index + 1, size); - int vals[4] = {0}; - - for (u32 i = 0; i < size; i++) - { - for (u32 j = 0; j < 4; ++j) - vals[j] ^= pMem[4*i+j]; - } - - ZZLog::Debug_Log("%x %x %x %x", vals[0], vals[1], vals[2], vals[3]); - } - -#endif -} - -extern int g_GSMultiThreaded; - -template void _GSgifTransfer(const u32 *pMem, u32 size) -{ - FUNCLOG - - pathInfo *path = &gs.path[index]; - -#ifdef _WIN32 - assert(g_hCurrentThread == GetCurrentThread()); -#endif - -#ifdef _DEBUG - gifTransferLog(index, pMem, size); - const u32* start = pMem; - u32 size_arg = size; -#endif - - while (size > 0) - { - //LOG(_T("Transfer(%08x, %d) START\n"), pMem, size); - if (path->nloop == 0) - { - path->setTag(pMem); - pMem += 4; - size--; - - // eeuser 7.2.2. GIFtag: "... when NLOOP is 0, the GIF does not output anything, and - // values other than the EOP field are disregarded." - if (path->nloop > 0) - { - gs.q = 1.0f; - - if (path->tag.PRE && (path->tag.FLG == GIF_FLG_PACKED)) - { - u64 tagprim = path->tag.PRIM; - GIFRegHandlerPRIM((u32*)&tagprim); - } - } - } - else - { - switch (path->mode) - { - case GIF_FLG_PACKED: - { - // Needs to be looked at. - - // first try a shortcut for a very common case - - if (path->adonly && size >= path->nloop) - { - size -= path->nloop; - - do - { - GIFPackedRegHandlerA_D(pMem); - - pMem += 4; //sizeof(GIFPackedReg)/4; - } - while(--path->nloop > 0); - break; - } - - do - { - u32 reg = path->GetReg(); - g_GIFPackedRegHandlers[reg](pMem); - - pMem += 4; //sizeof(GIFPackedReg)/4; - size--; - } - while (path->StepReg() && (size > 0)); - - break; - } - - case GIF_FLG_REGLIST: - { - // Needs to be looked at. - //ZZLog::GS_Log("%8.8x%8.8x %d L", ((u32*)&gs.regs)[1], *(u32*)&gs.regs, path->tag.nreg/4); - - size *= 2; - - do - { - g_GIFRegHandlers[path->GetReg()](pMem); - - pMem += 2; - size--; - } - while (path->StepReg() && (size > 0)); - - if (size & 1) pMem += 2; - size /= 2; - break; - } - - case GIF_FLG_IMAGE: // FROM_VFRAM - case GIF_FLG_IMAGE2: // Used in the DirectX version, so we'll use it here too. - { - int len = min(size, path->nloop); - //ZZLog::Error_Log("GIF_FLG_IMAGE(%d)=%d", gs.imageTransfer, len); - - switch (gs.imageTransfer) - { - case 0: - TransferHostLocal(pMem, len * 4); - break; - - case 1: - // This can't happen; downloads can not be started or performed as part of - // a GIFtag operation. They're an entirely separate process that can only be - // done through the ReverseFIFO transfer (aka ReadFIFO). --air - assert(0); - //TransferLocalHost(pMem, len); - break; - - case 2: - //TransferLocalLocal(); - break; - - case 3: - //assert(0); - break; - - default: - //assert(0); - break; - } - - pMem += len * 4; - - path->nloop -= len; - size -= len; - - break; - } - - default: // GIF_IMAGE - ZZLog::GS_Log("*** WARNING **** Unexpected GIFTag flag."); - assert(0); - path->nloop = 0; - break; - } - } - - if (index == 0) - { - if (path->tag.EOP && path->nloop == 0) - { - break; - } - } - } - -#ifdef _DEBUG - g_dump.Transfer(index, start, pMem - start + 4, size_arg); -#endif - - // This is the case when not all data was readed from one try: VU1 has too much data. - // So we should redo reading from the start. - if (index == 0) - { - if (size == 0 && path->nloop > 0) - { - if (g_GSMultiThreaded) - { - path->nloop = 0; - } - else - { - _GSgifTransfer<0>(pMem - 0x4000, 0x4000 / 16); - } - } - } -} - -void CALLBACK GSgifTransfer1(u32 *pMem, u32 addr) -{ - FUNCLOG - - //ZZLog::GS_Log("GSgifTransfer1 0x%x (mode %d).", addr, path->mode); - -#ifdef _DEBUG - ZZLog::Prim_Log("count: %d\n", path1_count); - path1_count++; -#endif - - _GSgifTransfer<0>((u32*)((u8*)pMem + addr), (0x4000 - addr) / 16); -} - -void CALLBACK GSgifTransfer2(u32 *pMem, u32 size) -{ - FUNCLOG - - //ZZLog::GS_Log("GSgifTransfer2 size = %lx (mode %d, gs.path2.tag.nloop = %d).", size, gs.path[1].mode, gs.path[1].tag.nloop); - - _GSgifTransfer<1>(const_cast(pMem), size); -} - -void CALLBACK GSgifTransfer3(u32 *pMem, u32 size) -{ - FUNCLOG - - //ZZLog::GS_Log("GSgifTransfer3 size = %lx (mode %d, gs.path3.tag.nloop = %d).", size, gs.path[2].mode, gs.path[2].tag.nloop); - - _GSgifTransfer<2>(const_cast(pMem), size); -} - -void CALLBACK GSgifTransfer(const u32 *pMem, u32 size) -{ - FUNCLOG - - //ZZLog::GS_Log("GSgifTransfer3 size = %lx (mode %d, gs.path3.tag.nloop = %d).", size, gs.path[2].mode, gs.path[2].tag.nloop); - - _GSgifTransfer<3>(pMem, size); -} - -void InitPath() -{ - gs.path[0].mode = gs.path[1].mode = gs.path[2].mode = gs.path[3].mode = 0; -} - diff --git a/plugins/zzogl-pg-cg/opengl/GifTransfer.h b/plugins/zzogl-pg-cg/opengl/GifTransfer.h deleted file mode 100644 index 533733ed07..0000000000 --- a/plugins/zzogl-pg-cg/opengl/GifTransfer.h +++ /dev/null @@ -1,134 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef GIFTRANSFER_H_INCLUDED -#define GIFTRANSFER_H_INCLUDED - -#include "Util.h" -#include "GS.h" -#include "Regs.h" - -enum GIF_FLG -{ - GIF_FLG_PACKED = 0, - GIF_FLG_REGLIST = 1, - GIF_FLG_IMAGE = 2, - GIF_FLG_IMAGE2 = 3 -}; - -// -// GIFTag -union GIFTag -{ - u64 ai64[2]; - u32 ai32[4]; - - struct - { - u32 NLOOP : 15; - u32 EOP : 1; - u32 _PAD1 : 16; - u32 _PAD2 : 14; - u32 PRE : 1; - u32 PRIM : 11; - u32 FLG : 2; // enum GIF_FLG - u32 NREG : 4; - u64 REGS : 64; - }; - - void set(const u32 *data) - { - for (int i = 0; i <= 3; i++) - { - ai32[i] = data[i]; - } - } - - GIFTag(u32 *data) - { - set(data); - } - - GIFTag(){ ai64[0] = 0; ai64[1] = 0; } -}; - -// EE part. Data transfer packet description - -typedef struct -{ - u32 mode; - int reg; - u64 regs; - u32 nloop; - int eop; - int nreg; - u32 adonly; - GIFTag tag; - - void setTag(const u32 *data) - { - tag.set(data); - - nloop = tag.NLOOP; - eop = tag.EOP; - mode = tag.FLG; - adonly = false; - - // Hmm.... - nreg = tag.NREG << 2; - if (nreg == 0) nreg = 64; - regs = tag.REGS; - reg = 0; - if ((nreg == 4) && (regs == GIF_REG_A_D)) adonly = true; - - // ZZLog::GS_Log("GIFtag: %8.8lx_%8.8lx_%8.8lx_%8.8lx: EOP=%d, NLOOP=%x, FLG=%x, NREG=%d, PRE=%d", - // data[3], data[2], data[1], data[0], - // path->eop, path->nloop, mode, path->nreg, tag.PRE); - } - - u32 GetReg() - { - return (regs >> reg) & 0xf; - } - - bool StepReg() - { - reg += 4; - - if (reg == nreg) - { - reg = 0; - nloop--; - - if (nloop == 0) return false; - } - - return true; - } - -} pathInfo; - -extern void _GSgifPacket(pathInfo *path, const u32 *pMem); -extern void _GSgifRegList(pathInfo *path, const u32 *pMem); -extern void _GSgifTransfer(pathInfo *path, const u32 *pMem, u32 size); - -extern GIFRegHandler g_GIFPackedRegHandlers[]; -extern GIFRegHandler g_GIFRegHandlers[]; -extern void InitPath(); -#endif // GIFTRANSFER_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/HostMemory.cpp b/plugins/zzogl-pg-cg/opengl/HostMemory.cpp deleted file mode 100644 index 9b762e9437..0000000000 --- a/plugins/zzogl-pg-cg/opengl/HostMemory.cpp +++ /dev/null @@ -1,578 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" -#include -#include - -#include -#include "Mem.h" -#include "x86.h" -#include "targets.h" -#include "ZZoglVB.h" - -// flush current vertices, call before setting new registers (the main render method) -extern void Flush(int context); - -u8* g_pbyGSMemory = NULL; // 4Mb GS system mem - -void GSMemory::init() -{ - const u32 mem_size = MEMORY_END + 0x10000; // leave some room for out of range accesses (saves on the checks) - - // clear - g_pbyGSMemory = (u8*)_aligned_malloc(mem_size, 1024); - memset(g_pbyGSMemory, 0, mem_size); -} - -void GSMemory::destroy() -{ - _aligned_free(g_pbyGSMemory); - g_pbyGSMemory = NULL; -} - -u8* GSMemory::get() -{ - return g_pbyGSMemory; -} - -u8* GSMemory::get(u32 addr) -{ - return &g_pbyGSMemory[addr*8]; -} -u8* GSMemory::get_raw(u32 addr) -{ - return &g_pbyGSMemory[addr]; -} - -u8* g_pbyGSClut = NULL; // ZZ - -void GSClut::init() -{ - g_pbyGSClut = (u8*)_aligned_malloc(256 * 8, 1024); // need 512 alignment! - memset(g_pbyGSClut, 0, 256*8); -} - -void GSClut::destroy() -{ - _aligned_free(g_pbyGSClut); - g_pbyGSClut = NULL; -} - -u8* GSClut::get() -{ - return g_pbyGSClut; -} - -u8* GSClut::get(u32 addr) -{ - return &g_pbyGSClut[addr*8]; -} -u8* GSClut::get_raw(u32 addr) -{ - return &g_pbyGSClut[addr]; -} - -extern _getPixelAddress getPixelFun[64]; - -extern CRangeManager s_RangeMngr; // manages overwritten memory -extern void ResolveInRange(int start, int end); - -static vector s_vTempBuffer, s_vTransferCache; -static int gs_imageEnd = 0; - -// From the start of monster labs. In all 3 cases, psm == 0. -// ZZogl-PG: GetRectMemAddress(0x3f4000, 0x404000, 0x0, 0x0, 0x0, 0x100, 0x40, 0x3f40, 0x100); -// ZZogl-PG: GetRectMemAddress(0x3f8000, 0x408000, 0x0, 0x0, 0x0, 0x100, 0x40, 0x3f80, 0x100); -// ZZogl-PG: GetRectMemAddress(0x3fc000, 0x40c000, 0x0, 0x0, 0x0, 0x100, 0x40, 0x3fc0, 0x100); - -void GetRectMemAddress(int& start, int& end, int psm, int x, int y, int w, int h, int bp, int bw) -{ - FUNCLOG - u32 bits = 0; - - if (m_Blocks[psm].bpp == 0) - { - ZZLog::Error_Log("ZeroGS: Bad psm 0x%x.", psm); - start = 0; - end = MEMORY_END; - return; - } - - if (PSMT_ISZTEX(psm)) - { - // Somehow, I doubt this code is right. I'll have to look into it. For the moment, I'm keeping it the - // way it was. --arcum42 - - const BLOCK& b = m_Blocks[psm]; - - bw = (bw + b.width - 1) / b.width; - start = bp * 256 + ((y / b.height) * bw + (x / b.width)) * 0x2000; - end = bp * 256 + (((y + h - 1) / b.height) * bw + (x + w + b.width - 1) / b.width) * 0x2000; - return; - } - - bits = PSMT_BITS_NUM(psm); - start = getPixelFun[psm](x, y, bp, bw); - end = getPixelFun[psm](x + w - 1, y + h - 1, bp, bw) + 1; - - if (bits > 0) - { - start *= bits; - end *= bits; - } - else - { - // This is what it used to do, which doesn't seem right. - // Keeping it for reference, in case removing it breaks anything. - - //int newx = ((x + w - 1 + 31) & ~31) - 1; - //int newy = ((y + h - 1 + 15) & ~15) - 1; - //start = getPixelAddress4(x, y, bp, bw) / 2; - //end = (getPixelAddress4(max(newx, x), max(newy, y), bp, bw) + 2) / 2; - - start /= 2; - end /= 2; - } -} - -void InitTransferHostLocal() -{ - FUNCLOG - -#if defined(_DEBUG) - // Xenosaga 1. - if (gs.trxpos.dx + gs.imageWnew > gs.dstbuf.bw) - ZZLog::Debug_Log("Transfer error, width exceeded. (0x%x > 0X%x)", gs.trxpos.dx + gs.imageWnew, gs.dstbuf.bw); -#endif - - //bool bHasFlushed = false; - - gs.imageX = gs.trxpos.dx; - gs.imageY = gs.trxpos.dy; - - gs.imageEndX = gs.imageX + gs.imageWnew; - gs.imageEndY = gs.imageY + gs.imageHnew; - - assert(gs.imageEndX < 2048 && gs.imageEndY < 2048); - - // This needs to be looked in to, since psm should *not* be 63. - // hack! viewful joe - if (gs.dstbuf.psm == 63) gs.dstbuf.psm = 0; - - int start, end; - - GetRectMemAddress(start, end, gs.dstbuf.psm, gs.trxpos.dx, gs.trxpos.dy, gs.imageWnew, gs.imageHnew, gs.dstbuf.bp, gs.dstbuf.bw); - - if (end > MEMORY_END) - { - // Monster Lab - the screwed up title screen - // Init host local out of bounds! (end == 0x404000) - // Init host local out of bounds! (end == 0x408000) - // Init host local out of bounds! (end == 0x40c000) - // MEMORY_END is 0x400000... - - ZZLog::Warn_Log("Init host local out of bounds! (end == 0x%x)", end); - //gs.imageTransfer = -1; - end = MEMORY_END; - } - - gs_imageEnd = end; - - if (vb[0].nCount > 0) Flush(0); - if (vb[1].nCount > 0) Flush(1); - - //ZZLog::Prim_Log("trans: bp:%x x:%x y:%x w:%x h:%x\n", gs.dstbuf.bp, gs.trxpos.dx, gs.trxpos.dy, gs.imageWnew, gs.imageHnew); -} - -void TransferHostLocal(const void* pbyMem, u32 nQWordSize) -{ - FUNCLOG - - int start, end; - - GetRectMemAddress(start, end, gs.dstbuf.psm, gs.imageX, gs.imageY, gs.imageWnew, gs.imageHnew, gs.dstbuf.bp, gs.dstbuf.bw); - - assert(start < gs_imageEnd); - end = gs_imageEnd; - - // sometimes games can decompress to alpha channel of render target only, in this case - // do a resolve right away. wolverine x2 - if (((gs.dstbuf.psm == PSMT8H) || (gs.dstbuf.psm == PSMT4HL) || (gs.dstbuf.psm == PSMT4HH)) && !(conf.settings().gust)) - { - list listTransmissionUpdateTargs; - s_RTs.GetTargs(start, end, listTransmissionUpdateTargs); - - for (list::iterator it = listTransmissionUpdateTargs.begin(); it != listTransmissionUpdateTargs.end(); ++it) - { - CRenderTarget* ptarg = *it; - - if ((ptarg->status & CRenderTarget::TS_Virtual)) continue; - - //ZZLog::Error_Log("Resolving to alpha channel."); - ptarg->Resolve(); - } - } - - s_RangeMngr.Insert(start, min(end, start + (int)nQWordSize*16)); - - const u8* porgend = (const u8*)pbyMem + 4 * nQWordSize; - - if (s_vTransferCache.size() > 0) - { - - int imagecache = s_vTransferCache.size(); - s_vTempBuffer.resize(imagecache + nQWordSize*4); - memcpy(&s_vTempBuffer[0], &s_vTransferCache[0], imagecache); - memcpy(&s_vTempBuffer[imagecache], pbyMem, nQWordSize*4); - - pbyMem = (const void*) & s_vTempBuffer[0]; - porgend = &s_vTempBuffer[0] + s_vTempBuffer.size(); - - int wordinc = imagecache / 4; - - if ((nQWordSize * 4 + imagecache) / 3 == ((nQWordSize + wordinc) * 4) / 3) - { - // can use the data - nQWordSize += wordinc; - } - } - - int leftover = m_Blocks[gs.dstbuf.psm].TransferHostLocal(pbyMem, nQWordSize); - - if (leftover > 0) - { - // copy the last gs.image24bitOffset to the cache - s_vTransferCache.resize(leftover); - memcpy(&s_vTransferCache[0], porgend - leftover, leftover); - } - else - { - s_vTransferCache.resize(0); - } - -#if defined(_DEBUG) - if (g_bSaveTrans) - { - tex0Info t; - t.tbp0 = gs.dstbuf.bp; - t.tw = gs.imageWnew; - t.th = gs.imageHnew; - t.tbw = gs.dstbuf.bw; - t.psm = gs.dstbuf.psm; - SaveTex(&t, 0); - } - -#endif -} - -void InitTransferLocalHost() -{ - FUNCLOG - assert(gs.trxpos.sx + gs.imageWnew <= 2048 && gs.trxpos.sy + gs.imageHnew <= 2048); - -#if defined(_DEBUG) - if (gs.trxpos.sx + gs.imageWnew > gs.srcbuf.bw) - ZZLog::Debug_Log("Transfer error, width exceeded. (0x%x > 0x%x)", gs.trxpos.sx + gs.imageWnew, gs.srcbuf.bw); -#endif - - gs.imageX = gs.trxpos.sx; - gs.imageY = gs.trxpos.sy; - - gs.imageEndX = gs.imageX + gs.imageWnew; - gs.imageEndY = gs.imageY + gs.imageHnew; - - s_vTransferCache.resize(0); - - int start, end; - - GetRectMemAddress(start, end, gs.srcbuf.psm, gs.trxpos.sx, gs.trxpos.sy, gs.imageWnew, gs.imageHnew, gs.srcbuf.bp, gs.srcbuf.bw); - - ResolveInRange(start, end); -} - -template -void TransferLocalHost(void* pbyMem, u32 nQWordSize, int& x, int& y, u8 *pstart) -{ - _readPixel_0 rp = readPixelFun_0[gs.srcbuf.psm]; - - int i = x, j = y; - T* pbuf = (T*)pbyMem; - u32 nSize = nQWordSize * 16 / sizeof(T); - - for (; i < gs.imageEndY; ++i) - { - for (; j < gs.imageEndX && nSize > 0; ++j, --nSize) - { - *pbuf++ = rp(pstart, j % 2048, i % 2048, gs.srcbuf.bw); - } - - if (j >= gs.imageEndX) - { - assert(j == gs.imageEndX); - j = gs.trxpos.sx; - } - else - { - assert(nSize == 0); - break; - } - } -} - -void TransferLocalHost_24(void* pbyMem, u32 nQWordSize, int& x, int& y, u8 *pstart) -{ - _readPixel_0 rp = readPixelFun_0[gs.srcbuf.psm]; - - int i = x, j = y; - u8* pbuf = (u8*)pbyMem; - u32 nSize = nQWordSize * 16 / 3; - - for (; i < gs.imageEndY; ++i) - { - for (; j < gs.imageEndX && nSize > 0; ++j, --nSize) - { - u32 p = rp(pstart, j % 2048, i % 2048, gs.srcbuf.bw); - pbuf[0] = (u8)p; - pbuf[1] = (u8)(p >> 8); - pbuf[2] = (u8)(p >> 16); - pbuf += 3; - } - - if (j >= gs.imageEndX) - { - assert(j == gs.imageEndX); - j = gs.trxpos.sx; - } - else - { - assert(nSize == 0); - break; - } - } -} - -// left/right, top/down -void TransferLocalHost(void* pbyMem, u32 nQWordSize) -{ - FUNCLOG - assert(gs.imageTransfer == 1); - - u8* pstart = g_pbyGSMemory + 256 * gs.srcbuf.bp; - - switch(PSMT_BITMODE(gs.srcbuf.psm)) - { - case 0: - TransferLocalHost(pbyMem, nQWordSize, gs.imageY, gs.imageX, pstart); - break; - case 1: - TransferLocalHost_24(pbyMem, nQWordSize, gs.imageY, gs.imageX, pstart); - break; - case 2: - TransferLocalHost(pbyMem, nQWordSize, gs.imageY, gs.imageX, pstart); - break; - case 3: - TransferLocalHost(pbyMem, nQWordSize, gs.imageY, gs.imageX, pstart); - break; - default: - assert(0); - break; - } - - if (gs.imageY >= gs.imageEndY) - { - ZZLog::Error_Log("gs.imageY >= gs.imageEndY!"); - assert(gs.imageY == gs.imageEndY); - gs.imageTransfer = -1; - } -} - -__forceinline void _TransferLocalLocal() -{ - //ZZLog::Error_Log("TransferLocalLocal(0x%x, 0x%x)", gs.srcbuf.psm, gs.dstbuf.psm); - _writePixel_0 wp = writePixelFun_0[gs.srcbuf.psm]; - _readPixel_0 rp = readPixelFun_0[gs.dstbuf.psm]; - u8* pSrcBuf = g_pbyGSMemory + gs.srcbuf.bp * 256; - u8* pDstBuf = g_pbyGSMemory + gs.dstbuf.bp * 256; - u32 widthlimit = 4; - u32 maxX = gs.trxpos.sx + gs.imageWnew; - u32 maxY = gs.trxpos.sy + gs.imageHnew; - - if (PSMT_BITMODE(gs.srcbuf.psm) == 0) widthlimit = 2; - if ((gs.imageWnew & widthlimit) != 0) return; - - for(u32 i = gs.trxpos.sy, i2 = gs.trxpos.dy; i < maxY; i++, i2++) - { - for(u32 j = gs.trxpos.sx, j2 = gs.trxpos.dx; j < maxX; j += widthlimit, j2 += widthlimit) - { - wp(pDstBuf, j2%2048, i2%2048, - rp(pSrcBuf, j%2048, i%2048, gs.srcbuf.bw), gs.dstbuf.bw); - - wp(pDstBuf, (j2+1)%2048, i2%2048, - rp(pSrcBuf, (j+1)%2048, i%2048, gs.srcbuf.bw), gs.dstbuf.bw); - - if (widthlimit > 2) - { - // Then widthlimit == 4. - wp(pDstBuf, (j2+2)%2048, i2%2048, - rp(pSrcBuf, (j+2)%2048, i%2048, gs.srcbuf.bw), gs.dstbuf.bw); - - wp(pDstBuf, (j2+3)%2048, i2%2048, - rp(pSrcBuf, (j+3)%2048, i%2048, gs.srcbuf.bw), gs.dstbuf.bw); - } - } - } -} - -__forceinline void _TransferLocalLocal_4() -{ - //ZZLog::Error_Log("TransferLocalLocal_4(0x%x, 0x%x)", gs.srcbuf.psm, gs.dstbuf.psm); - _getPixelAddress_0 gsp = getPixelFun_0[gs.srcbuf.psm]; - _getPixelAddress_0 gdp = getPixelFun_0[gs.dstbuf.psm]; - u8* pSrcBuf = g_pbyGSMemory + gs.srcbuf.bp * 256; - u8* pDstBuf = g_pbyGSMemory + gs.dstbuf.bp * 256; - u32 maxX = gs.trxpos.sx + gs.imageWnew; - u32 maxY = gs.trxpos.sy + gs.imageHnew; - - assert((gs.imageWnew % 8) == 0); - - for(u32 i = gs.trxpos.sy, i2 = gs.trxpos.dy; i < maxY; ++i, ++i2) - { - for(u32 j = gs.trxpos.sx, j2 = gs.trxpos.dx; j < maxX; j += 8, j2 += 8) - { - /* NOTE: the 2 conseq 4bit values are in NOT in the same byte */ - u32 read = gsp(j%2048, i%2048, gs.srcbuf.bw); - u32 write = gdp(j2%2048, i2%2048, gs.dstbuf.bw); - pDstBuf[write] = (pDstBuf[write]&0xf0)|(pSrcBuf[read]&0x0f); - - read = gsp((j+1)%2048, i%2048, gs.srcbuf.bw); - write = gdp((j2+1)%2048, i2%2048, gs.dstbuf.bw); - pDstBuf[write] = (pDstBuf[write]&0x0f)|(pSrcBuf[read]&0xf0); - - read = gsp((j+2)%2048, i%2048, gs.srcbuf.bw); - write = gdp((j2+2)%2048, i2%2048, gs.dstbuf.bw); - pDstBuf[write] = (pDstBuf[write]&0xf0)|(pSrcBuf[read]&0x0f); - - read = gsp((j+3)%2048, i%2048, gs.srcbuf.bw); - write = gdp((j2+3)%2048, i2%2048, gs.dstbuf.bw); - pDstBuf[write] = (pDstBuf[write]&0x0f)|(pSrcBuf[read]&0xf0); - - read = gsp((j+4)%2048, i%2048, gs.srcbuf.bw); - write = gdp((j2+4)%2048, i2%2048, gs.dstbuf.bw); - pDstBuf[write] = (pDstBuf[write]&0xf0)|(pSrcBuf[read]&0x0f); - - read = gsp((j+5)%2048, i%2048, gs.srcbuf.bw); - write = gdp((j2+5)%2048, i2%2048, gs.dstbuf.bw); - pDstBuf[write] = (pDstBuf[write]&0x0f)|(pSrcBuf[read]&0xf0); - - read = gsp((j+6)%2048, i%2048, gs.srcbuf.bw); - write = gdp((j2+6)%2048, i2%2048, gs.dstbuf.bw); - pDstBuf[write] = (pDstBuf[write]&0xf0)|(pSrcBuf[read]&0x0f); - - read = gsp((j+7)%2048, i%2048, gs.srcbuf.bw); - write = gdp((j2+7)%2048, i2%2048, gs.dstbuf.bw); - pDstBuf[write] = (pDstBuf[write]&0x0f)|(pSrcBuf[read]&0xf0); - } - } -} - -// dir depends on trxpos.dirx & trxpos.diry -void TransferLocalLocal() -{ - FUNCLOG - - //ZZLog::Error_Log("I'z in your code, transferring your memory..."); - assert(gs.imageTransfer == 2); - assert(gs.trxpos.sx + gs.imageWnew < 2048 && gs.trxpos.sy + gs.imageHnew < 2048); - assert(gs.trxpos.dx + gs.imageWnew < 2048 && gs.trxpos.dy + gs.imageHnew < 2048); - assert((gs.srcbuf.psm&0x7) == (gs.dstbuf.psm&0x7)); - - if (gs.trxpos.sx + gs.imageWnew > gs.srcbuf.bw) - ZZLog::Debug_Log("Transfer error, src width exceeded.(0x%x > 0x%x)", gs.trxpos.sx + gs.imageWnew, gs.srcbuf.bw); - - if (gs.trxpos.dx + gs.imageWnew > gs.dstbuf.bw) - ZZLog::Debug_Log("Transfer error, dst width exceeded.(0x%x > 0x%x)", gs.trxpos.dx + gs.imageWnew, gs.dstbuf.bw); - - int srcstart, srcend, dststart, dstend; - - GetRectMemAddress(srcstart, srcend, gs.srcbuf.psm, gs.trxpos.sx, gs.trxpos.sy, gs.imageWnew, gs.imageHnew, gs.srcbuf.bp, gs.srcbuf.bw); - GetRectMemAddress(dststart, dstend, gs.dstbuf.psm, gs.trxpos.dx, gs.trxpos.dy, gs.imageWnew, gs.imageHnew, gs.dstbuf.bp, gs.dstbuf.bw); - - // resolve the targs - ResolveInRange(srcstart, srcend); - - list listTargs; - - s_RTs.GetTargs(dststart, dstend, listTargs); - - for (list::iterator it = listTargs.begin(); it != listTargs.end(); ++it) - { - if (!((*it)->status & CRenderTarget::TS_Virtual)) - { - (*it)->Resolve(); - //(*it)->status |= CRenderTarget::TS_NeedUpdate; - } - } - - if (PSMT_BITMODE(gs.srcbuf.psm) != 4) - { - _TransferLocalLocal(); - } - else - { - _TransferLocalLocal_4(); - } - - g_MemTargs.ClearRange(dststart, dstend); - -#ifdef ZEROGS_DEVBUILD - - if (g_bSaveTrans) - { - tex0Info t; - t.tbp0 = gs.dstbuf.bp; - t.tw = gs.imageWnew; - t.th = gs.imageHnew; - t.tbw = gs.dstbuf.bw; - t.psm = gs.dstbuf.psm; - SaveTex(&t, 0); - - t.tbp0 = gs.srcbuf.bp; - t.tw = gs.imageWnew; - t.th = gs.imageHnew; - t.tbw = gs.srcbuf.bw; - t.psm = gs.srcbuf.psm; - SaveTex(&t, 0); - } - -#endif -} - -__forceinline void TerminateLocalHost() -{ - FUNCLOG - //ZZLog::Error_Log("Terminate Local Host!"); -} - -__forceinline void TerminateHostLocal() -{ - FUNCLOG - gs.imageTransfer = -1; -} - diff --git a/plugins/zzogl-pg-cg/opengl/HostMemory.h b/plugins/zzogl-pg-cg/opengl/HostMemory.h deleted file mode 100644 index e9217685d1..0000000000 --- a/plugins/zzogl-pg-cg/opengl/HostMemory.h +++ /dev/null @@ -1,114 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef HOSTMEMORY_H_INCLUDED -#define HOSTMEMORY_H_INCLUDED - -#include "GLWin.h" - -#define MEMORY_END 0x00400000 - -extern int GPU_TEXWIDTH; - -extern u8* g_pBasePS2Mem; -extern u8* g_pbyGSMemory; - -class GSMemory -{ - public: - void init(); - void destroy(); - u8* get(); - u8* get(u32 addr); - u8* get_raw(u32 addr); -}; - -extern u8* g_pbyGSClut; // the temporary clut buffer - -class GSClut -{ - public: - void init(); - void destroy(); - u8* get(); - u8* get(u32 addr); - u8* get_raw(u32 addr); -}; - -class ZeroGSInit -{ - - public: - ZeroGSInit() - { - const u32 mem_size = MEMORY_END + 0x10000; // leave some room for out of range accesses (saves on the checks) - // clear - g_pbyGSMemory = (u8*)_aligned_malloc(mem_size, 1024); - memset(g_pbyGSMemory, 0, mem_size); - - g_pbyGSClut = (u8*)_aligned_malloc(256 * 8, 1024); // need 512 alignment! - memset(g_pbyGSClut, 0, 256*8); - memset(&GLWin, 0, sizeof(GLWin)); - } - - ~ZeroGSInit() - { - _aligned_free(g_pbyGSMemory); - g_pbyGSMemory = NULL; - - _aligned_free(g_pbyGSClut); - g_pbyGSClut = NULL; - } -}; - -// The size in bytes of x strings (of texture). -inline int MemorySize(int x) -{ - return 4 * GPU_TEXWIDTH * x; -} - -// Return the address in memory of data block for string x. -inline u8* MemoryAddress(int x) -{ - return g_pbyGSMemory + MemorySize(x); -} - -template -inline u8* _MemoryAddress(int x) -{ - return g_pbyGSMemory + mult * x; -} - -extern void GetRectMemAddress(int& start, int& end, int psm, int x, int y, int w, int h, int bp, int bw); - - -// called when trxdir is accessed. If host is involved, transfers memory to temp buffer byTransferBuf. -// Otherwise performs the transfer. TODO: Perhaps divide the transfers into chunks? -extern void InitTransferHostLocal(); -extern void TransferHostLocal(const void* pbyMem, u32 nQWordSize); - -extern void InitTransferLocalHost(); -extern void TransferLocalHost(void* pbyMem, u32 nQWordSize); - -extern void TransferLocalLocal(); - -extern void TerminateLocalHost(); -extern void TerminateHostLocal(); - -#endif // HOSTMEMORY_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/Linux/Conf.cpp b/plugins/zzogl-pg-cg/opengl/Linux/Conf.cpp deleted file mode 100644 index 67f51a6dcf..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Linux/Conf.cpp +++ /dev/null @@ -1,121 +0,0 @@ -/* GSsoft - * Copyright (C) 2002-2004 GSsoft Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include -#include -#include -#include -#include -#include "GS.h" -#include "Utilities/Path.h" - -void SaveConfig() -{ - const wxString iniFile_s(Path::Combine(s_strIniPath, L"zzogl-pg-cg.ini")); - std::string iniFile = std::string(iniFile_s.mb_str()); - - FILE* f = fopen(iniFile.c_str(), "w"); - - if (f == NULL) - { - ZZLog::Error_Log("Failed to open '%s'", iniFile.c_str()); - return; - } - - fprintf(f, "interlace = %hhx\n", conf.interlace); - - fprintf(f, "mrtdepth = %hhx\n", conf.mrtdepth); - fprintf(f, "zzoptions = %x\n", conf.zz_options._u32); - fprintf(f, "options = %x\n", conf.hacks._u32); - fprintf(f, "bilinear = %hhx\n", conf.bilinear); - fprintf(f, "aliasing = %hhx\n", conf.aa); - fprintf(f, "width = %x\n", conf.width); - fprintf(f, "height = %x\n", conf.height); - fprintf(f, "x = %x\n", conf.x); - fprintf(f, "y = %x\n", conf.y); - fprintf(f, "log = %x\n", conf.log); - fprintf(f, "skipdraw = %x\n", conf.SkipDraw); - fprintf(f, "disablehacks = %x\n", conf.disableHacks); - fclose(f); -} - -void LoadConfig() -{ - int err = 0; - memset(&conf, 0, sizeof(conf)); - conf.interlace = 0; // on, mode 1 - conf.mrtdepth = 1; - conf.bilinear = 1; - conf.log = 1; - conf.SkipDraw = 0; - conf.width = 800; - conf.height = 600; - conf.disableHacks = 0; - - const wxString iniFile_s(Path::Combine(s_strIniPath, L"zzogl-pg-cg.ini")); - std::string iniFile = std::string(iniFile_s.mb_str()); - - FILE* f = fopen(iniFile.c_str(), "r"); - - if (f == NULL) - { - ZZLog::Error_Log("Failed to open '%s'", iniFile.c_str()); - SaveConfig();//save and return - return; - } - - err = fscanf(f, "interlace = %hhx\n", &conf.interlace); - - err = fscanf(f, "mrtdepth = %hhx\n", &conf.mrtdepth); - err = fscanf(f, "zzoptions = %x\n", &conf.zz_options._u32); - err = fscanf(f, "options = %x\n", &conf.hacks._u32); - err = fscanf(f, "bilinear = %hhx\n", &conf.bilinear); - err = fscanf(f, "aliasing = %hhx\n", &conf.aa); - err = fscanf(f, "width = %x\n", &conf.width); - err = fscanf(f, "height = %x\n", &conf.height); - err = fscanf(f, "x = %x\n", &conf.x); - err = fscanf(f, "y = %x\n", &conf.y); - err = fscanf(f, "log = %x\n", &conf.log); - err = fscanf(f, "skipdraw = %x\n", &conf.SkipDraw); - err = fscanf(f, "disablehacks = %x\n", &conf.disableHacks); - fclose(f); - - // turn off all hacks by default - conf.setWireframe(false); - conf.setCaptureAvi(false); - conf.setLoaded(true); - - conf.isWideScreen = conf.widescreen(); - - // filter bad files - if (conf.interlace > 2) conf.interlace = 0; - if (conf.aa > 4) conf.aa = 0; - if (conf.width <= 0 || conf.height <= 0) - { - conf.width = 800; - conf.height = 600; - } - - if (conf.x < 0 || conf.y < 0) - { - conf.x = 0; - conf.y = 0; - } -} - diff --git a/plugins/zzogl-pg-cg/opengl/Linux/Linux.cpp b/plugins/zzogl-pg-cg/opengl/Linux/Linux.cpp deleted file mode 100644 index 3d5609f95f..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Linux/Linux.cpp +++ /dev/null @@ -1,519 +0,0 @@ -/* ZeroGS - * Copyright (C) 2002-2004 GSsoft Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include -#include -#include -#include - -#include "GS.h" -#include "Linux.h" -#include "GLWin.h" - -#include - -extern u32 THR_KeyEvent; // value for passing out key events beetwen threads -extern bool THR_bShift; -extern bool THR_bCtrl; - -static map mapConfOpts; -static gameHacks tempHacks; - -void CALLBACK GSkeyEvent(keyEvent *ev) -{ - static bool bAlt = false; - - switch (ev->evt) - { - case KEYPRESS: - switch (ev->key) - { - case XK_F5: - case XK_F6: - case XK_F7: - case XK_F9: - THR_KeyEvent = ev->key; - break; - - case XK_Escape: - if (conf.fullscreen()) GLWin.ToggleFullscreen(); - break; - - case XK_Shift_L: - case XK_Shift_R: - THR_bShift = true; - break; - - case XK_Control_L: - case XK_Control_R: - THR_bCtrl = true; - break; - - case XK_Alt_L: - case XK_Alt_R: - bAlt = true; - break; - - case XK_Return: - if (bAlt) - GLWin.ToggleFullscreen(); - } - break; - - case KEYRELEASE: - switch (ev->key) - { - case XK_Shift_L: - case XK_Shift_R: - THR_bShift = false; - break; - - case XK_Control_L: - case XK_Control_R: - THR_bCtrl = false; - break; - - case XK_Alt_L: - case XK_Alt_R: - bAlt = false; - break; - } - } -} - -void add_map_entry(u32 option, const char *key, const char *desc) -{ - confOpts.value = option; - confOpts.desc = desc; - mapConfOpts[key] = confOpts; -} - -void CreateGameHackTable(GtkWidget *treeview, gameHacks hacks) -{ - char descbuf[255]; - bool itval; - GtkCellRenderer *treerend; - GtkListStore *treestore;//Gets typecast as GtkTreeModel as needed. - GtkTreeIter treeiter; - GtkTreeViewColumn *treecol; - - //--------- Let's build a treeview for our advanced options! --------// - treestore = gtk_list_store_new(2, G_TYPE_BOOLEAN, G_TYPE_STRING); - - //setup columns in treeview - //COLUMN 0 is the checkboxes - treecol = gtk_tree_view_column_new(); - gtk_tree_view_column_set_title(treecol, "Select"); - gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), treecol); - treerend = gtk_cell_renderer_toggle_new(); - gtk_tree_view_column_pack_start(treecol, treerend, true); - gtk_tree_view_column_add_attribute(treecol, treerend, "active", 0);//link 'active' attrib to first column of model - g_object_set(treerend, "activatable", true, NULL);//set 'activatable' attrib true by default for all rows regardless of model. - g_signal_connect(treerend, "toggled", (GCallback) OnToggle_advopts, treestore);//set a global callback, we also pass a reference to our treestore. - - //COLUMN 1 is the text descriptions - treecol = gtk_tree_view_column_new(); - gtk_tree_view_column_set_title(treecol, "Description"); - gtk_tree_view_append_column(GTK_TREE_VIEW(treeview), treecol); - treerend = gtk_cell_renderer_text_new(); - gtk_tree_view_column_pack_start(treecol, treerend, true); - gtk_tree_view_column_add_attribute(treecol, treerend, "text", 1);//link 'text' attrib to second column of model - - //setup the model with all our rows of option data - mapConfOpts.clear(); - - add_map_entry(GAME_TEXTURETARGS, "00000001", "Tex Target checking - 00000001\nLego Racers"); - add_map_entry(GAME_AUTORESET, "00000002", "Auto reset targs - 00000002\nUse when game is slow and toggling AA fixes it. Samurai Warriors. (Automatically on for Shadow Hearts)"); - add_map_entry(GAME_INTERLACE2X, "00000004", "Interlace 2X - 00000004\nFixes 2x bigger screen. Gradius 3."); - //GAME_TEXAHACK (still implemented) - add_map_entry(GAME_NOTARGETRESOLVE, "00000010", "No target resolves - 00000010\nStops all resolving of targets. Try this first for really slow games. (Automatically on for Dark Cloud 1.)"); - add_map_entry(GAME_EXACTCOLOR, "00000020", "Exact color testing - 00000020\nFixes overbright or shadow/black artifacts. Crash 'n Burn."); - //add_map_entry(GAME_NOCOLORCLAMP, "00000040", "No color clamping - 00000040\nSpeeds up games, but might be too bright or too dim."); - //GAME_FFXHACK - add_map_entry(GAME_NOALPHAFAIL, "00000100", "Alpha Fail hack - 00000100\nRemove vertical stripes or other coloring artifacts. Breaks Persona 4 and MGS3. (Automatically on for Sonic Unleashed, Shadow the Hedgehog, & Ghost in the Shell.)"); - add_map_entry(GAME_NODEPTHUPDATE, "00000200", "Disable depth updates - 00000200"); - add_map_entry(GAME_QUICKRESOLVE1, "00000400", "Resolve Hack #1 - 00000400\n Speeds some games. Kingdom Hearts."); - add_map_entry(GAME_NOQUICKRESOLVE, "00000800", "Resolve Hack #2 - 00000800\nShadow Hearts, Urbz. Destroys FFX."); - add_map_entry(GAME_NOTARGETCLUT, "00001000", "No target CLUT - 00001000\nResident Evil 4, or foggy scenes."); - add_map_entry(GAME_NOSTENCIL, "00002000", "Disable stencil buffer - 00002000\nUsually safe to do for simple scenes. Harvest Moon."); - //GAME_VSSHACKOFF (still implemented) - add_map_entry(GAME_NODEPTHRESOLVE, "00008000", "No depth resolve - 00008000\nMight give z buffer artifacts."); - add_map_entry(GAME_FULL16BITRES, "00010000", "Full 16 bit resolution - 00010000\nUse when half the screen is missing."); - add_map_entry(GAME_RESOLVEPROMOTED, "00020000", "Resolve Hack #3 - 00020000\nNeopets"); - add_map_entry(GAME_FASTUPDATE, "00040000", "Fast Update - 00040000\n Speeds some games. Needed for Sonic Unleashed. Okami."); - add_map_entry(GAME_NOALPHATEST, "00080000", "Disable alpha testing - 00080000"); - add_map_entry(GAME_DISABLEMRTDEPTH, "00100000", "Enable Multiple RTs - 00100000"); - //GAME_32BITTARGS - //GAME_PATH3HACK - //GAME_DOPARALLELCTX - add_map_entry(GAME_XENOSPECHACK, "01000000", "Specular Highlights - 01000000\nMakes graphics faster by removing highlights. (Automatically on for Xenosaga, Okami, & Okage.)"); - //add_map_entry(GAME_PARTIALPOINTERS, "02000000", "Partial targets - 02000000"); - add_map_entry(GAME_PARTIALDEPTH, "04000000", "Partial depth - 04000000"); - //GAME_REGETHACK (commented out in code) - add_map_entry(GAME_GUSTHACK, "10000000", "Gust fix - 10000000. Makes gust games cleaner and faster. (Automatically on for most Gust games)"); - add_map_entry(GAME_NOLOGZ, "20000000", "No logarithmic Z - 20000000. Could decrease number of Z-artifacts."); - add_map_entry(GAME_AUTOSKIPDRAW, "40000000", "Remove blur effect on some games\nSlow games."); - - for (map::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it) - { - gtk_list_store_append(treestore, &treeiter);//new row - itval = (hacks._u32 & it->second.value) ? true : false; - - if (conf.def_hacks._u32 & it->second.value) - { - snprintf(descbuf, 254, "*%s", it->second.desc); - } - else - { - snprintf(descbuf, 254, "%s", it->second.desc); - } - - gtk_list_store_set(treestore, &treeiter, 0, itval, 1, descbuf, -1); - } - - gtk_tree_view_set_model(GTK_TREE_VIEW(treeview), GTK_TREE_MODEL(treestore));//NB: store is cast as tree model. - - g_object_unref(treestore);//allow model to be destroyed when the tree is destroyed. - - //don't select/highlight rows - gtk_tree_selection_set_mode(gtk_tree_view_get_selection(GTK_TREE_VIEW(treeview)), GTK_SELECTION_NONE); - //------treeview done -------// -} - -void SaveGameHackTable(GtkWidget *treeview, gameHacks& hacks) -{ - GtkTreeModel *treemodel; - GtkTreeIter treeiter; - gboolean treeoptval; - - //------- get advanced options from the treeview model -------// - treemodel = gtk_tree_view_get_model(GTK_TREE_VIEW(treeview)); - gtk_tree_model_get_iter_first(treemodel, &treeiter); - - hacks._u32 = 0; - - for (map::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it) - { - treeoptval = false; - gtk_tree_model_get(treemodel, &treeiter, 0, &treeoptval, -1); - - if (treeoptval) hacks._u32 |= it->second.value; - - gtk_tree_model_iter_next(treemodel, &treeiter); - } - - //---------- done getting advanced options ---------// -} - -void OnToggle_advopts(GtkCellRendererToggle *cell, gchar *path, gpointer user_data) -{ - GtkTreeIter treeiter; - gboolean val; - - gtk_tree_model_get_iter_from_string(GTK_TREE_MODEL(user_data), &treeiter, path); - gtk_tree_model_get(GTK_TREE_MODEL(user_data), &treeiter, 0, &val, -1); - val = !val; - gtk_list_store_set(GTK_LIST_STORE(user_data), &treeiter, 0, val, -1); -} - -void DisplayAdvancedDialog() -{ - GtkWidget *dialog; - - GtkWidget *advanced_frame, *advanced_box; - GtkWidget *advanced_scroll; - GtkWidget *tree; - - dialog = gtk_dialog_new(); - gtk_window_set_title(GTK_WINDOW(dialog), "ZZOgl PG Advanced Config"); - // A good value for the heigh will be 1000 instead of 800 but I'm afraid that some people still uses small screen... - gtk_window_set_default_size(GTK_WINDOW(dialog), 600, 800); - gtk_window_set_modal(GTK_WINDOW(dialog), true); - - advanced_box = gtk_vbox_new(false, 5); - advanced_frame = gtk_frame_new("Advanced Settings:"); - gtk_container_add(GTK_CONTAINER(advanced_frame), advanced_box); - - tree = gtk_tree_view_new(); - - CreateGameHackTable(tree, tempHacks); - - advanced_scroll = gtk_scrolled_window_new(NULL, NULL); - - gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(advanced_scroll), tree); - - gtk_box_pack_start(GTK_BOX(advanced_box), advanced_scroll, true, true, 2); - - gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), advanced_frame); - - gtk_widget_show_all(dialog); - - gtk_dialog_run(GTK_DIALOG(dialog)); - SaveGameHackTable(tree, tempHacks); - gtk_widget_destroy(dialog); -} - -void DisplayDialog() -{ - int return_value; - - GtkWidget *dialog; - GtkWidget *main_frame, *main_box; - - GtkWidget *option_frame, *option_box; - GtkWidget *log_check, *dis_hacks_check; - GtkWidget *int_label, *int_box, *int_holder; - GtkWidget *bilinear_label, *bilinear_box, *bilinear_holder; - GtkWidget *aa_label, *aa_box, *aa_holder; - GtkWidget *snap_label, *snap_box, *snap_holder; - GtkWidget *fullscreen_label, *widescreen_check; - - - GtkWidget *advanced_button; - GtkWidget *separator; - GtkWidget *skipdraw_label, *skipdraw_text, *skipdraw_holder, *warning_label; - - if (!(conf.loaded())) LoadConfig(); - - /* Create the widgets */ - dialog = gtk_dialog_new_with_buttons( - "ZZOgl PG Config", - NULL, /* parent window*/ - (GtkDialogFlags)(GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT), - GTK_STOCK_CANCEL, - GTK_RESPONSE_REJECT, - GTK_STOCK_OK, - GTK_RESPONSE_ACCEPT, - NULL); - - log_check = gtk_check_button_new_with_label("Logging"); - gtk_widget_set_tooltip_text(log_check, "Used for Debugging."); - - int_label = gtk_label_new("Interlacing:"); - int_box = gtk_combo_box_new_text(); - - gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "No Interlacing"); - gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "Interlace 0"); - gtk_combo_box_append_text(GTK_COMBO_BOX(int_box), "Interlace 1"); - gtk_combo_box_set_active(GTK_COMBO_BOX(int_box), conf.interlace); - gtk_widget_set_tooltip_text(int_box, "Toggled by pressing F5 when running."); - int_holder = gtk_hbox_new(false, 5); - gtk_box_pack_start(GTK_BOX(int_holder), int_label, false, false, 2); - gtk_box_pack_start(GTK_BOX(int_holder), int_box, false, false, 2); - - bilinear_label = gtk_label_new("Bilinear Filtering:"); - bilinear_box = gtk_combo_box_new_text(); - - gtk_combo_box_append_text(GTK_COMBO_BOX(bilinear_box), "Off"); - gtk_combo_box_append_text(GTK_COMBO_BOX(bilinear_box), "Normal"); - gtk_combo_box_append_text(GTK_COMBO_BOX(bilinear_box), "Forced"); - gtk_combo_box_set_active(GTK_COMBO_BOX(bilinear_box), conf.bilinear); - gtk_widget_set_tooltip_text(bilinear_box, "Best quality is off. Turn on for speed. Toggled by pressing Shift + F5 when running."); - bilinear_holder = gtk_hbox_new(false, 5); - gtk_box_pack_start(GTK_BOX(bilinear_holder), bilinear_label, false, false, 2); - gtk_box_pack_start(GTK_BOX(bilinear_holder), bilinear_box, false, false, 2); - - aa_label = gtk_label_new("Anti-Aliasing:"); - aa_box = gtk_combo_box_new_text(); - - gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "1X (None)"); - gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "2X"); - gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "4X"); - gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "8X"); - gtk_combo_box_append_text(GTK_COMBO_BOX(aa_box), "16X"); - gtk_combo_box_set_active(GTK_COMBO_BOX(aa_box), conf.aa); - gtk_widget_set_tooltip_text(aa_box, "Toggled by pressing F6 when running."); - aa_holder = gtk_hbox_new(false, 5); - gtk_box_pack_start(GTK_BOX(aa_holder), aa_label, false, false, 2); - gtk_box_pack_start(GTK_BOX(aa_holder), aa_box, false, false, 2); - - snap_label = gtk_label_new("Snapshot format:"); - snap_box = gtk_combo_box_new_text(); - gtk_combo_box_append_text(GTK_COMBO_BOX(snap_box), "JPEG"); - gtk_combo_box_append_text(GTK_COMBO_BOX(snap_box), "TIFF"); - gtk_combo_box_set_active(GTK_COMBO_BOX(snap_box), conf.zz_options.tga_snap); - snap_holder = gtk_hbox_new(false, 5); - gtk_box_pack_start(GTK_BOX(snap_holder), snap_label, false, false, 2); - gtk_box_pack_start(GTK_BOX(snap_holder), snap_box, false, false, 2); - - widescreen_check = gtk_check_button_new_with_label("Widescreen"); - gtk_widget_set_tooltip_text(widescreen_check, "Force a 4:3 ration when disabled"); - fullscreen_label = gtk_label_new("Press Alt-Enter for Fullscreen."); - gtk_label_set_single_line_mode(GTK_LABEL(fullscreen_label), false); - - advanced_button = gtk_button_new_with_label("Advanced..."); - - dis_hacks_check = gtk_check_button_new_with_label("Disable Automatic Hacks"); - gtk_widget_set_tooltip_text(dis_hacks_check, "Used for testing how useful hacks that are on automatically are."); - -#ifdef ZEROGS_DEVBUILD - separator = gtk_hseparator_new(); - skipdraw_label = gtk_label_new("Skipdraw:"); - skipdraw_text = gtk_entry_new(); - warning_label = gtk_label_new("Experimental!!"); - char buf[5]; - sprintf(buf, "%d", conf.SkipDraw); - gtk_entry_set_text(GTK_ENTRY(skipdraw_text), buf); - skipdraw_holder = gtk_hbox_new(false, 5); - - gtk_box_pack_start(GTK_BOX(skipdraw_holder), skipdraw_label, false, false, 2); - gtk_box_pack_start(GTK_BOX(skipdraw_holder), skipdraw_text, false, false, 2); -#endif - - main_box = gtk_hbox_new(false, 5); - main_frame = gtk_frame_new("ZZOgl PG Config"); - - gtk_container_add(GTK_CONTAINER(main_frame), main_box); - - option_box = gtk_vbox_new(false, 5); - option_frame = gtk_frame_new(""); - gtk_container_add(GTK_CONTAINER(option_frame), option_box); - gtk_frame_set_shadow_type(GTK_FRAME(option_frame), GTK_SHADOW_NONE); - - gtk_box_pack_start(GTK_BOX(option_box), log_check, false, false, 2); - gtk_box_pack_start(GTK_BOX(option_box), bilinear_holder, false, false, 2); - gtk_box_pack_start(GTK_BOX(option_box), int_holder, false, false, 2); - gtk_box_pack_start(GTK_BOX(option_box), aa_holder, false, false, 2); - gtk_box_pack_start(GTK_BOX(option_box), snap_holder, false, false, 2); - gtk_box_pack_start(GTK_BOX(option_box), widescreen_check, false, false, 2); - gtk_box_pack_start(GTK_BOX(option_box), advanced_button, false, false, 2); - gtk_box_pack_start(GTK_BOX(option_box), dis_hacks_check, false, false, 2); - -#ifdef ZEROGS_DEVBUILD - gtk_box_pack_start(GTK_BOX(option_box), separator, false, false, 2); - gtk_box_pack_start(GTK_BOX(option_box), warning_label, false, false, 2); - gtk_box_pack_start(GTK_BOX(option_box), skipdraw_holder, false, false, 2); -#endif - - gtk_box_pack_start(GTK_BOX(option_box), fullscreen_label, false, false, 2); - - gtk_box_pack_start(GTK_BOX(main_box), option_frame, false, false, 2); - - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(log_check), conf.log); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widescreen_check), (conf.widescreen())); - gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(dis_hacks_check), (conf.disableHacks)); - - gtk_container_add(GTK_CONTAINER(gtk_dialog_get_content_area(GTK_DIALOG(dialog))), main_frame); - g_signal_connect_swapped(GTK_OBJECT (advanced_button), "clicked", G_CALLBACK(DisplayAdvancedDialog), advanced_button); - tempHacks = conf.hacks; - gtk_widget_show_all(dialog); - - return_value = gtk_dialog_run(GTK_DIALOG(dialog)); - - if (return_value == GTK_RESPONSE_ACCEPT) - { - ZZOptions fake_options; - - if (gtk_combo_box_get_active(GTK_COMBO_BOX(int_box)) != -1) - conf.interlace = gtk_combo_box_get_active(GTK_COMBO_BOX(int_box)); - - if (gtk_combo_box_get_active(GTK_COMBO_BOX(aa_box)) != -1) - conf.aa = gtk_combo_box_get_active(GTK_COMBO_BOX(aa_box)); - - if (gtk_combo_box_get_active(GTK_COMBO_BOX(bilinear_box)) != -1) - conf.bilinear = gtk_combo_box_get_active(GTK_COMBO_BOX(bilinear_box)); - - conf.log = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(log_check)); - fake_options.widescreen = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(widescreen_check)); - fake_options.tga_snap = gtk_combo_box_get_active(GTK_COMBO_BOX(snap_box)); - -#ifdef ZEROGS_DEVBUILD - conf.SkipDraw = atoi((char*)gtk_entry_get_text(GTK_ENTRY(skipdraw_text))); -#endif - - conf.zz_options = fake_options; - conf.hacks = tempHacks; - - conf.disableHacks = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dis_hacks_check)); - - GSsetGameCRC(g_LastCRC, conf.hacks._u32); - - SaveConfig(); - } - - gtk_widget_destroy(dialog); -} - -void CALLBACK GSconfigure() -{ - char strcurdir[256]; - getcwd(strcurdir, 256); - - if (!(conf.loaded())) LoadConfig(); - - DisplayDialog(); -} - -void SysMessage(const char *fmt, ...) -{ - va_list list; - char msg[512]; - - va_start(list, fmt); - vsprintf(msg, fmt, list); - va_end(list); - - if (msg[strlen(msg)-1] == '\n') msg[strlen(msg)-1] = 0; - - GtkWidget *dialog; - - dialog = gtk_message_dialog_new(NULL, - GTK_DIALOG_DESTROY_WITH_PARENT, - GTK_MESSAGE_INFO, - GTK_BUTTONS_OK, - "%s", msg); - - gtk_dialog_run(GTK_DIALOG(dialog)); - - gtk_widget_destroy(dialog); -} - -void CALLBACK GSabout() -{ - SysMessage("ZZOgl PG: by Zeydlitz (PG version worked on by arcum42, gregory, and the pcsx2 development team). Based off of ZeroGS, by zerofrog."); -} - -s32 CALLBACK GStest() -{ - return 0; -} - -void *SysLoadLibrary(char *lib) -{ - return dlopen(lib, RTLD_NOW | RTLD_GLOBAL); -} - -void *SysLoadSym(void *lib, char *sym) -{ - void *ret = dlsym(lib, sym); - - if (ret == NULL) ZZLog::Debug_Log("null: %s", sym); - - return dlsym(lib, sym); -} - -char *SysLibError() -{ - return dlerror(); -} - -void SysCloseLibrary(void *lib) -{ - dlclose(lib); -} diff --git a/plugins/zzogl-pg-cg/opengl/Linux/Linux.h b/plugins/zzogl-pg-cg/opengl/Linux/Linux.h deleted file mode 100644 index fc2eb402bc..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Linux/Linux.h +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (C) 2002-2004 GSsoft Team - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __LINUX_H__ -#define __LINUX_H__ - -struct confOptsStruct -{ - int value; - const char *desc; -} confOpts; - - -void OnToggle_advopts(GtkCellRendererToggle *cell, gchar *path, gpointer user_data); - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/Mem.cpp b/plugins/zzogl-pg-cg/opengl/Mem.cpp deleted file mode 100644 index 2bbfd8470a..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Mem.cpp +++ /dev/null @@ -1,384 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" -#include "Mem.h" -#include "targets.h" -#include "x86.h" - -#include "Mem_Transmit.h" -#include "Mem_Swizzle.h" -#ifdef ZEROGS_SSE2 -#include -#endif - -BLOCK m_Blocks[0x40]; // do so blocks are indexable - -PCSX2_ALIGNED16(u32 tempblock[64]); - -// Add a bunch of local variables that used to be in the TransferHostLocal -// functions, in order to de-macro the TransmitHostLocal macros. -// May be in a class or namespace eventually. -int tempX, tempY; -int pitch, area, fracX; -int nSize; -u8* pstart; - -// ------------------------ -// | Y | -// ------------------------ -// | block | | -// | aligned area | X | -// | | | -// ------------------------ -// | Y | -// ------------------------ - -template -static __forceinline const T* AlignOnBlockBoundry(TransferData data, TransferFuncts fun, Point alignedPt, int& endY, const T* pbuf) -{ - bool bCanAlign = ((MOD_POW2(gs.trxpos.dx, data.blockwidth) == 0) && (gs.imageX == gs.trxpos.dx) && - (alignedPt.y > endY) && (alignedPt.x > gs.trxpos.dx)); - - if ((gs.imageEndX - gs.trxpos.dx) % data.widthlimit) - { - /* hack */ - int testwidth = (int)nSize - - (gs.imageEndY - gs.imageY) * (gs.imageEndX - gs.trxpos.dx) - + (gs.imageX - gs.trxpos.dx); - - if ((testwidth <= data.widthlimit) && (testwidth >= -data.widthlimit)) - { - /* don't transfer */ - /*ZZLog::Debug_Log("Bad texture %s: %d %d %d", #psm, gs.trxpos.dx, gs.imageEndX, nQWordSize);*/ - //ZZLog::Error_Log("Bad texture: testwidth = %d; data.widthlimit = %d", testwidth, data.widthlimit); - gs.imageTransfer = -1; - } - - bCanAlign = false; - } - - /* first align on block boundary */ - if (MOD_POW2(gs.imageY, data.blockheight) || !bCanAlign) - { - u32 transwidth; - - if (!bCanAlign) - endY = gs.imageEndY; /* transfer the whole image */ - else - assert(endY < gs.imageEndY); /* part of alignment condition */ - - if (((gs.imageEndX - gs.trxpos.dx) % data.widthlimit) || ((gs.imageEndX - gs.imageX) % data.widthlimit)) - { - /* transmit with a width of 1 */ - transwidth = (1 + (DSTPSM == PSMT4)); - } - else - { - transwidth = data.widthlimit; - } - - pbuf = TransmitHostLocalY(data.psm, fun.wp, transwidth, endY, pbuf); - - if (pbuf == NULL) return NULL; - - if (nSize == 0 || tempY == gs.imageEndY) return NULL; - } - - return pbuf; -} - -template -static __forceinline const T* TransferAligningToBlocks(TransferData data, TransferFuncts fun, Point alignedPt, const T* pbuf) -{ - bool bAligned; - const u32 TSize = sizeof(T); - _SwizzleBlock swizzle; - - /* can align! */ - pitch = gs.imageEndX - gs.trxpos.dx; - area = pitch * data.blockheight; - fracX = gs.imageEndX - alignedPt.x; - - /* on top of checking whether pbuf is aligned, make sure that the width is at least aligned to its limits (due to bugs in pcsx2) */ - bAligned = !((uptr)pbuf & 0xf) && (TransPitch(pitch, data.transfersize) & 0xf) == 0; - - if (bAligned || ((DSTPSM == PSMCT24) || (DSTPSM == PSMT8H) || (DSTPSM == PSMT4HH) || (DSTPSM == PSMT4HL))) - swizzle = (fun.Swizzle); - else - swizzle = (fun.Swizzle_u); - - //Transfer aligning to blocks. - for (; tempY < alignedPt.y && nSize >= area; tempY += data.blockheight, nSize -= area) - { - for (int tempj = gs.trxpos.dx; tempj < alignedPt.x; tempj += data.blockwidth, pbuf += TransPitch(data.blockwidth, data.transfersize) / TSize) - { - u8 *temp = pstart + fun.gp(tempj, tempY, gs.dstbuf.bw) * data.blockbits / 8; - swizzle(temp, (u8*)pbuf, TransPitch(pitch, data.transfersize)); - } -#ifdef ZEROGS_SSE2 - // Note: swizzle function uses some non temporal move (mm_stream) instruction. - // store fence insures that previous store are finish before execute new one. - _mm_sfence(); - -#endif - - /* transfer the rest */ - if (alignedPt.x < gs.imageEndX) - { - pbuf = TransmitHostLocalX(data.psm, fun.wp, data.widthlimit, data.blockheight, alignedPt.x, pbuf); - - if (pbuf == NULL) return NULL; - - pbuf -= TransPitch((alignedPt.x - gs.trxpos.dx), data.transfersize) / TSize; - } - else - { - pbuf += (data.blockheight - 1) * TransPitch(pitch, data.transfersize) / TSize; - } - - tempX = gs.trxpos.dx; - } - - return pbuf; -} - -static __forceinline int FinishTransfer(TransferData data, int nLeftOver) -{ - if (tempY >= gs.imageEndY) - { - assert(gs.imageTransfer == -1 || tempY == gs.imageEndY); - gs.imageTransfer = -1; - /*int start, end; - GetRectMemAddress(start, end, gs.dstbuf.psm, gs.trxpos.dx, gs.trxpos.dy, gs.imageWnew, gs.imageHnew, gs.dstbuf.bp, gs.dstbuf.bw); - g_MemTargs.ClearRange(start, end);*/ - } - else - { - /* update new params */ - gs.imageY = tempY; - gs.imageX = tempX; - } - - return (nSize * TransPitch(2, data.transfersize) + nLeftOver) / 2; -} - -template -static __forceinline int RealTransfer(u32 psm, const void* pbyMem, u32 nQWordSize) -{ - assert(gs.imageTransfer == 0); - TransferData data = tData[psm]; - TransferFuncts fun(psm); - pstart = g_pbyGSMemory + gs.dstbuf.bp * 256; - const T* pbuf = (const T*)pbyMem; - const int tp2 = TransPitch(2, data.transfersize); - int nLeftOver = (nQWordSize * 4 * 2) % tp2; - tempY = gs.imageY; - tempX = gs.imageX; - Point alignedPt; - - nSize = (nQWordSize * 4 * 2) / tp2; - nSize = min(nSize, gs.imageWnew * gs.imageHnew); - - int endY = ROUND_UPPOW2(gs.imageY, data.blockheight); - alignedPt.y = ROUND_DOWNPOW2(gs.imageEndY, data.blockheight); - alignedPt.x = ROUND_DOWNPOW2(gs.imageEndX, data.blockwidth); - - pbuf = AlignOnBlockBoundry(data, fun, alignedPt, endY, pbuf); - - if (pbuf == NULL) return FinishTransfer(data, nLeftOver); - - pbuf = TransferAligningToBlocks(data, fun, alignedPt, pbuf); - - if (pbuf == NULL) return FinishTransfer(data, nLeftOver); - - if (TransPitch(nSize, data.transfersize) / 4 > 0) - { - pbuf = TransmitHostLocalY(psm, fun.wp, data.widthlimit, gs.imageEndY, pbuf); - - if (pbuf == NULL) return FinishTransfer(data, nLeftOver); - - /* sometimes wrong sizes are sent (tekken tag) */ - assert(gs.imageTransfer == -1 || TransPitch(nSize, data.transfersize) / 4 <= 2); - } - - return FinishTransfer(data, nLeftOver); -} - -int TransferHostLocal32(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMCT32, pbyMem, nQWordSize); } -int TransferHostLocal32Z(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMT32Z, pbyMem, nQWordSize); } -int TransferHostLocal24(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMCT24, pbyMem, nQWordSize); } -int TransferHostLocal24Z(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMT24Z, pbyMem, nQWordSize); } -int TransferHostLocal16(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMCT16, pbyMem, nQWordSize); } -int TransferHostLocal16S(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMCT16S, pbyMem, nQWordSize); } -int TransferHostLocal16Z(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMT16Z, pbyMem, nQWordSize); } -int TransferHostLocal16SZ(const void* pbyMem, u32 nQWordSize){ return RealTransfer(PSMT16SZ, pbyMem, nQWordSize); } -int TransferHostLocal8(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMT8, pbyMem, nQWordSize); } -int TransferHostLocal4(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMT4, pbyMem, nQWordSize); } -int TransferHostLocal8H(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMT8H, pbyMem, nQWordSize); } -int TransferHostLocal4HL(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMT4HL, pbyMem, nQWordSize); } -int TransferHostLocal4HH(const void* pbyMem, u32 nQWordSize) { return RealTransfer(PSMT4HH, pbyMem, nQWordSize); } - -void TransferLocalHost32(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost24(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost16(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost16S(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost8(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost4(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost8H(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost4HL(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost4HH(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost32Z(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost24Z(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost16Z(void* pbyMem, u32 nQWordSize) {FUNCLOG} -void TransferLocalHost16SZ(void* pbyMem, u32 nQWordSize) {FUNCLOG} - -void fill_block(BLOCK b, vector& vBlockData, vector& vBilinearData, int floatfmt) -{ - float* psrcf = (float*)&vBlockData[0] + b.ox + b.oy * BLOCK_TEXWIDTH; - u16* psrcw = NULL; - if (!floatfmt) - psrcw = (u16*)&vBlockData[0] + b.ox + b.oy * BLOCK_TEXWIDTH; - - for(int i = 0; i < b.height; ++i) - { - u32 i_width = i*BLOCK_TEXWIDTH; - for(int j = 0; j < b.width; ++j) - { - /* fill the table */ - u32 bt = b.blockTable[(i / b.colheight)*(b.width/b.colwidth) + (j / b.colwidth)]; - u32 ct = b.columnTable[(i%b.colheight)*b.colwidth + (j%b.colwidth)]; - u32 u = bt * 64 * b.mult + ct; - b.pageTable[i * b.width + j] = u; - if (floatfmt) - psrcf[i_width + j] = (float)(u) / (float)(GPU_TEXWIDTH * b.mult); - else - psrcw[i_width + j] = u; - - } - } - - if (floatfmt) { - float4* psrcv = (float4*)&vBilinearData[0] + b.ox + b.oy * BLOCK_TEXWIDTH; - - for(int i = 0; i < b.height; ++i) - { - u32 i_width = i*BLOCK_TEXWIDTH; - u32 i_width2 = ((i+1)%b.height)*BLOCK_TEXWIDTH; - for(int j = 0; j < b.width; ++j) - { - u32 temp = ((j + 1) % b.width); - float4* pv = &psrcv[i_width + j]; - pv->x = psrcf[i_width + j]; - pv->y = psrcf[i_width + temp]; - pv->z = psrcf[i_width2 + j]; - pv->w = psrcf[i_width2 + temp]; - } - } - } -} - -void BLOCK::FillBlocks(vector& vBlockData, vector& vBilinearData, int floatfmt) -{ - FUNCLOG - if (floatfmt) { - vBlockData.resize(BLOCK_TEXWIDTH * BLOCK_TEXHEIGHT * 4); - vBilinearData.resize(BLOCK_TEXWIDTH * BLOCK_TEXHEIGHT * sizeof(float4)); - } else { - vBlockData.resize(BLOCK_TEXWIDTH * BLOCK_TEXHEIGHT * 2); - } - - BLOCK b; - - memset(m_Blocks, 0, sizeof(m_Blocks)); - - // 32 - b.SetDim(64, 32, 0, 0, 1); - b.SetTable(PSMCT32); - fill_block(b, vBlockData, vBilinearData, floatfmt); - m_Blocks[PSMCT32] = b; - m_Blocks[PSMCT32].SetFun(PSMCT32); - - // 24 (same as 32 except write/readPixel are different) - m_Blocks[PSMCT24] = b; - m_Blocks[PSMCT24].SetFun(PSMCT24); - - // 8H (same as 32 except write/readPixel are different) - m_Blocks[PSMT8H] = b; - m_Blocks[PSMT8H].SetFun(PSMT8H); - - m_Blocks[PSMT4HL] = b; - m_Blocks[PSMT4HL].SetFun(PSMT4HL); - - m_Blocks[PSMT4HH] = b; - m_Blocks[PSMT4HH].SetFun(PSMT4HH); - - // 32z - b.SetDim(64, 32, 64, 0, 1); - b.SetTable(PSMT32Z); - fill_block(b, vBlockData, vBilinearData, floatfmt); - m_Blocks[PSMT32Z] = b; - m_Blocks[PSMT32Z].SetFun(PSMT32Z); - - // 24Z (same as 32Z except write/readPixel are different) - m_Blocks[PSMT24Z] = b; - m_Blocks[PSMT24Z].SetFun(PSMT24Z); - - // 16 - b.SetDim(64, 64, 0, 32, 2); - b.SetTable(PSMCT16); - fill_block(b, vBlockData, vBilinearData, floatfmt); - m_Blocks[PSMCT16] = b; - m_Blocks[PSMCT16].SetFun(PSMCT16); - - // 16s - b.SetDim(64, 64, 64, 32, 2); - b.SetTable(PSMCT16S); - fill_block(b, vBlockData, vBilinearData, floatfmt); - m_Blocks[PSMCT16S] = b; - m_Blocks[PSMCT16S].SetFun(PSMCT16S); - - // 16z - b.SetDim(64, 64, 0, 96, 2); - b.SetTable(PSMT16Z); - fill_block(b, vBlockData, vBilinearData, floatfmt); - m_Blocks[PSMT16Z] = b; - m_Blocks[PSMT16Z].SetFun(PSMT16Z); - - // 16sz - b.SetDim(64, 64, 64, 96, 2); - b.SetTable(PSMT16SZ); - fill_block(b, vBlockData, vBilinearData, floatfmt); - m_Blocks[PSMT16SZ] = b; - m_Blocks[PSMT16SZ].SetFun(PSMT16SZ); - - // 8 - b.SetDim(128, 64, 0, 160, 4); - b.SetTable(PSMT8); - fill_block(b, vBlockData, vBilinearData, floatfmt); - m_Blocks[PSMT8] = b; - m_Blocks[PSMT8].SetFun(PSMT8); - - // 4 - b.SetDim(128, 128, 0, 224, 8); - b.SetTable(PSMT4); - fill_block(b, vBlockData, vBilinearData, floatfmt); - m_Blocks[PSMT4] = b; - m_Blocks[PSMT4].SetFun(PSMT4); -} diff --git a/plugins/zzogl-pg-cg/opengl/Mem.h b/plugins/zzogl-pg-cg/opengl/Mem.h deleted file mode 100644 index f4fdb21116..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Mem.h +++ /dev/null @@ -1,531 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __MEM_H__ -#define __MEM_H__ - -#include -#include - -// works only when base is a power of 2 -static __forceinline int ROUND_UPPOW2(int val, int base) { return (((val) + (base - 1))&~(base - 1)); } -static __forceinline int ROUND_DOWNPOW2(int val, int base) { return ((val)&~(base - 1)); } -static __forceinline int MOD_POW2(int val, int base) { return ((val)&(base - 1)); } - -// d3d texture dims -const int BLOCK_TEXWIDTH = 128; -const int BLOCK_TEXHEIGHT = 512; - -extern PCSX2_ALIGNED16(u32 tempblock[64]); - -typedef u32(*_getPixelAddress)(int x, int y, u32 bp, u32 bw); -typedef u32(*_getPixelAddress_0)(int x, int y, u32 bw); -typedef void (*_writePixel)(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw); -typedef void (*_writePixel_0)(void* pmem, int x, int y, u32 pixel, u32 bw); -typedef u32(*_readPixel)(const void* pmem, int x, int y, u32 bp, u32 bw); -typedef u32(*_readPixel_0)(const void* pmem, int x, int y, u32 bw); -typedef int (*_TransferHostLocal)(const void* pbyMem, u32 nQWordSize); -typedef void (*_TransferLocalHost)(void* pbyMem, u32 nQWordSize); -typedef void (*_SwizzleBlock)(u8 *dst, u8 *src, int pitch); - -extern _getPixelAddress_0 getPixelFun_0[64]; -extern _writePixel_0 writePixelFun_0[64]; -extern _readPixel_0 readPixelFun_0[64]; -extern _writePixel writePixelFun[64]; -extern _readPixel readPixelFun[64]; -extern _SwizzleBlock swizzleBlockFun[64]; -extern _SwizzleBlock swizzleBlockUnFun[64]; -extern _TransferHostLocal TransferHostLocalFun[64]; -extern _TransferLocalHost TransferLocalHostFun[64]; - -// Both of the following structs should probably be local class variables or in a namespace, -// but this works for the moment. - -struct TransferData -{ - // Signed because Visual C++ is weird. - s32 widthlimit; - u32 blockbits; - u32 blockwidth; - u32 blockheight; - u32 transfersize; - u32 psm; -}; - -struct TransferFuncts -{ - _writePixel_0 wp; - _getPixelAddress_0 gp; - _SwizzleBlock Swizzle, Swizzle_u; - __forceinline TransferFuncts(_writePixel_0 writePix, _getPixelAddress_0 readPix, _SwizzleBlock s, _SwizzleBlock su) - { - wp = writePix; - gp = readPix; - Swizzle = s; - Swizzle_u = su; - } - __forceinline TransferFuncts(u32 psm) - { - wp = writePixelFun_0[psm]; - gp = getPixelFun_0[psm]; - Swizzle = swizzleBlockFun[psm]; - Swizzle_u = swizzleBlockUnFun[psm]; - } -}; - -extern TransferData tData[64]; -// rest not visible externally - -extern u32 g_blockTable32[4][8]; -extern u32 g_blockTable32Z[4][8]; -extern u32 g_blockTable16[8][4]; -extern u32 g_blockTable16S[8][4]; -extern u32 g_blockTable16Z[8][4]; -extern u32 g_blockTable16SZ[8][4]; -extern u32 g_blockTable8[4][8]; -extern u32 g_blockTable4[8][4]; - -extern u32 g_columnTable32[8][8]; -extern u32 g_columnTable16[8][16]; -extern u32 g_columnTable8[16][16]; -extern u32 g_columnTable4[16][32]; - -extern u32 g_pageTable32[32][64]; -extern u32 g_pageTable32Z[32][64]; -extern u32 g_pageTable16[64][64]; -extern u32 g_pageTable16S[64][64]; -extern u32 g_pageTable16Z[64][64]; -extern u32 g_pageTable16SZ[64][64]; -extern u32 g_pageTable8[64][128]; -extern u32 g_pageTable4[128][128]; - -struct BLOCK -{ - BLOCK() { memset(this, 0, sizeof(BLOCK)); } - - // shader constants for this block - float4 vTexBlock; - float4 vTexDims; - int width, height; // dims of one page in pixels - int ox, oy, mult; - int bpp; - int colwidth, colheight; - u32* pageTable; // offset inside each page - u32* blockTable; - u32* columnTable; - - _getPixelAddress getPixelAddress; - _getPixelAddress_0 getPixelAddress_0; - _writePixel writePixel; - _writePixel_0 writePixel_0; - _readPixel readPixel; - _readPixel_0 readPixel_0; - _TransferHostLocal TransferHostLocal; - _TransferLocalHost TransferLocalHost; - - // texture must be of dims BLOCK_TEXWIDTH and BLOCK_TEXHEIGHT - static void FillBlocks(std::vector& vBlockData, std::vector& vBilinearData, int floatfmt); - - void SetDim(u32 bw, u32 bh, u32 ox2, u32 oy2, u32 mult2) - { - ox = ox2; - oy = oy2; - mult = mult2; - vTexDims = float4(BLOCK_TEXWIDTH/(float)(bw), BLOCK_TEXHEIGHT/(float)bh, 0, 0); - vTexBlock = float4((float)bw/BLOCK_TEXWIDTH, (float)bh/BLOCK_TEXHEIGHT, ((float)ox+0.2f)/BLOCK_TEXWIDTH, ((float)oy+0.05f)/BLOCK_TEXHEIGHT); - width = bw; - height = bh; - colwidth = bh / 4; - colheight = bw / 8; - bpp = 32/mult; - } - - void SetFun(u32 psm) - { - writePixel = writePixelFun[psm]; - writePixel_0 = writePixelFun_0[psm]; - readPixel = readPixelFun[psm]; - readPixel_0 = readPixelFun_0[psm]; - TransferHostLocal = TransferHostLocalFun[psm]; - TransferLocalHost = TransferLocalHostFun[psm]; - } - - void SetTable(u32 psm) - { - switch (psm) { - case PSMCT32: - assert( sizeof(g_pageTable32) == width * height * sizeof(g_pageTable32[0][0]) ); - pageTable = &g_pageTable32[0][0]; - blockTable = &g_blockTable32[0][0]; - columnTable = &g_columnTable32[0][0]; - break; - case PSMT32Z: - assert( sizeof(g_pageTable32Z) == width * height * sizeof(g_pageTable32Z[0][0]) ); - pageTable = &g_pageTable32Z[0][0]; - blockTable = &g_blockTable32Z[0][0]; - columnTable = &g_columnTable32[0][0]; - break; - case PSMCT16: - assert( sizeof(g_pageTable16) == width * height * sizeof(g_pageTable16[0][0]) ); - pageTable = &g_pageTable16[0][0]; - blockTable = &g_blockTable16[0][0]; - columnTable = &g_columnTable16[0][0]; - break; - case PSMCT16S: - assert( sizeof(g_pageTable16S) == width * height * sizeof(g_pageTable16S[0][0]) ); - pageTable = &g_pageTable16S[0][0]; - blockTable = &g_blockTable16S[0][0]; - columnTable = &g_columnTable16[0][0]; - break; - case PSMT16Z: - assert( sizeof(g_pageTable16Z) == width * height * sizeof(g_pageTable16Z[0][0]) ); - pageTable = &g_pageTable16Z[0][0]; - blockTable = &g_blockTable16Z[0][0]; - columnTable = &g_columnTable16[0][0]; - break; - case PSMT16SZ: - assert( sizeof(g_pageTable16SZ) == width * height * sizeof(g_pageTable16SZ[0][0]) ); - pageTable = &g_pageTable16SZ[0][0]; - blockTable = &g_blockTable16SZ[0][0]; - columnTable = &g_columnTable16[0][0]; - break; - case PSMT8: - assert( sizeof(g_pageTable8) == width * height * sizeof(g_pageTable8[0][0]) ); - pageTable = &g_pageTable8[0][0]; - blockTable = &g_blockTable8[0][0]; - columnTable = &g_columnTable8[0][0]; - break; - case PSMT4: - assert( sizeof(g_pageTable4) == width * height * sizeof(g_pageTable4[0][0]) ); - pageTable = &g_pageTable4[0][0]; - blockTable = &g_blockTable4[0][0]; - columnTable = &g_columnTable4[0][0]; - break; - default: - pageTable = NULL; - blockTable = NULL; - columnTable = NULL; - break; - } - } -}; - -extern BLOCK m_Blocks[]; - -#define getPixelAddress24 getPixelAddress32 -#define getPixelAddress24_0 getPixelAddress32_0 -#define getPixelAddress8H getPixelAddress32 -#define getPixelAddress8H_0 getPixelAddress32_0 -#define getPixelAddress4HL getPixelAddress32 -#define getPixelAddress4HL_0 getPixelAddress32_0 -#define getPixelAddress4HH getPixelAddress32 -#define getPixelAddress4HH_0 getPixelAddress32_0 -#define getPixelAddress24Z getPixelAddress32Z -#define getPixelAddress24Z_0 getPixelAddress32Z_0 - -static __forceinline u32 getPixelAddress32(int x, int y, u32 bp, u32 bw) -{ - u32 basepage = ((y >> 5) * (bw >> 6)) + (x >> 6); - u32 word = bp * 64 + basepage * 2048 + g_pageTable32[y&31][x&63]; - return word; -} - -static __forceinline u32 getPixelAddress16(int x, int y, u32 bp, u32 bw) -{ - u32 basepage = ((y >> 6) * (bw >> 6)) + (x >> 6); - u32 word = bp * 128 + basepage * 4096 + g_pageTable16[y&63][x&63]; - return word; -} - -static __forceinline u32 getPixelAddress16S(int x, int y, u32 bp, u32 bw) -{ - u32 basepage = ((y >> 6) * (bw >> 6)) + (x >> 6); - u32 word = bp * 128 + basepage * 4096 + g_pageTable16S[y&63][x&63]; - return word; -} - -static __forceinline u32 getPixelAddress8(int x, int y, u32 bp, u32 bw) -{ - u32 basepage = ((y >> 6) * ((bw + 127) >> 7)) + (x >> 7); - u32 word = bp * 256 + basepage * 8192 + g_pageTable8[y&63][x&127]; - return word; -} - -static __forceinline u32 getPixelAddress4(int x, int y, u32 bp, u32 bw) -{ - u32 basepage = ((y >> 7) * ((bw + 127) >> 7)) + (x >> 7); - u32 word = bp * 512 + basepage * 16384 + g_pageTable4[y&127][x&127]; - return word; -} - -static __forceinline u32 getPixelAddress32Z(int x, int y, u32 bp, u32 bw) -{ - u32 basepage = ((y >> 5) * (bw >> 6)) + (x >> 6); - u32 word = bp * 64 + basepage * 2048 + g_pageTable32Z[y&31][x&63]; - return word; -} - -static __forceinline u32 getPixelAddress16Z(int x, int y, u32 bp, u32 bw) -{ - u32 basepage = ((y >> 6) * (bw >> 6)) + (x >> 6); - u32 word = bp * 128 + basepage * 4096 + g_pageTable16Z[y&63][x&63]; - return word; -} - -static __forceinline u32 getPixelAddress16SZ(int x, int y, u32 bp, u32 bw) -{ - u32 basepage = ((y >> 6) * (bw >> 6)) + (x >> 6); - u32 word = bp * 128 + basepage * 4096 + g_pageTable16SZ[y&63][x&63]; - return word; -} - -/////////////// - -static __forceinline void writePixel32(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - ((u32*)pmem)[getPixelAddress32(x, y, bp, bw)] = pixel; -} - -static __forceinline void writePixel24(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - u8 *buf = (u8*) & ((u32*)pmem)[getPixelAddress32(x, y, bp, bw)]; - u8 *pix = (u8*) & pixel; - buf[0] = pix[0]; - buf[1] = pix[1]; - buf[2] = pix[2]; -} - -static __forceinline void writePixel16(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - ((u16*)pmem)[getPixelAddress16(x, y, bp, bw)] = pixel; -} - -static __forceinline void writePixel16S(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - ((u16*)pmem)[getPixelAddress16S(x, y, bp, bw)] = pixel; -} - -static __forceinline void writePixel8(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - ((u8*)pmem)[getPixelAddress8(x, y, bp, bw)] = pixel; -} - -static __forceinline void writePixel8H(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - ((u8*)pmem)[4*getPixelAddress32(x, y, bp, bw)+3] = pixel; -} - -static __forceinline void writePixel4(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - u32 addr = getPixelAddress4(x, y, bp, bw); - u8 pix = ((u8*)pmem)[addr/2]; - - if (addr & 0x1)((u8*)pmem)[addr/2] = (pix & 0x0f) | (pixel << 4); - else ((u8*)pmem)[addr/2] = (pix & 0xf0) | (pixel); -} - -static __forceinline void writePixel4HL(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - u8 *p = (u8*)pmem + 4 * getPixelAddress4HL(x, y, bp, bw) + 3; - *p = (*p & 0xf0) | pixel; -} - -static __forceinline void writePixel4HH(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - u8 *p = (u8*)pmem + 4 * getPixelAddress4HH(x, y, bp, bw) + 3; - *p = (*p & 0x0f) | (pixel << 4); -} - -static __forceinline void writePixel32Z(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - ((u32*)pmem)[getPixelAddress32Z(x, y, bp, bw)] = pixel; -} - -static __forceinline void writePixel24Z(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - u8 *buf = (u8*)pmem + 4 * getPixelAddress32Z(x, y, bp, bw); - u8 *pix = (u8*) & pixel; - buf[0] = pix[0]; - buf[1] = pix[1]; - buf[2] = pix[2]; -} - -static __forceinline void writePixel16Z(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - ((u16*)pmem)[getPixelAddress16Z(x, y, bp, bw)] = pixel; -} - -static __forceinline void writePixel16SZ(void* pmem, int x, int y, u32 pixel, u32 bp, u32 bw) -{ - ((u16*)pmem)[getPixelAddress16SZ(x, y, bp, bw)] = pixel; -} - -/////////////// - -static __forceinline u32 readPixel32(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - return ((const u32*)pmem)[getPixelAddress32(x, y, bp, bw)]; -} - -static __forceinline u32 readPixel24(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - return ((const u32*)pmem)[getPixelAddress32(x, y, bp, bw)] & 0xffffff; -} - -static __forceinline u32 readPixel16(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - return ((const u16*)pmem)[getPixelAddress16(x, y, bp, bw)]; -} - -static __forceinline u32 readPixel16S(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - return ((const u16*)pmem)[getPixelAddress16S(x, y, bp, bw)]; -} - -static __forceinline u32 readPixel8(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - return ((const u8*)pmem)[getPixelAddress8(x, y, bp, bw)]; -} - -static __forceinline u32 readPixel8H(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - return ((const u8*)pmem)[4*getPixelAddress32(x, y, bp, bw) + 3]; -} - -static __forceinline u32 readPixel4(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - u32 addr = getPixelAddress4(x, y, bp, bw); - u8 pix = ((const u8*)pmem)[addr/2]; - - if (addr & 0x1) - return pix >> 4; - else - return pix & 0xf; -} - -static __forceinline u32 readPixel4HL(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - const u8 *p = (const u8*)pmem + 4 * getPixelAddress4HL(x, y, bp, bw) + 3; - return *p & 0x0f; -} - -static __forceinline u32 readPixel4HH(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - const u8 *p = (const u8*)pmem + 4 * getPixelAddress4HH(x, y, bp, bw) + 3; - return *p >> 4; -} - -/////////////// - -static __forceinline u32 readPixel32Z(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - return ((const u32*)pmem)[getPixelAddress32Z(x, y, bp, bw)]; -} - -static __forceinline u32 readPixel24Z(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - return ((const u32*)pmem)[getPixelAddress32Z(x, y, bp, bw)] & 0xffffff; -} - -static __forceinline u32 readPixel16Z(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - return ((const u16*)pmem)[getPixelAddress16Z(x, y, bp, bw)]; -} - -static __forceinline u32 readPixel16SZ(const void* pmem, int x, int y, u32 bp, u32 bw) -{ - return ((const u16*)pmem)[getPixelAddress16SZ(x, y, bp, bw)]; -} - -/////////////////////////////// -// Functions that take 0 bps // -/////////////////////////////// - -static __forceinline u32 getPixelAddress32_0(int x, int y, u32 bw) { return getPixelAddress32(x, y, 0, bw); } -static __forceinline u32 getPixelAddress16_0(int x, int y, u32 bw) { return getPixelAddress16(x, y, 0, bw); } -static __forceinline u32 getPixelAddress16S_0(int x, int y, u32 bw) { return getPixelAddress16S(x, y, 0, bw); } -static __forceinline u32 getPixelAddress8_0(int x, int y, u32 bw) { return getPixelAddress8(x, y, 0, bw); } -static __forceinline u32 getPixelAddress4_0(int x, int y, u32 bw) { return getPixelAddress4(x, y, 0, bw); } -static __forceinline u32 getPixelAddress32Z_0(int x, int y, u32 bw) { return getPixelAddress32Z(x, y, 0, bw); } -static __forceinline u32 getPixelAddress16Z_0(int x, int y, u32 bw) { return getPixelAddress16Z(x, y, 0, bw); } -static __forceinline u32 getPixelAddress16SZ_0(int x, int y, u32 bw) { return getPixelAddress16SZ(x, y, 0, bw); } - -/////////////// - -static __forceinline void writePixel32_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel32(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel24_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel24(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel16_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel16(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel16S_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel16S(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel8_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel8(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel8H_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel8H(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel4_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel4(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel4HL_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel4HL(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel4HH_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel4HH(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel32Z_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel32Z(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel24Z_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel24Z(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel16Z_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel16Z(pmem, x, y, pixel, 0, bw); } -static __forceinline void writePixel16SZ_0(void* pmem, int x, int y, u32 pixel, u32 bw) { writePixel16SZ(pmem, x, y, pixel, 0, bw); } - -/////////////// - -static __forceinline u32 readPixel32_0(const void* pmem, int x, int y, u32 bw) { return readPixel32(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel24_0(const void* pmem, int x, int y, u32 bw) { return readPixel24(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel16_0(const void* pmem, int x, int y, u32 bw) { return readPixel16(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel16S_0(const void* pmem, int x, int y, u32 bw) { return readPixel16S(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel8_0(const void* pmem, int x, int y, u32 bw) { return readPixel8(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel8H_0(const void* pmem, int x, int y, u32 bw) { return readPixel8H(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel4_0(const void* pmem, int x, int y, u32 bw) { return readPixel4(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel4HL_0(const void* pmem, int x, int y, u32 bw) { return readPixel4HL(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel4HH_0(const void* pmem, int x, int y, u32 bw) { return readPixel4HH(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel32Z_0(const void* pmem, int x, int y, u32 bw) { return readPixel32Z(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel24Z_0(const void* pmem, int x, int y, u32 bw) { return readPixel24Z(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel16Z_0(const void* pmem, int x, int y, u32 bw) { return readPixel16Z(pmem, x, y, 0, bw); } -static __forceinline u32 readPixel16SZ_0(const void* pmem, int x, int y, u32 bw) { return readPixel16SZ(pmem, x, y, 0, bw); } - -/////////////// - -extern int TransferHostLocal32(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal32Z(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal24(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal24Z(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal16(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal16S(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal16Z(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal16SZ(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal8(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal4(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal8H(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal4HL(const void* pbyMem, u32 nQWordSize); -extern int TransferHostLocal4HH(const void* pbyMem, u32 nQWordSize); - -extern void TransferLocalHost32(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost24(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost16(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost16S(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost8(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost4(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost8H(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost4HL(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost4HH(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost32Z(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost24Z(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost16Z(void* pbyMem, u32 nQWordSize); -extern void TransferLocalHost16SZ(void* pbyMem, u32 nQWordSize); - -#endif /* __MEM_H__ */ diff --git a/plugins/zzogl-pg-cg/opengl/Mem_Swizzle.cpp b/plugins/zzogl-pg-cg/opengl/Mem_Swizzle.cpp deleted file mode 100644 index 4f49dfde7e..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Mem_Swizzle.cpp +++ /dev/null @@ -1,756 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" -#include "Mem.h" -#include "Mem_Swizzle.h" -#ifdef ZEROGS_SSE2 -#include -#endif - -// WARNING a sfence instruction must be call after SwizzleBlock sse2 function - -// Current port of the ASM function to intrinsic -#define INTRINSIC_PORT_16 -#define INTRINSIC_PORT_8 -#define INTRINSIC_PORT_4 -#ifdef ZEROGS_SSE2 -static const __aligned16 u32 mask_24b_H[4] = {0xFF000000, 0x0000FFFF, 0xFF000000, 0x0000FFFF}; -static const __aligned16 u32 mask_24b_L[4] = {0x00FFFFFF, 0x00000000, 0x00FFFFFF, 0x00000000}; - -template -__forceinline void SwizzleBlock32_sse2_I(u8 *dst, u8 *src, int pitch) -{ - __m128i src_0; - __m128i src_1; - __m128i src_2; - __m128i src_3; - - for (int i=3 ; i >= 0 ; --i) { - // load - if (aligned) { - src_0 = _mm_load_si128((__m128i*)src); // 5 4 1 0 - src_1 = _mm_load_si128((__m128i*)(src+16)); // 13 12 9 8 - src_2 = _mm_load_si128((__m128i*)(src+pitch)); // 7 6 3 2 - src_3 = _mm_load_si128((__m128i*)(src+16+pitch)); // 15 14 11 10 - } else { - src_0 = _mm_loadu_si128((__m128i*)src); // 5 4 1 0 - src_1 = _mm_loadu_si128((__m128i*)(src+16)); // 13 12 9 8 - src_2 = _mm_loadu_si128((__m128i*)(src+pitch)); // 7 6 3 2 - src_3 = _mm_loadu_si128((__m128i*)(src+16+pitch)); // 15 14 11 10 - } - - // Reorder - __m128i dst_0 = _mm_unpacklo_epi64(src_0, src_2); // 3 2 1 0 - __m128i dst_1 = _mm_unpackhi_epi64(src_0, src_2); // 7 6 5 4 - __m128i dst_2 = _mm_unpacklo_epi64(src_1, src_3); // 11 10 9 8 - __m128i dst_3 = _mm_unpackhi_epi64(src_1, src_3); // 15 14 13 12 - - // store - _mm_stream_si128((__m128i*)dst, dst_0); - _mm_stream_si128(((__m128i*)dst)+1, dst_1); - _mm_stream_si128(((__m128i*)dst)+2, dst_2); - _mm_stream_si128(((__m128i*)dst)+3, dst_3); - - // update the pointer - dst += 64; - src += 2*pitch; - } -} - -template -__forceinline void SwizzleBlock16_sse2_I(u8 *dst, u8 *src, int pitch) -{ - __m128i src_0_L; - __m128i src_0_H; - __m128i src_2_L; - __m128i src_2_H; - - for (int i=3 ; i >= 0 ; --i) { - // load - if (aligned) { - src_0_L = _mm_load_si128((__m128i*)src); // 13L 12L 9L 8L 5L 4L 1L 0L - src_0_H = _mm_load_si128((__m128i*)(src+16)); // 13H 12H 9H 8H 5H 4H 1H 0H - src_2_L = _mm_load_si128((__m128i*)(src+pitch)); // 15L 14L 11L 10L 7L 6L 3L 2L - src_2_H = _mm_load_si128((__m128i*)(src+16+pitch)); // 15H 14H 11H 10H 7H 6H 3H 2H - } else { - src_0_L = _mm_loadu_si128((__m128i*)src); // 13L 12L 9L 8L 5L 4L 1L 0L - src_0_H = _mm_loadu_si128((__m128i*)(src+16)); // 13H 12H 9H 8H 5H 4H 1H 0H - src_2_L = _mm_loadu_si128((__m128i*)(src+pitch)); // 15L 14L 11L 10L 7L 6L 3L 2L - src_2_H = _mm_loadu_si128((__m128i*)(src+16+pitch)); // 15H 14H 11H 10H 7H 6H 3H 2H - } - - // Interleave L and H to obtains 32 bits packets - __m128i dst_0_tmp = _mm_unpacklo_epi16(src_0_L, src_0_H); // 5H 5L 4H 4L 1H 1L 0H 0L - __m128i dst_1_tmp = _mm_unpacklo_epi16(src_2_L, src_2_H); // 7H 7L 6H 6L 3H 3L 2H 2L - __m128i dst_2_tmp = _mm_unpackhi_epi16(src_0_L, src_0_H); // 13H 13L 12H 12L 9H 9L 8H 8L - __m128i dst_3_tmp = _mm_unpackhi_epi16(src_2_L, src_2_H); // 15H 15L 14H 14L 11H 11L 10H 10L - - // Reorder - __m128i dst_0 = _mm_unpacklo_epi64(dst_0_tmp, dst_1_tmp); // 3 2 1 0 - __m128i dst_1 = _mm_unpackhi_epi64(dst_0_tmp, dst_1_tmp); // 7 6 5 4 - __m128i dst_2 = _mm_unpacklo_epi64(dst_2_tmp, dst_3_tmp); // 11 10 9 8 - __m128i dst_3 = _mm_unpackhi_epi64(dst_2_tmp, dst_3_tmp); // 15 14 13 12 - - // store - _mm_stream_si128((__m128i*)dst, dst_0); - _mm_stream_si128(((__m128i*)dst)+1, dst_1); - _mm_stream_si128(((__m128i*)dst)+2, dst_2); - _mm_stream_si128(((__m128i*)dst)+3, dst_3); - - // update the pointer - dst += 64; - src += 2*pitch; - } -} - -// Template the code to improve reuse of code -template -__forceinline void SwizzleColumn8_sse2_I(u8 *dst, u8 *src, int pitch) -{ - __m128i src_0; - __m128i src_1; - __m128i src_2; - __m128i src_3; - - // load 4 line of 16*8 bits packets - if (aligned) { - src_0 = _mm_load_si128((__m128i*)src); - src_2 = _mm_load_si128((__m128i*)(src+pitch)); - src_1 = _mm_load_si128((__m128i*)(src+2*pitch)); - src_3 = _mm_load_si128((__m128i*)(src+3*pitch)); - } else { - src_0 = _mm_loadu_si128((__m128i*)src); - src_2 = _mm_loadu_si128((__m128i*)(src+pitch)); - src_1 = _mm_loadu_si128((__m128i*)(src+2*pitch)); - src_3 = _mm_loadu_si128((__m128i*)(src+3*pitch)); - } - - // shuffle 2 lines to align pixels - if (INDEX == 0 || INDEX == 2) { - src_1 = _mm_shuffle_epi32(src_1, 0xB1); // 13 12 9 8 5 4 1 0 ... (byte 3 & 1) - src_3 = _mm_shuffle_epi32(src_3, 0xB1); // 15 14 11 10 7 6 3 2 ... (byte 3 & 1) - } else if (INDEX == 1 || INDEX == 3) { - src_0 = _mm_shuffle_epi32(src_0, 0xB1); // 13 12 9 8 5 4 1 0 ... (byte 2 & 0) - src_2 = _mm_shuffle_epi32(src_2, 0xB1); // 15 14 11 10 7 6 3 2 ... (byte 2 & 0) - } else { - assert(0); - } - // src_0 = 13 12 9 8 5 4 1 0 ... (byte 2 & 0) - // src_1 = 13 12 9 8 5 4 1 0 ... (byte 3 & 1) - // src_2 = 15 14 11 10 7 6 3 2 ... (byte 2 & 0) - // src_3 = 15 14 11 10 7 6 3 2 ... (byte 3 & 1) - - // Interleave byte 1 & 0 to obtain 16 bits packets - __m128i src_0_L = _mm_unpacklo_epi8(src_0, src_1); // 13L 12L 9L 8L 5L 4L 1L 0L - __m128i src_1_L = _mm_unpacklo_epi8(src_2, src_3); // 15L 14L 11L 10L 7L 6L 3L 2L - // Interleave byte 3 & 2 to obtain 16 bits packets - __m128i src_0_H = _mm_unpackhi_epi8(src_0, src_1); // 13H 12H 9H 8H 5H 4H 1H 0H - __m128i src_1_H = _mm_unpackhi_epi8(src_2, src_3); // 15H 14H 11H 10H 7H 6H 3H 2H - - // Interleave H and L to obtain 32 bits packets - __m128i dst_0_tmp = _mm_unpacklo_epi16(src_0_L, src_0_H); // 5 4 1 0 - __m128i dst_1_tmp = _mm_unpacklo_epi16(src_1_L, src_1_H); // 7 6 3 2 - __m128i dst_2_tmp = _mm_unpackhi_epi16(src_0_L, src_0_H); // 13 12 9 8 - __m128i dst_3_tmp = _mm_unpackhi_epi16(src_1_L, src_1_H); // 15 14 11 10 - - // Reorder the 32 bits packets - __m128i dst_0 = _mm_unpacklo_epi64(dst_0_tmp, dst_1_tmp); // 3 2 1 0 - __m128i dst_1 = _mm_unpackhi_epi64(dst_0_tmp, dst_1_tmp); // 7 6 5 4 - __m128i dst_2 = _mm_unpacklo_epi64(dst_2_tmp, dst_3_tmp); // 11 10 9 8 - __m128i dst_3 = _mm_unpackhi_epi64(dst_2_tmp, dst_3_tmp); // 15 14 13 12 - - // store - _mm_stream_si128((__m128i*)dst, dst_0); - _mm_stream_si128(((__m128i*)dst)+1, dst_1); - _mm_stream_si128(((__m128i*)dst)+2, dst_2); - _mm_stream_si128(((__m128i*)dst)+3, dst_3); -} - -template -__forceinline void SwizzleBlock8_sse2_I(u8 *dst, u8 *src, int pitch) -{ - SwizzleColumn8_sse2_I(dst, src, pitch); - - dst += 64; - src += 4*pitch; - SwizzleColumn8_sse2_I(dst, src, pitch); - - dst += 64; - src += 4*pitch; - SwizzleColumn8_sse2_I(dst, src, pitch); - - dst += 64; - src += 4*pitch; - SwizzleColumn8_sse2_I(dst, src, pitch); -} - -// Template the code to improve reuse of code -template -__forceinline void SwizzleColumn4_sse2_I(u8 *dst, u8 *src, int pitch) -{ - __m128i src_0; - __m128i src_1; - __m128i src_2; - __m128i src_3; - - // Build a mask (tranform a u32 to a 4 packets u32) - const u32 mask_template = 0x0f0f0f0f; - __m128i mask = _mm_cvtsi32_si128(mask_template); - mask = _mm_shuffle_epi32(mask, 0); - - // load 4 line of 32*4 bits packets - if (aligned) { - src_0 = _mm_load_si128((__m128i*)src); - src_2 = _mm_load_si128((__m128i*)(src+pitch)); - src_1 = _mm_load_si128((__m128i*)(src+2*pitch)); - src_3 = _mm_load_si128((__m128i*)(src+3*pitch)); - } else { - src_0 = _mm_loadu_si128((__m128i*)src); - src_2 = _mm_loadu_si128((__m128i*)(src+pitch)); - src_1 = _mm_loadu_si128((__m128i*)(src+2*pitch)); - src_3 = _mm_loadu_si128((__m128i*)(src+3*pitch)); - } - - // shuffle 2 lines to align pixels - if (INDEX == 0 || INDEX == 2) { - src_1 = _mm_shufflelo_epi16(src_1, 0xB1); - src_1 = _mm_shufflehi_epi16(src_1, 0xB1); // 13 12 9 8 5 4 1 0 ... (Half-byte 7 & 5 & 3 & 1) - src_3 = _mm_shufflelo_epi16(src_3, 0xB1); - src_3 = _mm_shufflehi_epi16(src_3, 0xB1); // 15 14 11 10 7 6 3 2 ... (Half-byte 7 & 5 & 3 & 1) - } else if (INDEX == 1 || INDEX == 3) { - src_0 = _mm_shufflelo_epi16(src_0, 0xB1); - src_0 = _mm_shufflehi_epi16(src_0, 0xB1); // 13 12 9 8 5 4 1 0 ... (Half-byte 6 & 4 & 2 & 0) - src_2 = _mm_shufflelo_epi16(src_2, 0xB1); - src_2 = _mm_shufflehi_epi16(src_2, 0xB1); // 15 14 11 10 7 6 3 2 ... (Half-byte 6 & 4 & 2 & 0) - } else { - assert(0); - } - // src_0 = 13 12 9 8 5 4 1 0 ... (Half-byte 6 & 4 & 2 & 0) - // src_1 = 13 12 9 8 5 4 1 0 ... (Half-byte 7 & 5 & 3 & 1) - // src_2 = 15 14 11 10 7 6 3 2 ... (Half-byte 6 & 4 & 2 & 0) - // src_3 = 15 14 11 10 7 6 3 2 ... (Half-byte 7 & 5 & 3 & 1) - - // ** Interleave Half-byte to obtain 8 bits packets - // Shift value to ease 4 bits filter. - // Note use a packet shift to allow a 4bits shifts - __m128i src_0_shift = _mm_srli_epi64(src_0, 4); // ? 13 12 9 8 5 4 1 ... (Half-byte 6 & 4 & 2 & 0) - __m128i src_1_shift = _mm_slli_epi64(src_1, 4); // 12 9 8 5 4 1 0 ? ... (Half-byte 7 & 5 & 3 & 1) - __m128i src_2_shift = _mm_srli_epi64(src_2, 4); // ? 15 14 11 10 7 6 3 ... (Half-byte 6 & 4 & 2 & 0) - __m128i src_3_shift = _mm_slli_epi64(src_3, 4); // 14 11 10 7 6 3 2 ? ... (Half-byte 7 & 5 & 3 & 1) - - // 12 - 8 - 4 - 0 - (HB odd) || - 12 - 8 - 4 - 0 (HB even) => 12 8 4 0 (byte 3 & 2 & 1 & 0) - src_0 = _mm_or_si128(_mm_andnot_si128(mask, src_1_shift), _mm_and_si128(mask, src_0)); - // - 13 - 9 - 5 - 1 (HB even) || 13 - 9 - 5 - 1 - (HB odd) => 13 9 5 1 (byte 3 & 2 & 1 & 0) - src_1 = _mm_or_si128(_mm_and_si128(mask, src_0_shift), _mm_andnot_si128(mask, src_1)); - - // 14 - 10 - 6 - 2 - (HB odd) || - 14 - 10 - 6 - 2 (HB even) => 14 10 6 2 (byte 3 & 2 & 1 & 0) - src_2 = _mm_or_si128(_mm_andnot_si128(mask, src_3_shift), _mm_and_si128(mask, src_2)); - // - 15 - 11 - 7 - 3 (HB even) || 15 - 11 - 7 - 3 - (HB odd) => 15 11 7 3 (byte 3 & 2 & 1 & 0) - src_3 = _mm_or_si128(_mm_and_si128(mask, src_2_shift), _mm_andnot_si128(mask, src_3)); - - - // reorder the 8 bits packets - __m128i src_0_tmp = _mm_unpacklo_epi8(src_0, src_1); // 13 12 9 8 5 4 1 0 (byte 1 & 0) - __m128i src_1_tmp = _mm_unpackhi_epi8(src_0, src_1); // 13 12 9 8 5 4 1 0 (byte 3 & 2) - __m128i src_2_tmp = _mm_unpacklo_epi8(src_2, src_3); // 15 14 11 10 7 6 3 2 (byte 1 & 0) - __m128i src_3_tmp = _mm_unpackhi_epi8(src_2, src_3); // 15 14 11 10 7 6 3 2 (byte 3 & 2) - - // interleave byte to obtain 32 bits packets - __m128i src_0_L = _mm_unpacklo_epi8(src_0_tmp, src_1_tmp); // 2.13 0.13 2.12 0.12 2.9 0.9 2.8 0.8 2.5 0.5 2.4 0.4 2.1 0.1 2.0 0.0 - __m128i src_0_H = _mm_unpackhi_epi8(src_0_tmp, src_1_tmp); // 3.13 1.13 3.12 1.12 3.9 1.9 3.8 1.8 3.5 1.5 3.4 1.4 3.1 1.1 3.0 1.0 - __m128i src_1_L = _mm_unpacklo_epi8(src_2_tmp, src_3_tmp); // 2.15 0.15 2.14 0.14 2.11 0.11 2.10 0.10 2.7 0.7 2.6 0.6 2.3 0.3 2.2 0.2 - __m128i src_1_H = _mm_unpackhi_epi8(src_2_tmp, src_3_tmp); // 3.15 1.15 3.14 1.14 3.11 1.11 3.10 1.10 3.7 1.7 3.6 1.6 3.3 1.3 3.2 1.2 - - __m128i dst_0_tmp = _mm_unpacklo_epi8(src_0_L, src_0_H); // 5 4 1 0 - __m128i dst_1_tmp = _mm_unpacklo_epi8(src_1_L, src_1_H); // 7 6 3 2 - __m128i dst_2_tmp = _mm_unpackhi_epi8(src_0_L, src_0_H); // 13 12 9 8 - __m128i dst_3_tmp = _mm_unpackhi_epi8(src_1_L, src_1_H); // 15 14 11 10 - - // Reorder the 32 bits packets - __m128i dst_0 = _mm_unpacklo_epi64(dst_0_tmp, dst_1_tmp); // 3 2 1 0 - __m128i dst_1 = _mm_unpackhi_epi64(dst_0_tmp, dst_1_tmp); // 7 6 5 4 - __m128i dst_2 = _mm_unpacklo_epi64(dst_2_tmp, dst_3_tmp); // 11 10 9 8 - __m128i dst_3 = _mm_unpackhi_epi64(dst_2_tmp, dst_3_tmp); // 15 14 13 12 - - // store - _mm_stream_si128((__m128i*)dst, dst_0); - _mm_stream_si128(((__m128i*)dst)+1, dst_1); - _mm_stream_si128(((__m128i*)dst)+2, dst_2); - _mm_stream_si128(((__m128i*)dst)+3, dst_3); -} - -template -__forceinline void SwizzleBlock4_sse2_I(u8 *dst, u8 *src, int pitch) -{ - SwizzleColumn4_sse2_I(dst, src, pitch); - - dst += 64; - src += 4*pitch; - SwizzleColumn4_sse2_I(dst, src, pitch); - - dst += 64; - src += 4*pitch; - SwizzleColumn4_sse2_I(dst, src, pitch); - - dst += 64; - src += 4*pitch; - SwizzleColumn4_sse2_I(dst, src, pitch); -} - -template -__forceinline void SwizzleBlock8H_4H(u8 *dst, u8 *src, int pitch) -{ - __m128i zero_128 = _mm_setzero_si128(); - __m128i src_0; - __m128i src_1; - __m128i src_2; - __m128i src_3; - __m128i src_0_init_H; - __m128i src_0_init_L; - __m128i src_2_init_H; - __m128i src_2_init_L; - __m128i src_0_init; - __m128i src_2_init; - - __m128i upper_mask = _mm_cvtsi32_si128(0xF0F0F0F0); - // Build the write_mask (tranform a u32 to a 4 packets u32) - __m128i write_mask; - if (FOUR_BIT) { - if (UPPER) write_mask = _mm_cvtsi32_si128(0xF0000000); - else write_mask = _mm_cvtsi32_si128(0x0F000000); - } else { - write_mask = _mm_cvtsi32_si128(0xFF000000); - } - write_mask = _mm_shuffle_epi32(write_mask, 0); - - for (int i=3 ; i >= 0 ; --i) { - if (FOUR_BIT) { - src_0_init = _mm_cvtsi32_si128(*(u32*)src); - src_2_init = _mm_cvtsi32_si128(*(u32*)(src + pitch)); - } else { - src_0_init = _mm_loadl_epi64((__m128i*)src); - src_2_init = _mm_loadl_epi64((__m128i*)(src + pitch)); - } - - // Convert to 8 bits - if (FOUR_BIT) { - src_0_init_H = _mm_and_si128(upper_mask, src_0_init); - src_0_init_L = _mm_andnot_si128(upper_mask, src_0_init); - src_2_init_H = _mm_and_si128(upper_mask, src_2_init); - src_2_init_L = _mm_andnot_si128(upper_mask, src_2_init); - - if (UPPER) { - src_0_init_L = _mm_slli_epi32(src_0_init_L, 4); - src_2_init_L = _mm_slli_epi32(src_2_init_L, 4); - } else { - src_0_init_H = _mm_srli_epi32(src_0_init_H, 4); - src_2_init_H = _mm_srli_epi32(src_2_init_H, 4); - } - - // Repack the src to keep HByte order - src_0_init = _mm_unpacklo_epi8(src_0_init_L, src_0_init_H); - src_2_init = _mm_unpacklo_epi8(src_2_init_L, src_2_init_H); - } - - // transform to 16 bits (add 0 in low bits) - src_0_init = _mm_unpacklo_epi8(zero_128, src_0_init); - src_2_init = _mm_unpacklo_epi8(zero_128, src_2_init); - - // transform to 32 bits (add 0 in low bits) - src_0 = _mm_unpacklo_epi16(zero_128, src_0_init); - src_1 = _mm_unpackhi_epi16(zero_128, src_0_init); - src_2 = _mm_unpacklo_epi16(zero_128, src_2_init); - src_3 = _mm_unpackhi_epi16(zero_128, src_2_init); - - // Reorder the data (same as 32 bits format) - __m128i dst_0 = _mm_unpacklo_epi64(src_0, src_2); - __m128i dst_1 = _mm_unpackhi_epi64(src_0, src_2); - __m128i dst_2 = _mm_unpacklo_epi64(src_1, src_3); - __m128i dst_3 = _mm_unpackhi_epi64(src_1, src_3); - - // Load previous value and apply the ~write_mask - __m128i old_dst_0 = _mm_andnot_si128(write_mask, _mm_load_si128((__m128i*)dst)); - dst_0 = _mm_or_si128(dst_0, old_dst_0); - - __m128i old_dst_1 = _mm_andnot_si128(write_mask, _mm_load_si128(((__m128i*)dst)+1)); - dst_1 = _mm_or_si128(dst_1, old_dst_1); - - __m128i old_dst_2 = _mm_andnot_si128(write_mask, _mm_load_si128(((__m128i*)dst)+2)); - dst_2 = _mm_or_si128(dst_2, old_dst_2); - - __m128i old_dst_3 = _mm_andnot_si128(write_mask, _mm_load_si128(((__m128i*)dst)+3)); - dst_3 = _mm_or_si128(dst_3, old_dst_3); - - // store - _mm_stream_si128((__m128i*)dst, dst_0); - _mm_stream_si128(((__m128i*)dst)+1, dst_1); - _mm_stream_si128(((__m128i*)dst)+2, dst_2); - _mm_stream_si128(((__m128i*)dst)+3, dst_3); - - // update the pointer - dst += 64; - src += 2*pitch; - } -} - -// special swizzle macros - which I converted to functions. - -__forceinline void SwizzleBlock32(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock32_sse2_I(dst, src, pitch); -} - -__forceinline void SwizzleBlock24(u8 *dst, u8 *src, int pitch) -{ - __m128i mask_H = _mm_load_si128((__m128i*)mask_24b_H); - __m128i mask_L = _mm_load_si128((__m128i*)mask_24b_L); - // Build the write_mask (tranform a u32 to a 4 packets u32) - __m128i write_mask = _mm_cvtsi32_si128(0x00FFFFFF); - write_mask = _mm_shuffle_epi32(write_mask, 0); - - for (int i=3 ; i >= 0 ; --i) { - // Note src can be out of bound of GS memory (but there is some spare allocation - // to avoid a tricky corner case) - __m128i src_0 = _mm_loadu_si128((__m128i*)src); - __m128i src_1 = _mm_loadu_si128((__m128i*)(src+12)); - __m128i src_2 = _mm_loadu_si128((__m128i*)(src+pitch)); - __m128i src_3 = _mm_loadu_si128((__m128i*)(src+pitch+12)); - - // transform 24 bits value to 32 bits one - // 1/ Align a little the data - src_0 = _mm_slli_si128(src_0, 2); - src_0 = _mm_shufflelo_epi16(src_0, 0x39); - - src_1 = _mm_slli_si128(src_1, 2); - src_1 = _mm_shufflelo_epi16(src_1, 0x39); - - src_2 = _mm_slli_si128(src_2, 2); - src_2 = _mm_shufflelo_epi16(src_2, 0x39); - - src_3 = _mm_slli_si128(src_3, 2); - src_3 = _mm_shufflelo_epi16(src_3, 0x39); - - // 2/ Filter the 24 bits pixels & do the conversion - __m128i src_0_H = _mm_and_si128(src_0, mask_H); - __m128i src_0_L = _mm_and_si128(src_0, mask_L); - src_0_H = _mm_slli_si128(src_0_H, 1); - src_0 = _mm_or_si128(src_0_H, src_0_L); - - __m128i src_1_H = _mm_and_si128(src_1, mask_H); - __m128i src_1_L = _mm_and_si128(src_1, mask_L); - src_1_H = _mm_slli_si128(src_1_H, 1); - src_1 = _mm_or_si128(src_1_H, src_1_L); - - __m128i src_2_H = _mm_and_si128(src_2, mask_H); - __m128i src_2_L = _mm_and_si128(src_2, mask_L); - src_2_H = _mm_slli_si128(src_2_H, 1); - src_2 = _mm_or_si128(src_2_H, src_2_L); - - __m128i src_3_H = _mm_and_si128(src_3, mask_H); - __m128i src_3_L = _mm_and_si128(src_3, mask_L); - src_3_H = _mm_slli_si128(src_3_H, 1); - src_3 = _mm_or_si128(src_3_H, src_3_L); - - // Reorder the data (same as 32 bits format) - __m128i dst_0 = _mm_unpacklo_epi64(src_0, src_2); - __m128i dst_1 = _mm_unpackhi_epi64(src_0, src_2); - __m128i dst_2 = _mm_unpacklo_epi64(src_1, src_3); - __m128i dst_3 = _mm_unpackhi_epi64(src_1, src_3); - - // Load previous value and apply the ~write_mask - __m128i old_dst_0 = _mm_andnot_si128(write_mask, _mm_load_si128((__m128i*)dst)); - dst_0 = _mm_or_si128(dst_0, old_dst_0); - - __m128i old_dst_1 = _mm_andnot_si128(write_mask, _mm_load_si128(((__m128i*)dst)+1)); - dst_1 = _mm_or_si128(dst_1, old_dst_1); - - __m128i old_dst_2 = _mm_andnot_si128(write_mask, _mm_load_si128(((__m128i*)dst)+2)); - dst_2 = _mm_or_si128(dst_2, old_dst_2); - - __m128i old_dst_3 = _mm_andnot_si128(write_mask, _mm_load_si128(((__m128i*)dst)+3)); - dst_3 = _mm_or_si128(dst_3, old_dst_3); - - // store - _mm_stream_si128((__m128i*)dst, dst_0); - _mm_stream_si128(((__m128i*)dst)+1, dst_1); - _mm_stream_si128(((__m128i*)dst)+2, dst_2); - _mm_stream_si128(((__m128i*)dst)+3, dst_3); - - // update the pointer - dst += 64; - src += 2*pitch; - } -} - -__forceinline void SwizzleBlock16(u8 *dst, u8 *src, int pitch) -{ -#ifdef INTRINSIC_PORT_16 - SwizzleBlock16_sse2_I(dst, src, pitch); -#else - SwizzleBlock16_sse2(dst, src, pitch); -#endif -} - -__forceinline void SwizzleBlock8(u8 *dst, u8 *src, int pitch) -{ -#ifdef INTRINSIC_PORT_8 - SwizzleBlock8_sse2_I(dst, src, pitch); -#else - SwizzleBlock8_sse2(dst, src, pitch); -#endif -} - -__forceinline void SwizzleBlock4(u8 *dst, u8 *src, int pitch) -{ -#ifdef INTRINSIC_PORT_4 - SwizzleBlock4_sse2_I(dst, src, pitch); -#else - SwizzleBlock4_sse2(dst, src, pitch); -#endif -} - -__forceinline void SwizzleBlock32u(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock32_sse2_I(dst, src, pitch); -} - -__forceinline void SwizzleBlock16u(u8 *dst, u8 *src, int pitch) -{ -#ifdef INTRINSIC_PORT_16 - SwizzleBlock16_sse2_I(dst, src, pitch); -#else - SwizzleBlock16u_sse2(dst, src, pitch); -#endif -} - -__forceinline void SwizzleBlock8u(u8 *dst, u8 *src, int pitch) -{ -#ifdef INTRINSIC_PORT_8 - SwizzleBlock8_sse2_I(dst, src, pitch); -#else - SwizzleBlock8u_sse2(dst, src, pitch); -#endif -} - -__forceinline void SwizzleBlock4u(u8 *dst, u8 *src, int pitch) -{ -#ifdef INTRINSIC_PORT_4 - SwizzleBlock4_sse2_I(dst, src, pitch); -#else - SwizzleBlock4u_sse2(dst, src, pitch); -#endif -} - -__forceinline void SwizzleBlock8H(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock8H_4H(dst, src, pitch); -} - -__forceinline void SwizzleBlock4HH(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock8H_4H(dst, src, pitch); -} - -__forceinline void SwizzleBlock4HL(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock8H_4H(dst, src, pitch); -} - -#else - -__forceinline void SwizzleBlock32(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock32_c(dst, src, pitch); -} - -__forceinline void SwizzleBlock16(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock16_c(dst, src, pitch); -} - -__forceinline void SwizzleBlock8(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock8_c(dst, src, pitch); -} - -__forceinline void SwizzleBlock4(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock4_c(dst, src, pitch); -} - -__forceinline void SwizzleBlock32u(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock32_c(dst, src, pitch); -} - -__forceinline void SwizzleBlock16u(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock16_c(dst, src, pitch); -} - -__forceinline void SwizzleBlock8u(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock8_c(dst, src, pitch); -} - -__forceinline void SwizzleBlock4u(u8 *dst, u8 *src, int pitch) -{ - SwizzleBlock4_c(dst, src, pitch); -} - -__forceinline void __fastcall SwizzleBlock32_mask(u8* dst, u8* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable32[0][0]; - - if (WriteMask == 0xffffffff) - { - for (int j = 0; j < 8; j++, d += 8, src += srcpitch) - for (int i = 0; i < 8; i++) - ((u32*)dst)[d[i]] = ((u32*)src)[i]; - } - else - { - for (int j = 0; j < 8; j++, d += 8, src += srcpitch) - for (int i = 0; i < 8; i++) - ((u32*)dst)[d[i]] = (((u32*)dst)[d[i]] & ~WriteMask) | (((u32*)src)[i] & WriteMask); - } -} - -__forceinline void __fastcall SwizzleBlock32_c(u8* dst, u8* src, int srcpitch) -{ - SwizzleBlock32_mask(dst, src, srcpitch, 0xffffffff); -} - -__forceinline void __fastcall SwizzleBlock16_c(u8* dst, u8* src, int srcpitch) -{ - u32* d = &g_columnTable16[0][0]; - - for (int j = 0; j < 8; j++, d += 16, src += srcpitch) - for (int i = 0; i < 16; i++) - ((u16*)dst)[d[i]] = ((u16*)src)[i]; -} - -__forceinline void __fastcall SwizzleBlock8_c(u8* dst, u8* src, int srcpitch) -{ - u32* d = &g_columnTable8[0][0]; - - for (int j = 0; j < 16; j++, d += 16, src += srcpitch) - for (int i = 0; i < 16; i++) - dst[d[i]] = src[i]; -} - -__forceinline void __fastcall SwizzleBlock4_c(u8* dst, u8* src, int srcpitch) -{ - u32* d = &g_columnTable4[0][0]; - - for (int j = 0; j < 16; j++, d += 32, src += srcpitch) - { - for (int i = 0; i < 32; i++) - { - u32 addr = d[i]; - u8 c = (src[i>>1] >> ((i & 1) << 2)) & 0x0f; - u32 shift = (addr & 1) << 2; - dst[addr >> 1] = (dst[addr >> 1] & (0xf0 >> shift)) | (c << shift); - } - } -} - -__forceinline void SwizzleBlock24(u8 *dst, u8 *src, int pitch) -{ - u8* pnewsrc = src; - u32* pblock = tempblock; - - // Note src can be out of bound of GS memory (but there is some spare allocation - // to avoid a tricky corner case) - for (int by = 0; by < 8; ++by, pblock += 8, pnewsrc += pitch - 24) - { - for (int bx = 0; bx < 8; ++bx, pnewsrc += 3) - { - pblock[bx] = *(u32*)pnewsrc; - } - } - - SwizzleBlock32_mask((u8*)dst, (u8*)tempblock, 32, 0x00ffffff); -} - -__forceinline void SwizzleBlock8H(u8 *dst, u8 *src, int pitch) -{ - u8* pnewsrc = src; - u32* pblock = tempblock; - - for (int by = 0; by < 8; ++by, pblock += 8, pnewsrc += pitch) - { - u32 u = *(u32*)pnewsrc; - pblock[0] = u << 24; - pblock[1] = u << 16; - pblock[2] = u << 8; - pblock[3] = u; - u = *(u32*)(pnewsrc + 4); - pblock[4] = u << 24; - pblock[5] = u << 16; - pblock[6] = u << 8; - pblock[7] = u; - } - - SwizzleBlock32_mask((u8*)dst, (u8*)tempblock, 32, 0xff000000); -} - -__forceinline void SwizzleBlock4HH(u8 *dst, u8 *src, int pitch) -{ - u8* pnewsrc = src; - u32* pblock = tempblock; - - for (int by = 0; by < 8; ++by, pblock += 8, pnewsrc += pitch) - { - u32 u = *(u32*)pnewsrc; - pblock[0] = u << 28; - pblock[1] = u << 24; - pblock[2] = u << 20; - pblock[3] = u << 16; - pblock[4] = u << 12; - pblock[5] = u << 8; - pblock[6] = u << 4; - pblock[7] = u; - } - - SwizzleBlock32_mask((u8*)dst, (u8*)tempblock, 32, 0xf0000000); -} - -__forceinline void SwizzleBlock4HL(u8 *dst, u8 *src, int pitch) -{ - u8* pnewsrc = src; - u32* pblock = tempblock; - - for (int by = 0; by < 8; ++by, pblock += 8, pnewsrc += pitch) - { - u32 u = *(u32*)pnewsrc; - pblock[0] = u << 24; - pblock[1] = u << 20; - pblock[2] = u << 16; - pblock[3] = u << 12; - pblock[4] = u << 8; - pblock[5] = u << 4; - pblock[6] = u; - pblock[7] = u >> 4; - } - - SwizzleBlock32_mask((u8*)dst, (u8*)tempblock, 32, 0x0f000000); -} -#endif diff --git a/plugins/zzogl-pg-cg/opengl/Mem_Swizzle.h b/plugins/zzogl-pg-cg/opengl/Mem_Swizzle.h deleted file mode 100644 index c353d6acab..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Mem_Swizzle.h +++ /dev/null @@ -1,63 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef MEM_SWIZZLE_H_INCLUDED -#define MEM_SWIZZLE_H_INCLUDED - -#include "GS.h" -#include "Mem.h" -#include "x86.h" - -extern __forceinline void SwizzleBlock32(u8 *dst, u8 *src, int pitch); -extern __forceinline void SwizzleBlock16(u8 *dst, u8 *src, int pitch); -extern __forceinline void SwizzleBlock8(u8 *dst, u8 *src, int pitch); -extern __forceinline void SwizzleBlock4(u8 *dst, u8 *src, int pitch); -extern __forceinline void SwizzleBlock32u(u8 *dst, u8 *src, int pitch); -extern __forceinline void SwizzleBlock16u(u8 *dst, u8 *src, int pitch); -extern __forceinline void SwizzleBlock8u(u8 *dst, u8 *src, int pitch); -extern __forceinline void SwizzleBlock4u(u8 *dst, u8 *src, int pitch); - -extern __forceinline void __fastcall SwizzleBlock32_c(u8* dst, u8* src, int srcpitch); -extern __forceinline void __fastcall SwizzleBlock16_c(u8* dst, u8* src, int srcpitch); -extern __forceinline void __fastcall SwizzleBlock8_c(u8* dst, u8* src, int srcpitch); -extern __forceinline void __fastcall SwizzleBlock4_c(u8* dst, u8* src, int srcpitch); - -// special swizzle macros - which I converted to functions. -extern __forceinline void SwizzleBlock24(u8 *dst, u8 *src, int pitch); -extern __forceinline void SwizzleBlock8H(u8 *dst, u8 *src, int pitch); -extern __forceinline void SwizzleBlock4HH(u8 *dst, u8 *src, int pitch); -extern __forceinline void SwizzleBlock4HL(u8 *dst, u8 *src, int pitch); -#define SwizzleBlock24u SwizzleBlock24 -#define SwizzleBlock8Hu SwizzleBlock8H -#define SwizzleBlock4HHu SwizzleBlock4HH -#define SwizzleBlock4HLu SwizzleBlock4HL - -#define SwizzleBlock16S SwizzleBlock16 -#define SwizzleBlock32Z SwizzleBlock32 -#define SwizzleBlock24Z SwizzleBlock24 -#define SwizzleBlock16Z SwizzleBlock16 -#define SwizzleBlock16SZ SwizzleBlock16 - -#define SwizzleBlock16Su SwizzleBlock16u -#define SwizzleBlock32Zu SwizzleBlock32u -#define SwizzleBlock24Zu SwizzleBlock24u -#define SwizzleBlock16Zu SwizzleBlock16u -#define SwizzleBlock16SZu SwizzleBlock16u - -#endif // MEM_SWIZZLE_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/Mem_Tables.cpp b/plugins/zzogl-pg-cg/opengl/Mem_Tables.cpp deleted file mode 100644 index 8db1b5c67c..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Mem_Tables.cpp +++ /dev/null @@ -1,420 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" -#include "Mem.h" -#include "Mem_Swizzle.h" - -u32 g_blockTable32[4][8] = -{ - { 0, 1, 4, 5, 16, 17, 20, 21}, - { 2, 3, 6, 7, 18, 19, 22, 23}, - { 8, 9, 12, 13, 24, 25, 28, 29}, - { 10, 11, 14, 15, 26, 27, 30, 31} -}; - -u32 g_blockTable32Z[4][8] = -{ - { 24, 25, 28, 29, 8, 9, 12, 13}, - { 26, 27, 30, 31, 10, 11, 14, 15}, - { 16, 17, 20, 21, 0, 1, 4, 5}, - { 18, 19, 22, 23, 2, 3, 6, 7} -}; - -u32 g_blockTable16[8][4] = -{ - { 0, 2, 8, 10 }, - { 1, 3, 9, 11 }, - { 4, 6, 12, 14 }, - { 5, 7, 13, 15 }, - { 16, 18, 24, 26 }, - { 17, 19, 25, 27 }, - { 20, 22, 28, 30 }, - { 21, 23, 29, 31 } -}; - -u32 g_blockTable16S[8][4] = -{ - { 0, 2, 16, 18 }, - { 1, 3, 17, 19 }, - { 8, 10, 24, 26 }, - { 9, 11, 25, 27 }, - { 4, 6, 20, 22 }, - { 5, 7, 21, 23 }, - { 12, 14, 28, 30 }, - { 13, 15, 29, 31 } -}; - -u32 g_blockTable16Z[8][4] = -{ - { 24, 26, 16, 18 }, - { 25, 27, 17, 19 }, - { 28, 30, 20, 22 }, - { 29, 31, 21, 23 }, - { 8, 10, 0, 2 }, - { 9, 11, 1, 3 }, - { 12, 14, 4, 6 }, - { 13, 15, 5, 7 } -}; - -u32 g_blockTable16SZ[8][4] = -{ - { 24, 26, 8, 10 }, - { 25, 27, 9, 11 }, - { 16, 18, 0, 2 }, - { 17, 19, 1, 3 }, - { 28, 30, 12, 14 }, - { 29, 31, 13, 15 }, - { 20, 22, 4, 6 }, - { 21, 23, 5, 7 } -}; - -u32 g_blockTable8[4][8] = -{ - { 0, 1, 4, 5, 16, 17, 20, 21}, - { 2, 3, 6, 7, 18, 19, 22, 23}, - { 8, 9, 12, 13, 24, 25, 28, 29}, - { 10, 11, 14, 15, 26, 27, 30, 31} -}; - -u32 g_blockTable4[8][4] = -{ - { 0, 2, 8, 10 }, - { 1, 3, 9, 11 }, - { 4, 6, 12, 14 }, - { 5, 7, 13, 15 }, - { 16, 18, 24, 26 }, - { 17, 19, 25, 27 }, - { 20, 22, 28, 30 }, - { 21, 23, 29, 31 } -}; - -u32 g_columnTable32[8][8] = -{ - { 0, 1, 4, 5, 8, 9, 12, 13 }, - { 2, 3, 6, 7, 10, 11, 14, 15 }, - { 16, 17, 20, 21, 24, 25, 28, 29 }, - { 18, 19, 22, 23, 26, 27, 30, 31 }, - { 32, 33, 36, 37, 40, 41, 44, 45 }, - { 34, 35, 38, 39, 42, 43, 46, 47 }, - { 48, 49, 52, 53, 56, 57, 60, 61 }, - { 50, 51, 54, 55, 58, 59, 62, 63 }, -}; - -u32 g_columnTable16[8][16] = -{ - { 0, 2, 8, 10, 16, 18, 24, 26, - 1, 3, 9, 11, 17, 19, 25, 27 }, - { 4, 6, 12, 14, 20, 22, 28, 30, - 5, 7, 13, 15, 21, 23, 29, 31 }, - { 32, 34, 40, 42, 48, 50, 56, 58, - 33, 35, 41, 43, 49, 51, 57, 59 }, - { 36, 38, 44, 46, 52, 54, 60, 62, - 37, 39, 45, 47, 53, 55, 61, 63 }, - { 64, 66, 72, 74, 80, 82, 88, 90, - 65, 67, 73, 75, 81, 83, 89, 91 }, - { 68, 70, 76, 78, 84, 86, 92, 94, - 69, 71, 77, 79, 85, 87, 93, 95 }, - { 96, 98, 104, 106, 112, 114, 120, 122, - 97, 99, 105, 107, 113, 115, 121, 123 }, - { 100, 102, 108, 110, 116, 118, 124, 126, - 101, 103, 109, 111, 117, 119, 125, 127 }, -}; - -u32 g_columnTable8[16][16] = -{ - { 0, 4, 16, 20, 32, 36, 48, 52, // column 0 - 2, 6, 18, 22, 34, 38, 50, 54 }, - { 8, 12, 24, 28, 40, 44, 56, 60, - 10, 14, 26, 30, 42, 46, 58, 62 }, - { 33, 37, 49, 53, 1, 5, 17, 21, - 35, 39, 51, 55, 3, 7, 19, 23 }, - { 41, 45, 57, 61, 9, 13, 25, 29, - 43, 47, 59, 63, 11, 15, 27, 31 }, - { 96, 100, 112, 116, 64, 68, 80, 84, // column 1 - 98, 102, 114, 118, 66, 70, 82, 86 }, - { 104, 108, 120, 124, 72, 76, 88, 92, - 106, 110, 122, 126, 74, 78, 90, 94 }, - { 65, 69, 81, 85, 97, 101, 113, 117, - 67, 71, 83, 87, 99, 103, 115, 119 }, - { 73, 77, 89, 93, 105, 109, 121, 125, - 75, 79, 91, 95, 107, 111, 123, 127 }, - { 128, 132, 144, 148, 160, 164, 176, 180, // column 2 - 130, 134, 146, 150, 162, 166, 178, 182 }, - { 136, 140, 152, 156, 168, 172, 184, 188, - 138, 142, 154, 158, 170, 174, 186, 190 }, - { 161, 165, 177, 181, 129, 133, 145, 149, - 163, 167, 179, 183, 131, 135, 147, 151 }, - { 169, 173, 185, 189, 137, 141, 153, 157, - 171, 175, 187, 191, 139, 143, 155, 159 }, - { 224, 228, 240, 244, 192, 196, 208, 212, // column 3 - 226, 230, 242, 246, 194, 198, 210, 214 }, - { 232, 236, 248, 252, 200, 204, 216, 220, - 234, 238, 250, 254, 202, 206, 218, 222 }, - { 193, 197, 209, 213, 225, 229, 241, 245, - 195, 199, 211, 215, 227, 231, 243, 247 }, - { 201, 205, 217, 221, 233, 237, 249, 253, - 203, 207, 219, 223, 235, 239, 251, 255 }, -}; - -u32 g_columnTable4[16][32] = -{ - { 0, 8, 32, 40, 64, 72, 96, 104, // column 0 - 2, 10, 34, 42, 66, 74, 98, 106, - 4, 12, 36, 44, 68, 76, 100, 108, - 6, 14, 38, 46, 70, 78, 102, 110 }, - { 16, 24, 48, 56, 80, 88, 112, 120, - 18, 26, 50, 58, 82, 90, 114, 122, - 20, 28, 52, 60, 84, 92, 116, 124, - 22, 30, 54, 62, 86, 94, 118, 126 }, - { 65, 73, 97, 105, 1, 9, 33, 41, - 67, 75, 99, 107, 3, 11, 35, 43, - 69, 77, 101, 109, 5, 13, 37, 45, - 71, 79, 103, 111, 7, 15, 39, 47 }, - { 81, 89, 113, 121, 17, 25, 49, 57, - 83, 91, 115, 123, 19, 27, 51, 59, - 85, 93, 117, 125, 21, 29, 53, 61, - 87, 95, 119, 127, 23, 31, 55, 63 }, - { 192, 200, 224, 232, 128, 136, 160, 168, // column 1 - 194, 202, 226, 234, 130, 138, 162, 170, - 196, 204, 228, 236, 132, 140, 164, 172, - 198, 206, 230, 238, 134, 142, 166, 174 }, - { 208, 216, 240, 248, 144, 152, 176, 184, - 210, 218, 242, 250, 146, 154, 178, 186, - 212, 220, 244, 252, 148, 156, 180, 188, - 214, 222, 246, 254, 150, 158, 182, 190 }, - { 129, 137, 161, 169, 193, 201, 225, 233, - 131, 139, 163, 171, 195, 203, 227, 235, - 133, 141, 165, 173, 197, 205, 229, 237, - 135, 143, 167, 175, 199, 207, 231, 239 }, - { 145, 153, 177, 185, 209, 217, 241, 249, - 147, 155, 179, 187, 211, 219, 243, 251, - 149, 157, 181, 189, 213, 221, 245, 253, - 151, 159, 183, 191, 215, 223, 247, 255 }, - { 256, 264, 288, 296, 320, 328, 352, 360, // column 2 - 258, 266, 290, 298, 322, 330, 354, 362, - 260, 268, 292, 300, 324, 332, 356, 364, - 262, 270, 294, 302, 326, 334, 358, 366 }, - { 272, 280, 304, 312, 336, 344, 368, 376, - 274, 282, 306, 314, 338, 346, 370, 378, - 276, 284, 308, 316, 340, 348, 372, 380, - 278, 286, 310, 318, 342, 350, 374, 382 }, - { 321, 329, 353, 361, 257, 265, 289, 297, - 323, 331, 355, 363, 259, 267, 291, 299, - 325, 333, 357, 365, 261, 269, 293, 301, - 327, 335, 359, 367, 263, 271, 295, 303 }, - { 337, 345, 369, 377, 273, 281, 305, 313, - 339, 347, 371, 379, 275, 283, 307, 315, - 341, 349, 373, 381, 277, 285, 309, 317, - 343, 351, 375, 383, 279, 287, 311, 319 }, - { 448, 456, 480, 488, 384, 392, 416, 424, // column 3 - 450, 458, 482, 490, 386, 394, 418, 426, - 452, 460, 484, 492, 388, 396, 420, 428, - 454, 462, 486, 494, 390, 398, 422, 430 }, - { 464, 472, 496, 504, 400, 408, 432, 440, - 466, 474, 498, 506, 402, 410, 434, 442, - 468, 476, 500, 508, 404, 412, 436, 444, - 470, 478, 502, 510, 406, 414, 438, 446 }, - { 385, 393, 417, 425, 449, 457, 481, 489, - 387, 395, 419, 427, 451, 459, 483, 491, - 389, 397, 421, 429, 453, 461, 485, 493, - 391, 399, 423, 431, 455, 463, 487, 495 }, - { 401, 409, 433, 441, 465, 473, 497, 505, - 403, 411, 435, 443, 467, 475, 499, 507, - 405, 413, 437, 445, 469, 477, 501, 509, - 407, 415, 439, 447, 471, 479, 503, 511 }, -}; - -u32 g_pageTable32[32][64]; -u32 g_pageTable32Z[32][64]; -u32 g_pageTable16[64][64]; -u32 g_pageTable16S[64][64]; -u32 g_pageTable16Z[64][64]; -u32 g_pageTable16SZ[64][64]; -u32 g_pageTable8[64][128]; -u32 g_pageTable4[128][128]; - -/* PSM reference array -{ 32, 24, 16, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, 16S, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, 8, 4, NULL, NULL, NULL, - NULL, NULL, NULL, 8H, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, 4HL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, 4HH, NULL, NULL, NULL, - 32Z, 24Z, 16Z, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, 16SZ, NULL, NULL, NULL, NULL, NULL }; -*/ -char* psm_name[64] = -{ "PSMCT32", "PSMCT24", "PSMCT16", NULL, NULL, NULL, NULL, NULL, - NULL, NULL, "PSMCT16S", NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, "PSMT8", "PSMT4", NULL, NULL, NULL, - NULL, NULL, NULL, "PSMT8H", NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, "PSMT4HL", NULL, NULL, NULL, - NULL, NULL, NULL, NULL, "PSMT4HH", NULL, NULL, NULL, - "PSMT32Z", "PSMT24Z", "PSMT16Z", NULL, NULL, NULL, NULL, NULL, - NULL, NULL, "PSMT16SZ", NULL, NULL, NULL, NULL, NULL }; - -_SwizzleBlock swizzleBlockFun[64] = -{ SwizzleBlock32, SwizzleBlock24, SwizzleBlock16, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, SwizzleBlock16S, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, SwizzleBlock8, SwizzleBlock4, NULL, NULL, NULL, - NULL, NULL, NULL, SwizzleBlock8H, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, SwizzleBlock4HL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, SwizzleBlock4HH, NULL, NULL, NULL, - SwizzleBlock32Z, SwizzleBlock24Z, SwizzleBlock16Z, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, SwizzleBlock16SZ, NULL, NULL, NULL, NULL, NULL }; - -_SwizzleBlock swizzleBlockUnFun[64] = -{ SwizzleBlock32u, SwizzleBlock24u, SwizzleBlock16u, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, SwizzleBlock16Su, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, SwizzleBlock8u, SwizzleBlock4u, NULL, NULL, NULL, - NULL, NULL, NULL, SwizzleBlock8Hu, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, SwizzleBlock4HLu, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, SwizzleBlock4HHu, NULL, NULL, NULL, - SwizzleBlock32Zu, SwizzleBlock24Zu, SwizzleBlock16Zu, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, SwizzleBlock16SZu, NULL, NULL, NULL, NULL, NULL }; - -_getPixelAddress_0 getPixelFun_0[64] = -{ - getPixelAddress32_0, getPixelAddress24_0, getPixelAddress16_0, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, getPixelAddress16S_0, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, getPixelAddress8_0, getPixelAddress4_0, NULL, NULL, NULL, - NULL, NULL, NULL, getPixelAddress8H_0, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, getPixelAddress4HL_0, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, getPixelAddress4HH_0, NULL, NULL, NULL, - getPixelAddress32Z_0, getPixelAddress24Z_0, getPixelAddress16Z_0, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, getPixelAddress16SZ_0, NULL, NULL, NULL, NULL, NULL -}; - -_writePixel_0 writePixelFun_0[64] = -{ - writePixel32_0, writePixel24_0, writePixel16_0, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, writePixel16S_0, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, writePixel8_0, writePixel4_0, NULL, NULL, NULL, - NULL, NULL, NULL, writePixel8H_0, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, writePixel4HL_0, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, writePixel4HH_0, NULL, NULL, NULL, - writePixel32Z_0, writePixel24Z_0, writePixel16Z_0, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, writePixel16SZ_0, NULL, NULL, NULL, NULL, NULL -}; - -_readPixel_0 readPixelFun_0[64] = -{ - readPixel32_0, readPixel24_0, readPixel16_0, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, readPixel16S_0, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, readPixel8_0, readPixel4_0, NULL, NULL, NULL, - NULL, NULL, NULL, readPixel8H_0, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, readPixel4HL_0, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, readPixel4HH_0, NULL, NULL, NULL, - readPixel32Z_0, readPixel24Z_0, readPixel16Z_0, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, readPixel16SZ_0, NULL, NULL, NULL, NULL, NULL -}; - -_getPixelAddress getPixelFun[64] = -{ - getPixelAddress32, getPixelAddress24, getPixelAddress16, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, getPixelAddress16S, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, getPixelAddress8, getPixelAddress4, NULL, NULL, NULL, - NULL, NULL, NULL, getPixelAddress8H, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, getPixelAddress4HL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, getPixelAddress4HH, NULL, NULL, NULL, - getPixelAddress32Z, getPixelAddress24Z, getPixelAddress16Z, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, getPixelAddress16SZ, NULL, NULL, NULL, NULL, NULL -}; - -_writePixel writePixelFun[64] = -{ - writePixel32, writePixel24, writePixel16, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, writePixel16S, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, writePixel8, writePixel4, NULL, NULL, NULL, - NULL, NULL, NULL, writePixel8H, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, writePixel4HL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, writePixel4HH, NULL, NULL, NULL, - writePixel32Z, writePixel24Z, writePixel16Z, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, writePixel16SZ, NULL, NULL, NULL, NULL, NULL -}; - -_readPixel readPixelFun[64] = -{ - readPixel32, readPixel24, readPixel16, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, readPixel16S, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, readPixel8, readPixel4, NULL, NULL, NULL, - NULL, NULL, NULL, readPixel8H, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, readPixel4HL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, readPixel4HH, NULL, NULL, NULL, - readPixel32Z, readPixel24Z, readPixel16Z, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, readPixel16SZ, NULL, NULL, NULL, NULL, NULL -}; - -_TransferHostLocal TransferHostLocalFun[64] = -{ - TransferHostLocal32, TransferHostLocal24, TransferHostLocal16, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, TransferHostLocal16S, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, TransferHostLocal8, TransferHostLocal4, NULL, NULL, NULL, - NULL, NULL, NULL, TransferHostLocal8H, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, TransferHostLocal4HL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, TransferHostLocal4HH, NULL, NULL, NULL, - TransferHostLocal32Z, TransferHostLocal24Z, TransferHostLocal16Z, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, TransferHostLocal16SZ, NULL, NULL, NULL, NULL, NULL -}; - -_TransferLocalHost TransferLocalHostFun[64] = -{ - TransferLocalHost32, TransferLocalHost24, TransferLocalHost16, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, TransferLocalHost16S, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, TransferLocalHost8, TransferLocalHost4, NULL, NULL, NULL, - NULL, NULL, NULL, TransferLocalHost8H, NULL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, TransferLocalHost4HL, NULL, NULL, NULL, - NULL, NULL, NULL, NULL, TransferLocalHost4HH, NULL, NULL, NULL, - TransferLocalHost32Z, TransferLocalHost24Z, TransferLocalHost16Z, NULL, NULL, NULL, NULL, NULL, - NULL, NULL, TransferLocalHost16SZ, NULL, NULL, NULL, NULL, NULL -}; - -#define TD_NULL {0,0,0,0,0,0} -TransferData tData[64] = -{ - {2,32,8,8,32,PSMCT32}, - {8,32,8,8,24,PSMCT24}, - {4,16,16,8,16,PSMCT16}, - TD_NULL, TD_NULL, TD_NULL, TD_NULL, TD_NULL, - TD_NULL, TD_NULL, - {4,16,16,8,16,PSMCT16S}, - TD_NULL, TD_NULL, TD_NULL, TD_NULL, TD_NULL, - TD_NULL, TD_NULL, TD_NULL, - {4,8,16,16,8,PSMT8}, - {8,4,32,16,4,PSMT4}, - TD_NULL, TD_NULL, TD_NULL, - TD_NULL, TD_NULL, TD_NULL, - {4,32,8,8,8,PSMT8H}, - TD_NULL, TD_NULL, TD_NULL, TD_NULL, - TD_NULL, TD_NULL, TD_NULL, TD_NULL, - {8,32,8,8,4,PSMT4HL}, - TD_NULL, TD_NULL, TD_NULL, - TD_NULL, TD_NULL, TD_NULL, TD_NULL, - {8,32,8,8,4,PSMT4HH}, - TD_NULL, TD_NULL, TD_NULL, - {2,32,8,8,32,PSMT32Z}, - {8,32,8,8,24,PSMT24Z}, - {4,16,16,8,16,PSMT16Z}, - TD_NULL, TD_NULL, TD_NULL, TD_NULL, TD_NULL, - TD_NULL, TD_NULL, - {4,16,16,8,16,PSMT16SZ}, - TD_NULL, TD_NULL, TD_NULL, TD_NULL, TD_NULL -}; - diff --git a/plugins/zzogl-pg-cg/opengl/Mem_Transmit.h b/plugins/zzogl-pg-cg/opengl/Mem_Transmit.h deleted file mode 100644 index 0e228360b7..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Mem_Transmit.h +++ /dev/null @@ -1,319 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef MEM_TRANSMIT_H_INCLUDED -#define MEM_TRANSMIT_H_INCLUDED - -#include "GS.h" -#include "Mem.h" - -#define DSTPSM gs.dstbuf.psm -extern int tempX, tempY; -extern int pitch, area, fracX; -extern int nSize; -extern u8* pstart; - -extern char* psm_name[64]; - -// transfers whole rows -template -static __forceinline const T *TransmitHostLocalY_(_writePixel_0 wp, s32 widthlimit, int endY, const T *buf) -{ - assert((nSize % widthlimit) == 0 && widthlimit <= 4); - - if ((gs.imageEndX - gs.trxpos.dx) % widthlimit) - { - // ZZLog::GS_Log("Bad Transmission! %d %d, psm: %d", gs.trxpos.dx, gs.imageEndX, DSTPSM); - - for (; tempY < endY; ++tempY) - { - for (; tempX < gs.imageEndX && nSize > 0; tempX += 1, nSize -= 1, buf += 1) - { - /* write as many pixel at one time as possible */ - wp(pstart, tempX % 2048, tempY % 2048, buf[0], gs.dstbuf.bw); - } - } - } - - for (; tempY < endY; ++tempY) - { - for (; tempX < gs.imageEndX && nSize > 0; tempX += widthlimit, nSize -= widthlimit, buf += widthlimit) - { - - /* write as many pixel at one time as possible */ - if (nSize < widthlimit) return NULL; - - wp(pstart, tempX % 2048, tempY % 2048, buf[0], gs.dstbuf.bw); - - if (widthlimit > 1) - { - wp(pstart, (tempX + 1) % 2048, tempY % 2048, buf[1], gs.dstbuf.bw); - - if (widthlimit > 2) - { - wp(pstart, (tempX + 2) % 2048, tempY % 2048, buf[2], gs.dstbuf.bw); - - if (widthlimit > 3) - { - wp(pstart, (tempX + 3) % 2048, tempY % 2048, buf[3], gs.dstbuf.bw); - } - } - } - } - - if (tempX >= gs.imageEndX) - { - assert(tempX == gs.imageEndX); - tempX = gs.trxpos.dx; - } - else - { - assert(gs.imageTransfer == -1 || nSize*sizeof(T) / 4 == 0); - return NULL; - } - } - - return buf; -} - -// transfers whole rows -template -static __forceinline const T *TransmitHostLocalY_24(_writePixel_0 wp, s32 widthlimit, int endY, const T *buf) -{ - if (widthlimit != 8 || ((gs.imageEndX - gs.trxpos.dx) % widthlimit)) - { - //ZZLog::GS_Log("Bad Transmission! %d %d, psm: %d", gs.trxpos.dx, gs.imageEndX, DSTPSM); - for (; tempY < endY; ++tempY) - { - for (; tempX < gs.imageEndX && nSize > 0; tempX += 1, nSize -= 1, buf += 3) - { - wp(pstart, tempX % 2048, tempY % 2048, *(u32*)(buf), gs.dstbuf.bw); - } - - if (tempX >= gs.imageEndX) - { - assert(gs.imageTransfer == -1 || tempX == gs.imageEndX); - tempX = gs.trxpos.dx; - } - else - { - assert(gs.imageTransfer == -1 || nSize == 0); - return NULL; - } - } - } - else - { - assert(/*(nSize%widthlimit) == 0 &&*/ widthlimit == 8); - - for (; tempY < endY; ++tempY) - { - for (; tempX < gs.imageEndX && nSize > 0; tempX += widthlimit, nSize -= widthlimit, buf += 3 * widthlimit) - { - if (nSize < widthlimit) return NULL; - - /* write as many pixel at one time as possible */ - - wp(pstart, tempX % 2048, tempY % 2048, *(u32*)(buf + 0), gs.dstbuf.bw); - wp(pstart, (tempX + 1) % 2048, tempY % 2048, *(u32*)(buf + 3), gs.dstbuf.bw); - wp(pstart, (tempX + 2) % 2048, tempY % 2048, *(u32*)(buf + 6), gs.dstbuf.bw); - wp(pstart, (tempX + 3) % 2048, tempY % 2048, *(u32*)(buf + 9), gs.dstbuf.bw); - wp(pstart, (tempX + 4) % 2048, tempY % 2048, *(u32*)(buf + 12), gs.dstbuf.bw); - wp(pstart, (tempX + 5) % 2048, tempY % 2048, *(u32*)(buf + 15), gs.dstbuf.bw); - wp(pstart, (tempX + 6) % 2048, tempY % 2048, *(u32*)(buf + 18), gs.dstbuf.bw); - wp(pstart, (tempX + 7) % 2048, tempY % 2048, *(u32*)(buf + 21), gs.dstbuf.bw); - } - - if (tempX >= gs.imageEndX) - { - assert(gs.imageTransfer == -1 || tempX == gs.imageEndX); - tempX = gs.trxpos.dx; - } - else - { - if (nSize < 0) - { - /* extracted too much */ - assert((nSize % 3) == 0 && nSize > -24); - tempX += nSize / 3; - nSize = 0; - } - - assert(gs.imageTransfer == -1 || nSize == 0); - - return NULL; - } - } - } - - return buf; -} - -// meant for 4bit transfers -template -static __forceinline const T *TransmitHostLocalY_4(_writePixel_0 wp, s32 widthlimit, int endY, const T *buf) -{ - for (; tempY < endY; ++tempY) - { - for (; tempX < gs.imageEndX && nSize > 0; tempX += widthlimit, nSize -= widthlimit) - { - /* write as many pixel at one time as possible */ - wp(pstart, tempX % 2048, tempY % 2048, *buf&0x0f, gs.dstbuf.bw); - wp(pstart, (tempX + 1) % 2048, tempY % 2048, *buf >> 4, gs.dstbuf.bw); - buf++; - - if (widthlimit > 2) - { - wp(pstart, (tempX + 2) % 2048, tempY % 2048, *buf&0x0f, gs.dstbuf.bw); - wp(pstart, (tempX + 3) % 2048, tempY % 2048, *buf >> 4, gs.dstbuf.bw); - buf++; - - if (widthlimit > 4) - { - wp(pstart, (tempX + 4) % 2048, tempY % 2048, *buf&0x0f, gs.dstbuf.bw); - wp(pstart, (tempX + 5) % 2048, tempY % 2048, *buf >> 4, gs.dstbuf.bw); - buf++; - - if (widthlimit > 6) - { - wp(pstart, (tempX + 6) % 2048, tempY % 2048, *buf&0x0f, gs.dstbuf.bw); - wp(pstart, (tempX + 7) % 2048, tempY % 2048, *buf >> 4, gs.dstbuf.bw); - buf++; - } - } - } - } - - if (tempX >= gs.imageEndX) - { - tempX = gs.trxpos.dx; - } - else - { - assert(gs.imageTransfer == -1 || (nSize / 32) == 0); - return NULL; - } - } - - return buf; -} - -template -static __forceinline const T *TransmitHostLocalY(u32 psm, _writePixel_0 wp, s32 widthlimit, int endY, const T *buf) -{ - //ZZLog::WriteLn("TransmitHostLocalY: psm == %s, bimode == 0x%x", psm_name[psm], PSMT_BITMODE(psm)); - switch (PSMT_BITMODE(psm)) - { - case 1: - return TransmitHostLocalY_24(wp, widthlimit, endY, buf); - case 4: - return TransmitHostLocalY_4(wp, widthlimit, endY, buf); - default: - return TransmitHostLocalY_(wp, widthlimit, endY, buf); - } - - assert(0); - - return NULL; -} - -template -static __forceinline const T *TransmitHostLocalX_(_writePixel_0 wp, u32 widthlimit, u32 blockheight, u32 startX, const T *buf) -{ - for (u32 tempi = 0; tempi < blockheight; ++tempi) - { - for (tempX = startX; tempX < gs.imageEndX; tempX++, buf++) - { - wp(pstart, tempX % 2048, (tempY + tempi) % 2048, buf[0], gs.dstbuf.bw); - } - - buf += pitch - fracX; - } - - return buf; -} - -// transmit until endX, don't check size since it has already been prevalidated -template -static __forceinline const T *TransmitHostLocalX_24(_writePixel_0 wp, u32 widthlimit, u32 blockheight, u32 startX, const T *buf) -{ - for (u32 tempi = 0; tempi < blockheight; ++tempi) - { - for (tempX = startX; tempX < gs.imageEndX; tempX++, buf += 3) - { - wp(pstart, tempX % 2048, (tempY + tempi) % 2048, *(u32*)buf, gs.dstbuf.bw); - } - - buf += 3 * (pitch - fracX); - } - - return buf; -} - -// transmit until endX, don't check size since it has already been prevalidated -template -static __forceinline const T *TransmitHostLocalX_4(_writePixel_0 wp, u32 widthlimit, u32 blockheight, u32 startX, const T *buf) -{ - for (u32 tempi = 0; tempi < blockheight; ++tempi) - { - for (tempX = startX; tempX < gs.imageEndX; tempX += 2, buf++) - { - wp(pstart, tempX % 2048, (tempY + tempi) % 2048, buf[0]&0x0f, gs.dstbuf.bw); - wp(pstart, (tempX + 1) % 2048, (tempY + tempi) % 2048, buf[0] >> 4, gs.dstbuf.bw); - } - - buf += (pitch - fracX) / 2; - } - - return buf; -} - -template -static __forceinline const T *TransmitHostLocalX(u32 psm, _writePixel_0 wp, u32 widthlimit, u32 blockheight, u32 startX, const T *buf) -{ - //ZZLog::WriteLn("TransmitHostLocalX: psm == %s, bimode == 0x%x", psm_name[psm], PSMT_BITMODE(psm)); - switch (PSMT_BITMODE(psm)) - { - case 1: - return TransmitHostLocalX_24(wp, widthlimit, blockheight, startX, buf); - case 4: - return TransmitHostLocalX_4(wp, widthlimit, blockheight, startX, buf); - default: - return TransmitHostLocalX_(wp, widthlimit, blockheight, startX, buf); - } - - assert(0); - - return NULL; -} - -// calculate pitch in source buffer -static __forceinline u32 TransPitch(u32 pitch, u32 size) -{ - return pitch * size / 8; -} - -static __forceinline u32 TransPitch2(u32 pitch, u32 size) -{ - if (size == 4) return pitch / 2; - if (size == 24) return pitch * 3; - return pitch; -} - -#endif // MEM_TRANSMIT_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/NewRegs.cpp b/plugins/zzogl-pg-cg/opengl/NewRegs.cpp deleted file mode 100644 index d9ff6cd7f4..0000000000 --- a/plugins/zzogl-pg-cg/opengl/NewRegs.cpp +++ /dev/null @@ -1,1144 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" -#include "Mem.h" -#include "NewRegs.h" -#include "PS2Etypes.h" - -#include "targets.h" - -#ifdef USE_OLD_REGS -#include "Regs.h" -#else -#include "ZZoglVB.h" -#include "ZZoglDrawing.h" - -#ifdef _MSC_VER -#pragma warning(disable:4244) -#endif - -GIFRegHandler g_GIFPackedRegHandlers[16]; -GIFRegHandler g_GIFRegHandlers[256]; -GIFRegHandler g_GIFTempRegHandlers[16] = {0}; - -// values for keeping track of changes -u32 s_uTex1Data[2][2] = {{0, }}; -u32 s_uClampData[2] = {0, }; - -//u32 results[65535] = {0, }; - -void __gifCall GIFPackedRegHandlerNull(const u32* data) -{ - FUNCLOG - ZZLog::Debug_Log("Unexpected packed reg handler %8.8lx_%8.8lx %x.", data[0], data[1], data[2]); -} - -// All these just call their non-packed equivalent. -void __gifCall GIFPackedRegHandlerPRIM(const u32* data) { GIFRegHandlerPRIM(data); } - -template -void __gifCall GIFPackedRegHandlerTEX0(const u32* data) -{ - GIFRegHandlerTEX0(data); -} - -template -void __gifCall GIFPackedRegHandlerCLAMP(const u32* data) -{ - GIFRegHandlerCLAMP(data); -} - -void __gifCall GIFPackedRegHandlerTEX0_1(const u32* data) { GIFRegHandlerTEX0<0>(data); } -void __gifCall GIFPackedRegHandlerTEX0_2(const u32* data) { GIFRegHandlerTEX0<1>(data); } -void __gifCall GIFPackedRegHandlerCLAMP_1(const u32* data) { GIFRegHandlerCLAMP<0>(data); } -void __gifCall GIFPackedRegHandlerCLAMP_2(const u32* data) { GIFRegHandlerCLAMP<1>(data); } -void __gifCall GIFPackedRegHandlerXYZF3(const u32* data) { GIFRegHandlerXYZF3(data); } -void __gifCall GIFPackedRegHandlerXYZ3(const u32* data) { GIFRegHandlerXYZ3(data); } - -void __gifCall GIFPackedRegHandlerRGBA(const u32* data) -{ - FUNCLOG - - GIFPackedRGBA* r = (GIFPackedRGBA*)(data); - gs.rgba = (r->R | (r->G << 8) | (r->B << 16) | (r->A << 24)); - gs.vertexregs.rgba = gs.rgba; - gs.vertexregs.q = gs.q; - - ZZLog::Greg_Log("Packed RGBA: 0x%x", gs.rgba); -} - -void __gifCall GIFPackedRegHandlerSTQ(const u32* data) -{ - FUNCLOG - GIFPackedSTQ* r = (GIFPackedSTQ*)(data); - gs.vertexregs.s = r->S; - gs.vertexregs.t = r->T; - gs.q = r->Q; - ZZLog::Greg_Log("Packed STQ: 0x%x, 0x%x, %f", r->S, r->T, r->Q); -} - -void __gifCall GIFPackedRegHandlerUV(const u32* data) -{ - FUNCLOG - GIFPackedUV* r = (GIFPackedUV*)(data); - gs.vertexregs.u = r->U; - gs.vertexregs.v = r->V; - ZZLog::Greg_Log("Packed UV: 0x%x, 0x%x", r->U, r->V); -} - -void __gifCall GIFPackedRegHandlerXYZF2(const u32* data) -{ - FUNCLOG - GIFPackedXYZF2* r = (GIFPackedXYZF2*)(data); - gs.add_vertex(r->X, r->Y,r->Z, r->F); - - // Fix Vertexes up later. - ZZKick->KickVertex(!!(r->ADC)); - ZZLog::Greg_Log("Packed XYZF2: 0x%x, 0x%x, 0x%x, %f", r->X, r->Y, r->Z, r->F); -} - -void __gifCall GIFPackedRegHandlerXYZ2(const u32* data) -{ - FUNCLOG - GIFPackedXYZ2* r = (GIFPackedXYZ2*)(data); - gs.add_vertex(r->X, r->Y,r->Z); - - // Fix Vertexes up later. - ZZKick->KickVertex(!!(r->ADC)); - ZZLog::Greg_Log("Packed XYZ2: 0x%x, 0x%x, 0x%x", r->X, r->Y, r->Z); -} - -void __gifCall GIFPackedRegHandlerFOG(const u32* data) -{ - FUNCLOG - GIFPackedFOG* r = (GIFPackedFOG*)(data); - gs.vertexregs.f = r->F; - ZZLog::Greg_Log("Packed FOG: 0x%x", r->F); -} - -void __gifCall GIFPackedRegHandlerA_D(const u32* data) -{ - FUNCLOG - GIFPackedA_D* r = (GIFPackedA_D*)(data); - - g_GIFRegHandlers[r->ADDR](data); - ZZLog::Greg_Log("Packed A_D: 0x%x", r->ADDR); -} - -void __gifCall GIFPackedRegHandlerNOP(const u32* data) -{ - FUNCLOG -} - -void __gifCall GIFRegHandlerNull(const u32* data) -{ - FUNCLOG -#ifdef _DEBUG - - if ((((uptr)&data[2])&0xffff) == 0) return; - - // 0x7f happens on a lot of games - if (data[2] != 0x7f && (data[0] || data[1])) - { - ZZLog::Debug_Log("Unexpected reg handler %x %x %x.", data[0], data[1], data[2]); - } - -#endif -} - -void __gifCall GIFRegHandlerRGBAQ(const u32* data) -{ - FUNCLOG - GIFRegRGBAQ* r = (GIFRegRGBAQ*)(data); - gs.rgba = (r->R | (r->G << 8) | (r->B << 16) | (r->A << 24)); - gs.vertexregs.rgba = gs.rgba; - gs.vertexregs.q = r->Q; - ZZLog::Greg_Log("RGBAQ: 0x%x, 0x%x, 0x%x, %f", r->R, r->G, r->B, r->A, r->Q); -} - -void __gifCall GIFRegHandlerST(const u32* data) -{ - FUNCLOG - GIFRegST* r = (GIFRegST*)(data); - gs.vertexregs.s = r->S; - gs.vertexregs.t = r->T; - ZZLog::Greg_Log("ST: 0x%x, 0x%x", r->S, r->T); -} - -void __gifCall GIFRegHandlerUV(const u32* data) -{ - // Baroque breaks if u&v are 16 bits instead of 14. - FUNCLOG - GIFRegUV* r = (GIFRegUV*)(data); - gs.vertexregs.u = r->U; - gs.vertexregs.v = r->V; - ZZLog::Greg_Log("UV: 0x%x, 0x%x", r->U, r->V); -} - -void __gifCall GIFRegHandlerXYZF2(const u32* data) -{ - FUNCLOG - GIFRegXYZF* r = (GIFRegXYZF*)(data); - gs.add_vertex(r->X, r->Y,r->Z, r->F); - - ZZKick->KickVertex(false); - ZZLog::Greg_Log("XYZF2: 0x%x, 0x%x, 0x%x, %f", r->X, r->Y, r->Z, r->F); -} - -void __gifCall GIFRegHandlerXYZ2(const u32* data) -{ - FUNCLOG - GIFRegXYZ* r = (GIFRegXYZ*)(data); - gs.add_vertex(r->X, r->Y,r->Z); - - ZZKick->KickVertex(false); - ZZLog::Greg_Log("XYZF2: 0x%x, 0x%x, 0x%x", r->X, r->Y, r->Z); -} - -template -void __gifCall GIFRegHandlerTEX0(const u32* data) -{ - // Used on Mana Khemias opening dialog. - FUNCLOG - - GIFRegTEX0* r = (GIFRegTEX0*)(data); - u32 psm = ZZOglGet_psm_TexBitsFix(data[0]); - - ZZLog::Greg_Log("TEX0_%d: 0x%x", i, data); - - // Worry about this later. - if (!NoHighlights(i)) return; - - if (m_Blocks[psm].bpp == 0) - { - // kh and others - return; - } - - // Order is important. - vb[i].uNextTex0Data[0] = r->ai32[0]; - vb[i].uNextTex0Data[1] = r->ai32[1]; - vb[i].bNeedTexCheck = 1; - - // don't update unless necessary - if (PSMT_ISCLUT(psm)) - { - if (CheckChangeInClut(data[1], psm)) - { - // loading clut, so flush whole texture - vb[i].FlushTexData(); - } - else if (r->CSA != (vb[i].uCurTex0.CSA)) - { - // check if csa is the same!! (ffx bisaid island, grass) - Flush(i); // flush any previous entries - } - } -} - -template -void __gifCall GIFRegHandlerCLAMP(const u32* data) -{ - FUNCLOG - clampInfo& clamp = vb[i].clamp; - GIFRegCLAMP* r = (GIFRegCLAMP*)(data); - - // Worry about this later. - if (!NoHighlights(i)) return; - - if ((s_uClampData[i] != data[0]) || (((clamp.minv >> 8) | (clamp.maxv << 2)) != (data[1]&0x0fff))) - { - Flush(i); - - vb[i].bTexConstsSync = false; - } - - s_uClampData[i] = data[0]; - - clamp.wms = r->WMS; - clamp.wmt = r->WMT; - clamp.minu = r->MINU; - clamp.maxu = r->MAXU; - clamp.minv = r->MINV; - clamp.maxv = r->MAXV; - ZZLog::Greg_Log("CLAMP_%d: 0x%x", i, data); -} - -void __gifCall GIFRegHandlerFOG(const u32* data) -{ - FUNCLOG - GIFRegFOG* r = (GIFRegFOG*)(data); - gs.vertexregs.f = r->F; - ZZLog::Greg_Log("FOG: 0x%x", r->F); -} - -void __gifCall GIFRegHandlerXYZF3(const u32* data) -{ - FUNCLOG - GIFRegXYZF* r = (GIFRegXYZF*)(data); - gs.add_vertex(r->X, r->Y,r->Z, r->F); - - ZZKick->KickVertex(true); - ZZLog::Greg_Log("XYZF3: 0x%x, 0x%x, 0x%x, %f", r->X, r->Y, r->Z, r->F); -} - -void __gifCall GIFRegHandlerXYZ3(const u32* data) -{ - FUNCLOG - GIFRegXYZ* r = (GIFRegXYZ*)(data); - gs.add_vertex(r->X, r->Y,r->Z); - - ZZKick->KickVertex(true); - ZZLog::Greg_Log("XYZ3: 0x%x, 0x%x, 0x%x", r->X, r->Y, r->Z); -} - -void __gifCall GIFRegHandlerNOP(const u32* data) -{ - FUNCLOG -} - -template -void __fastcall GIFRegHandlerTEX1(const u32* data) -{ - FUNCLOG - GIFRegTEX1* r = (GIFRegTEX1*)(data); - tex1Info& tex1 = vb[i].tex1; - - // Worry about this later. - if (!NoHighlights(i)) return; - - if (conf.bilinear == 1 && (tex1.mmag != r->MMAG || tex1.mmin != r->MMIN)) - { - Flush(i); - vb[i].bVarsTexSync = false; - } - - tex1.lcm = r->LCM; - - tex1.mxl = r->MXL; - tex1.mmag = r->MMAG; - tex1.mmin = r->MMIN; - tex1.mtba = r->MTBA; - tex1.l = r->L; - tex1.k = r->K; - ZZLog::Greg_Log("TEX1_%d: 0x%x", i, data); -} - -template -void __gifCall GIFRegHandlerTEX2(const u32* data) -{ - FUNCLOG - tex0Info& tex0 = vb[i].tex0; - - vb[i].FlushTexData(); - - u32 psm = ZZOglGet_psm_TexBitsFix(data[0]); - - u32* s_uTex0Data = vb[i].uCurTex0Data; - - // don't update unless necessary -// if( ZZOglGet_psm_TexBitsFix(*s_uTex0Data) == ZZOglGet_psm_TexBitsFix(data[0]) ) { // psm is the same - if (ZZOglAllExceptClutIsSame(s_uTex0Data, data)) - { - if (!PSMT_ISCLUT(psm)) return; - - // have to write the CLUT again if changed - if (ZZOglClutMinusCLDunchanged(s_uTex0Data, data)) - { - tex0.cld = ZZOglGet_cld_TexBits(data[1]); - - if (tex0.cld != 0) - { - texClutWrite(i); - // invalidate to make sure target didn't change! - vb[i].bVarsTexSync = false; - } - - return; - } - } - - Flush(i); - - vb[i].bVarsTexSync = false; - vb[i].bTexConstsSync = false; - - s_uTex0Data[0] = (s_uTex0Data[0] & ~0x03f00000) | (psm << 20); - s_uTex0Data[1] = (s_uTex0Data[1] & 0x1f) | (data[1] & ~0x1f); - - tex0.psm = ZZOglGet_psm_TexBitsFix(data[0]); - - if (PSMT_ISCLUT(tex0.psm)) CluttingForFlushedTex(&tex0, data[1], i); - ZZLog::Greg_Log("TEX2_%d: 0x%x", i, data); -} - -template -void __gifCall GIFRegHandlerXYOFFSET(const u32* data) -{ - FUNCLOG - // Affects that Mana Khemia opening dialog (when i == 0). - GIFRegXYOFFSET* r = (GIFRegXYOFFSET*)(data); - vb[i].offset.x = r->OFX; - vb[i].offset.y = r->OFY; - ZZLog::Greg_Log("XYOFFSET_%d: 0x%x, 0x%x", i, r->OFX, r->OFY); -} - -// Fill out the vertex queue(prim) and the attributes. -void __gifCall GIFRegHandlerPRIM(const u32 *data) -{ - FUNCLOG - GIFRegPRIM* r = (GIFRegPRIM*)(data); - - //if (data[0] & ~0x3ff) - //{ - //ZZLog::Warn_Log("Warning: unknown bits in prim %8.8lx_%8.8lx", data[1], data[0]); - //} - - gs.primC = 0; - prim->prim = r->PRIM; - gs._prim[0].prim = r->PRIM; - gs._prim[1].prim = r->PRIM; - gs._prim[1]._val = (data[0] >> 3) & 0xff; // Setting the next 8 flags after prim at once. - - gs.new_tri_fan = !(r->PRIM ^ PRIM_TRIANGLE_FAN); - ZZKick->DirtyValidPrevPrim(); - - Prim(); - ZZLog::Greg_Log("PRIM"); -} - -// Fill out an alternate set of attributes. -void __gifCall GIFRegHandlerPRMODE(const u32* data) -{ - FUNCLOG - //GIFRegPRMODE* r = (GIFRegPRMODE*)(data); - // Re-examine all code dealing with PRIMs in a bit. - gs._prim[0]._val = (data[0] >> 3) & 0xff; - - if (gs.prac == 0) Prim(); - ZZLog::Greg_Log("PRMODE"); -} - -// Switch between the primary set of attributes (gs._prim[1]) and the secondary (gs._prim[0]). -void __gifCall GIFRegHandlerPRMODECONT(const u32* data) -{ - FUNCLOG - // Turns all the text into colored blocks on the initial Mana Khemia dialog if not run. - GIFRegPRMODECONT* r = (GIFRegPRMODECONT*)(data); - gs.prac = r->AC; - prim = &gs._prim[gs.prac]; - - Prim(); - ZZLog::Greg_Log("PRMODECONT"); -} - -void __gifCall GIFRegHandlerTEXCLUT(const u32* data) -{ - FUNCLOG - // Affects background coloration of initial Mana Khemia dialog. - GIFRegTEXCLUT* r = (GIFRegTEXCLUT*)(data); - - vb[0].FlushTexData(); - vb[1].FlushTexData(); - - // Fixme. - gs.clut.cbw = r->CBW << 6; - gs.clut.cou = r->COU << 4; - gs.clut.cov = r->COV; - ZZLog::Greg_Log("TEXCLUT: CBW:0x%x, COU:0x%x, COV:0x%x",r->CBW, r->COU, r->COV); -} - -void __gifCall GIFRegHandlerSCANMSK(const u32* data) -{ - FUNCLOG - GIFRegSCANMSK* r = (GIFRegSCANMSK*)(data); - - if(r->MSK != gs.smask) - { - FlushBoth(); -// ResolveC(&vb[0]); -// ResolveZ(&vb[0]); - } - - gs.smask = r->MSK; - ZZLog::Greg_Log("SCANMSK: 0x%x",r->MSK); -} - -template -void __gifCall GIFRegHandlerMIPTBP1(const u32* data) -{ - FUNCLOG - GIFRegMIPTBP1* r = (GIFRegMIPTBP1*)(data); - /*if(PRIM->CTXT == i && r != miptbp0) - { - Flush(); - }*/ - - miptbpInfo& miptbp0 = vb[i].miptbp0; - miptbp0.tbp[0] = r->TBP1; - miptbp0.tbw[0] = r->TBW1; - miptbp0.tbp[1] = r->TBP2; - miptbp0.tbw[1] = r->TBW2; - miptbp0.tbp[2] = r->TBP3; - miptbp0.tbw[2] = r->TBW3; - ZZLog::Greg_Log("MIPTBP1_%d: TBP/TBW: (0x%x, 0x%x), (0x%x, 0x%x), (0x%x, 0x%x)", i, r->TBP1, r->TBW1, r->TBP2, r->TBW2, r->TBP3, r->TBW3); -} - -template -void __gifCall GIFRegHandlerMIPTBP2(const u32* data) -{ - FUNCLOG - GIFRegMIPTBP2* r = (GIFRegMIPTBP2*)(data); - // Yep. - - miptbpInfo& miptbp1 = vb[i].miptbp1; - miptbp1.tbp[0] = r->TBP4; - miptbp1.tbw[0] = r->TBW4; - miptbp1.tbp[1] = r->TBP5; - miptbp1.tbw[1] = r->TBW5; - miptbp1.tbp[2] = r->TBP6; - miptbp1.tbw[2] = r->TBW6; - ZZLog::Greg_Log("MIPTBP2_%d: TBP/TBW: (0x%x, 0x%x), (0x%x, 0x%x), (0x%x, 0x%x)", i, r->TBP4, r->TBW4, r->TBP5, r->TBW5, r->TBP6, r->TBW6); -} - -void __gifCall GIFRegHandlerTEXA(const u32* data) -{ - FUNCLOG - // Background of initial Mana Khemia dialog. - GIFRegTEXA* r = (GIFRegTEXA*)(data); - - if ((r->AEM != gs.texa.aem) || (r->TA0 != gs.texa.ta[0]) || (r->TA1 != gs.texa.ta[1])) - { - FlushBoth(); - - vb[0].bTexConstsSync = false; - vb[1].bTexConstsSync = false; - } - - gs.texa.aem = r->AEM; - gs.texa.ta[0] = r->TA0; - gs.texa.ta[1] = r->TA1; - gs.texa.fta[0] = r->TA0 / 255.0f; - gs.texa.fta[1] = r->TA1 / 255.0f; - ZZLog::Greg_Log("TEXA: AEM:0x%x, TA0:0x%x, TA1:0x%x", r->AEM, r->TA0, r->TA1); -} - -void __gifCall GIFRegHandlerFOGCOL(const u32* data) -{ - FUNCLOG - GIFRegFOGCOL* r = (GIFRegFOGCOL*)(data); - - if (gs.fogcol != r->ai32[0]) - { - FlushBoth(); - } - - SetFogColor(r); - gs.fogcol = r->ai32[0]; - ZZLog::Greg_Log("FOGCOL: 0x%x", r->ai32[0]); -} - -void __gifCall GIFRegHandlerTEXFLUSH(const u32* data) -{ - FUNCLOG - // GSdx doesn't even do anything here. - SetTexFlush(); - ZZLog::Greg_Log("TEXFLUSH"); -} - -template -void __gifCall GIFRegHandlerSCISSOR(const u32* data) -{ - FUNCLOG - GIFRegSCISSOR* r = (GIFRegSCISSOR*)(data); - Rect2& scissor = vb[i].scissor; - - Rect2 newscissor; - - // << 3? - newscissor.x0 = r->SCAX0 << 3; - newscissor.x1 = r->SCAX1 << 3; - newscissor.y0 = r->SCAY0 << 3; - newscissor.y1 = r->SCAY1 << 3; - - if (newscissor.x1 != scissor.x1 || newscissor.y1 != scissor.y1 || - newscissor.x0 != scissor.x0 || newscissor.y0 != scissor.y0) - { - Flush(i); - - // flush everything - vb[i].bNeedFrameCheck = 1; - } - - scissor = newscissor; - - //Hmm... - /* - if(PRIM->CTXT == i && r->SCISSOR != m_env.CTXT[i].SCISSOR) - { - Flush(); - } - - m_env.CTXT[i].SCISSOR = (GSVector4i)r->SCISSOR; - - m_env.CTXT[i].UpdateScissor();*/ - ZZLog::Greg_Log("SCISSOR%d", i); -} - -template -void __gifCall GIFRegHandlerALPHA(const u32* data) -{ - FUNCLOG - // Mana Khemia Opening Dialog (when i = 0). - GIFRegALPHA* r = (GIFRegALPHA*)(data); - alphaInfo newalpha; - - newalpha.a = r->A; - newalpha.b = r->B; - newalpha.c = r->C; - newalpha.d = r->D; - newalpha.fix = r->FIX; - - if (newalpha.a == 3) newalpha.a = 0; - if (newalpha.b == 3) newalpha.b = 0; - if (newalpha.c == 3) newalpha.c = 0; - if (newalpha.d == 3) newalpha.d = 0; - - if ((newalpha.abcd != vb[i].alpha.abcd) || (newalpha.fix != vb[i].alpha.fix)) - { - Flush(i); - } - - vb[i].alpha = newalpha; - ZZLog::Greg_Log("ALPHA%d: A:0x%x B:0x%x C:0x%x D:0x%x FIX:0x%x ", i, r->A, r->B, r->C, r->D, r->FIX); -} - -void __gifCall GIFRegHandlerDIMX(const u32* data) -{ - FUNCLOG - - GIFRegDIMX* r = (GIFRegDIMX*)(data); - // Not even handled? Fixme. - bool update = false; - - if (r->i64 != gs.dimx.i64) - { - FlushBoth(); - - update = true; - } - - gs.dimx.i64 = r->i64; - - if (update) - { - //gs.UpdateDIMX(); - } - ZZLog::Greg_Log("DIMX"); -} - -void __gifCall GIFRegHandlerDTHE(const u32* data) -{ - FUNCLOG - GIFRegDTHE* r = (GIFRegDTHE*)(data); - - if (r->DTHE != gs.dthe) - { - FlushBoth(); - } - - gs.dthe = r->DTHE; - ZZLog::Greg_Log("DTHE: 0x%x ", r->DTHE); -} - -void __gifCall GIFRegHandlerCOLCLAMP(const u32* data) -{ - FUNCLOG - GIFRegCOLCLAMP* r = (GIFRegCOLCLAMP*)(data); - - if (r->CLAMP != gs.colclamp) - { - FlushBoth(); - } - - gs.colclamp = r->CLAMP; - ZZLog::Greg_Log("COLCLAMP: 0x%x ", r->CLAMP); -} - -template -void __gifCall GIFRegHandlerTEST(const u32* data) -{ - FUNCLOG - pixTest* test = &vb[i].test; - GIFRegTEST* r = (GIFRegTEST*)(data); - - if (test->_val != r->ai32[0]) - { - Flush(i); - } - - test->_val = r->ai32[0]; - ZZLog::Greg_Log("TEST%d", i); -} - -void __gifCall GIFRegHandlerPABE(const u32* data) -{ - FUNCLOG - GIFRegPABE* r = (GIFRegPABE*)(data); - - if (gs.pabe != r->PABE) - { - FlushBoth(); -// SetAlphaChanged(0, GPUREG_PABE); -// SetAlphaChanged(1, GPUREG_PABE); - } - - gs.pabe = r->PABE; - ZZLog::Greg_Log("PABE: 0x%x ", r->PABE); -} - -template -void __gifCall GIFRegHandlerFBA(const u32* data) -{ - FUNCLOG - GIFRegFBA* r = (GIFRegFBA*)(data); - - if (r->FBA != vb[i].fba.fba) - { - FlushBoth(); - } - - vb[i].fba.fba = r->FBA; - ZZLog::Greg_Log("FBA%d: 0x%x ", i, r->FBA); -} - -template -void __gifCall GIFRegHandlerFRAME(const u32* data) -{ - FUNCLOG - // Affects opening dialogs, movie, and menu on Mana Khemia. - - GIFRegFRAME* r = (GIFRegFRAME*)(data); - frameInfo& gsfb = vb[i].gsfb; - - int fbw = r->FBW * 64; - int fbp = r->FBP * 32; - int fbh = 0; - - if (gs.dthe != 0) - { - // Dither here. - //ZZLog::Error_Log("frameWrite: Dither!"); - } - - if ((gsfb.fbp == fbp) && - (gsfb.fbw == fbw) && - (gsfb.psm == r->PSM) && - (gsfb.fbm == ZZOglGet_fbm_FrameBitsFix(data[0], data[1]))) - { - return; - } - - FlushBoth(); - if (r->FBW > 0) fbh = ZZOgl_fbh_Calc(r->FBP, r->FBW, r->PSM); - - gsfb.fbp = fbp; - gsfb.fbw = fbw; - gsfb.psm = r->PSM; - gsfb.fbh = fbh; - gsfb.fbm = ZZOglGet_fbm_FrameBitsFix(data[0], data[1]); - - - vb[i].bNeedFrameCheck = 1; - ZZLog::Greg_Log("FRAME_%d", i); -} - -template -void __gifCall GIFRegHandlerZBUF(const u32* data) -{ - FUNCLOG - // I'll wait a bit on this one. - GIFRegZBUF* r = (GIFRegZBUF*)(data); - ZZLog::Greg_Log("ZBUF_1"); - - zbufInfo& zbuf = vb[i].zbuf; - int psm = (0x30 | r->PSM); - int zbp = r->ZBP * 32; - - if (zbuf.zbp == zbp && - zbuf.psm == psm && - zbuf.zmsk == r->ZMSK) - { - return; - } - - // error detection - if (m_Blocks[psm].bpp == 0) return; - - FlushBoth(); - - zbuf.zbp = zbp; - zbuf.psm = psm; - zbuf.zmsk = r->ZMSK; - - vb[i].zprimmask = 0xffffffff; - - if (zbuf.psm > 0x31) vb[i].zprimmask = 0xffff; - - vb[i].bNeedZCheck = 1; -} - -void __gifCall GIFRegHandlerBITBLTBUF(const u32* data) -{ - FUNCLOG - // Required for *all* graphics. (Checked on Mana Khemia) - - GIFRegBITBLTBUF* r = (GIFRegBITBLTBUF*)(data); - // Wonder why the shift? - gs.srcbufnew.bp = r->SBP; // * 64; - gs.srcbufnew.bw = r->SBW << 6; - gs.srcbufnew.psm = r->SPSM; - gs.dstbufnew.bp = r->DBP; // * 64; - gs.dstbufnew.bw = r->DBW << 6; - gs.dstbufnew.psm = r->DPSM; - - if (gs.dstbufnew.bw == 0) gs.dstbufnew.bw = 64; - // GSdx does this: - - /*if((gs.srcbufnew.bw & 1) && (gs.srcbufnew.psm == PSM_PSMT8 || gs.srcbufnew.psm == PSM_PSMT4)) - { - gs.srcbufnew.bw &= ~1; - } - - if((gs.dstbufnew.bw & 1) && (gs.dstbufnew.psm == PSM_PSMT8 || gs.dstbufnew.psm == PSM_PSMT4)) - { - gs.dstbufnew.bw &= ~1; // namcoXcapcom: 5, 11, refered to as 4, 10 in TEX0.TBW later - }*/ - ZZLog::Greg_Log("BITBLTBUF"); -} - -void __gifCall GIFRegHandlerTRXPOS(const u32* data) -{ - // Affects Mana Khemia opening background. - FUNCLOG - GIFRegTRXPOS* r = (GIFRegTRXPOS*)(data); - - gs.trxposnew.sx = r->SSAX; - gs.trxposnew.sy = r->SSAY; - gs.trxposnew.dx = r->DSAX; - gs.trxposnew.dy = r->DSAY; - gs.trxposnew.dirx = r->DIRX; - gs.trxposnew.diry = r->DIRY; - ZZLog::Greg_Log("TRXPOS: SSA:(0x%x/0x%x) DSA:(0x%x/0x%x) DIR:(0x%x/0x%x)", r->SSAX, r->SSAY, r->DSAX, r->DSAY, r->DIRX, r->DIRY); -} - -void __gifCall GIFRegHandlerTRXREG(const u32* data) -{ - FUNCLOG - GIFRegTRXREG* r = (GIFRegTRXREG*)(data); - gs.imageWtemp = r->RRW; - gs.imageHtemp = r->RRH; - ZZLog::Greg_Log("TRXREG: RRW: 0x%x, RRH: 0x%x", r->RRW, r->RRH); -} - -void __gifCall GIFRegHandlerTRXDIR(const u32* data) -{ - FUNCLOG - GIFRegTRXDIR* r = (GIFRegTRXDIR*)(data); - // Oh dear... - - // terminate any previous transfers - - switch (gs.imageTransfer) - { - case 0: // host->loc - TerminateHostLocal(); - break; - - case 1: // loc->host - TerminateLocalHost(); - break; - } - - gs.srcbuf = gs.srcbufnew; - gs.dstbuf = gs.dstbufnew; - gs.trxpos = gs.trxposnew; - - gs.imageTransfer = r->XDIR; - gs.imageWnew = gs.imageWtemp; - gs.imageHnew = gs.imageHtemp; - - if (gs.imageWnew > 0 && gs.imageHnew > 0) - { - switch (gs.imageTransfer) - { - case 0: // host->loc - InitTransferHostLocal(); - break; - - case 1: // loc->host - InitTransferLocalHost(); - break; - - case 2: - TransferLocalLocal(); - break; - - case 3: - gs.imageTransfer = -1; - break; - - default: - assert(0); - } - } - else - { -#if defined(ZEROGS_DEVBUILD) - ZZLog::Warn_Log("Dummy transfer."); -#endif - gs.imageTransfer = -1; - } - ZZLog::Greg_Log("TRXDIR"); -} - -void __gifCall GIFRegHandlerHWREG(const u32* data) -{ - FUNCLOG - - if (gs.imageTransfer == 0) - { - TransferHostLocal(data, 2); - } - else - { -#if defined(ZEROGS_DEVBUILD) - ZZLog::Error_Log("ZeroGS: HWREG!? %8.8x_%8.8x", data[0], data[1]); - //assert(0); -#endif - } - ZZLog::Greg_Log("HWREG"); -} - -extern int g_GSMultiThreaded; - -void __gifCall GIFRegHandlerSIGNAL(const u32* data) -{ - FUNCLOG - - if (!g_GSMultiThreaded) - { - SIGLBLID->SIGID = (SIGLBLID->SIGID & ~data[1]) | (data[0] & data[1]); - - if (gs.CSRw & 0x1) - { - CSR->SIGNAL = 1; - } - - if (!IMR->SIGMSK && GSirq) GSirq(); - } -} - -void __gifCall GIFRegHandlerFINISH(const u32* data) -{ - FUNCLOG - - if (!g_GSMultiThreaded) - { - if (gs.CSRw & 0x2) CSR->FINISH = 1; - - if (!IMR->FINISHMSK && GSirq) GSirq(); - } -} - -void __gifCall GIFRegHandlerLABEL(const u32* data) -{ - FUNCLOG - - if (!g_GSMultiThreaded) - { - SIGLBLID->LBLID = (SIGLBLID->LBLID & ~data[1]) | (data[0] & data[1]); - } -} - - -void SetMultithreaded() -{ - // Some older versions of PCSX2 didn't properly set the irq callback to NULL - // in multithreaded mode (possibly because ZeroGS itself would assert in such - // cases), and didn't bind them to a dummy callback either. PCSX2 handles all - // IRQs internally when multithreaded anyway -- so let's ignore them here: - - if (g_GSMultiThreaded) - { - g_GIFRegHandlers[GIF_A_D_REG_SIGNAL] = &GIFRegHandlerNull; - g_GIFRegHandlers[GIF_A_D_REG_FINISH] = &GIFRegHandlerNull; - g_GIFRegHandlers[GIF_A_D_REG_LABEL] = &GIFRegHandlerNull; - } - else - { - g_GIFRegHandlers[GIF_A_D_REG_SIGNAL] = &GIFRegHandlerSIGNAL; - g_GIFRegHandlers[GIF_A_D_REG_FINISH] = &GIFRegHandlerFINISH; - g_GIFRegHandlers[GIF_A_D_REG_LABEL] = &GIFRegHandlerLABEL; - } -} - -void ResetRegs() -{ - for (int i = 0; i < 16; i++) - { - g_GIFPackedRegHandlers[i] = &GIFPackedRegHandlerNull; - } - - g_GIFPackedRegHandlers[GIF_REG_PRIM] = &GIFPackedRegHandlerPRIM; - g_GIFPackedRegHandlers[GIF_REG_RGBA] = &GIFPackedRegHandlerRGBA; - g_GIFPackedRegHandlers[GIF_REG_STQ] = &GIFPackedRegHandlerSTQ; - g_GIFPackedRegHandlers[GIF_REG_UV] = &GIFPackedRegHandlerUV; - g_GIFPackedRegHandlers[GIF_REG_XYZF2] = &GIFPackedRegHandlerXYZF2; - g_GIFPackedRegHandlers[GIF_REG_XYZ2] = &GIFPackedRegHandlerXYZ2; - g_GIFPackedRegHandlers[GIF_REG_TEX0_1] = &GIFPackedRegHandlerTEX0<0>; - g_GIFPackedRegHandlers[GIF_REG_TEX0_2] = &GIFPackedRegHandlerTEX0<1>; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_1] = &GIFPackedRegHandlerCLAMP<0>; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_2] = &GIFPackedRegHandlerCLAMP<1>; - g_GIFPackedRegHandlers[GIF_REG_FOG] = &GIFPackedRegHandlerFOG; - g_GIFPackedRegHandlers[GIF_REG_XYZF3] = &GIFPackedRegHandlerXYZF3; - g_GIFPackedRegHandlers[GIF_REG_XYZ3] = &GIFPackedRegHandlerXYZ3; - g_GIFPackedRegHandlers[GIF_REG_A_D] = &GIFPackedRegHandlerA_D; - g_GIFPackedRegHandlers[GIF_REG_NOP] = &GIFPackedRegHandlerNOP; - - for (int i = 0; i < 256; i++) - { - g_GIFRegHandlers[i] = &GIFPackedRegHandlerNull; - } - - g_GIFRegHandlers[GIF_A_D_REG_PRIM] = &GIFRegHandlerPRIM; - g_GIFRegHandlers[GIF_A_D_REG_RGBAQ] = &GIFRegHandlerRGBAQ; - g_GIFRegHandlers[GIF_A_D_REG_ST] = &GIFRegHandlerST; - g_GIFRegHandlers[GIF_A_D_REG_UV] = &GIFRegHandlerUV; - g_GIFRegHandlers[GIF_A_D_REG_XYZF2] = &GIFRegHandlerXYZF2; - g_GIFRegHandlers[GIF_A_D_REG_XYZ2] = &GIFRegHandlerXYZ2; - g_GIFRegHandlers[GIF_A_D_REG_TEX0_1] = &GIFRegHandlerTEX0<0>; - g_GIFRegHandlers[GIF_A_D_REG_TEX0_2] = &GIFRegHandlerTEX0<1>; - g_GIFRegHandlers[GIF_A_D_REG_CLAMP_1] = &GIFRegHandlerCLAMP<0>; - g_GIFRegHandlers[GIF_A_D_REG_CLAMP_2] = &GIFRegHandlerCLAMP<1>; - g_GIFRegHandlers[GIF_A_D_REG_FOG] = &GIFRegHandlerFOG; - g_GIFRegHandlers[GIF_A_D_REG_XYZF3] = &GIFRegHandlerXYZF3; - g_GIFRegHandlers[GIF_A_D_REG_XYZ3] = &GIFRegHandlerXYZ3; - g_GIFRegHandlers[GIF_A_D_REG_NOP] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_TEX1_1] = &GIFRegHandlerTEX1<0>; - g_GIFRegHandlers[GIF_A_D_REG_TEX1_2] = &GIFRegHandlerTEX1<1>; - g_GIFRegHandlers[GIF_A_D_REG_TEX2_1] = &GIFRegHandlerTEX2<0>; - g_GIFRegHandlers[GIF_A_D_REG_TEX2_2] = &GIFRegHandlerTEX2<1>; - g_GIFRegHandlers[GIF_A_D_REG_XYOFFSET_1] = &GIFRegHandlerXYOFFSET<0>; - g_GIFRegHandlers[GIF_A_D_REG_XYOFFSET_2] = &GIFRegHandlerXYOFFSET<1>; - g_GIFRegHandlers[GIF_A_D_REG_PRMODECONT] = &GIFRegHandlerPRMODECONT; - g_GIFRegHandlers[GIF_A_D_REG_PRMODE] = &GIFRegHandlerPRMODE; - g_GIFRegHandlers[GIF_A_D_REG_TEXCLUT] = &GIFRegHandlerTEXCLUT; - g_GIFRegHandlers[GIF_A_D_REG_SCANMSK] = &GIFRegHandlerSCANMSK; - g_GIFRegHandlers[GIF_A_D_REG_MIPTBP1_1] = &GIFRegHandlerMIPTBP1<0>; - g_GIFRegHandlers[GIF_A_D_REG_MIPTBP1_2] = &GIFRegHandlerMIPTBP1<1>; - g_GIFRegHandlers[GIF_A_D_REG_MIPTBP2_1] = &GIFRegHandlerMIPTBP2<0>; - g_GIFRegHandlers[GIF_A_D_REG_MIPTBP2_2] = &GIFRegHandlerMIPTBP2<1>; - g_GIFRegHandlers[GIF_A_D_REG_TEXA] = &GIFRegHandlerTEXA; - g_GIFRegHandlers[GIF_A_D_REG_FOGCOL] = &GIFRegHandlerFOGCOL; - g_GIFRegHandlers[GIF_A_D_REG_TEXFLUSH] = &GIFRegHandlerTEXFLUSH; - g_GIFRegHandlers[GIF_A_D_REG_SCISSOR_1] = &GIFRegHandlerSCISSOR<0>; - g_GIFRegHandlers[GIF_A_D_REG_SCISSOR_2] = &GIFRegHandlerSCISSOR<1>; - g_GIFRegHandlers[GIF_A_D_REG_ALPHA_1] = &GIFRegHandlerALPHA<0>; - g_GIFRegHandlers[GIF_A_D_REG_ALPHA_2] = &GIFRegHandlerALPHA<1>; - g_GIFRegHandlers[GIF_A_D_REG_DIMX] = &GIFRegHandlerDIMX; - g_GIFRegHandlers[GIF_A_D_REG_DTHE] = &GIFRegHandlerDTHE; - g_GIFRegHandlers[GIF_A_D_REG_COLCLAMP] = &GIFRegHandlerCOLCLAMP; - g_GIFRegHandlers[GIF_A_D_REG_TEST_1] = &GIFRegHandlerTEST<0>; - g_GIFRegHandlers[GIF_A_D_REG_TEST_2] = &GIFRegHandlerTEST<1>; - g_GIFRegHandlers[GIF_A_D_REG_PABE] = &GIFRegHandlerPABE; - g_GIFRegHandlers[GIF_A_D_REG_FBA_1] = &GIFRegHandlerFBA<0>; - g_GIFRegHandlers[GIF_A_D_REG_FBA_2] = &GIFRegHandlerFBA<1>; - g_GIFRegHandlers[GIF_A_D_REG_FRAME_1] = &GIFRegHandlerFRAME<0>; - g_GIFRegHandlers[GIF_A_D_REG_FRAME_2] = &GIFRegHandlerFRAME<1>; - g_GIFRegHandlers[GIF_A_D_REG_ZBUF_1] = &GIFRegHandlerZBUF<0>; - g_GIFRegHandlers[GIF_A_D_REG_ZBUF_2] = &GIFRegHandlerZBUF<1>; - g_GIFRegHandlers[GIF_A_D_REG_BITBLTBUF] = &GIFRegHandlerBITBLTBUF; - g_GIFRegHandlers[GIF_A_D_REG_TRXPOS] = &GIFRegHandlerTRXPOS; - g_GIFRegHandlers[GIF_A_D_REG_TRXREG] = &GIFRegHandlerTRXREG; - g_GIFRegHandlers[GIF_A_D_REG_TRXDIR] = &GIFRegHandlerTRXDIR; - g_GIFRegHandlers[GIF_A_D_REG_HWREG] = &GIFRegHandlerHWREG; - SetMultithreaded(); -} - -void WriteTempRegs() -{ - memcpy(g_GIFTempRegHandlers, g_GIFPackedRegHandlers, sizeof(g_GIFTempRegHandlers)); -} - -void SetFrameSkip(bool skip) -{ - if (skip) - { - g_GIFPackedRegHandlers[GIF_REG_PRIM] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_RGBA] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_STQ] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_UV] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_XYZF2] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_XYZ2] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_1] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_2] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_FOG] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_XYZF3] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_XYZ3] = &GIFPackedRegHandlerNOP; - - g_GIFRegHandlers[GIF_A_D_REG_PRIM] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_RGBAQ] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_ST] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_UV] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_XYZF2] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_XYZ2] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_XYZF3] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_XYZ3] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_PRMODECONT] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_PRMODE] = &GIFRegHandlerNOP; - } - else - { - g_GIFPackedRegHandlers[GIF_REG_PRIM] = &GIFPackedRegHandlerPRIM; - g_GIFPackedRegHandlers[GIF_REG_RGBA] = &GIFPackedRegHandlerRGBA; - g_GIFPackedRegHandlers[GIF_REG_STQ] = &GIFPackedRegHandlerSTQ; - g_GIFPackedRegHandlers[GIF_REG_UV] = &GIFPackedRegHandlerUV; - g_GIFPackedRegHandlers[GIF_REG_XYZF2] = &GIFPackedRegHandlerXYZF2; - g_GIFPackedRegHandlers[GIF_REG_XYZ2] = &GIFPackedRegHandlerXYZ2; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_1] = &GIFPackedRegHandlerCLAMP<0>; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_2] = &GIFPackedRegHandlerCLAMP<1>; - g_GIFPackedRegHandlers[GIF_REG_FOG] = &GIFPackedRegHandlerFOG; - g_GIFPackedRegHandlers[GIF_REG_XYZF3] = &GIFPackedRegHandlerXYZF3; - g_GIFPackedRegHandlers[GIF_REG_XYZ3] = &GIFPackedRegHandlerXYZ3; - - g_GIFRegHandlers[GIF_A_D_REG_PRIM] = &GIFRegHandlerPRIM; - g_GIFRegHandlers[GIF_A_D_REG_RGBAQ] = &GIFRegHandlerRGBAQ; - g_GIFRegHandlers[GIF_A_D_REG_ST] = &GIFRegHandlerST; - g_GIFRegHandlers[GIF_A_D_REG_UV] = &GIFRegHandlerUV; - g_GIFRegHandlers[GIF_A_D_REG_XYZF2] = &GIFRegHandlerXYZF2; - g_GIFRegHandlers[GIF_A_D_REG_XYZ2] = &GIFRegHandlerXYZ2; - g_GIFRegHandlers[GIF_A_D_REG_XYZF3] = &GIFRegHandlerXYZF3; - g_GIFRegHandlers[GIF_A_D_REG_XYZ3] = &GIFRegHandlerXYZ3; - g_GIFRegHandlers[GIF_A_D_REG_PRMODECONT] = &GIFRegHandlerPRMODECONT; - g_GIFRegHandlers[GIF_A_D_REG_PRMODE] = &GIFRegHandlerPRMODE; - } -} -#endif diff --git a/plugins/zzogl-pg-cg/opengl/NewRegs.h b/plugins/zzogl-pg-cg/opengl/NewRegs.h deleted file mode 100644 index b915ef1b7b..0000000000 --- a/plugins/zzogl-pg-cg/opengl/NewRegs.h +++ /dev/null @@ -1,973 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef NEWREGS_H_INCLUDED -#define NEWREGS_H_INCLUDED - -#ifdef USE_OLD_REGS -#include "Regs.h" -#else - -enum GIF_REG -{ - GIF_REG_PRIM = 0x00, - GIF_REG_RGBA = 0x01, - GIF_REG_STQ = 0x02, - GIF_REG_UV = 0x03, - GIF_REG_XYZF2 = 0x04, - GIF_REG_XYZ2 = 0x05, - GIF_REG_TEX0_1 = 0x06, - GIF_REG_TEX0_2 = 0x07, - GIF_REG_CLAMP_1 = 0x08, - GIF_REG_CLAMP_2 = 0x09, - GIF_REG_FOG = 0x0a, - GIF_REG_XYZF3 = 0x0c, - GIF_REG_XYZ3 = 0x0d, - GIF_REG_A_D = 0x0e, - GIF_REG_NOP = 0x0f, -}; - -enum GIF_A_D_REG -{ - GIF_A_D_REG_PRIM = 0x00, - GIF_A_D_REG_RGBAQ = 0x01, - GIF_A_D_REG_ST = 0x02, - GIF_A_D_REG_UV = 0x03, - GIF_A_D_REG_XYZF2 = 0x04, - GIF_A_D_REG_XYZ2 = 0x05, - GIF_A_D_REG_TEX0_1 = 0x06, - GIF_A_D_REG_TEX0_2 = 0x07, - GIF_A_D_REG_CLAMP_1 = 0x08, - GIF_A_D_REG_CLAMP_2 = 0x09, - GIF_A_D_REG_FOG = 0x0a, - GIF_A_D_REG_XYZF3 = 0x0c, - GIF_A_D_REG_XYZ3 = 0x0d, - GIF_A_D_REG_NOP = 0x0f, - GIF_A_D_REG_TEX1_1 = 0x14, - GIF_A_D_REG_TEX1_2 = 0x15, - GIF_A_D_REG_TEX2_1 = 0x16, - GIF_A_D_REG_TEX2_2 = 0x17, - GIF_A_D_REG_XYOFFSET_1 = 0x18, - GIF_A_D_REG_XYOFFSET_2 = 0x19, - GIF_A_D_REG_PRMODECONT = 0x1a, - GIF_A_D_REG_PRMODE = 0x1b, - GIF_A_D_REG_TEXCLUT = 0x1c, - GIF_A_D_REG_SCANMSK = 0x22, - GIF_A_D_REG_MIPTBP1_1 = 0x34, - GIF_A_D_REG_MIPTBP1_2 = 0x35, - GIF_A_D_REG_MIPTBP2_1 = 0x36, - GIF_A_D_REG_MIPTBP2_2 = 0x37, - GIF_A_D_REG_TEXA = 0x3b, - GIF_A_D_REG_FOGCOL = 0x3d, - GIF_A_D_REG_TEXFLUSH = 0x3f, - GIF_A_D_REG_SCISSOR_1 = 0x40, - GIF_A_D_REG_SCISSOR_2 = 0x41, - GIF_A_D_REG_ALPHA_1 = 0x42, - GIF_A_D_REG_ALPHA_2 = 0x43, - GIF_A_D_REG_DIMX = 0x44, - GIF_A_D_REG_DTHE = 0x45, - GIF_A_D_REG_COLCLAMP = 0x46, - GIF_A_D_REG_TEST_1 = 0x47, - GIF_A_D_REG_TEST_2 = 0x48, - GIF_A_D_REG_PABE = 0x49, - GIF_A_D_REG_FBA_1 = 0x4a, - GIF_A_D_REG_FBA_2 = 0x4b, - GIF_A_D_REG_FRAME_1 = 0x4c, - GIF_A_D_REG_FRAME_2 = 0x4d, - GIF_A_D_REG_ZBUF_1 = 0x4e, - GIF_A_D_REG_ZBUF_2 = 0x4f, - GIF_A_D_REG_BITBLTBUF = 0x50, - GIF_A_D_REG_TRXPOS = 0x51, - GIF_A_D_REG_TRXREG = 0x52, - GIF_A_D_REG_TRXDIR = 0x53, - GIF_A_D_REG_HWREG = 0x54, - GIF_A_D_REG_SIGNAL = 0x60, - GIF_A_D_REG_FINISH = 0x61, - GIF_A_D_REG_LABEL = 0x62, -}; -// In case we want to change to/from __fastcall for GIF register handlers: -#define __gifCall __fastcall - -typedef void __gifCall FnType_GIFRegHandler(const u32* data); -typedef FnType_GIFRegHandler* GIFRegHandler; - -extern FnType_GIFRegHandler GIFPackedRegHandlerNull; -extern FnType_GIFRegHandler GIFPackedRegHandlerRGBA; -extern FnType_GIFRegHandler GIFPackedRegHandlerSTQ; -extern FnType_GIFRegHandler GIFPackedRegHandlerUV; -extern FnType_GIFRegHandler GIFPackedRegHandlerXYZF2; -extern FnType_GIFRegHandler GIFPackedRegHandlerXYZ2; -extern FnType_GIFRegHandler GIFPackedRegHandlerFOG; -extern FnType_GIFRegHandler GIFPackedRegHandlerA_D; -extern FnType_GIFRegHandler GIFPackedRegHandlerNOP; - -// These are unimplemented, and fall back on the non-packed versions. -extern FnType_GIFRegHandler GIFPackedRegHandlerPRIM; - -template -extern FnType_GIFRegHandler GIFPackedRegHandlerTEX0; - -template -extern FnType_GIFRegHandler GIFPackedRegHandlerCLAMP; - -extern FnType_GIFRegHandler GIFPackedRegHandlerXYZF3; -extern FnType_GIFRegHandler GIFPackedRegHandlerXYZ3; - -extern FnType_GIFRegHandler GIFRegHandlerNull; -extern FnType_GIFRegHandler GIFRegHandlerPRIM; -extern FnType_GIFRegHandler GIFRegHandlerRGBAQ; -extern FnType_GIFRegHandler GIFRegHandlerST; -extern FnType_GIFRegHandler GIFRegHandlerUV; -extern FnType_GIFRegHandler GIFRegHandlerXYZF2; -extern FnType_GIFRegHandler GIFRegHandlerXYZ2; - -template -extern FnType_GIFRegHandler GIFRegHandlerTEX0; - -template -extern FnType_GIFRegHandler GIFRegHandlerCLAMP; - -extern FnType_GIFRegHandler GIFRegHandlerFOG; -extern FnType_GIFRegHandler GIFRegHandlerXYZF3; -extern FnType_GIFRegHandler GIFRegHandlerXYZ3; -extern FnType_GIFRegHandler GIFRegHandlerNOP; - -template -extern FnType_GIFRegHandler GIFRegHandlerTEX1; - -template -extern FnType_GIFRegHandler GIFRegHandlerTEX2; - -template -extern FnType_GIFRegHandler GIFRegHandlerXYOFFSET; - -extern FnType_GIFRegHandler GIFRegHandlerPRMODECONT; -extern FnType_GIFRegHandler GIFRegHandlerPRMODE; -extern FnType_GIFRegHandler GIFRegHandlerTEXCLUT; -extern FnType_GIFRegHandler GIFRegHandlerSCANMSK; -template -extern FnType_GIFRegHandler GIFRegHandlerMIPTBP1; -template -extern FnType_GIFRegHandler GIFRegHandlerMIPTBP2; -extern FnType_GIFRegHandler GIFRegHandlerTEXA; -extern FnType_GIFRegHandler GIFRegHandlerFOGCOL; -extern FnType_GIFRegHandler GIFRegHandlerTEXFLUSH; - -template -extern FnType_GIFRegHandler GIFRegHandlerSCISSOR; -template -extern FnType_GIFRegHandler GIFRegHandlerALPHA; - -extern FnType_GIFRegHandler GIFRegHandlerDIMX; -extern FnType_GIFRegHandler GIFRegHandlerDTHE; -extern FnType_GIFRegHandler GIFRegHandlerCOLCLAMP; -template -extern FnType_GIFRegHandler GIFRegHandlerTEST; -extern FnType_GIFRegHandler GIFRegHandlerPABE; -template -extern FnType_GIFRegHandler GIFRegHandlerFBA; -template -extern FnType_GIFRegHandler GIFRegHandlerFRAME; -template -extern FnType_GIFRegHandler GIFRegHandlerZBUF; -extern FnType_GIFRegHandler GIFRegHandlerBITBLTBUF; -extern FnType_GIFRegHandler GIFRegHandlerTRXPOS; -extern FnType_GIFRegHandler GIFRegHandlerTRXREG; -extern FnType_GIFRegHandler GIFRegHandlerTRXDIR; -extern FnType_GIFRegHandler GIFRegHandlerHWREG; -extern FnType_GIFRegHandler GIFRegHandlerSIGNAL; -extern FnType_GIFRegHandler GIFRegHandlerFINISH; -extern FnType_GIFRegHandler GIFRegHandlerLABEL; - -// GifReg & GifPackedReg structs from GSdx, slightly modified - -enum GS_ATST -{ - ATST_NEVER = 0, - ATST_ALWAYS = 1, - ATST_LESS = 2, - ATST_LEQUAL = 3, - ATST_EQUAL = 4, - ATST_GEQUAL = 5, - ATST_GREATER = 6, - ATST_NOTEQUAL = 7, -}; - -enum GS_AFAIL -{ - AFAIL_KEEP = 0, - AFAIL_FB_ONLY = 1, - AFAIL_ZB_ONLY = 2, - AFAIL_RGB_ONLY = 3, -}; - -// GIFReg - -REG64_(GIFReg, ALPHA) - u32 A:2; - u32 B:2; - u32 C:2; - u32 D:2; - u32 _PAD1:24; - u32 FIX:8; - u32 _PAD2:24; -REG_END2 - // opaque => output will be Cs/As - __forceinline bool IsOpaque() const {return (A == B || C == 2 && FIX == 0) && D == 0 || (A == 0 && B == D && C == 2 && FIX == 0x80);} - __forceinline bool IsOpaque(int amin, int amax) const {return (A == B || amax == 0) && D == 0 || A == 0 && B == D && amin == 0x80 && amax == 0x80;} -REG_END2 - -REG64_(GIFReg, BITBLTBUF) - u32 SBP:14; - u32 _PAD1:2; - u32 SBW:6; - u32 _PAD2:2; - u32 SPSM:6; - u32 _PAD3:2; - u32 DBP:14; - u32 _PAD4:2; - u32 DBW:6; - u32 _PAD5:2; - u32 DPSM:6; - u32 _PAD6:2; -REG_END - -REG64_(GIFReg, CLAMP) -union -{ - struct - { - u32 WMS:2; - u32 WMT:2; - u32 MINU:10; - u32 MAXU:10; - u32 _PAD1:8; - u32 _PAD2:2; - u32 MAXV:10; - u32 _PAD3:20; - }; - - struct - { - u64 _PAD4:24; - u64 MINV:10; - u64 _PAD5:30; - }; -}; -REG_END - -REG64_(GIFReg, COLCLAMP) - u32 CLAMP:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, DIMX) - s32 DM00:3; - s32 _PAD00:1; - s32 DM01:3; - s32 _PAD01:1; - s32 DM02:3; - s32 _PAD02:1; - s32 DM03:3; - s32 _PAD03:1; - s32 DM10:3; - s32 _PAD10:1; - s32 DM11:3; - s32 _PAD11:1; - s32 DM12:3; - s32 _PAD12:1; - s32 DM13:3; - s32 _PAD13:1; - s32 DM20:3; - s32 _PAD20:1; - s32 DM21:3; - s32 _PAD21:1; - s32 DM22:3; - s32 _PAD22:1; - s32 DM23:3; - s32 _PAD23:1; - s32 DM30:3; - s32 _PAD30:1; - s32 DM31:3; - s32 _PAD31:1; - s32 DM32:3; - s32 _PAD32:1; - s32 DM33:3; - s32 _PAD33:1; -REG_END - -REG64_(GIFReg, DTHE) - u32 DTHE:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, FBA) - u32 FBA:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, FINISH) - u32 _PAD1:32; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, FOG) - u32 _PAD1:32; - u32 _PAD2:24; - u32 F:8; -REG_END - -REG64_(GIFReg, FOGCOL) - u32 FCR:8; - u32 FCG:8; - u32 FCB:8; - u32 _PAD1:8; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, FRAME) - u32 FBP:9; - u32 _PAD1:7; - u32 FBW:6; - u32 _PAD2:2; - u32 PSM:6; - u32 _PAD3:2; - u32 FBMSK:32; -REG_END2 - u32 Block() const {return FBP << 5;} -REG_END2 - -REG64_(GIFReg, HWREG) - u32 DATA_LOWER:32; - u32 DATA_UPPER:32; -REG_END - -REG64_(GIFReg, LABEL) - u32 ID:32; - u32 IDMSK:32; -REG_END - -REG64_(GIFReg, MIPTBP1) - u64 TBP1:14; - u64 TBW1:6; - u64 TBP2:14; - u64 TBW2:6; - u64 TBP3:14; - u64 TBW3:6; - u64 _PAD:4; -REG_END - -REG64_(GIFReg, MIPTBP2) - u64 TBP4:14; - u64 TBW4:6; - u64 TBP5:14; - u64 TBW5:6; - u64 TBP6:14; - u64 TBW6:6; - u64 _PAD:4; -REG_END - -REG64_(GIFReg, NOP) - u32 _PAD1:32; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, PABE) - u32 PABE:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, PRIM) - u32 PRIM:3; - u32 IIP:1; - u32 TME:1; - u32 FGE:1; - u32 ABE:1; - u32 AA1:1; - u32 FST:1; - u32 CTXT:1; - u32 FIX:1; - u32 _PAD1:21; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, PRMODE) - u32 _PRIM:3; - u32 IIP:1; - u32 TME:1; - u32 FGE:1; - u32 ABE:1; - u32 AA1:1; - u32 FST:1; - u32 CTXT:1; - u32 FIX:1; - u32 _PAD2:21; - u32 _PAD3:32; -REG_END - -REG64_(GIFReg, PRMODECONT) - u32 AC:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, RGBAQ) - u32 R:8; - u32 G:8; - u32 B:8; - u32 A:8; - float Q; -REG_END - -REG64_(GIFReg, SCANMSK) - u32 MSK:2; - u32 _PAD1:30; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, SCISSOR) - u32 SCAX0:11; - u32 _PAD1:5; - u32 SCAX1:11; - u32 _PAD2:5; - u32 SCAY0:11; - u32 _PAD3:5; - u32 SCAY1:11; - u32 _PAD4:5; -REG_END - -REG64_(GIFReg, SIGNAL) - u32 ID:32; - u32 IDMSK:32; -REG_END - -REG64_(GIFReg, ST) - float S; - float T; -REG_END - -REG64_(GIFReg, TEST) - u32 ATE:1; - u32 ATST:3; - u32 AREF:8; - u32 AFAIL:2; - u32 DATE:1; - u32 DATM:1; - u32 ZTE:1; - u32 ZTST:2; - u32 _PAD1:13; - u32 _PAD2:32; -REG_END2 - __forceinline bool DoFirstPass() {return !ATE || ATST != ATST_NEVER;} // not all pixels fail automatically - __forceinline bool DoSecondPass() {return ATE && ATST != ATST_ALWAYS && AFAIL != AFAIL_KEEP;} // pixels may fail, write fb/z - __forceinline bool NoSecondPass() {return ATE && ATST != ATST_ALWAYS && AFAIL == AFAIL_KEEP;} // pixels may fail, no output -REG_END2 - -REG64_(GIFReg, TEX0) -union -{ - struct - { - u32 TBP0:14; - u32 TBW:6; - u32 PSM:6; - u32 TW:4; - u32 _PAD1:2; - u32 _PAD2:2; - u32 TCC:1; - u32 TFX:2; - u32 CBP:14; - u32 CPSM:4; - u32 CSM:1; - u32 CSA:5; - u32 CLD:3; - }; - - struct - { - u64 _PAD3:30; - u64 TH:4; - u64 _PAD4:30; - }; -}; -REG_END2 - __forceinline bool IsRepeating() {return (u32)((u32)1 << TW) > (u32)(TBW << (u32)6);} -REG_END2 - -REG64_(GIFReg, TEX1) - u32 LCM:1; - u32 _PAD1:1; - u32 MXL:3; - u32 MMAG:1; - u32 MMIN:3; - u32 MTBA:1; - u32 _PAD2:9; - u32 L:2; - u32 _PAD3:11; - s32 K:12; // 1:7:4 - u32 _PAD4:20; -REG_END2 - bool IsMinLinear() const {return (MMIN == 1) || (MMIN & 4);} - bool IsMagLinear() const {return MMAG;} -REG_END2 - -REG64_(GIFReg, TEX2) - u32 _PAD1:20; - u32 PSM:6; - u32 _PAD2:6; - u32 _PAD3:5; - u32 CBP:14; - u32 CPSM:4; - u32 CSM:1; - u32 CSA:5; - u32 CLD:3; -REG_END - -REG64_(GIFReg, TEXA) - u32 TA0:8; - u32 _PAD1:7; - u32 AEM:1; - u32 _PAD2:16; - u32 TA1:8; - u32 _PAD3:24; -REG_END - -REG64_(GIFReg, TEXCLUT) - u32 CBW:6; - u32 COU:6; - u32 COV:10; - u32 _PAD1:10; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, TEXFLUSH) - u32 _PAD1:32; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, TRXDIR) - u32 XDIR:2; - u32 _PAD1:30; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, TRXPOS) - u32 SSAX:11; - u32 _PAD1:5; - u32 SSAY:11; - u32 _PAD2:5; - u32 DSAX:11; - u32 _PAD3:5; - u32 DSAY:11; - u32 DIRY:1; - u32 DIRX:1; - u32 _PAD4:3; -REG_END - -REG64_(GIFReg, TRXREG) - u32 RRW:12; - u32 _PAD1:20; - u32 RRH:12; - u32 _PAD2:20; -REG_END - -REG64_(GIFReg, UV) - u32 U:14; - u32 _PAD1:2; - u32 V:14; - u32 _PAD2:2; - u32 _PAD3:32; -REG_END - -REG64_(GIFReg, XYOFFSET) - u32 OFX:16; - u32 _PAD1:16; - u32 OFY:16; - u32 _PAD2:16; -REG_END - -REG64_(GIFReg, XYZ) - u32 X:16; - u32 Y:16; - u32 Z:32; -REG_END - -REG64_(GIFReg, XYZF) - u32 X:16; - u32 Y:16; - u32 Z:24; - u32 F:8; -REG_END - -REG64_(GIFReg, ZBUF) - u32 ZBP:9; - u32 _PAD1:15; - // u32 PSM:4; - // u32 _PAD2:4; - u32 PSM:6; - u32 _PAD2:2; - u32 ZMSK:1; - u32 _PAD3:31; -REG_END2 - u32 Block() const {return ZBP << 5;} -REG_END2 - -REG64_SET(GIFReg) - GIFRegALPHA ALPHA; - GIFRegBITBLTBUF BITBLTBUF; - GIFRegCLAMP CLAMP; - GIFRegCOLCLAMP COLCLAMP; - GIFRegDIMX DIMX; - GIFRegDTHE DTHE; - GIFRegFBA FBA; - GIFRegFINISH FINISH; - GIFRegFOG FOG; - GIFRegFOGCOL FOGCOL; - GIFRegFRAME FRAME; - GIFRegHWREG HWREG; - GIFRegLABEL LABEL; - GIFRegMIPTBP1 MIPTBP1; - GIFRegMIPTBP2 MIPTBP2; - GIFRegNOP NOP; - GIFRegPABE PABE; - GIFRegPRIM PRIM; - GIFRegPRMODE PRMODE; - GIFRegPRMODECONT PRMODECONT; - GIFRegRGBAQ RGBAQ; - GIFRegSCANMSK SCANMSK; - GIFRegSCISSOR SCISSOR; - GIFRegSIGNAL SIGNAL; - GIFRegST ST; - GIFRegTEST TEST; - GIFRegTEX0 TEX0; - GIFRegTEX1 TEX1; - GIFRegTEX2 TEX2; - GIFRegTEXA TEXA; - GIFRegTEXCLUT TEXCLUT; - GIFRegTEXFLUSH TEXFLUSH; - GIFRegTRXDIR TRXDIR; - GIFRegTRXPOS TRXPOS; - GIFRegTRXREG TRXREG; - GIFRegUV UV; - GIFRegXYOFFSET XYOFFSET; - GIFRegXYZ XYZ; - GIFRegXYZF XYZF; - GIFRegZBUF ZBUF; -REG_SET_END - -// GIFPacked - -REG128_(GIFPacked, PRIM) - u32 PRIM:11; - u32 _PAD1:21; - u32 _PAD2:32; - u32 _PAD3:32; - u32 _PAD4:32; -REG_END - -REG128_(GIFPacked, RGBA) - u32 R:8; - u32 _PAD1:24; - u32 G:8; - u32 _PAD2:24; - u32 B:8; - u32 _PAD3:24; - u32 A:8; - u32 _PAD4:24; -REG_END - -REG128_(GIFPacked, STQ) - float S; - float T; - float Q; - u32 _PAD1:32; -REG_END - -REG128_(GIFPacked, UV) - u32 U:14; - u32 _PAD1:18; - u32 V:14; - u32 _PAD2:18; - u32 _PAD3:32; - u32 _PAD4:32; -REG_END - -REG128_(GIFPacked, XYZF2) - u32 X:16; - u32 _PAD1:16; - u32 Y:16; - u32 _PAD2:16; - u32 _PAD3:4; - u32 Z:24; - u32 _PAD4:4; - u32 _PAD5:4; - u32 F:8; - u32 _PAD6:3; - u32 ADC:1; - u32 _PAD7:16; -REG_END - -REG128_(GIFPacked, XYZ2) - u32 X:16; - u32 _PAD1:16; - u32 Y:16; - u32 _PAD2:16; - u32 Z:32; - u32 _PAD3:15; - u32 ADC:1; - u32 _PAD4:16; -REG_END - -REG128_(GIFPacked, FOG) - u32 _PAD1:32; - u32 _PAD2:32; - u32 _PAD3:32; - u32 _PAD4:4; - u32 F:8; - u32 _PAD5:20; -REG_END - -REG128_(GIFPacked, A_D) - u64 DATA:64; - u32 ADDR:8; // enum GIF_A_D_REG - u32 _PAD1:24; - u32 _PAD2:32; -REG_END - -REG128_(GIFPacked, NOP) - u32 _PAD1:32; - u32 _PAD2:32; - u32 _PAD3:32; - u32 _PAD4:32; -REG_END - -REG128_SET(GIFPackedReg) - GIFReg r; - GIFPackedPRIM PRIM; - GIFPackedRGBA RGBA; - GIFPackedSTQ STQ; - GIFPackedUV UV; - GIFPackedXYZF2 XYZF2; - GIFPackedXYZ2 XYZ2; - GIFPackedFOG FOG; - GIFPackedA_D A_D; - GIFPackedNOP NOP; -REG_SET_END - -REG64_(GSReg, BGCOLOR) - u32 R:8; - u32 G:8; - u32 B:8; - u32 _PAD1:8; - u32 _PAD2:32; -REG_END - -REG64_(GSReg, BUSDIR) - u32 DIR:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GSReg, CSR) - u32 SIGNAL:1; - u32 FINISH:1; - u32 HSINT:1; - u32 VSINT:1; - u32 EDWINT:1; - u32 ZERO1:1; - u32 ZERO2:1; - u32 _PAD1:1; - u32 FLUSH:1; - u32 RESET:1; - u32 _PAD2:2; - u32 NFIELD:1; - u32 FIELD:1; - u32 FIFO:2; - u32 REV:8; - u32 ID:8; - u32 _PAD3:32; -REG_END - -REG64_(GSReg, DISPFB) // (-1/2) - u32 FBP:9; - u32 FBW:6; - u32 PSM:5; - u32 _PAD:12; - u32 DBX:11; - u32 DBY:11; - u32 _PAD2:10; -REG_END - -REG64_(GSReg, DISPLAY) // (-1/2) - u32 DX:12; - u32 DY:11; - u32 MAGH:4; - u32 MAGV:2; - u32 _PAD:3; - u32 DW:12; - u32 DH:11; - u32 _PAD2:9; -REG_END - -REG64_(GSReg, EXTBUF) - u32 EXBP:14; - u32 EXBW:6; - u32 FBIN:2; - u32 WFFMD:1; - u32 EMODA:2; - u32 EMODC:2; - u32 _PAD1:5; - u32 WDX:11; - u32 WDY:11; - u32 _PAD2:10; -REG_END - -REG64_(GSReg, EXTDATA) - u32 SX:12; - u32 SY:11; - u32 SMPH:4; - u32 SMPV:2; - u32 _PAD1:3; - u32 WW:12; - u32 WH:11; - u32 _PAD2:9; -REG_END - -REG64_(GSReg, EXTWRITE) - u32 WRITE; - u32 _PAD2:32; -REG_END - -REG64_(GSReg, IMR) - u32 _PAD1:8; - u32 SIGMSK:1; - u32 FINISHMSK:1; - u32 HSMSK:1; - u32 VSMSK:1; - u32 EDWMSK:1; - u32 _PAD2:19; - u32 _PAD3:32; -REG_END - -REG64_(GSReg, PMODE) - u32 EN1:1; - u32 EN2:1; - u32 CRTMD:3; - u32 MMOD:1; - u32 AMOD:1; - u32 SLBG:1; - u32 ALP:8; - u32 _PAD:16; - u32 _PAD1:32; -REG_END - -REG64_(GSReg, SIGLBLID) - u32 SIGID:32; - u32 LBLID:32; -REG_END - -REG64_(GSReg, SMODE1) - u32 RC:3; - u32 LC:7; - u32 T1248:2; - u32 SLCK:1; - u32 CMOD:2; - u32 EX:1; - u32 PRST:1; - u32 SINT:1; - u32 XPCK:1; - u32 PCK2:2; - u32 SPML:4; - u32 GCONT:1; - u32 PHS:1; - u32 PVS:1; - u32 PEHS:1; - u32 PEVS:1; - u32 CLKSEL:2; - u32 NVCK:1; - u32 SLCK2:1; - u32 VCKSEL:2; - u32 VHP:1; - u32 _PAD1:27; -REG_END - -REG64_(GSReg, SMODE2) - u32 INT:1; - u32 FFMD:1; - u32 DPMS:2; - u32 _PAD2:28; - u32 _PAD3:32; -REG_END - -REG64_(GSReg, SIGBLID) - u32 SIGID; - u32 LBLID; -REG_END - -#define PMODE ((GSRegPMODE*)(g_pBasePS2Mem+0x0000)) -#define SMODE1 ((GSRegSMODE1*)(g_pBasePS2Mem+0x0010)) -#define SMODE2 ((GSRegSMODE2*)(g_pBasePS2Mem+0x0020)) -// SRFSH -#define SYNCH1 ((GSRegSYNCH1*)(g_pBasePS2Mem+0x0040)) -#define SYNCH2 ((GSRegSYNCH2*)(g_pBasePS2Mem+0x0050)) -#define SYNCV ((GSRegSYNCV*)(g_pBasePS2Mem+0x0060)) -#define DISPFB1 ((GSRegDISPFB*)(g_pBasePS2Mem+0x0070)) -#define DISPLAY1 ((GSRegDISPLAY*)(g_pBasePS2Mem+0x0080)) -#define DISPFB2 ((GSRegDISPFB*)(g_pBasePS2Mem+0x0090)) -#define DISPLAY2 ((GSRegDISPLAY*)(g_pBasePS2Mem+0x00a0)) -#define EXTBUF ((GSRegEXTBUF*)(g_pBasePS2Mem+0x00b0)) -#define EXTDATA ((GSRegEXTDATA*)(g_pBasePS2Mem+0x00c0)) -#define EXTWRITE ((GSRegEXTWRITE*)(g_pBasePS2Mem+0x00d0)) -#define BGCOLOR ((GSRegBGCOLOR*)(g_pBasePS2Mem+0x00e0)) -#define CSR ((GSRegCSR*)(g_pBasePS2Mem+0x1000)) -#define IMR ((GSRegIMR*)(g_pBasePS2Mem+0x1010)) -#define BUSDIR ((GSRegBUSDIR*)(g_pBasePS2Mem+0x1040)) -#define SIGLBLID ((GSRegSIGBLID*)(g_pBasePS2Mem+0x1080)) - -// -// sps2tags.h -// -#define GET_GIF_REG(tag, reg) \ - (((tag).ai32[2 + ((reg) >> 3)] >> (((reg) & 7) << 2)) & 0xf) - -#define GET_GSFPS (((SMODE1->CMOD&1) ? 50 : 60) / (SMODE2->INT ? 1 : 2)) - -extern void WriteTempRegs(); -extern void SetFrameSkip(bool skip); -extern void ResetRegs(); - -extern void SetTexFlush(); -extern void SetFogColor(u32 fog); -extern void SetFogColor(GIFRegFOGCOL* fog); -extern bool CheckChangeInClut(u32 highdword, u32 psm); // returns true if clut will change after this tex0 op - -// flush current vertices, call before setting new registers (the main render method) -void Flush(int context); -void FlushBoth(); - -// called on a primitive switch -void Prim(); - -#endif - -#endif // NEWREGS_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/Profile.cpp b/plugins/zzogl-pg-cg/opengl/Profile.cpp deleted file mode 100644 index 9e1bd81c34..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Profile.cpp +++ /dev/null @@ -1,266 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - - -//////////////////// -// Small profiler // -//////////////////// -#include -#include -#include -#include "Profile.h" -#include "Util.h" - -using namespace std; - -#define GET_PROFILE_TIME() GetCPUTicks() - -#if !defined(ZEROGS_DEVBUILD) -#define g_bWriteProfile 0 -#else -bool g_bWriteProfile = 0; -#endif - -u64 luPerfFreq; - -struct DVPROFSTRUCT; - -struct DVPROFSTRUCT -{ - - struct DATA - { - DATA(u64 time, u32 user = 0) : dwTime(time), dwUserData(user) {} - - DATA() : dwTime(0), dwUserData(0) {} - - u64 dwTime; - u32 dwUserData; - }; - - ~DVPROFSTRUCT() - { - list::iterator it = listpChild.begin(); - - while (it != listpChild.end()) - { - safe_delete(*it); - ++it; - } - } - - list listTimes; // before DVProfEnd is called, contains the global time it started - // after DVProfEnd is called, contains the time it lasted - // the list contains all the tracked times - char pname[256]; - - list listpChild; // other profilers called during this profiler period -}; - -struct DVPROFTRACK -{ - u32 dwUserData; - DVPROFSTRUCT::DATA* pdwTime; - DVPROFSTRUCT* pprof; -}; - -list g_listCurTracking; // the current profiling functions, the back element is the -// one that will first get popped off the list when DVProfEnd is called -// the pointer is an element in DVPROFSTRUCT::listTimes -list g_listProfilers; // the current profilers, note that these are the parents -// any profiler started during the time of another is held in -// DVPROFSTRUCT::listpChild -list g_listAllProfilers; // ignores the hierarchy, pointer to elements in g_listProfilers - -void DVProfRegister(char* pname) -{ - if (!g_bWriteProfile) return; - - list::iterator it = g_listAllProfilers.begin(); - -// while(it != g_listAllProfilers.end() ) { -// -// if( _tcscmp(pname, (*it)->pname) == 0 ) { -// (*it)->listTimes.push_back(timeGetTime()); -// DVPROFTRACK dvtrack; -// dvtrack.pdwTime = &(*it)->listTimes.back(); -// dvtrack.pprof = *it; -// g_listCurTracking.push_back(dvtrack); -// return; -// } -// -// ++it; -// } - - // else add in a new profiler to the appropriate parent profiler - DVPROFSTRUCT* pprof = NULL; - - if (g_listCurTracking.size() > 0) - { - assert(g_listCurTracking.back().pprof != NULL); - g_listCurTracking.back().pprof->listpChild.push_back(new DVPROFSTRUCT()); - pprof = g_listCurTracking.back().pprof->listpChild.back(); - } - else - { - g_listProfilers.push_back(DVPROFSTRUCT()); - pprof = &g_listProfilers.back(); - } - - strncpy(pprof->pname, pname, 256); - - // setup the profiler for tracking - pprof->listTimes.push_back(DVPROFSTRUCT::DATA(GET_PROFILE_TIME())); - - DVPROFTRACK dvtrack; - dvtrack.pdwTime = &pprof->listTimes.back(); - dvtrack.pprof = pprof; - dvtrack.dwUserData = 0; - - g_listCurTracking.push_back(dvtrack); - - // add to all profiler list - g_listAllProfilers.push_back(pprof); -} - -void DVProfEnd(u32 dwUserData) -{ - if (!g_bWriteProfile) - return; - - B_RETURN(g_listCurTracking.size() > 0); - - DVPROFTRACK dvtrack = g_listCurTracking.back(); - - assert(dvtrack.pdwTime != NULL && dvtrack.pprof != NULL); - - dvtrack.pdwTime->dwTime = 1000000 * (GET_PROFILE_TIME() - dvtrack.pdwTime->dwTime) / luPerfFreq; - - dvtrack.pdwTime->dwUserData = dwUserData; - - g_listCurTracking.pop_back(); -} - -struct DVTIMEINFO -{ - DVTIMEINFO() : uInclusive(0), uExclusive(0) {} - - u64 uInclusive, uExclusive; -}; - -map mapAggregateTimes; - -u64 DVProfWriteStruct(FILE* f, DVPROFSTRUCT* p, int ident) -{ - fprintf(f, "%*s%s - ", ident, "", p->pname); - - list::iterator ittime = p->listTimes.begin(); - - u64 utime = 0; - - while (ittime != p->listTimes.end()) - { - utime += (u32)ittime->dwTime; - - if (ittime->dwUserData) - fprintf(f, "time: %d, user: 0x%8.8x", (u32)ittime->dwTime, ittime->dwUserData); - else - fprintf(f, "time: %d", (u32)ittime->dwTime); - - ++ittime; - } - - mapAggregateTimes[p->pname].uInclusive += utime; - - fprintf(f, "\n"); - - list::iterator itprof = p->listpChild.begin(); - - u32 uex = utime; - - while (itprof != p->listpChild.end()) - { - - uex -= (u32)DVProfWriteStruct(f, *itprof, ident + 4); - ++itprof; - } - - mapAggregateTimes[p->pname].uExclusive += uex; - - return utime; -} - -void DVProfWrite(char* pfilename, u32 frames) -{ - assert(pfilename != NULL); - FILE* f = fopen(pfilename, "wb"); - - mapAggregateTimes.clear(); - list::iterator it = g_listProfilers.begin(); - - while (it != g_listProfilers.end()) - { - DVProfWriteStruct(f, &(*it), 0); - ++it; - } - - { - map::iterator it; - fprintf(f, "\n\n-------------------------------------------------------------------\n\n"); - - u64 uTotal[2] = {0}; - double fiTotalTime[2]; - - for (it = mapAggregateTimes.begin(); it != mapAggregateTimes.end(); ++it) - { - uTotal[0] += it->second.uExclusive; - uTotal[1] += it->second.uInclusive; - } - - fprintf(f, "total times (%d): ex: %Lu ", frames, uTotal[0] / frames); - - fprintf(f, "inc: %Lu\n", uTotal[1] / frames); - - fiTotalTime[0] = 1.0 / (double)uTotal[0]; - fiTotalTime[1] = 1.0 / (double)uTotal[1]; - - // output the combined times - - for (it = mapAggregateTimes.begin(); it != mapAggregateTimes.end(); ++it) - { - fprintf(f, "%s - ex: %f inc: %f\n", it->first.c_str(), (double)it->second.uExclusive * fiTotalTime[0], - (double)it->second.uInclusive * fiTotalTime[1]); - } - } - - - fclose(f); -} - -void DVProfClear() -{ - g_listCurTracking.clear(); - g_listProfilers.clear(); - g_listAllProfilers.clear(); -} - -void InitProfile() -{ - luPerfFreq = GetCPUTicks(); -} diff --git a/plugins/zzogl-pg-cg/opengl/Profile.h b/plugins/zzogl-pg-cg/opengl/Profile.h deleted file mode 100644 index 9573629a9c..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Profile.h +++ /dev/null @@ -1,172 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef PROFILE_H_INCLUDED -#define PROFILE_H_INCLUDED - -#include "Util.h" - -#if !defined(ZEROGS_DEVBUILD) -#define g_bWriteProfile 0 -#else -extern bool g_bWriteProfile; -#endif - -extern u64 luPerfFreq; - - -// Copied from Utilities; remove later. -#ifdef __linux__ - -#include -#include // ftime(), struct timeb - -inline unsigned long timeGetTime() -{ - timeb t; - ftime(&t); - - return (unsigned long)(t.time*1000 + t.millitm); -} - -inline unsigned long timeGetPreciseTime() -{ - timespec t; - clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &t); - - return t.tv_nsec; -} - -static __forceinline void InitCPUTicks() -{ -} - -static __forceinline u64 GetTickFrequency() -{ - return 1000000; // unix measures in microseconds -} - -static __forceinline u64 GetCPUTicks() -{ - - struct timeval t; - gettimeofday(&t, NULL); - return ((u64)t.tv_sec*GetTickFrequency()) + t.tv_usec; -} - -#else -static __aligned16 LARGE_INTEGER lfreq; - -inline unsigned long timeGetPreciseTime() -{ - // Implement later. - return 0; -} - -static __forceinline void InitCPUTicks() -{ - QueryPerformanceFrequency(&lfreq); -} - -static __forceinline u64 GetTickFrequency() -{ - return lfreq.QuadPart; -} - -static __forceinline u64 GetCPUTicks() -{ - LARGE_INTEGER count; - QueryPerformanceCounter(&count); - return count.QuadPart; -} - -#endif - -// IMPORTANT: For every Register there must be an End -void DVProfRegister(char* pname); // first checks if this profiler exists in g_listProfilers -void DVProfEnd(u32 dwUserData); -void DVProfWrite(char* pfilename, u32 frames = 0); -void DVProfClear(); // clears all the profilers - -#define DVPROFILE -#ifdef DVPROFILE - -class DVProfileFunc -{ - public: - u32 dwUserData; - DVProfileFunc(char* pname) { DVProfRegister(pname); dwUserData = 0; } - DVProfileFunc(char* pname, u32 dwUserData) : dwUserData(dwUserData) { DVProfRegister(pname); } - ~DVProfileFunc() { DVProfEnd(dwUserData); } -}; - -#else - -class DVProfileFunc -{ - - public: - u32 dwUserData; - static __forceinline DVProfileFunc(char* pname) {} - static __forceinline DVProfileFunc(char* pname, u32 dwUserData) { } - ~DVProfileFunc() {} -}; - -#endif - - -template -class CInterfacePtr -{ - - public: - inline CInterfacePtr() : ptr(NULL) {} - inline explicit CInterfacePtr(T* newptr) : ptr(newptr) { if (ptr != NULL) ptr->AddRef(); } - inline ~CInterfacePtr() { if (ptr != NULL) ptr->Release(); } - inline T* operator*() { assert(ptr != NULL); return *ptr; } - inline T* operator->() { return ptr; } - inline T* get() { return ptr; } - - inline void release() - { - if (ptr != NULL) { ptr->Release(); ptr = NULL; } - } - - inline operator T*() { return ptr; } - inline bool operator==(T* rhs) { return ptr == rhs; } - inline bool operator!=(T* rhs) { return ptr != rhs; } - - inline CInterfacePtr& operator= (T* newptr) - { - if (ptr != NULL) ptr->Release(); - - ptr = newptr; - - if (ptr != NULL) ptr->AddRef(); - - return *this; - } - - private: - T* ptr; -}; - -extern void InitProfile(); - -#endif // PROFILE_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/README.txt b/plugins/zzogl-pg-cg/opengl/README.txt deleted file mode 100644 index 447dfdf204..0000000000 --- a/plugins/zzogl-pg-cg/opengl/README.txt +++ /dev/null @@ -1,13 +0,0 @@ -ZeroGS OpenGL -------------- -author: zerofrog (@gmail.com) - -ZeroGS heavily uses GPU shaders. All the shaders are written in nVidia's Cg language and can be found in ps2hw.fx. - -'Dev' versions of ZeroGS directly read ps2hw.fx -'Release' versions of ZeroGS read a precompiled version of ps2hw.fx from ps2hw.dat. In order to build ps2hw.dat, compile ZeroGSShaders and execute: - -./ZeroGSShaders ps2hw.fx ps2hw.dat - -For Windows users, once ZeroGSShaders is built, run buildshaders.bat directly. It will update all necessary resource files. -Note that ZeroGSShaders has only been tested in Windows so far, but the Windows ps2hw.dat can be used in linux builds. \ No newline at end of file diff --git a/plugins/zzogl-pg-cg/opengl/Regs.cpp b/plugins/zzogl-pg-cg/opengl/Regs.cpp deleted file mode 100644 index a033e7a641..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Regs.cpp +++ /dev/null @@ -1,1080 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" -#include "Mem.h" -#include "Regs.h" -#include "PS2Etypes.h" - -#include "targets.h" -#include "ZZoglVB.h" -#include "ZZoglDrawing.h" - -#ifdef USE_OLD_REGS - -#ifdef _MSC_VER -#pragma warning(disable:4244) -#endif - -GIFRegHandler g_GIFPackedRegHandlers[16]; -GIFRegHandler g_GIFRegHandlers[256]; -GIFRegHandler g_GIFTempRegHandlers[16] = {0}; - -// values for keeping track of changes -u32 s_uTex1Data[2][2] = {{0, }}; -u32 s_uClampData[2] = {0, }; - -//u32 results[65535] = {0, }; - -// Note that not all the registers are currently handled, even if they write values out. -// For reference, I'm starting a list of unhandled flags here. I'm sure I missed some, -// so feel free to add to this, or remove ones that are handled that I missed. -// Cases where these values are set would be useful, too. -// -// In GIFRegHandlerFOG, I don't see gs.vertexregs.f being used anywhere afterwards. -// GIFRegHandlerTEX1 doesn't look like anything other then mmag and mmin are handled. -// This includes: -// lcm - the lod (level of detail) calculation method. If 0, it's (log2(1/|Q|)< -void __gifCall GIFPackedRegHandlerTEX0(const u32* data) { GIFRegHandlerTEX0(data); } - -template -void __gifCall GIFPackedRegHandlerCLAMP(const u32* data) { GIFRegHandlerCLAMP(data); } - -void __gifCall GIFPackedRegHandlerXYZF3(const u32* data) { GIFRegHandlerXYZF3(data); } -void __gifCall GIFPackedRegHandlerXYZ3(const u32* data) { GIFRegHandlerXYZ3(data); } - -void __gifCall GIFPackedRegHandlerRGBA(const u32* data) -{ - FUNCLOG - GIFPackedRGBA* r = (GIFPackedRGBA*)(data); - gs.rgba = (r->R | (r->G << 8) | (r->B << 16) | (r->A << 24)); - gs.vertexregs.rgba = gs.rgba; - gs.vertexregs.q = gs.q; -} - -void __gifCall GIFPackedRegHandlerSTQ(const u32* data) -{ - FUNCLOG -// GIFPackedSTQ* r = (GIFPackedSTQ*)(data); -// gs.vertexregs.s = r->S; -// gs.vertexregs.t = r->T; -// gs.q = r->Q; - // Despite this code generating a warning, it's correct. float -> float reduction. S and Y are missed mantissas. - *(u32*)&gs.vertexregs.s = data[0] & 0xffffff00; - *(u32*)&gs.vertexregs.t = data[1] & 0xffffff00; - *(u32*)&gs.q = data[2]; -} - -void __gifCall GIFPackedRegHandlerUV(const u32* data) -{ - FUNCLOG - GIFPackedUV* r = (GIFPackedUV*)(data); - - gs.vertexregs.u = r->U; - gs.vertexregs.v = r->V; -} - -void __gifCall GIFPackedRegHandlerXYZF2(const u32* data) -{ - FUNCLOG - GIFPackedXYZF2* r = (GIFPackedXYZF2*)(data); - gs.add_vertex(r->X, r->Y,r->Z, r->F); - - ZZKick->KickVertex(!!(r->ADC)); -} - -void __gifCall GIFPackedRegHandlerXYZ2(const u32* data) -{ - FUNCLOG - GIFPackedXYZ2* r = (GIFPackedXYZ2*)(data); - gs.add_vertex(r->X, r->Y,r->Z); - - ZZKick->KickVertex(!!(r->ADC)); -} - -void __gifCall GIFPackedRegHandlerFOG(const u32* data) -{ - FUNCLOG - GIFPackedFOG* r = (GIFPackedFOG*)(data); - gs.vertexregs.f = r->F; -// gs.vertexregs.f = (data[3] & 0xff0) >> 4; - if (gs.vertexregs.f != 0) REG_LOG("GIFPackedRegHandlerFOG == %d", gs.vertexregs.f); -} - -void __gifCall GIFPackedRegHandlerA_D(const u32* data) -{ - FUNCLOG - - if ((data[2] & 0xff) < 100) - g_GIFRegHandlers[data[2] & 0xff](data); - else - GIFRegHandlerNull(data); -} - -void __gifCall GIFPackedRegHandlerNOP(const u32* data) -{ - FUNCLOG -} - -void __gifCall GIFRegHandlerNull(const u32* data) -{ - FUNCLOG -#ifdef _DEBUG - - if ((((uptr)&data[2])&0xffff) == 0) return; - - // 0x7f happens on a lot of games - if (data[2] != 0x7f && (data[0] || data[1])) - { - ZZLog::Debug_Log("Unexpected reg handler %x %x %x.", data[0], data[1], data[2]); - } - -#endif -} - -void __gifCall GIFRegHandlerPRIM(const u32 *data) -{ - FUNCLOG - - //if (data[0] & ~0x3ff) - //{ - //ZZLog::Warn_Log("Warning: unknown bits in prim %8.8lx_%8.8lx", data[1], data[0]); - //} - - - gs.primC = 0; - u16 prim_type = (data[0]) & 0x7; - prim->prim = prim_type; - gs._prim[0].prim = prim_type; - gs._prim[1].prim = prim_type; - gs._prim[1]._val = (data[0] >> 3) & 0xff; - - gs.new_tri_fan = !(prim_type ^ PRIM_TRIANGLE_FAN); - ZZKick->DirtyValidPrevPrim(); - - Prim(); -} - -void __gifCall GIFRegHandlerRGBAQ(const u32* data) -{ - FUNCLOG - gs.rgba = data[0]; - gs.vertexregs.rgba = data[0]; - *(u32*)&gs.vertexregs.q = data[1]; -} - -void __gifCall GIFRegHandlerST(const u32* data) -{ - FUNCLOG - *(u32*)&gs.vertexregs.s = data[0] & 0xffffff00; - *(u32*)&gs.vertexregs.t = data[1] & 0xffffff00; - //*(u32*)&gs.q = data[2]; -} - -void __gifCall GIFRegHandlerUV(const u32* data) -{ - // Baroque breaks if u&v are 16 bits instead of 14. - FUNCLOG -// gs.vertexregs.u = (data[0]) & 0x3fff; -// gs.vertexregs.v = (data[0] >> 16) & 0x3fff; - GIFRegUV* r = (GIFRegUV*)(data); - gs.vertexregs.u = r->U; - gs.vertexregs.v = r->V; -} - -void __gifCall GIFRegHandlerXYZF2(const u32* data) -{ - FUNCLOG - GIFRegXYZF* r = (GIFRegXYZF*)(data); - gs.add_vertex(r->X, r->Y,r->Z, r->F); - - ZZKick->KickVertex(false); -} - -void __gifCall GIFRegHandlerXYZ2(const u32* data) -{ - FUNCLOG - GIFRegXYZ* r = (GIFRegXYZ*)(data); - gs.add_vertex(r->X, r->Y,r->Z); - - ZZKick->KickVertex(false); -} - -template -void __gifCall GIFRegHandlerTEX0(const u32* data) -{ - FUNCLOG - - if (!NoHighlights(ctxt)) return; - - u32 psm = ZZOglGet_psm_TexBitsFix(data[0]); - - if (m_Blocks[psm].bpp == 0) - { - // kh and others - return; - } - - vb[ctxt].uNextTex0Data[0] = data[0]; - vb[ctxt].uNextTex0Data[1] = data[1]; - vb[ctxt].bNeedTexCheck = 1; - - // don't update unless necessary - - if (PSMT_ISCLUT(psm)) - { - if (CheckChangeInClut(data[1], psm)) - { - // loading clut, so flush whole texture - vb[ctxt].FlushTexData(); - } - - // check if csa is the same!! (ffx bisaid island, grass) - else if ((data[1] & CPSM_CSA_BITMASK) != (vb[ctxt].uCurTex0Data[1] & CPSM_CSA_BITMASK)) - { - Flush(ctxt); // flush any previous entries - } - } -} - -template -void __gifCall GIFRegHandlerCLAMP(const u32* data) -{ - FUNCLOG - - if (!NoHighlights(ctxt)) return; - - clampInfo& clamp = vb[ctxt].clamp; - GIFRegCLAMP* r = (GIFRegCLAMP*)(data); - - if ((s_uClampData[ctxt] != data[0]) || (((clamp.minv >> 8) | (clamp.maxv << 2)) != (data[1]&0x0fff))) - { - Flush(ctxt); - s_uClampData[ctxt] = data[0]; - - clamp.wms = r->WMS; - clamp.wmt = r->WMT; - clamp.minu = r->MINU; - clamp.maxu = r->MAXU; - clamp.minv = r->MINV; - clamp.maxv = r->MAXV; - - vb[ctxt].bTexConstsSync = false; - } -} - -void __gifCall GIFRegHandlerFOG(const u32* data) -{ - FUNCLOG - //gs.gsvertex[gs.primIndex].f = (data[1] >> 24); // shift to upper bits - GIFRegFOG* r = (GIFRegFOG*)(data); - gs.vertexregs.f = r->F; - if (gs.vertexregs.f != 0) REG_LOG("GIFPackedRegHandlerFOG == %d", gs.vertexregs.f); - -} - -void __gifCall GIFRegHandlerXYZF3(const u32* data) -{ - FUNCLOG - GIFRegXYZF* r = (GIFRegXYZF*)(data); - gs.add_vertex(r->X, r->Y,r->Z, r->F); - - ZZKick->KickVertex(true); -} - -void __gifCall GIFRegHandlerXYZ3(const u32* data) -{ - FUNCLOG - GIFRegXYZ* r = (GIFRegXYZ*)(data); - gs.add_vertex(r->X, r->Y,r->Z); - - ZZKick->KickVertex(true); -} - -void __gifCall GIFRegHandlerNOP(const u32* data) -{ - FUNCLOG -} - -template -void __gifCall GIFRegHandlerTEX1(const u32* data) -{ - FUNCLOG - - if (!NoHighlights(ctxt)) return; - - GIFRegTEX1* r = (GIFRegTEX1*)(data); - tex1Info& tex1 = vb[ctxt].tex1; - - if (conf.bilinear == 1 && (tex1.mmag != ((data[0] >> 5) & 0x1) || tex1.mmin != ((data[0] >> 6) & 0x7))) - { - Flush(ctxt); - vb[ctxt].bVarsTexSync = false; - } - - tex1.lcm = r->LCM; - - tex1.mxl = r->MXL; - tex1.mmag = r->MMAG; - tex1.mmin = r->MMIN; - tex1.mtba = r->MTBA; - tex1.l = r->L; - tex1.k = r->K; - -#ifdef SPAM_UNUSED_REGISTERS - REG_LOG("Lcm = %d, l = %d, k = %d", tex1.lcm, tex1.l, tex1.k); - if (tex1.mxl != 0) REG_LOG("MIPMAP level set to %d, which is unsupported."); -#endif -} - -template -void __gifCall GIFRegHandlerTEX2(const u32* data) -{ - FUNCLOG - - tex0Info& tex0 = vb[ctxt].tex0; - - vb[ctxt].FlushTexData(); - - u32 psm = ZZOglGet_psm_TexBitsFix(data[0]); - - u32* s_uTex0Data = vb[ctxt].uCurTex0Data; - - // don't update unless necessary -// if( ZZOglGet_psm_TexBitsFix(*s_uTex0Data) == ZZOglGet_psm_TexBitsFix(data[0]) ) { // psm is the same - if (ZZOglAllExceptClutIsSame(s_uTex0Data, data)) - { - if (!PSMT_ISCLUT(psm)) return; - - // have to write the CLUT again if changed - if (ZZOglClutMinusCLDunchanged(s_uTex0Data, data)) - { - tex0.cld = ZZOglGet_cld_TexBits(data[1]); - - if (tex0.cld != 0) - { - texClutWrite(ctxt); - // invalidate to make sure target didn't change! - vb[ctxt].bVarsTexSync = false; - } - - return; - } - } - - Flush(ctxt); - - vb[ctxt].bVarsTexSync = false; - vb[ctxt].bTexConstsSync = false; - - s_uTex0Data[0] = (s_uTex0Data[0] & ~0x03f00000) | (psm << 20); - s_uTex0Data[1] = (s_uTex0Data[1] & 0x1f) | (data[1] & ~0x1f); - - tex0.psm = ZZOglGet_psm_TexBitsFix(data[0]); - - if (PSMT_ISCLUT(tex0.psm)) CluttingForFlushedTex(&tex0, data[1], ctxt); -} - -template -void __gifCall GIFRegHandlerXYOFFSET(const u32* data) -{ - FUNCLOG - GIFRegXYOFFSET* r = (GIFRegXYOFFSET*)(data); - vb[ctxt].offset.x = r->OFX; - vb[ctxt].offset.y = r->OFY; - -// if( !conf.interlace ) { -// vb[1].offset.x &= ~15; -// vb[1].offset.y &= ~15; -// } -} - -void __gifCall GIFRegHandlerPRMODECONT(const u32* data) -{ - FUNCLOG - gs.prac = data[0] & 0x1; - prim = &gs._prim[gs.prac]; - - Prim(); -} - -void __gifCall GIFRegHandlerPRMODE(const u32* data) -{ - FUNCLOG - gs._prim[0]._val = (data[0] >> 3) & 0xff; - - if (gs.prac == 0) Prim(); -} - -void __gifCall GIFRegHandlerTEXCLUT(const u32* data) -{ - FUNCLOG - // Affects background coloration of initial Mana Khemia dialog. - GIFRegTEXCLUT* r = (GIFRegTEXCLUT*)(data); - - vb[0].FlushTexData(); - vb[1].FlushTexData(); - - gs.clut.cbw = r->CBW << 6; - gs.clut.cou = r->COU << 4; - gs.clut.cov = r->COV; -} - -void __gifCall GIFRegHandlerSCANMSK(const u32* data) -{ - FUNCLOG - GIFRegSCANMSK* r = (GIFRegSCANMSK*)(data); -// FlushBoth(); -// ResolveC(&vb[0]); -// ResolveZ(&vb[0]); - - gs.smask = r->MSK; - REG_LOG("Scanmsk == %d", gs.smask); -} - -template -void __gifCall GIFRegHandlerMIPTBP1(const u32* data) -{ - FUNCLOG - GIFRegMIPTBP1* r = (GIFRegMIPTBP1*)(data); - - miptbpInfo& miptbp0 = vb[ctxt].miptbp0; - miptbp0.tbp[0] = r->TBP1; - miptbp0.tbw[0] = r->TBW1; - miptbp0.tbp[1] = r->TBP2; - miptbp0.tbw[1] = r->TBW2; - miptbp0.tbp[2] = r->TBP3; - miptbp0.tbw[2] = r->TBW3; - -#ifdef SPAM_UNUSED_REGISTERS - if ((miptbp0.tbp[0] != 0) || (miptbp0.tbp[1] != 0) || (miptbp0.tbp[2] != 0)) - { - REG_LOG("MIPTBP1: 0:%d(%d) 1:%d(%d) 2:%d(%d).", \ - miptbp0.tbp[0], miptbp0.tbw[0], miptbp0.tbp[1], miptbp0.tbw[1], miptbp0.tbp[2], miptbp0.tbw[2]); - } -#endif -} - -template -void __gifCall GIFRegHandlerMIPTBP2(const u32* data) -{ - FUNCLOG - GIFRegMIPTBP2* r = (GIFRegMIPTBP2*)(data); - - miptbpInfo& miptbp1 = vb[ctxt].miptbp1; - miptbp1.tbp[0] = r->TBP4; - miptbp1.tbw[0] = r->TBW4; - miptbp1.tbp[1] = r->TBP5; - miptbp1.tbw[1] = r->TBW5; - miptbp1.tbp[2] = r->TBP6; - miptbp1.tbw[2] = r->TBW6; - -#ifdef SPAM_UNUSED_REGISTERS - if ((miptbp1.tbp[0] != 0) || (miptbp1.tbp[1] != 0) || (miptbp1.tbp[2] != 0)) - { - REG_LOG("MIPTBP2: 0:%d(%d) 1:%d(%d) 2:%d(%d).", \ - miptbp1.tbp[0], miptbp1.tbw[0], miptbp1.tbp[1], miptbp1.tbw[1], miptbp1.tbp[2], miptbp1.tbw[2]); - } -#endif -} - -void __gifCall GIFRegHandlerTEXA(const u32* data) -{ - FUNCLOG - texaInfo newinfo; - newinfo.aem = (data[0] >> 15) & 0x1; - newinfo.ta[0] = data[0] & 0xff; - newinfo.ta[1] = data[1] & 0xff; - - if (*(u32*)&newinfo != *(u32*)&gs.texa) - { - FlushBoth(); - - *(u32*)&gs.texa = *(u32*) & newinfo; - - gs.texa.fta[0] = newinfo.ta[0] / 255.0f; - gs.texa.fta[1] = newinfo.ta[1] / 255.0f; - - vb[0].bTexConstsSync = false; - vb[1].bTexConstsSync = false; - } -} - -void __gifCall GIFRegHandlerFOGCOL(const u32* data) -{ - FUNCLOG - GIFRegFOGCOL* r = (GIFRegFOGCOL*)(data); - SetFogColor(r); - gs.fogcol = r->ai32[0]; -} - -void __gifCall GIFRegHandlerTEXFLUSH(const u32* data) -{ - FUNCLOG - SetTexFlush(); -} - -template -void __gifCall GIFRegHandlerSCISSOR(const u32* data) -{ - FUNCLOG - GIFRegSCISSOR* r = (GIFRegSCISSOR*)(data); - - Rect2& scissor = vb[ctxt].scissor; - Rect2 newscissor; - - newscissor.x0 = r->SCAX0 << 3; - newscissor.x1 = r->SCAX1 << 3; - newscissor.y0 = r->SCAY0 << 3; - newscissor.y1 = r->SCAY1 << 3; - - if (newscissor.x1 != scissor.x1 || newscissor.y1 != scissor.y1 || - newscissor.x0 != scissor.x0 || newscissor.y0 != scissor.y0) - { - Flush(ctxt); - scissor = newscissor; - - // flush everything - vb[ctxt].bNeedFrameCheck = 1; - } -} - -template -void __gifCall GIFRegHandlerALPHA(const u32* data) -{ - FUNCLOG - alphaInfo newalpha; - newalpha.abcd = *(u8*)data; - newalpha.fix = *(u8*)(data + 1); - - if (*(u16*)&newalpha != *(u16*)&vb[ctxt].alpha) - { - Flush(ctxt); - - if (newalpha.a == 3) newalpha.a = 0; - if (newalpha.b == 3) newalpha.b = 0; - if (newalpha.c == 3) newalpha.c = 0; - if (newalpha.d == 3) newalpha.d = 0; - - *(u16*)&vb[ctxt].alpha = *(u16*) & newalpha; - } -} - -void __gifCall GIFRegHandlerDIMX(const u32* data) -{ - FUNCLOG - GIFRegDIMX* r = (GIFRegDIMX*)(data); - - gs.dimx.i64 = r->i64; -} - -void __gifCall GIFRegHandlerDTHE(const u32* data) -{ - FUNCLOG - GIFRegDTHE* r = (GIFRegDTHE*)(data); - - gs.dthe = r->DTHE; - if (gs.dthe != 0) REG_LOG("Dithering set. (but not implemented.)"); -} - -void __gifCall GIFRegHandlerCOLCLAMP(const u32* data) -{ - FUNCLOG - GIFRegCOLCLAMP* r = (GIFRegCOLCLAMP*)(data); - - gs.colclamp = r->CLAMP; - - if (gs.colclamp == 0) - REG_LOG("COLCLAMP == MASK"); - else - REG_LOG("COLCLAMP == CLAMP"); -} - -template -void __gifCall GIFRegHandlerTEST(const u32* data) -{ - FUNCLOG - - pixTest* test = &vb[ctxt].test; - - if ((*(u32*)test & 0x0007ffff) == (data[0] & 0x0007ffff)) return; - - Flush(ctxt); - - *(u32*)test = data[0]; - -// test.ate = (data[0] ) & 0x1; -// test.atst = (data[0] >> 1) & 0x7; -// test.aref = (data[0] >> 4) & 0xff; -// test.afail = (data[0] >> 12) & 0x3; -// test.date = (data[0] >> 14) & 0x1; -// test.datm = (data[0] >> 15) & 0x1; -// test.zte = (data[0] >> 16) & 0x1; -// test.ztst = (data[0] >> 17) & 0x3; -} - -void __gifCall GIFRegHandlerPABE(const u32* data) -{ - FUNCLOG - GIFRegPABE* r = (GIFRegPABE*)(data); - //SetAlphaChanged(0, GPUREG_PABE); - //SetAlphaChanged(1, GPUREG_PABE); - FlushBoth(); - - gs.pabe = r->PABE; -} - -template -void __gifCall GIFRegHandlerFBA(const u32* data) -{ - FUNCLOG - GIFRegFBA* r = (GIFRegFBA*)(data); - - FlushBoth(); - - vb[ctxt].fba.fba = r->FBA; -} - -template -void __gifCall GIFRegHandlerFRAME(const u32* data) -{ - FUNCLOG - - frameInfo& gsfb = vb[ctxt].gsfb; - - if ((gsfb.fbp == ZZOglGet_fbp_FrameBitsMult(data[0])) && - (gsfb.fbw == ZZOglGet_fbw_FrameBitsMult(data[0])) && - (gsfb.psm == ZZOglGet_psm_FrameBits(data[0])) && - (gsfb.fbm == ZZOglGet_fbm_FrameBits(data[0]))) - { - return; - } - - FlushBoth(); - - gsfb.fbp = ZZOglGet_fbp_FrameBitsMult(data[0]); - gsfb.fbw = ZZOglGet_fbw_FrameBitsMult(data[0]); - gsfb.psm = ZZOglGet_psm_FrameBits(data[0]); - gsfb.fbm = ZZOglGet_fbm_FrameBitsFix(data[0], data[1]); - gsfb.fbh = ZZOglGet_fbh_FrameBitsCalc(data[0]); -// gsfb.fbhCalc = gsfb.fbh; - - vb[ctxt].bNeedFrameCheck = 1; -} - -template -void __gifCall GIFRegHandlerZBUF(const u32* data) -{ - FUNCLOG - zbufInfo& zbuf = vb[ctxt].zbuf; - - int psm = (0x30 | ((data[0] >> 24) & 0xf)); - - if (zbuf.zbp == (data[0] & 0x1ff) * 32 && - zbuf.psm == psm && - zbuf.zmsk == (data[1] & 0x1)) - { - return; - } - - // error detection - if (m_Blocks[psm].bpp == 0) return; - - FlushBoth(); - - zbuf.zbp = (data[0] & 0x1ff) * 32; - zbuf.psm = 0x30 | ((data[0] >> 24) & 0xf); - zbuf.zmsk = data[1] & 0x1; - - vb[ctxt].bNeedZCheck = 1; - vb[ctxt].zprimmask = 0xffffffff; - - if (zbuf.psm > 0x31) vb[ctxt].zprimmask = 0xffff; -} - -void __gifCall GIFRegHandlerBITBLTBUF(const u32* data) -{ - FUNCLOG - GIFRegBITBLTBUF* r = (GIFRegBITBLTBUF*)(data); - - gs.srcbufnew.bp = r->SBP; - gs.srcbufnew.bw = r->SBW << 6; - gs.srcbufnew.psm = r->SPSM; - gs.dstbufnew.bp = r->DBP; - gs.dstbufnew.bw = r->DBW << 6; - gs.dstbufnew.psm = r->DPSM; - - if (gs.dstbufnew.bw == 0) gs.dstbufnew.bw = 64; -} - -void __gifCall GIFRegHandlerTRXPOS(const u32* data) -{ - FUNCLOG - GIFRegTRXPOS* r = (GIFRegTRXPOS*)(data); - - gs.trxposnew.sx = r->SSAX; - gs.trxposnew.sy = r->SSAY; - gs.trxposnew.dx = r->DSAX; - gs.trxposnew.dy = r->DSAY; - gs.trxposnew.dirx = r->DIRX; - gs.trxposnew.diry = r->DIRY; -} - -void __gifCall GIFRegHandlerTRXREG(const u32* data) -{ - FUNCLOG - GIFRegTRXREG* r = (GIFRegTRXREG*)(data); - gs.imageWtemp = r->RRW; - gs.imageHtemp = r->RRH; -} - -void __gifCall GIFRegHandlerTRXDIR(const u32* data) -{ - FUNCLOG - // terminate any previous transfers - - switch (gs.imageTransfer) - { - - case 0: // host->loc - TerminateHostLocal(); - break; - - case 1: // loc->host - TerminateLocalHost(); - break; - } - - gs.srcbuf = gs.srcbufnew; - - gs.dstbuf = gs.dstbufnew; - gs.trxpos = gs.trxposnew; - gs.imageTransfer = data[0] & 0x3; - gs.imageWnew = gs.imageWtemp; - gs.imageHnew = gs.imageHtemp; - - if (gs.imageWnew > 0 && gs.imageHnew > 0) - { - switch (gs.imageTransfer) - { - case 0: // host->loc - InitTransferHostLocal(); - break; - - case 1: // loc->host - InitTransferLocalHost(); - break; - - case 2: - TransferLocalLocal(); - break; - - case 3: - gs.imageTransfer = -1; - break; - - default: - assert(0); - } - } - else - { -#if defined(ZEROGS_DEVBUILD) - ZZLog::Warn_Log("Dummy transfer."); -#endif - gs.imageTransfer = -1; - } -} - -void __gifCall GIFRegHandlerHWREG(const u32* data) -{ - FUNCLOG - - if (gs.imageTransfer == 0) - { - TransferHostLocal(data, 2); - } - else - { -#if defined(ZEROGS_DEVBUILD) - ZZLog::Error_Log("ZeroGS: HWREG!? %8.8x_%8.8x", data[0], data[1]); - //assert(0); -#endif - } -} - -extern int g_GSMultiThreaded; - -void __gifCall GIFRegHandlerSIGNAL(const u32* data) -{ - FUNCLOG - - if (!g_GSMultiThreaded) - { - SIGLBLID->SIGID = (SIGLBLID->SIGID & ~data[1]) | (data[0] & data[1]); - -// if (gs.CSRw & 0x1) CSR->SIGNAL = 1; -// if (!IMR->SIGMSK && GSirq) -// GSirq(); - - if (gs.CSRw & 0x1) - { - CSR->SIGNAL = 1; - //gs.CSRw &= ~1; - } - - if (!IMR->SIGMSK && GSirq) GSirq(); - } -} - -void __gifCall GIFRegHandlerFINISH(const u32* data) -{ - FUNCLOG - - if (!g_GSMultiThreaded) - { - if (gs.CSRw & 0x2) CSR->FINISH = 1; - - if (!IMR->FINISHMSK && GSirq) GSirq(); - -// if( gs.CSRw & 2 ) { -// //gs.CSRw &= ~2; -// //CSR->FINISH = 0; -// -// -// } -// CSR->FINISH = 1; -// -// if( !IMR->FINISHMSK && GSirq ) -// GSirq(); - } -} - -void __gifCall GIFRegHandlerLABEL(const u32* data) -{ - FUNCLOG - - if (!g_GSMultiThreaded) - { - SIGLBLID->LBLID = (SIGLBLID->LBLID & ~data[1]) | (data[0] & data[1]); - } -} - - -void SetMultithreaded() -{ - // Some older versions of PCSX2 didn't properly set the irq callback to NULL - // in multithreaded mode (possibly because ZeroGS itself would assert in such - // cases), and didn't bind them to a dummy callback either. PCSX2 handles all - // IRQs internally when multithreaded anyway -- so let's ignore them here: - - if (g_GSMultiThreaded) - { - g_GIFRegHandlers[GIF_A_D_REG_SIGNAL] = &GIFRegHandlerNull; - g_GIFRegHandlers[GIF_A_D_REG_FINISH] = &GIFRegHandlerNull; - g_GIFRegHandlers[GIF_A_D_REG_LABEL] = &GIFRegHandlerNull; - } - else - { - g_GIFRegHandlers[GIF_A_D_REG_SIGNAL] = &GIFRegHandlerSIGNAL; - g_GIFRegHandlers[GIF_A_D_REG_FINISH] = &GIFRegHandlerFINISH; - g_GIFRegHandlers[GIF_A_D_REG_LABEL] = &GIFRegHandlerLABEL; - } -} - -void ResetRegs() -{ - for (int i = 0; i < 16; i++) - { - g_GIFPackedRegHandlers[i] = &GIFPackedRegHandlerNull; - } - - g_GIFPackedRegHandlers[GIF_REG_PRIM] = &GIFPackedRegHandlerPRIM; - g_GIFPackedRegHandlers[GIF_REG_RGBA] = &GIFPackedRegHandlerRGBA; - g_GIFPackedRegHandlers[GIF_REG_STQ] = &GIFPackedRegHandlerSTQ; - g_GIFPackedRegHandlers[GIF_REG_UV] = &GIFPackedRegHandlerUV; - g_GIFPackedRegHandlers[GIF_REG_XYZF2] = &GIFPackedRegHandlerXYZF2; - g_GIFPackedRegHandlers[GIF_REG_XYZ2] = &GIFPackedRegHandlerXYZ2; - g_GIFPackedRegHandlers[GIF_REG_TEX0_1] = &GIFPackedRegHandlerTEX0<0>; - g_GIFPackedRegHandlers[GIF_REG_TEX0_2] = &GIFPackedRegHandlerTEX0<1>; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_1] = &GIFPackedRegHandlerCLAMP<0>; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_2] = &GIFPackedRegHandlerCLAMP<1>; - g_GIFPackedRegHandlers[GIF_REG_FOG] = &GIFPackedRegHandlerFOG; - g_GIFPackedRegHandlers[GIF_REG_XYZF3] = &GIFPackedRegHandlerXYZF3; - g_GIFPackedRegHandlers[GIF_REG_XYZ3] = &GIFPackedRegHandlerXYZ3; - g_GIFPackedRegHandlers[GIF_REG_A_D] = &GIFPackedRegHandlerA_D; - g_GIFPackedRegHandlers[GIF_REG_NOP] = &GIFPackedRegHandlerNOP; - - for (int i = 0; i < 256; i++) - { - g_GIFRegHandlers[i] = &GIFPackedRegHandlerNull; - } - - g_GIFRegHandlers[GIF_A_D_REG_PRIM] = &GIFRegHandlerPRIM; - g_GIFRegHandlers[GIF_A_D_REG_RGBAQ] = &GIFRegHandlerRGBAQ; - g_GIFRegHandlers[GIF_A_D_REG_ST] = &GIFRegHandlerST; - g_GIFRegHandlers[GIF_A_D_REG_UV] = &GIFRegHandlerUV; - g_GIFRegHandlers[GIF_A_D_REG_XYZF2] = &GIFRegHandlerXYZF2; - g_GIFRegHandlers[GIF_A_D_REG_XYZ2] = &GIFRegHandlerXYZ2; - g_GIFRegHandlers[GIF_A_D_REG_TEX0_1] = &GIFRegHandlerTEX0<0>; - g_GIFRegHandlers[GIF_A_D_REG_TEX0_2] = &GIFRegHandlerTEX0<1>; - g_GIFRegHandlers[GIF_A_D_REG_CLAMP_1] = &GIFRegHandlerCLAMP<0>; - g_GIFRegHandlers[GIF_A_D_REG_CLAMP_2] = &GIFRegHandlerCLAMP<1>; - g_GIFRegHandlers[GIF_A_D_REG_FOG] = &GIFRegHandlerFOG; - g_GIFRegHandlers[GIF_A_D_REG_XYZF3] = &GIFRegHandlerXYZF3; - g_GIFRegHandlers[GIF_A_D_REG_XYZ3] = &GIFRegHandlerXYZ3; - g_GIFRegHandlers[GIF_A_D_REG_NOP] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_TEX1_1] = &GIFRegHandlerTEX1<0>; - g_GIFRegHandlers[GIF_A_D_REG_TEX1_2] = &GIFRegHandlerTEX1<1>; - g_GIFRegHandlers[GIF_A_D_REG_TEX2_1] = &GIFRegHandlerTEX2<0>; - g_GIFRegHandlers[GIF_A_D_REG_TEX2_2] = &GIFRegHandlerTEX2<1>; - g_GIFRegHandlers[GIF_A_D_REG_XYOFFSET_1] = &GIFRegHandlerXYOFFSET<0>; - g_GIFRegHandlers[GIF_A_D_REG_XYOFFSET_2] = &GIFRegHandlerXYOFFSET<1>; - g_GIFRegHandlers[GIF_A_D_REG_PRMODECONT] = &GIFRegHandlerPRMODECONT; - g_GIFRegHandlers[GIF_A_D_REG_PRMODE] = &GIFRegHandlerPRMODE; - g_GIFRegHandlers[GIF_A_D_REG_TEXCLUT] = &GIFRegHandlerTEXCLUT; - g_GIFRegHandlers[GIF_A_D_REG_SCANMSK] = &GIFRegHandlerSCANMSK; - g_GIFRegHandlers[GIF_A_D_REG_MIPTBP1_1] = &GIFRegHandlerMIPTBP1<0>; - g_GIFRegHandlers[GIF_A_D_REG_MIPTBP1_2] = &GIFRegHandlerMIPTBP1<1>; - g_GIFRegHandlers[GIF_A_D_REG_MIPTBP2_1] = &GIFRegHandlerMIPTBP2<0>; - g_GIFRegHandlers[GIF_A_D_REG_MIPTBP2_2] = &GIFRegHandlerMIPTBP2<1>; - g_GIFRegHandlers[GIF_A_D_REG_TEXA] = &GIFRegHandlerTEXA; - g_GIFRegHandlers[GIF_A_D_REG_FOGCOL] = &GIFRegHandlerFOGCOL; - g_GIFRegHandlers[GIF_A_D_REG_TEXFLUSH] = &GIFRegHandlerTEXFLUSH; - g_GIFRegHandlers[GIF_A_D_REG_SCISSOR_1] = &GIFRegHandlerSCISSOR<0>; - g_GIFRegHandlers[GIF_A_D_REG_SCISSOR_2] = &GIFRegHandlerSCISSOR<1>; - g_GIFRegHandlers[GIF_A_D_REG_ALPHA_1] = &GIFRegHandlerALPHA<0>; - g_GIFRegHandlers[GIF_A_D_REG_ALPHA_2] = &GIFRegHandlerALPHA<1>; - g_GIFRegHandlers[GIF_A_D_REG_DIMX] = &GIFRegHandlerDIMX; - g_GIFRegHandlers[GIF_A_D_REG_DTHE] = &GIFRegHandlerDTHE; - g_GIFRegHandlers[GIF_A_D_REG_COLCLAMP] = &GIFRegHandlerCOLCLAMP; - g_GIFRegHandlers[GIF_A_D_REG_TEST_1] = &GIFRegHandlerTEST<0>; - g_GIFRegHandlers[GIF_A_D_REG_TEST_2] = &GIFRegHandlerTEST<1>; - g_GIFRegHandlers[GIF_A_D_REG_PABE] = &GIFRegHandlerPABE; - g_GIFRegHandlers[GIF_A_D_REG_FBA_1] = &GIFRegHandlerFBA<0>; - g_GIFRegHandlers[GIF_A_D_REG_FBA_2] = &GIFRegHandlerFBA<1>; - g_GIFRegHandlers[GIF_A_D_REG_FRAME_1] = &GIFRegHandlerFRAME<0>; - g_GIFRegHandlers[GIF_A_D_REG_FRAME_2] = &GIFRegHandlerFRAME<1>; - g_GIFRegHandlers[GIF_A_D_REG_ZBUF_1] = &GIFRegHandlerZBUF<0>; - g_GIFRegHandlers[GIF_A_D_REG_ZBUF_2] = &GIFRegHandlerZBUF<1>; - g_GIFRegHandlers[GIF_A_D_REG_BITBLTBUF] = &GIFRegHandlerBITBLTBUF; - g_GIFRegHandlers[GIF_A_D_REG_TRXPOS] = &GIFRegHandlerTRXPOS; - g_GIFRegHandlers[GIF_A_D_REG_TRXREG] = &GIFRegHandlerTRXREG; - g_GIFRegHandlers[GIF_A_D_REG_TRXDIR] = &GIFRegHandlerTRXDIR; - g_GIFRegHandlers[GIF_A_D_REG_HWREG] = &GIFRegHandlerHWREG; - SetMultithreaded(); -} - -void WriteTempRegs() -{ - memcpy(g_GIFTempRegHandlers, g_GIFPackedRegHandlers, sizeof(g_GIFTempRegHandlers)); -} - -void SetFrameSkip(bool skip) -{ - if (skip) - { - g_GIFPackedRegHandlers[GIF_REG_PRIM] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_RGBA] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_STQ] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_UV] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_XYZF2] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_XYZ2] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_1] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_2] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_FOG] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_XYZF3] = &GIFPackedRegHandlerNOP; - g_GIFPackedRegHandlers[GIF_REG_XYZ3] = &GIFPackedRegHandlerNOP; - - g_GIFRegHandlers[GIF_A_D_REG_PRIM] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_RGBAQ] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_ST] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_UV] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_XYZF2] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_XYZ2] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_XYZF3] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_XYZ3] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_PRMODECONT] = &GIFRegHandlerNOP; - g_GIFRegHandlers[GIF_A_D_REG_PRMODE] = &GIFRegHandlerNOP; - } - else - { - g_GIFPackedRegHandlers[GIF_REG_PRIM] = &GIFPackedRegHandlerPRIM; - g_GIFPackedRegHandlers[GIF_REG_RGBA] = &GIFPackedRegHandlerRGBA; - g_GIFPackedRegHandlers[GIF_REG_STQ] = &GIFPackedRegHandlerSTQ; - g_GIFPackedRegHandlers[GIF_REG_UV] = &GIFPackedRegHandlerUV; - g_GIFPackedRegHandlers[GIF_REG_XYZF2] = &GIFPackedRegHandlerXYZF2; - g_GIFPackedRegHandlers[GIF_REG_XYZ2] = &GIFPackedRegHandlerXYZ2; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_1] = &GIFPackedRegHandlerCLAMP<0>; - g_GIFPackedRegHandlers[GIF_REG_CLAMP_2] = &GIFPackedRegHandlerCLAMP<1>; - g_GIFPackedRegHandlers[GIF_REG_FOG] = &GIFPackedRegHandlerFOG; - g_GIFPackedRegHandlers[GIF_REG_XYZF3] = &GIFPackedRegHandlerXYZF3; - g_GIFPackedRegHandlers[GIF_REG_XYZ3] = &GIFPackedRegHandlerXYZ3; - - g_GIFRegHandlers[GIF_A_D_REG_PRIM] = &GIFRegHandlerPRIM; - g_GIFRegHandlers[GIF_A_D_REG_RGBAQ] = &GIFRegHandlerRGBAQ; - g_GIFRegHandlers[GIF_A_D_REG_ST] = &GIFRegHandlerST; - g_GIFRegHandlers[GIF_A_D_REG_UV] = &GIFRegHandlerUV; - g_GIFRegHandlers[GIF_A_D_REG_XYZF2] = &GIFRegHandlerXYZF2; - g_GIFRegHandlers[GIF_A_D_REG_XYZ2] = &GIFRegHandlerXYZ2; - g_GIFRegHandlers[GIF_A_D_REG_XYZF3] = &GIFRegHandlerXYZF3; - g_GIFRegHandlers[GIF_A_D_REG_XYZ3] = &GIFRegHandlerXYZ3; - g_GIFRegHandlers[GIF_A_D_REG_PRMODECONT] = &GIFRegHandlerPRMODECONT; - g_GIFRegHandlers[GIF_A_D_REG_PRMODE] = &GIFRegHandlerPRMODE; - } -} - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/Regs.h b/plugins/zzogl-pg-cg/opengl/Regs.h deleted file mode 100644 index 59608d3967..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Regs.h +++ /dev/null @@ -1,964 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __GSREGS_H__ -#define __GSREGS_H__ - - -#ifdef USE_OLD_REGS - -enum GIF_REG -{ - GIF_REG_PRIM = 0x00, - GIF_REG_RGBA = 0x01, - GIF_REG_STQ = 0x02, - GIF_REG_UV = 0x03, - GIF_REG_XYZF2 = 0x04, - GIF_REG_XYZ2 = 0x05, - GIF_REG_TEX0_1 = 0x06, - GIF_REG_TEX0_2 = 0x07, - GIF_REG_CLAMP_1 = 0x08, - GIF_REG_CLAMP_2 = 0x09, - GIF_REG_FOG = 0x0a, - GIF_REG_XYZF3 = 0x0c, - GIF_REG_XYZ3 = 0x0d, - GIF_REG_A_D = 0x0e, - GIF_REG_NOP = 0x0f, -}; - -enum GIF_A_D_REG -{ - GIF_A_D_REG_PRIM = 0x00, - GIF_A_D_REG_RGBAQ = 0x01, - GIF_A_D_REG_ST = 0x02, - GIF_A_D_REG_UV = 0x03, - GIF_A_D_REG_XYZF2 = 0x04, - GIF_A_D_REG_XYZ2 = 0x05, - GIF_A_D_REG_TEX0_1 = 0x06, - GIF_A_D_REG_TEX0_2 = 0x07, - GIF_A_D_REG_CLAMP_1 = 0x08, - GIF_A_D_REG_CLAMP_2 = 0x09, - GIF_A_D_REG_FOG = 0x0a, - GIF_A_D_REG_XYZF3 = 0x0c, - GIF_A_D_REG_XYZ3 = 0x0d, - GIF_A_D_REG_NOP = 0x0f, - GIF_A_D_REG_TEX1_1 = 0x14, - GIF_A_D_REG_TEX1_2 = 0x15, - GIF_A_D_REG_TEX2_1 = 0x16, - GIF_A_D_REG_TEX2_2 = 0x17, - GIF_A_D_REG_XYOFFSET_1 = 0x18, - GIF_A_D_REG_XYOFFSET_2 = 0x19, - GIF_A_D_REG_PRMODECONT = 0x1a, - GIF_A_D_REG_PRMODE = 0x1b, - GIF_A_D_REG_TEXCLUT = 0x1c, - GIF_A_D_REG_SCANMSK = 0x22, - GIF_A_D_REG_MIPTBP1_1 = 0x34, - GIF_A_D_REG_MIPTBP1_2 = 0x35, - GIF_A_D_REG_MIPTBP2_1 = 0x36, - GIF_A_D_REG_MIPTBP2_2 = 0x37, - GIF_A_D_REG_TEXA = 0x3b, - GIF_A_D_REG_FOGCOL = 0x3d, - GIF_A_D_REG_TEXFLUSH = 0x3f, - GIF_A_D_REG_SCISSOR_1 = 0x40, - GIF_A_D_REG_SCISSOR_2 = 0x41, - GIF_A_D_REG_ALPHA_1 = 0x42, - GIF_A_D_REG_ALPHA_2 = 0x43, - GIF_A_D_REG_DIMX = 0x44, - GIF_A_D_REG_DTHE = 0x45, - GIF_A_D_REG_COLCLAMP = 0x46, - GIF_A_D_REG_TEST_1 = 0x47, - GIF_A_D_REG_TEST_2 = 0x48, - GIF_A_D_REG_PABE = 0x49, - GIF_A_D_REG_FBA_1 = 0x4a, - GIF_A_D_REG_FBA_2 = 0x4b, - GIF_A_D_REG_FRAME_1 = 0x4c, - GIF_A_D_REG_FRAME_2 = 0x4d, - GIF_A_D_REG_ZBUF_1 = 0x4e, - GIF_A_D_REG_ZBUF_2 = 0x4f, - GIF_A_D_REG_BITBLTBUF = 0x50, - GIF_A_D_REG_TRXPOS = 0x51, - GIF_A_D_REG_TRXREG = 0x52, - GIF_A_D_REG_TRXDIR = 0x53, - GIF_A_D_REG_HWREG = 0x54, - GIF_A_D_REG_SIGNAL = 0x60, - GIF_A_D_REG_FINISH = 0x61, - GIF_A_D_REG_LABEL = 0x62, -}; - -// In case we want to change to/from __fastcall for GIF register handlers: -#define __gifCall __fastcall - -typedef void __gifCall FnType_GIFRegHandler(const u32* data); -typedef FnType_GIFRegHandler* GIFRegHandler; - -extern FnType_GIFRegHandler GIFPackedRegHandlerNull; -extern FnType_GIFRegHandler GIFPackedRegHandlerRGBA; -extern FnType_GIFRegHandler GIFPackedRegHandlerSTQ; -extern FnType_GIFRegHandler GIFPackedRegHandlerUV; -extern FnType_GIFRegHandler GIFPackedRegHandlerXYZF2; -extern FnType_GIFRegHandler GIFPackedRegHandlerXYZ2; -extern FnType_GIFRegHandler GIFPackedRegHandlerFOG; -extern FnType_GIFRegHandler GIFPackedRegHandlerA_D; -extern FnType_GIFRegHandler GIFPackedRegHandlerNOP; -extern FnType_GIFRegHandler GIFPackedRegHandlerPRIM; -extern FnType_GIFRegHandler GIFPackedRegHandlerXYZF3; -extern FnType_GIFRegHandler GIFPackedRegHandlerXYZ3; - -extern FnType_GIFRegHandler GIFRegHandlerNull; -extern FnType_GIFRegHandler GIFRegHandlerPRIM; -extern FnType_GIFRegHandler GIFRegHandlerRGBAQ; -extern FnType_GIFRegHandler GIFRegHandlerST; -extern FnType_GIFRegHandler GIFRegHandlerUV; -extern FnType_GIFRegHandler GIFRegHandlerXYZF2; -extern FnType_GIFRegHandler GIFRegHandlerXYZ2; -extern FnType_GIFRegHandler GIFRegHandlerFOG; -extern FnType_GIFRegHandler GIFRegHandlerXYZF3; -extern FnType_GIFRegHandler GIFRegHandlerXYZ3; -extern FnType_GIFRegHandler GIFRegHandlerNOP; -extern FnType_GIFRegHandler GIFRegHandlerPRMODECONT; -extern FnType_GIFRegHandler GIFRegHandlerPRMODE; -extern FnType_GIFRegHandler GIFRegHandlerTEXCLUT; -extern FnType_GIFRegHandler GIFRegHandlerSCANMSK; -extern FnType_GIFRegHandler GIFRegHandlerTEXA; -extern FnType_GIFRegHandler GIFRegHandlerFOGCOL; -extern FnType_GIFRegHandler GIFRegHandlerTEXFLUSH; -extern FnType_GIFRegHandler GIFRegHandlerDIMX; -extern FnType_GIFRegHandler GIFRegHandlerDTHE; -extern FnType_GIFRegHandler GIFRegHandlerCOLCLAMP; -extern FnType_GIFRegHandler GIFRegHandlerPABE; -extern FnType_GIFRegHandler GIFRegHandlerBITBLTBUF; -extern FnType_GIFRegHandler GIFRegHandlerTRXPOS; -extern FnType_GIFRegHandler GIFRegHandlerTRXREG; -extern FnType_GIFRegHandler GIFRegHandlerTRXDIR; -extern FnType_GIFRegHandler GIFRegHandlerHWREG; -extern FnType_GIFRegHandler GIFRegHandlerSIGNAL; -extern FnType_GIFRegHandler GIFRegHandlerFINISH; -extern FnType_GIFRegHandler GIFRegHandlerLABEL; - -template -extern FnType_GIFRegHandler GIFPackedRegHandlerTEX0; -template -extern FnType_GIFRegHandler GIFPackedRegHandlerCLAMP; -template - -extern FnType_GIFRegHandler GIFRegHandlerTEX0; -template -extern FnType_GIFRegHandler GIFRegHandlerCLAMP; -template -extern FnType_GIFRegHandler GIFRegHandlerTEX1; -template -extern FnType_GIFRegHandler GIFRegHandlerTEX2; -template -extern FnType_GIFRegHandler GIFRegHandlerXYOFFSET; -template -extern FnType_GIFRegHandler GIFRegHandlerMIPTBP1; -template -extern FnType_GIFRegHandler GIFRegHandlerMIPTBP2; -template -extern FnType_GIFRegHandler GIFRegHandlerSCISSOR; -template -extern FnType_GIFRegHandler GIFRegHandlerALPHA; -template -extern FnType_GIFRegHandler GIFRegHandlerTEST; -template -extern FnType_GIFRegHandler GIFRegHandlerFBA; -template -extern FnType_GIFRegHandler GIFRegHandlerFRAME; -template -extern FnType_GIFRegHandler GIFRegHandlerZBUF; - -// GifReg & GifPackedReg structs from GSdx, slightly modified. -enum GS_ATST -{ - ATST_NEVER = 0, - ATST_ALWAYS = 1, - ATST_LESS = 2, - ATST_LEQUAL = 3, - ATST_EQUAL = 4, - ATST_GEQUAL = 5, - ATST_GREATER = 6, - ATST_NOTEQUAL = 7, -}; - -enum GS_AFAIL -{ - AFAIL_KEEP = 0, - AFAIL_FB_ONLY = 1, - AFAIL_ZB_ONLY = 2, - AFAIL_RGB_ONLY = 3, -}; - -// GIFReg - -REG64_(GIFReg, ALPHA) - u32 A:2; - u32 B:2; - u32 C:2; - u32 D:2; - u32 _PAD1:24; - u32 FIX:8; - u32 _PAD2:24; -REG_END2 - // opaque => output will be Cs/As -// __forceinline bool IsOpaque() const {return (A == B || C == 2 && FIX == 0) && D == 0 || (A == 0 && B == D && C == 2 && FIX == 0x80);} -// __forceinline bool IsOpaque(int amin, int amax) const {return (A == B || amax == 0) && D == 0 || A == 0 && B == D && amin == 0x80 && amax == 0x80;} -REG_END2 - -REG64_(GIFReg, BITBLTBUF) - u32 SBP:14; - u32 _PAD1:2; - u32 SBW:6; - u32 _PAD2:2; - u32 SPSM:6; - u32 _PAD3:2; - u32 DBP:14; - u32 _PAD4:2; - u32 DBW:6; - u32 _PAD5:2; - u32 DPSM:6; - u32 _PAD6:2; -REG_END - -REG64_(GIFReg, CLAMP) -union -{ - struct - { - u32 WMS:2; - u32 WMT:2; - u32 MINU:10; - u32 MAXU:10; - u32 _PAD1:8; - u32 _PAD2:2; - u32 MAXV:10; - u32 _PAD3:20; - }; - - struct - { - u64 _PAD4:24; - u64 MINV:10; - u64 _PAD5:30; - }; -}; -REG_END - -REG64_(GIFReg, COLCLAMP) - u32 CLAMP:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, DIMX) - s32 DM00:3; - s32 _PAD00:1; - s32 DM01:3; - s32 _PAD01:1; - s32 DM02:3; - s32 _PAD02:1; - s32 DM03:3; - s32 _PAD03:1; - s32 DM10:3; - s32 _PAD10:1; - s32 DM11:3; - s32 _PAD11:1; - s32 DM12:3; - s32 _PAD12:1; - s32 DM13:3; - s32 _PAD13:1; - s32 DM20:3; - s32 _PAD20:1; - s32 DM21:3; - s32 _PAD21:1; - s32 DM22:3; - s32 _PAD22:1; - s32 DM23:3; - s32 _PAD23:1; - s32 DM30:3; - s32 _PAD30:1; - s32 DM31:3; - s32 _PAD31:1; - s32 DM32:3; - s32 _PAD32:1; - s32 DM33:3; - s32 _PAD33:1; -REG_END - -REG64_(GIFReg, DTHE) - u32 DTHE:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, FBA) - u32 FBA:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, FINISH) - u32 _PAD1:32; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, FOG) - u32 _PAD1:32; - u32 _PAD2:24; - u32 F:8; -REG_END - -REG64_(GIFReg, FOGCOL) - u32 FCR:8; - u32 FCG:8; - u32 FCB:8; - u32 _PAD1:8; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, FRAME) - u32 FBP:9; - u32 _PAD1:7; - u32 FBW:6; - u32 _PAD2:2; - u32 PSM:6; - u32 _PAD3:2; - u32 FBMSK:32; -REG_END2 - u32 Block() const {return FBP << 5;} -REG_END2 - -REG64_(GIFReg, HWREG) - u32 DATA_LOWER:32; - u32 DATA_UPPER:32; -REG_END - -REG64_(GIFReg, LABEL) - u32 ID:32; - u32 IDMSK:32; -REG_END - -REG64_(GIFReg, MIPTBP1) - u64 TBP1:14; - u64 TBW1:6; - u64 TBP2:14; - u64 TBW2:6; - u64 TBP3:14; - u64 TBW3:6; - u64 _PAD:4; -REG_END - -REG64_(GIFReg, MIPTBP2) - u64 TBP4:14; - u64 TBW4:6; - u64 TBP5:14; - u64 TBW5:6; - u64 TBP6:14; - u64 TBW6:6; - u64 _PAD:4; -REG_END - -REG64_(GIFReg, NOP) - u32 _PAD1:32; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, PABE) - u32 PABE:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, PRIM) - u32 PRIM:3; - u32 IIP:1; - u32 TME:1; - u32 FGE:1; - u32 ABE:1; - u32 AA1:1; - u32 FST:1; - u32 CTXT:1; - u32 FIX:1; - u32 _PAD1:21; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, PRMODE) - u32 _PRIM:3; - u32 IIP:1; - u32 TME:1; - u32 FGE:1; - u32 ABE:1; - u32 AA1:1; - u32 FST:1; - u32 CTXT:1; - u32 FIX:1; - u32 _PAD2:21; - u32 _PAD3:32; -REG_END - -REG64_(GIFReg, PRMODECONT) - u32 AC:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, RGBAQ) - u32 R:8; - u32 G:8; - u32 B:8; - u32 A:8; - float Q; -REG_END - -REG64_(GIFReg, SCANMSK) - u32 MSK:2; - u32 _PAD1:30; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, SCISSOR) - u32 SCAX0:11; - u32 _PAD1:5; - u32 SCAX1:11; - u32 _PAD2:5; - u32 SCAY0:11; - u32 _PAD3:5; - u32 SCAY1:11; - u32 _PAD4:5; -REG_END - -REG64_(GIFReg, SIGNAL) - u32 ID:32; - u32 IDMSK:32; -REG_END - -REG64_(GIFReg, ST) - float S; - float T; -REG_END - -REG64_(GIFReg, TEST) - u32 ATE:1; - u32 ATST:3; - u32 AREF:8; - u32 AFAIL:2; - u32 DATE:1; - u32 DATM:1; - u32 ZTE:1; - u32 ZTST:2; - u32 _PAD1:13; - u32 _PAD2:32; -REG_END2 - __forceinline bool DoFirstPass() {return !ATE || ATST != ATST_NEVER;} // not all pixels fail automatically - __forceinline bool DoSecondPass() {return ATE && ATST != ATST_ALWAYS && AFAIL != AFAIL_KEEP;} // pixels may fail, write fb/z - __forceinline bool NoSecondPass() {return ATE && ATST != ATST_ALWAYS && AFAIL == AFAIL_KEEP;} // pixels may fail, no output -REG_END2 - -REG64_(GIFReg, TEX0) -union -{ - struct - { - u32 TBP0:14; - u32 TBW:6; - u32 PSM:6; - u32 TW:4; - u32 _PAD1:2; - u32 _PAD2:2; - u32 TCC:1; - u32 TFX:2; - u32 CBP:14; - u32 CPSM:4; - u32 CSM:1; - u32 CSA:5; - u32 CLD:3; - }; - - struct - { - u64 _PAD3:30; - u64 TH:4; - u64 _PAD4:30; - }; -}; -REG_END2 - __forceinline bool IsRepeating() {return (u32)((u32)1 << TW) > (u32)(TBW << (u32)6);} -REG_END2 - -REG64_(GIFReg, TEX1) - u32 LCM:1; - u32 _PAD1:1; - u32 MXL:3; - u32 MMAG:1; - u32 MMIN:3; - u32 MTBA:1; - u32 _PAD2:9; - u32 L:2; - u32 _PAD3:11; - s32 K:12; // 1:7:4 - u32 _PAD4:20; -REG_END2 - bool IsMinLinear() const {return (MMIN == 1) || (MMIN & 4);} - bool IsMagLinear() const {return MMAG;} -REG_END2 - -REG64_(GIFReg, TEX2) - u32 _PAD1:20; - u32 PSM:6; - u32 _PAD2:6; - u32 _PAD3:5; - u32 CBP:14; - u32 CPSM:4; - u32 CSM:1; - u32 CSA:5; - u32 CLD:3; -REG_END - -REG64_(GIFReg, TEXA) - u32 TA0:8; - u32 _PAD1:7; - u32 AEM:1; - u32 _PAD2:16; - u32 TA1:8; - u32 _PAD3:24; -REG_END - -REG64_(GIFReg, TEXCLUT) - u32 CBW:6; - u32 COU:6; - u32 COV:10; - u32 _PAD1:10; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, TEXFLUSH) - u32 _PAD1:32; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, TRXDIR) - u32 XDIR:2; - u32 _PAD1:30; - u32 _PAD2:32; -REG_END - -REG64_(GIFReg, TRXPOS) - u32 SSAX:11; - u32 _PAD1:5; - u32 SSAY:11; - u32 _PAD2:5; - u32 DSAX:11; - u32 _PAD3:5; - u32 DSAY:11; - u32 DIRY:1; - u32 DIRX:1; - u32 _PAD4:3; -REG_END - -REG64_(GIFReg, TRXREG) - u32 RRW:12; - u32 _PAD1:20; - u32 RRH:12; - u32 _PAD2:20; -REG_END - -// GSState::GIFPackedRegHandlerUV and GSState::GIFRegHandlerUV will make sure that the _PAD1/2 bits are set to zero - -REG64_(GIFReg, UV) - u32 U:14; - u32 _PAD1:2; - u32 V:14; - u32 _PAD2:2; - u32 _PAD3:32; -REG_END - -// GSState::GIFRegHandlerXYOFFSET will make sure that the _PAD1/2 bits are set to zero - -REG64_(GIFReg, XYOFFSET) - u32 OFX; // :16; u32 _PAD1:16; - u32 OFY; // :16; u32 _PAD2:16; -REG_END - -REG64_(GIFReg, XYZ) - u32 X:16; - u32 Y:16; - u32 Z:32; -REG_END - -REG64_(GIFReg, XYZF) - u32 X:16; - u32 Y:16; - u32 Z:24; - u32 F:8; -REG_END - -REG64_(GIFReg, ZBUF) - u32 ZBP:9; - u32 _PAD1:15; - // u32 PSM:4; - // u32 _PAD2:4; - u32 PSM:6; - u32 _PAD2:2; - u32 ZMSK:1; - u32 _PAD3:31; -REG_END2 - u32 Block() const {return ZBP << 5;} -REG_END2 - -REG64_SET(GIFReg) - GIFRegALPHA ALPHA; - GIFRegBITBLTBUF BITBLTBUF; - GIFRegCLAMP CLAMP; - GIFRegCOLCLAMP COLCLAMP; - GIFRegDIMX DIMX; - GIFRegDTHE DTHE; - GIFRegFBA FBA; - GIFRegFINISH FINISH; - GIFRegFOG FOG; - GIFRegFOGCOL FOGCOL; - GIFRegFRAME FRAME; - GIFRegHWREG HWREG; - GIFRegLABEL LABEL; - GIFRegMIPTBP1 MIPTBP1; - GIFRegMIPTBP2 MIPTBP2; - GIFRegNOP NOP; - GIFRegPABE PABE; - GIFRegPRIM PRIM; - GIFRegPRMODE PRMODE; - GIFRegPRMODECONT PRMODECONT; - GIFRegRGBAQ RGBAQ; - GIFRegSCANMSK SCANMSK; - GIFRegSCISSOR SCISSOR; - GIFRegSIGNAL SIGNAL; - GIFRegST ST; - GIFRegTEST TEST; - GIFRegTEX0 TEX0; - GIFRegTEX1 TEX1; - GIFRegTEX2 TEX2; - GIFRegTEXA TEXA; - GIFRegTEXCLUT TEXCLUT; - GIFRegTEXFLUSH TEXFLUSH; - GIFRegTRXDIR TRXDIR; - GIFRegTRXPOS TRXPOS; - GIFRegTRXREG TRXREG; - GIFRegUV UV; - GIFRegXYOFFSET XYOFFSET; - GIFRegXYZ XYZ; - GIFRegXYZF XYZF; - GIFRegZBUF ZBUF; -REG_SET_END - -// GIFPacked - -REG128_(GIFPacked, PRIM) - u32 PRIM:11; - u32 _PAD1:21; - u32 _PAD2:32; - u32 _PAD3:32; - u32 _PAD4:32; -REG_END - -REG128_(GIFPacked, RGBA) - u32 R:8; - u32 _PAD1:24; - u32 G:8; - u32 _PAD2:24; - u32 B:8; - u32 _PAD3:24; - u32 A:8; - u32 _PAD4:24; -REG_END - -REG128_(GIFPacked, STQ) - float S; - float T; - float Q; - u32 _PAD1:32; -REG_END - -REG128_(GIFPacked, UV) - u32 U:14; - u32 _PAD1:18; - u32 V:14; - u32 _PAD2:18; - u32 _PAD3:32; - u32 _PAD4:32; -REG_END - -REG128_(GIFPacked, XYZF2) - u32 X:16; - u32 _PAD1:16; - u32 Y:16; - u32 _PAD2:16; - u32 _PAD3:4; - u32 Z:24; - u32 _PAD4:4; - u32 _PAD5:4; - u32 F:8; - u32 _PAD6:3; - u32 ADC:1; - u32 _PAD7:16; -REG_END - -REG128_(GIFPacked, XYZ2) - u32 X:16; - u32 _PAD1:16; - u32 Y:16; - u32 _PAD2:16; - u32 Z:32; - u32 _PAD3:15; - u32 ADC:1; - u32 _PAD4:16; -REG_END - -REG128_(GIFPacked, FOG) - u32 _PAD1:32; - u32 _PAD2:32; - u32 _PAD3:32; - u32 _PAD4:4; - u32 F:8; - u32 _PAD5:20; -REG_END - -REG128_(GIFPacked, A_D) - u64 DATA:64; - u32 ADDR:8; // enum GIF_A_D_REG - u32 _PAD1:24; - u32 _PAD2:32; -REG_END - -REG128_(GIFPacked, NOP) - u32 _PAD1:32; - u32 _PAD2:32; - u32 _PAD3:32; - u32 _PAD4:32; -REG_END - -REG128_SET(GIFPackedReg) - GIFReg r; - GIFPackedPRIM PRIM; - GIFPackedRGBA RGBA; - GIFPackedSTQ STQ; - GIFPackedUV UV; - GIFPackedXYZF2 XYZF2; - GIFPackedXYZ2 XYZ2; - GIFPackedFOG FOG; - GIFPackedA_D A_D; - GIFPackedNOP NOP; -REG_SET_END - - -REG64_(GSReg, BGCOLOR) - u32 R:8; - u32 G:8; - u32 B:8; - u32 _PAD1:8; - u32 _PAD2:32; -REG_END - -REG64_(GSReg, BUSDIR) - u32 DIR:1; - u32 _PAD1:31; - u32 _PAD2:32; -REG_END - -REG64_(GSReg, CSR) - u32 SIGNAL:1; - u32 FINISH:1; - u32 HSINT:1; - u32 VSINT:1; - u32 EDWINT:1; - u32 ZERO1:1; - u32 ZERO2:1; - u32 _PAD1:1; - u32 FLUSH:1; - u32 RESET:1; - u32 _PAD2:2; - u32 NFIELD:1; - u32 FIELD:1; - u32 FIFO:2; - u32 REV:8; - u32 ID:8; - u32 _PAD3:32; -REG_END - -REG64_(GSReg, DISPFB) // (-1/2) - u32 FBP:9; - u32 FBW:6; - u32 PSM:5; - u32 _PAD:12; - u32 DBX:11; - u32 DBY:11; - u32 _PAD2:10; -REG_END - -REG64_(GSReg, DISPLAY) // (-1/2) - u32 DX:12; - u32 DY:11; - u32 MAGH:4; - u32 MAGV:2; - u32 _PAD:3; - u32 DW:12; - u32 DH:11; - u32 _PAD2:9; -REG_END - -REG64_(GSReg, EXTBUF) - u32 EXBP:14; - u32 EXBW:6; - u32 FBIN:2; - u32 WFFMD:1; - u32 EMODA:2; - u32 EMODC:2; - u32 _PAD1:5; - u32 WDX:11; - u32 WDY:11; - u32 _PAD2:10; -REG_END - -REG64_(GSReg, EXTDATA) - u32 SX:12; - u32 SY:11; - u32 SMPH:4; - u32 SMPV:2; - u32 _PAD1:3; - u32 WW:12; - u32 WH:11; - u32 _PAD2:9; -REG_END - -REG64_(GSReg, EXTWRITE) - u32 WRITE; - u32 _PAD2:32; -REG_END - -REG64_(GSReg, IMR) - u32 _PAD1:8; - u32 SIGMSK:1; - u32 FINISHMSK:1; - u32 HSMSK:1; - u32 VSMSK:1; - u32 EDWMSK:1; - u32 _PAD2:19; - u32 _PAD3:32; -REG_END - -REG64_(GSReg, PMODE) - u32 EN1:1; - u32 EN2:1; - u32 CRTMD:3; - u32 MMOD:1; - u32 AMOD:1; - u32 SLBG:1; - u32 ALP:8; - u32 _PAD:16; - u32 _PAD1:32; -REG_END - -REG64_(GSReg, SIGLBLID) - u32 SIGID:32; - u32 LBLID:32; -REG_END - -REG64_(GSReg, SMODE1) - u32 RC:3; - u32 LC:7; - u32 T1248:2; - u32 SLCK:1; - u32 CMOD:2; - u32 EX:1; - u32 PRST:1; - u32 SINT:1; - u32 XPCK:1; - u32 PCK2:2; - u32 SPML:4; - u32 GCONT:1; - u32 PHS:1; - u32 PVS:1; - u32 PEHS:1; - u32 PEVS:1; - u32 CLKSEL:2; - u32 NVCK:1; - u32 SLCK2:1; - u32 VCKSEL:2; - u32 VHP:1; - u32 _PAD1:27; -REG_END - -REG64_(GSReg, SMODE2) - u32 INT:1; - u32 FFMD:1; - u32 DPMS:2; - u32 _PAD2:28; - u32 _PAD3:32; -REG_END - -REG64_(GSReg, SIGBLID) - u32 SIGID; - u32 LBLID; -REG_END - -#define PMODE ((GSRegPMODE*)(g_pBasePS2Mem+0x0000)) -#define SMODE1 ((GSRegSMODE1*)(g_pBasePS2Mem+0x0010)) -#define SMODE2 ((GSRegSMODE2*)(g_pBasePS2Mem+0x0020)) -// SRFSH -#define SYNCH1 ((GSRegSYNCH1*)(g_pBasePS2Mem+0x0040)) -#define SYNCH2 ((GSRegSYNCH2*)(g_pBasePS2Mem+0x0050)) -#define SYNCV ((GSRegSYNCV*)(g_pBasePS2Mem+0x0060)) -#define DISPFB1 ((GSRegDISPFB*)(g_pBasePS2Mem+0x0070)) -#define DISPLAY1 ((GSRegDISPLAY*)(g_pBasePS2Mem+0x0080)) -#define DISPFB2 ((GSRegDISPFB*)(g_pBasePS2Mem+0x0090)) -#define DISPLAY2 ((GSRegDISPLAY*)(g_pBasePS2Mem+0x00a0)) -#define EXTBUF ((GSRegEXTBUF*)(g_pBasePS2Mem+0x00b0)) -#define EXTDATA ((GSRegEXTDATA*)(g_pBasePS2Mem+0x00c0)) -#define EXTWRITE ((GSRegEXTWRITE*)(g_pBasePS2Mem+0x00d0)) -#define BGCOLOR ((GSRegBGCOLOR*)(g_pBasePS2Mem+0x00e0)) -#define CSR ((GSRegCSR*)(g_pBasePS2Mem+0x1000)) -#define IMR ((GSRegIMR*)(g_pBasePS2Mem+0x1010)) -#define BUSDIR ((GSRegBUSDIR*)(g_pBasePS2Mem+0x1040)) -#define SIGLBLID ((GSRegSIGBLID*)(g_pBasePS2Mem+0x1080)) - -// -// sps2tags.h -// -#define GET_GIF_REG(tag, reg) \ - (((tag).ai32[2 + ((reg) >> 3)] >> (((reg) & 7) << 2)) & 0xf) - -#define GET_GSFPS (((SMODE1->CMOD&1) ? 50 : 60) / (SMODE2->INT ? 1 : 2)) - -extern void WriteTempRegs(); -extern void SetFrameSkip(bool skip); -extern void ResetRegs(); - -extern void SetTexFlush(); -extern void SetFogColor(u32 fog); -extern void SetFogColor(GIFRegFOGCOL* fog); -extern bool CheckChangeInClut(u32 highdword, u32 psm); // returns true if clut will change after this tex0 op - -// flush current vertices, call before setting new registers (the main render method) -void Flush(int context); -void FlushBoth(); - -// called on a primitive switch -void Prim(); - -#else -#include "NewRegs.h" -#endif -#endif diff --git a/plugins/zzogl-pg-cg/opengl/Util.h b/plugins/zzogl-pg-cg/opengl/Util.h deleted file mode 100644 index eb8ad8813f..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Util.h +++ /dev/null @@ -1,278 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef UTIL_H_INCLUDED -#define UTIL_H_INCLUDED - - -#ifdef _WIN32 - -#include -#include "Utilities/RedtapeWindows.h" - -//#include -//#include - -#include -#include -#include "glprocs.h" - -#else // linux basic definitions - -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -#endif - -#define GSdefs - -//Pcsx2Defs is included in Dependencies.h. -#include "Utilities/Dependencies.h" - -#include "CRC.h" -#include "ZZLog.h" - -// need C definitions -- no mangling please! -extern "C" u32 CALLBACK PS2EgetLibType(void); -extern "C" u32 CALLBACK PS2EgetLibVersion2(u32 type); -extern "C" char* CALLBACK PS2EgetLibName(void); - -#include "ZZoglMath.h" -#include "Profile.h" -#include "GSDump.h" - -#include "Utilities/MemcpyFast.h" - -extern wxString s_strIniPath; // Air's new (r2361) new constant for ini file path - -typedef struct -{ - int x, y, w, h; -} Rect; - -typedef struct -{ - int x, y; -} Point; - -typedef struct -{ - int w, h; -} Size; - -typedef struct -{ - int x0, y0; - int x1, y1; -} Rect2; - -typedef struct -{ - int x, y, c; -} PointC; - -enum GSWindowDim -{ - - GSDim_640 = 0, - GSDim_800, - GSDim_1024, - GSDim_1280, -}; - -typedef union -{ - struct - { - u32 fullscreen : 1; - u32 tga_snap : 1; - u32 capture_avi : 1; - u32 widescreen : 1; - u32 wireframe : 1; - u32 loaded : 1; - u32 dimensions : 2; - }; - u32 _u32; - - void ZZOptions(u32 value) { _u32 = value; } -} ZZOptions; - -typedef struct -{ - u8 mrtdepth; // write color in render target - u8 interlace; // intelacing mode 0, 1, 3-off - u8 aa; // antialiasing 0 - off, 1 - 2x, 2 - 4x, 3 - 8x, 4 - 16x - u8 bilinear; // set to enable bilinear support. 0 - off, 1 -- on, 2 -- force (use for textures that usually need it) - ZZOptions zz_options; - gameHacks hacks; // game options -- different hacks. - gameHacks def_hacks;// default game settings - int width, height; // View target size, has no impact towards speed - int x, y; // Lets try for a persistant window position. - bool isWideScreen; // Widescreen support - u32 SkipDraw; - u32 log; - u32 disableHacks; - int dump; - - void incAA() { aa++; if (aa > 4) aa = 0; } - void decAA() { aa--; if (aa > 4) aa = 4; } // u8 is unsigned, so negative value is 255. - - gameHacks settings() - { - if (disableHacks) - { - return hacks; - } - else - { - gameHacks tempHack; - tempHack._u32 = (hacks._u32 | def_hacks._u32); - return tempHack; - } - } - - bool fullscreen() { return !!(zz_options.fullscreen); } - bool wireframe() { return !!(zz_options.wireframe); } - bool widescreen() { return !!(zz_options.widescreen); } - bool captureAvi() { return !!(zz_options.capture_avi); } - bool loaded() { return !!(zz_options.loaded); } - - void setFullscreen(bool flag) - { - zz_options.fullscreen = (flag) ? 1 : 0; - } - - void setWireframe(bool flag) - { - zz_options.wireframe = (flag) ? 1 : 0; - } - - void setCaptureAvi(bool flag) - { - zz_options.capture_avi = (flag) ? 1 : 0; - } - - void setLoaded(bool flag) - { - zz_options.loaded = (flag) ? 1 : 0; - } - void set_dimensions(u32 dim) - { - switch (dim) - { - - case GSDim_640: - width = 640; - height = isWideScreen ? 360 : 480; - break; - - case GSDim_800: - width = 800; - height = isWideScreen ? 450 : 600; - break; - - case GSDim_1024: - width = 1024; - height = isWideScreen ? 576 : 768; - break; - - case GSDim_1280: - width = 1280; - height = isWideScreen ? 720 : 960; - break; - - default: - width = 800; - height = 600; - break; - } - } - -} GSconf; -extern GSconf conf; - -// ----------------------- Defines - -#define REG64(name) \ -union name \ -{ \ - u64 i64; \ - u32 ai32[2]; \ - struct { \ - -#define REG128(name)\ -union name \ -{ \ - u64 ai64[2]; \ - u32 ai32[4]; \ - struct { \ - -#define REG64_(prefix, name) REG64(prefix##name) -#define REG128_(prefix, name) REG128(prefix##name) - -#define REG_END }; }; -#define REG_END2 }; - -#define REG64_SET(name) \ -union name \ -{ \ - u64 i64; \ - u32 ai32[2]; \ - -#define REG128_SET(name)\ -union name \ -{ \ - u64 ai64[2]; \ - u32 ai32[4]; \ - -#define REG_SET_END }; - -#define FORIT(it, v) for(it = (v).begin(); it != (v).end(); ++(it)) - -extern void LoadConfig(); -extern void SaveConfig(); - -extern void (*GSirq)(); - -extern void *SysLoadLibrary(char *lib); // Loads Library -extern void *SysLoadSym(void *lib, char *sym); // Loads Symbol from Library -extern char *SysLibError(); // Gets previous error loading sysbols -extern void SysCloseLibrary(void *lib); // Closes Library -extern void SysMessage(const char *fmt, ...); - -#ifdef ZEROGS_DEVBUILD -extern char* EFFECT_NAME; -extern char* EFFECT_DIR; -extern u32 g_nGenVars, g_nTexVars, g_nAlphaVars, g_nResolve; -extern bool g_bSaveTrans, g_bUpdateEffect, g_bSaveTex, g_bSaveResolved; -#endif - -extern bool g_bDisplayFPS; // should we display FPS on screen? - -#endif // UTIL_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/Win32/Conf.cpp b/plugins/zzogl-pg-cg/opengl/Win32/Conf.cpp deleted file mode 100644 index 38dba5435e..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/Conf.cpp +++ /dev/null @@ -1,115 +0,0 @@ -#include - -#include "GS.h" -#include "Win32.h" -#include "Utilities/Path.h" - -extern HINSTANCE hInst; - - -void SaveConfig() -{ - wxChar szValue[256]; - const wxString iniFile(Path::Combine(s_strIniPath, L"zzogl-pg-cg.ini")); - - wxSprintf(szValue, L"%u", conf.interlace); - WritePrivateProfileString(L"Settings", L"Interlace", szValue, iniFile); - wxSprintf(szValue, L"%u", conf.aa); - WritePrivateProfileString(L"Settings", L"Antialiasing", szValue, iniFile); - wxSprintf(szValue, L"%u", conf.bilinear); - WritePrivateProfileString(L"Settings", L"Bilinear", szValue, iniFile); - wxSprintf(szValue, L"%u", conf.zz_options); - WritePrivateProfileString(L"Settings", L"ZZOptions", szValue, iniFile); - wxSprintf(szValue, L"%u", conf.hacks); - WritePrivateProfileString(L"Settings", L"AdvancedOptions", szValue, iniFile); - wxSprintf(szValue, L"%u", conf.width); - WritePrivateProfileString(L"Settings", L"Width", szValue, iniFile); - wxSprintf(szValue, L"%u", conf.height); - WritePrivateProfileString(L"Settings", L"Height", szValue, iniFile); - wxSprintf(szValue, L"%u", conf.SkipDraw); - WritePrivateProfileString(L"Settings", L"SkipDraw", szValue, iniFile); -} - -void LoadConfig() -{ - wxChar szValue[256]; - const wxString iniFile(Path::Combine(s_strIniPath, L"zzogl-pg-cg.ini")); - - memset(&conf, 0, sizeof(conf)); - conf.interlace = 0; // on, mode 1 - conf.mrtdepth = 1; - conf.zz_options._u32 = 0; - conf.hacks._u32 = 0; - conf.bilinear = 1; - conf.width = 640; - conf.height = 480; - conf.SkipDraw = 0; - conf.disableHacks = 0; - - FILE *fp = wxFopen(iniFile, L"rt"); - - if (!fp) - { - SysMessage("Unable to open ZZOgl-PG's ini file!"); - CreateDirectory(s_strIniPath, NULL); - SaveConfig();//save and return - return ; - } - - fclose(fp); - - GetPrivateProfileString(L"Settings", L"Interlace", NULL, szValue, 20, iniFile); - conf.interlace = (u8)wxStrtoul(szValue, NULL, 10); - GetPrivateProfileString(L"Settings", L"Antialiasing", NULL, szValue, 20, iniFile); - conf.aa = (u8)wxStrtoul(szValue, NULL, 10); - GetPrivateProfileString(L"Settings", L"ZZOptions", NULL, szValue, 20, iniFile); - conf.zz_options._u32 = wxStrtoul(szValue, NULL, 10); - GetPrivateProfileString(L"Settings", L"AdvancedOptions", NULL, szValue, 20, iniFile); - conf.hacks._u32 = wxStrtoul(szValue, NULL, 10); - GetPrivateProfileString(L"Settings", L"Bilinear", NULL, szValue, 20, iniFile); - conf.bilinear = (u8)wxStrtoul(szValue, NULL, 10); - GetPrivateProfileString(L"Settings", L"Width", NULL, szValue, 20, iniFile); - conf.width = wxStrtoul(szValue, NULL, 10); - GetPrivateProfileString(L"Settings", L"Height", NULL, szValue, 20, iniFile); - conf.height = wxStrtoul(szValue, NULL, 10); - GetPrivateProfileString(L"Settings", L"SkipDraw", NULL, szValue, 20, iniFile); - conf.SkipDraw = wxStrtoul(szValue, NULL, 10); - - if (conf.aa < 0 || conf.aa > 4) conf.aa = 0; - - conf.isWideScreen = (conf.widescreen() != 0); - - switch (conf.zz_options.dimensions) - { - case GSDim_640: - conf.width = 640; - conf.height = conf.isWideScreen ? 360 : 480; - break; - - case GSDim_800: - conf.width = 800; - conf.height = conf.isWideScreen ? 450 : 600; - break; - - case GSDim_1024: - conf.width = 1024; - conf.height = conf.isWideScreen ? 576 : 768; - break; - - case GSDim_1280: - conf.width = 1280; - conf.height = conf.isWideScreen ? 720 : 960; - break; - } - - // turn off all hacks by default - conf.setWireframe(false); - conf.setCaptureAvi(false); - conf.setLoaded(true); - - if (conf.width <= 0 || conf.height <= 0) - { - conf.width = 640; - conf.height = 480; - } -} diff --git a/plugins/zzogl-pg-cg/opengl/Win32/Win32.cpp b/plugins/zzogl-pg-cg/opengl/Win32/Win32.cpp deleted file mode 100644 index f7cad522d8..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/Win32.cpp +++ /dev/null @@ -1,325 +0,0 @@ -#include - -#include "Utilities/RedtapeWindows.h" -#include - -#include "resrc1.h" - -#include "GS.h" -#include "ZZoglShaders.h" -#include "Win32.h" - -#include - -using namespace std; - -extern int g_nPixelShaderVer; -static int prevbilinearfilter; -HINSTANCE hInst = NULL; - -void CALLBACK GSkeyEvent(keyEvent *ev) -{ -// switch (ev->event) { -// case KEYPRESS: -// switch (ev->key) { -// case VK_PRIOR: -// if (conf.fps) fpspos++; break; -// case VK_NEXT: -// if (conf.fps) fpspos--; break; -// case VK_END: -// if (conf.fps) fpspress = 1; break; -// case VK_DELETE: -// conf.fps = 1 - conf.fps; -// break; -// } -// break; -// } -} - -#include "Win32/resource.h" - -map mapConfOpts; -#define PUT_CONF(id) mapConfOpts[IDC_CONFOPT_##id] = 0x##id; - -void OnAdvOK(HWND hW) -{ - conf.hacks._u32 = 0; - - for (map::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it) - { - if (IsDlgButtonChecked(hW, it->first)) conf.hacks._u32 |= it->second; - } - - GSsetGameCRC(g_LastCRC, conf.hacks._u32); - - SaveConfig(); - - EndDialog(hW, false); -} - -void OnInitAdvDialog(HWND hW) -{ - mapConfOpts.clear(); - - PUT_CONF(00000001); - PUT_CONF(00000002); - PUT_CONF(00000004); - PUT_CONF(00000008); - PUT_CONF(00000010); - PUT_CONF(00000020); - PUT_CONF(00000040); - PUT_CONF(00000080); - PUT_CONF(00000100); - PUT_CONF(00000200); - PUT_CONF(00000400); - PUT_CONF(00000800); - PUT_CONF(00001000); - PUT_CONF(00002000); - PUT_CONF(00004000); - PUT_CONF(00008000); - PUT_CONF(00010000); - PUT_CONF(00020000); - PUT_CONF(00040000); - PUT_CONF(00080000); - PUT_CONF(00100000); - PUT_CONF(00200000); - PUT_CONF(00800000); - PUT_CONF(01000000); - PUT_CONF(02000000); - PUT_CONF(04000000); - PUT_CONF(10000000); - - for (map::iterator it = mapConfOpts.begin(); it != mapConfOpts.end(); ++it) - { - CheckDlgButton(hW, it->first, (conf.settings()._u32 & it->second) ? 1 : 0); - } -} - -BOOL CALLBACK AdvancedDialogProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch (uMsg) - { - case WM_INITDIALOG: - OnInitAdvDialog(hW); - return true; - - case WM_COMMAND: - - switch (LOWORD(wParam)) - { - case IDCANCEL: - EndDialog(hW, true); - return true; - - case IDOK: - OnAdvOK(hW); - return true; - } - } - - return false; -} - -void CALLBACK AdvancedDialog() -{ - DialogBox(hInst, - MAKEINTRESOURCE(IDD_ADV_OPTIONS), - GetActiveWindow(), - (DLGPROC)AdvancedDialogProc); -} - -void OnInitConfDialog(HWND hW) -{ - if (!(conf.zz_options.loaded)) LoadConfig(); - - TCHAR *aaName[] = {L"None", L"x2", L"x4", L"x8", L"x16"}; - - for(int i=0; i<5; i++) - { - ComboBox_AddString(GetDlgItem(hW, IDC_AA_COMBO), (LPARAM)aaName[i]); - } - ComboBox_SelectString(GetDlgItem(hW, IDC_AA_COMBO), -1, (LPARAM)aaName[conf.aa]); - - TCHAR *sizeName[] = {L"640 x 480", L"800 x 600", L"1024 x 768", L"1280 x 960"}; - - for(int i=0; i<4; i++) - { - ComboBox_AddString(GetDlgItem(hW, IDC_WIN_SIZE_COMBO), (LPARAM)sizeName[i]); - } - ComboBox_SelectString(GetDlgItem(hW, IDC_WIN_SIZE_COMBO), -1, (LPARAM)sizeName[conf.zz_options.dimensions]); - - CheckDlgButton(hW, IDC_CONFIG_INTERLACE, conf.interlace); - CheckDlgButton(hW, IDC_CONFIG_BILINEAR, conf.bilinear); - CheckDlgButton(hW, IDC_CONFIG_DEPTHWRITE, conf.mrtdepth); - CheckDlgButton(hW, IDC_CONFIG_WIREFRAME, (conf.wireframe()) ? 1 : 0); - CheckDlgButton(hW, IDC_CONFIG_CAPTUREAVI, (conf.captureAvi()) ? 1 : 0); - CheckDlgButton(hW, IDC_CONFIG_FULLSCREEN, (conf.fullscreen()) ? 1 : 0); - CheckDlgButton(hW, IDC_CONFIG_WIDESCREEN, (conf.widescreen()) ? 1 : 0); - CheckDlgButton(hW, IDC_CONFIG_BMPSS, (conf.zz_options.tga_snap) ? 1 : 0); - - prevbilinearfilter = conf.bilinear; -} - -void OnConfOK(HWND hW) -{ - u32 newinterlace = IsDlgButtonChecked(hW, IDC_CONFIG_INTERLACE); - - if (!conf.interlace) - conf.interlace = newinterlace; - else if (!newinterlace) - conf.interlace = 2; // off - - conf.bilinear = IsDlgButtonChecked(hW, IDC_CONFIG_BILINEAR); - - // restore - if (conf.bilinear && prevbilinearfilter) conf.bilinear = prevbilinearfilter; - - if (ComboBox_GetCurSel(GetDlgItem(hW, IDC_AA_COMBO)) != -1) - conf.aa = ComboBox_GetCurSel(GetDlgItem(hW, IDC_AA_COMBO)); - - conf.zz_options._u32 = 0; - - conf.zz_options.capture_avi = IsDlgButtonChecked(hW, IDC_CONFIG_CAPTUREAVI) ? 1 : 0; - conf.zz_options.wireframe = IsDlgButtonChecked(hW, IDC_CONFIG_WIREFRAME) ? 1 : 0; - conf.zz_options.fullscreen = IsDlgButtonChecked(hW, IDC_CONFIG_FULLSCREEN) ? 1 : 0; - conf.zz_options.widescreen = IsDlgButtonChecked(hW, IDC_CONFIG_WIDESCREEN) ? 1 : 0; - conf.zz_options.tga_snap = IsDlgButtonChecked(hW, IDC_CONFIG_BMPSS) ? 1 : 0; - - if (ComboBox_GetCurSel(GetDlgItem(hW, IDC_WIN_SIZE_COMBO)) == 0) - conf.zz_options.dimensions = GSDim_640; - else if (ComboBox_GetCurSel(GetDlgItem(hW, IDC_WIN_SIZE_COMBO)) == 1) - conf.zz_options.dimensions = GSDim_800; - else if (ComboBox_GetCurSel(GetDlgItem(hW, IDC_WIN_SIZE_COMBO)) == 2) - conf.zz_options.dimensions = GSDim_1024; - else if (ComboBox_GetCurSel(GetDlgItem(hW, IDC_WIN_SIZE_COMBO)) == 3) - conf.zz_options.dimensions = GSDim_1280; - - SaveConfig(); - - EndDialog(hW, false); -} - -BOOL CALLBACK ConfigureDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch (uMsg) - { - case WM_INITDIALOG: - OnInitConfDialog(hW); - return true; - - case WM_COMMAND: - - switch (LOWORD(wParam)) - { - case IDC_AA_COMBO: - break; - - case IDC_ADV_BTN: - AdvancedDialog(); - return true; - - case IDCANCEL: - EndDialog(hW, true); - return true; - - case IDOK: - OnConfOK(hW); - return true; - } - } - - return false; -} - -void CALLBACK GSconfigure() -{ - DialogBox(hInst, - MAKEINTRESOURCE(IDD_CONFIG2), - GetActiveWindow(), - (DLGPROC)ConfigureDlgProc); - - if (g_nPixelShaderVer == SHADER_REDUCED) conf.bilinear = 0; -} - -s32 CALLBACK GStest() -{ - return 0; -} - -BOOL CALLBACK AboutDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - switch (uMsg) - { - case WM_INITDIALOG: - return true; - - case WM_COMMAND: - switch (LOWORD(wParam)) - { - case IDOK: - EndDialog(hW, false); - return true; - } - } - - return false; -} - -void CALLBACK GSabout() -{ - DialogBox(hInst, - MAKEINTRESOURCE(IDD_ABOUT), - GetActiveWindow(), - (DLGPROC)AboutDlgProc); -} - -bool APIENTRY DllMain(HANDLE hModule, // DLL INIT - DWORD dwReason, - LPVOID lpReserved) -{ - hInst = (HINSTANCE)hModule; - return true; // very quick :) -} - -static char *err = "Error Loading Symbol"; -static int errval; - -void *SysLoadLibrary(char *lib) -{ - return LoadLibrary(wxString::FromUTF8(lib)); -} - -void *SysLoadSym(void *lib, char *sym) -{ - void *tmp = GetProcAddress((HINSTANCE)lib, sym); - - if (tmp == NULL) - errval = 1; - else - errval = 0; - - return tmp; -} - -char *SysLibError() -{ - if (errval) { errval = 0; return err; } - - return NULL; -} - -void SysCloseLibrary(void *lib) -{ - FreeLibrary((HINSTANCE)lib); -} - -void SysMessage(const char *fmt, ...) -{ - va_list list; - char tmp[512]; - - va_start(list, fmt); - vsprintf(tmp, fmt, list); - va_end(list); - MessageBox(0, wxString::FromUTF8(tmp), L"ZZOgl-PG Msg", 0); -} diff --git a/plugins/zzogl-pg-cg/opengl/Win32/Win32.h b/plugins/zzogl-pg-cg/opengl/Win32/Win32.h deleted file mode 100644 index acea999c8b..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/Win32.h +++ /dev/null @@ -1,9 +0,0 @@ -#ifndef __WIN32_H__ -#define __WIN32_H__ - -#include "resrc1.h" -#include "Win32/resource.h" - -BOOL CALLBACK ConfigureDlgProc(HWND hW, UINT uMsg, WPARAM wParam, LPARAM lParam); - -#endif /* __WIN32_H__ */ diff --git a/plugins/zzogl-pg-cg/opengl/Win32/aviUtil.h b/plugins/zzogl-pg-cg/opengl/Win32/aviUtil.h deleted file mode 100644 index 69be284f43..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/aviUtil.h +++ /dev/null @@ -1,488 +0,0 @@ -#ifndef __AVIUTIL_H__ -#define __AVIUTIL_H__ - -#define AVIIF_KEYFRAME 0x00000010L // this frame is a key frame. - -#include -using namespace std; - -#include -#include -#include - -BOOL AVI_Init() -{ - /* first let's make sure we are running on 1.1 */ - WORD wVer = HIWORD(VideoForWindowsVersion()); - if (wVer < 0x010a){ - /* oops, we are too old, blow out of here */ - //MessageBeep(MB_ICONHAND); - MessageBox(NULL, L"Cant't init AVI File - Video for Windows version is to old", L"Error", MB_OK|MB_ICONSTOP); - return FALSE; - } - - AVIFileInit(); - - return TRUE; -} - -BOOL AVI_FileOpenWrite(PAVIFILE * pfile, const char *filename) -{ - HRESULT hr = AVIFileOpen(pfile, // returned file pointer - wxString::FromUTF8(filename), // file name - OF_WRITE | OF_CREATE, // mode to open file with - NULL); // use handler determined - // from file extension.... - if (hr != AVIERR_OK) - return FALSE; - - return TRUE; -} - -DWORD getFOURCC(const char* value) -{ - if(_stricmp(value, "DIB") == 0) - { - return mmioFOURCC(value[0],value[1],value[2],' '); - } - else if((_stricmp(value, "CVID") == 0) - || (_stricmp(value, "IV32") == 0) - || (_stricmp(value, "MSVC") == 0) - || (_stricmp(value, "IV50") == 0)) - { - return mmioFOURCC(value[0],value[1],value[2],value[3]); - } - else - { - return NULL; - } -} - -// Fill in the header for the video stream.... -// The video stream will run in rate ths of a second.... -BOOL AVI_CreateStream(PAVIFILE pfile, PAVISTREAM * ps, int rate, // sample/second - unsigned long buffersize, int rectwidth, int rectheight, - const char* _compressor) -{ - AVISTREAMINFO strhdr; - memset(&strhdr, 0, sizeof(strhdr)); - strhdr.fccType = streamtypeVIDEO;// stream type - strhdr.fccHandler = getFOURCC(_compressor); - //strhdr.fccHandler = 0; // no compression! - //strhdr.fccHandler = mmioFOURCC('D','I','B',' '); // Uncompressed - //strhdr.fccHandler = mmioFOURCC('C','V','I','D'); // Cinpak - //strhdr.fccHandler = mmioFOURCC('I','V','3','2'); // Intel video 3.2 - //strhdr.fccHandler = mmioFOURCC('M','S','V','C'); // Microsoft video 1 - //strhdr.fccHandler = mmioFOURCC('I','V','5','0'); // Intel video 5.0 - //strhdr.dwFlags = AVISTREAMINFO_DISABLED; - //strhdr.dwCaps = - //strhdr.wPriority = - //strhdr.wLanguage = - strhdr.dwScale = 1; - strhdr.dwRate = rate; // rate fps - //strhdr.dwStart = - //strhdr.dwLength = - //strhdr.dwInitialFrames = - strhdr.dwSuggestedBufferSize = buffersize; - strhdr.dwQuality = -1; // use the default - //strhdr.dwSampleSize = - SetRect(&strhdr.rcFrame, 0, 0, // rectangle for stream - (int) rectwidth, - (int) rectheight); - //strhdr.dwEditCount = - //strhdr.dwFormatChangeCount = - //strcpy(strhdr.szName, "Full Frames (Uncompressed)"); - - // And create the stream; - HRESULT hr = AVIFileCreateStream(pfile, // file pointer - ps, // returned stream pointer - &strhdr); // stream header - if (hr != AVIERR_OK) { - return FALSE; - } - - return TRUE; -} - -string getFOURCCVAsString(DWORD value) -{ - string returnValue = ""; - if( value == 0 ) - return returnValue; - - DWORD ch0 = value & 0x000000FF; - returnValue.push_back((char) ch0); - DWORD ch1 = (value & 0x0000FF00)>>8; - returnValue.push_back((char) ch1); - DWORD ch2 = (value & 0x00FF0000)>>16; - returnValue.push_back((char) ch2); - DWORD ch3 = (value & 0xFF000000)>>24; - returnValue.push_back((char) ch3); - - return returnValue; -} - -string dumpAVICOMPRESSOPTIONS(AVICOMPRESSOPTIONS opts) -{ - char tmp[255]; - string returnValue = "Dump of AVICOMPRESSOPTIONS\n"; - - returnValue += "DWORD fccType = streamtype("; returnValue += getFOURCCVAsString(opts.fccType); returnValue += ")\n"; - returnValue += "DWORD fccHandler = "; returnValue += getFOURCCVAsString(opts.fccHandler); returnValue += "\n"; - - _snprintf(tmp, 255, "DWORD dwKeyFrameEvery = %d\n", opts.dwKeyFrameEvery); - returnValue += tmp; - - _snprintf(tmp, 255, "DWORD dwQuality = %d\n", opts.dwQuality); - returnValue += tmp; - - _snprintf(tmp, 255, "DWORD dwBytesPerSecond = %d\n", opts.dwBytesPerSecond); - returnValue += tmp; - - if((opts.dwFlags & AVICOMPRESSF_DATARATE) == AVICOMPRESSF_DATARATE){strcpy(tmp, "DWORD fccType = AVICOMPRESSF_DATARATE\n");} - else if((opts.dwFlags & AVICOMPRESSF_INTERLEAVE) == AVICOMPRESSF_INTERLEAVE){strcpy(tmp, "DWORD fccType = AVICOMPRESSF_INTERLEAVE\n");} - else if((opts.dwFlags & AVICOMPRESSF_KEYFRAMES) == AVICOMPRESSF_KEYFRAMES){strcpy(tmp, "DWORD fccType = AVICOMPRESSF_KEYFRAMES\n");} - else if((opts.dwFlags & AVICOMPRESSF_VALID) == AVICOMPRESSF_VALID){strcpy(tmp, "DWORD fccType = AVICOMPRESSF_VALID\n");} - else {_snprintf(tmp, 255, "DWORD dwFlags = Unknown(%d)\n", opts.dwFlags);} - returnValue += tmp; - - _snprintf(tmp, 255, "LPVOID lpFormat = %d\n", (int)opts.lpFormat); - returnValue += tmp; - - _snprintf(tmp, 255, "DWORD cbFormat = %d\n", opts.cbFormat); - returnValue += tmp; - - _snprintf(tmp, 255, "LPVOID lpParms = %d\n", (int)opts.lpParms); - returnValue += tmp; - - _snprintf(tmp, 255, "DWORD cbParms = %d\n", opts.cbParms); - returnValue += tmp; - - _snprintf(tmp, 255, "DWORD dwInterleaveEvery = %d\n", opts.dwInterleaveEvery); - returnValue += tmp; - - return returnValue; -} - -BOOL AVI_SetOptions(PAVISTREAM * ps, PAVISTREAM * psCompressed, LPBITMAPINFOHEADER lpbi, - const char* _compressor) -{ - - AVICOMPRESSOPTIONS opts; - AVICOMPRESSOPTIONS FAR * aopts[1] = {&opts}; - - memset(&opts, 0, sizeof(opts)); - opts.fccType = streamtypeVIDEO; - opts.fccHandler = getFOURCC(_compressor); - //opts.fccHandler = 0; - //opts.fccHandler = mmioFOURCC('D','I','B',' '); // Uncompressed - //opts.fccHandler = mmioFOURCC('C','V','I','D'); // Cinpak - //opts.fccHandler = mmioFOURCC('I','V','3','2'); // Intel video 3.2 - //opts.fccHandler = mmioFOURCC('M','S','V','C'); // Microsoft video 1 - //opts.fccHandler = mmioFOURCC('I','V','5','0'); // Intel video 5.0 - //opts.dwKeyFrameEvery = 5; - //opts.dwQuality - //opts.dwBytesPerSecond - //opts.dwFlags = AVICOMPRESSF_KEYFRAMES; - //opts.lpFormat - //opts.cbFormat - //opts.lpParms - //opts.cbParms - //opts.dwInterleaveEvery - - /* display the compression options dialog box if specified compressor is unknown */ - if(getFOURCC(_compressor) == NULL) - { - if (!AVISaveOptions(NULL, 0, 1, ps, (LPAVICOMPRESSOPTIONS FAR *) &aopts)) - { - return FALSE; - } - - //printf("%s", dumpAVICOMPRESSOPTIONS(opts)); - //MessageBox(NULL, dumpAVICOMPRESSOPTIONS(opts).c_str(), "AVICOMPRESSOPTIONS", MB_OK); - } - - HRESULT hr = AVIMakeCompressedStream(psCompressed, *ps, &opts, NULL); - if (hr != AVIERR_OK) { - return FALSE; - } - - hr = AVIStreamSetFormat(*psCompressed, 0, - lpbi, // stream format - lpbi->biSize // format size - + lpbi->biClrUsed * sizeof(RGBQUAD) - ); - if (hr != AVIERR_OK) { - return FALSE; - } - - return TRUE; -} - -BOOL AVI_SetText(PAVIFILE pfile, PAVISTREAM psText, char *szText, int width, int height, int TextHeight) -{ - // Fill in the stream header for the text stream.... - AVISTREAMINFO strhdr; - DWORD dwTextFormat; - // The text stream is in 60ths of a second.... - - memset(&strhdr, 0, sizeof(strhdr)); - strhdr.fccType = streamtypeTEXT; - strhdr.fccHandler = mmioFOURCC('D', 'R', 'A', 'W'); - strhdr.dwScale = 1; - strhdr.dwRate = 60; - strhdr.dwSuggestedBufferSize = sizeof(szText); - SetRect(&strhdr.rcFrame, 0, (int) height, - (int) width, (int) height + TextHeight); // #define TEXT_HEIGHT 20 - - // ....and create the stream. - HRESULT hr = AVIFileCreateStream(pfile, &psText, &strhdr); - if (hr != AVIERR_OK) { - return FALSE; - } - - dwTextFormat = sizeof(dwTextFormat); - hr = AVIStreamSetFormat(psText, 0, &dwTextFormat, sizeof(dwTextFormat)); - if (hr != AVIERR_OK) { - return FALSE; - } - - return TRUE; -} - -BOOL AVI_AddFrame(PAVISTREAM psCompressed, int time, LPBITMAPINFOHEADER lpbi) -{ - int ImageSize = lpbi->biSizeImage; - if (ImageSize == 0) - { - if (lpbi->biBitCount == 24) - { - ImageSize = lpbi->biWidth * lpbi->biHeight * 3; - } - } - HRESULT hr = AVIStreamWrite(psCompressed, // stream pointer - time, // time of this frame - 1, // number to write - (LPBYTE) lpbi + // pointer to data - lpbi->biSize + - lpbi->biClrUsed * sizeof(RGBQUAD), - ImageSize, // lpbi->biSizeImage, // size of this frame - AVIIF_KEYFRAME, // flags.... - NULL, - NULL); - if (hr != AVIERR_OK) - { - TCHAR strMsg[255]; - _snwprintf(strMsg, 255, L"Error: AVIStreamWrite, error %d",hr); - MessageBox(NULL, strMsg, L"", MB_OK); - return FALSE; - } - - return TRUE; -} - -BOOL AVI_AddText(PAVISTREAM psText, int time, char *szText) -{ - int iLen = (int)strlen(szText); - - HRESULT hr = AVIStreamWrite(psText, - time, - 1, - szText, - iLen + 1, - AVIIF_KEYFRAME, - NULL, - NULL); - if (hr != AVIERR_OK) - return FALSE; - - return TRUE; -} - -BOOL AVI_CloseStream(PAVISTREAM ps, PAVISTREAM psCompressed, PAVISTREAM psText) -{ - if (ps) - AVIStreamClose(ps); - - if (psCompressed) - AVIStreamClose(psCompressed); - - if (psText) - AVIStreamClose(psText); - - - - return TRUE; -} - -BOOL AVI_CloseFile(PAVIFILE pfile) -{ - if (pfile) - AVIFileClose(pfile); - - return TRUE; -} - -BOOL AVI_Exit() -{ - AVIFileExit(); - - return TRUE; -} - - - - - - - - - - - - - - - - -/* Here are the additional functions we need! */ - - -static PAVIFILE pfile = NULL; -static PAVISTREAM ps = NULL; -static PAVISTREAM psCompressed = NULL; -static int avi_count = 0; - - -// Initialization... -bool START_AVI(const char* file_name) -{ - if(! AVI_Init()) - { - //printf("Error - AVI_Init()\n"); - return false; - } - - if(! AVI_FileOpenWrite(&pfile, file_name)) - { - //printf("Error - AVI_FileOpenWrite()\n"); - return false; - } - - return true; -} - -bool ADD_FRAME_FROM_DIB_TO_AVI(const char* _compressor, int _frameRate, int width, int height, int bits, void* pdata) -{ - if(avi_count == 0) - { - if(! AVI_CreateStream(pfile, &ps, _frameRate, - width*height/bits, - width, - height, _compressor)) - { - //printf("Error - AVI_CreateStream()\n"); - return false; - } - - BITMAPINFOHEADER bi; - memset(&bi, 0, sizeof(bi)); - bi.biSize = sizeof(BITMAPINFOHEADER); - bi.biWidth = width; - bi.biHeight = height; - bi.biPlanes = 1; - bi.biBitCount = bits; - bi.biCompression = BI_RGB; - bi.biSizeImage = width * height * bits /8; - if(! AVI_SetOptions(&ps, &psCompressed, &bi, _compressor)) - { - return false; - } - } - - HRESULT hr = AVIStreamWrite(psCompressed, // stream pointer - avi_count, // time of this frame - 1, // number to write - pdata, - width*height/8, // lpbi->biSizeImage, // size of this frame - AVIIF_KEYFRAME, // flags.... - NULL, - NULL); - if (hr != AVIERR_OK) - { - TCHAR strMsg[255]; - _snwprintf(strMsg, 255, L"Error: AVIStreamWrite, error %d",hr); - MessageBox(NULL, strMsg, L"", MB_OK); - return FALSE; - } - - avi_count++; - return true; -} - -//Now we can add frames -// ie. ADD_FRAME_FROM_DIB_TO_AVI(yourDIB, "CVID", 25); -bool ADD_FRAME_FROM_DIB_TO_AVI(HANDLE dib, const char* _compressor, int _frameRate) -{ - LPBITMAPINFOHEADER lpbi; - if(avi_count == 0) - { - lpbi = (LPBITMAPINFOHEADER)GlobalLock(dib); - if(! AVI_CreateStream(pfile, &ps, _frameRate, - (unsigned long) lpbi->biSizeImage, - (int) lpbi->biWidth, - (int) lpbi->biHeight, _compressor)) - { - //printf("Error - AVI_CreateStream()\n"); - GlobalUnlock(lpbi); - return false; - } - - if(! AVI_SetOptions(&ps, &psCompressed, lpbi, _compressor)) - { - //printf("Error - AVI_SetOptions()\n"); - GlobalUnlock(lpbi); - return false; - } - - GlobalUnlock(lpbi); - } - - lpbi = (LPBITMAPINFOHEADER)GlobalLock(dib); - if(! AVI_AddFrame(psCompressed, avi_count * 1, lpbi)) - { - //printf("Error - AVI_AddFrame()\n"); - GlobalUnlock(lpbi); - return false; - } - - GlobalUnlock(lpbi); - avi_count++; - return true; -} - -// The end... -bool STOP_AVI() -{ - if(! AVI_CloseStream(ps, psCompressed, NULL)) - { - //printf("Error - AVI_CloseStream()\n"); - return false; - } - - if(! AVI_CloseFile(pfile)) - { - //printf("Error - AVI_CloseFile()\n"); - return false; - } - - if(! AVI_Exit()) - { - //printf("Error - AVI_Exit()\n"); - return false; - } - - return true; -} - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/Win32/ps2hw.dat b/plugins/zzogl-pg-cg/opengl/Win32/ps2hw.dat deleted file mode 100644 index 970b7b17e9906e67a7678211bd4e1e1177a01fbb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 108445 zcmZU3XIN8Bv^5F{0)mKuh!7DeN=GTuLXqAf(tDRG(ximYk!Dn+m(WX)-n$5b(h);7 zL_h^X7eWakxrg`O=lk>VgEf2h+B@gWnOSE~COi~mWbeu^kv)5CK=vwk3r%HbiE5|X zOU;vx-g*md%=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QB4wv%R z$qIyZtAw?12c9m$vwU&&kt>9f8f|=?+l1cn^)|2vXbg_ii==~|yaOUP-h}GMF?5Ta zuLCv>a`0y3W4hiZK3l=WIub;afx(0n!A>IGf;?jzDD~S+{;rKWE%bPkpo2Q_A*F&3 zzplhs1sdW7MEfjPRfx4e+^>c0-w9>H2*lu?hQCbuxys_)kMF`8N?0Z$B-43K;nhH> z&G({E!tscx2ncQw6-ryFJd&RuY*?Deh|EG?v@#u`-s#pply&2G*Seh^MDLB>)?lPPkn>ULDslrkeJb0oQC;$>!j;&#=-`D&V%F&rvTUKVQAGQ&=AGYr@g+Tj=fTY_ z`*iBI^aot=a=nnnJ<_7S8Y}U+TFPe~O&Sa@?)3sxJ_BWIzPli$#r z1ek_{(6&0*m zn2RPI^@xm1D{CY8I06R+{Cxs&!;rR|O2bh39<)CYb3u)>;7jOj#E7pmaa`R>t@!ua zp$io+HS@LU=}9B$(KYwdi9+c9rrn{fVq?Q~dRlAY8=B(JNm6cSSR)sPh>V&3BCrxm zt<#nKS|(2w(v;S_+dD*Vl?v9q-msb=XLegVO=~cwi%?F zZz4l{2)rS?!=t!)nJT&=W5Y_ncY8d?)CpbL-Q|KG)8T1Ds=K>m?c>SZrJqcqA9az9 zD}A|>hZ!+mH*EQ~FncN^?z8Nh&&a@s!dCLoGxSzgDMCd9nz?J>EoibZ!#^hXV0QQ5 zp4x11v5ZmNGZKML>d)gMC1;^14g2QP^Fb&1IiSWu?dYGIG54I+1(64kid#)p~v#!Wat*+6mhqs-0#kn31?R+PLp>kL}RZB`DEoWz5;R{M_>OrY3KZ zsW08Js=Q`uw`$)DM{{2{AX!g zCj{vk7k|#nLOyiNzh0k8U%p9HcaJhjG~wY svnrev.h -// -// This file acts as a template for the automatic SVN revision/version tag. -// It is used by the utility SubWCrev.exe to create an "svnrev.h" file for -// whichever project is being compiled (as indicated by command line options -// passed to SubWCRev.exe during the project's pre-build step). -// -// The SubWCRev.exe utility is part of TortoiseSVN and requires several DLLs -// installed by TortoiseSVN, so it will only be available if you have TortoiseSVN -// installed on your system. If you do not have it installed, a generic template -// is used instead (see svnrev_generic.h). Having TortoiseSVN is handy but not -// necessary. If you do not have it installed, everything will still compile -// fine except without the SVN revision tagged to the application/dll version. -// -// TortoiseSVN can be downloaded from http://tortoisesvn.tigris.org - -#define SVN_REV $WCREV$ -#define SVN_MODS $WCMODS?1:0$ diff --git a/plugins/zzogl-pg-cg/opengl/Win32/tsvnrev/svnrev_unknown.h b/plugins/zzogl-pg-cg/opengl/Win32/tsvnrev/svnrev_unknown.h deleted file mode 100644 index 684d5f9240..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/tsvnrev/svnrev_unknown.h +++ /dev/null @@ -1,23 +0,0 @@ -// svnrev_genric.h --> svnrev.h -// -// This file acts as a placebo for people who do not have TortoiseSVN installed. -// It provides "empty" revision information to the Pcsx2 Playground projects in -// the absence of real revisions derived from the repository being built. -// -// This file does not affect application/dll builds in any significant manner, -// other than the lack of automatic revision tags inserted into the app (which -// is very convenient but hardly necessary). -// -// See svn_template.h for more information on how the process of revision -// templating works. -// -// If you would like to enable automatic revisin tagging, TortoiseSVN can be -// downloaded from http://tortoisesvn.tigris.org - -#define SVN_REV_UNKNOWN - -// The following defines are included so that code will still compile even if it -// doesn't check for the SVN_REV_UNKNOWN define. - -#define SVN_REV 0 -#define SVN_MODS "" diff --git a/plugins/zzogl-pg-cg/opengl/Win32/tsvnrev/updateRevision.cmd b/plugins/zzogl-pg-cg/opengl/Win32/tsvnrev/updateRevision.cmd deleted file mode 100644 index 0e192e7a9b..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/tsvnrev/updateRevision.cmd +++ /dev/null @@ -1,8 +0,0 @@ -@echo off -SubWCRev.exe %1 %2\svnrev_template.h %1\svnrev.h -if not ERRORLEVEL 0 ( - echo Automatic revision update unavailable, using generic template instead. - echo You can safely ignore this message - see svnrev.h for details. - copy /Y %3\svnrev_unknown.h %2\svnrev.h -) -set ERRORLEVEL=0 diff --git a/plugins/zzogl-pg-cg/opengl/Win32/wglext.h b/plugins/zzogl-pg-cg/opengl/Win32/wglext.h deleted file mode 100644 index 16c9c70375..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/wglext.h +++ /dev/null @@ -1,813 +0,0 @@ -#ifndef __wglext_h_ -#define __wglext_h_ - -#ifdef __cplusplus -extern "C" { -#endif - -/* -** Copyright (c) 2007 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. -*/ - -#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__) -#define WIN32_LEAN_AND_MEAN 1 -#include -#endif - -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif -#ifndef GLAPI -#define GLAPI extern -#endif - -/*************************************************************/ - -/* Header file version number */ -/* wglext.h last updated 2009/03/03 */ -/* Current version at http://www.opengl.org/registry/ */ -#define WGL_WGLEXT_VERSION 12 - -#ifndef WGL_ARB_buffer_region -#define WGL_FRONT_COLOR_BUFFER_BIT_ARB 0x00000001 -#define WGL_BACK_COLOR_BUFFER_BIT_ARB 0x00000002 -#define WGL_DEPTH_BUFFER_BIT_ARB 0x00000004 -#define WGL_STENCIL_BUFFER_BIT_ARB 0x00000008 -#endif - -#ifndef WGL_ARB_multisample -#define WGL_SAMPLE_BUFFERS_ARB 0x2041 -#define WGL_SAMPLES_ARB 0x2042 -#endif - -#ifndef WGL_ARB_extensions_string -#endif - -#ifndef WGL_ARB_pixel_format -#define WGL_NUMBER_PIXEL_FORMATS_ARB 0x2000 -#define WGL_DRAW_TO_WINDOW_ARB 0x2001 -#define WGL_DRAW_TO_BITMAP_ARB 0x2002 -#define WGL_ACCELERATION_ARB 0x2003 -#define WGL_NEED_PALETTE_ARB 0x2004 -#define WGL_NEED_SYSTEM_PALETTE_ARB 0x2005 -#define WGL_SWAP_LAYER_BUFFERS_ARB 0x2006 -#define WGL_SWAP_METHOD_ARB 0x2007 -#define WGL_NUMBER_OVERLAYS_ARB 0x2008 -#define WGL_NUMBER_UNDERLAYS_ARB 0x2009 -#define WGL_TRANSPARENT_ARB 0x200A -#define WGL_TRANSPARENT_RED_VALUE_ARB 0x2037 -#define WGL_TRANSPARENT_GREEN_VALUE_ARB 0x2038 -#define WGL_TRANSPARENT_BLUE_VALUE_ARB 0x2039 -#define WGL_TRANSPARENT_ALPHA_VALUE_ARB 0x203A -#define WGL_TRANSPARENT_INDEX_VALUE_ARB 0x203B -#define WGL_SHARE_DEPTH_ARB 0x200C -#define WGL_SHARE_STENCIL_ARB 0x200D -#define WGL_SHARE_ACCUM_ARB 0x200E -#define WGL_SUPPORT_GDI_ARB 0x200F -#define WGL_SUPPORT_OPENGL_ARB 0x2010 -#define WGL_DOUBLE_BUFFER_ARB 0x2011 -#define WGL_STEREO_ARB 0x2012 -#define WGL_PIXEL_TYPE_ARB 0x2013 -#define WGL_COLOR_BITS_ARB 0x2014 -#define WGL_RED_BITS_ARB 0x2015 -#define WGL_RED_SHIFT_ARB 0x2016 -#define WGL_GREEN_BITS_ARB 0x2017 -#define WGL_GREEN_SHIFT_ARB 0x2018 -#define WGL_BLUE_BITS_ARB 0x2019 -#define WGL_BLUE_SHIFT_ARB 0x201A -#define WGL_ALPHA_BITS_ARB 0x201B -#define WGL_ALPHA_SHIFT_ARB 0x201C -#define WGL_ACCUM_BITS_ARB 0x201D -#define WGL_ACCUM_RED_BITS_ARB 0x201E -#define WGL_ACCUM_GREEN_BITS_ARB 0x201F -#define WGL_ACCUM_BLUE_BITS_ARB 0x2020 -#define WGL_ACCUM_ALPHA_BITS_ARB 0x2021 -#define WGL_DEPTH_BITS_ARB 0x2022 -#define WGL_STENCIL_BITS_ARB 0x2023 -#define WGL_AUX_BUFFERS_ARB 0x2024 -#define WGL_NO_ACCELERATION_ARB 0x2025 -#define WGL_GENERIC_ACCELERATION_ARB 0x2026 -#define WGL_FULL_ACCELERATION_ARB 0x2027 -#define WGL_SWAP_EXCHANGE_ARB 0x2028 -#define WGL_SWAP_COPY_ARB 0x2029 -#define WGL_SWAP_UNDEFINED_ARB 0x202A -#define WGL_TYPE_RGBA_ARB 0x202B -#define WGL_TYPE_COLORINDEX_ARB 0x202C -#endif - -#ifndef WGL_ARB_make_current_read -#define ERROR_INVALID_PIXEL_TYPE_ARB 0x2043 -#define ERROR_INCOMPATIBLE_DEVICE_CONTEXTS_ARB 0x2054 -#endif - -#ifndef WGL_ARB_pbuffer -#define WGL_DRAW_TO_PBUFFER_ARB 0x202D -#define WGL_MAX_PBUFFER_PIXELS_ARB 0x202E -#define WGL_MAX_PBUFFER_WIDTH_ARB 0x202F -#define WGL_MAX_PBUFFER_HEIGHT_ARB 0x2030 -#define WGL_PBUFFER_LARGEST_ARB 0x2033 -#define WGL_PBUFFER_WIDTH_ARB 0x2034 -#define WGL_PBUFFER_HEIGHT_ARB 0x2035 -#define WGL_PBUFFER_LOST_ARB 0x2036 -#endif - -#ifndef WGL_ARB_render_texture -#define WGL_BIND_TO_TEXTURE_RGB_ARB 0x2070 -#define WGL_BIND_TO_TEXTURE_RGBA_ARB 0x2071 -#define WGL_TEXTURE_FORMAT_ARB 0x2072 -#define WGL_TEXTURE_TARGET_ARB 0x2073 -#define WGL_MIPMAP_TEXTURE_ARB 0x2074 -#define WGL_TEXTURE_RGB_ARB 0x2075 -#define WGL_TEXTURE_RGBA_ARB 0x2076 -#define WGL_NO_TEXTURE_ARB 0x2077 -#define WGL_TEXTURE_CUBE_MAP_ARB 0x2078 -#define WGL_TEXTURE_1D_ARB 0x2079 -#define WGL_TEXTURE_2D_ARB 0x207A -#define WGL_MIPMAP_LEVEL_ARB 0x207B -#define WGL_CUBE_MAP_FACE_ARB 0x207C -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_X_ARB 0x207D -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_X_ARB 0x207E -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Y_ARB 0x207F -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Y_ARB 0x2080 -#define WGL_TEXTURE_CUBE_MAP_POSITIVE_Z_ARB 0x2081 -#define WGL_TEXTURE_CUBE_MAP_NEGATIVE_Z_ARB 0x2082 -#define WGL_FRONT_LEFT_ARB 0x2083 -#define WGL_FRONT_RIGHT_ARB 0x2084 -#define WGL_BACK_LEFT_ARB 0x2085 -#define WGL_BACK_RIGHT_ARB 0x2086 -#define WGL_AUX0_ARB 0x2087 -#define WGL_AUX1_ARB 0x2088 -#define WGL_AUX2_ARB 0x2089 -#define WGL_AUX3_ARB 0x208A -#define WGL_AUX4_ARB 0x208B -#define WGL_AUX5_ARB 0x208C -#define WGL_AUX6_ARB 0x208D -#define WGL_AUX7_ARB 0x208E -#define WGL_AUX8_ARB 0x208F -#define WGL_AUX9_ARB 0x2090 -#endif - -#ifndef WGL_ARB_pixel_format_float -#define WGL_TYPE_RGBA_FLOAT_ARB 0x21A0 -#endif - -#ifndef WGL_ARB_create_context -#define WGL_CONTEXT_DEBUG_BIT_ARB 0x0001 -#define WGL_CONTEXT_FORWARD_COMPATIBLE_BIT_ARB 0x0002 -#define WGL_CONTEXT_MAJOR_VERSION_ARB 0x2091 -#define WGL_CONTEXT_MINOR_VERSION_ARB 0x2092 -#define WGL_CONTEXT_LAYER_PLANE_ARB 0x2093 -#define WGL_CONTEXT_FLAGS_ARB 0x2094 -#define ERROR_INVALID_VERSION_ARB 0x2095 -#endif - -#ifndef WGL_EXT_make_current_read -#define ERROR_INVALID_PIXEL_TYPE_EXT 0x2043 -#endif - -#ifndef WGL_EXT_pixel_format -#define WGL_NUMBER_PIXEL_FORMATS_EXT 0x2000 -#define WGL_DRAW_TO_WINDOW_EXT 0x2001 -#define WGL_DRAW_TO_BITMAP_EXT 0x2002 -#define WGL_ACCELERATION_EXT 0x2003 -#define WGL_NEED_PALETTE_EXT 0x2004 -#define WGL_NEED_SYSTEM_PALETTE_EXT 0x2005 -#define WGL_SWAP_LAYER_BUFFERS_EXT 0x2006 -#define WGL_SWAP_METHOD_EXT 0x2007 -#define WGL_NUMBER_OVERLAYS_EXT 0x2008 -#define WGL_NUMBER_UNDERLAYS_EXT 0x2009 -#define WGL_TRANSPARENT_EXT 0x200A -#define WGL_TRANSPARENT_VALUE_EXT 0x200B -#define WGL_SHARE_DEPTH_EXT 0x200C -#define WGL_SHARE_STENCIL_EXT 0x200D -#define WGL_SHARE_ACCUM_EXT 0x200E -#define WGL_SUPPORT_GDI_EXT 0x200F -#define WGL_SUPPORT_OPENGL_EXT 0x2010 -#define WGL_DOUBLE_BUFFER_EXT 0x2011 -#define WGL_STEREO_EXT 0x2012 -#define WGL_PIXEL_TYPE_EXT 0x2013 -#define WGL_COLOR_BITS_EXT 0x2014 -#define WGL_RED_BITS_EXT 0x2015 -#define WGL_RED_SHIFT_EXT 0x2016 -#define WGL_GREEN_BITS_EXT 0x2017 -#define WGL_GREEN_SHIFT_EXT 0x2018 -#define WGL_BLUE_BITS_EXT 0x2019 -#define WGL_BLUE_SHIFT_EXT 0x201A -#define WGL_ALPHA_BITS_EXT 0x201B -#define WGL_ALPHA_SHIFT_EXT 0x201C -#define WGL_ACCUM_BITS_EXT 0x201D -#define WGL_ACCUM_RED_BITS_EXT 0x201E -#define WGL_ACCUM_GREEN_BITS_EXT 0x201F -#define WGL_ACCUM_BLUE_BITS_EXT 0x2020 -#define WGL_ACCUM_ALPHA_BITS_EXT 0x2021 -#define WGL_DEPTH_BITS_EXT 0x2022 -#define WGL_STENCIL_BITS_EXT 0x2023 -#define WGL_AUX_BUFFERS_EXT 0x2024 -#define WGL_NO_ACCELERATION_EXT 0x2025 -#define WGL_GENERIC_ACCELERATION_EXT 0x2026 -#define WGL_FULL_ACCELERATION_EXT 0x2027 -#define WGL_SWAP_EXCHANGE_EXT 0x2028 -#define WGL_SWAP_COPY_EXT 0x2029 -#define WGL_SWAP_UNDEFINED_EXT 0x202A -#define WGL_TYPE_RGBA_EXT 0x202B -#define WGL_TYPE_COLORINDEX_EXT 0x202C -#endif - -#ifndef WGL_EXT_pbuffer -#define WGL_DRAW_TO_PBUFFER_EXT 0x202D -#define WGL_MAX_PBUFFER_PIXELS_EXT 0x202E -#define WGL_MAX_PBUFFER_WIDTH_EXT 0x202F -#define WGL_MAX_PBUFFER_HEIGHT_EXT 0x2030 -#define WGL_OPTIMAL_PBUFFER_WIDTH_EXT 0x2031 -#define WGL_OPTIMAL_PBUFFER_HEIGHT_EXT 0x2032 -#define WGL_PBUFFER_LARGEST_EXT 0x2033 -#define WGL_PBUFFER_WIDTH_EXT 0x2034 -#define WGL_PBUFFER_HEIGHT_EXT 0x2035 -#endif - -#ifndef WGL_EXT_depth_float -#define WGL_DEPTH_FLOAT_EXT 0x2040 -#endif - -#ifndef WGL_3DFX_multisample -#define WGL_SAMPLE_BUFFERS_3DFX 0x2060 -#define WGL_SAMPLES_3DFX 0x2061 -#endif - -#ifndef WGL_EXT_multisample -#define WGL_SAMPLE_BUFFERS_EXT 0x2041 -#define WGL_SAMPLES_EXT 0x2042 -#endif - -#ifndef WGL_I3D_digital_video_control -#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_FRAMEBUFFER_I3D 0x2050 -#define WGL_DIGITAL_VIDEO_CURSOR_ALPHA_VALUE_I3D 0x2051 -#define WGL_DIGITAL_VIDEO_CURSOR_INCLUDED_I3D 0x2052 -#define WGL_DIGITAL_VIDEO_GAMMA_CORRECTED_I3D 0x2053 -#endif - -#ifndef WGL_I3D_gamma -#define WGL_GAMMA_TABLE_SIZE_I3D 0x204E -#define WGL_GAMMA_EXCLUDE_DESKTOP_I3D 0x204F -#endif - -#ifndef WGL_I3D_genlock -#define WGL_GENLOCK_SOURCE_MULTIVIEW_I3D 0x2044 -#define WGL_GENLOCK_SOURCE_EXTENAL_SYNC_I3D 0x2045 -#define WGL_GENLOCK_SOURCE_EXTENAL_FIELD_I3D 0x2046 -#define WGL_GENLOCK_SOURCE_EXTENAL_TTL_I3D 0x2047 -#define WGL_GENLOCK_SOURCE_DIGITAL_SYNC_I3D 0x2048 -#define WGL_GENLOCK_SOURCE_DIGITAL_FIELD_I3D 0x2049 -#define WGL_GENLOCK_SOURCE_EDGE_FALLING_I3D 0x204A -#define WGL_GENLOCK_SOURCE_EDGE_RISING_I3D 0x204B -#define WGL_GENLOCK_SOURCE_EDGE_BOTH_I3D 0x204C -#endif - -#ifndef WGL_I3D_image_buffer -#define WGL_IMAGE_BUFFER_MIN_ACCESS_I3D 0x00000001 -#define WGL_IMAGE_BUFFER_LOCK_I3D 0x00000002 -#endif - -#ifndef WGL_I3D_swap_frame_lock -#endif - -#ifndef WGL_NV_render_depth_texture -#define WGL_BIND_TO_TEXTURE_DEPTH_NV 0x20A3 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_DEPTH_NV 0x20A4 -#define WGL_DEPTH_TEXTURE_FORMAT_NV 0x20A5 -#define WGL_TEXTURE_DEPTH_COMPONENT_NV 0x20A6 -#define WGL_DEPTH_COMPONENT_NV 0x20A7 -#endif - -#ifndef WGL_NV_render_texture_rectangle -#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGB_NV 0x20A0 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_RGBA_NV 0x20A1 -#define WGL_TEXTURE_RECTANGLE_NV 0x20A2 -#endif - -#ifndef WGL_ATI_pixel_format_float -#define WGL_TYPE_RGBA_FLOAT_ATI 0x21A0 -#endif - -#ifndef WGL_NV_float_buffer -#define WGL_FLOAT_COMPONENTS_NV 0x20B0 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_R_NV 0x20B1 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RG_NV 0x20B2 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGB_NV 0x20B3 -#define WGL_BIND_TO_TEXTURE_RECTANGLE_FLOAT_RGBA_NV 0x20B4 -#define WGL_TEXTURE_FLOAT_R_NV 0x20B5 -#define WGL_TEXTURE_FLOAT_RG_NV 0x20B6 -#define WGL_TEXTURE_FLOAT_RGB_NV 0x20B7 -#define WGL_TEXTURE_FLOAT_RGBA_NV 0x20B8 -#endif - -#ifndef WGL_3DL_stereo_control -#define WGL_STEREO_EMITTER_ENABLE_3DL 0x2055 -#define WGL_STEREO_EMITTER_DISABLE_3DL 0x2056 -#define WGL_STEREO_POLARITY_NORMAL_3DL 0x2057 -#define WGL_STEREO_POLARITY_INVERT_3DL 0x2058 -#endif - -#ifndef WGL_EXT_pixel_format_packed_float -#define WGL_TYPE_RGBA_UNSIGNED_FLOAT_EXT 0x20A8 -#endif - -#ifndef WGL_EXT_framebuffer_sRGB -#define WGL_FRAMEBUFFER_SRGB_CAPABLE_EXT 0x20A9 -#endif - -#ifndef WGL_NV_present_video -#define WGL_NUM_VIDEO_SLOTS_NV 0x20F0 -#endif - -#ifndef WGL_NV_video_out -#define WGL_BIND_TO_VIDEO_RGB_NV 0x20C0 -#define WGL_BIND_TO_VIDEO_RGBA_NV 0x20C1 -#define WGL_BIND_TO_VIDEO_RGB_AND_DEPTH_NV 0x20C2 -#define WGL_VIDEO_OUT_COLOR_NV 0x20C3 -#define WGL_VIDEO_OUT_ALPHA_NV 0x20C4 -#define WGL_VIDEO_OUT_DEPTH_NV 0x20C5 -#define WGL_VIDEO_OUT_COLOR_AND_ALPHA_NV 0x20C6 -#define WGL_VIDEO_OUT_COLOR_AND_DEPTH_NV 0x20C7 -#define WGL_VIDEO_OUT_FRAME 0x20C8 -#define WGL_VIDEO_OUT_FIELD_1 0x20C9 -#define WGL_VIDEO_OUT_FIELD_2 0x20CA -#define WGL_VIDEO_OUT_STACKED_FIELDS_1_2 0x20CB -#define WGL_VIDEO_OUT_STACKED_FIELDS_2_1 0x20CC -#endif - -#ifndef WGL_NV_swap_group -#endif - -#ifndef WGL_NV_gpu_affinity -#define WGL_ERROR_INCOMPATIBLE_AFFINITY_MASKS_NV 0x20D0 -#define WGL_ERROR_MISSING_AFFINITY_MASK_NV 0x20D1 -#endif - -#ifndef WGL_AMD_gpu_association -#define WGL_GPU_VENDOR_AMD 0x1F00 -#define WGL_GPU_RENDERER_STRING_AMD 0x1F01 -#define WGL_GPU_OPENGL_VERSION_STRING_AMD 0x1F02 -#define WGL_GPU_FASTEST_TARGET_GPUS_AMD 0x21A2 -#define WGL_GPU_RAM_AMD 0x21A3 -#define WGL_GPU_CLOCK_AMD 0x21A4 -#define WGL_GPU_NUM_PIPES_AMD 0x21A5 -#define WGL_GPU_NUM_SIMD_AMD 0x21A6 -#define WGL_GPU_NUM_RB_AMD 0x21A7 -#define WGL_GPU_NUM_SPI_AMD 0x21A8 -#endif - - -/*************************************************************/ - -#ifndef WGL_ARB_pbuffer -DECLARE_HANDLE(HPBUFFERARB); -#endif -#ifndef WGL_EXT_pbuffer -DECLARE_HANDLE(HPBUFFEREXT); -#endif -#ifndef WGL_NV_present_video -DECLARE_HANDLE(HVIDEOOUTPUTDEVICENV); -#endif -#ifndef WGL_NV_video_out -DECLARE_HANDLE(HPVIDEODEV); -#endif -#ifndef WGL_NV_gpu_affinity -DECLARE_HANDLE(HPGPUNV); -DECLARE_HANDLE(HGPUNV); - -typedef struct _GPU_DEVICE { - DWORD cb; - CHAR DeviceName[32]; - CHAR DeviceString[128]; - DWORD Flags; - RECT rcVirtualScreen; -} GPU_DEVICE, *PGPU_DEVICE; -#endif - -#ifndef WGL_ARB_buffer_region -#define WGL_ARB_buffer_region 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HANDLE WINAPI wglCreateBufferRegionARB (HDC, int, UINT); -extern VOID WINAPI wglDeleteBufferRegionARB (HANDLE); -extern BOOL WINAPI wglSaveBufferRegionARB (HANDLE, int, int, int, int); -extern BOOL WINAPI wglRestoreBufferRegionARB (HANDLE, int, int, int, int, int, int); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HANDLE (WINAPI * PFNWGLCREATEBUFFERREGIONARBPROC) (HDC hDC, int iLayerPlane, UINT uType); -typedef VOID (WINAPI * PFNWGLDELETEBUFFERREGIONARBPROC) (HANDLE hRegion); -typedef BOOL (WINAPI * PFNWGLSAVEBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height); -typedef BOOL (WINAPI * PFNWGLRESTOREBUFFERREGIONARBPROC) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); -#endif - -#ifndef WGL_ARB_multisample -#define WGL_ARB_multisample 1 -#endif - -#ifndef WGL_ARB_extensions_string -#define WGL_ARB_extensions_string 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern const char * WINAPI wglGetExtensionsStringARB (HDC); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGARBPROC) (HDC hdc); -#endif - -#ifndef WGL_ARB_pixel_format -#define WGL_ARB_pixel_format 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetPixelFormatAttribivARB (HDC, int, int, UINT, const int *, int *); -extern BOOL WINAPI wglGetPixelFormatAttribfvARB (HDC, int, int, UINT, const int *, FLOAT *); -extern BOOL WINAPI wglChoosePixelFormatARB (HDC, const int *, const FLOAT *, UINT, int *, UINT *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVARBPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); -typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATARBPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); -#endif - -#ifndef WGL_ARB_make_current_read -#define WGL_ARB_make_current_read 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglMakeContextCurrentARB (HDC, HDC, HGLRC); -extern HDC WINAPI wglGetCurrentReadDCARB (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTARBPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCARBPROC) (void); -#endif - -#ifndef WGL_ARB_pbuffer -#define WGL_ARB_pbuffer 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HPBUFFERARB WINAPI wglCreatePbufferARB (HDC, int, int, int, const int *); -extern HDC WINAPI wglGetPbufferDCARB (HPBUFFERARB); -extern int WINAPI wglReleasePbufferDCARB (HPBUFFERARB, HDC); -extern BOOL WINAPI wglDestroyPbufferARB (HPBUFFERARB); -extern BOOL WINAPI wglQueryPbufferARB (HPBUFFERARB, int, int *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HPBUFFERARB (WINAPI * PFNWGLCREATEPBUFFERARBPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); -typedef HDC (WINAPI * PFNWGLGETPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer); -typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCARBPROC) (HPBUFFERARB hPbuffer, HDC hDC); -typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFERARBPROC) (HPBUFFERARB hPbuffer); -typedef BOOL (WINAPI * PFNWGLQUERYPBUFFERARBPROC) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); -#endif - -#ifndef WGL_ARB_render_texture -#define WGL_ARB_render_texture 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglBindTexImageARB (HPBUFFERARB, int); -extern BOOL WINAPI wglReleaseTexImageARB (HPBUFFERARB, int); -extern BOOL WINAPI wglSetPbufferAttribARB (HPBUFFERARB, const int *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLBINDTEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); -typedef BOOL (WINAPI * PFNWGLRELEASETEXIMAGEARBPROC) (HPBUFFERARB hPbuffer, int iBuffer); -typedef BOOL (WINAPI * PFNWGLSETPBUFFERATTRIBARBPROC) (HPBUFFERARB hPbuffer, const int *piAttribList); -#endif - -#ifndef WGL_ARB_pixel_format_float -#define WGL_ARB_pixel_format_float 1 -#endif - -#ifndef WGL_ARB_create_context -#define WGL_ARB_create_context 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HGLRC WINAPI wglCreateContextAttribsARB (HDC, HGLRC, const int *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HGLRC (WINAPI * PFNWGLCREATECONTEXTATTRIBSARBPROC) (HDC hDC, HGLRC hShareContext, const int *attribList); -#endif - -#ifndef WGL_EXT_display_color_table -#define WGL_EXT_display_color_table 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern GLboolean WINAPI wglCreateDisplayColorTableEXT (GLushort); -extern GLboolean WINAPI wglLoadDisplayColorTableEXT (const GLushort *, GLuint); -extern GLboolean WINAPI wglBindDisplayColorTableEXT (GLushort); -extern VOID WINAPI wglDestroyDisplayColorTableEXT (GLushort); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef GLboolean (WINAPI * PFNWGLCREATEDISPLAYCOLORTABLEEXTPROC) (GLushort id); -typedef GLboolean (WINAPI * PFNWGLLOADDISPLAYCOLORTABLEEXTPROC) (const GLushort *table, GLuint length); -typedef GLboolean (WINAPI * PFNWGLBINDDISPLAYCOLORTABLEEXTPROC) (GLushort id); -typedef VOID (WINAPI * PFNWGLDESTROYDISPLAYCOLORTABLEEXTPROC) (GLushort id); -#endif - -#ifndef WGL_EXT_extensions_string -#define WGL_EXT_extensions_string 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern const char * WINAPI wglGetExtensionsStringEXT (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef const char * (WINAPI * PFNWGLGETEXTENSIONSSTRINGEXTPROC) (void); -#endif - -#ifndef WGL_EXT_make_current_read -#define WGL_EXT_make_current_read 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglMakeContextCurrentEXT (HDC, HDC, HGLRC); -extern HDC WINAPI wglGetCurrentReadDCEXT (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLMAKECONTEXTCURRENTEXTPROC) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); -typedef HDC (WINAPI * PFNWGLGETCURRENTREADDCEXTPROC) (void); -#endif - -#ifndef WGL_EXT_pbuffer -#define WGL_EXT_pbuffer 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern HPBUFFEREXT WINAPI wglCreatePbufferEXT (HDC, int, int, int, const int *); -extern HDC WINAPI wglGetPbufferDCEXT (HPBUFFEREXT); -extern int WINAPI wglReleasePbufferDCEXT (HPBUFFEREXT, HDC); -extern BOOL WINAPI wglDestroyPbufferEXT (HPBUFFEREXT); -extern BOOL WINAPI wglQueryPbufferEXT (HPBUFFEREXT, int, int *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef HPBUFFEREXT (WINAPI * PFNWGLCREATEPBUFFEREXTPROC) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); -typedef HDC (WINAPI * PFNWGLGETPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer); -typedef int (WINAPI * PFNWGLRELEASEPBUFFERDCEXTPROC) (HPBUFFEREXT hPbuffer, HDC hDC); -typedef BOOL (WINAPI * PFNWGLDESTROYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer); -typedef BOOL (WINAPI * PFNWGLQUERYPBUFFEREXTPROC) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); -#endif - -#ifndef WGL_EXT_pixel_format -#define WGL_EXT_pixel_format 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetPixelFormatAttribivEXT (HDC, int, int, UINT, int *, int *); -extern BOOL WINAPI wglGetPixelFormatAttribfvEXT (HDC, int, int, UINT, int *, FLOAT *); -extern BOOL WINAPI wglChoosePixelFormatEXT (HDC, const int *, const FLOAT *, UINT, int *, UINT *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBIVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); -typedef BOOL (WINAPI * PFNWGLGETPIXELFORMATATTRIBFVEXTPROC) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); -typedef BOOL (WINAPI * PFNWGLCHOOSEPIXELFORMATEXTPROC) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); -#endif - -#ifndef WGL_EXT_swap_control -#define WGL_EXT_swap_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglSwapIntervalEXT (int); -extern int WINAPI wglGetSwapIntervalEXT (void); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLSWAPINTERVALEXTPROC) (int interval); -typedef int (WINAPI * PFNWGLGETSWAPINTERVALEXTPROC) (void); -#endif - -#ifndef WGL_EXT_depth_float -#define WGL_EXT_depth_float 1 -#endif - -#ifndef WGL_NV_vertex_array_range -#define WGL_NV_vertex_array_range 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern void* WINAPI wglAllocateMemoryNV (GLsizei, GLfloat, GLfloat, GLfloat); -extern void WINAPI wglFreeMemoryNV (void *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef void* (WINAPI * PFNWGLALLOCATEMEMORYNVPROC) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); -typedef void (WINAPI * PFNWGLFREEMEMORYNVPROC) (void *pointer); -#endif - -#ifndef WGL_3DFX_multisample -#define WGL_3DFX_multisample 1 -#endif - -#ifndef WGL_EXT_multisample -#define WGL_EXT_multisample 1 -#endif - -#ifndef WGL_OML_sync_control -#define WGL_OML_sync_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetSyncValuesOML (HDC, INT64 *, INT64 *, INT64 *); -extern BOOL WINAPI wglGetMscRateOML (HDC, INT32 *, INT32 *); -extern INT64 WINAPI wglSwapBuffersMscOML (HDC, INT64, INT64, INT64); -extern INT64 WINAPI wglSwapLayerBuffersMscOML (HDC, int, INT64, INT64, INT64); -extern BOOL WINAPI wglWaitForMscOML (HDC, INT64, INT64, INT64, INT64 *, INT64 *, INT64 *); -extern BOOL WINAPI wglWaitForSbcOML (HDC, INT64, INT64 *, INT64 *, INT64 *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETSYNCVALUESOMLPROC) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); -typedef BOOL (WINAPI * PFNWGLGETMSCRATEOMLPROC) (HDC hdc, INT32 *numerator, INT32 *denominator); -typedef INT64 (WINAPI * PFNWGLSWAPBUFFERSMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); -typedef INT64 (WINAPI * PFNWGLSWAPLAYERBUFFERSMSCOMLPROC) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); -typedef BOOL (WINAPI * PFNWGLWAITFORMSCOMLPROC) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); -typedef BOOL (WINAPI * PFNWGLWAITFORSBCOMLPROC) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); -#endif - -#ifndef WGL_I3D_digital_video_control -#define WGL_I3D_digital_video_control 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetDigitalVideoParametersI3D (HDC, int, int *); -extern BOOL WINAPI wglSetDigitalVideoParametersI3D (HDC, int, const int *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); -typedef BOOL (WINAPI * PFNWGLSETDIGITALVIDEOPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); -#endif - -#ifndef WGL_I3D_gamma -#define WGL_I3D_gamma 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetGammaTableParametersI3D (HDC, int, int *); -extern BOOL WINAPI wglSetGammaTableParametersI3D (HDC, int, const int *); -extern BOOL WINAPI wglGetGammaTableI3D (HDC, int, USHORT *, USHORT *, USHORT *); -extern BOOL WINAPI wglSetGammaTableI3D (HDC, int, const USHORT *, const USHORT *, const USHORT *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, int *piValue); -typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEPARAMETERSI3DPROC) (HDC hDC, int iAttribute, const int *piValue); -typedef BOOL (WINAPI * PFNWGLGETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); -typedef BOOL (WINAPI * PFNWGLSETGAMMATABLEI3DPROC) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); -#endif - -#ifndef WGL_I3D_genlock -#define WGL_I3D_genlock 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglEnableGenlockI3D (HDC); -extern BOOL WINAPI wglDisableGenlockI3D (HDC); -extern BOOL WINAPI wglIsEnabledGenlockI3D (HDC, BOOL *); -extern BOOL WINAPI wglGenlockSourceI3D (HDC, UINT); -extern BOOL WINAPI wglGetGenlockSourceI3D (HDC, UINT *); -extern BOOL WINAPI wglGenlockSourceEdgeI3D (HDC, UINT); -extern BOOL WINAPI wglGetGenlockSourceEdgeI3D (HDC, UINT *); -extern BOOL WINAPI wglGenlockSampleRateI3D (HDC, UINT); -extern BOOL WINAPI wglGetGenlockSampleRateI3D (HDC, UINT *); -extern BOOL WINAPI wglGenlockSourceDelayI3D (HDC, UINT); -extern BOOL WINAPI wglGetGenlockSourceDelayI3D (HDC, UINT *); -extern BOOL WINAPI wglQueryGenlockMaxSourceDelayI3D (HDC, UINT *, UINT *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLENABLEGENLOCKI3DPROC) (HDC hDC); -typedef BOOL (WINAPI * PFNWGLDISABLEGENLOCKI3DPROC) (HDC hDC); -typedef BOOL (WINAPI * PFNWGLISENABLEDGENLOCKI3DPROC) (HDC hDC, BOOL *pFlag); -typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEI3DPROC) (HDC hDC, UINT uSource); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEI3DPROC) (HDC hDC, UINT *uSource); -typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT uEdge); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEEDGEI3DPROC) (HDC hDC, UINT *uEdge); -typedef BOOL (WINAPI * PFNWGLGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT uRate); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSAMPLERATEI3DPROC) (HDC hDC, UINT *uRate); -typedef BOOL (WINAPI * PFNWGLGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT uDelay); -typedef BOOL (WINAPI * PFNWGLGETGENLOCKSOURCEDELAYI3DPROC) (HDC hDC, UINT *uDelay); -typedef BOOL (WINAPI * PFNWGLQUERYGENLOCKMAXSOURCEDELAYI3DPROC) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); -#endif - -#ifndef WGL_I3D_image_buffer -#define WGL_I3D_image_buffer 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern LPVOID WINAPI wglCreateImageBufferI3D (HDC, DWORD, UINT); -extern BOOL WINAPI wglDestroyImageBufferI3D (HDC, LPVOID); -extern BOOL WINAPI wglAssociateImageBufferEventsI3D (HDC, const HANDLE *, const LPVOID *, const DWORD *, UINT); -extern BOOL WINAPI wglReleaseImageBufferEventsI3D (HDC, const LPVOID *, UINT); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef LPVOID (WINAPI * PFNWGLCREATEIMAGEBUFFERI3DPROC) (HDC hDC, DWORD dwSize, UINT uFlags); -typedef BOOL (WINAPI * PFNWGLDESTROYIMAGEBUFFERI3DPROC) (HDC hDC, LPVOID pAddress); -typedef BOOL (WINAPI * PFNWGLASSOCIATEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); -typedef BOOL (WINAPI * PFNWGLRELEASEIMAGEBUFFEREVENTSI3DPROC) (HDC hDC, const LPVOID *pAddress, UINT count); -#endif - -#ifndef WGL_I3D_swap_frame_lock -#define WGL_I3D_swap_frame_lock 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglEnableFrameLockI3D (void); -extern BOOL WINAPI wglDisableFrameLockI3D (void); -extern BOOL WINAPI wglIsEnabledFrameLockI3D (BOOL *); -extern BOOL WINAPI wglQueryFrameLockMasterI3D (BOOL *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLENABLEFRAMELOCKI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLDISABLEFRAMELOCKI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLISENABLEDFRAMELOCKI3DPROC) (BOOL *pFlag); -typedef BOOL (WINAPI * PFNWGLQUERYFRAMELOCKMASTERI3DPROC) (BOOL *pFlag); -#endif - -#ifndef WGL_I3D_swap_frame_usage -#define WGL_I3D_swap_frame_usage 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetFrameUsageI3D (float *); -extern BOOL WINAPI wglBeginFrameTrackingI3D (void); -extern BOOL WINAPI wglEndFrameTrackingI3D (void); -extern BOOL WINAPI wglQueryFrameTrackingI3D (DWORD *, DWORD *, float *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETFRAMEUSAGEI3DPROC) (float *pUsage); -typedef BOOL (WINAPI * PFNWGLBEGINFRAMETRACKINGI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLENDFRAMETRACKINGI3DPROC) (void); -typedef BOOL (WINAPI * PFNWGLQUERYFRAMETRACKINGI3DPROC) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); -#endif - -#ifndef WGL_ATI_pixel_format_float -#define WGL_ATI_pixel_format_float 1 -#endif - -#ifndef WGL_NV_float_buffer -#define WGL_NV_float_buffer 1 -#endif - -#ifndef WGL_EXT_pixel_format_packed_float -#define WGL_EXT_pixel_format_packed_float 1 -#endif - -#ifndef WGL_EXT_framebuffer_sRGB -#define WGL_EXT_framebuffer_sRGB 1 -#endif - -#ifndef WGL_NV_present_video -#define WGL_NV_present_video 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern int WINAPI wglEnumerateVideoDevicesNV (HDC, HVIDEOOUTPUTDEVICENV *); -extern BOOL WINAPI wglBindVideoDeviceNV (HDC, unsigned int, HVIDEOOUTPUTDEVICENV, const int *); -extern BOOL WINAPI wglQueryCurrentContextNV (int, int *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef int (WINAPI * PFNWGLENUMERATEVIDEODEVICESNVPROC) (HDC hDC, HVIDEOOUTPUTDEVICENV *phDeviceList); -typedef BOOL (WINAPI * PFNWGLBINDVIDEODEVICENVPROC) (HDC hDC, unsigned int uVideoSlot, HVIDEOOUTPUTDEVICENV hVideoDevice, const int *piAttribList); -typedef BOOL (WINAPI * PFNWGLQUERYCURRENTCONTEXTNVPROC) (int iAttribute, int *piValue); -#endif - -#ifndef WGL_NV_video_out -#define WGL_NV_video_out 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglGetVideoDeviceNV (HDC, int, HPVIDEODEV *); -extern BOOL WINAPI wglReleaseVideoDeviceNV (HPVIDEODEV); -extern BOOL WINAPI wglBindVideoImageNV (HPVIDEODEV, HPBUFFERARB, int); -extern BOOL WINAPI wglReleaseVideoImageNV (HPBUFFERARB, int); -extern BOOL WINAPI wglSendPbufferToVideoNV (HPBUFFERARB, int, unsigned long *, BOOL); -extern BOOL WINAPI wglGetVideoInfoNV (HPVIDEODEV, unsigned long *, unsigned long *); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLGETVIDEODEVICENVPROC) (HDC hDC, int numDevices, HPVIDEODEV *hVideoDevice); -typedef BOOL (WINAPI * PFNWGLRELEASEVIDEODEVICENVPROC) (HPVIDEODEV hVideoDevice); -typedef BOOL (WINAPI * PFNWGLBINDVIDEOIMAGENVPROC) (HPVIDEODEV hVideoDevice, HPBUFFERARB hPbuffer, int iVideoBuffer); -typedef BOOL (WINAPI * PFNWGLRELEASEVIDEOIMAGENVPROC) (HPBUFFERARB hPbuffer, int iVideoBuffer); -typedef BOOL (WINAPI * PFNWGLSENDPBUFFERTOVIDEONVPROC) (HPBUFFERARB hPbuffer, int iBufferType, unsigned long *pulCounterPbuffer, BOOL bBlock); -typedef BOOL (WINAPI * PFNWGLGETVIDEOINFONVPROC) (HPVIDEODEV hpVideoDevice, unsigned long *pulCounterOutputPbuffer, unsigned long *pulCounterOutputVideo); -#endif - -#ifndef WGL_NV_swap_group -#define WGL_NV_swap_group 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglJoinSwapGroupNV (HDC, GLuint); -extern BOOL WINAPI wglBindSwapBarrierNV (GLuint, GLuint); -extern BOOL WINAPI wglQuerySwapGroupNV (HDC, GLuint *, GLuint *); -extern BOOL WINAPI wglQueryMaxSwapGroupsNV (HDC, GLuint *, GLuint *); -extern BOOL WINAPI wglQueryFrameCountNV (HDC, GLuint *); -extern BOOL WINAPI wglResetFrameCountNV (HDC); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLJOINSWAPGROUPNVPROC) (HDC hDC, GLuint group); -typedef BOOL (WINAPI * PFNWGLBINDSWAPBARRIERNVPROC) (GLuint group, GLuint barrier); -typedef BOOL (WINAPI * PFNWGLQUERYSWAPGROUPNVPROC) (HDC hDC, GLuint *group, GLuint *barrier); -typedef BOOL (WINAPI * PFNWGLQUERYMAXSWAPGROUPSNVPROC) (HDC hDC, GLuint *maxGroups, GLuint *maxBarriers); -typedef BOOL (WINAPI * PFNWGLQUERYFRAMECOUNTNVPROC) (HDC hDC, GLuint *count); -typedef BOOL (WINAPI * PFNWGLRESETFRAMECOUNTNVPROC) (HDC hDC); -#endif - -#ifndef WGL_NV_gpu_affinity -#define WGL_NV_gpu_affinity 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern BOOL WINAPI wglEnumGpusNV (UINT, HGPUNV *); -extern BOOL WINAPI wglEnumGpuDevicesNV (HGPUNV, UINT, PGPU_DEVICE); -extern HDC WINAPI wglCreateAffinityDCNV (const HGPUNV *); -extern BOOL WINAPI wglEnumGpusFromAffinityDCNV (HDC, UINT, HGPUNV *); -extern BOOL WINAPI wglDeleteDCNV (HDC); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef BOOL (WINAPI * PFNWGLENUMGPUSNVPROC) (UINT iGpuIndex, HGPUNV *phGpu); -typedef BOOL (WINAPI * PFNWGLENUMGPUDEVICESNVPROC) (HGPUNV hGpu, UINT iDeviceIndex, PGPU_DEVICE lpGpuDevice); -typedef HDC (WINAPI * PFNWGLCREATEAFFINITYDCNVPROC) (const HGPUNV *phGpuList); -typedef BOOL (WINAPI * PFNWGLENUMGPUSFROMAFFINITYDCNVPROC) (HDC hAffinityDC, UINT iGpuIndex, HGPUNV *hGpu); -typedef BOOL (WINAPI * PFNWGLDELETEDCNVPROC) (HDC hdc); -#endif - -#ifndef WGL_AMD_gpu_association -#define WGL_AMD_gpu_association 1 -#ifdef WGL_WGLEXT_PROTOTYPES -extern UINT WINAPI wglGetGPUIDsAMD (UINT, UINT *); -extern INT WINAPI wglGetGPUInfoAMD (UINT, int, GLenum, UINT, void *); -extern UINT WINAPI wglGetContextGPUIDAMD (HGLRC); -extern HGLRC WINAPI wglCreateAssociatedContextAMD (UINT); -extern HGLRC WINAPI wglCreateAssociatedContextAttribsAMD (UINT, HGLRC, const int *); -extern BOOL WINAPI wglDeleteAssociatedContextAMD (HGLRC); -extern BOOL WINAPI wglMakeAssociatedContextCurrentAMD (HGLRC); -extern HGLRC WINAPI wglGetCurrentAssociatedContextAMD (void); -extern VOID WINAPI wglBlitContextFramebufferAMD (HGLRC, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLint, GLbitfield, GLenum); -#endif /* WGL_WGLEXT_PROTOTYPES */ -typedef UINT (WINAPI * PFNWGLGETGPUIDSAMDPROC) (UINT maxCount, UINT *ids); -typedef INT (WINAPI * PFNWGLGETGPUINFOAMDPROC) (UINT id, int property, GLenum dataType, UINT size, void *data); -typedef UINT (WINAPI * PFNWGLGETCONTEXTGPUIDAMDPROC) (HGLRC hglrc); -typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTAMDPROC) (UINT id); -typedef HGLRC (WINAPI * PFNWGLCREATEASSOCIATEDCONTEXTATTRIBSAMDPROC) (UINT id, HGLRC hShareContext, const int *attribList); -typedef BOOL (WINAPI * PFNWGLDELETEASSOCIATEDCONTEXTAMDPROC) (HGLRC hglrc); -typedef BOOL (WINAPI * PFNWGLMAKEASSOCIATEDCONTEXTCURRENTAMDPROC) (HGLRC hglrc); -typedef HGLRC (WINAPI * PFNWGLGETCURRENTASSOCIATEDCONTEXTAMDPROC) (void); -typedef VOID (WINAPI * PFNWGLBLITCONTEXTFRAMEBUFFERAMDPROC) (HGLRC dstCtx, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter); -#endif - - -#ifdef __cplusplus -} -#endif - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/Win32/zerogs.bmp b/plugins/zzogl-pg-cg/opengl/Win32/zerogs.bmp deleted file mode 100644 index 5cf24cf9e09d94de6bb9bc1c0099f1d3d6946632..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 921654 zcmeFadC>3aS=Jfn->I6Ksu^n_3kl$4P^XGn)Usx#T+)3yf%G|j`Yhd@gvAX7aU&4~ z1VlEY6oLuC1;r8vwNMZZ;8H3oSmH{8EGiIC+z?38ozBAIIG^{uy02WhpXK*_f6M#6 z=X8JTB>lGfesJIV99 z&ew36v-p&-h>sX*y!O7eMe8tUw)&&Dp=)7`?-ig`c-rm~x}-|FsV?ajivW|>M`X({ zdbTn@bDWyAnDm`g**QVis*v_9eEK}saCa-ZKiqF=PuD+0j?X@z@eXL=*_CDXm_NTT67RRh!yWeS zn}uZ`G}T;?*-OVce>=R!8}ViMv?5i)BEEv5mf7BqHEM2%yBy2>0(^3Qx9gJ5c0sqK zOLogABqm4k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DPZfrh){-i*wnBS)-~BXllL!w=E3@OW#vLJ-WW8Nhk{LvOiju| zbCiiGvQ4bFW?#V8;Nqt=fmzc9J9&}NBNmO~7UiN@#yLY4n42?v(SuKo&8<((9obRr z#G0XC7{U!UUl%UDkwF`Q|zhuE&AdeZOz~*0nj)N4~AEo5UghDh` zXlnIL7Y7u~)G>z~x*d7r&}4Ha=Y8D4Bz`6rKZX_ktDD4Khw#8Q1$j$w*Yw`?7fv)TBH#N12!++r)Zn_62MWPCpC1VJXx2?6n-^q{b8Tx_ z5oT7vvdc}Gm#*UTPE(%kAp;F%BN2vx7bz8Y-}!8usZV+4IWae7Lf}E^8)rC0`>$Y` zkG;R22Q)-I7H)!}DCELuB$!Yzgl&pO}<0bVf;8_?hQx z`rcBjd&1#_5JX9xxURSBA+EBmk50!{r{ zOTbVV#b*xXzfd0eFR3W2vE;u{Fkj)IP|T(&rN9sF=-{_{yA;mDKkQc+qt^^ uD@vq8Af$d@P7f)|Luw=+dM+k2JTQ0J#G094q|H;4@{WhZ+aZS5BmWO - - - - Debug - Win32 - - - Devel - Win32 - - - Release - Win32 - - - - ZZOgl-cg - {019773FA-2DAA-4C12-9511-BD2D4EB2A718} - ZZogl-cg - - - - DynamicLibrary - false - Unicode - true - - - DynamicLibrary - Unicode - - - DynamicLibrary - false - Unicode - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(ProjectName)-dev - $(SolutionDir)bin\$(PcsxSubsection)\ - $(PlatformName)\$(Configuration)\ - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - - - $(ProjectRootDir)\;$(ProjectRootDir)\ZeroGSShaders\;$(ProjectRootDir)\Win32;$(SvnRootDir)\3rdparty\libjpeg;$(SvnRootDir)\3rdparty\zlib;%(AdditionalIncludeDirectories) - NDEBUG;_USRDLL;__i386__;ZEROGS_DEVBUILD;%(PreprocessorDefinitions) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;Vfw32.lib;cg.lib;cgGL.lib;opengl32.lib;Comctl32.lib;rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\;%(AdditionalLibraryDirectories) - .\zerogs.def - - - - - $(ProjectRootDir)\;$(ProjectRootDir)\ZeroGSShaders\;$(ProjectRootDir)\Win32;$(SvnRootDir)\3rdparty\libjpeg;$(SvnRootDir)\3rdparty\zlib;%(AdditionalIncludeDirectories) - _USRDLL;ZEROGS_DEVBUILD;_DEBUG;__i386__;%(PreprocessorDefinitions) - - - winmm.lib;Vfw32.lib;cg.lib;cgGL.lib;opengl32.lib;Comctl32.lib;rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\;%(AdditionalLibraryDirectories) - %(IgnoreSpecificDefaultLibraries) - .\zerogs.def - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - - - $(ProjectRootDir)\;$(ProjectRootDir)\ZeroGSShaders\;$(ProjectRootDir)\Win32;$(SvnRootDir)\3rdparty\libjpeg;$(SvnRootDir)\3rdparty\zlib;%(AdditionalIncludeDirectories) - NDEBUG;_USRDLL;__i386__;ZEROGS_SSE2;RELEASE_TO_PUBLIC;%(PreprocessorDefinitions) - - - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;Vfw32.lib;cg.lib;cgGL.lib;opengl32.lib;Comctl32.lib;rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - ..\;%(AdditionalLibraryDirectories) - .\zerogs.def - - - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ml /nologo /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)" - - $(IntDir)%(Filename).obj;%(Outputs) - ml /nologo /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)" - - $(IntDir)%(Filename).obj;%(Outputs) - ml /nologo /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)" - - $(IntDir)%(Filename).obj;%(Outputs) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {bc236261-77e8-4567-8d09-45cd02965eb6} - true - false - false - true - false - - - {26511268-2902-4997-8421-ecd7055f9e28} - true - false - false - true - false - - - {7e9b2be7-cec3-4f14-847b-0ab8d562fb86} - true - false - false - true - false - - - {48ad7e0a-25b1-4974-a1e3-03f8c438d34f} - true - false - false - true - false - - - {0318ba30-ef48-441a-9e10-dc85efae39f0} - true - false - false - true - false - - - {2f6c0388-20cb-4242-9f6c-a6ebb6a83f47} - true - false - false - true - false - - - {4639972e-424e-4e13-8b07-ca403c481346} - true - false - false - true - false - - - - - - \ No newline at end of file diff --git a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg.vcxproj.filters b/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg.vcxproj.filters deleted file mode 100644 index 0a0899e279..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg.vcxproj.filters +++ /dev/null @@ -1,217 +0,0 @@ - - - - - {db5b3cda-2af3-451d-95a6-1ecd6410acb3} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {609d2fdc-53bd-42af-90ff-793a1107f003} - h;hpp;hxx;hm;inl - - - {a2158e1c-a894-441e-ab9e-e2361e55f009} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {4755b02f-755a-491e-b851-acab63a59d75} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - Resource Files - - - Resource Files - - - Docs - - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - - - Source Files - - - diff --git a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_2008.sln b/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_2008.sln deleted file mode 100644 index 3e19461acb..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_2008.sln +++ /dev/null @@ -1,42 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 10.00 -# Visual C++ Express 2008 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZZOgl", "zerogsogl_2008.vcproj", "{2D4E85B2-F47F-4D65-B091-701E5C031DAC}" - ProjectSection(ProjectDependencies) = postProject - {2F6C0388-20CB-4242-9F6C-A6EBB6A83F47} = {2F6C0388-20CB-4242-9F6C-A6EBB6A83F47} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Utilities", "..\..\..\..\common\build\Utilities\utilities.vcproj", "{4639972E-424E-4E13-8B07-CA403C481346}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "zlib", "..\..\..\..\3rdparty\zlib\zlib.vcproj", "{2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Devel|Win32 = Devel|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {2D4E85B2-F47F-4D65-B091-701E5C031DAC}.Debug|Win32.ActiveCfg = Debug|Win32 - {2D4E85B2-F47F-4D65-B091-701E5C031DAC}.Debug|Win32.Build.0 = Debug|Win32 - {2D4E85B2-F47F-4D65-B091-701E5C031DAC}.Devel|Win32.ActiveCfg = Devel|Win32 - {2D4E85B2-F47F-4D65-B091-701E5C031DAC}.Devel|Win32.Build.0 = Devel|Win32 - {2D4E85B2-F47F-4D65-B091-701E5C031DAC}.Release|Win32.ActiveCfg = Release|Win32 - {2D4E85B2-F47F-4D65-B091-701E5C031DAC}.Release|Win32.Build.0 = Release|Win32 - {4639972E-424E-4E13-8B07-CA403C481346}.Debug|Win32.ActiveCfg = Debug|Win32 - {4639972E-424E-4E13-8B07-CA403C481346}.Debug|Win32.Build.0 = Debug|Win32 - {4639972E-424E-4E13-8B07-CA403C481346}.Devel|Win32.ActiveCfg = Devel|Win32 - {4639972E-424E-4E13-8B07-CA403C481346}.Devel|Win32.Build.0 = Devel|Win32 - {4639972E-424E-4E13-8B07-CA403C481346}.Release|Win32.ActiveCfg = Release|Win32 - {4639972E-424E-4E13-8B07-CA403C481346}.Release|Win32.Build.0 = Release|Win32 - {2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Debug|Win32.ActiveCfg = Debug|Win32 - {2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Debug|Win32.Build.0 = Debug|Win32 - {2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Devel|Win32.ActiveCfg = Devel|Win32 - {2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Devel|Win32.Build.0 = Devel|Win32 - {2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Release|Win32.ActiveCfg = Release|Win32 - {2F6C0388-20CB-4242-9F6C-A6EBB6A83F47}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2012.vcxproj b/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2012.vcxproj deleted file mode 100644 index e452a3fe78..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2012.vcxproj +++ /dev/null @@ -1,286 +0,0 @@ - - - - - Debug - Win32 - - - Devel - Win32 - - - Release - Win32 - - - - ZZOgl-cg - {019773FA-2DAA-4C12-9511-BD2D4EB2A718} - ZZogl-cg - - - - DynamicLibrary - false - Unicode - true - v110_xp - - - DynamicLibrary - Unicode - v110_xp - - - DynamicLibrary - false - Unicode - v110_xp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(ProjectName)-dev - $(SolutionDir)bin\$(PcsxSubsection)\ - $(PlatformName)\$(Configuration)\ - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - - - $(CG_INC_PATH);$(ProjectRootDir)\;$(ProjectRootDir)\ZeroGSShaders\;$(ProjectRootDir)\Win32;$(SvnRootDir)\3rdparty\libjpeg;$(SvnRootDir)\3rdparty\zlib;%(AdditionalIncludeDirectories) - NDEBUG;_USRDLL;__i386__;ZEROGS_DEVBUILD;%(PreprocessorDefinitions) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;Vfw32.lib;cg.lib;cgGL.lib;opengl32.lib;Comctl32.lib;rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - $(CG_LIB_PATH);..\;%(AdditionalLibraryDirectories) - .\zerogs.def - false - - - - - $(CG_INC_PATH);$(ProjectRootDir)\;$(ProjectRootDir)\ZeroGSShaders\;$(ProjectRootDir)\Win32;$(SvnRootDir)\3rdparty\libjpeg;$(SvnRootDir)\3rdparty\zlib;%(AdditionalIncludeDirectories) - _USRDLL;ZEROGS_DEVBUILD;_DEBUG;__i386__;%(PreprocessorDefinitions) - - - winmm.lib;Vfw32.lib;cg.lib;cgGL.lib;opengl32.lib;Comctl32.lib;rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - $(CG_LIB_PATH);..\;%(AdditionalLibraryDirectories) - %(IgnoreSpecificDefaultLibraries) - .\zerogs.def - false - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - - - $(CG_INC_PATH);$(ProjectRootDir)\;$(ProjectRootDir)\ZeroGSShaders\;$(ProjectRootDir)\Win32;$(SvnRootDir)\3rdparty\libjpeg;$(SvnRootDir)\3rdparty\zlib;%(AdditionalIncludeDirectories) - NDEBUG;_USRDLL;__i386__;ZEROGS_SSE2;RELEASE_TO_PUBLIC;%(PreprocessorDefinitions) - - - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;Vfw32.lib;cg.lib;cgGL.lib;opengl32.lib;Comctl32.lib;rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - $(CG_LIB_PATH);..\;%(AdditionalLibraryDirectories) - .\zerogs.def - - - false - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ml /nologo /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)" - - $(IntDir)%(Filename).obj;%(Outputs) - ml /nologo /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)" - - $(IntDir)%(Filename).obj;%(Outputs) - ml /nologo /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)" - - $(IntDir)%(Filename).obj;%(Outputs) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {bc236261-77e8-4567-8d09-45cd02965eb6} - true - false - false - true - false - - - {26511268-2902-4997-8421-ecd7055f9e28} - true - false - false - true - false - - - {7e9b2be7-cec3-4f14-847b-0ab8d562fb86} - true - false - false - true - false - - - {48ad7e0a-25b1-4974-a1e3-03f8c438d34f} - true - false - false - true - false - - - {0318ba30-ef48-441a-9e10-dc85efae39f0} - true - false - false - true - false - - - {2f6c0388-20cb-4242-9f6c-a6ebb6a83f47} - true - false - false - true - false - - - {4639972e-424e-4e13-8b07-ca403c481346} - true - false - false - true - false - - - - - - \ No newline at end of file diff --git a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2012.vcxproj.filters b/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2012.vcxproj.filters deleted file mode 100644 index 0a0899e279..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2012.vcxproj.filters +++ /dev/null @@ -1,217 +0,0 @@ - - - - - {db5b3cda-2af3-451d-95a6-1ecd6410acb3} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {609d2fdc-53bd-42af-90ff-793a1107f003} - h;hpp;hxx;hm;inl - - - {a2158e1c-a894-441e-ab9e-e2361e55f009} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {4755b02f-755a-491e-b851-acab63a59d75} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - Resource Files - - - Resource Files - - - Docs - - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - - - Source Files - - - diff --git a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2013.vcxproj b/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2013.vcxproj deleted file mode 100644 index bba7903251..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2013.vcxproj +++ /dev/null @@ -1,286 +0,0 @@ - - - - - Debug - Win32 - - - Devel - Win32 - - - Release - Win32 - - - - ZZOgl-cg - {019773FA-2DAA-4C12-9511-BD2D4EB2A718} - ZZogl-cg - - - - DynamicLibrary - false - Unicode - true - v120_xp - - - DynamicLibrary - Unicode - v120_xp - - - DynamicLibrary - false - Unicode - v120_xp - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.30319.1 - $(ProjectName)-dev - $(SolutionDir)bin\$(PcsxSubsection)\ - $(PlatformName)\$(Configuration)\ - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - - - $(CG_INC_PATH);$(ProjectRootDir)\;$(ProjectRootDir)\ZeroGSShaders\;$(ProjectRootDir)\Win32;$(SvnRootDir)\3rdparty\libjpeg;$(SvnRootDir)\3rdparty\zlib;%(AdditionalIncludeDirectories) - NDEBUG;_USRDLL;__i386__;ZEROGS_DEVBUILD;%(PreprocessorDefinitions) - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;Vfw32.lib;cg.lib;cgGL.lib;opengl32.lib;Comctl32.lib;rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - $(CG_LIB_PATH);..\;%(AdditionalLibraryDirectories) - .\zerogs.def - false - - - - - $(CG_INC_PATH);$(ProjectRootDir)\;$(ProjectRootDir)\ZeroGSShaders\;$(ProjectRootDir)\Win32;$(SvnRootDir)\3rdparty\libjpeg;$(SvnRootDir)\3rdparty\zlib;%(AdditionalIncludeDirectories) - _USRDLL;ZEROGS_DEVBUILD;_DEBUG;__i386__;%(PreprocessorDefinitions) - - - winmm.lib;Vfw32.lib;cg.lib;cgGL.lib;opengl32.lib;Comctl32.lib;rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - $(CG_LIB_PATH);..\;%(AdditionalLibraryDirectories) - %(IgnoreSpecificDefaultLibraries) - .\zerogs.def - false - - - - - NDEBUG;%(PreprocessorDefinitions) - true - true - Win32 - - - - - $(CG_INC_PATH);$(ProjectRootDir)\;$(ProjectRootDir)\ZeroGSShaders\;$(ProjectRootDir)\Win32;$(SvnRootDir)\3rdparty\libjpeg;$(SvnRootDir)\3rdparty\zlib;%(AdditionalIncludeDirectories) - NDEBUG;_USRDLL;__i386__;ZEROGS_SSE2;RELEASE_TO_PUBLIC;%(PreprocessorDefinitions) - - - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - - - winmm.lib;Vfw32.lib;cg.lib;cgGL.lib;opengl32.lib;Comctl32.lib;rpcrt4.lib;%(AdditionalDependencies) - $(OutDir)$(TargetName)$(TargetExt) - $(CG_LIB_PATH);..\;%(AdditionalLibraryDirectories) - .\zerogs.def - - - false - - - - - - - - - - - - - true - - - - - - - - - - - - - - - - - - - - - - - - - - - - - ml /nologo /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)" - - $(IntDir)%(Filename).obj;%(Outputs) - ml /nologo /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)" - - $(IntDir)%(Filename).obj;%(Outputs) - ml /nologo /c /Fo"$(IntDir)%(Filename).obj" "%(FullPath)" - - $(IntDir)%(Filename).obj;%(Outputs) - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - {bc236261-77e8-4567-8d09-45cd02965eb6} - true - false - false - true - false - - - {26511268-2902-4997-8421-ecd7055f9e28} - true - false - false - true - false - - - {7e9b2be7-cec3-4f14-847b-0ab8d562fb86} - true - false - false - true - false - - - {48ad7e0a-25b1-4974-a1e3-03f8c438d34f} - true - false - false - true - false - - - {0318ba30-ef48-441a-9e10-dc85efae39f0} - true - false - false - true - false - - - {2f6c0388-20cb-4242-9f6c-a6ebb6a83f47} - true - false - false - true - false - - - {4639972e-424e-4e13-8b07-ca403c481346} - true - false - false - true - false - - - - - - \ No newline at end of file diff --git a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2013.vcxproj.filters b/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2013.vcxproj.filters deleted file mode 100644 index 767c957613..0000000000 --- a/plugins/zzogl-pg-cg/opengl/Win32/zerogsogl-cg_vs2013.vcxproj.filters +++ /dev/null @@ -1,217 +0,0 @@ - - - - - {db5b3cda-2af3-451d-95a6-1ecd6410acb3} - cpp;c;cxx;rc;def;r;odl;idl;hpj;bat - - - {609d2fdc-53bd-42af-90ff-793a1107f003} - h;hpp;hxx;hm;inl - - - {a2158e1c-a894-441e-ab9e-e2361e55f009} - ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe - - - {4755b02f-755a-491e-b851-acab63a59d75} - - - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - Source Files - - - - - Source Files - - - Resource Files - - - Resource Files - - - Docs - - - - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - Header Files - - - - - Resource Files - - - - - Source Files - - - diff --git a/plugins/zzogl-pg-cg/opengl/ZZClut.cpp b/plugins/zzogl-pg-cg/opengl/ZZClut.cpp deleted file mode 100644 index 3435e480ed..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZClut.cpp +++ /dev/null @@ -1,1083 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" -#include "Mem.h" -#include "Util.h" - -#if defined(ZEROGS_SSE2) -#include -#endif - -// Local Clut buffer: -// It supports both 32 bits and 16 bits colors formats. The size of the buffer is 1KBytes. -// The 16 bits entries are arranged in 2 columns. One row is a 32 bits colors. -// 256 0 -// 271 1 -// ... .. -// 510 254 -// 511 255 -// -// CSA -> clut buffer offset: -// 16 bits format: CSA < 32 <=> 16 entries, 16 half-row of the buffer (for example 0 to 15) -// 32 bits format: CSA < 16 <=> 16 entries, 16 full row of the buffer (for example 256|0 to 271|15) - -static const __aligned16 int s_clut_16bits_mask[4] = { 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff }; - -template -__forceinline T* GetClutBufferAddress(u32 csa) { } - -template <> -__forceinline u32* GetClutBufferAddress(u32 csa) -{ - return (u32*)(g_pbyGSClut + 64 * (csa & 15)); -} - -template <> -__forceinline u16* GetClutBufferAddress(u32 csa) -{ - return (u16*)(g_pbyGSClut + 64 * (csa & 15) + (csa >= 16 ? 2 : 0)); -} - -/* ***************************************************************** - * Local memory -> Clut buffer - * *****************************************************************/ - -#ifdef ZEROGS_SSE2 -__forceinline void GSMem_to_ClutBuffer__T32_I8_CSM1_sse2(u32* vm, u32 csa) -{ - u32* clut = GetClutBufferAddress(csa); - - __m128i* src = (__m128i*)vm; - __m128i* dst = (__m128i*)clut; - - for (int j = 0; j < 64; j += 32, src += 32, dst += 32) - { - for (int i = 0; i < 16; i += 4) - { - __m128i r0 = _mm_load_si128(&src[i+0]); - __m128i r1 = _mm_load_si128(&src[i+1]); - __m128i r2 = _mm_load_si128(&src[i+2]); - __m128i r3 = _mm_load_si128(&src[i+3]); - - _mm_store_si128(&dst[i*2+0], _mm_unpacklo_epi64(r0, r1)); - _mm_store_si128(&dst[i*2+1], _mm_unpacklo_epi64(r2, r3)); - _mm_store_si128(&dst[i*2+2], _mm_unpackhi_epi64(r0, r1)); - _mm_store_si128(&dst[i*2+3], _mm_unpackhi_epi64(r2, r3)); - - __m128i r4 = _mm_load_si128(&src[i+0+16]); - __m128i r5 = _mm_load_si128(&src[i+1+16]); - __m128i r6 = _mm_load_si128(&src[i+2+16]); - __m128i r7 = _mm_load_si128(&src[i+3+16]); - - _mm_store_si128(&dst[i*2+4], _mm_unpacklo_epi64(r4, r5)); - _mm_store_si128(&dst[i*2+5], _mm_unpacklo_epi64(r6, r7)); - _mm_store_si128(&dst[i*2+6], _mm_unpackhi_epi64(r4, r5)); - _mm_store_si128(&dst[i*2+7], _mm_unpackhi_epi64(r6, r7)); - } - } -} - -__forceinline void GSMem_to_ClutBuffer__T32_I4_CSM1_sse2(u32* vm, u32 csa) -{ - u32* clut = GetClutBufferAddress(csa); - - __m128i* src = (__m128i*)vm; - __m128i* dst = (__m128i*)clut; - - __m128i r0 = _mm_load_si128(&src[0]); - __m128i r1 = _mm_load_si128(&src[1]); - __m128i r2 = _mm_load_si128(&src[2]); - __m128i r3 = _mm_load_si128(&src[3]); - - _mm_store_si128(&dst[0], _mm_unpacklo_epi64(r0, r1)); - _mm_store_si128(&dst[1], _mm_unpacklo_epi64(r2, r3)); - _mm_store_si128(&dst[2], _mm_unpackhi_epi64(r0, r1)); - _mm_store_si128(&dst[3], _mm_unpackhi_epi64(r2, r3)); -} - - -template -__forceinline void GSMem_to_ClutBuffer__T16_I4_CSM1_core_sse2(u32* vm, u32* clut) -{ - __m128i vm_0; - __m128i vm_1; - __m128i vm_2; - __m128i vm_3; - __m128i clut_0; - __m128i clut_1; - __m128i clut_2; - __m128i clut_3; - - __m128i clut_mask = _mm_load_si128((__m128i*)s_clut_16bits_mask); - - // !HIGH_16BITS_VM - // CSA in 0-15 - // Replace lower 16 bits of clut with lower 16 bits of vm - // CSA in 16-31 - // Replace higher 16 bits of clut with lower 16 bits of vm - - // HIGH_16BITS_VM - // CSA in 0-15 - // Replace lower 16 bits of clut with higher 16 bits of vm - // CSA in 16-31 - // Replace higher 16 bits of clut with higher 16 bits of vm - if(HIGH_16BITS_VM && CSA_0_15) { - // move up to low - vm_0 = _mm_load_si128((__m128i*)vm); // 9 8 1 0 - vm_1 = _mm_load_si128((__m128i*)vm+1); // 11 10 3 2 - vm_2 = _mm_load_si128((__m128i*)vm+2); // 13 12 5 4 - vm_3 = _mm_load_si128((__m128i*)vm+3); // 15 14 7 6 - vm_0 = _mm_srli_epi32(vm_0, 16); - vm_1 = _mm_srli_epi32(vm_1, 16); - vm_2 = _mm_srli_epi32(vm_2, 16); - vm_3 = _mm_srli_epi32(vm_3, 16); - } else if(HIGH_16BITS_VM && !CSA_0_15) { - // Remove lower 16 bits - vm_0 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)vm)); // 9 8 1 0 - vm_1 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)vm+1)); // 11 10 3 2 - vm_2 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)vm+2)); // 13 12 5 4 - vm_3 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)vm+3)); // 15 14 7 6 - } else if(!HIGH_16BITS_VM && CSA_0_15) { - // Remove higher 16 bits - vm_0 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)vm)); // 9 8 1 0 - vm_1 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)vm+1)); // 11 10 3 2 - vm_2 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)vm+2)); // 13 12 5 4 - vm_3 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)vm+3)); // 15 14 7 6 - } else if(!HIGH_16BITS_VM && !CSA_0_15) { - // move low to high - vm_0 = _mm_load_si128((__m128i*)vm); // 9 8 1 0 - vm_1 = _mm_load_si128((__m128i*)vm+1); // 11 10 3 2 - vm_2 = _mm_load_si128((__m128i*)vm+2); // 13 12 5 4 - vm_3 = _mm_load_si128((__m128i*)vm+3); // 15 14 7 6 - vm_0 = _mm_slli_epi32(vm_0, 16); - vm_1 = _mm_slli_epi32(vm_1, 16); - vm_2 = _mm_slli_epi32(vm_2, 16); - vm_3 = _mm_slli_epi32(vm_3, 16); - } - - // Unsizzle the data - __m128i row_0 = _mm_unpacklo_epi64(vm_0, vm_1); // 3 2 1 0 - __m128i row_1 = _mm_unpacklo_epi64(vm_2, vm_3); // 7 6 5 4 - __m128i row_2 = _mm_unpackhi_epi64(vm_0, vm_1); // 11 10 9 8 - __m128i row_3 = _mm_unpackhi_epi64(vm_2, vm_3); // 15 14 13 12 - - // load old data & remove useless part - if(CSA_0_15) { - // Remove lower 16 bits - clut_0 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut)); - clut_1 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut+1)); - clut_2 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut+2)); - clut_3 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut+3)); - } else { - // Remove higher 16 bits - clut_0 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut)); - clut_1 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut+1)); - clut_2 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut+2)); - clut_3 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut+3)); - } - - // Merge old & new data - clut_0 = _mm_or_si128(clut_0, row_0); - clut_1 = _mm_or_si128(clut_1, row_1); - clut_2 = _mm_or_si128(clut_2, row_2); - clut_3 = _mm_or_si128(clut_3, row_3); - - _mm_store_si128((__m128i*)clut, clut_0); - _mm_store_si128((__m128i*)clut+1, clut_1); - _mm_store_si128((__m128i*)clut+2, clut_2); - _mm_store_si128((__m128i*)clut+3, clut_3); -} - -__forceinline void GSMem_to_ClutBuffer__T16_I4_CSM1_sse2(u32* vm, u32 csa) -{ - u32* clut = GetClutBufferAddress(csa); // Keep aligned version for sse2 - - if (csa > 15) { - GSMem_to_ClutBuffer__T16_I4_CSM1_core_sse2(vm, clut); - } else { - GSMem_to_ClutBuffer__T16_I4_CSM1_core_sse2(vm, clut); - } -} - -__forceinline void GSMem_to_ClutBuffer__T16_I8_CSM1_sse2(u32* vm, u32 csa) -{ - // update the right clut column (csa < 16) - u32* clut = GetClutBufferAddress(csa); // Keep aligned version for sse2 - - u32 csa_right = (csa < 16) ? 16 - csa : 0; - - for(int i = (csa_right/2); i > 0 ; --i) { - GSMem_to_ClutBuffer__T16_I4_CSM1_core_sse2(vm, clut); - clut += 16; - GSMem_to_ClutBuffer__T16_I4_CSM1_core_sse2(vm, clut); - clut += 16; - vm += 16; // go down one column - } - - // update the left clut column - u32 csa_left = (csa >= 16) ? 16 : csa; - - // In case csa_right is odd (so csa_left is also odd), we cross the clut column - if(csa_right & 0x1) { - GSMem_to_ClutBuffer__T16_I4_CSM1_core_sse2(vm, clut); - // go back to the base before processing left clut column - clut = GetClutBufferAddress(0); // Keep aligned version for sse2 - - GSMem_to_ClutBuffer__T16_I4_CSM1_core_sse2(vm, clut); - clut += 16; - vm += 16; // go down one column - } else if(csa_right != 0) { - // go back to the base before processing left clut column - clut = GetClutBufferAddress(0); // Keep aligned version for sse2 - - } - - for(int i = (csa_left/2); i > 0 ; --i) { - GSMem_to_ClutBuffer__T16_I4_CSM1_core_sse2(vm, clut); - clut += 16; - GSMem_to_ClutBuffer__T16_I4_CSM1_core_sse2(vm, clut); - clut += 16; - vm += 16; // go down one column - } -} - -#endif // ZEROGS_SSE2 - -__forceinline void GSMem_to_ClutBuffer__T16_I8_CSM1_c(u32* _vm, u32 csa) -{ - const static u32 map[] = - { - 0, 2, 8, 10, 16, 18, 24, 26, - 4, 6, 12, 14, 20, 22, 28, 30, - 1, 3, 9, 11, 17, 19, 25, 27, - 5, 7, 13, 15, 21, 23, 29, 31 - }; - - u16* vm = (u16*)_vm; - u16* clut = GetClutBufferAddress(csa); - - int left = ((u32)(uptr)clut & 2) ? 512 : 512 - (((u32)(uptr)clut) & 0x3ff) / 2; - - for (int j = 0; j < 8; j++, vm += 32, clut += 64, left -= 32) - { - if (left == 32) - { - assert(left == 32); - - for (int i = 0; i < 16; i++) - clut[2*i] = vm[map[i]]; - - clut = (u16*)((uptr)clut & ~0x3ff) + 1; - - for (int i = 16; i < 32; i++) - clut[2*i] = vm[map[i]]; - } - else - { - if (left == 0) - { - clut = (u16*)((uptr)clut & ~0x3ff) + 1; - left = -1; - } - - for (int i = 0; i < 32; i++) - clut[2*i] = vm[map[i]]; - } - } -} - -__forceinline void GSMem_to_ClutBuffer__T32_I8_CSM1_c(u32* vm, u32 csa) -{ - u64* src = (u64*)vm; - u64* dst = (u64*)GetClutBufferAddress(csa); - - for (int j = 0; j < 2; j++, src += 32) - { - for (int i = 0; i < 4; i++, dst += 16, src += 8) - { - dst[0] = src[0]; - dst[1] = src[2]; - dst[2] = src[4]; - dst[3] = src[6]; - dst[4] = src[1]; - dst[5] = src[3]; - dst[6] = src[5]; - dst[7] = src[7]; - - dst[8] = src[32]; - dst[9] = src[32+2]; - dst[10] = src[32+4]; - dst[11] = src[32+6]; - dst[12] = src[32+1]; - dst[13] = src[32+3]; - dst[14] = src[32+5]; - dst[15] = src[32+7]; - } - } -} - -__forceinline void GSMem_to_ClutBuffer__T16_I4_CSM1_c(u32* _vm, u32 csa) -{ - u16* dst = GetClutBufferAddress(csa); - u16* src = (u16*)_vm; - - dst[0] = src[0]; - dst[2] = src[2]; - dst[4] = src[8]; - dst[6] = src[10]; - dst[8] = src[16]; - dst[10] = src[18]; - dst[12] = src[24]; - dst[14] = src[26]; - dst[16] = src[4]; - dst[18] = src[6]; - dst[20] = src[12]; - dst[22] = src[14]; - dst[24] = src[20]; - dst[26] = src[22]; - dst[28] = src[28]; - dst[30] = src[30]; -} - -__forceinline void GSMem_to_ClutBuffer__T32_I4_CSM1_c(u32* vm, u32 csa) -{ - u64* src = (u64*)vm; - u64* dst = (u64*)GetClutBufferAddress(csa); - - dst[0] = src[0]; - dst[1] = src[2]; - dst[2] = src[4]; - dst[3] = src[6]; - dst[4] = src[1]; - dst[5] = src[3]; - dst[6] = src[5]; - dst[7] = src[7]; -} - -// Main GSmem to Clutbuffer function -/*__forceinline*/ void GSMem_to_ClutBuffer(tex0Info &tex0) -{ - int entries = PSMT_IS8CLUT(tex0.psm) ? 256 : 16; - - u8* _src = g_pbyGSMemory + 256 * tex0.cbp; - - if (tex0.csm) - { - switch (tex0.cpsm) - { - // 16bit psm - // eggomania uses non16bit textures for csm2 - - case PSMCT16: - { - u16* src = (u16*)_src; - u16 *dst = GetClutBufferAddress(tex0.csa); - - for (int i = 0; i < entries; ++i) - { - *dst = src[getPixelAddress16_0(gs.clut.cou+i, gs.clut.cov, gs.clut.cbw)]; - dst += 2; - - // check for wrapping - if (((u32)dst & 0x3ff) == 0) dst = GetClutBufferAddress(16); - } - break; - } - - case PSMCT16S: - { - u16* src = (u16*)_src; - u16 *dst = GetClutBufferAddress(tex0.csa); - - for (int i = 0; i < entries; ++i) - { - *dst = src[getPixelAddress16S_0(gs.clut.cou+i, gs.clut.cov, gs.clut.cbw)]; - dst += 2; - - // check for wrapping - if (((u32)dst & 0x3ff) == 0) dst = GetClutBufferAddress(16); - } - break; - } - - case PSMCT32: - case PSMCT24: - { - u32* src = (u32*)_src; - u32 *dst = GetClutBufferAddress(tex0.csa); - - // check if address exceeds src - - if (src + getPixelAddress32_0(gs.clut.cou + entries - 1, gs.clut.cov, gs.clut.cbw) >= (u32*)g_pbyGSMemory + 0x00100000) - ZZLog::Error_Log("texClutWrite out of bounds."); - else - for (int i = 0; i < entries; ++i) - { - *dst = src[getPixelAddress32_0(gs.clut.cou+i, gs.clut.cov, gs.clut.cbw)]; - dst++; - } - break; - } - - default: - { - //ZZLog::Debug_Log("Unknown cpsm: %x (%x).", tex0.cpsm, tex0.psm); - break; - } - } - } - else - { - u32* src = (u32*)_src; - - if (entries == 16) - { - if (tex0.cpsm < 2) { -#ifdef ZEROGS_SSE2 - GSMem_to_ClutBuffer__T32_I4_CSM1_sse2(src, tex0.csa); -#else - GSMem_to_ClutBuffer__T32_I4_CSM1_c(src, tex0.csa); -#endif - } else { -#ifdef ZEROGS_SSE2 - GSMem_to_ClutBuffer__T16_I4_CSM1_sse2(src, tex0.csa); -#else - GSMem_to_ClutBuffer__T16_I4_CSM1_c(src, tex0.csa); -#endif - } - } - else - { - if (tex0.cpsm < 2) { -#ifdef ZEROGS_SSE2 - GSMem_to_ClutBuffer__T32_I8_CSM1_sse2(src, tex0.csa); -#else - GSMem_to_ClutBuffer__T32_I8_CSM1_c(src, tex0.csa); -#endif - } else { -#ifdef ZEROGS_SSE2 - GSMem_to_ClutBuffer__T16_I8_CSM1_sse2(src, tex0.csa); -#else - GSMem_to_ClutBuffer__T16_I8_CSM1_c(src, tex0.csa); -#endif - } - - } - } -} - -/* ***************************************************************** - * Clut buffer -> local C array (linear) - * *****************************************************************/ -template -/*__forceinline*/ void ClutBuffer_to_Array(T* dst, u32 csa, u32 clutsize) {} - -template <> -/*__forceinline*/ void ClutBuffer_to_Array(u32* dst, u32 csa, u32 clutsize) -{ - u8* clut = (u8*)GetClutBufferAddress(csa); - memcpy((u8*)dst, clut, clutsize); -} - -template <> -/*__forceinline*/ void ClutBuffer_to_Array(u16* dst, u32 csa, u32 clutsize) -{ - u16* clut = (u16*)GetClutBufferAddress(csa); // Keep aligned version for sse2 - - // which side to copy - s32 clutsize_right; - s32 clutsize_left; - if (csa < 16) { - clutsize_right = min(clutsize, (16-csa)*64); - clutsize_left = clutsize - clutsize_right; - } else { - clutsize_right = 0; - clutsize_left = clutsize; - } - - while (clutsize_right > 0) - { -#ifdef ZEROGS_SSE2 - // only lower 16 bits of dword are valid - __m128i clut_0 = _mm_load_si128((__m128i*)clut); - __m128i clut_1 = _mm_load_si128((__m128i*)clut+1); - __m128i clut_2 = _mm_load_si128((__m128i*)clut+2); - __m128i clut_3 = _mm_load_si128((__m128i*)clut+3); - - clut_0 = _mm_shufflelo_epi16(clut_0, 0x88); - clut_1 = _mm_shufflelo_epi16(clut_1, 0x88); - clut_2 = _mm_shufflelo_epi16(clut_2, 0x88); - clut_3 = _mm_shufflelo_epi16(clut_3, 0x88); - - clut_0 = _mm_shufflehi_epi16(clut_0, 0x88); // - - 3 2 1 0 - - - clut_1 = _mm_shufflehi_epi16(clut_1, 0x88); - clut_2 = _mm_shufflehi_epi16(clut_2, 0x88); - clut_3 = _mm_shufflehi_epi16(clut_3, 0x88); - - clut_0 = _mm_srli_si128(clut_0, 4); - clut_1 = _mm_srli_si128(clut_1, 4); - clut_2 = _mm_srli_si128(clut_2, 4); - clut_3 = _mm_srli_si128(clut_3, 4); - - _mm_store_si128((__m128i*)dst, _mm_unpacklo_epi64(clut_0, clut_1)); - _mm_store_si128((__m128i*)dst+1, _mm_unpacklo_epi64(clut_2, clut_3)); -#else - for(int i = 0; i < 16; ++i) - dst[i] = clut[2*i]; -#endif - - dst += 16; - clut += 32; - clutsize_right -= 32; - } - - if(csa < 16) { - // go back to the base before processing left clut column - clut = (u16*)GetClutBufferAddress(0); // Keep aligned version for sse2 - } - - while (clutsize_left > 0) - { -#ifdef ZEROGS_SSE2 - // only higher 16 bits of dword are valid - __m128i clut_0 = _mm_load_si128((__m128i*)clut); - __m128i clut_1 = _mm_load_si128((__m128i*)clut+1); - __m128i clut_2 = _mm_load_si128((__m128i*)clut+2); - __m128i clut_3 = _mm_load_si128((__m128i*)clut+3); - - clut_0 = _mm_shufflelo_epi16(clut_0, 0x88); - clut_1 = _mm_shufflelo_epi16(clut_1, 0x88); - clut_2 = _mm_shufflelo_epi16(clut_2, 0x88); - clut_3 = _mm_shufflelo_epi16(clut_3, 0x88); - - clut_0 = _mm_shufflehi_epi16(clut_0, 0x88); // - - 3 2 1 0 - - - clut_1 = _mm_shufflehi_epi16(clut_1, 0x88); - clut_2 = _mm_shufflehi_epi16(clut_2, 0x88); - clut_3 = _mm_shufflehi_epi16(clut_3, 0x88); - - clut_0 = _mm_srli_si128(clut_0, 4); - clut_1 = _mm_srli_si128(clut_1, 4); - clut_2 = _mm_srli_si128(clut_2, 4); - clut_3 = _mm_srli_si128(clut_3, 4); - - _mm_store_si128((__m128i*)dst, _mm_unpacklo_epi64(clut_0, clut_1)); - _mm_store_si128((__m128i*)dst+1, _mm_unpacklo_epi64(clut_2, clut_3)); -#else - // Note +1 because we change higher 16 bits - for(int i = 0; i < 16; ++i) - dst[i] = clut[2*i+1]; -#endif - - dst += 16; - clut += 32; - clutsize_left -= 32; - } -} - -/* ***************************************************************** - * Compare: Clut buffer <-> Local Memory - * *****************************************************************/ -// false -> identical -// true -> different -template -/*__forceinline*/ bool Cmp_ClutBuffer_GSMem(T* GSmem, u32 csa, u32 clutsize); - -template <> -/*__forceinline*/ bool Cmp_ClutBuffer_GSMem(u32* GSmem, u32 csa, u32 clutsize) -{ - u64* _GSmem = (u64*) GSmem; - u64* clut = (u64*)GetClutBufferAddress(csa); - - while(clutsize > 0) { -#ifdef ZEROGS_SSE2 - // Note: local memory datas are swizzles - __m128i GSmem_0 = _mm_load_si128((__m128i*)_GSmem); // 9 8 1 0 - __m128i GSmem_1 = _mm_load_si128((__m128i*)_GSmem+1); // 11 10 3 2 - __m128i GSmem_2 = _mm_load_si128((__m128i*)_GSmem+2); // 13 12 5 4 - __m128i GSmem_3 = _mm_load_si128((__m128i*)_GSmem+3); // 15 14 7 6 - - __m128i clut_0 = _mm_load_si128((__m128i*)clut); - __m128i clut_1 = _mm_load_si128((__m128i*)clut+1); - __m128i clut_2 = _mm_load_si128((__m128i*)clut+2); - __m128i clut_3 = _mm_load_si128((__m128i*)clut+3); - - __m128i result = _mm_cmpeq_epi32(_mm_unpacklo_epi64(GSmem_0, GSmem_1), clut_0); - - __m128i result_tmp = _mm_cmpeq_epi32(_mm_unpacklo_epi64(GSmem_2, GSmem_3), clut_1); - result = _mm_and_si128(result, result_tmp); - - result_tmp = _mm_cmpeq_epi32(_mm_unpackhi_epi64(GSmem_0, GSmem_1), clut_2); - result = _mm_and_si128(result, result_tmp); - - result_tmp = _mm_cmpeq_epi32(_mm_unpackhi_epi64(GSmem_2, GSmem_3), clut_3); - result = _mm_and_si128(result, result_tmp); - - u32 result_int = _mm_movemask_epi8(result); - if (result_int != 0xFFFF) - return true; -#else - // I see no point to keep an mmx version. SSE2 versions is probably faster. - // Keep a slow portable C version for reference/debug - // Note: local memory datas are swizzles - if (clut[0] != _GSmem[0] || clut[1] != _GSmem[2] || clut[2] != _GSmem[4] || clut[3] != _GSmem[6] - || clut[4] != _GSmem[1] || clut[5] != _GSmem[3] || clut[6] != _GSmem[5] || clut[7] != _GSmem[7]) - return true; -#endif - - // go to the next memory block - _GSmem += 32; - - // go back to the previous memory block then down one memory column - if (clutsize & 0x40) { - _GSmem -= (64-8); - } - // In case previous operation (down one column) cross the block boundary - // Go to the next block - if (clutsize == 0x240) { - _GSmem += 32; - } - - clut += 8; - clutsize -= 64; - } - - return false; -} - -#ifdef ZEROGS_SSE2 -template -__forceinline bool Cmp_ClutBuffer_GSMem_core(u16* GSmem, u16* clut) -{ - __m128i GSmem_0; - __m128i GSmem_1; - __m128i GSmem_2; - __m128i GSmem_3; - __m128i clut_0; - __m128i clut_1; - __m128i clut_2; - __m128i clut_3; - - __m128i clut_mask = _mm_load_si128((__m128i*)s_clut_16bits_mask); - - // !HIGH_16BITS_VM - // CSA in 0-15 - // cmp lower 16 bits of clut with lower 16 bits of GSmem - // CSA in 16-31 - // cmp higher 16 bits of clut with lower 16 bits of GSmem - - // HIGH_16BITS_VM - // CSA in 0-15 - // cmp lower 16 bits of clut with higher 16 bits of GSmem - // CSA in 16-31 - // cmp higher 16 bits of clut with higher 16 bits of GSmem - if(HIGH_16BITS_VM && CSA_0_15) { - // move up to low - GSmem_0 = _mm_load_si128((__m128i*)GSmem); // 9 8 1 0 - GSmem_1 = _mm_load_si128((__m128i*)GSmem+1); // 11 10 3 2 - GSmem_2 = _mm_load_si128((__m128i*)GSmem+2); // 13 12 5 4 - GSmem_3 = _mm_load_si128((__m128i*)GSmem+3); // 15 14 7 6 - GSmem_0 = _mm_srli_epi32(GSmem_0, 16); - GSmem_1 = _mm_srli_epi32(GSmem_1, 16); - GSmem_2 = _mm_srli_epi32(GSmem_2, 16); - GSmem_3 = _mm_srli_epi32(GSmem_3, 16); - } else if(HIGH_16BITS_VM && !CSA_0_15) { - // Remove lower 16 bits - GSmem_0 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)GSmem)); // 9 8 1 0 - GSmem_1 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)GSmem+1)); // 11 10 3 2 - GSmem_2 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)GSmem+2)); // 13 12 5 4 - GSmem_3 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)GSmem+3)); // 15 14 7 6 - } else if(!HIGH_16BITS_VM && CSA_0_15) { - // Remove higher 16 bits - GSmem_0 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)GSmem)); // 9 8 1 0 - GSmem_1 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)GSmem+1)); // 11 10 3 2 - GSmem_2 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)GSmem+2)); // 13 12 5 4 - GSmem_3 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)GSmem+3)); // 15 14 7 6 - } else if(!HIGH_16BITS_VM && !CSA_0_15) { - // move low to high - GSmem_0 = _mm_load_si128((__m128i*)GSmem); // 9 8 1 0 - GSmem_1 = _mm_load_si128((__m128i*)GSmem+1); // 11 10 3 2 - GSmem_2 = _mm_load_si128((__m128i*)GSmem+2); // 13 12 5 4 - GSmem_3 = _mm_load_si128((__m128i*)GSmem+3); // 15 14 7 6 - GSmem_0 = _mm_slli_epi32(GSmem_0, 16); - GSmem_1 = _mm_slli_epi32(GSmem_1, 16); - GSmem_2 = _mm_slli_epi32(GSmem_2, 16); - GSmem_3 = _mm_slli_epi32(GSmem_3, 16); - } - - // Unsizzle the data - __m128i row_0 = _mm_unpacklo_epi64(GSmem_0, GSmem_1); // 3 2 1 0 - __m128i row_1 = _mm_unpacklo_epi64(GSmem_2, GSmem_3); // 7 6 5 4 - __m128i row_2 = _mm_unpackhi_epi64(GSmem_0, GSmem_1); // 11 10 9 8 - __m128i row_3 = _mm_unpackhi_epi64(GSmem_2, GSmem_3); // 15 14 13 12 - - // load old data & remove useless part - if(!CSA_0_15) { - // Remove lower 16 bits - clut_0 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut)); - clut_1 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut+1)); - clut_2 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut+2)); - clut_3 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut+3)); - } else { - // Remove higher 16 bits - clut_0 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut)); - clut_1 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut+1)); - clut_2 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut+2)); - clut_3 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut+3)); - } - - // Do the comparaison - __m128i result = _mm_cmpeq_epi16(row_0, clut_0); - __m128i result_tmp = _mm_cmpeq_epi16(row_1, clut_1); - result = _mm_and_si128(result, result_tmp); - - result_tmp = _mm_cmpeq_epi16(row_2, clut_2); - result = _mm_and_si128(result, result_tmp); - - result_tmp = _mm_cmpeq_epi16(row_3, clut_3); - result = _mm_and_si128(result, result_tmp); - - u32 result_int = _mm_movemask_epi8(result); - if(CSA_0_15) { - // only lower 16bits must be checked - if ((result_int&0x3333) != 0x3333) - return true; - } else { - // only higher 16bits must be checked - if ((result_int&0xCCCC) != 0xCCCC) - return true; - } - - return false; -} -#endif - -template <> -/*__forceinline*/ bool Cmp_ClutBuffer_GSMem(u16* GSmem, u32 csa, u32 clutsize) -{ -#ifdef ZEROGS_SSE2 - u16* clut = (u16*)GetClutBufferAddress(csa); // Keep aligned version for sse2 - - // Special case only one CSA block to check - if(clutsize == 32) { - if (csa < 16) - return Cmp_ClutBuffer_GSMem_core(GSmem, clut); - else - return Cmp_ClutBuffer_GSMem_core(GSmem, clut); - } - - // which side to cmp - s32 clutsize_right; // Note clutsize_right could be negative ! - u32 clutsize_left; - if (csa < 16) { - // the '-32' is a trick to handle easily when csa is odd - clutsize_right = min(clutsize, (16-csa)*32) -32; - clutsize_left = clutsize - clutsize_right; - } else { - clutsize_right = 0; - clutsize_left = clutsize; - } - - while(clutsize_right > 0) { - if (Cmp_ClutBuffer_GSMem_core(GSmem, clut)) - return true; - clut += 32; - - if (Cmp_ClutBuffer_GSMem_core(GSmem, clut)) - return true; - clut += 32; - - GSmem += 32; // go down one column - clutsize_right -= 64; - } - - if(csa < 16) { - // because of the extra -32, csa_righ is null when csa is odd - if (clutsize_right == 0) { - // cross the clut - if (Cmp_ClutBuffer_GSMem_core(GSmem, clut)) - return true; - clut += 32; - - if (Cmp_ClutBuffer_GSMem_core(GSmem, clut)) - return true; - - GSmem += 32; // go down one column - clutsize_left -= 32; - } - - // go back to the base before processing left clut column - clut = (u16*)GetClutBufferAddress(0); // Keep aligned version for sse2 - } - - while(clutsize_left > 0) { - if (Cmp_ClutBuffer_GSMem_core(GSmem, clut)) - return true; - clut += 32; - - if (Cmp_ClutBuffer_GSMem_core(GSmem, clut)) - return true; - clut += 32; - - GSmem += 32; // go down one column - clutsize_left -= 64; - } - - return false; -#else - // This function is only useful for performance. So just return - // for a plain c build - return true; -#endif -} - -/* ***************************************************************** - * Compare: Clut buffer <-> local C array (linear) - * *****************************************************************/ -// false -> identical -// true -> different -template -/*__forceinline*/ bool Cmp_ClutBuffer_SavedClut(T* saved_clut, u32 csa, u32 clutsize); - -template <> -/*__forceinline*/ bool Cmp_ClutBuffer_SavedClut(u32* saved_clut, u32 csa, u32 clutsize) -{ - u32* clut = GetClutBufferAddress(csa); - return !!memcmp_mmx(saved_clut, clut, clutsize); -} - -template <> -/*__forceinline*/ bool Cmp_ClutBuffer_SavedClut(u16* saved_clut, u32 csa, u32 clutsize) -{ - assert((clutsize&31) == 0); - -#ifdef ZEROGS_SSE2 - __m128i zero_128 = _mm_setzero_si128(); -#endif - u16* clut = (u16*)GetClutBufferAddress(csa); // Keep aligned version for sse2 - - // which side to cmp - u32 clutsize_right; - u32 clutsize_left; - if (csa < 16) { - clutsize_right = min(clutsize, (16-csa)*32); - clutsize_left = clutsize - clutsize_right; - } else { - clutsize_right = 0; - clutsize_left = clutsize; - } - - while (clutsize_right > 0) - { -#ifdef ZEROGS_SSE2 - // only lower 16 bits of dword are valid - __m128i clut_0 = _mm_load_si128((__m128i*)clut); - __m128i clut_1 = _mm_load_si128((__m128i*)clut+1); - __m128i clut_2 = _mm_load_si128((__m128i*)clut+2); - __m128i clut_3 = _mm_load_si128((__m128i*)clut+3); - - // value must converted to 32 bits - __m128i saved_clut_0 = _mm_load_si128((__m128i*)saved_clut); - __m128i saved_clut_1 = _mm_load_si128((__m128i*)saved_clut+1); - - __m128i result = _mm_cmpeq_epi16(_mm_unpacklo_epi16(saved_clut_0, zero_128), clut_0); - __m128i result_tmp = _mm_cmpeq_epi16(_mm_unpackhi_epi16(saved_clut_0, zero_128), clut_1); - result = _mm_and_si128(result, result_tmp); - - result_tmp = _mm_cmpeq_epi16(_mm_unpacklo_epi16(saved_clut_1, zero_128), clut_2); - result = _mm_and_si128(result, result_tmp); - - result_tmp = _mm_cmpeq_epi16(_mm_unpackhi_epi16(saved_clut_1, zero_128), clut_3); - result = _mm_and_si128(result, result_tmp); - - u32 result_int = _mm_movemask_epi8(result); - // only lower 16bits must be checked - if ((result_int&0x3333) != 0x3333) - return true; -#else - for (int i = 0; i < 16; ++i) - if (saved_clut[i] != clut[2*i]) return true; -#endif - - saved_clut += 16; - clut += 32; - clutsize_right -= 32; - } - - if(csa < 16) { - // go back to the base before processing left clut column - clut = (u16*)GetClutBufferAddress(0); // Keep aligned version for sse2 - } - - while (clutsize_left > 0) - { -#ifdef ZEROGS_SSE2 - // only higher 16 bits of dword are valid - __m128i clut_0 = _mm_load_si128((__m128i*)clut); - __m128i clut_1 = _mm_load_si128((__m128i*)clut+1); - __m128i clut_2 = _mm_load_si128((__m128i*)clut+2); - __m128i clut_3 = _mm_load_si128((__m128i*)clut+3); - - // value must converted to 32 bits (with 0 in lower 16 bits) - __m128i saved_clut_0 = _mm_load_si128((__m128i*)saved_clut); - __m128i saved_clut_1 = _mm_load_si128((__m128i*)saved_clut+1); - - __m128i result = _mm_cmpeq_epi16(_mm_unpacklo_epi16(zero_128, saved_clut_0), clut_0); - __m128i result_tmp = _mm_cmpeq_epi16(_mm_unpackhi_epi16(zero_128, saved_clut_0), clut_1); - result = _mm_and_si128(result, result_tmp); - - result_tmp = _mm_cmpeq_epi16(_mm_unpacklo_epi16(zero_128, saved_clut_1), clut_2); - result = _mm_and_si128(result, result_tmp); - - result_tmp = _mm_cmpeq_epi16(_mm_unpackhi_epi16(zero_128, saved_clut_1), clut_3); - result = _mm_and_si128(result, result_tmp); - - u32 result_int = _mm_movemask_epi8(result); - // only higher 16bits must be checked - if ((result_int&0xCCCC) != 0xCCCC) - return true; -#else - // Note +1 because we change higher 16 bits - for (int i = 0; i < 16; ++i) - if (saved_clut[i] != clut[2*i+1]) return true; -#endif - - saved_clut += 16; - clut += 32; - clutsize_left -= 32; - } - - return false; -} - - -/* ***************************************************************** - * Resolve color of clut texture - * *****************************************************************/ - -// used to build clut textures (note that this is for both 16 and 32 bit cluts) -template -/*__forceinline*/ void Build_Clut_Texture(u32 psm, u32 height, T* pclut, u8* psrc, T* pdst) -{ - switch (psm) - { - case PSMT8: - for (u32 i = 0; i < height; ++i) - { - for (int j = 0; j < GPU_TEXWIDTH / 2; ++j) - { - pdst[0] = pclut[psrc[0]]; - pdst[1] = pclut[psrc[1]]; - pdst[2] = pclut[psrc[2]]; - pdst[3] = pclut[psrc[3]]; - pdst[4] = pclut[psrc[4]]; - pdst[5] = pclut[psrc[5]]; - pdst[6] = pclut[psrc[6]]; - pdst[7] = pclut[psrc[7]]; - pdst += 8; - psrc += 8; - } - } - break; - - case PSMT4: - for (u32 i = 0; i < height; ++i) - { - for (int j = 0; j < GPU_TEXWIDTH; ++j) - { - pdst[0] = pclut[psrc[0] & 15]; - pdst[1] = pclut[psrc[0] >> 4]; - pdst[2] = pclut[psrc[1] & 15]; - pdst[3] = pclut[psrc[1] >> 4]; - pdst[4] = pclut[psrc[2] & 15]; - pdst[5] = pclut[psrc[2] >> 4]; - pdst[6] = pclut[psrc[3] & 15]; - pdst[7] = pclut[psrc[3] >> 4]; - - pdst += 8; - psrc += 4; - } - } - break; - - case PSMT8H: - for (u32 i = 0; i < height; ++i) - { - for (int j = 0; j < GPU_TEXWIDTH / 8; ++j) - { - pdst[0] = pclut[psrc[3]]; - pdst[1] = pclut[psrc[7]]; - pdst[2] = pclut[psrc[11]]; - pdst[3] = pclut[psrc[15]]; - pdst[4] = pclut[psrc[19]]; - pdst[5] = pclut[psrc[23]]; - pdst[6] = pclut[psrc[27]]; - pdst[7] = pclut[psrc[31]]; - pdst += 8; - psrc += 32; - } - } - break; - - case PSMT4HH: - for (u32 i = 0; i < height; ++i) - { - for (int j = 0; j < GPU_TEXWIDTH / 8; ++j) - { - pdst[0] = pclut[psrc[3] >> 4]; - pdst[1] = pclut[psrc[7] >> 4]; - pdst[2] = pclut[psrc[11] >> 4]; - pdst[3] = pclut[psrc[15] >> 4]; - pdst[4] = pclut[psrc[19] >> 4]; - pdst[5] = pclut[psrc[23] >> 4]; - pdst[6] = pclut[psrc[27] >> 4]; - pdst[7] = pclut[psrc[31] >> 4]; - pdst += 8; - psrc += 32; - } - } - break; - - case PSMT4HL: - for (u32 i = 0; i < height; ++i) - { - for (int j = 0; j < GPU_TEXWIDTH / 8; ++j) - { - pdst[0] = pclut[psrc[3] & 15]; - pdst[1] = pclut[psrc[7] & 15]; - pdst[2] = pclut[psrc[11] & 15]; - pdst[3] = pclut[psrc[15] & 15]; - pdst[4] = pclut[psrc[19] & 15]; - pdst[5] = pclut[psrc[23] & 15]; - pdst[6] = pclut[psrc[27] & 15]; - pdst[7] = pclut[psrc[31] & 15]; - pdst += 8; - psrc += 32; - } - } - break; - - default: - assert(0); - } -} - -// Instantiate the Build_Clut_Texture template... -template void Build_Clut_Texture(u32 psm, u32 height, u32* pclut, u8* psrc, u32* pdst); -template void Build_Clut_Texture(u32 psm, u32 height, u16* pclut, u8* psrc, u16* pdst); diff --git a/plugins/zzogl-pg-cg/opengl/ZZClut.h b/plugins/zzogl-pg-cg/opengl/ZZClut.h deleted file mode 100644 index f2b0428ca6..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZClut.h +++ /dev/null @@ -1,30 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef CLUT_H_INCLUDED -#define CLUT_H_INCLUDED - -extern void GSMem_to_ClutBuffer(tex0Info &tex0); -template extern void ClutBuffer_to_Array(T* dst, u32 csa, u32 clutsize); -template extern void Build_Clut_Texture(u32 psm, u32 height, T* pclut, u8* psrc, T* pdst); - -template extern bool Cmp_ClutBuffer_GSMem(T* GSmem, u32 csa, u32 clutsize); -template extern bool Cmp_ClutBuffer_SavedClut(T* saved_clut, u32 csa, u32 clutsize); - -#endif // CLUT_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/ZZGl.h b/plugins/zzogl-pg-cg/opengl/ZZGl.h deleted file mode 100644 index 9310114aa5..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZGl.h +++ /dev/null @@ -1,144 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef ZZGL_H_INCLUDED -#define ZZGL_H_INCLUDED - -#include "PS2Etypes.h" -#include "PS2Edefs.h" - -// Need this before gl.h -#ifdef _WIN32 - -#include "Utilities/RedtapeWindows.h" - -#include -#include -#include "glprocs.h" - -#else - -// adding glew support instead of glXGetProcAddress (thanks to scaught) -#include -#include -#include -#include - -inline void* wglGetProcAddress(const char* x) -{ - return (void*)glXGetProcAddress((const GLubyte*)x); -} - -#endif - -// FIX compilation issue with Mesa 10 -// Note it might be possible to do better with the right include -// in the rigth order but I don't have time -#ifndef APIENTRY -#define APIENTRY -#endif -#ifndef APIENTRYP -#define APIENTRYP APIENTRY * -#endif - -extern u32 s_stencilfunc, s_stencilref, s_stencilmask; -// Defines - -#ifndef GL_DEPTH24_STENCIL8_EXT // allows FBOs to support stencils -# define GL_DEPTH_STENCIL_EXT 0x84F9 -# define GL_UNSIGNED_INT_24_8_EXT 0x84FA -# define GL_DEPTH24_STENCIL8_EXT 0x88F0 -# define GL_TEXTURE_STENCIL_SIZE_EXT 0x88F1 -#endif - -#define GL_STENCILFUNC(func, ref, mask) { \ - s_stencilfunc = func; \ - s_stencilref = ref; \ - s_stencilmask = mask; \ - glStencilFunc(func, ref, mask); \ -} - -#define GL_STENCILFUNC_SET() glStencilFunc(s_stencilfunc, s_stencilref, s_stencilmask) - - -// sets the data stream -#define SET_STREAM() { \ - glColorPointer(4, GL_UNSIGNED_BYTE, sizeof(VertexGPU), (void*)8); \ - glSecondaryColorPointerEXT(4, GL_UNSIGNED_BYTE, sizeof(VertexGPU), (void*)12); \ - glTexCoordPointer(3, GL_FLOAT, sizeof(VertexGPU), (void*)16); \ - glVertexPointer(4, GL_SHORT, sizeof(VertexGPU), (void*)0); \ -} - - -// global alpha blending settings -extern GLenum g_internalRGBAFloat16Fmt; - -#define SAFE_RELEASE_TEX(x) { if( (x) != 0 ) { glDeleteTextures(1, &(x)); x = 0; } } - -// inline for an extremely often used sequence -// This is turning off all gl functions. Safe to do updates. -inline void DisableAllgl() -{ - glDisable(GL_SCISSOR_TEST); - glDisable(GL_BLEND); - glDisable(GL_ALPHA_TEST); - glDisable(GL_DEPTH_TEST); - glDepthMask(0); - glDisable(GL_STENCIL_TEST); - glColorMask(1, 1, 1, 1); -} - -//--------------------- Dummies - -#ifdef _WIN32 -extern void (__stdcall *zgsBlendEquationSeparateEXT)(GLenum, GLenum); -extern void (__stdcall *zgsBlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum); -#else -extern void (APIENTRY *zgsBlendEquationSeparateEXT)(GLenum, GLenum); -extern void (APIENTRY *zgsBlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum); -#endif - - -// ------------------------ Types ------------------------- - -///////////////////// -// graphics resources -extern GLenum s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha; // set by zgsBlendFuncSeparateEXT - -// GL prototypes -extern PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT; -extern PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT; -extern PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT; -extern PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT; -extern PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT; -extern PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameterivEXT; -extern PFNGLISFRAMEBUFFEREXTPROC glIsFramebufferEXT; -extern PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT; -extern PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT; -extern PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT; -extern PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT; -extern PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1DEXT; -extern PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT; -extern PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3DEXT; -extern PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT; -extern PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameterivEXT; -extern PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT; -extern PFNGLDRAWBUFFERSPROC glDrawBuffers; - -#endif // ZZGL_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/ZZHacks.cpp b/plugins/zzogl-pg-cg/opengl/ZZHacks.cpp deleted file mode 100644 index 183f0fa894..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZHacks.cpp +++ /dev/null @@ -1,186 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - - #include "Util.h" - #include "ZZHacks.h" - #include "ZZLog.h" - -int CurrentHack = 0; - -// A list of what bit controls each of the current hacks. -u32 hackList[HACK_NUMBER] = -{ - 0, // No hack - 1, //GAME_TEXTURETARGS, - 2, //GAME_AUTORESET, - 3, //GAME_INTERLACE2X, - 4, //GAME_TEXAHACK, - 5, //GAME_NOTARGETRESOLVE, - 6, //GAME_EXACTCOLOR, - //7 //GAME_NOCOLORCLAMP, - //8 //GAME_FFXHACK, - 9, //GAME_NOALPHAFAIL, - 10, //GAME_NODEPTHUPDATE, - 11, //GAME_QUICKRESOLVE1, - 12, //GAME_NOQUICKRESOLVE, - 13, //GAME_NOTARGETCLUT, - 14, //GAME_NOSTENCIL, - 15, //GAME_NODEPTHRESOLVE, - 16, //GAME_FULL16BITRES, - 17, //GAME_RESOLVEPROMOTED, - 18, //GAME_FASTUPDATE, - 19, //GAME_NOALPHATEST, - 20, //GAME_DISABLEMRTDEPTH, - //21 //GAME_32BITTARGS, - //22 //GAME_PATH3HACK, - //23 //GAME_DOPARALLELCTX, - 24, //GAME_XENOSPECHACK, - //25 //GAME_PARTIALPOINTERS, - 26, //GAME_PARTIALDEPTH, - 27, //GAME_REGETHACK, - 28, //GAME_GUSTHACK, - 29, //GAME_NOLOGZ, - 30, //GAME_AUTOSKIPDRAW -}; - - -char hackDesc[32][64] = -{ - "No hack", - "Texture targs", - "Auto reset", - "Interlace 2x", - "Texa", - "No target resolve", - "Exact color", - "No color clamp", - "Final Fantasy X", - "No alpha fail", - "No depth update", - "Quick resolve 1", - "No Quick resolve", - "No target clut", - "No stencil", - "VSS", - "No depth resolve", - "Full 16 bit resolution", - "Resolve promoted", - "Fast update", - "No alpha test", - "Disable mrt depth", - "Args 32 bit", - "", - "Parallel context", - "Xenosaga spec", - "Partial pointers", - "Partial depth", - "Reget", - "Gust", - "No logz", - "Automatic skip draw" -}; - -struct hacks -{ - bool enabled; - char shortDesc[64]; - char longDesc[256]; -}; - -hacks hack_list[32] = -{ - { true, "No hack", "No hack" }, - { true, "Texture targs", "Tex Target checking - 00000001\nLego Racers" }, - { true, "Auto reset", "Auto reset targs - 00000002\nUse when game is slow and toggling AA fixes it. Samurai Warriors. (Automatically on for Shadow Hearts)" }, - { true, "Interlace 2x", "Interlace 2X - 00000004\nFixes 2x bigger screen. Gradius 3." }, - { false, "Texa", "" }, - { true, "No target resolve", "No target resolves - 00000010\nStops all resolving of targets. Try this first for really slow games. (Automatically on for Dark Cloud 1.)" }, - { true, "Exact color", "Exact color testing - 00000020\nFixes overbright or shadow/black artifacts. Crash 'n Burn." }, - { false, "No color clamp", "No color clamping - 00000040\nSpeeds up games, but might be too bright or too dim." }, - { false, "Final Fantasy X", "" }, - { false, "No alpha fail", "Alpha Fail hack - 00000100\nRemove vertical stripes or other coloring artifacts. Breaks Persona 4 and MGS3. (Automatically on for Sonic Unleashed, Shadow the Hedgehog, & Ghost in the Shell.)" }, - { true, "No depth update", "Disable depth updates - 00000200" }, - { true, "Quick resolve 1", "Resolve Hack #1 - 00000400\n Speeds some games. Kingdom Hearts."}, - { true, "No Quick resolve", "Resolve Hack #2 - 00000800\nShadow Hearts, Urbz. Destroys FFX."}, - { true, "No target clut", "No target CLUT - 00001000\nResident Evil 4, or foggy scenes." }, - { true, "No stencil", "Disable stencil buffer - 00002000\nUsually safe to do for simple scenes. Harvest Moon." }, - { false, "VSS", "" }, - { true, "No depth resolve", "No depth resolve - 00008000\nMight give z buffer artifacts." }, - { true, "Full 16 bit resolution", "Full 16 bit resolution - 00010000\nUse when half the screen is missing." }, - { true, "Resolve promoted", "Resolve Hack #3 - 00020000\nNeopets" }, - { true, "Fast update", "Fast Update - 00040000\n Speeds some games. Needed for Sonic Unleashed. Okami." }, - { true, "No alpha test", "Disable alpha testing - 00080000" }, - { true, "Disable mrt depth", "Enable Multiple RTs - 00100000" }, - { false, "Args 32 bit", "" }, - { false, "Path3", "" }, - { false, "Parallel context", "" }, - { true, "Xenosaga spec", "Specular Highlights - 01000000\nMakes graphics faster by removing highlights. (Automatically on for Xenosaga, Okami, & Okage.)" }, - { false, "Partial pointers", "Partial targets - 02000000" }, - { true, "Partial depth", "Partial depth - 04000000" }, - { false, "Reget", "" }, - { true, "Gust", "Gust fix - 10000000. Makes gust games cleaner and faster. (Automatically on for most Gust games)" }, - { true, "No logz", "No logarithmic Z - 20000000. Could decrease number of Z-artifacts." }, - { true, "Automatic skip draw", "Remove blur effect on some games\nSlow games." } -}; - -void ReportHacks(gameHacks hacks) -{ - for(int i = 0; i < 32; i++) - { - if (hacks._u32 & (1 << i)) - { - ZZLog::WriteLn("'%s' hack enabled.", hackDesc[i+1]); - } - } -} - -void ListHacks() -{ - if ((!conf.disableHacks) && (conf.def_hacks._u32 != 0)) - { - ZZLog::WriteLn("Auto-enabling these hacks:"); - ReportHacks(conf.def_hacks); - } - - if (conf.hacks._u32 != 0) - { - ZZLog::WriteLn("You've manually enabled these hacks:"); - ReportHacks(conf.hacks); - } -} - -void DisplayHack(int hack) -{ - ZZLog::WriteToScreen2("***%d %s", hack, hackDesc[hackList[hack]]); -} - -void ChangeCurrentHack(int hack) -{ - FUNCLOG - - conf.hacks._u32 &= !(hackList[CurrentHack]); - conf.hacks._u32 |= hackList[hack]; - - DisplayHack(hack); - - CurrentHack = hack; - SaveConfig(); - -} - diff --git a/plugins/zzogl-pg-cg/opengl/ZZHacks.h b/plugins/zzogl-pg-cg/opengl/ZZHacks.h deleted file mode 100644 index b4bf03b287..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZHacks.h +++ /dev/null @@ -1,118 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef ZZHACKS_H_INCLUDED -#define ZZHACKS_H_INCLUDED - -#include "PS2Edefs.h" - -// This is a list of the various hacks, and what bit controls them. -// Changing these is not advised unless you know what you are doing. -enum GAME_HACK_OPTIONS -{ - GAME_TEXTURETARGS = 0x00000001, - GAME_AUTORESET = 0x00000002, - GAME_INTERLACE2X = 0x00000004, - GAME_TEXAHACK = 0x00000008, // apply texa to non textured polys - GAME_NOTARGETRESOLVE = 0x00000010, - GAME_EXACTCOLOR = 0x00000020, - GAME_NOCOLORCLAMP = 0x00000040, - GAME_FFXHACK = 0x00000080, - GAME_NOALPHAFAIL = 0x00000100, - GAME_NODEPTHUPDATE = 0x00000200, - GAME_QUICKRESOLVE1 = 0x00000400, - GAME_NOQUICKRESOLVE = 0x00000800, - GAME_NOTARGETCLUT = 0x00001000, // full 16 bit resolution - GAME_NOSTENCIL = 0x00002000, - GAME_VSSHACKOFF = 0x00004000, // vertical stripe syndrome - GAME_NODEPTHRESOLVE = 0x00008000, - GAME_FULL16BITRES = 0x00010000, - GAME_RESOLVEPROMOTED = 0x00020000, - GAME_FASTUPDATE = 0x00040000, - GAME_NOALPHATEST = 0x00080000, - GAME_DISABLEMRTDEPTH = 0x00100000, - GAME_32BITTARGS = 0x00200000, - GAME_PATH3HACK = 0x00400000, - GAME_DOPARALLELCTX = 0x00800000, // tries to parallelize both contexts so that render calls are reduced (xenosaga) - // makes the game faster, but can be buggy - GAME_XENOSPECHACK = 0x01000000, // xenosaga specularity hack (ignore any zmask=1 draws) - GAME_PARTIALPOINTERS = 0x02000000, // whenver the texture or render target are small, tries to look for bigger ones to read from - GAME_PARTIALDEPTH = 0x04000000, // tries to save depth targets as much as possible across height changes - GAME_REGETHACK = 0x08000000, // some sort of weirdness in ReGet() code - GAME_GUSTHACK = 0x10000000, // Needed for Gustgames fast update. - GAME_NOLOGZ = 0x20000000, // Intended for linux -- not logarithmic Z. - GAME_AUTOSKIPDRAW = 0x40000000, // Remove blur effect on some games - GAME_RESERVED_HACK = 0x80000000 -}; - -#define USEALPHATESTING (!(conf.settings().no_alpha_test)) - -typedef union -{ - struct - { - u32 texture_targs : 1; - u32 auto_reset : 1; - u32 interlace_2x : 1; - u32 texa : 1; // apply texa to non textured polys - u32 no_target_resolve : 1; - u32 exact_color : 1; - u32 no_color_clamp : 1; - u32 ffx : 1; - u32 no_alpha_fail : 1; - u32 no_depth_update : 1; - u32 quick_resolve_1 : 1; - u32 no_quick_resolve : 1; - u32 no_target_clut : 1; // full 16 bit resolution - u32 no_stencil : 1; - u32 vss_hack_off : 1; // vertical stripe syndrome - u32 no_depth_resolve : 1; - u32 full_16_bit_res : 1; - u32 resolve_promoted : 1; - u32 fast_update : 1; - u32 no_alpha_test : 1; - u32 disable_mrt_depth : 1; - u32 args_32_bit : 1; - u32 path3 : 1; - u32 parallel_context : 1; // tries to parallelize both contexts so that render calls are reduced (xenosaga) - // makes the game faster, but can be buggy - u32 xenosaga_spec : 1; // xenosaga specularity hack (ignore any zmask=1 draws) - u32 partial_pointers : 1; // whenver the texture or render target are small, tries to look for bigger ones to read from - u32 partial_depth : 1; // tries to save depth targets as much as possible across height changes - u32 reget : 1; // some sort of weirdness in ReGet() code - u32 gust : 1; // Needed for Gustgames fast update. - u32 no_logz : 1; // Intended for linux -- not logarithmic Z. - u32 automatic_skip_draw :1; // allow debug of the automatic skip draw option - u32 reserved2 :1; - }; - u32 _u32; -} gameHacks; - -#define HACK_NUMBER 25 -extern u32 hackList[HACK_NUMBER]; -extern char hackDesc[32][64]; -extern int CurrentHack; - -extern void ReportHacks(gameHacks hacks); -extern void ListHacks(); - -extern void DisplayHack(int hack); -extern void ChangeCurrentHack(int hack); - -#endif // ZZHACKS_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/ZZKeyboard.cpp b/plugins/zzogl-pg-cg/opengl/ZZKeyboard.cpp deleted file mode 100644 index 138ed302f9..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZKeyboard.cpp +++ /dev/null @@ -1,247 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// keyboard functions - -#include "Util.h" -#include "GS.h" -#include "ZZoglShaders.h" -#include "Profile.h" -#include "GLWin.h" - -extern int CurrentSavestate, g_GSMultiThreaded, g_nPixelShaderVer; -extern char *libraryName; -extern const unsigned char zgsversion; -extern unsigned char zgsrevision, zgsbuild, zgsminor; - -extern bool SaveStateExists; - -const char* s_aa[5] = { "AA none |", "AA 2x |", "AA 4x |", "AA 8x |", "AA 16x |" }; -const char* pbilinear[] = { "off", "normal", "forced" }; - -extern void SetAA(int mode); - -extern bool dump_enable; - -void ProcessBilinear() -{ - FUNCLOG - char strtitle[256]; - - if (g_nPixelShaderVer == SHADER_REDUCED) - { - conf.bilinear = 0; - sprintf(strtitle, "reduced shaders don't support bilinear filtering"); - } - else - { - conf.bilinear = (conf.bilinear + 1) % 3; - sprintf(strtitle, "bilinear filtering - %s", pbilinear[conf.bilinear]); - } - ZZLog::WriteToScreen(strtitle); - SaveConfig(); -} - -void ProcessInterlace() -{ - FUNCLOG - - char strtitle[256]; - conf.interlace++; - - if (conf.interlace > 2) conf.interlace = 0; - - if (conf.interlace < 2) - sprintf(strtitle, "interlace on - mode %d", conf.interlace); - else - sprintf(strtitle, "interlace off"); - - ZZLog::WriteToScreen(strtitle); - SaveConfig(); -} - -void ProcessAASetting(bool reverse) -{ - FUNCLOG - - char strtitle[256]; - - if (reverse) - conf.decAA(); - else - conf.incAA(); - - sprintf(strtitle, "anti-aliasing - %s", s_aa[conf.aa]); - SetAA(conf.aa); - ZZLog::WriteToScreen(strtitle); - - SaveConfig(); -} - -void ProcessFPS() -{ - FUNCLOG - g_bDisplayFPS ^= 1; - ZZLog::Debug_Log("Toggled FPS."); -} - -void ProcessWireFrame() -{ - FUNCLOG - char strtitle[256]; - - conf.zz_options.wireframe = !conf.zz_options.wireframe; - glPolygonMode(GL_FRONT_AND_BACK, (conf.wireframe()) ? GL_LINE : GL_FILL); - sprintf(strtitle, "wireframe rendering - %s", (conf.wireframe()) ? "on" : "off"); - ZZLog::WriteToScreen(strtitle); -} - -void ProcessFrameDump() -{ - FUNCLOG - - conf.dump = 1; - - char strtitle[256]; - sprintf(strtitle, "GS dump-frame"); - - ZZLog::WriteToScreen(strtitle); - SaveConfig(); -} - -void ProcessVideoDump() -{ - FUNCLOG - - char strtitle[256]; - - if (conf.dump != 0) { - sprintf(strtitle, "Stop GS dump-video"); - conf.dump = 0; - } else { - sprintf(strtitle, "Start GS dump-video"); - conf.dump = 3; - } - - ZZLog::WriteToScreen(strtitle); - SaveConfig(); -} - -void ProcessHackSetting(bool reverse) -{ - FUNCLOG - - int hack = CurrentHack; - - if (reverse) - { - hack--; - - if (hack < 0) hack = HACK_NUMBER - 1; - } - else - { - hack++; - - if (hack >= HACK_NUMBER) hack = 0; - } - ChangeCurrentHack(hack); - - SaveConfig(); -} - -void ProcessSaveState() -{ - FUNCLOG - char strtitle[256]; - sprintf(strtitle, "Saving in savestate %d", CurrentSavestate); - SaveStateExists = true; - if (CurrentHack != 0) DisplayHack(CurrentHack); -} - -void OnFKey(int key, int shift) -{ - switch(key) - { - //case 1: - // ProcessSaveState(); - // break; - case 5: - if (shift) - ProcessBilinear(); - else - ProcessInterlace(); - break; - case 6: - if (shift) - ProcessAASetting(true); - else - ProcessAASetting(false); - break; - case 7: - if (!shift) - ProcessFPS(); - else - ProcessWireFrame(); - break; - case 9: -#ifdef _DEBUG - // Fn keys are a bit overload... I don't have a better idea --Gregory - if (shift) - ProcessVideoDump(); - else - ProcessFrameDump(); -#else - if (shift) - ProcessHackSetting(true); - else - ProcessHackSetting(false); - break; -#endif - default: - break; - } -} - -void WriteAA() -{ - if (conf.aa != 0) - { - char strtitle[64]; - sprintf(strtitle, "anti-aliasing - %s", s_aa[conf.aa]); - ZZLog::WriteToScreen(strtitle, 1000); - } -} - -void WriteBilinear() -{ - switch (conf.bilinear) - { - case 2: - ZZLog::WriteToScreen("bilinear filtering - forced", 1000); - break; - - case 1: - ZZLog::WriteToScreen("bilinear filtering - normal", 1000); - break; - - default: - break; - } -} diff --git a/plugins/zzogl-pg-cg/opengl/ZZLog.cpp b/plugins/zzogl-pg-cg/opengl/ZZLog.cpp deleted file mode 100644 index 6eac6bf3f9..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZLog.cpp +++ /dev/null @@ -1,342 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include -#include "ZZLog.h" -#include -#include - -extern GSconf conf; - -using namespace std; - -static list listMsgs; - -void ProcessMessages() -{ - FUNCLOG - - if (listMsgs.size() > 0) - { - int left = 25, top = 15; - list::iterator it = listMsgs.begin(); - - while (it != listMsgs.end()) - { - DrawText(it->str, left + 1, top + 1, 0xff000000); - DrawText(it->str, left, top, 0xffffff30); - top += 15; - - if ((int)(it->dwTimeStamp - timeGetTime()) < 0) - it = listMsgs.erase(it); - else ++it; - } - } -} - -void ZZAddMessage(const char* pstr, u32 ms) -{ - FUNCLOG - listMsgs.push_back(MESSAGE(pstr, timeGetTime() + ms)); - ZZLog::Log("%s\n", pstr); -} - -namespace ZZLog -{ -std::string s_strLogPath("logs"); -FILE *gsLog; - -bool IsLogging() -{ - // gsLog can be null if the config dialog is used prior to Pcsx2 starting an emulation session. - // (GSinit won't have been called then) - return (gsLog != NULL && conf.log); -} - -void Open() -{ - const std::string LogFile(s_strLogPath + "/GSzzogl.log"); - - gsLog = fopen(LogFile.c_str(), "w"); - if (gsLog != NULL) - setvbuf(gsLog, NULL, _IONBF, 0); - else - SysMessage("Can't create log file %s\n", LogFile.c_str()); - -} - -void Close() -{ - if (gsLog != NULL) { - fclose(gsLog); - gsLog = NULL; - } -} - -void SetDir(const char* dir) -{ - // Get the path to the log directory. - s_strLogPath = (dir==NULL) ? "logs" : dir; - - // Reload previously open log file - if (gsLog) { - Close(); - Open(); - } -} - -void WriteToScreen(const char* pstr, u32 ms) -{ - ZZAddMessage(pstr, ms); -} - -void WriteToScreen2(const char* fmt, ...) -{ - va_list list; - char tmp[512]; - - va_start(list, fmt); - vsprintf(tmp, fmt, list); - va_end(list); - - ZZAddMessage(tmp, 5000); -} - -void _Message(const char *str) -{ - SysMessage(str); -} - -void _WriteToConsole(const char *str) -{ - fprintf(stderr,"ZZogl-PG: %s", str); -} - -void Message(const char *fmt, ...) -{ - va_list list; - char tmp[512]; - - va_start(list, fmt); - vsprintf(tmp, fmt, list); - va_end(list); - - SysMessage(tmp); -} - -void Log(const char *fmt, ...) -{ - va_list list; - - va_start(list, fmt); - - if (IsLogging()) vfprintf(gsLog, fmt, list); - - va_end(list); -} - -void WriteToConsole(const char *fmt, ...) -{ - va_list list; - - va_start(list, fmt); - - fprintf(stderr, "ZZogl-PG: "); - vfprintf(stderr, fmt, list); - va_end(list); -} - -void Print(const char *fmt, ...) -{ - va_list list; - - va_start(list, fmt); - - if (IsLogging()) vfprintf(gsLog, fmt, list); - - fprintf(stderr, "ZZogl-PG: "); - vfprintf(stderr, fmt, list); - - va_end(list); -} - - -void WriteLn(const char *fmt, ...) -{ - va_list list; - - va_start(list, fmt); - - if (IsLogging()) vfprintf(gsLog, fmt, list); - - fprintf(stderr, "ZZogl-PG: "); - vfprintf(stderr, fmt, list); - va_end(list); - fprintf(stderr,"\n"); -} - -void Greg_Log(const char *fmt, ...) -{ -#if defined(WRITE_GREG_LOGS) - va_list list; - char tmp[512]; - - va_start(list, fmt); - - if (IsLogging()) { - fprintf(gsLog, "GRegs: "); - vfprintf(gsLog, fmt, list); - } - //fprintf(stderr,"GRegs: "); - //vfprintf(stderr, fmt, list); - - va_end(list); - - if (IsLogging()) fprintf(gsLog, "\n"); - //fprintf(stderr,"\n"); -#endif -} - -void Prim_Log(const char *fmt, ...) -{ -#if defined(ZEROGS_DEVBUILD) && defined(WRITE_PRIM_LOGS) - va_list list; - char tmp[512]; - - va_start(list, fmt); - - if (conf.log /*& 0x00000010*/) - { - if (IsLogging()) vfprintf(gsLog, fmt, list); - - fprintf(stderr, "ZZogl-PG(PRIM): "); - vfprintf(stderr, fmt, list); - - vprintf(fmt, list); - } - - va_end(list); - fprintf(stderr,"\n"); - -#endif -} - -void GS_Log(const char *fmt, ...) -{ -#ifdef ZEROGS_DEVBUILD - va_list list; - - va_start(list, fmt); - - if (IsLogging()) - { - vfprintf(gsLog, fmt, list); - fprintf(gsLog, "\n"); - } - - fprintf(stderr, "ZZogl-PG: "); - vfprintf(stderr, fmt, list); - fprintf(stderr, "\n"); - - va_end(list); -#endif -} - -void Warn_Log(const char *fmt, ...) -{ -#ifdef ZEROGS_DEVBUILD - va_list list; - - va_start(list, fmt); - - if (IsLogging()) - { - vfprintf(gsLog, fmt, list); - fprintf(gsLog, "\n"); - } - - fprintf(stderr, "ZZogl-PG: "); - vfprintf(stderr, fmt, list); - fprintf(stderr, "\n"); - - va_end(list); -#endif -} - -void Dev_Log(const char *fmt, ...) -{ -#ifdef ZEROGS_DEVBUILD - va_list list; - - va_start(list, fmt); - - if (IsLogging()) - { - vfprintf(gsLog, fmt, list); - fprintf(gsLog, "\n"); - } - - fprintf(stderr, "ZZogl-PG: "); - vfprintf(stderr, fmt, list); - fprintf(stderr, "\n"); - - va_end(list); -#endif -} - -void Debug_Log(const char *fmt, ...) -{ -#ifdef _DEBUG - va_list list; - - va_start(list, fmt); - - if (IsLogging()) - { - vfprintf(gsLog, fmt, list); - fprintf(gsLog, "\n"); - } - - fprintf(stderr, "ZZogl-PG: "); - vfprintf(stderr, fmt, list); - fprintf(stderr, "\n"); - - va_end(list); -#endif -} - -void Error_Log(const char *fmt, ...) -{ - va_list list; - - va_start(list, fmt); - - if (IsLogging()) - { - vfprintf(gsLog, fmt, list); - fprintf(gsLog, "\n"); - } - - fprintf(stderr, "ZZogl-PG: "); - vfprintf(stderr, fmt, list); - fprintf(stderr, "\n"); - - va_end(list); -} -}; diff --git a/plugins/zzogl-pg-cg/opengl/ZZLog.h b/plugins/zzogl-pg-cg/opengl/ZZLog.h deleted file mode 100644 index 8028598ad6..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZLog.h +++ /dev/null @@ -1,201 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef ZZLOG_H_INCLUDED -#define ZZLOG_H_INCLUDED - -#include "Util.h" -#include - -extern void HandleGLError(); - -//Logging for errors that are called often should have a time counter. -#ifdef __linux__ -static u32 __attribute__((unused)) lasttime = 0; -static u32 __attribute__((unused)) BigTime = 5000; -static bool __attribute__((unused)) SPAM_PASS; -#else -static u32 lasttime = 0; -static u32 BigTime = 5000; -static bool SPAM_PASS; -#endif - -#define ERROR_LOG_SPAM(text) { \ - if( timeGetTime() - lasttime > BigTime ) { \ - ZZLog::Error_Log(text); \ - lasttime = timeGetTime(); \ - } \ -} -// The same macro with one-argument substitution. -#define ERROR_LOG_SPAMA(fmt, value) { \ - if( timeGetTime() - lasttime > BigTime ) { \ - ZZLog::Error_Log(fmt, value); \ - lasttime = timeGetTime(); \ - } \ -} - -#define ERROR_LOG_SPAM_TEST(text) {\ - if( timeGetTime() - lasttime > BigTime ) { \ - ZZLog::Error_Log(text); \ - lasttime = timeGetTime(); \ - SPAM_PASS = true; \ - } \ - else \ - SPAM_PASS = false; \ -} - -#if DEBUG_PROF -#define FILE_IS_IN_CHECK ((strcmp(__FILE__, "targets.cpp") == 0) || (strcmp(__FILE__, "ZZoglFlush.cpp") == 0)) - -#define FUNCLOG {\ - static bool Was_Here = false; \ - static unsigned long int waslasttime = 0; \ - if (!Was_Here && FILE_IS_IN_CHECK) { \ - Was_Here = true;\ - ZZLog::Error_Log("%s:%d %s", __FILE__, __LINE__, __func__); \ - waslasttime = timeGetTime(); \ - } \ - if (FILE_IS_IN_CHECK && (timeGetTime() - waslasttime > BigTime )) { \ - Was_Here = false; \ - } \ -} -#else -#define FUNCLOG -#endif - -//#define WRITE_GREG_LOGS -//#define WRITE_PRIM_LOGS -#if defined(_DEBUG) && !defined(ZEROGS_DEVBUILD) -#define ZEROGS_DEVBUILD -#endif - - -// sends a message to output window if assert fails -#define BMSG(x, str) { if( !(x) ) { ZZLog::Log(str); ZZLog::Log(str); } } -#define BMSG_RETURN(x, str) { if( !(x) ) { ZZLog::Log(str); ZZLog::Log(str); return; } } -#define BMSG_RETURNX(x, str, rtype) { if( !(x) ) { ZZLog::Log(str); ZZLog::Log(str); return (##rtype); } } -#define B(x) { if( !(x) ) { ZZLog::Log(_#x"\n"); ZZLog::Log(#x"\n"); } } -#define B_RETURN(x) { if( !(x) ) { ZZLog::Error_Log("%s:%d: %s", __FILE__, (u32)__LINE__, #x); return; } } -#define B_RETURNX(x, rtype) { if( !(x) ) { ZZLog::Error_Log("%s:%d: %s", __FILE__, (u32)__LINE__, #x); return (##rtype); } } -#define B_G(x, action) { if( !(x) ) { ZZLog::Error_Log("%s:%d: %s", __FILE__, (u32)__LINE__, #x); action; } } - -#define GL_REPORT_ERROR() \ -{ \ - GLenum err = glGetError(); \ - if( err != GL_NO_ERROR ) \ - { \ - ZZLog::Error_Log("%s:%d: gl error %s(0x%x)", __FILE__, (int)__LINE__, error_name(err), err); \ - HandleGLError(); \ - } \ -} - -#ifdef _DEBUG -# define GL_REPORT_ERRORD() \ -{ \ - GLenum err = glGetError(); \ - if( err != GL_NO_ERROR ) \ - { \ - ZZLog::Error_Log("%s:%d: gl error %s (0x%x)", __FILE__, (int)__LINE__, error_name(err), err); \ - /* HandleGLError();*/ \ - } \ -} -#else -# define GL_REPORT_ERRORD() -#endif - - -inline const char *error_name(int err) -{ - switch (err) - { - case GL_NO_ERROR: - return "GL_NO_ERROR"; - - case GL_INVALID_ENUM: - return "GL_INVALID_ENUM"; - - case GL_INVALID_VALUE: - return "GL_INVALID_VALUE"; - - case GL_INVALID_OPERATION: - return "GL_INVALID_OPERATION"; - - case GL_STACK_OVERFLOW: - return "GL_STACK_OVERFLOW"; - - case GL_STACK_UNDERFLOW: - return "GL_STACK_UNDERFLOW"; - - case GL_OUT_OF_MEMORY: - return "GL_OUT_OF_MEMORY"; - - case GL_TABLE_TOO_LARGE: - return "GL_TABLE_TOO_LARGE"; - - case GL_INVALID_FRAMEBUFFER_OPERATION: - return "GL_INVALID_FRAMEBUFFER_OPERATION"; - - default: - return "Unknown GL error"; - } -} - -struct MESSAGE -{ - MESSAGE() {} - - MESSAGE(const char* p, u32 dw) { strcpy(str, p); dwTimeStamp = dw; } - - char str[255]; - u32 dwTimeStamp; -}; - -extern void DrawText(const char* pstr, int left, int top, u32 color); -extern void __LogToConsole(const char *fmt, ...); - -extern void ZZAddMessage(const char* pstr, u32 ms = 5000); -extern void StartCapture(); -extern void StopCapture(); - - -namespace ZZLog -{ -extern bool IsLogging(); -void SetDir(const char* dir); -extern void Open(); -extern void Close(); -extern void Message(const char *fmt, ...); -extern void Log(const char *fmt, ...); -void WriteToScreen(const char* pstr, u32 ms = 5000); -void WriteToScreen2(const char* pstr, ...); -extern void WriteToConsole(const char *fmt, ...); -extern void Print(const char *fmt, ...); -extern void WriteLn(const char *fmt, ...); - -extern void Greg_Log(const char *fmt, ...); -extern void Prim_Log(const char *fmt, ...); -extern void GS_Log(const char *fmt, ...); - -extern void Debug_Log(const char *fmt, ...); -extern void Dev_Log(const char *fmt, ...); -extern void Warn_Log(const char *fmt, ...); -extern void Error_Log(const char *fmt, ...); -}; - -#endif // ZZLOG_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglCRTC.cpp b/plugins/zzogl-pg-cg/opengl/ZZoglCRTC.cpp deleted file mode 100644 index 152601321f..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglCRTC.cpp +++ /dev/null @@ -1,895 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// Realisation of RenderCRTC function ONLY. -// It draw picture direct on screen, so here we have interlacing and frame skipping. - -//------------------ Includes - #include "Util.h" -#include "ZZoglCRTC.h" -#include "GLWin.h" -#include "ZZoglShaders.h" -#include "ZZoglShoots.h" -#include "ZZoglDrawing.h" -#include "rasterfont.h" // simple font -#include -#include "ZZoglVB.h" - -//------------------ Defines -#if !defined(ZEROGS_DEVBUILD) -#define g_bSaveFrame 0 -#define g_bSaveFinalFrame 0 -#else -bool g_bSaveFrame = 0; // saves the current psurfTarget -bool g_bSaveFinalFrame = 0; // saves the input to the CRTC -#endif // !defined(ZEROGS_DEVBUILD) - -extern int maxmin; -extern bool g_bCRTCBilinear; -bool g_bDisplayFPS = false; -int g_nFrameRender = 10, g_nFramesSkipped = 0, s_nResolved = 0; // s_nResolved == number of targets resolved this frame -// Helper for skip frames. -int TimeLastSkip = 0; - -vector s_vecTempTextures; // temporary textures, released at the end of every frame - -// Snapshot variables. -extern bool g_bMakeSnapshot; -extern string strSnapshot; - -extern void ExtWrite(); -extern void ZZDestroy(); -extern void ChangeDeviceSize(int nNewWidth, int nNewHeight); - -extern GLuint vboRect; -// Adjusts vertex shader BitBltPos vector v to preserve aspect ratio. It used to emulate 4:3 or 16:9. -void AdjustTransToAspect(float4& v) -{ - double temp; - float f; - const float mult = 1 / 32767.0f; - - if (conf.width * GLWin.backbuffer.h > conf.height * GLWin.backbuffer.w) // limited by width - { - // change in ratio - f = ((float)GLWin.backbuffer.w / (float)conf.width) / ((float)GLWin.backbuffer.h / (float)conf.height); - v.y *= f; - v.w *= f; - - // scanlines mess up when not aligned right - v.y += (1 - (float)modf(v.y * (float)GLWin.backbuffer.h * 0.5f + 0.05f, &temp)) * 2.0f / (float)GLWin.backbuffer.h; - v.w += (1 - (float)modf(v.w * (float)GLWin.backbuffer.h * 0.5f + 0.05f, &temp)) * 2.0f / (float)GLWin.backbuffer.h; - } - else // limited by height - { - f = ((float)GLWin.backbuffer.h / (float)conf.height) / ((float)GLWin.backbuffer.w / (float)conf.width); - f -= (float)modf(f * GLWin.backbuffer.w, &temp) / (float)GLWin.backbuffer.w; - v.x *= f; - v.z *= f; - } - - v *= mult; -} - -inline bool FrameSkippingHelper() -{ - bool ShouldSkip = false; - - if (g_nFrameRender > 0) - { - if (g_nFrameRender < 8) - { - g_nFrameRender++; - - if (g_nFrameRender <= 3) - { - g_nFramesSkipped++; - ShouldSkip = true; - } - } - } - else - { - if (g_nFrameRender < -1) - { - g_nFramesSkipped++; - ShouldSkip = true; - } - - g_nFrameRender--; - } - -#if defined _DEBUG - if (timeGetTime() - TimeLastSkip > 15000 && ShouldSkip) - { - ZZLog::Debug_Log("ZZogl Skipped frames."); - TimeLastSkip = timeGetTime(); - } -#endif - - return ShouldSkip; -} - -// helper function for save frame in picture. -inline void FrameSavingHelper() -{ - if (g_bSaveFrame) - { - if (vb[0].prndr != NULL) - { - SaveTexture("frame1.tga", GL_TEXTURE_RECTANGLE_NV, vb[0].prndr->ptex, RW(vb[0].prndr->fbw), RH(vb[0].prndr->fbh)); - } - - if (vb[1].prndr != NULL && vb[0].prndr != vb[1].prndr) - { - SaveTexture("frame2.tga", GL_TEXTURE_RECTANGLE_NV, vb[1].prndr->ptex, RW(vb[1].prndr->fbw), RH(vb[1].prndr->fbh)); - } - -#ifdef _WIN32 - else - { - DeleteFile(L"frame2.tga"); - } -#endif - } -} - -// Function populated tex0Info[2] array -inline void FrameObtainDispinfo(u32 bInterlace, tex0Info* dispinfo) -{ - for (int i = 0; i < 2; ++i) - { - - if (!(*(u32*)(PMODE) & (1 << i))) - { - dispinfo[i].tw = 0; - dispinfo[i].th = 0; - continue; - } - - GSRegDISPFB* pfb = i ? DISPFB2 : DISPFB1; - GSRegDISPLAY* pd = i ? DISPLAY2 : DISPLAY1; - int magh = pd->MAGH + 1; - int magv = pd->MAGV + 1; - - dispinfo[i].tbp0 = pfb->FBP << 5; - dispinfo[i].tbw = pfb->FBW << 6; - dispinfo[i].tw = (pd->DW + 1) / magh; - dispinfo[i].th = (pd->DH + 1) / magv; - dispinfo[i].psm = pfb->PSM; - - // hack!! - // 2 * dispinfo[i].tw / dispinfo[i].th <= 1, metal slug 4 - - if (bInterlace && 2 * dispinfo[i].tw / dispinfo[i].th <= 1 && !(conf.settings().interlace_2x)) - { - dispinfo[i].th >>= 1; - } - } -} - -extern bool s_bWriteDepth; - -// Something should be done before Renderering the picture. -inline void RenderStartHelper(u32 bInterlace) -{ - if (conf.mrtdepth && pvs[8] == NULL) - { - conf.mrtdepth = 0; - s_bWriteDepth = false; - - ZZLog::Debug_Log("Disabling MRT depth writing\n"); - } - - FlushBoth(); - - FrameSavingHelper(); - - if (s_RangeMngr.ranges.size() > 0) FlushTransferRanges(NULL); - - SetShaderCaller("RenderStartHelper"); - - // reset fba after every frame - vb[0].fba.fba = 0; - vb[1].fba.fba = 0; - - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); // switch to the backbuffer - - glViewport(0, 0, GLWin.backbuffer.w, GLWin.backbuffer.h); - - // if interlace, only clear every other vsync - if (!bInterlace) - { - //u32 color = COLOR_ARGB(0, BGCOLOR->R, BGCOLOR->G, BGCOLOR->B); - glClear(GL_COLOR_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - } - - ZZshSetVertexShader(pvsBitBlt.prog); - - glBindBuffer(GL_ARRAY_BUFFER, vboRect); - SET_STREAM(); - GL_REPORT_ERRORD(); - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - DisableAllgl(); - - GL_REPORT_ERRORD(); - - if (bInterlace) g_PrevBitwiseTexX = -1; // reset since will be using -} - -// Settings for interlace texture multiplied vector; -// The idea is: (x, y) -- position on screen, then interlaced texture get F = 1 or 0 depending -// on image y coords. So if we write valpha.z * F + valpha.w + 0.5, it would be switching odd -// and even strings at each frame. -// valpha.x and y are used for image blending. -inline float4 RenderGetForClip(u32 bInterlace, int interlace, int psm, FRAGMENTSHADER* prog) -{ - SetShaderCaller("RenderGetForClip"); - - float4 valpha; - // first render the current render targets, then from ptexMem - - if (psm == 1) - { - valpha.x = 1; - valpha.y = 0; - } - else - { - valpha.x = 0; - valpha.y = 1; - } - - if (bInterlace) - { - if (interlace == (conf.interlace & 1)) - { - // pass if odd - valpha.z = 1.0f; - valpha.w = -0.4999f; - } - else - { - // pass if even - valpha.z = -1.0f; - valpha.w = 0.5001f; - } - } - else - { - // always pass interlace test - valpha.z = 0; - valpha.w = 1; - } - - ZZshSetParameter4fv(prog->prog, prog->sOneColor, valpha, "g_fOneColor"); - - return valpha; -} - -// Put interlaced texture in use for shader prog. -// Note: if frame interlaced it's th is halved, so we should x2 it. -inline void RenderCreateInterlaceTex(u32 bInterlace, int th, FRAGMENTSHADER* prog) -{ - if (!bInterlace) return; - - int interlacetex = CreateInterlaceTex(2 * th); - - ZZshGLSetTextureParameter(prog->prog, prog->sInterlace, interlacetex, "Interlace"); -} - -// Well, do blending setup prior to second pass of half-frame drawing -inline void RenderSetupBlending() -{ - // setup right blending - glEnable(GL_BLEND); - zgsBlendEquationSeparateEXT(GL_FUNC_ADD, GL_FUNC_ADD); - - if (PMODE->MMOD) - { - glBlendColorEXT(PMODE->ALP*(1 / 255.0f), PMODE->ALP*(1 / 255.0f), PMODE->ALP*(1 / 255.0f), 0.5f); - s_srcrgb = GL_CONSTANT_COLOR_EXT; - s_dstrgb = GL_ONE_MINUS_CONSTANT_COLOR_EXT; - } - else - { - s_srcrgb = GL_SRC_ALPHA; - s_dstrgb = GL_ONE_MINUS_SRC_ALPHA; - } - - if (PMODE->AMOD) - { - s_srcalpha = GL_ZERO; - s_dstalpha = GL_ONE; - } - else - { - s_srcalpha = GL_ONE; - s_dstalpha = GL_ZERO; - } - - zgsBlendFuncSeparateEXT(s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha); -} - -// each frame could be drawn in two stages, so blending should be different for them -inline void RenderSetupStencil(int i) -{ - glStencilMask(1 << i); - s_stencilmask = 1 << i; - GL_STENCILFUNC_SET(); -} - -// do stencil check for each found target i -- texturing stage -inline void RenderUpdateStencil(int i, bool* bUsingStencil) -{ - if (!(*bUsingStencil)) glClear(GL_STENCIL_BUFFER_BIT); - - *bUsingStencil = 1; - - glEnable(GL_STENCIL_TEST); - GL_STENCILFUNC(GL_NOTEQUAL, 3, 1 << i); - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - glStencilMask(1 << i); -} - -// CRTC24 could not be rendered -inline void RenderCRTC24helper(u32 bInterlace, int interlace, int psm) -{ - ZZLog::Debug_Log("ZZogl: CRTC24!!! I'm trying to show something."); - SetShaderCaller("RenderCRTC24helper"); - // assume that data is already in ptexMem (do Resolve?) - RenderGetForClip(bInterlace, interlace, psm, &ppsCRTC24[bInterlace]); - ZZshSetPixelShader(ppsCRTC24[bInterlace].prog); - - DrawTriangleArray(); -} - -// Maybe I do this function global-defined. Calculate bits per pixel for -// each psm. It's the only place with PSMCT16 which have a different bpp. -// FIXME: check PSMCT16S -inline int RenderGetBpp(int psm) -{ - if (psm == PSMCT16S) - { - //ZZLog::Debug_Log("ZZogl: 16S target."); - return 3; - } - - if (PSMT_ISHALF(psm)) return 2; - - return 4; -} - -// We want to draw ptarg on screen, that could be disaligned to viewport. -// So we do aligning it by height. -inline int RenderGetOffsets(int* dby, int* movy, tex0Info& texframe, CRenderTarget* ptarg, int bpp) -{ - *dby += (256 / bpp) * (texframe.tbp0 - ptarg->fbp) / texframe.tbw; - - if (*dby < 0) - { - *movy = -*dby; - *dby = 0; - } - - return min(ptarg->fbh - *dby, texframe.th - *movy); -} - -// BltBit shader calculate vertex (4 coord's pixel) position at the viewport. -inline float4 RenderSetTargetBitPos(int dh, int th, int movy, bool isInterlace) -{ - SetShaderCaller("RenderSetTargetBitPos"); - float4 v; - // dest rect - v.x = 1; - v.y = dh / (float)th; - v.z = 0; - v.w = 1 - v.y; - - if (movy > 0) v.w -= movy / (float)th; - - AdjustTransToAspect(v); - - if (isInterlace) - { - // move down by 1 pixel - v.w += 1.0f / (float)dh ; - } - - ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.sBitBltPos, v, "g_fBitBltPos"); - - return v; -} - -// Important stuff. We could use these coordinates to change viewport position on the frame. -// For example, use tw / X and tw / X magnify the viewport. -// Interlaced output is little out of VB, it could be seen as an evil blinking line on top -// and bottom, so we try to remove it. -inline float4 RenderSetTargetBitTex(float th, float tw, float dh, float dw, bool isInterlace) -{ - SetShaderCaller("RenderSetTargetBitTex"); - - float4 v; - v = float4(th, tw, dh, dw); - - // Incorrect Aspect ratio on interlaced frames - - if (isInterlace) - { - v.y -= 1.0f / conf.height; - v.w += 1.0f / conf.height; - } - - ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.sBitBltTex, v, "g_fBitBltTex"); - - return v; -} - -// Translator for POSITION coordinates (-1.0:+1.0f at x axis, +1.0f:-1.0y at y) into target frame ones. -// We don't need x coordinate, because interlacing is y-axis only. -inline float4 RenderSetTargetBitTrans(int th) -{ - SetShaderCaller("RenderSetTargetBitTrans"); - float4 v = float4(float(th), -float(th), float(th), float(th)); - ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.fBitBltTrans, v, "g_fBitBltTrans"); - return v; -} - -// use g_fInvTexDims to store inverse texture dims -// Seems, that Targ shader does not use it -inline float4 RenderSetTargetInvTex(int bInterlace, int tw, int th, FRAGMENTSHADER* prog) -{ - SetShaderCaller("RenderSetTargetInvTex"); - - float4 v = float4(0, 0, 0, 0); - - if (prog->sInvTexDims) - { - v.x = 1.0f / (float)tw; - v.y = 1.0f / (float)th; - v.z = (float)0.0; - v.w = -0.5f / (float)th; - ZZshSetParameter4fv(prog->prog, prog->sInvTexDims, v, "g_fInvTexDims"); - } - - return v; -} - -// Metal Slug 5 hack (as was written). If target tbp not equal to framed fbp, than we look for a better possibility, -// Note, than after true result iterator it could not be used. -inline bool RenderLookForABetterTarget(int fbp, int tbp, list& listTargs, list::iterator& it) -{ - if (fbp == tbp) return false; - - // look for a better target (metal slug 5) - list::iterator itbetter; - - for (itbetter = listTargs.begin(); itbetter != listTargs.end(); ++itbetter) - { - if ((*itbetter)->fbp == tbp) break; - } - - if (itbetter != listTargs.end()) - { - it = listTargs.erase(it); - return true; - } - - return false; -} - -inline void RenderCheckForMemory(tex0Info& texframe, list& listTargs, int i, bool* bUsingStencil, int interlace, int bInterlace); - -// First try to draw frame from targets. -inline void RenderCheckForTargets(tex0Info& texframe, list& listTargs, int i, bool* bUsingStencil, int interlace, int bInterlace) -{ - // get the start and end addresses of the buffer - int bpp = RenderGetBpp(texframe.psm); - GSRegDISPFB* pfb = i ? DISPFB2 : DISPFB1; - - int start, end; - GetRectMemAddress(start, end, texframe.psm, 0, 0, texframe.tw, texframe.th, texframe.tbp0, texframe.tbw); - - // We need share list of targets between functions - s_RTs.GetTargs(start, end, listTargs); - - for (list::iterator it = listTargs.begin(); it != listTargs.end();) - { - CRenderTarget* ptarg = *it; - - if (ptarg->fbw == texframe.tbw && !(ptarg->status&CRenderTarget::TS_NeedUpdate) && ((256 / bpp)*(texframe.tbp0 - ptarg->fbp)) % texframe.tbw == 0) - { - int dby = pfb->DBY; - int movy = 0; - - if (RenderLookForABetterTarget(ptarg->fbp, texframe.tbp0, listTargs, it)) continue; - - if (g_bSaveFinalFrame) SaveTexture("frame1.tga", GL_TEXTURE_RECTANGLE_NV, ptarg->ptex, RW(ptarg->fbw), RH(ptarg->fbh)); - - // determine the rectangle to render - int dh = RenderGetOffsets(&dby, &movy, texframe, ptarg, bpp); - - if (dh >= 64) - { - - if (ptarg->fbh - dby < texframe.th - movy && !(*bUsingStencil)) - RenderUpdateStencil(i, bUsingStencil); - else if (ptarg->fbh - dby > 2 * ( texframe.th - movy )) - { - // Sometimes calculated position onscreen is misaligned, ie in FFX-2 intro. In such case some part of image are out of - // border's and we should move it manually. - dby -= ((ptarg->fbh - dby) >> 2) - ((texframe.th + movy) >> 1) ; - } - - SetShaderCaller("RenderCheckForTargets"); - - // Texture - float4 v = RenderSetTargetBitTex((float)RW(texframe.tw), (float)RH(dh), (float)RW(pfb->DBX), (float)RH(dby), INTERLACE_COUNT); - - // dest rect - v = RenderSetTargetBitPos(dh, texframe.th, movy, INTERLACE_COUNT); - v = RenderSetTargetBitTrans(ptarg->fbh); - v = RenderSetTargetInvTex(bInterlace, texframe.tbw, ptarg->fbh, &ppsCRTCTarg[bInterlace]) ; // FIXME. This is no use - - float4 valpha = RenderGetForClip(bInterlace, interlace, texframe.psm, &ppsCRTCTarg[bInterlace]); - - // inside vb[0]'s target area, so render that region only - ZZshGLSetTextureParameter(ppsCRTCTarg[bInterlace].prog, ppsCRTCTarg[bInterlace].sFinal, ptarg->ptex, "CRTC target"); - RenderCreateInterlaceTex(bInterlace, texframe.th, &ppsCRTCTarg[bInterlace]); - - ZZshSetPixelShader(ppsCRTCTarg[bInterlace].prog); - - DrawTriangleArray(); - - if (abs(dh - (int)texframe.th) <= 1) return; - - if (abs(dh - (int)ptarg->fbh) <= 1) - { - it = listTargs.erase(it); - continue; - } - } - } - - ++it; - } - RenderCheckForMemory(texframe, listTargs, i, bUsingStencil, interlace, bInterlace); -} - - -// The same as the previous, but from memory. -// If you ever wondered why a picture from a minute ago suddenly flashes on the screen (say, in Mana Khemia), -// this is the function that does it. -inline void RenderCheckForMemory(tex0Info& texframe, list& listTargs, int i, bool* bUsingStencil, int interlace, int bInterlace) -{ - float4 v; - - for (list::iterator it = listTargs.begin(); it != listTargs.end(); ++it) - { - (*it)->Resolve(); - } - - // context has to be 0 - if (bInterlace >= 2) ZZLog::Error_Log("CRCR Check for memory shader fault."); - - //if (!(*bUsingStencil)) RenderUpdateStencil(i, bUsingStencil); - - SetShaderCaller("RenderCheckForMemory"); - - float w1, h1, w2, h2; - if (g_bCRTCBilinear) - { - w1 = texframe.tw; - h1 = texframe.th; - w2 = -0.5f; - h2 = -0.5f; - SetTexVariablesInt(0, 2, texframe, false, &ppsCRTC[bInterlace], 1); - } - else - { - w1 = 1; - h1 = 1; - w2 = -0.5f / (float)texframe.tw; - h2 = -0.5f / (float)texframe.th; - SetTexVariablesInt(0, 0, texframe, false, &ppsCRTC[bInterlace], 1); - } - - if (g_bSaveFinalFrame) SaveTex(&texframe, g_bSaveFinalFrame - 1 > 0); - - // Fixme: Why is this here? - // We should probably call RenderSetTargetBitTex instead. - v = RenderSetTargetBitTex(w1, h1, w2, h2, INTERLACE_COUNT); - - // finally render from the memory (note that the stencil buffer will keep previous regions) - v = RenderSetTargetBitPos(1, 1, 0, INTERLACE_COUNT); - v = RenderSetTargetBitTrans(texframe.th); - v = RenderSetTargetInvTex(bInterlace, texframe.tw, texframe.th, &ppsCRTC[bInterlace]); - float4 valpha = RenderGetForClip(bInterlace, interlace, texframe.psm, &ppsCRTC[bInterlace]); - - ZZshGLSetTextureParameter(ppsCRTC[bInterlace].prog, ppsCRTC[bInterlace].sMemory, vb[0].pmemtarg->ptex->tex, "CRTC memory"); - RenderCreateInterlaceTex(bInterlace, texframe.th, &ppsCRTC[bInterlace]); - ZZshSetPixelShader(ppsCRTC[bInterlace].prog); - - DrawTriangleArray(); -} - -extern RasterFont* font_p; - -void DrawText(const char* pstr, int left, int top, u32 color) -{ - FUNCLOG - ZZshGLDisableProfile(); - - float4 v; - v.SetColor(color); - glColor3f(v.z, v.y, v.x); - - font_p->printString(pstr, left * 2.0f / (float)GLWin.backbuffer.w - 1, 1 - top * 2.0f / (float)GLWin.backbuffer.h, 0); - ZZshGLEnableProfile(); -} - -// Put FPS counter on screen (not in window title) -inline void DisplayFPS() -{ - char str[64]; - int left = 10, top = 15; - sprintf(str, "%.1f fps", fFPS); - - DrawText(str, left + 1, top + 1, 0xff000000); - DrawText(str, left, top, 0xffc0ffff); -} - -// SnapeShoot helper -inline void MakeSnapshot() -{ - - if (!g_bMakeSnapshot) return; - - char str[64]; - int left = 200, top = 15; - sprintf(str, "ZeroGS %d.%d.%d - %.1f fps %s", zgsrevision, zgsbuild, zgsminor, fFPS, s_frameskipping ? " - frameskipping" : ""); - - DrawText(str, left + 1, top + 1, 0xff000000); - DrawText(str, left, top, 0xffc0ffff); - - if (SaveRenderTarget(strSnapshot != "" ? strSnapshot.c_str() : "temp.jpg", GLWin.backbuffer.w, -GLWin.backbuffer.h, 0)) //(conf.options.tga_snap)?0:1) ) { - { - char str[255]; - sprintf(str, "saved %s\n", strSnapshot.c_str()); - ZZAddMessage(str, 500); - } - - g_bMakeSnapshot = false; -} - -// call to destroy video resources -void ZZReset() -{ - FUNCLOG - s_RTs.ResolveAll(); - s_DepthRTs.ResolveAll(); - - vb[0].nCount = 0; - vb[1].nCount = 0; - - memset(s_nResolveCounts, 0, sizeof(s_nResolveCounts)); - s_nLastResolveReset = 0; - - icurctx = -1; - g_vsprog = g_psprog = 0; - - ZZGSStateReset(); - ZZDestroy(); - //clear_drawfn(); - if (ZZKick != NULL) delete ZZKick; -} - -// Put new values on statistic variable -inline void CountStatistics() -{ - if (s_nWriteDepthCount > 0) - { - assert(conf.mrtdepth); - - if (--s_nWriteDepthCount <= 0) - { - s_bWriteDepth = false; - } - } - - if (s_nWriteDestAlphaTest > 0) - { - if (--s_nWriteDestAlphaTest <= 0) - { - s_bDestAlphaTest = false; - } - } - - if (g_nDepthUsed > 0) --g_nDepthUsed; - - s_ClutResolve = 0; - g_nDepthUpdateCount = 0; -} - -// This all could be easily forefeit -inline void AfterRendererUnimportantJob() -{ - ProcessMessages(); - - if (g_bDisplayFPS) DisplayFPS(); - - // Swapping buffers, so we could use another window - GLWin.SwapGLBuffers(); - - // clear all targets - if (conf.wireframe()) s_nWireframeCount = 1; - - if (g_bMakeSnapshot) MakeSnapshot(); - - CaptureFrame(); - CountStatistics(); - - if (s_nNewWidth >= 0 && s_nNewHeight >= 0) - { - // If needed reset - ZZReset(); - - ChangeDeviceSize(s_nNewWidth, s_nNewHeight); - s_nNewWidth = s_nNewHeight = -1; - } - - maxmin = 608; -} - -extern u32 s_uFramebuffer; - -// Swich Framebuffers -inline void AfterRendererSwitchBackToTextures() -{ - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, s_uFramebuffer); - - g_MemTargs.DestroyCleared(); - - if (s_vecTempTextures.size() > 0) - glDeleteTextures((GLsizei)s_vecTempTextures.size(), &s_vecTempTextures[0]); - - s_vecTempTextures.clear(); - - if (EXTWRITE->WRITE & 1) - { - ZZLog::Warn_Log("EXTWRITE!"); - ExtWrite(); - EXTWRITE->WRITE = 0; - } - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - - glEnable(GL_SCISSOR_TEST); - - if (icurctx >= 0) - { - vb[icurctx].bVarsSetTarg = false; - vb[icurctx].bVarsTexSync = false; - vb[0].bVarsTexSync = false; - } -} - -// Reset Targets Helper, for hack. -inline void AfterRendererAutoresetTargets() -{ - if (conf.settings().auto_reset) - { - s_nResolveCounts[s_nCurResolveIndex] = s_nResolved; - s_nCurResolveIndex = (s_nCurResolveIndex + 1) % ArraySize(s_nResolveCounts); - - int total = 0; - - for (int i = 0; i < ArraySize(s_nResolveCounts); ++i) total += s_nResolveCounts[i]; - - if (total / ArraySize(s_nResolveCounts) > 3) - { - if (s_nLastResolveReset > (int)(fFPS * 8)) - { - // reset - ZZLog::Error_Log("Video memory reset."); - s_nLastResolveReset = 0; - memset(s_nResolveCounts, 0, sizeof(s_nResolveCounts)); - - s_RTs.ResolveAll(); - return; -// s_RTs.Destroy(); -// s_DepthRTs.ResolveAll(); -// s_DepthRTs.Destroy(); -// -// vb[0].prndr = NULL; -// vb[0].pdepth = NULL; -// vb[0].bNeedFrameCheck = 1; -// vb[0].bNeedZCheck = 1; -// vb[1].prndr = NULL; -// vb[1].pdepth = NULL; -// vb[1].bNeedFrameCheck = 1; -// vb[1].bNeedZCheck = 1; - } - } - - s_nLastResolveReset++; - } - - if (s_nResolved > 8) - s_nResolved = 2; - else if (s_nResolved > 0) - --s_nResolved; -} - -int count = 0; -// The main renderer function -void RenderCRTC(int interlace) -{ - if (FrameSkippingHelper()) return; - - u32 bInterlace = SMODE2->INT && SMODE2->FFMD && (conf.interlace < 2); - - RenderStartHelper(bInterlace); - - bool bUsingStencil = false; - tex0Info dispinfo[2]; - - FrameObtainDispinfo(bInterlace, dispinfo); - - // start from the last circuit - for (int i = !PMODE->SLBG; i >= 0; --i) - { - tex0Info& texframe = dispinfo[i]; - - if (texframe.th <= 1) continue; - if (SMODE2->INT && SMODE2->FFMD) - { - texframe.th >>= 1; - - // Final Fantasy X-2 issue here. - if (conf.interlace == 2 && texframe.th >= 512) - texframe.th >>= 1; - } - - if (i == 0) RenderSetupBlending(); - if (bUsingStencil) RenderSetupStencil(i); - - if (texframe.psm == 0x12) - { - RenderCRTC24helper(bInterlace, interlace, texframe.psm); - continue; - } - - // We shader targets between two functions, so declare it here; - list listTargs; - - // if we could not draw image from target's do it from memory - RenderCheckForTargets(texframe, listTargs, i, &bUsingStencil, interlace, bInterlace); - } - - GL_REPORT_ERRORD(); - - glDisable(GL_BLEND); - - AfterRendererUnimportantJob(); - AfterRendererSwitchBackToTextures(); - AfterRendererAutoresetTargets(); -} diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglCRTC.h b/plugins/zzogl-pg-cg/opengl/ZZoglCRTC.h deleted file mode 100644 index 5ca9830e73..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglCRTC.h +++ /dev/null @@ -1,97 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef ZZOGLCRTC_H_INCLUDED -#define ZZOGLCRTC_H_INCLUDED - -#include - -#include "targets.h" - -#define INTERLACE_COUNT (bInterlace && interlace == (conf.interlace)) - -#ifdef _WIN32 -extern HDC hDC; // Private GDI Device Context -extern HGLRC hRC; // Permanent Rendering Context -#endif - -extern int s_frameskipping; -extern float fFPS; -extern unsigned char zgsrevision, zgsbuild, zgsminor; - -extern int s_nWriteDepthCount; -extern int s_nWireframeCount; -extern int s_nWriteDestAlphaTest; - -extern int g_PrevBitwiseTexX, g_PrevBitwiseTexY; // textures stored in SAMP_BITWISEANDX and SAMP_BITWISEANDY - - -extern bool s_bDestAlphaTest; -extern int s_ClutResolve; -extern int s_nLastResolveReset; -extern int g_nDepthUpdateCount; -extern int s_nResolveCounts[30]; // resolve counts for last 30 frames -static int s_nCurResolveIndex = 0; -extern int g_nDepthUsed; // ffx2 pal movies - -//------------------ Namespace - -extern u32 s_ptexInterlace; // holds interlace fields - -extern int s_nNewWidth, s_nNewHeight; - -extern CRangeManager s_RangeMngr; // manages overwritten memory -extern void FlushTransferRanges(const tex0Info* ptex); -extern void ProcessMessages(); -void AdjustTransToAspect(float4& v); - -void ZZGSStateReset(); - -// Interlace texture is lazy 1*(height) array of 1 and 0. -// If its height (named s_nInterlaceTexWidth here) is hanging we must redo -// the texture. -// FIXME: If this function were spammed too often, we could use -// width < s_nInterlaceTexWidth as correct for old texture -static int s_nInterlaceTexWidth = 0; // width of texture - -inline u32 CreateInterlaceTex(int width) -{ - if (width == s_nInterlaceTexWidth && s_ptexInterlace != 0) return s_ptexInterlace; - - SAFE_RELEASE_TEX(s_ptexInterlace); - - s_nInterlaceTexWidth = width; - - vector data(width); - - for (int i = 0; i < width; ++i) - { - data[i] = (i & 1) ? 0xffffffff : 0; - } - - glGenTextures(1, &s_ptexInterlace); - glBindTexture(GL_TEXTURE_RECTANGLE_NV, s_ptexInterlace); - TextureRect(GL_RGBA, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]); - setRectFilters(GL_NEAREST); - GL_REPORT_ERRORD(); - - return s_ptexInterlace; -} - -#endif // ZZOGLCRTC_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglCreate.cpp b/plugins/zzogl-pg-cg/opengl/ZZoglCreate.cpp deleted file mode 100644 index d94ef26198..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglCreate.cpp +++ /dev/null @@ -1,881 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// Create and Destroy function. They would be called once per session. - -//------------------ Includes -#include "GS.h" -#include "Mem.h" -#include "GLWin.h" -#include "ZZoglShaders.h" - -#include "targets.h" -#include "rasterfont.h" // simple font -#include "ZZoglDrawing.h" -#include "ZZoglVB.h" - -// This include for windows resource file with Shaders -#ifdef _WIN32 -# include "Win32.h" -#endif - -//------------------ Defines - -#ifdef _WIN32 -#define GL_LOADFN(name) { \ - if( (*(void**)&name = (void*)wglGetProcAddress(#name)) == NULL ) { \ - ZZLog::Error_Log("Failed to find %s, exiting.", #name); \ - } \ -} -#else -// let GLEW take care of it -#define GL_LOADFN(name) -#endif - -#define GL_BLEND_RGB(src, dst) { \ - s_srcrgb = src; \ - s_dstrgb = dst; \ - zgsBlendFuncSeparateEXT(s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha); \ -} - -#define GL_BLEND_ALPHA(src, dst) { \ - s_srcalpha = src; \ - s_dstalpha = dst; \ - zgsBlendFuncSeparateEXT(s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha); \ -} - -#define GL_BLEND_ALL(srcrgb, dstrgb, srcalpha, dstalpha) { \ - s_srcrgb = srcrgb; \ - s_dstrgb = dstrgb; \ - s_srcalpha = srcalpha; \ - s_dstalpha = dstalpha; \ - zgsBlendFuncSeparateEXT(s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha); \ -} - -#define GL_BLEND_SET() zgsBlendFuncSeparateEXT(s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha) -#define VB_NUMBUFFERS 512 - -// ----------------- Types -typedef void (APIENTRYP _PFNSWAPINTERVAL)(int); - -map mapGLExtensions; - -extern bool LoadEffects(); -extern bool ZZshLoadExtraEffects(); -extern FRAGMENTSHADER* ZZshLoadShadeEffect(int type, int texfilter, int fog, int testaem, int exactcolor, const clampInfo& clamp, int context, bool* pbFailed); - -GLuint vboRect = 0; -vector g_vboBuffers; // VBOs for all drawing commands -int g_nCurVBOIndex = 0; - -inline bool CreateImportantCheck(); -inline void CreateOtherCheck(); -inline bool CreateOpenShadersFile(); - -void ZZGSStateReset(); - -//------------------ Dummies -#ifdef _WIN32 -void __stdcall glBlendFuncSeparateDummy(GLenum e1, GLenum e2, GLenum e3, GLenum e4) -#else -void APIENTRY glBlendFuncSeparateDummy(GLenum e1, GLenum e2, GLenum e3, GLenum e4) -#endif -{ - glBlendFunc(e1, e2); -} - -#ifdef _WIN32 -void __stdcall glBlendEquationSeparateDummy(GLenum e1, GLenum e2) -#else -void APIENTRY glBlendEquationSeparateDummy(GLenum e1, GLenum e2) -#endif -{ - glBlendEquation(e1); -} - -#ifdef _WIN32 -extern HINSTANCE hInst; -void (__stdcall *zgsBlendEquationSeparateEXT)(GLenum, GLenum) = NULL; -void (__stdcall *zgsBlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum) = NULL; -#else -void (APIENTRY *zgsBlendEquationSeparateEXT)(GLenum, GLenum) = NULL; -void (APIENTRY *zgsBlendFuncSeparateEXT)(GLenum, GLenum, GLenum, GLenum) = NULL; -#endif - -//------------------ variables -//////////////////////////// -// State parameters - -extern u8* s_lpShaderResources; - -// String's for shader file in developer mode -#ifdef ZEROGS_DEVBUILD -char* EFFECT_NAME = ""; -char* EFFECT_DIR = ""; -#endif - -///////////////////// -// graphics resources -GLenum s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha; // set by zgsBlendFuncSeparateEXT -u32 s_stencilfunc, s_stencilref, s_stencilmask; -GLenum s_drawbuffers[] = { GL_COLOR_ATTACHMENT0_EXT, GL_COLOR_ATTACHMENT1_EXT }; - -GLenum g_internalFloatFmt = GL_ALPHA_FLOAT32_ATI; -GLenum g_internalRGBAFloatFmt = GL_RGBA_FLOAT32_ATI; -GLenum g_internalRGBAFloat16Fmt = GL_RGBA_FLOAT16_ATI; - -u32 ptexLogo = 0; -int nLogoWidth, nLogoHeight; -u32 s_ptexInterlace = 0; // holds interlace fields - -//------------------ Global Variables -int GPU_TEXWIDTH = 512; -float g_fiGPU_TEXWIDTH = 1/512.0f; -int g_MaxTexWidth = 4096, g_MaxTexHeight = 4096; -u32 s_uFramebuffer = 0; - -RasterFont* font_p = NULL; -float g_fBlockMult = 1; -//int s_nFullscreen = 0; - -u32 ptexBlocks = 0, ptexConv16to32 = 0; // holds information on block tiling -u32 ptexBilinearBlocks = 0; -u32 ptexConv32to16 = 0; -int g_nDepthBias = 0; - -extern void Delete_Avi_Capture(); -extern void ZZDestroy(); -extern void SetAA(int mode); - -//------------------ Code - -///< returns true if the the opengl extension is supported -bool IsGLExt(const char* szTargetExtension) -{ - return mapGLExtensions.find(string(szTargetExtension)) != mapGLExtensions.end(); -} - -// Function asks about different OGL extensions, that are required to setup accordingly. Return false if checks failed -inline bool CreateImportantCheck() -{ - bool bSuccess = true; -#ifndef _WIN32 - int const glew_ok = glewInit(); - - if (glew_ok != GLEW_OK) - { - ZZLog::Error_Log("glewInit() is not ok!"); - bSuccess = false; - } - -#endif - - if (!IsGLExt("GL_EXT_framebuffer_object")) - { - ZZLog::Error_Log("*********\nZZogl: ERROR: Need GL_EXT_framebuffer_object for multiple render targets\nZZogl: *********"); - bSuccess = false; - } - - if (!IsGLExt("GL_EXT_secondary_color")) - { - ZZLog::Error_Log("*********\nZZogl: OGL WARNING: Need GL_EXT_secondary_color\nZZogl: *********"); - bSuccess = false; - } - - bSuccess &= ZZshCheckProfilesSupport(); - - return bSuccess; -} - -// This is a check for less important open gl extensions. -inline void CreateOtherCheck() -{ - if (!IsGLExt("GL_EXT_blend_equation_separate") || glBlendEquationSeparateEXT == NULL) - { - ZZLog::Error_Log("*********\nZZogl: OGL WARNING: Need GL_EXT_blend_equation_separate\nZZogl: *********"); - zgsBlendEquationSeparateEXT = glBlendEquationSeparateDummy; - } - else - zgsBlendEquationSeparateEXT = glBlendEquationSeparateEXT; - - if (!IsGLExt("GL_EXT_blend_func_separate") || glBlendFuncSeparateEXT == NULL) - { - ZZLog::Error_Log("*********\nZZogl: OGL WARNING: Need GL_EXT_blend_func_separate\nZZogl: *********"); - zgsBlendFuncSeparateEXT = glBlendFuncSeparateDummy; - } - else - zgsBlendFuncSeparateEXT = glBlendFuncSeparateEXT; - - if (!IsGLExt("GL_ARB_draw_buffers") && !IsGLExt("GL_ATI_draw_buffers")) - { - ZZLog::Error_Log("*********\nZZogl: OGL WARNING: multiple render targets not supported, some effects might look bad\nZZogl: *********"); - conf.mrtdepth = 0; - } - - if (IsGLExt("GL_ARB_draw_buffers")) - glDrawBuffers = (PFNGLDRAWBUFFERSPROC)wglGetProcAddress("glDrawBuffers"); - else if (IsGLExt("GL_ATI_draw_buffers")) - glDrawBuffers = (PFNGLDRAWBUFFERSPROC)wglGetProcAddress("glDrawBuffersATI"); - - - if (!IsGLExt("GL_ARB_multitexture")) - ZZLog::Error_Log("No multitexturing."); - else - ZZLog::Error_Log("Using multitexturing."); - - GLint Max_Texture_Size_NV = 0; - - GLint Max_Texture_Size_2d = 0; - - glGetIntegerv(GL_MAX_RECTANGLE_TEXTURE_SIZE_NV, &Max_Texture_Size_NV); - glGetIntegerv(GL_MAX_TEXTURE_SIZE, &Max_Texture_Size_2d); - - g_MaxTexHeight = min(Max_Texture_Size_2d, Max_Texture_Size_NV); - - ZZLog::Error_Log("Maximum texture size is %d for Tex_2d and %d for Tex_NV.", Max_Texture_Size_2d, Max_Texture_Size_NV); - - if (Max_Texture_Size_NV < 1024) - ZZLog::Error_Log("Could not properly make bitmasks, so some textures will be missed."); - -#ifdef _WIN32 - if (IsGLExt("WGL_EXT_swap_control") || IsGLExt("EXT_swap_control")) - wglSwapIntervalEXT(0); - -#else - if (IsGLExt("GLX_SGI_swap_control")) - { - _PFNSWAPINTERVAL swapinterval = (_PFNSWAPINTERVAL)wglGetProcAddress("glXSwapInterval"); - - if (!swapinterval) - swapinterval = (_PFNSWAPINTERVAL)wglGetProcAddress("glXSwapIntervalSGI"); - - if (!swapinterval) - swapinterval = (_PFNSWAPINTERVAL)wglGetProcAddress("glXSwapIntervalEXT"); - - if (swapinterval) - swapinterval(0); - else - ZZLog::Error_Log("No support for SwapInterval (framerate clamped to monitor refresh rate),"); - } - -#endif -} - - -#ifdef _WIN32 -__forceinline bool LoadShadersFromRes() -{ - HRSRC hShaderSrc = FindResource(hInst, MAKEINTRESOURCE(IDR_SHADERS), RT_RCDATA); - assert(hShaderSrc != NULL); - HGLOBAL hShaderGlob = LoadResource(hInst, hShaderSrc); - assert(hShaderGlob != NULL); - s_lpShaderResources = (u8*)LockResource(hShaderGlob); - return true; -} -#else - -__forceinline bool LoadShadersFromDat() -{ - FILE* fres = fopen("ps2hw.dat", "rb"); - - if (fres == NULL) - { - fres = fopen("plugins/ps2hw.dat", "rb"); - - if (fres == NULL) - { - // Each linux distributions have his rules for path so we give them the possibility to - // change it with compilation flags. -- Gregory -#ifdef PLUGIN_DIR_COMPILATION -#define xPLUGIN_DIR_str(s) PLUGIN_DIR_str(s) -#define PLUGIN_DIR_str(s) #s - const std::string shader_file = string(xPLUGIN_DIR_str(PLUGIN_DIR_COMPILATION)) + "/ps2hw.dat"; - fres = fopen(shader_file.c_str(), "rb"); -#endif - if (fres == NULL) - { - ZZLog::Error_Log("Cannot find ps2hw.dat in working directory. Exiting."); - return false; - } - } - } - - fseek(fres, 0, SEEK_END); - - size_t s = ftell(fres); - s_lpShaderResources = new u8[s+1]; - fseek(fres, 0, SEEK_SET); - fread(s_lpShaderResources, s, 1, fres); - s_lpShaderResources[s] = 0; - fclose(fres); - - return true; -} - -#ifdef DEVBUILD -__forceinline bool LoadShadersFromFX() -{ - // test if ps2hw.fx exists - char tempstr[255]; - char curwd[255]; - getcwd(curwd, ArraySize(curwd)); - - strcpy(tempstr, "/plugins/"); - sprintf(EFFECT_NAME, "%sps2hw.fx", tempstr); - FILE* f = fopen(EFFECT_NAME, "r"); - - if (f == NULL) - { - - strcpy(tempstr, "../../plugins/zzogl-pg/opengl/"); - sprintf(EFFECT_NAME, "%sps2hw.fx", tempstr); - f = fopen(EFFECT_NAME, "r"); - - if (f == NULL) - { - ZZLog::Error_Log("Failed to find %s, try compiling a non-devbuild.", EFFECT_NAME); - return false; - } - } - - fclose(f); - - sprintf(EFFECT_DIR, "%s/%s", curwd, tempstr); - sprintf(EFFECT_NAME, "%sps2hw.fx", EFFECT_DIR); - - return true; -} -#endif -#endif - - -// open shader file according to build target - -inline bool CreateOpenShadersFile() -{ -#ifndef DEVBUILD -# ifdef _WIN32 - return LoadShadersFromRes(); -# else // not _WIN32 - return LoadShadersFromDat(); -# endif // _WIN32 -#else // defined(ZEROGS_DEVBUILD) -# ifndef _WIN32 // NOT WINDOWS - return LoadShadersFromFX(); - - // No else clause? -#endif -#endif // !defined(ZEROGS_DEVBUILD) -} - -// Read all extensions name and fill mapGLExtensions -inline bool CreateFillExtensionsMap() -{ - int max_ext = 0; - string all_ext(""); - - PFNGLGETSTRINGIPROC glGetStringi = 0; - glGetStringi = (PFNGLGETSTRINGIPROC)wglGetProcAddress("glGetStringi"); - glGetIntegerv(GL_NUM_EXTENSIONS, &max_ext); - - if (glGetStringi && max_ext) { - // Get opengl extension (opengl3) - for (GLint i = 0; i < max_ext; i++) - { - string extension((const char*)glGetStringi(GL_EXTENSIONS, i)); - mapGLExtensions[extension]; - - all_ext += extension; - if (i != (max_ext - 1)) all_ext += ", "; - } - } else { - // fallback to old method (pre opengl3, intel gma, geforce 7 ...) - ZZLog::Error_Log("glGetStringi opengl 3 interface not supported, fallback to opengl 2"); - - const char* ptoken = (const char*)glGetString(GL_EXTENSIONS); - if (ptoken == NULL) return false; - - all_ext = string(ptoken); // save the string to print a nice debug message - - const char* pend = NULL; - while (ptoken != NULL) - { - pend = strchr(ptoken, ' '); - - if (pend != NULL) - { - max_ext++; - mapGLExtensions[string(ptoken, pend-ptoken)]; - } - else - { - max_ext++; - mapGLExtensions[string(ptoken)]; - break; - } - - ptoken = pend; - while (*ptoken == ' ') ++ptoken; - } - } - - -#ifndef _DEBUG - ZZLog::Log("%d supported OpenGL Extensions: %s\n", max_ext, all_ext.c_str()); -#endif - ZZLog::Debug_Log("%d supported OpenGL Extensions: %s\n", max_ext, all_ext.c_str()); - - return true; -} - -void LoadglFunctions() -{ - GL_LOADFN(glIsRenderbufferEXT); - GL_LOADFN(glBindRenderbufferEXT); - GL_LOADFN(glDeleteRenderbuffersEXT); - GL_LOADFN(glGenRenderbuffersEXT); - GL_LOADFN(glRenderbufferStorageEXT); - GL_LOADFN(glGetRenderbufferParameterivEXT); - GL_LOADFN(glIsFramebufferEXT); - GL_LOADFN(glBindFramebufferEXT); - GL_LOADFN(glDeleteFramebuffersEXT); - GL_LOADFN(glGenFramebuffersEXT); - GL_LOADFN(glCheckFramebufferStatusEXT); - GL_LOADFN(glFramebufferTexture1DEXT); - GL_LOADFN(glFramebufferTexture2DEXT); - GL_LOADFN(glFramebufferTexture3DEXT); - GL_LOADFN(glFramebufferRenderbufferEXT); - GL_LOADFN(glGetFramebufferAttachmentParameterivEXT); - GL_LOADFN(glGenerateMipmapEXT); -} - -inline bool TryBlockFormat(GLint fmt, const GLvoid* vBlockData) { - g_internalFloatFmt = fmt; - glTexImage2D(GL_TEXTURE_2D, 0, g_internalFloatFmt, BLOCK_TEXWIDTH, BLOCK_TEXHEIGHT, 0, GL_ALPHA, GL_FLOAT, vBlockData); - return (glGetError() == GL_NO_ERROR); -} - -inline bool TryBlinearFormat(GLint fmt32, GLint fmt16, const GLvoid* vBilinearData) { - g_internalRGBAFloatFmt = fmt32; - g_internalRGBAFloat16Fmt = fmt16; - glTexImage2D(GL_TEXTURE_2D, 0, g_internalRGBAFloatFmt, BLOCK_TEXWIDTH, BLOCK_TEXHEIGHT, 0, GL_RGBA, GL_FLOAT, vBilinearData); - return (glGetError() == GL_NO_ERROR); -} - - -bool ZZCreate(int _width, int _height) -{ - GLenum err = GL_NO_ERROR; - bool bSuccess = true; - - ZZDestroy(); - ZZGSStateReset(); - - if (!GLWin.DisplayWindow(_width, _height)) return false; - - conf.mrtdepth = 0; // for now - - if (!CreateFillExtensionsMap()) return false; - if (!CreateImportantCheck()) return false; - - CreateOtherCheck(); - - // Incorrect must check rectangle texture too. Now done directly on CreateOtherCheck() - // - // check the max texture width and height - ///glGetIntegerv(GL_MAX_TEXTURE_SIZE, &g_MaxTexWidth); - // Limit the texture size supported to 8192. We do not need bigger texture. - // Besides the following assertion is false when texture are too big. - // ZZoglFlush.cpp:2349: assert(fblockstride >= 1.0f) - //g_MaxTexWidth = min(8192, g_MaxTexWidth); - - g_MaxTexHeight = g_MaxTexWidth / 4; - GPU_TEXWIDTH = min (g_MaxTexWidth/8, 1024); - g_fiGPU_TEXWIDTH = 1.0f / GPU_TEXWIDTH; - - if (!CreateOpenShadersFile()) return false; - - GL_REPORT_ERROR(); - - if (err != GL_NO_ERROR) bSuccess = false; - - s_srcrgb = s_dstrgb = s_srcalpha = s_dstalpha = GL_ONE; - - LoadglFunctions(); - - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - GL_REPORT_ERROR(); - - if (err != GL_NO_ERROR) bSuccess = false; - - glGenFramebuffersEXT(1, &s_uFramebuffer); - - if (s_uFramebuffer == 0) - { - ZZLog::Error_Log("Failed to create the renderbuffer."); - } - - GL_REPORT_ERRORD(); - - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, s_uFramebuffer); - - DrawBuffers(s_drawbuffers); - - GL_REPORT_ERROR(); - - if (err != GL_NO_ERROR) bSuccess = false; - - font_p = new RasterFont(); - GL_REPORT_ERROR(); - - if (err != GL_NO_ERROR) bSuccess = false; - - // init draw fns - //init_drawfn(); - if (ZZKick != NULL) delete ZZKick; - ZZKick = new Kick; - - SetAA(conf.aa); - - GSsetGameCRC(g_LastCRC, conf.settings()._u32); - - GL_STENCILFUNC(GL_ALWAYS, 0, 0); - - //s_bWriteDepth = true; - - GL_BLEND_ALL(GL_ONE, GL_ONE, GL_ONE, GL_ONE); - glViewport(0, 0, GLWin.backbuffer.w, GLWin.backbuffer.h); // Reset The Current Viewport - - glMatrixMode(GL_PROJECTION); - glLoadIdentity(); - - glMatrixMode(GL_MODELVIEW); - glLoadIdentity(); - - glShadeModel(GL_SMOOTH); - glClearColor(0.0f, 0.0f, 0.0f, 0.0f); - glClearDepth(1.0f); - - glEnable(GL_DEPTH_TEST); - glDisable(GL_LIGHTING); - - glDepthFunc(GL_LEQUAL); - glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST); // Really Nice Perspective Calculations - glGenTextures(1, &ptexLogo); - glBindTexture(GL_TEXTURE_RECTANGLE_NV, ptexLogo); - -#ifdef _WIN32 - HRSRC hBitmapSrc = FindResource(hInst, MAKEINTRESOURCE(IDB_ZEROGSLOGO), RT_BITMAP); - assert(hBitmapSrc != NULL); - - HGLOBAL hBitmapGlob = LoadResource(hInst, hBitmapSrc); - assert(hBitmapGlob != NULL); - - PBITMAPINFO pinfo = (PBITMAPINFO)LockResource(hBitmapGlob); - - GLenum tempFmt = (pinfo->bmiHeader.biBitCount == 32) ? GL_RGBA : GL_RGB; - TextureRect(GL_RGBA, pinfo->bmiHeader.biWidth, pinfo->bmiHeader.biHeight, tempFmt, GL_UNSIGNED_BYTE, (u8*)pinfo + pinfo->bmiHeader.biSize); - - nLogoWidth = pinfo->bmiHeader.biWidth; - nLogoHeight = pinfo->bmiHeader.biHeight; - - setRectFilters(GL_LINEAR); - -#else -#endif - - GL_REPORT_ERROR(); - - g_nCurVBOIndex = 0; - - g_vboBuffers.resize(VB_NUMBUFFERS); - glGenBuffers((GLsizei)g_vboBuffers.size(), &g_vboBuffers[0]); - - for (int i = 0; i < (int)g_vboBuffers.size(); ++i) - { - glBindBuffer(GL_ARRAY_BUFFER, g_vboBuffers[i]); - glBufferData(GL_ARRAY_BUFFER, 0x100*sizeof(VertexGPU), NULL, GL_STREAM_DRAW); - } - - GL_REPORT_ERROR(); - if (err != GL_NO_ERROR) bSuccess = false; - - // create the blocks texture - g_fBlockMult = 1; - bool do_not_use_billinear = false; - - vector vBlockData, vBilinearData; - BLOCK::FillBlocks(vBlockData, vBilinearData, 1); - - glGenTextures(1, &ptexBlocks); - glBindTexture(GL_TEXTURE_2D, ptexBlocks); - - if (TryBlockFormat(GL_RGBA32F, &vBlockData[0])) - ZZLog::Error_Log("Use GL_RGBA32F for blockdata."); - else if (TryBlockFormat(GL_ALPHA_FLOAT32_ATI, &vBlockData[0])) - ZZLog::Error_Log("Use ATI_texture_float for blockdata."); - else if (TryBlockFormat(GL_ALPHA32F_ARB, &vBlockData[0])) - ZZLog::Error_Log("Use ARB_texture_float for blockdata."); - else - { // This case is bad. But for really old cards it could be nice. - g_fBlockMult = 65535.0f*(float)g_fiGPU_TEXWIDTH; - BLOCK::FillBlocks(vBlockData, vBilinearData, 0); - g_internalFloatFmt = GL_ALPHA16; - - // We store block data on u16 rather float numbers. It's not so preciese, but ALPHA16 is OpenGL 2.0 standart - // and use only 16 bit. Old zerogs use red channel, but it does not work. - - glTexImage2D(GL_TEXTURE_2D, 0, g_internalFloatFmt, BLOCK_TEXWIDTH, BLOCK_TEXHEIGHT, 0, GL_ALPHA, GL_UNSIGNED_SHORT, &vBlockData[0]); - if( glGetError() != GL_NO_ERROR ) { - ZZLog::Error_Log("ZZogl ERROR: could not fill blocks"); - return false; - } - - do_not_use_billinear = true; - conf.bilinear = 0; - ZZLog::Error_Log("Using non-bilinear fill, quallity is outdated!"); - } - - setTex2DFilters(GL_NEAREST); - setTex2DWrap(GL_REPEAT); - - if (!do_not_use_billinear) - { - // fill in the bilinear blocks (main variant). - glGenTextures(1, &ptexBilinearBlocks); - glBindTexture(GL_TEXTURE_2D, ptexBilinearBlocks); - - if (TryBlinearFormat(GL_RGBA32F, GL_RGBA16F, &vBilinearData[0])) - ZZLog::Error_Log("Fill bilinear blocks OK.!"); - else if (TryBlinearFormat(GL_RGBA_FLOAT32_ATI, GL_RGBA_FLOAT16_ATI, &vBilinearData[0])) - ZZLog::Error_Log("Fill bilinear blocks with ATI_texture_float."); - else if (TryBlinearFormat(GL_FLOAT_RGBA32_NV, GL_FLOAT_RGBA16_NV, &vBilinearData[0])) - ZZLog::Error_Log("ZZogl Fill bilinear blocks with NVidia_float."); - else - ZZLog::Error_Log("Fill bilinear blocks failed."); - - setTex2DFilters(GL_NEAREST); - setTex2DWrap(GL_REPEAT); - } - - float fpri = 1; - - glPrioritizeTextures(1, &ptexBlocks, &fpri); - - if (ptexBilinearBlocks != 0) glPrioritizeTextures(1, &ptexBilinearBlocks, &fpri); - - GL_REPORT_ERROR(); - - // fill a simple rect - glGenBuffers(1, &vboRect); - glBindBuffer(GL_ARRAY_BUFFER, vboRect); - - vector verts(4); - - VertexGPU* pvert = &verts[0]; - - pvert->set_xyzst(-0x7fff, 0x7fff, 0, 0, 0); - pvert++; - - pvert->set_xyzst(0x7fff, 0x7fff, 0, 1, 0); - pvert++; - - pvert->set_xyzst(-0x7fff, -0x7fff, 0, 0, 1); - pvert++; - - pvert->set_xyzst(0x7fff, -0x7fff, 0, 1, 1); - pvert++; - - glBufferDataARB(GL_ARRAY_BUFFER, 4*sizeof(VertexGPU), &verts[0], GL_STATIC_DRAW); - - // setup the default vertex declaration - glEnableClientState(GL_VERTEX_ARRAY); - glClientActiveTexture(GL_TEXTURE0); - glEnableClientState(GL_TEXTURE_COORD_ARRAY); - glEnableClientState(GL_SECONDARY_COLOR_ARRAY); - glEnableClientState(GL_COLOR_ARRAY); - GL_REPORT_ERROR(); - - // some cards don't support this -// glClientActiveTexture(GL_TEXTURE0); -// glEnableClientState(GL_TEXTURE_COORD_ARRAY); -// glTexCoordPointer(4, GL_UNSIGNED_BYTE, sizeof(VertexGPU), (void*)12); - - // create the conversion textures - glGenTextures(1, &ptexConv16to32); - glBindTexture(GL_TEXTURE_2D, ptexConv16to32); - - vector conv16to32data(256*256); - - for (int i = 0; i < 256*256; ++i) - { - u32 tempcol = RGBA16to32(i); - // have to flip r and b - conv16to32data[i] = (tempcol & 0xff00ff00) | ((tempcol & 0xff) << 16) | ((tempcol & 0xff0000) >> 16); - } - - Texture2D(4, 256, 256, GL_RGBA, GL_UNSIGNED_BYTE, &conv16to32data[0]); - - setTex2DFilters(GL_NEAREST); - setTex2DWrap(GL_CLAMP); - - GL_REPORT_ERROR(); - - if (err != GL_NO_ERROR) bSuccess = false; - - vector conv32to16data(32*32*32); - - glGenTextures(1, &ptexConv32to16); - - glBindTexture(GL_TEXTURE_3D, ptexConv32to16); - - u32* dst = &conv32to16data[0]; - - for (int i = 0; i < 32; ++i) - { - for (int j = 0; j < 32; ++j) - { - for (int k = 0; k < 32; ++k) - { - u32 col = (i << 10) | (j << 5) | k; - *dst++ = ((col & 0xff) << 16) | (col & 0xff00); - } - } - } - - Texture3D(4, 32, 32, 32, GL_RGBA, GL_UNSIGNED_BYTE, &conv32to16data[0]); - setTex3DFilters(GL_NEAREST); - setTex3DWrap(GL_CLAMP); - GL_REPORT_ERROR(); - - if (err != GL_NO_ERROR) bSuccess = false; - - if (!ZZshStartUsingShaders()) bSuccess = false; - - GL_REPORT_ERROR(); - - if (err != GL_NO_ERROR) bSuccess = false; - - glDisable(GL_STENCIL_TEST); - glEnable(GL_SCISSOR_TEST); - - GL_BLEND_ALPHA(GL_ONE, GL_ZERO); - - glBlendColorEXT(0, 0, 0, 0.5f); - - glDisable(GL_CULL_FACE); - - // points - // This was changed in SetAA - should we be changing it back? - glPointSize(1.0f); - - g_nDepthBias = 0; - - glEnable(GL_POLYGON_OFFSET_FILL); - glEnable(GL_POLYGON_OFFSET_LINE); - - glPolygonOffset(0, 1); - - vb[0].Init(VB_BUFFERSIZE); - vb[1].Init(VB_BUFFERSIZE); - - g_vsprog = g_psprog = 0; - - if (glGetError() == GL_NO_ERROR) - { - return bSuccess; - } - else - { - ZZLog::Debug_Log("In final init!"); - return false; - } -} - -void ZZDestroy() -{ - Delete_Avi_Capture(); - - g_MemTargs.Destroy(); - - s_RTs.Destroy(); - s_DepthRTs.Destroy(); - s_BitwiseTextures.Destroy(); - - SAFE_RELEASE_TEX(s_ptexInterlace); - SAFE_RELEASE_TEX(ptexBlocks); - SAFE_RELEASE_TEX(ptexBilinearBlocks); - SAFE_RELEASE_TEX(ptexConv16to32); - SAFE_RELEASE_TEX(ptexConv32to16); - - vb[0].Destroy(); - vb[1].Destroy(); - - if (g_vboBuffers.size() > 0) - { - glDeleteBuffers((GLsizei)g_vboBuffers.size(), &g_vboBuffers[0]); - g_vboBuffers.clear(); - } - - g_nCurVBOIndex = 0; - - if (pvs != NULL) - { - for (int i = 0; i < ArraySize(pvs); ++i) - { - SAFE_RELEASE_PROG(pvs[i]); - } - } - - if (ppsRegular != NULL) - { - for (int i = 0; i < ArraySize(ppsRegular); ++i) - { - SAFE_RELEASE_PROG(ppsRegular[i].prog); - } - } - - if (ppsTexture != NULL) - { - for (int i = 0; i < ArraySize(ppsTexture); ++i) - { - SAFE_RELEASE_PROG(ppsTexture[i].prog); - } - } - - SAFE_RELEASE_PROG(pvsBitBlt.prog); - - SAFE_RELEASE_PROG(ppsBitBlt[0].prog); - SAFE_RELEASE_PROG(ppsBitBlt[1].prog); - SAFE_RELEASE_PROG(ppsBitBltDepth.prog); - SAFE_RELEASE_PROG(ppsCRTCTarg[0].prog); - SAFE_RELEASE_PROG(ppsCRTCTarg[1].prog); - SAFE_RELEASE_PROG(ppsCRTC[0].prog); - SAFE_RELEASE_PROG(ppsCRTC[1].prog); - SAFE_RELEASE_PROG(ppsCRTC24[0].prog); - SAFE_RELEASE_PROG(ppsCRTC24[1].prog); - SAFE_RELEASE_PROG(ppsOne.prog); - - safe_delete(font_p); - - GLWin.ReleaseContext(); - - mapGLExtensions.clear(); -} - diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglDrawing.cpp b/plugins/zzogl-pg-cg/opengl/ZZoglDrawing.cpp deleted file mode 100644 index dacabc149b..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglDrawing.cpp +++ /dev/null @@ -1,255 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "ZZoglDrawing.h" -#include "ZZoglVB.h" - -Kick* ZZKick; - -const u32 g_primmult[8] = { 1, 2, 2, 3, 3, 3, 2, 0xff }; -const u32 g_primsub[8] = { 1, 2, 1, 3, 1, 1, 2, 0 }; - -const GLenum primtype[8] = { GL_POINTS, GL_LINES, GL_LINES, GL_TRIANGLES, GL_TRIANGLES, GL_TRIANGLES, GL_TRIANGLES, 0xffffffff }; - -extern float fiTexWidth[2], fiTexHeight[2]; // current tex width and height - -// Still thinking about the best place to put this. -// called on a primitive switch -void Prim() -{ - FUNCLOG - - VB& curvb = vb[prim->ctxt]; - - if (curvb.CheckPrim()) Flush(prim->ctxt); - curvb.SetCurrentPrim(); -} - -// Replaced by a macro -> see ZZoglDrawing.h -// return true if triangle SHOULD be painted. -// Hackish and should be replaced. -// bool __forceinline NoHighlights(int i) -// { -// //Old code -// return (!(conf.settings().xenosaga_spec) || !vb[i].zbuf.zmsk || prim->iip) ; -// } - -// Not inlining for the moment to avoid getting 'unresolved external symbol' errors in Windows. -// This could also be resolved by moving the function into the header... -void Kick::KickVertex(bool adc) -{ - FUNCLOG - if (++gs.primC >= (int)g_primmult[prim->prim]) - { - if (!adc && NoHighlights(prim->ctxt)) DrawPrim(prim->prim); - else DirtyValidPrevPrim(); - - gs.primC -= g_primsub[prim->prim]; - } - gs.primIndex = gs.primNext(); -} - -template -void Kick::Set_Vertex(VertexGPU *p, Vertex & gsvertex) -{ - VB& curvb = vb[prim->ctxt]; - - p->move_x(gsvertex, curvb.offset.x); - p->move_y(gsvertex, curvb.offset.y); - if(DO_Z_FOG) { - p->move_z(gsvertex, curvb.zprimmask); - p->move_fog(gsvertex); - } - - p->rgba = prim->iip ? gsvertex.rgba : gs.rgba; - - if (conf.settings().texa) - { - u32 B = ((p->rgba & 0xfe000000) >> 1) + (0x01000000 * vb[prim->ctxt].fba.fba); - p->rgba = (p->rgba & 0xffffff) + B; - } - - if (prim->tme) - { - if (prim->fst) - { - p->s = (float)gsvertex.u * fiTexWidth[prim->ctxt]; - p->t = (float)gsvertex.v * fiTexHeight[prim->ctxt]; - p->q = 1; - } - else - { - p->s = gsvertex.s; - p->t = gsvertex.t; - p->q = gsvertex.q; - } - } -} - -__forceinline void Kick::Output_Vertex(VertexGPU vert, u32 id) -{ -#ifdef WRITE_PRIM_LOGS - ZZLog::Prim_Log("%c%d(%d): xyzf=(%4d,%4d,0x%x,%3d), rgba=0x%8.8x, stq = (%2.5f,%2.5f,%2.5f)", - id == 0 ? '*' : ' ', id, prim->prim, vert.x / 8, vert.y / 8, vert.z, vert.f / 128, - vert.rgba, Clamp(vert.s, -10, 10), Clamp(vert.t, -10, 10), Clamp(vert.q, -10, 10)); -#endif -} - -void Kick::DrawPrim(u32 prim_type) -{ - VB& curvb = vb[prim->ctxt]; - - curvb.FlushTexData(); - - if ((vb[!prim->ctxt].nCount > 0) && (vb[prim->ctxt].gsfb.fbp == vb[!prim->ctxt].gsfb.fbp)) - { - assert(vb[prim->ctxt].nCount == 0); - Flush(!prim->ctxt); - } - - // check enough place is left for the biggest primitive (sprite) - // This function is unlikely to be called so do not inline it. - if (unlikely(curvb.nCount + 6 > curvb.nNumVertices)) - curvb.IncreaseVertexBuffer(); - - VertexGPU* p = curvb.pBufferData + curvb.nCount; - - u32 prev; - u32 last; - switch(prim_type) { - case PRIM_POINT: - Set_Vertex(&p[0], gs.gsvertex[gs.primIndex]); - curvb.nCount ++; - break; - - case PRIM_LINE: - Set_Vertex(&p[0], gs.gsvertex[gs.primPrev()]); - Set_Vertex(&p[1], gs.gsvertex[gs.primIndex]); - curvb.nCount += 2; - break; - - case PRIM_LINE_STRIP: - if (likely(ValidPrevPrim)) { - assert(curvb.nCount >= 1); - p[0] = p[-1]; - } else { - Set_Vertex(&p[0], gs.gsvertex[gs.primPrev()]); - ValidPrevPrim = true; - } - - Set_Vertex(&p[1], gs.gsvertex[gs.primIndex]); - curvb.nCount += 2; - break; - - case PRIM_TRIANGLE: - Set_Vertex(&p[0], gs.gsvertex[gs.primPrev(2)]); - Set_Vertex(&p[1], gs.gsvertex[gs.primPrev()]); - Set_Vertex(&p[2], gs.gsvertex[gs.primIndex]); - curvb.nCount += 3; - break; - - case PRIM_TRIANGLE_STRIP: - if (likely(ValidPrevPrim)) { - assert(curvb.nCount >= 2); - p[0] = p[-2]; - p[1] = p[-1]; - } else { - Set_Vertex(&p[0], gs.gsvertex[gs.primPrev(2)]); - Set_Vertex(&p[1], gs.gsvertex[gs.primPrev()]); - ValidPrevPrim = true; - } - - Set_Vertex(&p[2], gs.gsvertex[gs.primIndex]); - curvb.nCount += 3; - break; - - case PRIM_TRIANGLE_FAN: - if (likely(ValidPrevPrim)) { - assert(curvb.nCount >= 2); - VertexGPU* TriFanVert = curvb.pBufferData + gs.nTriFanVert; - p[0] = TriFanVert[0]; - p[1] = p[-1]; - } else { - Set_Vertex(&p[0], gs.gsTriFanVertex); - Set_Vertex(&p[1], gs.gsvertex[gs.primPrev(1)]); - ValidPrevPrim = true; - // Remenber the base for future processing - gs.nTriFanVert = curvb.nCount; - } - - Set_Vertex(&p[2], gs.gsvertex[gs.primIndex]); - curvb.nCount += 3; - break; - - case PRIM_SPRITE: - prev = gs.primPrev(); - last = gs.primIndex; - - // sprite is too small and AA shows lines (tek4, Mana Khemia) - gs.gsvertex[last].x += (4 * AA.x); - gs.gsvertex[last].y += (4 * AA.y); - - // might be bad sprite (KH dialog text) - //if( gs.gsvertex[prev].x == gs.gsvertex[last].x || gs.gsvertex[prev].y == gs.gsvertex[last].y ) - //return; - - // process sprite as 2 triangles. The common diagonal is 0,1 and 3,4 - Set_Vertex(&p[0], gs.gsvertex[prev]); - Set_Vertex(&p[1], gs.gsvertex[last]); - - // Only fog and Z of last vertex is valid - p[0].z = p[1].z; - p[0].f = p[1].f; - - // Duplicate the vertex - p[3] = p[0]; - p[2] = p[0]; - p[4] = p[1]; - p[5] = p[1]; - - // Move some vertex x coord to create the others corners of the sprite - p[2].s = p[1].s; - p[2].x = p[1].x; - p[5].s = p[0].s; - p[5].x = p[0].x; - - curvb.nCount += 6; - break; - - default: break; - } - - // Print DEBUG info and code assertion - switch(prim_type) { - case PRIM_TRIANGLE: - case PRIM_TRIANGLE_STRIP: - case PRIM_TRIANGLE_FAN: - assert(gs.primC >= 3); - Output_Vertex(p[2],2); - case PRIM_LINE: - case PRIM_LINE_STRIP: - case PRIM_SPRITE: - assert(gs.primC >= 2); - Output_Vertex(p[1],1); - case PRIM_POINT: - assert(gs.primC >= 1); - Output_Vertex(p[0],0); - default: break; - } -} diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglDrawing.h b/plugins/zzogl-pg-cg/opengl/ZZoglDrawing.h deleted file mode 100644 index c9387b791a..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglDrawing.h +++ /dev/null @@ -1,67 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef ZZOGLDRAWING_H_INCLUDED -#define ZZOGLDRAWING_H_INCLUDED - -#include "Util.h" -#include "GS.h" - -// extern bool __forceinline NoHighlights(int i); - -// return true if triangle SHOULD be painted. -// Hackish and should be replaced. -// Previous version was an inlined function but gcc-4.6 does not want to inline it. -// Because the code is in the middle of vertex which are very often call, -// a basic macro is more effective -- Gregory -#define NoHighlights(I) (!(conf.settings().xenosaga_spec) || !vb[(I)].zbuf.zmsk || prim->iip) - -enum PRIM_TYPE { - PRIM_POINT = 0, - PRIM_LINE, - PRIM_LINE_STRIP, - PRIM_TRIANGLE, - PRIM_TRIANGLE_STRIP, - PRIM_TRIANGLE_FAN, - PRIM_SPRITE, - PRIM_DUMMY -}; - -class Kick -{ - private: - // template void Set_Vertex(VertexGPU *p, int i); - template void Set_Vertex(VertexGPU *p, Vertex &gsvertex); - void Output_Vertex(VertexGPU vert, u32 id); - bool ValidPrevPrim; - public: - Kick() { } - ~Kick() { } - - void KickVertex(bool adc); - - void DrawPrim(u32 i); - - inline void DirtyValidPrevPrim() { - ValidPrevPrim = 0; - } -}; -extern Kick* ZZKick; - -#endif // ZZOGLDRAWING_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglFlush.cpp b/plugins/zzogl-pg-cg/opengl/ZZoglFlush.cpp deleted file mode 100644 index f9c792bdda..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglFlush.cpp +++ /dev/null @@ -1,2876 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// Realization of Flush -- drawing function of GS - -#include - -#include "GS.h" -#include "Mem.h" -#include "targets.h" -#include "ZZoglFlushHack.h" -#include "ZZoglShaders.h" -#include "ZZClut.h" -#include - -//------------------ Defines -#ifndef ZEROGS_DEVBUILD - -#define INC_GENVARS() -#define INC_TEXVARS() -#define INC_ALPHAVARS() -#define INC_RESOLVE() - -#define g_bUpdateEffect 0 -#define g_bSaveTex 0 -bool g_bSaveTrans = 0; -#define g_bSaveResolved 0 - -#else // defined(ZEROGS_DEVBUILD) - -#define INC_GENVARS() ++g_nGenVars -#define INC_TEXVARS() ++g_nTexVars -#define INC_ALPHAVARS() ++g_nAlphaVars -#define INC_RESOLVE() ++g_nResolve - -bool g_bSaveTrans = 0; -bool g_bUpdateEffect = 0; -bool g_bSaveTex = 0; // saves the curent texture -bool g_bSaveResolved = 0; -#endif // !defined(ZEROGS_DEVBUILD) - -#define STENCIL_ALPHABIT 1 // if set, dest alpha >= 0x80 -#define STENCIL_PIXELWRITE 2 // if set, pixel just written (reset after every Flush) -#define STENCIL_FBA 4 // if set, just written pixel's alpha >= 0 (reset after every Flush) -#define STENCIL_SPECIAL 8 // if set, indicates that pixel passed its alpha test (reset after every Flush) -//#define STENCIL_PBE 16 -#define STENCIL_CLEAR (2|4|8|16) - -void Draw(const VB& curvb) -{ - glDrawArrays(primtype[curvb.curprim.prim], 0, curvb.nCount); -} - -#define GL_BLEND_RGB(src, dst) { \ - s_srcrgb = src; \ - s_dstrgb = dst; \ - zgsBlendFuncSeparateEXT(s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha); \ -} - -#define GL_BLEND_ALPHA(src, dst) { \ - s_srcalpha = src; \ - s_dstalpha = dst; \ - zgsBlendFuncSeparateEXT(s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha); \ -} - -#define GL_BLEND_ALL(srcrgb, dstrgb, srcalpha, dstalpha) { \ - s_srcrgb = srcrgb; \ - s_dstrgb = dstrgb; \ - s_srcalpha = srcalpha; \ - s_dstalpha = dstalpha; \ - zgsBlendFuncSeparateEXT(s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha); \ -} - -#define GL_ZTEST(enable) { \ - if (enable) glEnable(GL_DEPTH_TEST); \ - else glDisable(GL_DEPTH_TEST); \ -} - -#define GL_ALPHATEST(enable) { \ - if( enable ) glEnable(GL_ALPHA_TEST); \ - else glDisable(GL_ALPHA_TEST); \ -} - -#define GL_BLENDEQ_RGB(eq) { \ - s_rgbeq = eq; \ - zgsBlendEquationSeparateEXT(s_rgbeq, s_alphaeq); \ -} - -#define GL_BLENDEQ_ALPHA(eq) { \ - s_alphaeq = eq; \ - zgsBlendEquationSeparateEXT(s_rgbeq, s_alphaeq); \ -} - -#define COLORMASK_RED 1 -#define COLORMASK_GREEN 2 -#define COLORMASK_BLUE 4 -#define COLORMASK_ALPHA 8 -#define GL_COLORMASK(mask) glColorMask(!!((mask)&COLORMASK_RED), !!((mask)&COLORMASK_GREEN), !!((mask)&COLORMASK_BLUE), !!((mask)&COLORMASK_ALPHA)) - -// ----------------- Types -//------------------ Dummies - -//------------------ variables - -extern int g_nDepthBias; -extern float g_fBlockMult; // used for old cards, that do not support Alpha-32float textures. We store block data in u16 and use it. -bool g_bUpdateStencil = 1; - -extern ZZshProgram g_psprog; // 2 -- ZZ - -// local alpha blending settings -static GLenum s_rgbeq, s_alphaeq; // set by zgsBlendEquationSeparateEXT // ZZ - - -static const u32 blendalpha[3] = { GL_SRC_ALPHA, GL_DST_ALPHA, GL_CONSTANT_COLOR_EXT }; // ZZ -static const u32 blendinvalpha[3] = { GL_ONE_MINUS_SRC_ALPHA, GL_ONE_MINUS_DST_ALPHA, GL_ONE_MINUS_CONSTANT_COLOR_EXT }; //ZZ -static const u32 g_dwAlphaCmp[] = { GL_NEVER, GL_ALWAYS, GL_LESS, GL_LEQUAL, GL_EQUAL, GL_GEQUAL, GL_GREATER, GL_NOTEQUAL }; // ZZ - -// used for afail case -static const u32 g_dwReverseAlphaCmp[] = { GL_ALWAYS, GL_NEVER, GL_GEQUAL, GL_GREATER, GL_NOTEQUAL, GL_LESS, GL_LEQUAL, GL_EQUAL }; -static const u32 g_dwZCmp[] = { GL_NEVER, GL_ALWAYS, GL_GEQUAL, GL_GREATER }; - -///////////////////// -// graphics resources -#define s_bForceTexFlush 1 // ZZ -static u32 s_ptexCurSet[2] = {0}; -static u32 s_ptexNextSet[2] = {0}; // ZZ - - -extern vector s_vecTempTextures; // temporary textures, released at the end of every frame -extern bool s_bTexFlush; -extern int g_nCurVBOIndex; -bool s_bWriteDepth = false; -bool s_bDestAlphaTest = false; -int s_ClutResolve = 0; // ZZ -int g_nDepthUsed = 0; // ffx2 pal movies -int s_nWriteDepthCount = 0; // ZZ -int s_nWriteDestAlphaTest = 0; // ZZ - -//////////////////// -// State parameters -static float4 vAlphaBlendColor; // used for GPU_COLOR - -static bool bNeedBlendFactorInAlpha; // set if the output source alpha is different from the real source alpha (only when blend factor > 0x80) -static u32 s_dwColorWrite = 0xf; // the color write mask of the current target - -typedef union -{ - struct - { - u8 _bNeedAlphaColor; // set if vAlphaBlendColor needs to be set - u8 _b2XAlphaTest; // Only valid when bNeedAlphaColor is set. if 1st bit set set, double all alpha testing values - // otherwise alpha testing needs to be done separately. - u8 _bDestAlphaColor; // set to 1 if blending with dest color (process only one tri at a time). If 2, dest alpha is always 1. - u8 _bAlphaClamping; // if first bit is set, do min; if second bit, do max - }; - - u32 _bAlphaState; -} g_flag_vars; - -g_flag_vars g_vars; - -//#define bNeedAlphaColor g_vars._bNeedAlphaColor -#define b2XAlphaTest g_vars._b2XAlphaTest -#define bDestAlphaColor g_vars._bDestAlphaColor -#define bAlphaClamping g_vars._bAlphaClamping - -int g_PrevBitwiseTexX = -1, g_PrevBitwiseTexY = -1; // textures stored in SAMP_BITWISEANDX and SAMP_BITWISEANDY // ZZ - -//static alphaInfo s_alphaInfo; // ZZ - -extern u8* g_pbyGSClut; -extern int ppf; - -int s_nWireframeCount = 0; - -//------------------ Namespace - -VB vb[2]; -float fiTexWidth[2], fiTexHeight[2]; // current tex width and height -extern vector g_vboBuffers; // VBOs for all drawing commands - -//u8 s_AAx = 0, s_AAy = 0; // if AAy is set, then AAx has to be set -Point AA = {0,0}; - -int icurctx = -1; - -extern CRangeManager s_RangeMngr; // manages overwritten memory // zz -void FlushTransferRanges(const tex0Info* ptex); //zz - -// use to update the state -void SetTexVariables(int context, FRAGMENTSHADER* pfragment); // zz -void SetTexInt(int context, FRAGMENTSHADER* pfragment, int settexint); // zz -void SetAlphaVariables(const alphaInfo& ainfo); // zzz -//void ResetAlphaVariables(); - -inline void SetAlphaTestInt(pixTest curtest); - -inline void RenderAlphaTest(const VB& curvb, ZZshParameter sOneColor); -inline void RenderStencil(const VB& curvb, u32 dwUsingSpecialTesting); -inline void ProcessStencil(const VB& curvb); -inline void RenderFBA(const VB& curvb, ZZshParameter sOneColor); -inline void ProcessFBA(const VB& curvb, ZZshParameter sOneColor); // zz - -void SetContextTarget(int context); - -void SetWriteDepth(); -bool IsWriteDepth(); -void SetDestAlphaTest(); - -//------------------ Code - -inline float AlphaReferedValue(int aref) -{ - return b2XAlphaTest ? min(1.0f, (float)aref / 127.5f) : (float)aref / 255.0f ; -} - -inline void SetAlphaTest(const pixTest& curtest) -{ - // if s_dwColorWrite is nontrivial, than we should not off alphatest. - // This fix GOW and Okami. - if (!curtest.ate && USEALPHATESTING && (s_dwColorWrite != 2 && s_dwColorWrite != 14)) - { - glDisable(GL_ALPHA_TEST); - } - else - { - glEnable(GL_ALPHA_TEST); - glAlphaFunc(g_dwAlphaCmp[curtest.atst], AlphaReferedValue(curtest.aref)); - } -} - -// Return, if tcc, aem or psm mode told us, than Alpha test should be used -// if tcc == 0 than no alpha used, aem used for alpha expanding and I am not sure -// that it's correct, psm -- color mode, -inline bool IsAlphaTestExpansion(tex0Info tex0) -{ - return (tex0.tcc && gs.texa.aem && PSMT_ALPHAEXP(PIXEL_STORAGE_FORMAT(tex0))); -} - -// Switch wireframe rendering off for first flush, so it's draw few solid primitives -inline void SwitchWireframeOff() -{ - if (conf.wireframe()) - { - if (s_nWireframeCount > 0) - { - glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - } - } -} - -// Switch wireframe rendering on, look at previous function -inline void SwitchWireframeOn() -{ - if (conf.wireframe()) - { - if (s_nWireframeCount > 0) - { - glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - --s_nWireframeCount; - } - } -} - -extern u32 ptexBilinearBlocks; - -int GetTexFilter(const tex1Info& tex1) -{ - // always force - if (conf.bilinear == 2) return 1; - - int texfilter = 0; - - if (conf.bilinear && ptexBilinearBlocks != 0) - { - if (tex1.mmin <= 1) - texfilter = tex1.mmin | tex1.mmag; - else - texfilter = tex1.mmag ? ((tex1.mmin + 2) & 5) : tex1.mmin; - - texfilter = texfilter == 1 || texfilter == 4 || texfilter == 5; - } - - return texfilter; -} - -void ReloadEffects() -{ -#ifdef ZEROGS_DEVBUILD - - for (int i = 0; i < ArraySize(ppsTexture); ++i) - { - SAFE_RELEASE_PROG(ppsTexture[i].prog); - } - - memset(ppsTexture, 0, sizeof(ppsTexture)); - - ZZshLoadExtraEffects(); -#endif -} - -long BufferNumber = 0; - -// This is a debug function. It prints all buffer info and save current texture into the file, then prints the file name. -inline void VisualBufferMessage(int context) -{ -#if defined(WRITE_PRIM_LOGS) && defined(_DEBUG) - BufferNumber++; - VB& curvb = vb[context]; - static const char* patst[8] = { "NEVER", "ALWAYS", "LESS", "LEQUAL", "EQUAL", "GEQUAL", "GREATER", "NOTEQUAL"}; - static const char* pztst[4] = { "NEVER", "ALWAYS", "GEQUAL", "GREATER" }; - static const char* pafail[4] = { "KEEP", "FB_ONLY", "ZB_ONLY", "RGB_ONLY" }; - ZZLog::Debug_Log("**Drawing ctx %d, num %d, fbp: 0x%x, zbp: 0x%x, fpsm: %d, zpsm: %d, fbw: %d", context, vb[context].nCount, curvb.prndr->fbp, curvb.zbuf.zbp, curvb.prndr->psm, curvb.zbuf.psm, curvb.prndr->fbw); - ZZLog::Debug_Log("prim: prim=%x iip=%x tme=%x fge=%x abe=%x aa1=%x fst=%x ctxt=%x fix=%x", - curvb.curprim.prim, curvb.curprim.iip, curvb.curprim.tme, curvb.curprim.fge, curvb.curprim.abe, curvb.curprim.aa1, curvb.curprim.fst, curvb.curprim.ctxt, curvb.curprim.fix); - ZZLog::Debug_Log("test: ate:%d, atst: %s, aref: %d, afail: %s, date: %d, datm: %d, zte: %d, ztst: %s, fba: %d", - curvb.test.ate, patst[curvb.test.atst], curvb.test.aref, pafail[curvb.test.afail], curvb.test.date, curvb.test.datm, curvb.test.zte, pztst[curvb.test.ztst], curvb.fba.fba); - ZZLog::Debug_Log("alpha: A%d B%d C%d D%d FIX:%d pabe: %d; aem: %d, ta0: %d, ta1: %d\n", curvb.alpha.a, curvb.alpha.b, curvb.alpha.c, curvb.alpha.d, curvb.alpha.fix, gs.pabe, gs.texa.aem, gs.texa.ta[0], gs.texa.ta[1]); - ZZLog::Debug_Log("tex0: tbp0=0x%x, tbw=%d, psm=0x%x, tw=%d, th=%d, tcc=%d, tfx=%d, cbp=0x%x, cpsm=0x%x, csm=%d, csa=%d, cld=%d", - curvb.tex0.tbp0, curvb.tex0.tbw, curvb.tex0.psm, curvb.tex0.tw, - curvb.tex0.th, curvb.tex0.tcc, curvb.tex0.tfx, curvb.tex0.cbp, - curvb.tex0.cpsm, curvb.tex0.csm, curvb.tex0.csa, curvb.tex0.cld); - char* Name; - Name = NamedSaveTex(&curvb.tex0, 1); - ZZLog::Error_Log("TGA name '%s'.", Name); - free(Name); - ZZLog::Debug_Log("buffer %ld.\n", BufferNumber); -#endif -} - -inline void SaveRendererTarget(VB& curvb) -{ -#ifdef _DEBUG - -// Needs a # after rndr to work... -// char str[255]; -// sprintf(str, "rndr.tga"); -// SaveRenderTarget(str, curvb.prndr->fbw, curvb.prndr->fbh, 0); - -#endif -} - -// Stop effects in Developers mode -inline void FlushUpdateEffect() -{ -#if defined(DEVBUILD) - - if (g_bUpdateEffect) - { - ReloadEffects(); - g_bUpdateEffect = 0; - } - -#endif -} - -// Check, maybe we cold skip flush -inline bool IsFlushNoNeed(VB& curvb, const pixTest& curtest) -{ - if (curvb.nCount == 0 || (curtest.zte && curtest.ztst == 0) || IsBadFrame(curvb)) - { - curvb.nCount = 0; - return true; - } - - return false; -} - -// Transfer targets, that are located in current texture. -inline void FlushTransferRangesHelper(VB& curvb) -{ - if (s_RangeMngr.ranges.size() > 0) - { - // don't want infinite loop, so set nCount to 0. - u32 prevcount = curvb.nCount; - curvb.nCount = 0; - - FlushTransferRanges(curvb.curprim.tme ? &curvb.tex0 : NULL); - - curvb.nCount += prevcount; - } -} - -// If set bit for texture checking, do it. Maybe it's all. -inline bool FushTexDataHelper(VB& curvb) -{ - if (curvb.bNeedFrameCheck || curvb.bNeedZCheck) - { - curvb.CheckFrame(curvb.curprim.tme ? curvb.tex0.tbp0 : 0); - } - - if (curvb.bNeedTexCheck) // Zeydlitz want to try this - { - curvb.FlushTexData(); - - if (curvb.nCount == 0) return true; - } - - return false; -} - -// Null target mean that we do something really bad. -inline bool FlushCheckForNULLTarget(VB& curvb, int context) -{ - if ((curvb.prndr == NULL) || (curvb.pdepth == NULL)) - { - ERROR_LOG_SPAMA("Current render target NULL (ctx: %d)", context); - curvb.nCount = 0; - return true; - } - - return false; -} - -// O.k. A set of resolutions, we do before real flush. We do RangeManager, FrameCheck and -// ZCheck before this. -inline bool FlushInitialTest(VB& curvb, const pixTest& curtest, int context) -{ - GL_REPORT_ERRORD(); - assert(context >= 0 && context <= 1); - - FlushUpdateEffect(); - - if (IsFlushNoNeed(curvb, curtest)) return true; - - FlushTransferRangesHelper(curvb); - - if (FushTexDataHelper(curvb)) return true; - - GL_REPORT_ERRORD(); - - if (FlushCheckForNULLTarget(curvb, context)) return true; - - return false; -} - -inline void TargetLog(int& tbw, int& tbp0, int& tpsm, VB& curvb, bool miss) -{ -#ifdef _DEBUG - if (tbp0 == 0x3600 && tbw == 0x100) - { - if (miss) - { - ZZLog::Debug_Log("Miss %x 0x%x %d", tbw, tbp0, tpsm); - - typedef map MAPTARGETS; - - for (MAPTARGETS::iterator itnew = s_RTs.mapTargets.begin(); itnew != s_RTs.mapTargets.end(); ++itnew) - { - ZZLog::Debug_Log("\tRender %x 0x%x %x", itnew->second->fbw, itnew->second->fbp, itnew->second->psm); - } - - for (MAPTARGETS::iterator itnew = s_DepthRTs.mapTargets.begin(); itnew != s_DepthRTs.mapTargets.end(); ++itnew) - { - ZZLog::Debug_Log("\tDepth %x 0x%x %x", itnew->second->fbw, itnew->second->fbp, itnew->second->psm); - } - - ZZLog::Debug_Log("\tCurvb 0x%x 0x%x 0x%x %x", curvb.frame.fbp, curvb.prndr->end, curvb.prndr->fbp, curvb.prndr->fbw); - } - else - ZZLog::Debug_Log("Hit %x 0x%x %x", tbw, tbp0, tpsm); - } -#endif -} - -// Try to different approach if texture target was not found -inline CRenderTarget* FlushReGetTarget(int& tbw, int& tbp0, int& tpsm, VB& curvb) -{ - // This was incorrect code - CRenderTarget* ptextarg = NULL; - - if (PSMT_ISZTEX(tpsm)) - { - // try depth - ptextarg = s_DepthRTs.GetTarg(tbp0, tbw); - } - - // I wonder if either of these hacks are useful, or if I can just remove them? - if ((conf.settings().reget) && (tpsm == PSMT8)) - { - // check for targets with half the width. Break Valkyrie Chronicles - ptextarg = s_RTs.GetTarg(tbp0, tbw / 2); - - if (ptextarg == NULL) - { - tbp0 &= ~0x7ff; - ptextarg = s_RTs.GetTarg(tbp0, tbw / 2); // mgs3 hack - - if (ptextarg == NULL) - { - // check the next level (mgs3) - tbp0 &= ~0xfff; - ptextarg = s_RTs.GetTarg(tbp0, tbw / 2); // mgs3 hack - } - - if (ptextarg != NULL && ptextarg->start > tbp0*256) - { - // target beyond range, so ignore - ptextarg = NULL; - } - } - } - - if ((conf.settings().texture_targs) && (ptextarg == NULL)) - { - // check if any part of the texture intersects the current target - if (!PSMT_ISCLUT(tpsm) && (curvb.tex0.tbp0 >= curvb.frame.fbp) && ((curvb.tex0.tbp0) < curvb.prndr->end)) - { - ptextarg = curvb.prndr; - } - } - - TargetLog(tbw, tbp0, tpsm, curvb, (ptextarg == NULL)); - - return ptextarg; -} - -// Find target to draw a texture. -inline CRenderTarget* FlushGetTarget(VB& curvb) -{ - int tbw, tbp0, tpsm; - - CRenderTarget* ptextarg = NULL; - - if (!curvb.curprim.tme) return ptextarg; // Which would be NULL, currently. - - if (curvb.bNeedTexCheck) - { - ZZLog::Error_Log("How it is possible?"); - // not yet initied, but still need to get correct target! (xeno3 ingame) - tbp0 = ZZOglGet_tbp0_TexBits(curvb.uNextTex0Data[0]); - tbw = ZZOglGet_tbw_TexBitsMult(curvb.uNextTex0Data[0]); - tpsm = ZZOglGet_psm_TexBitsFix(curvb.uNextTex0Data[0]); - } - else - { - tbw = curvb.tex0.tbw; - tbp0 = curvb.tex0.tbp0; - tpsm = curvb.tex0.psm; - } - - ptextarg = s_RTs.GetTarg(tbp0, tbw); - - if (ptextarg == NULL) ptextarg = FlushReGetTarget(tbw, tbp0, tpsm, curvb); - - if ((ptextarg != NULL) && !(ptextarg->status & CRenderTarget::TS_NeedUpdate)) - { - if (PSMT_BITMODE(tpsm) == 4) // handle 8h cluts - { - // don't support clut targets, read from mem - // 4hl - kh2 check - from dx version -- arcum42 - - if (tpsm == PSMT4 && s_ClutResolve <= 1) - { - // xenosaga requires 2 resolves - u32 prevcount = curvb.nCount; - curvb.nCount = 0; - ptextarg->Resolve(); - s_ClutResolve++; - curvb.nCount += prevcount; - } - - ptextarg = NULL; - } - else - { - if (ptextarg == curvb.prndr) - { - // need feedback - curvb.prndr->CreateFeedback(); - - if (s_bWriteDepth && (curvb.pdepth != NULL)) - curvb.pdepth->SetRenderTarget(1); - else - ResetRenderTarget(1); - } - } - } - else - { - // If a texture needs updating, clear it. - ptextarg = NULL; - } - - return ptextarg; -} - -// Set target for current context -inline void FlushSetContextTarget(VB& curvb, int context) -{ - if (!curvb.bVarsSetTarg) - { - SetContextTarget(context); - } - else - { - assert(curvb.pdepth != NULL); - - if (curvb.pdepth->status & CRenderTarget::TS_Virtual) - { - if (!curvb.zbuf.zmsk) - { - CRenderTarget* ptemp = s_DepthRTs.Promote(GetFrameKey(curvb.pdepth)); - assert(ptemp == curvb.pdepth); - } - else - { - curvb.pdepth->status &= ~CRenderTarget::TS_NeedUpdate; - } - } - - if ((curvb.pdepth->status & CRenderTarget::TS_NeedUpdate) || (curvb.prndr->status & CRenderTarget::TS_NeedUpdate)) - SetContextTarget(context); - } - - assert(!(curvb.prndr->status&CRenderTarget::TS_NeedUpdate)); - - curvb.prndr->status = 0; - - if (curvb.pdepth != NULL) - { -#ifdef _DEBUG - // Reduce an assert to a warning. - if (curvb.pdepth->status & CRenderTarget::TS_NeedUpdate) - { - ZZLog::Debug_Log("In FlushSetContextTarget, pdepth has TS_NeedUpdate set."); - } -#endif - if (!curvb.zbuf.zmsk) - { - assert(!(curvb.pdepth->status & CRenderTarget::TS_Virtual)); - curvb.pdepth->status = 0; - } - } -} - -inline void FlushSetStream(VB& curvb) -{ - glBindBuffer(GL_ARRAY_BUFFER, g_vboBuffers[g_nCurVBOIndex]); - g_nCurVBOIndex = (g_nCurVBOIndex + 1) % g_vboBuffers.size(); - glBufferData(GL_ARRAY_BUFFER, curvb.nCount * sizeof(VertexGPU), curvb.pBufferData, GL_STREAM_DRAW); -// void* pdata = glMapBuffer(GL_ARRAY_BUFFER, GL_WRITE_ONLY); -// memcpy(pdata, curvb.pBufferData, curvb.nCount * sizeof(VertexGPU)); -// glUnmapBuffer(GL_ARRAY_BUFFER); - SET_STREAM(); - - GL_REPORT_ERRORD(); -} - -int SetMaskR = 0x0; -int SetMaskG = 0x0; -int SetMaskB = 0x0; -// Set color mask. Really, it's not as good as PS2 one. -inline void FlushSetColorMask(VB& curvb) -{ - s_dwColorWrite = (PSMT_BITMODE(curvb.prndr->psm) == 1) ? (COLORMASK_BLUE | COLORMASK_GREEN | COLORMASK_RED) : 0xf; - - int maskR = ZZOglGet_fbmRed_FrameBits(curvb.frame.fbm); - int maskG = ZZOglGet_fbmGreen_FrameBits(curvb.frame.fbm); - int maskB = ZZOglGet_fbmBlue_FrameBits(curvb.frame.fbm); - int maskA = ZZOglGet_fbmAlpha_FrameBits(curvb.frame.fbm); - - if (maskR == 0xff) s_dwColorWrite &= ~COLORMASK_RED; - if (maskG == 0xff) s_dwColorWrite &= ~COLORMASK_GREEN; - if (maskB == 0xff) s_dwColorWrite &= ~COLORMASK_BLUE; - - if ((maskA == 0xff) || (curvb.curprim.abe && (curvb.test.atst == 2 && curvb.test.aref == 128))) - s_dwColorWrite &= ~COLORMASK_ALPHA; - - GL_COLORMASK(s_dwColorWrite); -} - -// Set Scissors for scissor test. -inline void FlushSetScissorRect(VB& curvb) -{ - Rect& scissor = curvb.prndr->scissorrect; - glScissor(scissor.x, scissor.y, scissor.w, scissor.h); -} - -// Prior really doing something check context -inline void FlushDoContextJob(VB& curvb, int context) -{ - SaveRendererTarget(curvb); - - FlushSetContextTarget(curvb, context); - icurctx = context; - - FlushSetStream(curvb); - FlushSetColorMask(curvb); - FlushSetScissorRect(curvb); -} - -// Set 1 is Alpha test is EQUAL and alpha should be proceed with care. -inline int FlushGetExactcolor(const pixTest curtest) -{ - if (!(g_nPixelShaderVer&SHADER_REDUCED)) - // ffx2 breaks when ==7 - return ((curtest.ate && curtest.aref <= 128) && (curtest.atst == 4));//||curtest.atst==7); - - return 0; -} - -// fill the buffer by decoding the clut -inline void FlushDecodeClut(VB& curvb, GLuint& ptexclut) -{ - glGenTextures(1, &ptexclut); - glBindTexture(GL_TEXTURE_2D, ptexclut); - - if (ptexclut != 0) - { - int clutsize; - int entries = PSMT_IS8CLUT(curvb.tex0.psm) ? 256 : 16; - - if (curvb.tex0.csm && curvb.tex0.csa) ZZLog::Debug_Log("ERROR, csm1."); - - if (PSMT_IS32BIT(curvb.tex0.cpsm)) { - __aligned16 u32 data[256]; - clutsize = min(entries, 256 - curvb.tex0.csa * 16) * 4; - - ClutBuffer_to_Array((u32*)data, curvb.tex0.csa, clutsize); - - Texture2D(4, 256, 1, GL_RGBA, GL_UNSIGNED_BYTE, data); - } else { - __aligned16 u16 data[256]; - clutsize = min(entries, 512 - curvb.tex0.csa * 16) * 2; - - ClutBuffer_to_Array((u16*)data, curvb.tex0.csa, clutsize); - - Texture2D(4, 256, 1, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1, data); - } - - s_vecTempTextures.push_back(ptexclut); - - if (g_bSaveTex) SaveTexture("clut.tga", GL_TEXTURE_2D, ptexclut, 256, 1); - - setTex2DWrap(GL_REPEAT); - setTex2DFilters(GL_LINEAR); - } -} - -inline int FlushGetShaderType(VB& curvb, CRenderTarget* ptextarg, GLuint& ptexclut) -{ - if (PSMT_ISCLUT(curvb.tex0.psm) && !(conf.settings().no_target_clut)) - { - FlushDecodeClut(curvb, ptexclut); - - if (!(g_nPixelShaderVer&SHADER_REDUCED) && PSMT_ISHALF(ptextarg->psm)) - { - return 4; - } - else - { - // Valkyrie - return 2; - } - } - - if (PSMT_ISHALF_STORAGE(curvb.tex0) != PSMT_ISHALF(ptextarg->psm) && (!(g_nPixelShaderVer&SHADER_REDUCED) || !curvb.curprim.fge)) - { - if (PSMT_ISHALF_STORAGE(curvb.tex0)) - { - // converting from 32->16 - // Radiata Chronicles - return 3; - } - else - { - // converting from 16->32 - // Star Ward: Force - return 0; - } - } - - return 1; -} - - -//Set page offsets depends on shader type. -inline float4 FlushSetPageOffset(FRAGMENTSHADER* pfragment, int shadertype, CRenderTarget* ptextarg) -{ - SetShaderCaller("FlushSetPageOffset"); - - float4 vpageoffset; - vpageoffset.w = 0; - - switch (shadertype) - { - case 3: - vpageoffset.x = -0.1f / 256.0f; - vpageoffset.y = -0.001f / 256.0f; - vpageoffset.z = -0.1f / (ptextarg->fbh); - vpageoffset.w = 0.0f; - break; - - case 4: - vpageoffset.x = 2; - vpageoffset.y = 1; - vpageoffset.z = 0; - vpageoffset.w = 0.0001f; - break; - } - - // zoe2 - if (PSMT_ISZTEX(ptextarg->psm)) vpageoffset.w = -1.0f; - - ZZshSetParameter4fv(pfragment->fPageOffset, vpageoffset, "g_fPageOffset"); - - return vpageoffset; -} - -//Set texture offsets depends omn shader type. -inline float4 FlushSetTexOffset(FRAGMENTSHADER* pfragment, int shadertype, VB& curvb, CRenderTarget* ptextarg) -{ - SetShaderCaller("FlushSetTexOffset"); - float4 v; - - if (shadertype == 3) - { - float4 v; - v.x = 16.0f / (float)curvb.tex0.tw; - v.y = 16.0f / (float)curvb.tex0.th; - v.z = 0.5f * v.x; - v.w = 0.5f * v.y; - ZZshSetParameter4fv(pfragment->fTexOffset, v, "g_fTexOffset"); - } - else if (shadertype == 4) - { - float4 v; - v.x = 16.0f / (float)ptextarg->fbw; - v.y = 16.0f / (float)ptextarg->fbh; - v.z = -1; - v.w = 8.0f / (float)ptextarg->fbh; - ZZshSetParameter4fv(pfragment->fTexOffset, v, "g_fTexOffset"); - } - - return v; -} - -// Set dimension (Real!) of texture. z and w -inline float4 FlushTextureDims(FRAGMENTSHADER* pfragment, int shadertype, VB& curvb, CRenderTarget* ptextarg) -{ - SetShaderCaller("FlushTextureDims"); - float4 vTexDims; - vTexDims.x = (float)RW(curvb.tex0.tw) ; - vTexDims.y = (float)RH(curvb.tex0.th) ; - - // look at the offset of tbp0 from fbp - - if (curvb.tex0.tbp0 <= ptextarg->fbp) - { - vTexDims.z = 0;//-0.5f/(float)ptextarg->fbw; - vTexDims.w = 0;//0.2f/(float)ptextarg->fbh; - } - else - { - //u32 tbp0 = curvb.tex0.tbp0 >> 5; // align to a page - int blockheight = PSMT_ISHALF(ptextarg->psm) ? 64 : 32; - int ycoord = ((curvb.tex0.tbp0 - ptextarg->fbp) / (32 * (ptextarg->fbw >> 6))) * blockheight; - int xcoord = (((curvb.tex0.tbp0 - ptextarg->fbp) % (32 * (ptextarg -> fbw >> 6)))) * 2; - vTexDims.z = (float)xcoord; - vTexDims.w = (float)ycoord; - } - - if (shadertype == 4) - vTexDims.z += 8.0f; - - ZZshSetParameter4fv(pfragment->fTexDims, vTexDims, "g_fTexDims"); - - return vTexDims; -} - -// Apply TEX1 mmag and mmin -- filter for expanding/reducing texture -// We ignore all settings, only NEAREST (0) is used -inline void FlushApplyResizeFilter(VB& curvb, u32& dwFilterOpts, CRenderTarget* ptextarg, int context) -{ - u32 ptexset = (ptextarg == curvb.prndr) ? ptextarg->ptexFeedback : ptextarg->ptex; - s_ptexCurSet[context] = ptexset; - - if ((!curvb.tex1.mmag) || (!curvb.tex1.mmin)) - glBindTexture(GL_TEXTURE_RECTANGLE_NV, ptexset); - - if (!curvb.tex1.mmag) - { - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - dwFilterOpts |= 1; - } - - if (!curvb.tex1.mmin) - { - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - dwFilterOpts |= 2; - } -} - - -// Usage existing targets depends on several tricks, 32-16 conversion and CLUTing, so we need to handle it. -inline FRAGMENTSHADER* FlushUseExistRenderTarget(VB& curvb, CRenderTarget* ptextarg, u32& dwFilterOpts, int exactcolor, int context) -{ - if (ptextarg->IsDepth()) - SetWriteDepth(); - - GLuint ptexclut = 0; - - //int psm = PIXEL_STORAGE_FORMAT(curvb.tex0); - int shadertype = FlushGetShaderType(curvb, ptextarg, ptexclut); - - FRAGMENTSHADER* pfragment = ZZshLoadShadeEffect(shadertype, 0, curvb.curprim.fge, - IsAlphaTestExpansion(curvb.tex0), exactcolor, curvb.clamp, context, NULL); - - float4 vpageoffset = FlushSetPageOffset(pfragment, shadertype, ptextarg); - - float4 v = FlushSetTexOffset(pfragment, shadertype, curvb, ptextarg); - - float4 vTexDims = FlushTextureDims(pfragment, shadertype, curvb, ptextarg); - - if (pfragment->sCLUT != NULL && ptexclut != 0) - ZZshGLSetTextureParameter(pfragment->sCLUT, ptexclut, "CLUT"); - - FlushApplyResizeFilter(curvb, dwFilterOpts, ptextarg, context); - - if (g_bSaveTex) - SaveTexture("tex.tga", GL_TEXTURE_RECTANGLE_NV, - ptextarg == curvb.prndr ? ptextarg->ptexFeedback : ptextarg->ptex, RW(ptextarg->fbw), RH(ptextarg->fbh)); - - return pfragment; -} - -// Usage most major shader. -inline FRAGMENTSHADER* FlushMadeNewTarget(VB& curvb, int exactcolor, int context) -{ - // save the texture - if (g_bSaveTex) - { - // FIXME: I suspect one of g_bSaveTex test variable is wrong - if (g_bSaveTex == 1) - { - SaveTex(&curvb.tex0, 1); - /*CMemoryTarget* pmemtarg = */ - g_MemTargs.GetMemoryTarget(curvb.tex0, 0); - } - else - { - SaveTex(&curvb.tex0, 0); - } - } - - FRAGMENTSHADER* pfragment = ZZshLoadShadeEffect(0, GetTexFilter(curvb.tex1), curvb.curprim.fge, - IsAlphaTestExpansion(curvb.tex0), exactcolor, curvb.clamp, context, NULL); - - if (pfragment == NULL) - ZZLog::Error_Log("Could not find memory target shader."); - - return pfragment; -} - -// We made an shader, so now need to put all common variables. -inline void FlushSetTexture(VB& curvb, FRAGMENTSHADER* pfragment, CRenderTarget* ptextarg, int context) -{ - SetTexVariables(context, pfragment); - SetTexInt(context, pfragment, ptextarg == NULL); - - // have to enable the texture parameters(curtest.atst) - if( curvb.ptexClamp[0] != 0 ) - ZZshGLSetTextureParameter(pfragment->sBitwiseANDX, curvb.ptexClamp[0], "Clamp 0"); - - if( curvb.ptexClamp[1] != 0 ) - ZZshGLSetTextureParameter(pfragment->sBitwiseANDY, curvb.ptexClamp[1], "Clamp 1"); - - if( pfragment->sMemory != NULL && s_ptexCurSet[context] != 0) - ZZshGLSetTextureParameter(pfragment->sMemory, s_ptexCurSet[context], "Clamp memory"); - -} - -// Reset program and texture variables; -inline void FlushBindProgramm(FRAGMENTSHADER* pfragment, int context) -{ - vb[context].bTexConstsSync = 0; - vb[context].bVarsTexSync = 0; - - ZZshSetPixelShader(pfragment->prog); -} - -inline FRAGMENTSHADER* FlushRendererStage(VB& curvb, u32& dwFilterOpts, CRenderTarget* ptextarg, int exactcolor, int context) -{ - - FRAGMENTSHADER* pfragment = NULL; - - // set the correct pixel shaders - - if (curvb.curprim.tme) - { - if (ptextarg != NULL) - pfragment = FlushUseExistRenderTarget(curvb, ptextarg, dwFilterOpts, exactcolor, context); - else - pfragment = FlushMadeNewTarget(curvb, exactcolor, context); - - if (pfragment == NULL) - { - ZZLog::Error_Log("Shader is not found."); -// return NULL; - } - - FlushSetTexture(curvb, pfragment, ptextarg, context); - } - else - { - pfragment = &ppsRegular[curvb.curprim.fge + 2 * s_bWriteDepth]; - } - - GL_REPORT_ERRORD(); - - // set the shaders - SetShaderCaller("FlushRendererStage"); - ZZshSetVertexShader(pvs[2 * ((curvb.curprim._val >> 1) & 3) + 8 * s_bWriteDepth + context]); - FlushBindProgramm(pfragment, context); - - GL_REPORT_ERRORD(); - return pfragment; -} - -inline bool AlphaCanRenderStencil(VB& curvb) -{ - return g_bUpdateStencil && (PSMT_BITMODE(curvb.prndr->psm) != 1) && - !ZZOglGet_fbmHighByte(curvb.frame.fbm) && !(conf.settings().no_stencil); -} - -inline void AlphaSetStencil(bool DoIt) -{ - if (DoIt) - { - glEnable(GL_STENCIL_TEST); - GL_STENCILFUNC(GL_ALWAYS, 0, 0); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - } - else glDisable(GL_STENCIL_TEST); -} - -//inline u32 FtoDW(float f) { return (*((u32*)&f)); } - -inline void AlphaSetDepthTest(VB& curvb, const pixTest curtest, FRAGMENTSHADER* pfragment) -{ - glDepthMask(!curvb.zbuf.zmsk && curtest.zte); - // && curtest.zte && (curtest.ztst > 1) ); - - if (curtest.zte) - { - if (curtest.ztst > 1) g_nDepthUsed = 2; - if ((curtest.ztst == 2) ^(g_nDepthBias != 0)) - { - g_nDepthBias = (curtest.ztst == 2); - //SETRS(D3DRS_DEPTHBIAS, g_nDepthBias?FtoDW(0.0003f):FtoDW(0.000015f)); - } - - glDepthFunc(g_dwZCmp[curtest.ztst]); - } - - GL_ZTEST(curtest.zte); - - if (s_bWriteDepth) - { - if (!curvb.zbuf.zmsk) - curvb.pdepth->SetRenderTarget(1); - else - ResetRenderTarget(1); - } -} - -inline u32 AlphaSetupBlendTest(VB& curvb) -{ - if (curvb.curprim.abe) - SetAlphaVariables(curvb.alpha); - else - glDisable(GL_BLEND); - - u32 oldabe = curvb.curprim.abe; - - if (gs.pabe) - { - //ZZLog::Error_Log("PABE!"); - curvb.curprim.abe = 1; - glEnable(GL_BLEND); - } - - return oldabe; -} - -inline void AlphaRenderFBA(VB& curvb, FRAGMENTSHADER* pfragment, bool s_bDestAlphaTest, bool bCanRenderStencil) -{ - // needs to be before RenderAlphaTest - if ((gs.pabe) || (curvb.fba.fba && !ZZOglGet_fbmHighByte(curvb.frame.fbm)) || (s_bDestAlphaTest && bCanRenderStencil)) - { - RenderFBA(curvb, pfragment->sOneColor); - } - -} - -inline u32 AlphaRenderAlpha(VB& curvb, const pixTest curtest, FRAGMENTSHADER* pfragment, int exactcolor) -{ - SetShaderCaller("AlphaRenderAlpha"); - u32 dwUsingSpecialTesting = 0; - - if (curvb.curprim.abe) - { - if ((bNeedBlendFactorInAlpha || ((curtest.ate && curtest.atst > 1) && (curtest.aref > 0x80)))) - { - // need special stencil processing for the alpha - RenderAlphaTest(curvb, pfragment->sOneColor); - dwUsingSpecialTesting = 1; - } - - // harvest fishing - float4 v = vAlphaBlendColor; - - if (exactcolor) - { - v.y *= 255; - v.w *= 255; - } - - ZZshSetParameter4fv(pfragment->sOneColor, v, "g_fOneColor"); - } - else - { - // not using blending so set to defaults - float4 v = exactcolor ? float4(1, 510 * 255.0f / 256.0f, 0, 0) : float4(1, 2 * 255.0f / 256.0f, 0, 0); - ZZshSetParameter4fv(pfragment->sOneColor, v, "g_fOneColor"); - - } - - return dwUsingSpecialTesting; -} - -inline void AlphaRenderStencil(VB& curvb, bool s_bDestAlphaTest, bool bCanRenderStencil, u32 dwUsingSpecialTesting) -{ - if (s_bDestAlphaTest && bCanRenderStencil) - { - // if not 24bit and can write to high alpha bit - RenderStencil(curvb, dwUsingSpecialTesting); - } - else - { - s_stencilref = STENCIL_SPECIAL; - s_stencilmask = STENCIL_SPECIAL; - - // setup the stencil to only accept the test pixels - - if (dwUsingSpecialTesting) - { - glEnable(GL_STENCIL_TEST); - glStencilMask(STENCIL_PIXELWRITE); - GL_STENCILFUNC(GL_EQUAL, STENCIL_SPECIAL | STENCIL_PIXELWRITE, STENCIL_SPECIAL); - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - } - } - -#ifdef _DEBUG - if (bDestAlphaColor == 1) - { - ZZLog::Debug_Log("Dest alpha blending! Manipulate alpha here."); - } - -#endif - - if (bCanRenderStencil && gs.pabe) - { - // only render the pixels with alpha values >= 0x80 - GL_STENCILFUNC(GL_EQUAL, s_stencilref | STENCIL_FBA, s_stencilmask | STENCIL_FBA); - } - - GL_REPORT_ERRORD(); -} - -inline void AlphaTest(VB& curvb) -{ -// ZZLog::Debug_Log("%d %d %d %d %d", curvb.test.date, curvb.test.datm, gs.texa.aem, curvb.test.ate, curvb.test.atst ); - -// return; - // Zeydlitz changed this with a reason! It's an "Alpha more than 1 hack." - if (curvb.test.ate == 1 && curvb.test.atst == 1 && curvb.test.date == 1) - { - if (curvb.test.datm == 1) - { - glAlphaFunc(GL_GREATER, 1.0f); - } - else - { - glAlphaFunc(GL_LESS, 1.0f); - ZZLog::Debug_Log("%d %d %d", curvb.test.date, curvb.test.datm, gs.texa.aem); - } - } - - if (!curvb.test.ate || curvb.test.atst > 0) - { - Draw(curvb); - } - - GL_REPORT_ERRORD(); -} - -inline void AlphaPabe(VB& curvb, FRAGMENTSHADER* pfragment, int exactcolor) -{ - if (gs.pabe) - { - SetShaderCaller("AlphaPabe"); - // only render the pixels with alpha values < 0x80 - glDisable(GL_BLEND); - GL_STENCILFUNC_SET(); - - float4 v; - v.x = 1; - v.y = 2; - v.z = 0; - v.w = 0; - - if (exactcolor) v.y *= 255; - - ZZshSetParameter4fv(pfragment->sOneColor, v, "g_fOneColor"); - - Draw(curvb); - - // reset - if (!s_stencilmask) s_stencilfunc = GL_ALWAYS; - - GL_STENCILFUNC_SET(); - } - - GL_REPORT_ERRORD(); -} - -// Alpha Failure does not work properly on this cases. True means that no failure job should be done. -// First three cases are trivial manual. -inline bool AlphaFailureIgnore(const pixTest curtest) -{ - if ((!curtest.ate) || (curtest.atst == 1) || (curtest.afail == 0)) return true; - - if (conf.settings().no_alpha_fail && ((s_dwColorWrite < 8) || (s_dwColorWrite == 15 && curtest.atst == 5 && (curtest.aref == 64)))) - return true; - -// old and seemingly incorrect code. -// if ((s_dwColorWrite < 8 && s_dwColorWrite !=8) && curtest.afail == 1) -// return true; -// if ((s_dwColorWrite == 0xf) && curtest.atst == 5 && curtest.afail == 1 && !(conf.settings() & GAME_REGETHACK)) -// return true; - return false; -} - -// more work on alpha failure case -inline void AlphaFailureTestJob(VB& curvb, const pixTest curtest, FRAGMENTSHADER* pfragment, int exactcolor, bool bCanRenderStencil, int oldabe) -{ - // Note, case when ate == 1, atst == 0 and afail > 0 in documentation wrote as failure case. But it seems that - // either doc's are incorrect or this case has some issues. - if (AlphaFailureIgnore(curtest)) return; - -#ifdef NOALFAFAIL - ZZLog::Error_Log("Alpha job here %d %d %d %d %d %d", s_dwColorWrite, curtest.atst, curtest.afail, curtest.aref, gs.pabe, s_bWriteDepth); - -// return; -#endif - - SetShaderCaller("AlphaFailureTestJob"); - - // need to reverse the test and disable some targets - glAlphaFunc(g_dwReverseAlphaCmp[curtest.atst], AlphaReferedValue(curtest.aref)); - - if (curtest.afail & 1) // front buffer update only - { - if (curtest.afail == 3) glColorMask(1, 1, 1, 0);// disable alpha - - glDepthMask(0); - - if (s_bWriteDepth) ResetRenderTarget(1); - } - else - { - // zbuffer update only - glColorMask(0, 0, 0, 0); - } - - if (gs.pabe && bCanRenderStencil) - { - // only render the pixels with alpha values >= 0x80 - float4 v = vAlphaBlendColor; - - if (exactcolor) { v.y *= 255; v.w *= 255; } - - ZZshSetParameter4fv(pfragment->sOneColor, v, "g_fOneColor"); - - glEnable(GL_BLEND); - GL_STENCILFUNC(GL_EQUAL, s_stencilref | STENCIL_FBA, s_stencilmask | STENCIL_FBA); - } - - Draw(curvb); - - GL_REPORT_ERRORD(); - - if (gs.pabe) - { - // only render the pixels with alpha values < 0x80 - glDisable(GL_BLEND); - GL_STENCILFUNC_SET(); - - float4 v; - v.x = 1; - v.y = 2; - v.z = 0; - v.w = 0; - - if (exactcolor) v.y *= 255; - - ZZshSetParameter4fv(pfragment->sOneColor, v, "g_fOneColor"); - - Draw(curvb); - - // reset - if (oldabe) glEnable(GL_BLEND); - - if (!s_stencilmask) s_stencilfunc = GL_ALWAYS; - - GL_STENCILFUNC_SET(); - } - - // restore - if ((curtest.afail & 1) && !curvb.zbuf.zmsk) - { - glDepthMask(1); - - if (s_bWriteDepth) - { - assert(curvb.pdepth != NULL); - curvb.pdepth->SetRenderTarget(1); - } - } - - GL_COLORMASK(s_dwColorWrite); - - // not needed anymore since rest of ops concentrate on image processing - - GL_REPORT_ERRORD(); -} - -inline void AlphaSpecialTesting(VB& curvb, FRAGMENTSHADER* pfragment, u32 dwUsingSpecialTesting, int exactcolor) -{ - if (dwUsingSpecialTesting) - { - SetShaderCaller("AlphaSpecialTesting"); - - // render the real alpha - glDisable(GL_ALPHA_TEST); - glColorMask(0, 0, 0, 1); - - if (s_bWriteDepth) - { - ResetRenderTarget(1); - } - - glDepthMask(0); - - glStencilFunc(GL_EQUAL, STENCIL_SPECIAL | STENCIL_PIXELWRITE, STENCIL_SPECIAL | STENCIL_PIXELWRITE); - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); - - float4 v = float4(0, exactcolor ? 510.0f : 2.0f, 0, 0); - ZZshSetParameter4fv(pfragment->sOneColor, v, "g_fOneColor"); - Draw(curvb); - - // don't need to restore - } - - GL_REPORT_ERRORD(); -} - -inline void AlphaDestinationTest(VB& curvb, FRAGMENTSHADER* pfragment, bool s_bDestAlphaTest, bool bCanRenderStencil) -{ - if (s_bDestAlphaTest) - { - if ((s_dwColorWrite & COLORMASK_ALPHA)) - { - if (curvb.fba.fba) - ProcessFBA(curvb, pfragment->sOneColor); - else if (bCanRenderStencil) - // finally make sure all entries are 1 when the dest alpha >= 0x80 (if fba is 1, this is already the case) - ProcessStencil(curvb); - } - } - else if ((s_dwColorWrite & COLORMASK_ALPHA) && curvb.fba.fba) - ProcessFBA(curvb, pfragment->sOneColor); - - if (bDestAlphaColor == 1) - { - // need to reset the dest colors to their original counter parts - //WARN_LOG("Need to reset dest alpha color\n"); - } -} - -inline void AlphaSaveTarget(VB& curvb) -{ -#ifdef _DEBUG - return; // Do nothing - -//#ifdef _WIN32 -// CreateDirectory("frames", NULL); -//#else -// char* strdir=""; -// sprintf(strdir, "mkdir %s", "frames"); -// system(strdir); -//#endif -// char str[255]; - -// Needs a # after frame to work properly. -// sprintf(str, "frames/frame.tga"); - -// //glBindFramebufferEXT( GL_FRAMEBUFFER_EXT, 0 ); // switch to the backbuffer -// //glFlush(); -// //SaveTexture("tex.jpg", GL_TEXTURE_RECTANGLE_NV, curvb.prndr->ptex, RW(curvb.prndr->fbw), RH(curvb.prndr->fbh)); -// SaveRenderTarget(str, RW(curvb.prndr->fbw), RH(curvb.prndr->fbh), 0); -#endif -} - -inline void FlushUndoFiter(u32 dwFilterOpts) -{ - if (dwFilterOpts) - { - // undo filter changes (binding didn't change) - if (dwFilterOpts & 1) glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - if (dwFilterOpts & 2) glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, GL_LINEAR); - } -} - -// This is the most important function! It draws all collected info onscreen. -void Flush(int context) -{ - FUNCLOG - VB& curvb = vb[context]; - const pixTest curtest = curvb.test; - - if (FlushInitialTest(curvb, curtest, context)) return; - - VisualBufferMessage(context); - - GL_REPORT_ERRORD(); - - CRenderTarget* ptextarg = FlushGetTarget(curvb); - - SwitchWireframeOff(); - FlushDoContextJob(curvb, context); - - u32 dwUsingSpecialTesting = 0, dwFilterOpts = 0; - int exactcolor = FlushGetExactcolor(curtest); - - FRAGMENTSHADER* pfragment = FlushRendererStage(curvb, dwFilterOpts, ptextarg, exactcolor, context); - - bool bCanRenderStencil = AlphaCanRenderStencil(curvb); - - if (curtest.date || gs.pabe) SetDestAlphaTest(); - - AlphaSetStencil(s_bDestAlphaTest && bCanRenderStencil); - AlphaSetDepthTest(curvb, curtest, pfragment); // Error! - SetAlphaTest(curtest); - - u32 oldabe = AlphaSetupBlendTest(curvb); // Unavoidable - - // needs to be before RenderAlphaTest - AlphaRenderFBA(curvb, pfragment, s_bDestAlphaTest, bCanRenderStencil); - - dwUsingSpecialTesting = AlphaRenderAlpha(curvb, curtest, pfragment, exactcolor); // Unavoidable - AlphaRenderStencil(curvb, s_bDestAlphaTest, bCanRenderStencil, dwUsingSpecialTesting); - AlphaTest(curvb); // Unavoidable - AlphaPabe(curvb, pfragment, exactcolor); - AlphaFailureTestJob(curvb, curtest, pfragment, exactcolor, bCanRenderStencil, oldabe); - AlphaSpecialTesting(curvb, pfragment, dwUsingSpecialTesting, exactcolor); - AlphaDestinationTest(curvb, pfragment, s_bDestAlphaTest, bCanRenderStencil); - AlphaSaveTarget(curvb); - - GL_REPORT_ERRORD(); - - FlushUndoFiter(dwFilterOpts); - - ppf += curvb.nCount + 0x100000; - - curvb.nCount = 0; - curvb.curprim.abe = oldabe; - - SwitchWireframeOn(); - - GL_REPORT_ERRORD(); -} - -void FlushBoth() -{ - Flush(0); - Flush(1); -} - -inline void RenderFBA(const VB& curvb, ZZshParameter sOneColor) -{ - // add fba to all pixels - GL_STENCILFUNC(GL_ALWAYS, STENCIL_FBA, 0xff); - glStencilMask(STENCIL_CLEAR); - glStencilOp(GL_ZERO, GL_KEEP, GL_REPLACE); - - glDisable(GL_DEPTH_TEST); - glDepthMask(0); - glColorMask(0, 0, 0, 0); - - if (s_bWriteDepth) ResetRenderTarget(1); - - SetShaderCaller("RenderFBA"); - - glEnable(GL_ALPHA_TEST); - - glAlphaFunc(GL_GEQUAL, 1); - - float4 v(1,2,0,0); - - ZZshSetParameter4fv(sOneColor, v, "g_fOneColor"); - - Draw(curvb); - - SetAlphaTest(curvb.test); - - // reset (not necessary) - GL_COLORMASK(s_dwColorWrite); - - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - - if (!curvb.zbuf.zmsk) - { - glDepthMask(1); - - assert(curvb.pdepth != NULL); - - if (s_bWriteDepth) curvb.pdepth->SetRenderTarget(1); - } - - GL_ZTEST(curvb.test.zte); -} - -__forceinline void RenderAlphaTest(const VB& curvb, ZZshParameter sOneColor) -{ - if (!g_bUpdateStencil) return; - - if ((curvb.test.ate) && (curvb.test.afail == 1)) glDisable(GL_ALPHA_TEST); - - glDepthMask(0); - - glColorMask(0, 0, 0, 0); - - if (s_bWriteDepth) ResetRenderTarget(1); - - SetShaderCaller("RenderAlphaTest"); - - float4 v(1,2,0,0); - - ZZshSetParameter4fv(sOneColor, v, "g_fOneColor"); - - // or a 1 to the stencil buffer wherever alpha passes - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - - s_stencilfunc = GL_ALWAYS; - - glEnable(GL_STENCIL_TEST); - - if (!s_bDestAlphaTest) - { - // clear everything - s_stencilref = 0; - glStencilMask(STENCIL_CLEAR); - glDisable(GL_ALPHA_TEST); - GL_STENCILFUNC_SET(); - Draw(curvb); - - if (curvb.test.ate && curvb.test.afail != 1 && USEALPHATESTING) glEnable(GL_ALPHA_TEST); - } - - if (curvb.test.ate && curvb.test.atst > 1 && curvb.test.aref > 0x80) - { - v = float4(1,1,0,0); - ZZshSetParameter4fv(sOneColor, v, "g_fOneColor"); - glAlphaFunc(g_dwAlphaCmp[curvb.test.atst], AlphaReferedValue(curvb.test.aref)); - } - - s_stencilref = STENCIL_SPECIAL; - - glStencilMask(STENCIL_SPECIAL); - GL_STENCILFUNC_SET(); - glDisable(GL_DEPTH_TEST); - - Draw(curvb); - - if (curvb.test.zte) glEnable(GL_DEPTH_TEST); - - GL_ALPHATEST(0); - - GL_COLORMASK(s_dwColorWrite); - - if (!curvb.zbuf.zmsk) - { - glDepthMask(1); - - // set rt next level - - if (s_bWriteDepth) curvb.pdepth->SetRenderTarget(1); - } -} - -inline void RenderStencil(const VB& curvb, u32 dwUsingSpecialTesting) -{ - //NOTE: This stencil hack for dest alpha testing ONLY works when - // the geometry in one DrawPrimitive call does not overlap - - // mark the stencil buffer for the new data's bits (mark 4 if alpha is >= 0xff) - // mark 4 if a pixel was written (so that the stencil buf can be changed with new values) - glStencilMask(STENCIL_PIXELWRITE); - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - - s_stencilmask = (curvb.test.date ? STENCIL_ALPHABIT : 0) | (dwUsingSpecialTesting ? STENCIL_SPECIAL : 0); - s_stencilfunc = s_stencilmask ? GL_EQUAL : GL_ALWAYS; - - s_stencilref = curvb.test.date * curvb.test.datm | STENCIL_PIXELWRITE | (dwUsingSpecialTesting ? STENCIL_SPECIAL : 0); - GL_STENCILFUNC_SET(); -} - -inline void ProcessStencil(const VB& curvb) -{ - assert(!curvb.fba.fba); - - // set new alpha bit - glStencilMask(STENCIL_ALPHABIT); - GL_STENCILFUNC(GL_EQUAL, STENCIL_PIXELWRITE, STENCIL_PIXELWRITE | STENCIL_FBA); - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - - glDisable(GL_DEPTH_TEST); - glDepthMask(0); - glColorMask(0, 0, 0, 0); - - if (s_bWriteDepth) ResetRenderTarget(1); - - GL_ALPHATEST(0); - - SetShaderCaller("ProcessStencil"); - - ZZshSetPixelShader(ppsOne.prog); - Draw(curvb); - - // process when alpha >= 0xff - GL_STENCILFUNC(GL_EQUAL, STENCIL_PIXELWRITE | STENCIL_FBA | STENCIL_ALPHABIT, STENCIL_PIXELWRITE | STENCIL_FBA); - Draw(curvb); - - // clear STENCIL_PIXELWRITE bit - glStencilMask(STENCIL_CLEAR); - - GL_STENCILFUNC(GL_ALWAYS, 0, STENCIL_PIXELWRITE | STENCIL_FBA); - Draw(curvb); - - // restore state - GL_COLORMASK(s_dwColorWrite); - - if (curvb.test.ate && USEALPHATESTING) glEnable(GL_ALPHA_TEST); - - if (!curvb.zbuf.zmsk) - { - glDepthMask(1); - - if (s_bWriteDepth) - { - assert(curvb.pdepth != NULL); - curvb.pdepth->SetRenderTarget(1); - } - } - - GL_ZTEST(curvb.test.zte); - - glStencilOp(GL_KEEP, GL_KEEP, GL_KEEP); -} - -__forceinline void ProcessFBA(const VB& curvb, ZZshParameter sOneColor) -{ - if ((curvb.frame.fbm&0x80000000)) return; - - // add fba to all pixels that were written and alpha was less than 0xff - glStencilMask(STENCIL_ALPHABIT); - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - GL_STENCILFUNC(GL_EQUAL, STENCIL_FBA | STENCIL_PIXELWRITE | STENCIL_ALPHABIT, STENCIL_PIXELWRITE | STENCIL_FBA); - glDisable(GL_DEPTH_TEST); - - glDepthMask(0); - glColorMask(0, 0, 0, 1); - - if (s_bWriteDepth) ResetRenderTarget(1); - - SetShaderCaller("ProcessFBA"); - - // processes the pixels with ALPHA < 0x80*2 - glEnable(GL_ALPHA_TEST); - glAlphaFunc(GL_LEQUAL, 1); - - // add 1 to dest - GL_BLEND_ALPHA(GL_ONE, GL_ONE); - GL_BLENDEQ_ALPHA(GL_FUNC_ADD); - - float f = 1; - ZZshSetParameter4fv(sOneColor, &f, "g_fOneColor"); - ZZshSetPixelShader(ppsOne.prog); - Draw(curvb); - glDisable(GL_ALPHA_TEST); - - // reset bits - glStencilMask(STENCIL_CLEAR); - GL_STENCILFUNC(GL_GREATER, 0, STENCIL_PIXELWRITE | STENCIL_FBA); - glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO); - Draw(curvb); - - if (curvb.test.atst && USEALPHATESTING) - { - glEnable(GL_ALPHA_TEST); - glAlphaFunc(g_dwAlphaCmp[curvb.test.atst], AlphaReferedValue(curvb.test.aref)); - } - - // restore (SetAlphaVariables) - GL_BLEND_ALPHA(GL_ONE, GL_ZERO); - - if (vAlphaBlendColor.y < 0) GL_BLENDEQ_ALPHA(GL_FUNC_REVERSE_SUBTRACT); - - // reset (not necessary) - GL_COLORMASK(s_dwColorWrite); - - if (!curvb.zbuf.zmsk) - { - glDepthMask(1); - - if (s_bWriteDepth) curvb.pdepth->SetRenderTarget(1); - } - - GL_ZTEST(curvb.test.zte); -} - -void SetContextTarget(int context) -{ - FUNCLOG - VB& curvb = vb[context]; - GL_REPORT_ERRORD(); - - if (curvb.prndr == NULL) - curvb.prndr = s_RTs.GetTarg(curvb.frame, 0, get_maxheight(curvb.gsfb.fbp, curvb.gsfb.fbw, curvb.gsfb.psm)); - - // make sure targets are valid - if (curvb.pdepth == NULL) - { - frameInfo f; - f.fbp = curvb.zbuf.zbp; - f.fbw = curvb.frame.fbw; - f.fbh = curvb.prndr->fbh; - f.psm = curvb.zbuf.psm; - f.fbm = 0; - curvb.pdepth = (CDepthTarget*)s_DepthRTs.GetTarg(f, CRenderTargetMngr::TO_DepthBuffer | CRenderTargetMngr::TO_StrictHeight | - (curvb.zbuf.zmsk ? CRenderTargetMngr::TO_Virtual : 0), get_maxheight(curvb.zbuf.zbp, curvb.gsfb.fbw, 0)); - } - - assert(curvb.prndr != NULL && curvb.pdepth != NULL); - - if (curvb.pdepth->fbh != curvb.prndr->fbh) ZZLog::Debug_Log("(curvb.pdepth->fbh(0x%x) != curvb.prndr->fbh(0x%x))", curvb.pdepth->fbh, curvb.prndr->fbh); - //assert(curvb.pdepth->fbh == curvb.prndr->fbh); - - if (curvb.pdepth->status & CRenderTarget::TS_Virtual) - { - - if (!curvb.zbuf.zmsk) - { - CRenderTarget* ptemp = s_DepthRTs.Promote(curvb.pdepth->fbp | (curvb.pdepth->fbw << 16)); - assert(ptemp == curvb.pdepth); - } - else - { - curvb.pdepth->status &= ~CRenderTarget::TS_NeedUpdate; - } - } - - bool bSetTarg = 1; - - if (curvb.pdepth->status & CRenderTarget::TS_NeedUpdate) - { - assert(!(curvb.pdepth->status & CRenderTarget::TS_Virtual)); - - // don't update if virtual - curvb.pdepth->Update(context, curvb.prndr); - bSetTarg = 0; - } - - GL_REPORT_ERRORD(); - - if (curvb.prndr->status & CRenderTarget::TS_NeedUpdate) - { - /* if(bSetTarg) { - * ZZLog::Debug_Log( " Here "); - * if(s_bWriteDepth) { - * curvb.pdepth->SetRenderTarget(1); - * curvb.pdepth->SetDepthStencilSurface(); - * } - * else - * curvb.pdepth->SetDepthStencilSurface(); - * }*/ - curvb.prndr->Update(context, curvb.pdepth); - } - else - { - - //if( (vb[0].prndr != vb[1].prndr && vb[!context].bVarsSetTarg) || !vb[context].bVarsSetTarg ) - curvb.prndr->SetRenderTarget(0); - //if( bSetTarg && ((vb[0].pdepth != vb[1].pdepth && vb[!context].bVarsSetTarg) || !vb[context].bVarsSetTarg) ) - curvb.pdepth->SetDepthStencilSurface(); - - if (conf.mrtdepth && IsWriteDepth()) curvb.pdepth->SetRenderTarget(1); - if (s_ptexCurSet[0] == curvb.prndr->ptex) s_ptexCurSet[0] = 0; - if (s_ptexCurSet[1] == curvb.prndr->ptex) s_ptexCurSet[1] = 0; - - curvb.prndr->SetViewport(); - } - - curvb.prndr->SetTarget(curvb.frame.fbp, curvb.scissor, context); - - if ((curvb.zbuf.zbp - curvb.pdepth->fbp) != (curvb.frame.fbp - curvb.prndr->fbp) && curvb.test.zte) - ZZLog::Warn_Log("Frame and zbuf not aligned."); - - curvb.bVarsSetTarg = true; - - if (vb[!context].prndr != curvb.prndr) vb[!context].bVarsSetTarg = false; - -#ifdef _DEBUG - // These conditions happen often enough that we'll just warn about it rather then abort in Debug mode. - if (curvb.prndr->status & CRenderTarget::TS_NeedUpdate) - { - ZZLog::Debug_Log("In SetContextTarget, prndr is ending with TS_NeedUpdate set."); - } - - if (curvb.pdepth != NULL && (curvb.pdepth->status & CRenderTarget::TS_NeedUpdate)) - { - ZZLog::Debug_Log("In SetContextTarget, pdepth is ending with TS_NeedUpdate set."); - } -#endif - - GL_REPORT_ERRORD(); -} - - -void SetTexInt(int context, FRAGMENTSHADER* pfragment, int settexint) -{ - FUNCLOG - - if (settexint) - { - tex0Info& tex0 = vb[context].tex0; - - if (vb[context].bVarsTexSync) { - SetTexVariablesInt(context, GetTexFilter(vb[context].tex1), tex0, true, pfragment, s_bForceTexFlush); - } else { - SetTexVariablesInt(context, GetTexFilter(vb[context].tex1), tex0, false, pfragment, s_bForceTexFlush); - - INC_TEXVARS(); - } - vb[context].bVarsTexSync = true; - } - else - { - vb[context].bVarsTexSync = false; - } -} - -// clamp relies on texture width -void SetTexClamping(int context, FRAGMENTSHADER* pfragment) -{ - FUNCLOG - SetShaderCaller("SetTexClamping"); - clampInfo* pclamp = &vb[context].clamp; - float4 v, v2; - v.x = v.y = 0; - u32* ptex = vb[context].ptexClamp; - ptex[0] = ptex[1] = 0; - - float fw = vb[context].tex0.tw ; - float fh = vb[context].tex0.th ; - - switch (pclamp->wms) - { - case 0: - v2.x = -1e10; - v2.z = 1e10; - break; - - case 1: // pclamp - // suikoden5 movie text - v2.x = 0; - v2.z = 1 - 0.5f / fw; - break; - - case 2: // reg pclamp - v2.x = (pclamp->minu + 0.5f) / fw; - v2.z = (pclamp->maxu - 0.5f) / fw; - break; - - case 3: // region rep x - v.x = 0.9999f; - v.z = (float)fw; - v2.x = (float)GPU_TEXMASKWIDTH / fw; - v2.z = pclamp->maxu / fw; - int correctMinu = pclamp->minu & (~pclamp->maxu); // (A && B) || C == (A && (B && !C)) + C - - if (correctMinu != g_PrevBitwiseTexX) - { - g_PrevBitwiseTexX = correctMinu; - ptex[0] = s_BitwiseTextures.GetTex(correctMinu, 0); - } - - break; - } - - switch (pclamp->wmt) - { - - case 0: - v2.y = -1e10; - v2.w = 1e10; - break; - - case 1: // pclamp - // suikoden5 movie text - v2.y = 0; - v2.w = 1 - 0.5f / fh; - break; - - case 2: // reg pclamp - v2.y = (pclamp->minv + 0.5f) / fh; - v2.w = (pclamp->maxv - 0.5f) / fh; - break; - - case 3: // region rep y - v.y = 0.9999f; - v.w = (float)fh; - v2.y = (float)GPU_TEXMASKWIDTH / fh; - v2.w = pclamp->maxv / fh; - int correctMinv = pclamp->minv & (~pclamp->maxv); // (A && B) || C == (A && (B && !C)) + C - - if (correctMinv != g_PrevBitwiseTexY) - { - g_PrevBitwiseTexY = correctMinv; - ptex[1] = s_BitwiseTextures.GetTex(correctMinv, ptex[0]); - } - break; - } - - if (pfragment->fTexWrapMode != 0) - ZZshSetParameter4fv(pfragment->fTexWrapMode, v, "g_fTexWrapMode"); - - if (pfragment->fClampExts != 0) - ZZshSetParameter4fv(pfragment->fClampExts, v2, "g_fClampExts"); - - -} - -int CheckTexArray[4][2][2][2] = {{{{0, }}}}; -void SetTexVariables(int context, FRAGMENTSHADER* pfragment) -{ - FUNCLOG - - if (!vb[context].curprim.tme) return; - - assert(!vb[context].bNeedTexCheck); - - float4 v, v2; - - tex0Info& tex0 = vb[context].tex0; - - //float fw = (float)tex0.tw; - //float fh = (float)tex0.th; - - if (!vb[context].bTexConstsSync) - { - SetShaderCaller("SetTexVariables"); - - // alpha and texture highlighting - float4 valpha, valpha2 ; - - // if clut, use the frame format - int psm = PIXEL_STORAGE_FORMAT(tex0); - -// ZZLog::Error_Log( "A %d psm, is-clut %d. cpsm %d | %d %d", psm, PSMT_ISCLUT(psm), tex0.cpsm, tex0.tfx, tex0.tcc ); - - float4 vblack; - vblack.x = vblack.y = vblack.z = vblack.w = 10; - - /* tcc -- Tecture Color Component 0=RGB, 1=RGBA + use Alpha from TEXA reg when not in PSM - * tfx -- Texture Function (0=modulate, 1=decal, 2=hilight, 3=hilight2) - * - * valpha2 = 0 0 2 1 0 0 2 1 - * 1 0 0 0 1 1 0 0 - * 0 0 2 0 0 1 2 0 - * 0 0 2 0 0 1 2 0 - * - * 0 1,!nNeed 1, psm=2, 10 1, psm=1 - * valpha = 0 0 0 1 0 2 0 0 2ta0 2ta1-2ta0 0 0 2ta0 0 0 0 - * 0 0 0 1 0 1 0 0 ta0 ta1-ta0 0 0 ta0 0 0 0 - * 0 0 1 1 0 1 1 1 1 1 ta0 0 1 1 - * 0 0 1 1 0 1 1 0 1 0 ta0 0 1 0 - */ - - valpha2.x = (tex0.tfx == 1) ; - valpha2.y = (tex0.tcc == 1) && (tex0.tfx != 0) ; - valpha2.z = (tex0.tfx != 1) * 2 ; - valpha2.w = (tex0.tfx == 0) ; - - if (tex0.tcc == 0 || !PSMT_ALPHAEXP(psm)) - { - valpha.x = 0 ; - valpha.y = (!!tex0.tcc) * (1 + (tex0.tfx == 0)) ; - } - else - { - valpha.x = (gs.texa.fta[0]) * (1 + (tex0.tfx == 0)) ; - valpha.y = (gs.texa.fta[psm != PSMCT24] - gs.texa.fta[0]) * (1 + (tex0.tfx == 0)) ; - - } - - valpha.z = (tex0.tfx >= 3) ; - - valpha.w = (tex0.tcc == 0) || (tex0.tcc == 1 && tex0.tfx == 2) ; - - if (tex0.tcc && gs.texa.aem && psm == PSMCT24) - vblack.w = 0; - - /* - // Test, old code. - float4 valpha3, valpha4; - switch(tex0.tfx) { - case 0: - valpha3.z = 0; valpha3.w = 0; - valpha4.x = 0; valpha4.y = 0; - valpha4.z = 2; valpha4.w = 1; - - break; - case 1: - valpha3.z = 0; valpha3.w = 1; - valpha4.x = 1; valpha4.y = 0; - valpha4.z = 0; valpha4.w = 0; - - break; - case 2: - valpha3.z = 1; valpha3.w = 1.0f; - valpha4.x = 0; valpha4.y = tex0.tcc ? 1.0f : 0.0f; - valpha4.z = 2; valpha4.w = 0; - - break; - - case 3: - valpha3.z = 1; valpha3.w = tex0.tcc ? 0.0f : 1.0f; - valpha4.x = 0; valpha4.y = tex0.tcc ? 1.0f : 0.0f; - valpha4.z = 2; valpha4.w = 0; - - break; - } - if( tex0.tcc ) { - - if( tex0.tfx == 1 ) { - //mode.x = 10; - valpha3.z = 0; valpha3.w = 0; - valpha4.x = 1; valpha4.y = 1; - valpha4.z = 0; valpha4.w = 0; - } - - if( PSMT_ALPHAEXP(psm) ) { - - if( tex0.tfx == 0 ) { - // make sure alpha is mult by two when the output is Cv = Ct*Cf - valpha3.x = 2*gs.texa.fta[0]; - // if 24bit, always choose ta[0] - valpha3.y = 2*gs.texa.fta[psm != 1]; - valpha3.y -= valpha.x; - } - else { - valpha3.x = gs.texa.fta[0]; - // if 24bit, always choose ta[0] - valpha3.y = gs.texa.fta[psm != 1]; - valpha3.y -= valpha.x; - } - } - else { - if( tex0.tfx == 0 ) { - valpha3.x = 0; - valpha3.y = 2; - } - else { - valpha3.x = 0; - valpha3.y = 1; - } - } - } - else { - - // reset alpha to color - valpha3.x = valpha3.y = 0; - valpha3.w = 1; - } - - if ( equal_vectors(valpha, valpha3) && equal_vectors(valpha2, valpha4) ) { - if (CheckTexArray[tex0.tfx][tex0.tcc][psm!=1][PSMT_ALPHAEXP(psm)] == 0) { - ZZLog::Debug_Log ( "Good issue %d %d %d %d", tex0.tfx, tex0.tcc, psm, PSMT_ALPHAEXP(psm) ); - CheckTexArray[tex0.tfx][tex0.tcc][psm!=1][PSMT_ALPHAEXP(psm) ] = 1; - } - } - else if (CheckTexArray[tex0.tfx][tex0.tcc][psm!=1][PSMT_ALPHAEXP(psm)] == -1) { - ZZLog::Debug_Log ("Bad array, %d %d %d %d\n\tolf valpha %f, %f, %f, %f : valpha2 %f %f %f %f\n\tnew valpha %f, %f, %f, %f : valpha2 %f %f %f %f", - tex0.tfx, tex0.tcc, psm, PSMT_ALPHAEXP(psm), - valpha3.x, valpha3.y, valpha3.z, valpha3.w, valpha4.x, valpha4.y, valpha4.z, valpha4.w, - valpha.x, valpha.y, valpha.z, valpha.w, valpha2.x, valpha2.y, valpha2.z, valpha2.w); - CheckTexArray[tex0.tfx][tex0.tcc][psm!=1][PSMT_ALPHAEXP(psm)] = -1 ; - } - - // Test;*/ - - ZZshSetParameter4fv(pfragment->fTexAlpha, valpha, "g_fTexAlpha"); - ZZshSetParameter4fv(pfragment->fTexAlpha2, valpha2, "g_fTexAlpha2"); - - if (IsAlphaTestExpansion(tex0)) - ZZshSetParameter4fv(pfragment->fTestBlack, vblack, "g_fTestBlack"); - - SetTexClamping(context, pfragment); - - vb[context].bTexConstsSync = true; - } - - if (s_bTexFlush) - { - if (PSMT_ISCLUT(tex0.psm)) - texClutWrite(context); - else - s_bTexFlush = false; - } -} - -void SetTexVariablesInt(int context, int bilinear, const tex0Info& tex0, bool CheckVB, FRAGMENTSHADER* pfragment, int force) -{ - FUNCLOG - float4 v; - CMemoryTarget* pmemtarg = g_MemTargs.GetMemoryTarget(tex0, 1); - - assert( pmemtarg != NULL && pfragment != NULL && pmemtarg->ptex != NULL); - if (pmemtarg == NULL || pfragment == NULL || pmemtarg->ptex == NULL) - { - ZZLog::Error_Log("SetTexVariablesInt error."); - return; - } - - if (CheckVB && vb[context].pmemtarg == pmemtarg) return; - - SetShaderCaller("SetTexVariablesInt"); - - float fw = (float)tex0.tw; - float fh = (float)tex0.th; - - bool bUseBilinear = bilinear > 1 || (bilinear && conf.bilinear); - - if (bUseBilinear) - { - v.x = (float)fw; - v.y = (float)fh; - v.z = 1.0f / (float)fw; - v.w = 1.0f / (float)fh; - - if (pfragment->fRealTexDims) - ZZshSetParameter4fv(pfragment->fRealTexDims, v, "g_fRealTexDims"); - else - ZZshSetParameter4fv(cgGetNamedParameter(pfragment->prog,"g_fRealTexDims"),v, "g_fRealTexDims"); - } - - if (m_Blocks[tex0.psm].bpp == 0) - { - ZZLog::Error_Log("Undefined tex psm 0x%x!", tex0.psm); - return; - } - - const BLOCK& b = m_Blocks[tex0.psm]; - - float fbw = (float)tex0.tbw; - - float4 vTexDims; - - vTexDims.x = b.vTexDims.x * (fw); - vTexDims.y = b.vTexDims.y * (fh); - vTexDims.z = (float)BLOCK_TEXWIDTH * (0.002f / 64.0f + 0.01f / 128.0f); - vTexDims.w = (float)BLOCK_TEXHEIGHT * 0.1f / 512.0f; - - if (bUseBilinear) - { - vTexDims.x *= 1 / 128.0f; - vTexDims.y *= 1 / 512.0f; - vTexDims.z *= 1 / 128.0f; - vTexDims.w *= 1 / 512.0f; - } - - float g_fitexwidth = g_fiGPU_TEXWIDTH / (float)pmemtarg->widthmult; - - //float g_texwidth = GPU_TEXWIDTH*(float)pmemtarg->widthmult; - - float fpage = tex0.tbp0 * (64.0f * g_fitexwidth);// + 0.05f * g_fitexwidth; - float fpageint = floorf(fpage); - //int starttbp = (int)fpage; - - // 2048 is number of words to span one page - //float fblockstride = (2048.0f /(float)(g_texwidth*BLOCK_TEXWIDTH)) * b.vTexDims.x * fbw; - - float fblockstride = (2048.0f / (float)(GPU_TEXWIDTH * (float)pmemtarg->widthmult * BLOCK_TEXWIDTH)) * b.vTexDims.x * fbw; - - assert(fblockstride >= 1.0f); - - v.x = (float)(2048 * g_fitexwidth); - v.y = fblockstride; - v.z = g_fBlockMult / (float)pmemtarg->widthmult; - v.w = fpage - fpageint ; - - if (g_fBlockMult > 1) - { - // make sure to divide by mult (since the G16R16 texture loses info) - v.z *= b.bpp * (1 / 32.0f); - } - - ZZshSetParameter4fv(pfragment->fTexDims, vTexDims, "g_fTexDims"); - -// ZZshSetParameter4fv(pfragment->fTexBlock, b.vTexBlock, "g_fTexBlock"); // I change it, and it's working. Seems casting from float4 to float[4] is ok. - ZZshSetParameter4fv(pfragment->fTexBlock, &b.vTexBlock.x, "g_fTexBlock"); - ZZshSetParameter4fv(pfragment->fTexOffset, v, "g_fTexOffset"); - - // get hardware texture dims - //int texheight = pmemtarg->texH; - int texwidth = pmemtarg->texW; - - v.y = 1.0f; - v.x = (fpageint - (float)pmemtarg->realy / (float)pmemtarg->widthmult + 0.5f);//*v.y; - v.z = (float)texwidth; - - /* if( !(g_nPixelShaderVer & SHADER_ACCURATE) || bUseBilinear ) { - if (tex0.psm == PSMT4 ) - v.w = 0.0f; - else - v.w = 0.25f; - } - else - v.w = 0.5f;*/ - v.w = 0.5f; - - ZZshSetParameter4fv(pfragment->fPageOffset, v, "g_fPageOffset"); - - if (force) - s_ptexCurSet[context] = pmemtarg->ptex->tex; - else - s_ptexNextSet[context] = pmemtarg->ptex->tex; - - vb[context].pmemtarg = pmemtarg; - - vb[context].bVarsTexSync = false; -} - -#define SET_ALPHA_COLOR_FACTOR(sign) \ -{ \ - switch(a.c) \ - { \ - case 0: \ - vAlphaBlendColor.y = (sign) ? 2.0f*255.0f/256.0f : -2.0f*255.0f/256.0f; \ - s_srcalpha = GL_ONE; \ - s_alphaeq = (sign) ? GL_FUNC_ADD : GL_FUNC_REVERSE_SUBTRACT; \ - break; \ - \ - case 1: \ - /* if in 24 bit mode, dest alpha should be one */ \ - switch(PSMT_BITMODE(vb[icurctx].prndr->psm)) \ - { \ - case 0: \ - bDestAlphaColor = (a.d!=2)&&((a.a==a.d)||(a.b==a.d)); \ - break; \ - \ - case 1: \ - /* dest alpha should be one */ \ - bDestAlphaColor = 2; \ - break; \ - /* default: 16bit surface, so returned alpha is ok */ \ - } \ - break; \ - \ - case 2: \ - bNeedBlendFactorInAlpha = true; /* should disable alpha channel writing */ \ - vAlphaBlendColor.y = 0; \ - vAlphaBlendColor.w = (sign) ? (float)a.fix * (2.0f/255.0f) : (float)a.fix * (-2.0f/255.0f); \ - usec = 0; /* change so that alpha comes from source*/ \ - break; \ - } \ -} \ - -#if 0 -if( a.fix <= 0x80 ) { \ - dwTemp = (a.fix*2)>255?255:(a.fix*2); \ - dwTemp = dwTemp|(dwTemp<<8)|(dwTemp<<16)|0x80000000; \ - ZZLog::Debug_Log("bfactor: %8.8x", dwTemp); \ - glBlendColorEXT(dwTemp); \ - } \ - else { \ - -void ResetAlphaVariables() { - FUNCLOG -} -#endif - -inline void NeedFactor(int w) -{ - if (bDestAlphaColor == 2) - { - bNeedBlendFactorInAlpha = (w + 1) ? true : false; - vAlphaBlendColor.y = 0; - vAlphaBlendColor.w = (float)w; - } -} - -//static int CheckArray[48][2] = {{0,}}; - -void SetAlphaVariables(const alphaInfo& a) -{ - FUNCLOG - bool alphaenable = true; - - // TODO: negative color when not clamping turns to positive??? - g_vars._bAlphaState = 0; // set all to zero - bNeedBlendFactorInAlpha = false; - b2XAlphaTest = 1; - //u32 dwTemp = 0xffffffff; - bDestAlphaColor = 0; - - // default - s_srcalpha = GL_ONE; - s_dstalpha = GL_ZERO; - s_alphaeq = GL_FUNC_ADD; - s_rgbeq = 1; - -// s_alphaInfo = a; - vAlphaBlendColor = float4(1, 2 * 255.0f / 256.0f, 0, 0); - u32 usec = a.c; - - - /* - * Alpha table - * a + b + d - * S D - * 0 a -a 1 | 0 0 0 - * 1 0 0 0 | a -a 1 - * 2 0 0 0 | 0 0 0 - * - * d = 0 Cs - * a b 0 Cs 1 Cd 2 0 - * | | - * 0 000: a+-a+ 1 | 0+ 0+ 0 = 1 | 010: a+ 0+ 1 | 0+-a+ 0 = 1-(-a)(+)(-a) | 020: a+ 0+ 1 | 0+ 0+ 0 = 1-(-a) (+) 0 - * 1 100: 0+-a+ 1 | a+ 0+ 0 = 1-a (+) a | 110: 0+ 0+ 1 | a+-a+ 0 = 1 | 120: 0+ 0+ 1 | a+ 0+ 0 = 1 (+) a - * 2 200: 0+-a+ 1 | 0+ 0+ 0 = 1-a (+) 0 | 210: 0+ 0+ 1 | 0+-a+ 0 = 1 (-) a | 220: 0+ 0+ 1 | 0+ 0+ 0 = 1 - * - * d = 1 Cd - * 0 | 1 | 2 - * 0 001: a+-a+ 0 | 0+ 0+ 1 = 0 (+) 1 | 011: a+ 0+ 0 | 0+-a+ 1 = a (+) 1-a | 021: a+ 0+ 0 | 0+ 0+ 1 = a (+) 1 - * 1 101: 0+-a+ 0 | a+ 0+ 1 = (-a)(+) 1-(-a) | 111: 0+ 0+ 0 | a+-a+ 1 = 0 (+) 1 | 121: 0+ 0+ 0 | a+ 0+ 1 = 0 (+) 1-(-a) - * 2 201: 0+-a+ 0 | 0+ 0+ 1 = a (R-)1 | 211: 0+ 0+ 0 | 0+-a+ 1 = 0 (+) 1-a | 221: 0+ 0+ 0 | 0+ 0+ 1 = 0 (+) 1 - * - * d = 2 0 - * 0 | 1 | 2 - * 0 002: a+-a+ 0 | 0+ 0+ 0 = 0 | 012: a+ 0+ 0 | 0+-a+ 0 = a (-) a | 022: a+ 0+ 0 | 0+ 0+ 0 = a (+) 0 - * 1 102: 0+-a+ 0 | a+ 0+ 0 = a (R-) a | 112: 0+ 0+ 0 | a+-a+ 0 = 0 | 122: 0+ 0+ 0 | a+ 0+ 0 = 0 (+) a - * 2 202: 0+-a+ 0 | 0+ 0+ 0 = a (R-) 0 | 212: 0+ 0+ 0 | 0+-a+ 0 = 0 (-) a | 222: 0+ 0+ 0 | 0+ 0+ 0 = 0 - * - * Formulae is: (a-b) * (c /32) + d - * 0 1 2 - * a Cs Cd 0 - * b Cs Cd 0 - * c As Ad ALPHA.FIX - * d Cs Cd 0 - * - * We want to emulate Cs * F1(alpha) + Cd * F2(alpha) by OpenGl blending: (Cs * Ss (+,-,R-) Cd * Sd) - * SET_ALPHA_COLOR_FACTOR(sign) set Set A (as As>>7, Ad>>7 or FIX>>7) with sign. - * So we could use 1+a as one_minus_alpha and -a as alpha. - * - */ - int code = (a.a * 16) + (a.b * 4) + a.d ; - -#define one_minus_alpha (bDestAlphaColor == 2) ? GL_ONE_MINUS_SRC_ALPHA : blendinvalpha[usec] -#define alpha (bDestAlphaColor == 2) ? GL_SRC_ALPHA : blendalpha[usec] -#define one (bDestAlphaColor == 2) ? GL_ONE : blendalpha[usec] -#define zero (bDestAlphaColor == 2) ? GL_ZERO : blendinvalpha[usec] - - switch (code) - { - - case 0: // 000 // Cs -- nothing changed - case 20: // 110 = 16+4=20 // Cs - case 40: // 220 = 32+8=40 // Cs - { - alphaenable = false; - break; - } - - case 2: //002 // 0 -- should be zero - case 22: //112 // 0 - case 42: //222 = 32+8+2 =42 // 0 - { - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = GL_ZERO; - s_dstrgb = GL_ZERO; - break; - } - - case 1: //001 // Cd -- Should be destination alpha - case 21: //111, // Cd -- 0*Source + 1*Desrinarion - case 41: //221 = 32+8+1=41 // Cd -- - { - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = GL_ZERO; - s_dstrgb = GL_ONE; - break; - } - - case 4: // 010 // (Cs-Cd)*A+Cs = Cs * (A + 1) - Cd * A - { - bAlphaClamping = 3; - SET_ALPHA_COLOR_FACTOR(0); // a = -A - - s_rgbeq = GL_FUNC_ADD; // Cs*(1-a)+Cd*a - s_srcrgb = one_minus_alpha ; - s_dstrgb = alpha; - - NeedFactor(-1); - break; - } - - case 5: // 011 // (Cs-Cd)*A+Cs = Cs * A + Cd * (1-A) - { - bAlphaClamping = 3; // all testing - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = alpha; - s_dstrgb = one_minus_alpha; - - NeedFactor(1); - break; - } - - case 6: //012 // (Cs-Cd)*FIX - { - bAlphaClamping = 3; - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_SUBTRACT; - s_srcrgb = alpha; - s_dstrgb = alpha; - - break; - } - - case 8: //020 // Cs*A+Cs = Cs * (1+A) - { - bAlphaClamping = 2; // max testing - SET_ALPHA_COLOR_FACTOR(0); // Zeyflitz change this! a = -A - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = one_minus_alpha; // Cs*(1-a). - s_dstrgb = GL_ZERO; - -// NeedFactor(1); - break; - } - - case 9: //021 // Cs*A+Cd - { - bAlphaClamping = 2; // max testing - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = alpha; // ZZ change it to. - s_dstrgb = GL_ONE; - break; - } - - case 10: //022 // Cs*A - { - bAlphaClamping = 2; // max testing - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = alpha; - s_dstrgb = GL_ZERO; - break; - } - - case 16: //100 - { - bAlphaClamping = 3; - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = one_minus_alpha; - s_dstrgb = alpha; - - NeedFactor(1); - break; - } - - case 17: //101 - { - bAlphaClamping = 3; // all testing - SET_ALPHA_COLOR_FACTOR(0); - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = alpha; - s_dstrgb = one_minus_alpha; - - NeedFactor(-1); - break; - } - - case 18: //102 - { - bAlphaClamping = 3; - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_REVERSE_SUBTRACT; - s_srcrgb = alpha; - s_dstrgb = alpha; - - break; - } - - case 24: //120 = 16+8 - { - bAlphaClamping = 2; // max testing - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = GL_ONE; - s_dstrgb = alpha; - break; - } - - case 25: //121 // Cd*(1+A) - { - bAlphaClamping = 2; // max testing - SET_ALPHA_COLOR_FACTOR(0); - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = GL_ZERO; - s_dstrgb = one_minus_alpha; - -// NeedFactor(-1); - break; - } - - case 26: //122 - { - bAlphaClamping = 2; - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = GL_ZERO; - s_dstrgb = alpha; - break; - } - - case 32: // 200 = 32 - { - bAlphaClamping = 1; // min testing - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = one_minus_alpha; - s_dstrgb = GL_ZERO; - break; - } - - case 33: //201 // -Cs*A + Cd - { - bAlphaClamping = 1; // min testing - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_REVERSE_SUBTRACT; - s_srcrgb = alpha; - s_dstrgb = GL_ONE; - break; - } - - case 34: //202 - case 38: //212 - { - bAlphaClamping = 1; // min testing -- negative values - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = GL_ZERO; - s_dstrgb = GL_ZERO; - break; - } - - case 36: //210 - { - bAlphaClamping = 1; // min testing - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_SUBTRACT; - s_srcrgb = GL_ONE; - s_dstrgb = alpha; - break; - } - - case 37: //211 - { - bAlphaClamping = 1; // min testing - SET_ALPHA_COLOR_FACTOR(1); - - s_rgbeq = GL_FUNC_ADD; - s_srcrgb = GL_ZERO; - s_dstrgb = one_minus_alpha; - break; - } - - default: - { - ZZLog::Error_Log("Bad alpha code %d | %d %d %d", code, a.a, a.b, a.d); - } - } - - /* - int t_rgbeq = GL_FUNC_ADD; - int t_srcrgb = GL_ONE; - int t_dstrgb = GL_ZERO; - int tAlphaClamping = 0; - - if( a.a == a.b ) - { // just d remains - if( a.d == 0 ) {} - else - { - t_dstrgb = a.d == 1 ? GL_ONE : GL_ZERO; - t_srcrgb = GL_ZERO; - t_rgbeq = GL_FUNC_ADD; //a) (001) (111) (221) b) (002) (112) (222) - } - goto EndSetAlpha; - } - else if( a.d == 2 ) - { // zero - if( a.a == 2 ) - { - // zero all color - t_srcrgb = GL_ZERO; - t_dstrgb = GL_ZERO; - goto EndSetAlpha; // (202) (212) - } - else if( a.b == 2 ) - { - //b2XAlphaTest = 1; // a) (022) // b) (122) - SET_ALPHA_COLOR_FACTOR(1); - - if( bDestAlphaColor == 2 ) - { - t_rgbeq = GL_FUNC_ADD; - t_srcrgb = a.a == 0 ? GL_ONE : GL_ZERO; - t_dstrgb = a.a == 0 ? GL_ZERO : GL_ONE; - } - else - { - tAlphaClamping = 2; - t_rgbeq = GL_FUNC_ADD; - t_srcrgb = a.a == 0 ? blendalpha[usec] : GL_ZERO; - t_dstrgb = a.a == 0 ? GL_ZERO : blendalpha[usec]; - } - - goto EndSetAlpha; - } - - // nothing is zero, so must do some real blending //b2XAlphaTest = 1; //a) (012) //b) (102) - tAlphaClamping = 3; - - SET_ALPHA_COLOR_FACTOR(1); - - t_rgbeq = a.a == 0 ? GL_FUNC_SUBTRACT : GL_FUNC_REVERSE_SUBTRACT; - t_srcrgb = bDestAlphaColor == 2 ? GL_ONE : blendalpha[usec]; - t_dstrgb = bDestAlphaColor == 2 ? GL_ONE : blendalpha[usec]; - } - else if( a.a == 2 ) - { // zero - - //b2XAlphaTest = 1; - tAlphaClamping = 1; // min testing - - SET_ALPHA_COLOR_FACTOR(1); - - if( a.b == a.d ) - { - // can get away with 1-A - // a.a == a.d == 2!! (200) (211) - t_rgbeq = GL_FUNC_ADD; - t_srcrgb = (a.b == 0 && bDestAlphaColor != 2) ? blendinvalpha[usec] : GL_ZERO; - t_dstrgb = (a.b == 0 || bDestAlphaColor == 2) ? GL_ZERO : blendinvalpha[usec]; - } - else - { - // a) (201) b)(210) - t_rgbeq = a.b==0 ? GL_FUNC_REVERSE_SUBTRACT : GL_FUNC_SUBTRACT; - t_srcrgb = (a.b == 0 && bDestAlphaColor != 2) ? blendalpha[usec] : GL_ONE; - t_dstrgb = (a.b == 0 || bDestAlphaColor == 2 ) ? GL_ONE : blendalpha[usec]; - } - } - else if( a.b == 2 ) - { - tAlphaClamping = 2; // max testing - - SET_ALPHA_COLOR_FACTOR(a.a!=a.d); - - if( a.a == a.d ) - { - // can get away with 1+A, but need to set alpha to negative - // a)(020) - // b)(121) - t_rgbeq = GL_FUNC_ADD; - - if( bDestAlphaColor == 2 ) - { - t_srcrgb = (a.a == 0) ? GL_ONE_MINUS_SRC_ALPHA : GL_ZERO; - t_dstrgb = (a.a == 0) ? GL_ZERO : GL_ONE_MINUS_SRC_ALPHA; - } - else - { - t_srcrgb = a.a == 0 ? blendinvalpha[usec] : GL_ZERO; - t_dstrgb = a.a == 0 ? GL_ZERO : blendinvalpha[usec]; - } - } - else - { - //a)(021) //b)(120) //b2XAlphaTest = 1; - t_rgbeq = GL_FUNC_ADD; - t_srcrgb = (a.a == 0 && bDestAlphaColor != 2) ? blendalpha[usec] : GL_ONE; - t_dstrgb = (a.a == 0 || bDestAlphaColor == 2) ? GL_ONE : blendalpha[usec]; - } - } - else - { - // all 3 components are valid! - tAlphaClamping = 3; // all testing - SET_ALPHA_COLOR_FACTOR(a.a!=a.d); - - if( a.a == a.d ) - { - // can get away with 1+A, but need to set alpha to negative // a) 010, // b) 101 - t_rgbeq = GL_FUNC_ADD; - - if( bDestAlphaColor == 2 ) - { - // all ones - t_srcrgb = a.a == 0 ? GL_ONE_MINUS_SRC_ALPHA : GL_SRC_ALPHA; - t_dstrgb = a.a == 0 ? GL_SRC_ALPHA : GL_ONE_MINUS_SRC_ALPHA; - } - else - { - t_srcrgb = a.a == 0 ? blendinvalpha[usec] : blendalpha[usec]; - t_dstrgb = a.a == 0 ? blendalpha[usec] : blendinvalpha[usec]; - } - } - else - { - t_rgbeq = GL_FUNC_ADD; // a) 011 // b) 100 // - if( bDestAlphaColor == 2 ) - { - // all ones - t_srcrgb = a.a != 0 ? GL_ONE_MINUS_SRC_ALPHA : GL_SRC_ALPHA; - t_dstrgb = a.a != 0 ? GL_SRC_ALPHA : GL_ONE_MINUS_SRC_ALPHA; - } - else - { - //b2XAlphaTest = 1; - t_srcrgb = a.a != 0 ? blendinvalpha[usec] : blendalpha[usec]; - t_dstrgb = a.a != 0 ? blendalpha[usec] : blendinvalpha[usec]; - } - } - } - EndSetAlpha: - - - if ( alphaenable && (t_rgbeq != s_rgbeq || s_srcrgb != t_srcrgb || t_dstrgb != s_dstrgb || tAlphaClamping != bAlphaClamping)) { - if (CheckArray[code][(bDestAlphaColor==2)] != -1) { - ZZLog::Debug_Log( "A code %d, 0x%x, 0x%x, 0x%x, 0x%x %d", code, alpha, one_minus_alpha, one, zero, bDestAlphaColor ); - ZZLog::Debug_Log( " Difference %d %d %d %d | 0x%x 0x%x | 0x%x 0x%x | 0x%x 0x%x | %d %d", - code, a.a, a.b, a.d, - t_rgbeq, s_rgbeq, t_srcrgb, s_srcrgb, t_dstrgb, s_dstrgb, tAlphaClamping, bAlphaClamping); - CheckArray[code][(bDestAlphaColor==2)] = -1; - } - } - else - if (CheckArray[code][(bDestAlphaColor==2)] == 0){ - ZZLog::Debug_Log( "Add good code %d %d, psm %d destA %d", code, a.c, vb[icurctx].prndr->psm, bDestAlphaColor); - CheckArray[code][(bDestAlphaColor==2)] = 1; - }*/ - - - if (alphaenable) - { - zgsBlendFuncSeparateEXT(s_srcrgb, s_dstrgb, s_srcalpha, s_dstalpha); - zgsBlendEquationSeparateEXT(s_rgbeq, s_alphaeq); - glEnable(GL_BLEND); // always set - } - else - { - glDisable(GL_BLEND); - } - - INC_ALPHAVARS(); -} - -void SetWriteDepth() -{ - FUNCLOG - - if (conf.mrtdepth) - { - s_bWriteDepth = true; - s_nWriteDepthCount = 4; - } -} - -bool IsWriteDepth() -{ - FUNCLOG - return s_bWriteDepth; -} - -bool IsWriteDestAlphaTest() -{ - FUNCLOG - return s_bDestAlphaTest; -} - -void SetDestAlphaTest() -{ - FUNCLOG - s_bDestAlphaTest = true; - s_nWriteDestAlphaTest = 4; -} - -void SetTexFlush() -{ - FUNCLOG - s_bTexFlush = true; - -// if( PSMT_ISCLUT(vb[0].tex0.psm) ) -// texClutWrite(0); -// if( PSMT_ISCLUT(vb[1].tex0.psm) ) -// texClutWrite(1); - - if (!s_bForceTexFlush) - { - if (s_ptexCurSet[0] != s_ptexNextSet[0]) s_ptexCurSet[0] = s_ptexNextSet[0]; - if (s_ptexCurSet[1] != s_ptexNextSet[1]) s_ptexCurSet[1] = s_ptexNextSet[1]; - } -} - diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglFlushHack.cpp b/plugins/zzogl-pg-cg/opengl/ZZoglFlushHack.cpp deleted file mode 100644 index b1e311a5d7..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglFlushHack.cpp +++ /dev/null @@ -1,531 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2010 gregory.hainaut@gmail.com, zeydlitz@gmail.com - * Based on GSdx Copyright (C) 2007-2009 Gabest - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/* This file is a collection of hack for removing the blur effect on some games - * The blur renders very badly on high screen flat panel. - * - * To avoid severals combo-box, the hack detects the game based on crc - */ - -#include "ZZoglFlushHack.h" - -inline bool GABEST_HAS_SHARED_BITS (int fbp, int fpsm, int tbp, int tpsm) -{ - if ( !PSMT_HAS_SHARED_BITS (fpsm, tpsm) ) - return ((fbp ^ tbp) == 0); - else - return false; -} - - -// GSC_... function has been imported from GSdx -void GSC_Okami(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32) - skip = 1000; - } - else - { - if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03800 && fi.TPSM == PSMT4) - skip = 0; - } -} - -void GSC_MetalGearSolid3(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x02000 && fi.FPSM == PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01000) && fi.TPSM == PSMCT24) - skip = 1000; // 76, 79 - else if(fi.TME && fi.FBP == 0x02800 && fi.FPSM == PSMCT24 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01000) && fi.TPSM == PSMCT32) - skip = 1000; // 69 - } - else - { - if(!fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01000) && fi.FPSM == PSMCT32) - skip = 0; - } -} - -void GSC_DBZBT2(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && /*fi.FBP == 0x00000 && fi.FPSM == PSMCT16 &&*/ fi.TBP0 == 0x02000 && fi.TPSM == PSMT16Z) - skip = 27; - else if(!fi.TME && fi.FBP == 0x03000 && fi.FPSM == PSMCT16) - skip = 10; - } -} - -void GSC_DBZBT3(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x01c00 && fi.FPSM == PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00e00) && fi.TPSM == PSMT8H) - skip = 24; // blur - else if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00) && fi.FPSM == PSMCT32 && fi.TPSM == PSMT8H) - skip = 28; // outline - } -} - -void GSC_SFEX3(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x00500 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00f00 && fi.TPSM == PSMCT16) - skip = 2; // blur - } -} - -void GSC_Bully(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - // Test is useless ! - // if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01180) && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.FPSM == fi.TPSM) - // return; // allowed - if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && fi.FPSM == PSMCT16S && fi.TBP0 == 0x02300 && fi.TPSM == PSMT16SZ) - skip = 6; - } - else - { - if(!fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && fi.FPSM == PSMCT32) - skip = 0; - } -} - -void GSC_BullyCC(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - // Test is useless ! - // if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01180) && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01180) && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.FPSM == fi.TPSM) - // return; // allowed - - if(!fi.TME && fi.FBP == 0x02800 && fi.FPSM == PSMCT24) - skip = 9; - } -} - -void GSC_SoTC(const GSFrameInfo& fi, int& skip) -{ - // Not needed anymore? What did it fix anyway? (rama) - /*if(skip == 0) - { - if(fi.TME && fi.FBP == 0x02b80 && fi.FPSM == PSMCT24 && fi.TBP0 == 0x01e80 && fi.TPSM == PSMCT24) - skip = 9; - else if(fi.TME && fi.FBP == 0x01c00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03800 && fi.TPSM == PSMCT32) - skip = 8; - else if(fi.TME && fi.FBP == 0x01e80 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03880 && fi.TPSM == PSMCT32) - skip = 8; - }*/ -} - -void GSC_OnePieceGrandAdventure(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x02d00 && fi.FPSM == PSMCT16 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00e00 || fi.TBP0 == 0x00f00) && fi.TPSM == PSMCT16) - skip = 4; - } -} - -void GSC_OnePieceGrandBattle(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x02d00 && fi.FPSM == PSMCT16 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00f00) && fi.TPSM == PSMCT16) - skip = 4; - } -} - -void GSC_ICO(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x00800 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03d00 && fi.TPSM == PSMCT32) - skip = 3; - else if(fi.TME && fi.FBP == 0x00800 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x02800 && fi.TPSM == PSMT8H) - skip = 1; - } - else - { - if(fi.TME && fi.TBP0 == 0x00800 && fi.TPSM == PSMCT32) - skip = 0; - } -} - -void GSC_GT4(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && (fi.FBP == 0x03440 || fi.FBP >= 0x03e00) && fi.FPSM == PSMCT32 && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x01400) && fi.TPSM == PSMT8) - skip = 880; - else if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x01400) && fi.FPSM == PSMCT24 && fi.TBP0 >= 0x03420 && fi.TPSM == PSMT8) - { - // TODO: removes gfx from where it is not supposed to (garage) - // skip = 58; - } - } -} - -void GSC_WildArms4(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x03100 && fi.FPSM == PSMT32Z && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT32Z) - skip = 100; - } - else - { - if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x02a00 && fi.TPSM == PSMCT32) - skip = 1; - } -} - -void GSC_WildArms5(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x03100 && fi.FPSM == PSMT32Z && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT32Z) - skip = 100; - } - else - { - if(fi.TME && fi.FBP == 0x00e00 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x02a00 && fi.TPSM == PSMCT32) - skip = 1; - } -} - -void GSC_Manhunt2(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x03c20 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x01400 && fi.TPSM == PSMT8) - skip = 640; - } -} - -void GSC_CrashBandicootWoC(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - // Test is useless ! - // if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00a00) && (fi.TBP0 == 0x00000 || fi.TBP0 == 0x00a00) && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.FPSM == fi.TPSM) - // return false; // allowed - - if(fi.TME && fi.FBP == 0x02200 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01400 && fi.TPSM == PSMT24Z) - skip = 41; - } - else - { - if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00a00) && fi.FPSM == PSMCT32 && fi.TBP0 == 0x03c00 && fi.TPSM == PSMCT32) - skip = 0; - else if(!fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00a00)) - skip = 0; - } -} - -void GSC_ResidentEvil4(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x03100 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT24Z) - skip = 176; - } -} - -void GSC_Spartan(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x02000 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32) - skip = 107; - } -} - -void GSC_AceCombat4(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x02a00 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01600 && fi.TPSM == PSMT24Z) - skip = 71; // clouds (z, 16-bit) - else if(fi.TME && fi.FBP == 0x02900 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT24) - skip = 28; // blur - } -} - -void GSC_Drakengard2(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x026c0 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00a00 && fi.TPSM == PSMCT32) - skip = 64; - } -} - -void GSC_Tekken5(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x02ea0 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32) - skip = 95; - } -} - -void GSC_IkkiTousen(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x00a80 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01180 && fi.TPSM == PSMT24Z) - skip = 1000; // shadow (result is broken without depth copy, also includes 16 bit) - else if(fi.TME && fi.FBP == 0x00700 && fi.FPSM == PSMT24Z && fi.TBP0 == 0x01180 && fi.TPSM == PSMT24Z) - skip = 11; // blur - } - else if(skip > 7) - { - if(fi.TME && fi.FBP == 0x00700 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00700 && fi.TPSM == PSMCT16) - skip = 7; // the last steps of shadow drawing - } -} - -void GSC_GodOfWar(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x00000 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT16) - { - // skip = 30; //GSdx - skip = 4; // 23 or 4 need more testing - } - else if(fi.TME && fi.FBP == 0x00000 && fi.FPSM == PSMCT32 && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT32 && fi.FBMSK == 0xff000000) - skip = 1; // blur - else if(fi.FBP == 0x00000 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT8 - && ((fi.TZTST == 2 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 1 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 3 && fi.FBMSK == 0xFF000000))) - skip = 1; // wall of fog - } -} - -void GSC_GodOfWar2(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME) - { - if((fi.FBP == 0x00100 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00100 && fi.TPSM == PSMCT16) // ntsc - || (fi.FBP == 0x02100 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x02100 && fi.TPSM == PSMCT16)) // pal - skip = 29; // shadows - if(fi.FBP == 0x00100 && fi.FPSM == PSMCT32 && (fi.TBP0 & 0x03000) == 0x03000 - && (fi.TPSM == PSMT8 || fi.TPSM == PSMT4) - && ((fi.TZTST == 2 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 1 && fi.FBMSK == 0x00FFFFFF) || (fi.TZTST == 3 && fi.FBMSK == 0xFF000000))) - skip = 1; // wall of fog - } - } -} - -void GSC_GiTS(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x01400 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x02e40 && fi.TPSM == PSMCT16) - skip = 1315; - } -} - -void GSC_Onimusha3(const GSFrameInfo& fi, int& skip) -{ - if(fi.TME /*&& (fi.FBP == 0x00000 || fi.FBP == 0x00700)*/ && (fi.TBP0 == 0x01180 || fi.TBP0 == 0x00e00 || fi.TBP0 == 0x01000 || fi.TBP0 == 0x01200) && (fi.TPSM == PSMCT32 || fi.TPSM == PSMCT24)) - skip = 1; -} - -void GSC_TalesOfAbyss(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00) && fi.TBP0 == 0x01c00 && fi.TPSM == PSMT8) // copies the z buffer to the alpha channel of the fb - skip = 1000; - else if(fi.TME && (fi.FBP == 0x00000 || fi.FBP == 0x00e00) && (fi.TBP0 == 0x03560 || fi.TBP0 == 0x038e0) && fi.TPSM == PSMCT32) - skip = 1; - } - else - { - if(fi.TME && fi.TPSM != PSMT8) - skip = 0; - } -} - -void GSC_SonicUnleashed(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x02200 && fi.FPSM == PSMCT16S && fi.TBP0 == 0x00000 && fi.TPSM == PSMCT16) - skip = 1000; // shadow - } - else - { - if(fi.TME && fi.FBP == 0x00000 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x02200 && fi.TPSM == PSMCT16S) - skip = 2; - } -} - -void GSC_Genji(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == 0x01500 && fi.FPSM == PSMCT16 && fi.TBP0 == 0x00e00 && fi.TPSM == PSMT16Z) - skip = 6; // - } -} - -void GSC_StarOcean3(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH) - skip = 1000; // - } - else - { - if(!(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH)) - skip = 0; - } -} - -void GSC_ValkyrieProfile2(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH) - skip = 1000; // - } - else - { - if(!(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH)) - skip = 0; - } -} - -void GSC_RadiataStories(const GSFrameInfo& fi, int& skip) -{ - if(skip == 0) - { - if(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH) - skip = 1000; // Shadows - else if (fi.TME && fi.FBP == fi.TBP0 && (fi.TBP0 == 0x3700 || fi.TBP0 == 0x3400) && fi.TZTST == 1) - skip = 1; // Start manu issue; - } - else - { - if(!(fi.TME && fi.FBP == fi.TBP0 && fi.FPSM == PSMCT32 && fi.TPSM == PSMT4HH)) - skip = 0; - } -} - -bool GSC_HauntingGround(const GSFrameInfo& fi, int& skip) -{ - // Note GSdx seems to use invert somewhere FBMSK. So values were inverted - if(skip == 0) - { - if(fi.TME && fi.FPSM == fi.TPSM && fi.TPSM == PSMCT16S && fi.FBMSK == ~(0x03FFF)) - skip = 1; - else if(fi.TME && fi.FBP == 0x3000 && fi.TBP0 == 0x3380) - skip = 1; // bloom - else if(fi.TME && fi.FBP == fi.TBP0 && fi.TBP0 == 0x3000 && fi.FBMSK == ~(0xFFFFFF) && - GABEST_HAS_SHARED_BITS(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM)) - skip = 1; - } - - return true; -} - -// Record skipped frame to allow better analysis -// #define FRAME_RECORDING_ON 1 -#ifdef FRAME_RECORDING_ON -static const u32 MAX_FRAMES = 500; -static GSFrameInfo FrameAppear[MAX_FRAMES]; -static u32 Rec_Numbers = 0; - -void RecordNewFrames(VB& curvb, GSFrameInfo fi) { - if (Rec_Numbers >= MAX_FRAMES) - return; - - u32 i; - bool was_recorded = false; - for (i = 0; i < Rec_Numbers; i++ ) { - if (FrameAppear[i].FBP == fi.FBP && FrameAppear[i].FPSM == fi.FPSM - && FrameAppear[i].TBP0 == fi.TBP0 && FrameAppear[i].TPSM == fi.TPSM) { - was_recorded = true; - break; - } - } - if (!was_recorded) { - FrameAppear[Rec_Numbers] = fi; - Rec_Numbers++; - ZZLog::Print( "New frame %d, skip %d | fpb: %x fpsm: %d fpmsk: %x tme: %x tbp0: %x tpsm: %d tztst: %x | bits %d\n", \ - Rec_Numbers, g_SkipFlushFrame, fi.FBP, fi.FPSM, fi.FBMSK, fi.TME, fi.TBP0, fi.TPSM, fi.TZTST, GABEST_HAS_SHARED_BITS(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM) ); - - // Dump a nice picture of the frame - char filename[255]; - sprintf(filename, "SkipFlushFrame_%d__%d.tga", g_SkipFlushFrame, Rec_Numbers); - SaveRenderTarget(filename, curvb.prndr->fbw, curvb.prndr->fbh, 0); - } -} -#endif - -__forceinline bool IsBadFrame(VB& curvb) -{ - GSFrameInfo fi; - - // Keep GSdx naming convention to ease sharing code - fi.FBP = curvb.frame.fbp; - fi.FPSM = curvb.frame.psm; - fi.FBMSK = ~curvb.frame.fbm; - fi.TME = curvb.curprim.tme; - fi.TBP0 = curvb.tex0.tbp0; - fi.TPSM = curvb.tex0.psm; - fi.TZTST = curvb.test.ztst; - - if (GetSkipCount_Handler && conf.settings().automatic_skip_draw) - GetSkipCount_Handler(fi, g_SkipFlushFrame); - - if(g_SkipFlushFrame == 0 && (conf.SkipDraw > 0)) - { - if(fi.TME) - { - // depth textures (bully, mgs3s1 intro, Front Mission 5) - // Or General, often problematic post processing - if (PSMT_ISZTEX(fi.TPSM) || (GABEST_HAS_SHARED_BITS(fi.FBP, fi.FPSM, fi.TBP0, fi.TPSM))) - g_SkipFlushFrame = conf.SkipDraw; - } - } - - if(g_SkipFlushFrame > 0) - { -#ifdef FRAME_RECORDING_ON - RecordNewFrames(curvb, fi); -#endif - g_SkipFlushFrame--; - return true; - } - - return false; -} diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglFlushHack.h b/plugins/zzogl-pg-cg/opengl/ZZoglFlushHack.h deleted file mode 100644 index ef501296ce..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglFlushHack.h +++ /dev/null @@ -1,84 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2010 gregory.hainaut@gmail.com - * Based on GSdx Copyright (C) 2007-2009 Gabest - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/* This file is a collection of hack for removing the blur effect on some games - * The blur renders very badly on high screen flat panel. - * - * To avoid severals combo-box, the hack detects the game based on crc - */ - -#ifndef ZZOGL_FLUSH_HACK_H_INCLUDED -#define ZZOGL_FLUSH_HACK_H_INCLUDED - -#include "GS.h" -#include "targets.h" -#include "ZZoglVB.h" - -extern int g_SkipFlushFrame; - -struct GSFrameInfo -{ - u32 FBP; - u32 FPSM; - u32 FBMSK; - u32 TBP0; - u32 TPSM; - u32 TZTST; - bool TME; -}; - -typedef void (*GetSkipCount)(const GSFrameInfo& fi, int& skip); - -extern GetSkipCount GetSkipCount_Handler; - -void GSC_Okami(const GSFrameInfo& fi, int& skip); -void GSC_MetalGearSolid3(const GSFrameInfo& fi, int& skip); -void GSC_DBZBT2(const GSFrameInfo& fi, int& skip); -void GSC_DBZBT3(const GSFrameInfo& fi, int& skip); -void GSC_SFEX3(const GSFrameInfo& fi, int& skip); -void GSC_Bully(const GSFrameInfo& fi, int& skip); -void GSC_BullyCC(const GSFrameInfo& fi, int& skip); -void GSC_SoTC(const GSFrameInfo& fi, int& skip); -void GSC_OnePieceGrandAdventure(const GSFrameInfo& fi, int& skip); -void GSC_OnePieceGrandBattle(const GSFrameInfo& fi, int& skip); -void GSC_ICO(const GSFrameInfo& fi, int& skip); -void GSC_GT4(const GSFrameInfo& fi, int& skip); -void GSC_WildArms4(const GSFrameInfo& fi, int& skip); -void GSC_WildArms5(const GSFrameInfo& fi, int& skip); -void GSC_Manhunt2(const GSFrameInfo& fi, int& skip); -void GSC_CrashBandicootWoC(const GSFrameInfo& fi, int& skip); -void GSC_ResidentEvil4(const GSFrameInfo& fi, int& skip); -void GSC_Spartan(const GSFrameInfo& fi, int& skip); -void GSC_AceCombat4(const GSFrameInfo& fi, int& skip); -void GSC_Drakengard2(const GSFrameInfo& fi, int& skip); -void GSC_Tekken5(const GSFrameInfo& fi, int& skip); -void GSC_IkkiTousen(const GSFrameInfo& fi, int& skip); -void GSC_GodOfWar(const GSFrameInfo& fi, int& skip); -void GSC_GodOfWar2(const GSFrameInfo& fi, int& skip); -void GSC_GiTS(const GSFrameInfo& fi, int& skip); -void GSC_Onimusha3(const GSFrameInfo& fi, int& skip); -void GSC_TalesOfAbyss(const GSFrameInfo& fi, int& skip); -void GSC_SonicUnleashed(const GSFrameInfo& fi, int& skip); -void GSC_Genji(const GSFrameInfo& fi, int& skip); -void GSC_StarOcean3(const GSFrameInfo& fi, int& skip); -void GSC_ValkyrieProfile2(const GSFrameInfo& fi, int& skip); -void GSC_RadiataStories(const GSFrameInfo& fi, int& skip); - -extern bool IsBadFrame(VB& curvb); -#endif diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglMath.h b/plugins/zzogl-pg-cg/opengl/ZZoglMath.h deleted file mode 100644 index 2e31aebb90..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglMath.h +++ /dev/null @@ -1,511 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef ZZOGLMATH_H_INCLUDED -#define ZZOGLMATH_H_INCLUDED - -//Remind me to check and see if this is necessary, and what uses it. --arcum42 -#ifndef _WIN32 -#include -#endif - -#include -#include "Pcsx2Defs.h" - -//#define ZZ_MMATH - -#ifndef ZZ_MMATH - -template -class Vector4 -{ - public: - T x, y, z, w; - - Vector4(T x1 = 0, T y1 = 0, T z1 = 0, T w1 = 0) - { - x = x1; - y = y1; - z = z1; - w = w1; - } - - Vector4(Vector4 &f) - { - x = f.x; - y = f.y; - z = f.z; - w = f.w; - } - - Vector4(T* f) - { - x = f[0]; - y = f[1]; - z = f[2]; - w = f[3]; // For some reason, the old code set this to 0. - } - - T& operator[](int i) - { - switch(i) - { - case 0: return x; - case 1: return y; - case 2: return z; - case 3: return w; - default: assert(0); - } - } - - operator T*() - { - return (T*) this; - } - - operator const T*() const - { - return (const T*) this; - } - - Vector4& operator =(const Vector4& v) - { - x = v.x; - y = v.y; - z = v.z; - w = v.w; - return *this; - } - - bool operator ==(const Vector4& v) - { - return !!( x == v.x && - y == v.y && - z == v.z && - w == v.w ); - } - - Vector4 operator +(const Vector4& v) const - { - return Vector4(x + v.x, y + v.y, z + v.z, w + v.w); - } - - Vector4 operator -(const Vector4& v) const - { - return Vector4(x - v.x, y - v.y, z - v.z, w - v.w); - } - - Vector4 operator *(const Vector4& v) const - { - return Vector4(x * v.x, y * v.y, z * v.z, w * v.w); - } - - Vector4 operator /(const Vector4& v) const - { - return Vector4(x / v.x, y / v.y, z / v.z, w / v.w); - } - Vector4 operator +(T val) const - { - return Vector4(x + val, y + val, z + val, w + val); - } - - Vector4 operator -(T val) const - { - return Vector4(x - val, y - val, z - val, w - val); - } - - Vector4 operator *(T val) const - { - return Vector4(x * val, y * val, z * val, w * val); - } - - Vector4 operator /(T val) const - { - return Vector4(x / val, y / val, z / val, w / val); - } - - Vector4& operator +=(const Vector4& v) - { - *this = *this + v; - return *this; - } - - Vector4& operator -=(const Vector4& v) - { - *this = *this - v; - return *this; - } - - Vector4& operator *=(const Vector4& v) - { - *this = *this * v; - return *this; - } - - Vector4& operator /=(const Vector4& v) - { - *this = *this - v; - return *this; - } - - Vector4& operator +=(T val) - { - *this = *this + (T)val; - return *this; - } - - Vector4& operator -=(T val) - { - *this = *this - (T)val; - return *this; - } - - Vector4& operator *=(T val) - { - *this = *this * (T)val; - return *this; - } - - Vector4& operator /=(T val) - { - *this = *this / (T)val; - return *this; - } - - // Probably doesn't belong here, but I'll leave it in for the moment. - void SetColor(u32 color) - { - x = (color & 0xff) / 255.0f; - y = ((color >> 8) & 0xff) / 255.0f; - z = ((color >> 16) & 0xff) / 255.0f; - } - - bool equal_vectors(const Vector4& v) - { - if (abs(x - v.x) + abs(y - v.y) + abs(z - v.z) + abs(w - v.w) < 0.01) - return true; - else - return false; - } - -}; - -typedef Vector4 float4; - -#else - -// Reimplement, swiping a bunch of code from GSdx and adapting it. (specifically GSVector.h) -// This doesn't include more then half of the functions in there, as well as some of the structs... -#include - -#include "Pcsx2Types.h" - -class float4 -{ - public: - union - { - struct {float x, y, z, w;}; - struct {float r, g, b, a;}; - struct {float left, top, right, bottom;}; - float v[4]; - float f32[4]; - s8 _s8[16]; - s16 _s16[8]; - s32 _s32[4]; - s64 _s64[2]; - u8 _u8[16]; - u16 _u16[8]; - u32 _u32[4]; - u64 _u64[2]; - __m128 m; - }; - - float4() - { - m = _mm_setzero_ps(); - } - - float4(float x, float y, float z, float w = 0) - { - m = _mm_set_ps(w, z, y, x); - } - - float4(float4 &f) - { - m = f.m; - } - - float4(float x, float y) - { - m = _mm_unpacklo_ps(_mm_load_ss(&x), _mm_load_ss(&y)); - } - - float4(int x, int y) - { - m = _mm_cvtepi32_ps(_mm_unpacklo_epi32(_mm_cvtsi32_si128(x), _mm_cvtsi32_si128(y))); - } - - explicit float4(float f) - { - m = _mm_set1_ps(f); - } - - explicit float4(__m128 m) - { - this->m = m; - } - - float4(float* f) - { - x = f[0]; - y = f[1]; - z = f[2]; - w = f[3]; // For some reason, the old code set this to 0. - } - - float& operator[](int i) - { - switch(i) - { - case 0: return x; - case 1: return y; - case 2: return z; - case 3: return w; - default: assert(0); - } - } - - operator float*() - { - return (float*) this; - } - - operator const float*() const - { - return (const float*) this; - } - - void operator = (float f) - { - m = _mm_set1_ps(f); - } - - void operator = (__m128 m) - { - this->m = m; - } - - - void operator += (const float4& v) - { - m = _mm_add_ps(m, v.m); - } - - void operator -= (const float4& v) - { - m = _mm_sub_ps(m, v.m); - } - - void operator *= (const float4& v) - { - m = _mm_mul_ps(m, v.m); - } - - void operator /= (const float4& v) - { - m = _mm_div_ps(m, v.m); - } - - void operator += (float f) - { - *this += float4(f); - } - - void operator -= (float f) - { - *this -= float4(f); - } - - void operator *= (float f) - { - *this *= float4(f); - } - - void operator /= (float f) - { - *this /= float4(f); - } - - void operator &= (const float4& v) - { - m = _mm_and_ps(m, v.m); - } - - void operator |= (const float4& v) - { - m = _mm_or_ps(m, v.m); - } - - void operator ^= (const float4& v) - { - m = _mm_xor_ps(m, v.m); - } - - friend float4 operator + (const float4& v1, const float4& v2) - { - return float4(_mm_add_ps(v1.m, v2.m)); - } - - friend float4 operator - (const float4& v1, const float4& v2) - { - return float4(_mm_sub_ps(v1.m, v2.m)); - } - - friend float4 operator * (const float4& v1, const float4& v2) - { - return float4(_mm_mul_ps(v1.m, v2.m)); - } - - friend float4 operator / (const float4& v1, const float4& v2) - { - return float4(_mm_div_ps(v1.m, v2.m)); - } - - friend float4 operator + (const float4& v, float f) - { - return v + float4(f); - } - - friend float4 operator - (const float4& v, float f) - { - return v - float4(f); - } - - friend float4 operator * (const float4& v, float f) - { - return v * float4(f); - } - - friend float4 operator / (const float4& v, float f) - { - return v / float4(f); - } - - friend float4 operator & (const float4& v1, const float4& v2) - { - return float4(_mm_and_ps(v1.m, v2.m)); - } - - friend float4 operator | (const float4& v1, const float4& v2) - { - return float4(_mm_or_ps(v1.m, v2.m)); - } - - friend float4 operator ^ (const float4& v1, const float4& v2) - { - return float4(_mm_xor_ps(v1.m, v2.m)); - } - - friend float4 operator == (const float4& v1, const float4& v2) - { - return float4(_mm_cmpeq_ps(v1.m, v2.m)); - } - - friend float4 operator != (const float4& v1, const float4& v2) - { - return float4(_mm_cmpneq_ps(v1.m, v2.m)); - } - - friend float4 operator > (const float4& v1, const float4& v2) - { - return float4(_mm_cmpgt_ps(v1.m, v2.m)); - } - - friend float4 operator < (const float4& v1, const float4& v2) - { - return float4(_mm_cmplt_ps(v1.m, v2.m)); - } - - friend float4 operator >= (const float4& v1, const float4& v2) - { - return float4(_mm_cmpge_ps(v1.m, v2.m)); - } - - friend float4 operator <= (const float4& v1, const float4& v2) - { - return float4(_mm_cmple_ps(v1.m, v2.m)); - } - - bool equal_vectors(const float4& v) - { - if (abs(x - v.x) + abs(y - v.y) + abs(z - v.z) + abs(w - v.w) < 0.01) - return true; - else - return false; - } - - // This looked interesting, so I thought I'd include it... - - template float4 shuffle() const - { - return float4(_mm_shuffle_ps(m, m, _MM_SHUFFLE(i, i, i, i))); - } - - #define VECTOR4_SHUFFLE_4(xs, xn, ys, yn, zs, zn, ws, wn) \ - float4 xs##ys##zs##ws() const {return float4(_mm_shuffle_ps(m, m, _MM_SHUFFLE(wn, zn, yn, xn)));} \ - float4 xs##ys##zs##ws(const float4& v) const {return float4(_mm_shuffle_ps(m, v.m, _MM_SHUFFLE(wn, zn, yn, xn)));} \ - - #define VECTOR4_SHUFFLE_3(xs, xn, ys, yn, zs, zn) \ - VECTOR4_SHUFFLE_4(xs, xn, ys, yn, zs, zn, x, 0) \ - VECTOR4_SHUFFLE_4(xs, xn, ys, yn, zs, zn, y, 1) \ - VECTOR4_SHUFFLE_4(xs, xn, ys, yn, zs, zn, z, 2) \ - VECTOR4_SHUFFLE_4(xs, xn, ys, yn, zs, zn, w, 3) \ - - #define VECTOR4_SHUFFLE_2(xs, xn, ys, yn) \ - VECTOR4_SHUFFLE_3(xs, xn, ys, yn, x, 0) \ - VECTOR4_SHUFFLE_3(xs, xn, ys, yn, y, 1) \ - VECTOR4_SHUFFLE_3(xs, xn, ys, yn, z, 2) \ - VECTOR4_SHUFFLE_3(xs, xn, ys, yn, w, 3) \ - - #define VECTOR4_SHUFFLE_1(xs, xn) \ - float4 xs##4() const {return float4(_mm_shuffle_ps(m, m, _MM_SHUFFLE(xn, xn, xn, xn)));} \ - float4 xs##4(const float4& v) const {return float4(_mm_shuffle_ps(m, v.m, _MM_SHUFFLE(xn, xn, xn, xn)));} \ - VECTOR4_SHUFFLE_2(xs, xn, x, 0) \ - VECTOR4_SHUFFLE_2(xs, xn, y, 1) \ - VECTOR4_SHUFFLE_2(xs, xn, z, 2) \ - VECTOR4_SHUFFLE_2(xs, xn, w, 3) \ - - VECTOR4_SHUFFLE_1(x, 0) - VECTOR4_SHUFFLE_1(y, 1) - VECTOR4_SHUFFLE_1(z, 2) - VECTOR4_SHUFFLE_1(w, 3) - - // Probably doesn't belong here, but I'll leave it in for the moment. - void SetColor(u32 color) - { - x = (color & 0xff) / 255.0f; - y = ((color >> 8) & 0xff) / 255.0f; - z = ((color >> 16) & 0xff) / 255.0f; - } -}; - -#endif - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglSave.cpp b/plugins/zzogl-pg-cg/opengl/ZZoglSave.cpp deleted file mode 100644 index b0e2ebc002..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglSave.cpp +++ /dev/null @@ -1,175 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// Save and Load. - -//------------------ Includes - #include "Util.h" -#include "ZZoglVB.h" - -extern void ZZGSStateReset(); -//----------------------- Defines - -#define VBSAVELIMIT ((u32)((u8*)&vb[0].nNextFrameHeight-(u8*)&vb[0])) -#define ZEROGS_SAVEVER 0xaa000005 - -//------------------ Variables - -// Hack for save game compatible! -#ifdef _DEBUG -char *libraryNameX = "ZeroGS-Pg OpenGL (Debug) "; -#elif defined(ZEROGS_DEVBUILD) -char *libraryNameX = "ZeroGS-Pg OpenGL (Dev) "; -#else -char *libraryNameX = "ZeroGS Playground OpenGL "; -#endif - -//------------------ Code - -extern char *libraryName; -extern u32 s_uTex1Data[2][2], s_uClampData[2]; - -void SetFogColor(u32 fog); -void SetFogColor(GIFRegFOGCOL* fog); - -int ZZSave(s8* pbydata) -{ - if (pbydata == NULL) - return 40 + MEMORY_END + sizeof(gs) + 2*VBSAVELIMIT + 2*sizeof(frameInfo) + 4 + 256*4; - - s_RTs.ResolveAll(); - s_DepthRTs.ResolveAll(); - - strcpy((char*)pbydata, libraryNameX); - - *(u32*)(pbydata + 16) = ZEROGS_SAVEVER; - - pbydata += 32; - *(int*)pbydata = icurctx; - - pbydata += 4; - *(int*)pbydata = VBSAVELIMIT; - - pbydata += 4; - - memcpy(pbydata, g_pbyGSMemory, MEMORY_END); - pbydata += MEMORY_END; - - memcpy(pbydata, g_pbyGSClut, 256*4); - pbydata += 256 * 4; - - *(int*)pbydata = sizeof(gs); - pbydata += 4; - - memcpy(pbydata, &gs, sizeof(gs)); - pbydata += sizeof(gs); - - for (int i = 0; i < 2; ++i) - { - memcpy(pbydata, &vb[i], VBSAVELIMIT); - pbydata += VBSAVELIMIT; - } - - return 0; -} - -extern u32 s_uFramebuffer; -extern int g_nCurVBOIndex; - -bool ZZLoad(s8* pbydata) -{ - memset(s_uTex1Data, 0, sizeof(s_uTex1Data)); - memset(s_uClampData, 0, sizeof(s_uClampData)); - - g_nCurVBOIndex = 0; - - // first 32 bytes are the id - u32 savever = *(u32*)(pbydata + 16); - - if (strncmp((char*)pbydata, libraryNameX, 6) == 0 && (savever == ZEROGS_SAVEVER || savever == 0xaa000004)) - { - g_MemTargs.Destroy(); - - ZZGSStateReset(); - pbydata += 32; - - //int context = *(int*)pbydata; - pbydata += 4; - u32 savelimit = VBSAVELIMIT; - - savelimit = *(u32*)pbydata; - pbydata += 4; - - memcpy(g_pbyGSMemory, pbydata, MEMORY_END); - pbydata += MEMORY_END; - - memcpy(g_pbyGSClut, pbydata, 256*4); - pbydata += 256 * 4; - - memset(&gs, 0, sizeof(gs)); - - int savedgssize; - - if (savever == 0xaa000004) - { - savedgssize = 0x1d0; - } - else - { - savedgssize = *(int*)pbydata; - pbydata += 4; - } - - memcpy(&gs, pbydata, savedgssize); - - pbydata += savedgssize; - prim = &gs._prim[gs.prac]; - - vb[0].Destroy(); - memcpy(&vb[0], pbydata, min(savelimit, VBSAVELIMIT)); - pbydata += savelimit; - vb[0].pBufferData = NULL; - - vb[1].Destroy(); - memcpy(&vb[1], pbydata, min(savelimit, VBSAVELIMIT)); - pbydata += savelimit; - vb[1].pBufferData = NULL; - - for (int i = 0; i < 2; ++i) - { - vb[i].Init(VB_BUFFERSIZE); - vb[i].bNeedZCheck = vb[i].bNeedFrameCheck = 1; - - vb[i].bSyncVars = 0; - vb[i].bNeedTexCheck = 1; - memset(vb[i].uCurTex0Data, 0, sizeof(vb[i].uCurTex0Data)); - } - - icurctx = -1; - - glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, s_uFramebuffer); // switch to the backbuffer - SetFogColor(gs.fogcol); - - GL_REPORT_ERRORD(); - return true; - } - - return false; -} - diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglShaders.cpp b/plugins/zzogl-pg-cg/opengl/ZZoglShaders.cpp deleted file mode 100644 index b16f52ddcb..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglShaders.cpp +++ /dev/null @@ -1,890 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009 zeydlitz@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2006 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -//#ifdef NVIDIA_CG_API // This code is only for NVIDIA cg-toolkit API -// ZZogl Shader manipulation functions. - -//------------------- Includes -#include "Util.h" -#include "ZZoglShaders.h" -#include "zpipe.h" -#include -#include - -#ifdef _WIN32 -# include "Win32.h" -extern HINSTANCE hInst; -#endif - -// ----------------- Defines - -#define TEXWRAP_REPEAT 0 -#define TEXWRAP_CLAMP 1 -#define TEXWRAP_REGION_REPEAT 2 -#define TEXWRAP_REPEAT_CLAMP 3 - -#define SH_WRITEDEPTH 0x2000 // depth is written -#define SH_CONTEXT1 0x1000 // context1 is used -#define SH_REGULARVS 0x8000 -#define SH_TEXTUREVS 0x8001 -#define SH_REGULARFOGVS 0x8002 -#define SH_TEXTUREFOGVS 0x8003 -#define SH_REGULARPS 0x8004 -#define SH_REGULARFOGPS 0x8005 -#define SH_BITBLTVS 0x8006 -#define SH_BITBLTPS 0x8007 -#define SH_BITBLTDEPTHPS 0x8009 -#define SH_CRTCTARGPS 0x800a -#define SH_CRTCPS 0x800b -#define SH_CRTC24PS 0x800c -#define SH_ZEROPS 0x800e -#define SH_BASETEXTUREPS 0x800f -#define SH_BITBLTAAPS 0x8010 -#define SH_CRTCTARGINTERPS 0x8012 -#define SH_CRTCINTERPS 0x8013 -#define SH_CRTC24INTERPS 0x8014 -#define SH_BITBLTDEPTHMRTPS 0x8016 -#define SH_CONVERT16TO32PS 0x8020 -#define SH_CONVERT32TO16PS 0x8021 -#define SH_CRTC_NEARESTPS 0x8022 -#define SH_CRTCINTER_NEARESTPS 0x8023 - -//------------------ Constants - -// Used in a logarithmic Z-test, as (1-o(1))/log(MAX_U32). -const float g_filog32 = 0.999f / (32.0f * logf(2.0f)); - -#ifdef _DEBUG -const static char* g_pTexTypes[] = { "32", "tex32", "clut32", "tex32to16", "tex16to8h" }; -#endif -const char* g_pShaders[4] = { "full", "reduced", "accurate", "accurate-reduced" }; - -// ----------------- Global Variables - -ZZshContext g_cgcontext; -ZZshProfile cgvProf, cgfProf; -int g_nPixelShaderVer = 0; // default -u8* s_lpShaderResources = NULL; -ZZshProgram pvs[16] = {NULL}; -ZZshProgram g_vsprog = 0, g_psprog = 0; // 2 -- ZZ -ZZshParameter g_vparamPosXY[2] = {0}, g_fparamFogColor = 0; - -#ifdef DEVBUILD -char* EFFECT_NAME; // All this variables used for testing and set manually -char* EFFECT_DIR; -#endif - -bool g_bCRTCBilinear = true; - -float4 g_vdepth, vlogz; -FRAGMENTSHADER ppsBitBlt[2], ppsBitBltDepth, ppsOne; -FRAGMENTSHADER ppsBaseTexture, ppsConvert16to32, ppsConvert32to16; -FRAGMENTSHADER ppsRegular[4], ppsTexture[NUM_SHADERS]; -FRAGMENTSHADER ppsCRTC[2], ppsCRTC24[2], ppsCRTCTarg[2]; -VERTEXSHADER pvsBitBlt; - -extern u32 ptexBlocks; // holds information on block tiling. It's texture number in OpenGL -- if 0 than such texture -extern u32 ptexConv16to32; // does not exists. This textures should be created on start and released on finish. -extern u32 ptexBilinearBlocks; -extern u32 ptexConv32to16; - -inline bool LoadEffects(); -extern bool s_bWriteDepth; - -struct SHADERHEADER -{ - unsigned int index, offset, size; // if highest bit of index is set, pixel shader -}; -map mapShaderResources; - -// Debug variable, store name of the function that call the shader. -const char* ShaderCallerName = ""; -const char* ShaderHandleName = ""; - -//------------------ Code - -inline int GET_SHADER_INDEX(int type, int texfilter, int texwrap, int fog, int writedepth, int testaem, int exactcolor, int context, int ps) { - return type + texfilter*NUM_TYPES + NUM_FILTERS*NUM_TYPES*texwrap + NUM_TEXWRAPS*NUM_FILTERS*NUM_TYPES*(fog+2*writedepth+4*testaem+8*exactcolor+16*context+32*ps) ; -} - -bool ZZshCheckProfilesSupport() { - // load the effect, find the best profiles (if any) - if (cgGLIsProfileSupported(CG_PROFILE_ARBVP1) != CG_TRUE) { - ZZLog::Error_Log("arbvp1 not supported."); - return false; - } - if (cgGLIsProfileSupported(CG_PROFILE_ARBFP1) != CG_TRUE) { - ZZLog::Error_Log("arbfp1 not supported."); - return false; - } - return true; -} - -// Error handler. Setup in ZZogl_Create once. -void HandleCgError(ZZshContext ctx, ZZshError err, void* appdata) -{ - ZZLog::Error_Log("%s->%s: %s\n", ShaderCallerName, ShaderHandleName, cgGetErrorString(err)); - const char* listing = cgGetLastListing(g_cgcontext); - if (listing != NULL) - ZZLog::Debug_Log(" last listing: %s\n", listing); -} - -bool ZZshStartUsingShaders() { - cgSetErrorHandler(HandleCgError, NULL); - g_cgcontext = cgCreateContext(); - - cgvProf = CG_PROFILE_ARBVP1; - cgfProf = CG_PROFILE_ARBFP1; - cgGLEnableProfile(cgvProf); - cgGLEnableProfile(cgfProf); - cgGLSetOptimalOptions(cgvProf); - cgGLSetOptimalOptions(cgfProf); - - cgGLSetManageTextureParameters(g_cgcontext, CG_FALSE); - //cgSetAutoCompile(g_cgcontext, CG_COMPILE_IMMEDIATE); - - g_fparamFogColor = cgCreateParameter(g_cgcontext, CG_FLOAT4); - g_vparamPosXY[0] = cgCreateParameter(g_cgcontext, CG_FLOAT4); - g_vparamPosXY[1] = cgCreateParameter(g_cgcontext, CG_FLOAT4); - - - ZZLog::GS_Log("Creating effects."); - B_G(LoadEffects(), return false); - - // create a sample shader - clampInfo temp; - memset(&temp, 0, sizeof(temp)); - temp.wms = 3; temp.wmt = 3; - - g_nPixelShaderVer = 0;//SHADER_ACCURATE; - // test - bool bFailed; - FRAGMENTSHADER* pfrag = ZZshLoadShadeEffect(0, 1, 1, 1, 1, temp, 0, &bFailed); - if( bFailed || pfrag == NULL ) { - g_nPixelShaderVer = SHADER_ACCURATE|SHADER_REDUCED; - - pfrag = ZZshLoadShadeEffect(0, 0, 1, 1, 0, temp, 0, &bFailed); - if( pfrag != NULL ) - cgGLLoadProgram(pfrag->prog); - if( bFailed || pfrag == NULL || cgGetError() != CG_NO_ERROR ) { - g_nPixelShaderVer = SHADER_REDUCED; - ZZLog::Error_Log("Basic shader test failed."); - } - } - - if (g_nPixelShaderVer & SHADER_REDUCED) - conf.bilinear = 0; - - ZZLog::GS_Log("Creating extra effects."); - B_G(ZZshLoadExtraEffects(), return false); - - ZZLog::GS_Log("using %s shaders\n", g_pShaders[g_nPixelShaderVer]); - return true; -} - -// open shader file according to build target -bool ZZshCreateOpenShadersFile() { -#ifndef DEVBUILD -# ifdef _WIN32 - HRSRC hShaderSrc = FindResource(hInst, MAKEINTRESOURCE(IDR_SHADERS), RT_RCDATA); - assert( hShaderSrc != NULL ); - HGLOBAL hShaderGlob = LoadResource(hInst, hShaderSrc); - assert( hShaderGlob != NULL ); - s_lpShaderResources = (u8*)LockResource(hShaderGlob); -# else // not _WIN32 - FILE* fres = fopen("ps2hw.dat", "rb"); - if( fres == NULL ) { - fres = fopen("plugins/ps2hw.dat", "rb"); - if( fres == NULL ) { - ZZLog::Error_Log("Cannot find ps2hw.dat in working directory. Exiting."); - return false; - } - } - fseek(fres, 0, SEEK_END); - size_t s = ftell(fres); - s_lpShaderResources = new u8[s+1]; - fseek(fres, 0, SEEK_SET); - fread(s_lpShaderResources, s, 1, fres); - s_lpShaderResources[s] = 0; - fclose(fres); -# endif // _WIN32 -#else // NOT RELEASE_TO_PUBLIC -# ifndef _WIN32 // NOT WINDOWS - // test if ps2hw.fx exists - char tempstr[255]; - char curwd[255]; - getcwd(curwd, ArraySize(curwd)); - - strcpy(tempstr, "/plugins/"); - sprintf(EFFECT_NAME, "%sps2hw.fx", tempstr); - FILE* f = fopen(EFFECT_NAME, "r"); - if( f == NULL ) { - - strcpy(tempstr, "../../plugins/zzogl-pg/opengl/"); - sprintf(EFFECT_NAME, "%sps2hw.fx", tempstr); - f = fopen(EFFECT_NAME, "r"); - - if( f == NULL ) { - ZZLog::Error_Log("Failed to find %s, try compiling a non-devbuild\n", EFFECT_NAME); - return false; - } - } - fclose(f); - - sprintf(EFFECT_DIR, "%s/%s", curwd, tempstr); - sprintf(EFFECT_NAME, "%sps2hw.fx", EFFECT_DIR); - #endif -#endif // RELEASE_TO_PUBLIC - return true; -} - -// Disable CG -void ZZshGLDisableProfile() { - cgGLDisableProfile(cgvProf); - cgGLDisableProfile(cgfProf); -} -//Enable CG -void ZZshGLEnableProfile() { - cgGLEnableProfile(cgvProf); - cgGLEnableProfile(cgfProf); -} - -// This is helper of cgGLSetParameter4fv, made for debug purpose. -// Name could be any string. We must use it on compilation time, because erroneus handler does not -// return name -void ZZshSetParameter4fv(ZZshParameter param, const float* v, const char* name) { - ShaderHandleName = name; - cgGLSetParameter4fv(param, v); -} - -void ZZshSetParameter4fv(ZZshProgram prog, ZZshParameter param, const float* v, const char* name) { - ShaderHandleName = name; - cgGLSetParameter4fv(param, v); -} - -// The same stuff, but also with retry of param, name should be USED name of param for prog. -void ZZshSetParameter4fvWithRetry(ZZshParameter* param, ZZshProgram prog, const float* v, const char* name) { - if (param != NULL) - ZZshSetParameter4fv(prog, param[0], v, name); - else - ZZshSetParameter4fv(prog, cgGetNamedParameter(prog, name), v, name); -} - -void ZZshGLSetTextureParameter(ZZshParameter param, GLuint texobj, const char* name) { - ShaderHandleName = name; - cgGLSetTextureParameter(param, texobj); - cgGLEnableTextureParameter(param); -} - -// The same function for texture, also to cgGLEnable -void ZZshGLSetTextureParameter(ZZshProgram prog, ZZshParameter param, GLuint texobj, const char* name) { - ShaderHandleName = name; - cgGLSetTextureParameter(param, texobj); - cgGLEnableTextureParameter(param); -} - -// Used sometimes for color 1. -void ZZshDefaultOneColor( FRAGMENTSHADER ptr ) { - ShaderHandleName = "Set Default One color"; - float4 v = float4 ( 1, 1, 1, 1 ); - ZZshSetParameter4fv( ptr.prog, ptr.sOneColor, v, "DefaultOne"); -} - -#define SET_UNIFORMPARAM(var, name) { \ - p = cgGetNamedParameter(pf->prog, name); \ - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) \ - pf->var = p; \ -} \ - -void ZZshSetVertexShader(ZZshProgram prog) { - if ((prog) != g_vsprog) { - cgGLBindProgram(prog); - g_vsprog = prog; - } -} - -void ZZshSetPixelShader(ZZshProgram prog) { - if ((prog) != g_psprog) { - cgGLBindProgram(prog); - g_psprog = prog; - } -} - -void SetupFragmentProgramParameters(FRAGMENTSHADER* pf, int context, int type) -{ - // uniform parameters - ZZshParameter p; - - p = cgGetNamedParameter(pf->prog, "g_fFogColor"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - cgConnectParameter(g_fparamFogColor, p); - } - - SET_UNIFORMPARAM(sOneColor, "g_fOneColor"); - SET_UNIFORMPARAM(sBitBltZ, "g_fBitBltZ"); - SET_UNIFORMPARAM(sInvTexDims, "g_fInvTexDims"); - SET_UNIFORMPARAM(fTexAlpha2, "fTexAlpha2"); - SET_UNIFORMPARAM(fTexOffset, "g_fTexOffset"); - SET_UNIFORMPARAM(fTexDims, "g_fTexDims"); - SET_UNIFORMPARAM(fTexBlock, "g_fTexBlock"); - SET_UNIFORMPARAM(fClampExts, "g_fClampExts"); - SET_UNIFORMPARAM(fTexWrapMode, "TexWrapMode"); - SET_UNIFORMPARAM(fRealTexDims, "g_fRealTexDims"); - SET_UNIFORMPARAM(fTestBlack, "g_fTestBlack"); - SET_UNIFORMPARAM(fPageOffset, "g_fPageOffset"); - SET_UNIFORMPARAM(fTexAlpha, "fTexAlpha"); - - // textures - p = cgGetNamedParameter(pf->prog, "g_sBlocks"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - cgGLSetTextureParameter(p, ptexBlocks); - cgGLEnableTextureParameter(p); - } - - // cg parameter usage is wrong, so do it manually - if( type == 3 ) { - p = cgGetNamedParameter(pf->prog, "g_sConv16to32"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - cgGLSetTextureParameter(p, ptexConv16to32); - cgGLEnableTextureParameter(p); - } - } - else if( type == 4 ) { - p = cgGetNamedParameter(pf->prog, "g_sConv32to16"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - cgGLSetTextureParameter(p, ptexConv32to16); - cgGLEnableTextureParameter(p); - } - } - else { - p = cgGetNamedParameter(pf->prog, "g_sBilinearBlocks"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - cgGLSetTextureParameter(p, ptexBilinearBlocks); - cgGLEnableTextureParameter(p); - } - } - - p = cgGetNamedParameter(pf->prog, "g_sMemory"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - //cgGLEnableTextureParameter(p); - pf->sMemory = p; - } - p = cgGetNamedParameter(pf->prog, "g_sSrcFinal"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - //cgGLEnableTextureParameter(p); - pf->sFinal = p; - } - p = cgGetNamedParameter(pf->prog, "g_sBitwiseANDX"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - //cgGLEnableTextureParameter(p); - pf->sBitwiseANDX = p; - } - p = cgGetNamedParameter(pf->prog, "g_sBitwiseANDY"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - //cgGLEnableTextureParameter(p); - pf->sBitwiseANDY = p; - } - p = cgGetNamedParameter(pf->prog, "g_sCLUT"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - //cgGLEnableTextureParameter(p); - pf->sCLUT = p; - } - p = cgGetNamedParameter(pf->prog, "g_sInterlace"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - //cgGLEnableTextureParameter(p); - pf->sInterlace = p; - } - - // set global shader constants - p = cgGetNamedParameter(pf->prog, "g_fExactColor"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) { - cgGLSetParameter4fv(p, float4(0.5f, (conf.settings().exact_color)?0.9f/256.0f:0.5f/256.0f, 0,1/255.0f)); - } - - p = cgGetNamedParameter(pf->prog, "g_fBilinear"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) - cgGLSetParameter4fv(p, float4(-0.2f, -0.65f, 0.9f, 1.0f / 32767.0f )); - - p = cgGetNamedParameter(pf->prog, "g_fZBias"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) - cgGLSetParameter4fv(p, float4(1.0f/256.0f, 1.0004f, 1, 0.5f)); - - p = cgGetNamedParameter(pf->prog, "g_fc0"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) - cgGLSetParameter4fv(p, float4(0,1, 0.001f, 0.5f)); - - p = cgGetNamedParameter(pf->prog, "g_fMult"); - if( p != NULL && cgIsParameterUsed(p, pf->prog) == CG_TRUE ) - cgGLSetParameter4fv(p, float4(1/1024.0f, 0.2f/1024.0f, 1/128.0f, 1/512.0f)); -} - -void SetupVertexProgramParameters(ZZshProgram prog, int context) -{ - ZZshParameter p; - - p = cgGetNamedParameter(prog, "g_fPosXY"); - if( p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE ) - cgConnectParameter(g_vparamPosXY[context], p); - - // Set Z-test, log or no log; - if (conf.settings().no_logz) { - g_vdepth = float4( 255.0 /256.0f, 255.0/65536.0f, 255.0f/(65535.0f*256.0f), 1.0f/(65536.0f*65536.0f)); - vlogz = float4( 1.0f, 0.0f, 0.0f, 0.0f); - } - else { - g_vdepth = float4( 256.0f*65536.0f, 65536.0f, 256.0f, 65536.0f*65536.0f); - vlogz = float4( 0.0f, 1.0f, 0.0f, 0.0f); - } - - p = cgGetNamedParameter(prog, "g_fZ"); - if( p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE ) { - cgGLSetParameter4fv(p, g_vdepth); - - p = cgGetNamedParameter(prog, "g_fZMin"); // Switch to flat-z when needed - if( p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE ) { - //ZZLog::Error_Log("Use flat-z\n"); - cgGLSetParameter4fv(p, vlogz); - } - else - ZZLog::Error_Log("Shader file version is outdated! Only log-Z is possible."); - } - - float4 vnorm = float4(g_filog32, 0, 0,0); - p = cgGetNamedParameter(prog, "g_fZNorm"); - if( p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE ) - cgGLSetParameter4fv(p, vnorm); - - p = cgGetNamedParameter(prog, "g_fBilinear"); - if( p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE ) - cgGLSetParameter4fv(p, float4(-0.2f, -0.65f, 0.9f, 1.0f / 32767.0f )); - - p = cgGetNamedParameter(prog, "g_fZBias"); - if( p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE ) - cgGLSetParameter4fv(p, float4(1.0f/256.0f, 1.0004f, 1, 0.5f)); - - p = cgGetNamedParameter(prog, "g_fc0"); - if( p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE ) - cgGLSetParameter4fv(p, float4(0,1, 0.001f, 0.5f)); -} - -#ifndef DEVBUILD - -#define LOAD_VS(Index, prog) { \ - assert( mapShaderResources.find(Index) != mapShaderResources.end() ); \ - header = mapShaderResources[Index]; \ - assert( (header) != NULL && (header)->index == (Index) ); \ - prog = cgCreateProgram(g_cgcontext, CG_OBJECT, (char*)(s_lpShaderResources + (header)->offset), cgvProf, NULL, NULL); \ - if( !cgIsProgram(prog) ) { \ - ZZLog::Error_Log("Failed to load vs %d: \n%s", Index, cgGetLastListing(g_cgcontext)); \ - return false; \ - } \ - cgGLLoadProgram(prog); \ - if( cgGetError() != CG_NO_ERROR ) ZZLog::Error_Log("Failed to load program %d.", Index); \ - SetupVertexProgramParameters(prog, !!(Index&SH_CONTEXT1)); \ -} \ - -#define LOAD_PS(Index, fragment) { \ - bLoadSuccess = true; \ - assert( mapShaderResources.find(Index) != mapShaderResources.end() ); \ - header = mapShaderResources[Index]; \ - fragment.prog = cgCreateProgram(g_cgcontext, CG_OBJECT, (char*)(s_lpShaderResources + (header)->offset), cgfProf, NULL, NULL); \ - if( !cgIsProgram(fragment.prog) ) { \ - ZZLog::Error_Log("Failed to load ps %d: \n%s", Index, cgGetLastListing(g_cgcontext)); \ - return false; \ - } \ - cgGLLoadProgram(fragment.prog); \ - if( cgGetError() != CG_NO_ERROR ) { \ - ZZLog::Error_Log("failed to load program %d.", Index); \ - bLoadSuccess = false; \ - } \ - SetupFragmentProgramParameters(&fragment, !!(Index&SH_CONTEXT1), 0); \ -} \ - -inline bool LoadEffects() -{ - assert( s_lpShaderResources != NULL ); - - // process the header - u32 num = *(u32*)s_lpShaderResources; - int compressed_size = *(int*)(s_lpShaderResources+4); - int real_size = *(int*)(s_lpShaderResources+8); - int out; - - char* pbuffer = (char*)malloc(real_size); - inf((char*)s_lpShaderResources+12, &pbuffer[0], compressed_size, real_size, &out); - assert(out == real_size); - - s_lpShaderResources = (u8*)pbuffer; - SHADERHEADER* header = (SHADERHEADER*)s_lpShaderResources; - - mapShaderResources.clear(); - while(num-- > 0 ) { - mapShaderResources[header->index] = header; - ++header; - } - - // clear the textures - for(u16 i = 0; i < ArraySize(ppsTexture); ++i) { - SAFE_RELEASE_PROG(ppsTexture[i].prog); - ppsTexture[i].prog = NULL; - } -#ifndef _DEBUG - memset(ppsTexture, 0, sizeof(ppsTexture)); -#endif - - return true; -} - -// called -bool ZZshLoadExtraEffects() -{ - SHADERHEADER* header; - bool bLoadSuccess = true; - - const int vsshaders[4] = { SH_REGULARVS, SH_TEXTUREVS, SH_REGULARFOGVS, SH_TEXTUREFOGVS }; - - for(int i = 0; i < 4; ++i) { - LOAD_VS(vsshaders[i], pvs[2*i]); - LOAD_VS((vsshaders[i] | SH_CONTEXT1), pvs[2*i+1]); - //if( conf.mrtdepth ) { - LOAD_VS((vsshaders[i] | SH_WRITEDEPTH), pvs[2*i+8]); - LOAD_VS((vsshaders[i] | SH_WRITEDEPTH | SH_CONTEXT1), pvs[2*i+8+1]); -// } -// else { -// pvs[2*i+8] = pvs[2*i+8+1] = NULL; -// } - } - - LOAD_VS(SH_BITBLTVS, pvsBitBlt.prog); - pvsBitBlt.sBitBltPos = cgGetNamedParameter(pvsBitBlt.prog, "g_fBitBltPos"); - pvsBitBlt.sBitBltTex = cgGetNamedParameter(pvsBitBlt.prog, "g_fBitBltTex"); - pvsBitBlt.fBitBltTrans = cgGetNamedParameter(pvsBitBlt.prog, "g_fBitBltTrans"); - - LOAD_PS(SH_REGULARPS, ppsRegular[0]); - LOAD_PS(SH_REGULARFOGPS, ppsRegular[1]); - - if( conf.mrtdepth ) { - LOAD_PS(SH_REGULARPS, ppsRegular[2]); - if( !bLoadSuccess ) - conf.mrtdepth = 0; - LOAD_PS(SH_REGULARFOGPS, ppsRegular[3]); - if( !bLoadSuccess ) - conf.mrtdepth = 0; - } - - LOAD_PS(SH_BITBLTPS, ppsBitBlt[0]); - LOAD_PS(SH_BITBLTAAPS, ppsBitBlt[1]); - if( !bLoadSuccess ) { - ZZLog::Error_Log("Failed to load BitBltAAPS, using BitBltPS."); - LOAD_PS(SH_BITBLTPS, ppsBitBlt[1]); - } - LOAD_PS(SH_BITBLTDEPTHPS, ppsBitBltDepth); - LOAD_PS(SH_CRTCTARGPS, ppsCRTCTarg[0]); - LOAD_PS(SH_CRTCTARGINTERPS, ppsCRTCTarg[1]); - - g_bCRTCBilinear = true; - LOAD_PS(SH_CRTCPS, ppsCRTC[0]); - if( !bLoadSuccess ) { - // switch to simpler - g_bCRTCBilinear = false; - LOAD_PS(SH_CRTC_NEARESTPS, ppsCRTC[0]); - LOAD_PS(SH_CRTCINTER_NEARESTPS, ppsCRTC[0]); - } - else { - LOAD_PS(SH_CRTCINTERPS, ppsCRTC[1]); - } - - if( !bLoadSuccess ) - ZZLog::Error_Log("Failed to create CRTC shaders."); - - LOAD_PS(SH_CRTC24PS, ppsCRTC24[0]); - LOAD_PS(SH_CRTC24INTERPS, ppsCRTC24[1]); - LOAD_PS(SH_ZEROPS, ppsOne); - LOAD_PS(SH_BASETEXTUREPS, ppsBaseTexture); - LOAD_PS(SH_CONVERT16TO32PS, ppsConvert16to32); - LOAD_PS(SH_CONVERT32TO16PS, ppsConvert32to16); - - return true; -} - -FRAGMENTSHADER* ZZshLoadShadeEffect(int type, int texfilter, int fog, int testaem, int exactcolor, const clampInfo& clamp, int context, bool* pbFailed) -{ - int texwrap; - assert( texfilter < NUM_FILTERS ); - - if(g_nPixelShaderVer&SHADER_REDUCED) - texfilter = 0; - assert(!(g_nPixelShaderVer&SHADER_REDUCED) || !exactcolor); - - if( clamp.wms == clamp.wmt ) { - switch( clamp.wms ) { - case 0: texwrap = TEXWRAP_REPEAT; break; - case 1: texwrap = TEXWRAP_CLAMP; break; - case 2: texwrap = TEXWRAP_CLAMP; break; - default: texwrap = TEXWRAP_REGION_REPEAT; break; - } - } - else if( clamp.wms==3||clamp.wmt==3) - texwrap = TEXWRAP_REGION_REPEAT; - else - texwrap = TEXWRAP_REPEAT_CLAMP; - - int index = GET_SHADER_INDEX(type, texfilter, texwrap, fog, s_bWriteDepth, testaem, exactcolor, context, 0); - - assert( index < ArraySize(ppsTexture) ); - FRAGMENTSHADER* pf = ppsTexture+index; - - if( pbFailed != NULL ) *pbFailed = false; - - if( pf->prog != NULL ) - return pf; - - if( (g_nPixelShaderVer & SHADER_ACCURATE) && mapShaderResources.find(index+NUM_SHADERS*SHADER_ACCURATE) != mapShaderResources.end() ) - index += NUM_SHADERS*SHADER_ACCURATE; - - assert( mapShaderResources.find(index) != mapShaderResources.end() ); - SHADERHEADER* header = mapShaderResources[index]; - if( header == NULL ) - ZZLog::Error_Log("%d %d", index, g_nPixelShaderVer); - assert( header != NULL ); - - //DEBUG_LOG("shader:\n%s\n", (char*)(s_lpShaderResources + (header)->offset)); - pf->prog = cgCreateProgram(g_cgcontext, CG_OBJECT, (char*)(s_lpShaderResources + (header)->offset), cgfProf, NULL, NULL); - if( pf->prog != NULL && cgIsProgram(pf->prog) && cgGetError() == CG_NO_ERROR ) { - SetupFragmentProgramParameters(pf, context, type); - cgGLLoadProgram(pf->prog); - if( cgGetError() != CG_NO_ERROR ) { -// cgGLLoadProgram(pf->prog); -// if( cgGetError() != CG_NO_ERROR ) { - ZZLog::Error_Log("Failed to load shader %d,%d,%d,%d.", type, fog, texfilter, 4*clamp.wms+clamp.wmt); - if( pbFailed != NULL ) *pbFailed = true; - return pf; -// } - } - return pf; - } - - ZZLog::Error_Log("Failed to create shader %d,%d,%d,%d", type, fog, texfilter, 4*clamp.wms+clamp.wmt); - if( pbFailed != NULL ) *pbFailed = true; - - return NULL; -} - -#else // not RELEASE_TO_PUBLIC - -#define LOAD_VS(name, prog, shaderver) { \ - prog = cgCreateProgramFromFile(g_cgcontext, CG_SOURCE, EFFECT_NAME, shaderver, name, args); \ - if( !cgIsProgram(prog) ) { \ - ZZLog::Error_Log("Failed to load vs %s: \n%s", name, cgGetLastListing(g_cgcontext)); \ - return false; \ - } \ - cgGLLoadProgram(prog); \ - if( cgGetError() != CG_NO_ERROR ) ZZLog::Error_Log("failed to load program %s", name); \ - SetupVertexProgramParameters(prog, args[0]==context1); \ -} \ - -#ifdef _DEBUG -#define SET_PSFILENAME(frag, name) frag.filename = name -#else -#define SET_PSFILENAME(frag, name) -#endif - -#define LOAD_PS(name, fragment, shaderver) { \ - bLoadSuccess = true; \ - fragment.prog = cgCreateProgramFromFile(g_cgcontext, CG_SOURCE, EFFECT_NAME, shaderver, name, args); \ - if( !cgIsProgram(fragment.prog) ) { \ - ZZLog::Error_Log("Failed to load ps %s: \n%s", name, cgGetLastListing(g_cgcontext)); \ - return false; \ - } \ - cgGLLoadProgram(fragment.prog); \ - if( cgGetError() != CG_NO_ERROR ) { \ - ZZLog::Error_Log("failed to load program %s", name); \ - bLoadSuccess = false; \ - } \ - SetupFragmentProgramParameters(&fragment, args[0]==context1, 0); \ - SET_PSFILENAME(fragment, name); \ -} \ - -inline bool LoadEffects() -{ - // clear the textures - for(int i = 0; i < ArraySize(ppsTexture); ++i) { - SAFE_RELEASE_PROG(ppsTexture[i].prog); - } - -#ifndef _DEBUG - memset(ppsTexture, 0, sizeof(ppsTexture)); -#endif - - return true; -} - -bool ZZshLoadExtraEffects() -{ - const char* args[] = { NULL , NULL, NULL, NULL }; - char context0[255], context1[255]; - sprintf(context0, "-I%sctx0", EFFECT_DIR); - sprintf(context1, "-I%sctx1", EFFECT_DIR); - char* write_depth = "-DWRITE_DEPTH"; - bool bLoadSuccess = true; - - const char* pvsshaders[4] = { "RegularVS", "TextureVS", "RegularFogVS", "TextureFogVS" }; - - for(int i = 0; i < 4; ++i) { - args[0] = context0; - args[1] = NULL; - LOAD_VS(pvsshaders[i], pvs[2*i], cgvProf); - args[0] = context1; - LOAD_VS(pvsshaders[i], pvs[2*i+1], cgvProf); - - //if( conf.mrtdepth ) { - args[0] = context0; - args[1] = write_depth; - LOAD_VS(pvsshaders[i], pvs[2*i+8], cgvProf); - args[0] = context1; - LOAD_VS(pvsshaders[i], pvs[2*i+8+1], cgvProf); -// } -// else { -// pvs[2*i+8] = pvs[2*i+8+1] = NULL; -// } - } - - args[0] = context0; - args[1] = NULL; - LOAD_VS("BitBltVS", pvsBitBlt.prog, cgvProf); - pvsBitBlt.sBitBltPos = cgGetNamedParameter(pvsBitBlt.prog, "g_fBitBltPos"); - pvsBitBlt.sBitBltTex = cgGetNamedParameter(pvsBitBlt.prog, "g_fBitBltTex"); - pvsBitBlt.fBitBltTrans = cgGetNamedParameter(pvsBitBlt.prog, "g_fBitBltTrans"); - - LOAD_PS("RegularPS", ppsRegular[0], cgfProf); - LOAD_PS("RegularFogPS", ppsRegular[1], cgfProf); - - if( conf.mrtdepth ) { - args[0] = context0; - args[1] = write_depth; - LOAD_PS("RegularPS", ppsRegular[2], cgfProf); - if( !bLoadSuccess ) - conf.mrtdepth = 0; - LOAD_PS("RegularFogPS", ppsRegular[3], cgfProf); - if( !bLoadSuccess ) - conf.mrtdepth = 0; - } - - LOAD_PS("BitBltPS", ppsBitBlt[0], cgfProf); - LOAD_PS("BitBltAAPS", ppsBitBlt[1], cgfProf); - if( !bLoadSuccess ) { - ZZLog::Error_Log("Failed to load BitBltAAPS, using BitBltPS."); - LOAD_PS("BitBltPS", ppsBitBlt[1], cgfProf); - } - - LOAD_PS("BitBltDepthPS", ppsBitBltDepth, cgfProf); - LOAD_PS("CRTCTargPS", ppsCRTCTarg[0], cgfProf); - LOAD_PS("CRTCTargInterPS", ppsCRTCTarg[1], cgfProf); - - g_bCRTCBilinear = true; - LOAD_PS("CRTCPS", ppsCRTC[0], cgfProf); - if( !bLoadSuccess ) { - // switch to simpler - g_bCRTCBilinear = false; - LOAD_PS("CRTCPS_Nearest", ppsCRTC[0], cgfProf); - LOAD_PS("CRTCInterPS_Nearest", ppsCRTC[0], cgfProf); - } - else { - LOAD_PS("CRTCInterPS", ppsCRTC[1], cgfProf); - } - - if( !bLoadSuccess ) - ZZLog::Error_Log("Failed to create CRTC shaders."); - - LOAD_PS("CRTC24PS", ppsCRTC24[0], cgfProf); LOAD_PS("CRTC24InterPS", ppsCRTC24[1], cgfProf); - LOAD_PS("ZeroPS", ppsOne, cgfProf); - LOAD_PS("BaseTexturePS", ppsBaseTexture, cgfProf); - LOAD_PS("Convert16to32PS", ppsConvert16to32, cgfProf); - LOAD_PS("Convert32to16PS", ppsConvert32to16, cgfProf); - -// if( !conf.mrtdepth ) { -// ZZLog::Error_Log("Disabling MRT depth writing,"); -// s_bWriteDepth = FALSE; -// } - - return true; -} - -FRAGMENTSHADER* ZZshLoadShadeEffect(int type, int texfilter, int fog, int testaem, int exactcolor, const clampInfo& clamp, int context, bool* pbFailed) -{ - int texwrap; - - assert( texfilter < NUM_FILTERS ); - //assert( g_nPixelShaderVer == SHADER_30 ); - if( clamp.wms == clamp.wmt ) { - switch( clamp.wms ) { - case 0: texwrap = TEXWRAP_REPEAT; break; - case 1: texwrap = TEXWRAP_CLAMP; break; - case 2: texwrap = TEXWRAP_CLAMP; break; - default: - texwrap = TEXWRAP_REGION_REPEAT; break; - } - } - else if( clamp.wms==3||clamp.wmt==3) - texwrap = TEXWRAP_REGION_REPEAT; - else - texwrap = TEXWRAP_REPEAT_CLAMP; - - int index = GET_SHADER_INDEX(type, texfilter, texwrap, fog, s_bWriteDepth, testaem, exactcolor, context, 0); - - if( pbFailed != NULL ) *pbFailed = false; - - FRAGMENTSHADER* pf = ppsTexture+index; - - if( pf->prog != NULL ) - return pf; - - pf->prog = LoadShaderFromType(EFFECT_DIR, EFFECT_NAME, type, texfilter, texwrap, fog, s_bWriteDepth, testaem, exactcolor, g_nPixelShaderVer, context); - - if( pf->prog != NULL ) { -#ifdef _DEBUG - char str[255]; - sprintf(str, "Texture%s%d_%sPS", fog?"Fog":"", texfilter, g_pTexTypes[type]); - pf->filename = str; -#endif - SetupFragmentProgramParameters(pf, context, type); - cgGLLoadProgram(pf->prog); - if( cgGetError() != CG_NO_ERROR ) { - // try again -// cgGLLoadProgram(pf->prog); -// if( cgGetError() != CG_NO_ERROR ) { - ZZLog::Error_Log("Failed to load shader %d,%d,%d,%d", type, fog, texfilter, 4*clamp.wms+clamp.wmt); - if( pbFailed != NULL ) *pbFailed = true; - //assert(0); - // NULL makes things crash - return pf; -// } - } - return pf; - } - - ZZLog::Error_Log("Failed to create shader %d,%d,%d,%d", type, fog, texfilter, 4*clamp.wms+clamp.wmt); - if( pbFailed != NULL ) *pbFailed = true; - - return NULL; -} - -#endif // RELEASE_TO_PUBLIC - -//#endif // NVIDIA_CG_API diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglShaders.h b/plugins/zzogl-pg-cg/opengl/ZZoglShaders.h deleted file mode 100644 index a447814144..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglShaders.h +++ /dev/null @@ -1,231 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __ZEROGS_SHADERS_H__ -#define __ZEROGS_SHADERS_H__ - -// -- Not very important things, but we keep it to enumerate shader -#define NUM_FILTERS 2 // texture filtering -#define NUM_TYPES 5 // types of texture read modes -#define NUM_TEXWRAPS 4 // texture wrapping -#define NUM_SHADERS (NUM_FILTERS*NUM_TYPES*NUM_TEXWRAPS*32) // # shaders for a given ps - -// Just bitmask for different type of shaders -#define SHADER_REDUCED 1 // equivalent to ps2.0 -#define SHADER_ACCURATE 2 // for older cards with less accurate math (ps2.x+) - -#include "ZZoglMath.h" -#include "GS.h" - -// For output -#define NVIDIA_CG_API -// --------------------------- API abstraction level -------------------------------- - -#ifdef NVIDIA_CG_API // Code for NVIDIA cg-toolkit API - -#include -#include -#define ZZshProgram CGprogram -#define ZZshShader CGprogram -#define ZZshShaderLink CGprogram -#define ZZshParameter CGparameter -#define ZZshContext CGcontext -#define ZZshProfile CGprofile -#define ZZshError CGerror -#define pZero 0 // Zero parameter -#define sZero 0 // Zero program - -#define SAFE_RELEASE_PROG(x) { if( (x) != NULL ) { cgDestroyProgram(x); x = NULL; } } -inline bool ZZshActiveParameter(ZZshParameter param) {return (param !=NULL); } - -#endif // end NVIDIA cg-toolkit API - -//const static char* g_pPsTexWrap[] = { "-DREPEAT", "-DCLAMP", "-DREGION_REPEAT", NULL }; - -enum ZZshShaderType {ZZ_SH_ZERO, ZZ_SH_REGULAR, ZZ_SH_REGULAR_FOG, ZZ_SH_TEXTURE, ZZ_SH_TEXTURE_FOG, ZZ_SH_CRTC}; -// We have "compatible" shaders, as RegularFogVS and RegularFogPS. if don't need to wory about incompatible shaders -// It used only in GLSL mode. - -// ------------------------- Variables ------------------------------- - -extern int g_nPixelShaderVer; -extern ZZshShaderLink pvs[16], g_vsprog, g_psprog; -extern ZZshParameter g_vparamPosXY[2], g_fparamFogColor; - -#define MAX_ACTIVE_UNIFORMS 600 -#define MAX_ACTIVE_SHADERS 400 - -struct FRAGMENTSHADER -{ - FRAGMENTSHADER() : prog(sZero), Shader(0), sMemory(pZero), sFinal(pZero), sBitwiseANDX(pZero), sBitwiseANDY(pZero), sInterlace(pZero), sCLUT(pZero), sOneColor(pZero), sBitBltZ(pZero), - fTexAlpha2(pZero), fTexOffset(pZero), fTexDims(pZero), fTexBlock(pZero), fClampExts(pZero), fTexWrapMode(pZero), - fRealTexDims(pZero), fTestBlack(pZero), fPageOffset(pZero), fTexAlpha(pZero) {} - - ZZshShaderLink prog; // it link to FRAGMENTSHADER structure, for compability between GLSL and CG - ZZshShader Shader; // GLSL store shader's not as ready programs, but as shaders compilated object. VS and PS should be linked together to - // made a program. - ZZshShaderType ShaderType; // Not every PS and VS are used together, only compatible ones. - - ZZshParameter sMemory, sFinal, sBitwiseANDX, sBitwiseANDY, sInterlace, sCLUT; - ZZshParameter sOneColor, sBitBltZ, sInvTexDims; - ZZshParameter fTexAlpha2, fTexOffset, fTexDims, fTexBlock, fClampExts, fTexWrapMode, fRealTexDims, fTestBlack, fPageOffset, fTexAlpha; - - int ParametersStart, ParametersFinish; // this is part of UniformsIndex array in which parameters of this shader stored. Last one is ParametersFinish-1 - -#ifdef _DEBUG - string filename; -#endif - - void set_uniform_param(ZZshParameter &var, const char *name) - { - ZZshParameter p; - p = cgGetNamedParameter(prog, name); - - if (p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE) var = p; - } - - bool set_texture(GLuint texobj, const char *name) - { - ZZshParameter p; - - p = cgGetNamedParameter(prog, name); - - if (p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE) - { - cgGLSetTextureParameter(p, texobj); - cgGLEnableTextureParameter(p); - return true; - } - - return false; - } - - bool connect(ZZshParameter &tex, const char *name) - { - ZZshParameter p; - - p = cgGetNamedParameter(prog, name); - - if (p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE) - { - cgConnectParameter(tex, p); - return true; - } - - return false; - } - - bool set_texture(ZZshParameter &tex, const char *name) - { - ZZshParameter p; - - p = cgGetNamedParameter(prog, name); - - if (p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE) - { - //cgGLEnableTextureParameter(p); - tex = p; - return true; - } - - return false; - } - - bool set_shader_const(float4 v, const char *name) - { - ZZshParameter p; - - p = cgGetNamedParameter(prog, name); - - if (p != NULL && cgIsParameterUsed(p, prog) == CG_TRUE) - { - cgGLSetParameter4fv(p, v); - return true; - } - - return false; - } -}; - -struct VERTEXSHADER -{ - VERTEXSHADER() : prog(sZero), Shader(0), sBitBltPos(pZero), sBitBltTex(pZero) {} - - ZZshShaderLink prog; - ZZshShader Shader; - ZZshShaderType ShaderType; - - ZZshParameter sBitBltPos, sBitBltTex, fBitBltTrans; // vertex shader constants - - int ParametersStart, ParametersFinish; -}; - - extern float4 g_vdepth; - extern float4 vlogz; - extern VERTEXSHADER pvsBitBlt; - extern FRAGMENTSHADER ppsBitBlt[2], ppsBitBltDepth, ppsOne; // ppsOne used to stop using shaders for draw - extern FRAGMENTSHADER ppsBaseTexture, ppsConvert16to32, ppsConvert32to16; - - extern FRAGMENTSHADER ppsRegular[4], ppsTexture[NUM_SHADERS]; - extern FRAGMENTSHADER ppsCRTC[2], ppsCRTC24[2], ppsCRTCTarg[2]; - -// ------------------------- Functions ------------------------------- - -#ifdef NVIDIA_CG_API -inline bool ZZshExistProgram(FRAGMENTSHADER* pf) {return (pf->prog != NULL); }; // We don't check ps != NULL, so be warned, -inline bool ZZshExistProgram(VERTEXSHADER* pf) {return (pf->prog != NULL); }; -inline bool ZZshExistProgram(ZZshShaderLink prog) {return (prog != NULL); }; -#endif - -extern const char* ShaderCallerName; -extern const char* ShaderHandleName; - -inline void SetShaderCaller(const char* Name) { - ShaderCallerName = Name; -} - -inline void SetHandleName(const char* Name) { - ShaderHandleName = Name; -} - -inline void ResetShaderCounters() { -// g_vsprog = g_psprog = sZero; -} - -extern bool ZZshCheckProfilesSupport(); -extern bool ZZshStartUsingShaders(); -extern bool ZZshCreateOpenShadersFile(); -extern void ZZshGLDisableProfile(); -extern void ZZshGLEnableProfile(); -extern void ZZshSetParameter4fv(ZZshShaderLink prog, ZZshParameter param, const float* v, const char* name); -extern void ZZshSetParameter4fv(ZZshParameter param, const float* v, const char* name); -extern void ZZshSetParameter4fvWithRetry(ZZshParameter* param, ZZshShaderLink prog, const float* v, const char* name); -extern void ZZshGLSetTextureParameter(ZZshShaderLink prog, ZZshParameter param, GLuint texobj, const char* name); -extern void ZZshGLSetTextureParameter(ZZshParameter param, GLuint texobj, const char* name); -extern void ZZshDefaultOneColor( FRAGMENTSHADER ptr ); -extern void ZZshSetVertexShader(ZZshShaderLink prog); -extern void ZZshSetPixelShader(ZZshShaderLink prog); -extern bool ZZshLoadExtraEffects(); - -extern FRAGMENTSHADER* ZZshLoadShadeEffect(int type, int texfilter, int fog, int testaem, int exactcolor, const clampInfo& clamp, int context, bool* pbFailed); - - // only sets a limited amount of state (for Update) - void SetTexVariablesInt(int context, int bilinear, const tex0Info& tex0, bool CheckVB, FRAGMENTSHADER* pfragment, int force); - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglShoots.cpp b/plugins/zzogl-pg-cg/opengl/ZZoglShoots.cpp deleted file mode 100644 index b20ad51c7a..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglShoots.cpp +++ /dev/null @@ -1,655 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// Texture and avi saving to file functions - -//------------------ Includes - #include "Util.h" -#if defined(_WIN32) -# include "Utilities/RedtapeWindows.h" -# include -# include "resource.h" -#endif -#include - -#include "targets.h" -#include "Mem.h" -#include "ZZoglShoots.h" - -// AVI Capture -int s_avicapturing = 0; -bool g_bMakeSnapshot = false; - -extern "C" -{ -#ifdef _WIN32 -# define XMD_H -# undef FAR -#define HAVE_BOOLEAN -#endif - -#include "jpeglib.h" -} - -//------------------ Defines -#define TGA_FILE_NAME_MAX_LENGTH 20 -#define MAX_NUMBER_SAVED_TGA 200 - -//Windows have no snprintf -#if defined(_WIN32) -# define snprintf sprintf_s -#endif -//------------------ Constants - -//------------------ Global Variables -int TexNumber = 0; -int s_aviinit = 0; - -string strSnapshot; - -//------------------ Code - -// Set variables need to made a snapshoot when it's possible -void SaveSnapshot(const char* filename) -{ - g_bMakeSnapshot = true; - strSnapshot = filename; -} - -// Save curent renderer in jpeg or TGA format -bool SaveRenderTarget(const char* filename, int width, int height, int jpeg) -{ - bool bflip = height < 0; - height = abs(height); - vector data(width*height); - glReadPixels(0, 0, width, height, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]); - - if (glGetError() != GL_NO_ERROR) return false; - - if (bflip) - { - // swap scanlines - vector scanline(width); - - for (int i = 0; i < height / 2; ++i) - { - memcpy(&scanline[0], &data[i * width], width * 4); - memcpy(&data[i * width], &data[(height - i - 1) * width], width * 4); - memcpy(&data[(height - i - 1) * width], &scanline[0], width * 4); - } - } - - if (jpeg) return SaveJPEG(filename, width, height, &data[0], 70); - - return SaveTGA(filename, width, height, &data[0]); -} - -// Save selected texture as TGA -bool SaveTexture(const char* filename, u32 textarget, u32 tex, int width, int height) -{ - vector data(width*height); - glBindTexture(textarget, tex); - glGetTexImage(textarget, 0, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]); - - if (glGetError() != GL_NO_ERROR) return false; - - return SaveTGA(filename, width, height, &data[0]); -} - -// save image as JPEG -bool SaveJPEG(const char* filename, int image_width, int image_height, const void* pdata, int quality) -{ - u8* image_buffer = new u8[image_width * image_height * 3]; - u8* psrc = (u8*)pdata; - - // input data is rgba format, so convert to rgb - u8* p = image_buffer; - - for (int i = 0; i < image_height; ++i) - { - for (int j = 0; j < image_width; ++j) - { - p[0] = psrc[0]; - p[1] = psrc[1]; - p[2] = psrc[2]; - p += 3; - psrc += 4; - } - } - - /* This struct contains the JPEG compression parameters and pointers to - * working space (which is allocated as needed by the JPEG library). - * It is possible to have several such structures, representing multiple - * compression/decompression processes, in existence at once. We refer - * to any one struct (and its associated working data) as a "JPEG object". - */ - - struct jpeg_compress_struct cinfo; - - /* This struct represents a JPEG error handler. It is declared separately - * because applications often want to supply a specialized error handler - * (see the second half of this file for an example). But here we just - * take the easy way out and use the standard error handler, which will - * print a message on stderr and call exit() if compression fails. - * Note that this struct must live as long as the main JPEG parameter - * struct, to avoid dangling-pointer problems. - */ - - struct jpeg_error_mgr jerr; - - /* More stuff */ - FILE * outfile; /* target file */ - - JSAMPROW row_pointer[1]; /* pointer to JSAMPLE row[s] */ - - int row_stride; /* physical row width in image buffer */ - - /* Step 1: allocate and initialize JPEG compression object */ - - /* We have to set up the error handler first, in case the initialization - * step fails. (Unlikely, but it could happen if you are out of memory.) - * This routine fills in the contents of struct jerr, and returns jerr's - * address which we place into the link field in cinfo. - */ - cinfo.err = jpeg_std_error(&jerr); - - /* Now we can initialize the JPEG compression object. */ - jpeg_create_compress(&cinfo); - - /* Step 2: specify data destination (eg, a file) */ - /* Note: steps 2 and 3 can be done in either order. */ - - /* Here we use the library-supplied code to send compressed data to a - * stdio stream. You can also write your own code to do something else. - * VERY IMPORTANT: use "b" option to fopen() if you are on a machine that - * requires it in order to write binary files. - */ - if ((outfile = fopen(filename, "wb")) == NULL) - { - fprintf(stderr, "can't open %s\n", filename); - exit(1); - } - - jpeg_stdio_dest(&cinfo, outfile); - - /* Step 3: set parameters for compression */ - - /* First we supply a description of the input image. - * Four fields of the cinfo struct must be filled in: - */ - cinfo.image_width = image_width; /* image width and height, in pixels */ - cinfo.image_height = image_height; - cinfo.input_components = 3; /* # of color components per pixel */ - cinfo.in_color_space = JCS_RGB; /* colorspace of input image */ - /* Now use the library's routine to set default compression parameters. - * (You must set at least cinfo.in_color_space before calling this, - * since the defaults depend on the source color space.) - */ - jpeg_set_defaults(&cinfo); - /* Now you can set any non-default parameters you wish to. - * Here we just illustrate the use of quality (quantization table) scaling: - */ - jpeg_set_quality(&cinfo, quality, true /* limit to baseline-JPEG values */); - - /* Step 4: Start compressor */ - - /* true ensures that we will write a complete interchange-JPEG file. - * Pass true unless you are very sure of what you're doing. - */ - jpeg_start_compress(&cinfo, true); - - /* Step 5: while (scan lines remain to be written) */ - /* jpeg_write_scanlines(...); */ - - /* Here we use the library's state variable cinfo.next_scanline as the - * loop counter, so that we don't have to keep track ourselves. - * To keep things simple, we pass one scanline per call; you can pass - * more if you wish, though. - */ - row_stride = image_width * 3; /* JSAMPLEs per row in image_buffer */ - - while (cinfo.next_scanline < cinfo.image_height) - { - /* jpeg_write_scanlines expects an array of pointers to scanlines. - * Here the array is only one element long, but you could pass - * more than one scanline at a time if that's more convenient. - */ - row_pointer[0] = & image_buffer[cinfo.next_scanline * row_stride]; - (void) jpeg_write_scanlines(&cinfo, row_pointer, 1); - } - - /* Step 6: Finish compression */ - - jpeg_finish_compress(&cinfo); - - /* After finish_compress, we can close the output file. */ - fclose(outfile); - - /* Step 7: release JPEG compression object */ - - /* This is an important step since it will release a good deal of memory. */ - jpeg_destroy_compress(&cinfo); - - delete []image_buffer; - - /* And we're done! */ - return true; -} - -#if defined(_MSC_VER) -# pragma pack(push, 1) -#endif - -// This is the defenition of TGA header. We need it to function bellow - -struct TGA_HEADER -{ - u8 identsize; // size of ID field that follows 18 u8 header (0 usually) - u8 colourmaptype; // type of colour map 0=none, 1=has palette - u8 imagetype; // type of image 0=none,1=indexed,2=rgb,3=grey,+8=rle packed - - s16 colourmapstart; // first colour map entry in palette - s16 colourmaplength; // number of colours in palette - u8 colourmapbits; // number of bits per palette entry 15,16,24,32 - - s16 xstart; // image x origin - s16 ystart; // image y origin - s16 width; // image width in pixels - s16 height; // image height in pixels - u8 bits; // image bits per pixel 8,16,24,32 - u8 descriptor; // image descriptor bits (vh flip bits) - - // pixel data follows header -#if defined(_MSC_VER) -}; - -# pragma pack(pop) -# else -} - -__attribute__((packed)); -#endif - -// Save image as TGA -bool SaveTGA(const char* filename, int width, int height, void* pdata) -{ - int err = 0; - TGA_HEADER hdr; - FILE* f = fopen(filename, "wb"); - - if (f == NULL) return false; - - assert(sizeof(TGA_HEADER) == 18 && sizeof(hdr) == 18); - - memset(&hdr, 0, sizeof(hdr)); - - hdr.imagetype = 2; - hdr.bits = 32; - hdr.width = width; - hdr.height = height; - hdr.descriptor |= 8 | (1 << 5); // 8bit alpha, flip vertical - - err = fwrite(&hdr, sizeof(hdr), 1, f); - err = fwrite(pdata, width * height * 4, 1, f); - - fclose(f); - - return true; -} - -// AVI capture stuff -// AVI start -- set needed global variables -void StartCapture() -{ - if (conf.captureAvi()) return; - if (!s_aviinit) - { -#ifdef _WIN32 - START_AVI("zerogs.avi"); -#else // linux - //TODO -#endif - s_aviinit = 1; - } - else - { - ZZLog::Error_Log("Continuing from previous capture."); - } - - s_avicapturing = 1; - conf.setCaptureAvi(true); - ZZLog::Warn_Log("Started recording zerogs.avi."); - -} - -// Stop. -void StopCapture() -{ - if (!conf.captureAvi()) return; - s_avicapturing = 0; - conf.setCaptureAvi(false); - ZZLog::Warn_Log("Stopped recording."); -} - -// And capture frame does not work on linux. -void CaptureFrame() -{ - if ((!s_avicapturing) || (!s_aviinit)) return; - - vector data(GLWin.backbuffer.w * GLWin.backbuffer.h); - glReadPixels(0, 0, GLWin.backbuffer.w, GLWin.backbuffer.h, GL_RGBA, GL_UNSIGNED_BYTE, &data[0]); - - if (glGetError() != GL_NO_ERROR) return; - -#ifdef _WIN32 - int fps = SMODE1->CMOD == 3 ? 50 : 60; - - bool bSuccess = ADD_FRAME_FROM_DIB_TO_AVI("AAAA", fps, GLWin.backbuffer.w, GLWin.backbuffer.h, 32, &data[0]); - - if (!bSuccess) - { - s_avicapturing = 0; - STOP_AVI(); - ZZAddMessage("Failed to create avi"); - return; - } - -#else // linux - //TODO -#endif // _WIN32 -} - -// It's nearly the same as save texture -void -SaveTex(tex0Info* ptex, int usevid) -{ - vector data(ptex->tw*ptex->th); - vector srcdata; - - u32* dst = &data[0]; - u8* psrc = g_pbyGSMemory; - - CMemoryTarget* pmemtarg = NULL; - - if (usevid) - { - pmemtarg = g_MemTargs.GetMemoryTarget(*ptex, 0); - assert(pmemtarg != NULL); - - glBindTexture(GL_TEXTURE_RECTANGLE_NV, pmemtarg->ptex->tex); - srcdata.resize(4 * pmemtarg->texW * pmemtarg->texH); - - // FIXME strangely this function call seem to crash pcsx2 on atelier of iris 1 - // Note: fmt is GL_UNSIGNED_SHORT_1_5_5_5_REV - glGetTexImage(GL_TEXTURE_RECTANGLE_NV, 0, GL_RGBA, pmemtarg->fmt, &srcdata[0]); - - u32 offset = MemorySize(pmemtarg->realy); - - if (ptex->psm == PSMT8) - offset *= CLUT_PIXEL_SIZE(ptex->cpsm); - else if (ptex->psm == PSMT4) - offset *= CLUT_PIXEL_SIZE(ptex->cpsm) * 2; - - psrc = &srcdata[0] - offset; - } - - for (int i = 0; i < ptex->th; ++i) - { - for (int j = 0; j < ptex->tw; ++j) - { - u32 u = 0; - u32 addr; - - switch (ptex->psm) - { - case PSMCT32: - addr = getPixelAddress32(j, i, ptex->tbp0, ptex->tbw); - if (addr * 4 < MEMORY_END) - u = readPixel32(psrc, j, i, ptex->tbp0, ptex->tbw); - else - u = 0; - break; - - case PSMCT24: - addr = getPixelAddress24(j, i, ptex->tbp0, ptex->tbw); - if (addr * 4 < MEMORY_END) - u = readPixel24(psrc, j, i, ptex->tbp0, ptex->tbw); - else - u = 0; - break; - - case PSMCT16: - addr = getPixelAddress16(j, i, ptex->tbp0, ptex->tbw); - if (addr * 2 < MEMORY_END) - { - u = readPixel16(psrc, j, i, ptex->tbp0, ptex->tbw); - u = RGBA16to32(u); - } - else - { - u = 0; - } - break; - - case PSMCT16S: - addr = getPixelAddress16(j, i, ptex->tbp0, ptex->tbw); - if (addr * 2 < MEMORY_END) - { - u = readPixel16S(psrc, j, i, ptex->tbp0, ptex->tbw); - u = RGBA16to32(u); - } - else - { - u = 0; - } - break; - - case PSMT8: - addr = getPixelAddress8(j, i, ptex->tbp0, ptex->tbw); - if (addr < MEMORY_END) - { - if (usevid) - { - if (PSMT_IS32BIT(ptex->cpsm)) - u = *(u32*)(psrc + 4 * addr); - else - u = RGBA16to32(*(u16*)(psrc + 2 * addr)); - } - else - { - u = readPixel8(psrc, j, i, ptex->tbp0, ptex->tbw); - } - } - else - { - u = 0; - } - break; - - case PSMT4: - addr = getPixelAddress4(j, i, ptex->tbp0, ptex->tbw); - if (addr < 2*MEMORY_END) - { - if (usevid) - { - if (PSMT_IS32BIT(ptex->cpsm)) - u = *(u32*)(psrc + 4 * addr); - else - u = RGBA16to32(*(u16*)(psrc + 2 * addr)); - } - else - { - u = readPixel4(psrc, j, i, ptex->tbp0, ptex->tbw); - } - } - else - { - u = 0; - } - - break; - - case PSMT8H: - addr = getPixelAddress8H(j, i, ptex->tbp0, ptex->tbw); - if (4*addr < MEMORY_END) - { - if (usevid) - { - if (PSMT_IS32BIT(ptex->cpsm)) - u = *(u32*)(psrc + 4 * addr); - else - u = RGBA16to32(*(u16*)(psrc + 2 * addr)); - } - else - { - u = readPixel8H(psrc, j, i, ptex->tbp0, ptex->tbw); - } - } - else - { - u = 0; - } - break; - - case PSMT4HL: - addr = getPixelAddress4HL(j, i, ptex->tbp0, ptex->tbw); - if (4*addr < MEMORY_END) - { - if (usevid) - { - if (PSMT_IS32BIT(ptex->cpsm)) - u = *(u32*)(psrc + 4 * addr); - else - u = RGBA16to32(*(u16*)(psrc + 2 * addr)); - } - else - { - u = readPixel4HL(psrc, j, i, ptex->tbp0, ptex->tbw); - } - } - else - { - u = 0; - } - break; - - case PSMT4HH: - addr = getPixelAddress4HH(j, i, ptex->tbp0, ptex->tbw); - if (4*addr < MEMORY_END) - { - if (usevid) - { - if (PSMT_IS32BIT(ptex->cpsm)) - u = *(u32*)(psrc + 4 * addr); - else - u = RGBA16to32(*(u16*)(psrc + 2 * addr)); - } - else - { - u = readPixel4HH(psrc, j, i, ptex->tbp0, ptex->tbw); - } - } - else - { - u = 0; - } - break; - - case PSMT32Z: - addr = getPixelAddress32Z(j, i, ptex->tbp0, ptex->tbw); - if (4*addr < MEMORY_END) - u = readPixel32Z(psrc, j, i, ptex->tbp0, ptex->tbw); - else - u = 0; - break; - - case PSMT24Z: - addr = getPixelAddress24Z(j, i, ptex->tbp0, ptex->tbw); - if (4*addr < MEMORY_END) - u = readPixel24Z(psrc, j, i, ptex->tbp0, ptex->tbw); - else - u = 0; - break; - - case PSMT16Z: - addr = getPixelAddress16Z(j, i, ptex->tbp0, ptex->tbw); - if (2*addr < MEMORY_END) - u = readPixel16Z(psrc, j, i, ptex->tbp0, ptex->tbw); - else - u = 0; - break; - - case PSMT16SZ: - addr = getPixelAddress16SZ(j, i, ptex->tbp0, ptex->tbw); - if (2*addr < MEMORY_END) - u = readPixel16SZ(psrc, j, i, ptex->tbp0, ptex->tbw); - else - u = 0; - break; - - default: - assert(0); - } - - *dst++ = u; - } - } - - char Name[TGA_FILE_NAME_MAX_LENGTH]; - - snprintf(Name, TGA_FILE_NAME_MAX_LENGTH, "Tex.%d.tga", TexNumber); - SaveTGA(Name, ptex->tw, ptex->th, &data[0]); - - TexNumber++; - if (TexNumber > MAX_NUMBER_SAVED_TGA) TexNumber = 0; -} - - -// Do the save texture and return file name of it -// Do not forget to call free(), other wise there would be memory leak! -char* NamedSaveTex(tex0Info* ptex, int usevid) -{ - SaveTex(ptex, usevid); - - char* Name = (char*)malloc(TGA_FILE_NAME_MAX_LENGTH); - snprintf(Name, TGA_FILE_NAME_MAX_LENGTH, "Tex.%d.tga", TexNumber); - - return Name; -} - -// Special function, which is safe to call from any other file, without aviutils problems. -void Stop_Avi() -{ -#ifdef _WIN32 - STOP_AVI(); -#else -// Does not support yet -#endif -} - -void Delete_Avi_Capture() -{ - if (s_aviinit) - { - StopCapture(); - Stop_Avi(); - ZZLog::Error_Log("zerogs.avi stopped."); - s_aviinit = 0; - } -} diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglShoots.h b/plugins/zzogl-pg-cg/opengl/ZZoglShoots.h deleted file mode 100644 index 98bb1383df..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglShoots.h +++ /dev/null @@ -1,35 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef ZZOGLSHOOTS_H_INCLUDED -#define ZZOGLSHOOTS_H_INCLUDED - -void SaveSnapshot(const char* filename); -bool SaveRenderTarget(const char* filename, int width, int height, int jpeg); -bool SaveTexture(const char* filename, u32 textarget, u32 tex, int width, int height); -bool SaveJPEG(const char* filename, int width, int height, const void* pdata, int quality); -bool SaveTGA(const char* filename, int width, int height, void* pdata); -void Stop_Avi(); -void Delete_Avi_Capture(); - -void StartCapture(); -void StopCapture(); -void CaptureFrame(); - -#endif // ZZOGLSHOOTS_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglVB.cpp b/plugins/zzogl-pg-cg/opengl/ZZoglVB.cpp deleted file mode 100644 index a1604b2be2..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglVB.cpp +++ /dev/null @@ -1,506 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// Zerogs:VB implementation. -// VB stands for Visual Buffer, as I think - -//------------------- Includes - #include "Util.h" -#include "targets.h" -#include "ZZoglVB.h" -#include "GS.h" -#include "Mem.h" -extern float fiTexWidth[2], fiTexHeight[2]; // current tex width and height - -// ----------------- Defines -#define MINMAX_SHIFT 3 - -//------------------ Constants - -// ----------------- Global Variables -int maxmin = 608; -// ----------------- Code - -// Constructor. Set width and height to 1 -VB::VB() -{ - memset(this, 0, sizeof(VB)); - tex0.tw = 1; - tex0.th = 1; -} - -// Destructor -VB::~VB() -{ - Destroy(); -} - -void VB::Destroy() -{ - _aligned_free(pBufferData); - pBufferData = NULL; - nNumVertices = 0; - - prndr = NULL; - pdepth = NULL; -} - -int ConstraintReason; - -// Return number of 64-pixels block, that guaranted could be hold in memory -// from gsfb.fbp and tbp (textrure pase), zbuf.zbp (Z-buffer), frame.fbp -// (previous frame). -inline int VB::FindMinimalMemoryConstrain(int tbp, int maxpos) -{ - int MinConstraint = maxpos; - - // make sure texture is far away from tbp - { - int Constraint = tbp - gsfb.fbp; - - if ((0 < Constraint) && (Constraint < MinConstraint)) - { - MinConstraint = Constraint; - ConstraintReason = 1; - } - } - - // offroad uses 0x80 fbp which messes up targets - // special case when double buffering (hamsterball) - // Suikoden 3 require e00 have this issue too. P3 - 0x1000. - - if (prndr != NULL) - { - int Constraint = frame.fbp - gsfb.fbp; - - if ((0x0 < Constraint) && (Constraint < MinConstraint)) - { - MinConstraint = Constraint; - ConstraintReason = 2; - } - } - - // old caching method - // zmsk necessary for KH movie - if (!zbuf.zmsk) - { - int Constraint = zbuf.zbp - gsfb.fbp; - - if ((0 < Constraint) && (Constraint < MinConstraint)) - { - MinConstraint = Constraint; - ConstraintReason = 3; - } - } - - // In 16Bit mode in one Word frame stored 2 pixels - if (PSMT_ISHALF(gsfb.psm)) MinConstraint *= 2; - - return MinConstraint ; -} - -// Return number of 64 pizel words that could be placed in Z-Buffer -// If no Z-buffer present return old constraint -inline int VB::FindZbufferMemoryConstrain(int tbp, int maxpos) -{ - int MinConstraint = maxpos; - - // Check tbp / zbuffer constraint - if (!zbuf.zmsk) - { - int Constraint = (tbp - zbuf.zbp) * (PSMT_ISHALF(zbuf.psm) ? 2 : 1); - - if ((0 < Constraint) && (Constraint < MinConstraint)) - { - MinConstraint = Constraint; - ConstraintReason = 4; - } - } - - return MinConstraint; -} - -// Return heights limiter from scissor... -inline int GetScissorY(int y) -{ - int fbh = (y >> MINMAX_SHIFT) + 1; - - if (fbh > 2 && (fbh & 1)) fbh -= 1; - - return fbh; -} - -//There is several reasons to limit a height of frame: maximum buffer size, calculated size -//from fbw and fbh and scissoring. -inline int VB::FindMinimalHeightConstrain(int maxpos) -{ - int MinConstraint = maxpos; - - if (maxmin < MinConstraint) - { - MinConstraint = maxmin; - ConstraintReason = 5; - } - - if (gsfb.fbh < MinConstraint) - { - MinConstraint = gsfb.fbh; - ConstraintReason = 6; - } - - int ScissorConstraint = GetScissorY(scissor.y1) ; - - if (ScissorConstraint < MinConstraint) - { - MinConstraint = ScissorConstraint; - ConstraintReason = 7; - } - - return MinConstraint; -} - -// 32 bit frames have additional constraints to frame -// maxpos was maximum length of frame at normal constraints -inline void VB::CheckFrame32bitRes(int maxpos) -{ - int fbh = frame.fbh; - - if (frame.fbh >= 512) - { - // neopets hack - maxmin = min(maxmin, frame.fbh); - frame.fbh = maxmin; - ConstraintReason = 8; - } - - // ffxii hack to stop resolving - if (frame.fbp >= 0x3000 && fbh >= 0x1a0) - { - int endfbp = frame.fbp + frame.fbw * fbh / (PSMT_ISHALF(gsfb.psm) ? 128 : 64); - - // see if there is a previous render target in the way, reduce - - for (CRenderTargetMngr::MAPTARGETS::iterator itnew = s_RTs.mapTargets.begin(); itnew != s_RTs.mapTargets.end(); ++itnew) - { - if (itnew->second->fbp > frame.fbp && endfbp > itnew->second->fbp) - { - endfbp = itnew->second->fbp; - } - } - - frame.fbh = (endfbp - frame.fbp) * (PSMT_ISHALF(gsfb.psm) ? 128 : 64) / frame.fbw; - - if (frame.fbh < fbh) ConstraintReason = 9; - } - -} - -// This is the main code for frame resizing. -// It checks for several reasons to resize and resizes if it needs to. -// 4Mb memory in 64 bit (4 bytes) words. -// |------------------------|---------------------|----------|----------|---------------------| -// 0 gsfb.fbp zbuff.zpb tbp frame.fbp 2^20/64 -inline int VB::CheckFrameAddConstraints(int tbp) -{ - if (gsfb.fbw <= 0) - { - ERROR_LOG_SPAM("render target null, no constraints. Ignoring\n"); - return -1; - } - - // Memory region after fbp - int maxmemorypos = 0x4000 - gsfb.fbp; - - ConstraintReason = 0; - - maxmemorypos = FindMinimalMemoryConstrain(tbp, maxmemorypos); - maxmemorypos = FindZbufferMemoryConstrain(tbp, maxmemorypos); - - int maxpos = 64 * maxmemorypos ; - - maxpos /= gsfb.fbw; - - //? atelier iris crashes without it - if (maxpos > 256) maxpos &= ~0x1f; - -#ifdef DEVBUILD - int noscissorpos = maxpos; - int ConstrainR1 = ConstraintReason; -#endif - - maxpos = FindMinimalHeightConstrain(maxpos); - - frame = gsfb; - frame.fbh = maxpos; - - if (!PSMT_ISHALF(frame.psm) || !(conf.settings().full_16_bit_res)) CheckFrame32bitRes(maxpos); - -#ifdef DEVBUILD - if (frame.fbh == 0xe2) - ZZLog::Debug_Log("Const: %x %x %d| %x %d %x %x", frame.fbh, frame.fbw, ConstraintReason, noscissorpos, ConstrainR1, tbp, frame.fbp); -#endif - -// Fixme: Reserved psm for framebuffers -// gsfb.psm &= 0xf; // shadow tower - - return 0; -} - -// Check if after resizing new depth target is needed to be used. -// it returns 2 if a new depth target is used. -inline int VB::CheckFrameResolveDepth(int tbp) -{ - int result = 0; - CDepthTarget* pprevdepth = pdepth; - pdepth = NULL; - - // just z changed - frameInfo f = CreateFrame(zbuf.zbp, prndr->fbw, prndr->fbh, zbuf.psm, (zbuf.psm == 0x31) ? 0xff000000 : 0); - - CDepthTarget* pnewdepth = (CDepthTarget*)s_DepthRTs.GetTarg(f, CRenderTargetMngr::TO_DepthBuffer | CRenderTargetMngr::TO_StrictHeight | - (zbuf.zmsk ? CRenderTargetMngr::TO_Virtual : 0), get_maxheight(zbuf.zbp, gsfb.fbw, 0)); - - assert(pnewdepth != NULL && prndr != NULL); - if (pnewdepth->fbh != prndr->fbh) ZZLog::Debug_Log("pnewdepth->fbh(0x%x) != prndr->fbh(0x%x)", pnewdepth->fbh, prndr->fbh); - //assert(pnewdepth->fbh == prndr->fbh); - - if ((pprevdepth != pnewdepth) || (pprevdepth != NULL && (pprevdepth->status & CRenderTarget::TS_NeedUpdate))) - result = 2; - - pdepth = pnewdepth; - - return result; -} - -// Check if after resizing, a new render target is needed to be used. Also perform deptarget check. -// Returns 1 if only 1 render target is changed and 3 -- if both. -inline int VB::CheckFrameResolveRender(int tbp) -{ - int result = 0; - - CRenderTarget* pprevrndr = prndr; - prndr = NULL; - CDepthTarget* pprevdepth = pdepth; - pdepth = NULL; - // Set renderes to NULL to prevent Flushing. - - CRenderTarget* pnewtarg = s_RTs.GetTarg(frame, 0, maxmin); - assert(pnewtarg != NULL); - - // pnewtarg->fbh >= 0x1c0 needed for ffx - - if ((pnewtarg->fbh >= 0x1c0) && pnewtarg->fbh > frame.fbh && zbuf.zbp < tbp && !zbuf.zmsk) - { - // check if zbuf is in the way of the texture (suikoden5) - int maxallowedfbh = (tbp - zbuf.zbp) * (PSMT_ISHALF(zbuf.psm) ? 128 : 64) / gsfb.fbw; - - if (PSMT_ISHALF(gsfb.psm)) maxallowedfbh *= 2; - - if (pnewtarg->fbh > maxallowedfbh + 32) // +32 needed for ffx2 - { - // destroy and recreate - s_RTs.DestroyAllTargs(0, 0x100, pnewtarg->fbw); - pnewtarg = s_RTs.GetTarg(frame, 0, maxmin); - assert(pnewtarg != NULL); - } - } - - ZZLog::Prim_Log("frame_%d: fbp=0x%x fbw=%d fbh=%d(%d) psm=0x%x fbm=0x%x\n", ictx, gsfb.fbp, gsfb.fbw, gsfb.fbh, pnewtarg->fbh, gsfb.psm, gsfb.fbm); - - if ((pprevrndr != pnewtarg) || (pprevrndr != NULL && (pprevrndr->status & CRenderTarget::TS_NeedUpdate))) - result = 1; - - prndr = pnewtarg; - - pdepth = pprevdepth; - - result |= CheckFrameResolveDepth(tbp); - - return result; -} - -// After frame resetting, it is possible that 16 to 32 or 32 to 16 (color bits) conversion should be made. -inline void VB::CheckFrame16vs32Conversion() -{ - if (prndr->status & CRenderTarget::TS_NeedConvert32) - { - if (pdepth->pdepth != 0) pdepth->SetDepthStencilSurface(); - - prndr->fbh *= 2; - prndr->ConvertTo32(); - prndr->status &= ~CRenderTarget::TS_NeedConvert32; - } - else if (prndr->status & CRenderTarget::TS_NeedConvert16) - { - if (pdepth->pdepth != 0) pdepth->SetDepthStencilSurface(); - - prndr->fbh /= 2; - prndr->ConvertTo16(); - prndr->status &= ~CRenderTarget::TS_NeedConvert16; - } -} - -void SetContextTarget(int context); - -// A lot of times, the target is too big and overwrites the texture. -// If tbp != 0, use it to bound. -void VB::CheckFrame(int tbp) -{ - GL_REPORT_ERRORD(); - - static int bChanged; - - if (bNeedZCheck) - { - ZZLog::Prim_Log("zbuf_%d: zbp=0x%x psm=0x%x, zmsk=%d\n", ictx, zbuf.zbp, zbuf.psm, zbuf.zmsk); - //zbuf = *zb; - } - - if (m_Blocks[gsfb.psm].bpp == 0) - { - ZZLog::Error_Log("CheckFrame invalid bpp %d.", gsfb.psm); - return; - } - - bChanged = 0; - - if (bNeedFrameCheck) - { - // important to set before calling GetTarg - bNeedFrameCheck = 0; - bNeedZCheck = 0; - - if (CheckFrameAddConstraints(tbp) == -1) return; - - if ((prndr != NULL) && (prndr->psm != gsfb.psm)) - { - // behavior for dest alpha varies -// ResetAlphaVariables(); - } - - bChanged = CheckFrameResolveRender(tbp); - - CheckFrame16vs32Conversion(); - } - else if (bNeedZCheck) - { - bNeedZCheck = 0; - - if (prndr != NULL && gsfb.fbw > 0) CheckFrameResolveDepth(tbp); - } - - if (prndr != NULL) SetContextTarget(ictx); - GL_REPORT_ERRORD(); -} - -// This is the case, most easy to perform, when nothing was changed -inline void VB::FlushTexUnchangedClutDontUpdate() -{ - if (ZZOglGet_cld_TexBits(uNextTex0Data[1])) - { - texClutWrite(ictx); - // invalidate to make sure target didn't change! - bVarsTexSync = false; - } -} - -// The second of easy branch. We does not change storage model, so we don't need to -// update anything except texture itself -inline void VB::FlushTexClutDontUpdate() -{ - if (!ZZOglClutStorageUnchanged(uCurTex0Data, uNextTex0Data)) Flush(ictx); - - // clut memory isn't going to be loaded so can ignore, but at least update CSA and CPSM! - uCurTex0Data[1] = (uCurTex0Data[1] & CPSM_CSA_NOTMASK) | (uNextTex0Data[1] & CPSM_CSA_BITMASK); - - tex0.csa = ZZOglGet_csa_TexBits(uNextTex0Data[1]); - tex0.cpsm = ZZOglGet_cpsm_TexBits(uNextTex0Data[1]); - - texClutWrite(ictx); - - bVarsTexSync = false; -} - - -// Set texture variables after big change -inline void VB::FlushTexSetNewVars(u32 psm) -{ - tex0.tbp0 = ZZOglGet_tbp0_TexBits(uNextTex0Data[0]); - tex0.tbw = ZZOglGet_tbw_TexBitsMult(uNextTex0Data[0]); - tex0.psm = psm; - tex0.tw = ZZOglGet_tw_TexBitsExp(uNextTex0Data[0]); - tex0.th = ZZOglGet_th_TexBitsExp(uNextTex0Data[0], uNextTex0Data[1]); - - tex0.tcc = ZZOglGet_tcc_TexBits(uNextTex0Data[1]); - tex0.tfx = ZZOglGet_tfx_TexBits(uNextTex0Data[1]); - - fiTexWidth[ictx] = (1 / 16.0f) / tex0.tw; - fiTexHeight[ictx] = (1 / 16.0f) / tex0.th; -} - -// Flush == draw on screen -// This function made VB state consistant before real Flush. -void VB::FlushTexData() -{ - GL_REPORT_ERRORD(); - - //assert(bNeedTexCheck); - if (bNeedTexCheck) - { - bNeedTexCheck = 0; - - u32 psm = ZZOglGet_psm_TexBitsFix(uNextTex0Data[0]); - - // don't update unless necessary - - if (ZZOglAllExceptClutIsSame(uCurTex0Data, uNextTex0Data)) - { - // Don't need to do anything if there is no clutting and VB tex data was not changed - if (!PSMT_ISCLUT(psm)) return; - - // have to write the CLUT again if only CLD was changed - if (ZZOglClutMinusCLDunchanged(uCurTex0Data, uNextTex0Data)) - { - FlushTexUnchangedClutDontUpdate(); - return; - } - - // Cld bit is 0 means that clut buffer stay unchanged - if (ZZOglGet_cld_TexBits(uNextTex0Data[1]) == 0) - { - FlushTexClutDontUpdate(); - return; - } - } - - // Made the full update - Flush(ictx); - - bVarsTexSync = false; - bTexConstsSync = false; - - uCurTex0Data[0] = uNextTex0Data[0]; - uCurTex0Data[1] = uNextTex0Data[1]; - - FlushTexSetNewVars(psm); - - if (PSMT_ISCLUT(psm)) CluttingForFlushedTex(&tex0, uNextTex0Data[1], ictx) ; - GL_REPORT_ERRORD(); - } -} diff --git a/plugins/zzogl-pg-cg/opengl/ZZoglVB.h b/plugins/zzogl-pg-cg/opengl/ZZoglVB.h deleted file mode 100644 index aad1d78f59..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZZoglVB.h +++ /dev/null @@ -1,158 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -// Zerogs:VB implementation. -// VB stands for Visual Buffer, as I think - -#ifndef ZZOGLVB_H_INCLUDED -#define ZZOGLVB_H_INCLUDED - -#include "targets.h" - -extern const GLenum primtype[8]; - -class VB -{ - public: - VB(); - ~VB(); - - void Destroy(); - - inline bool CheckPrim() - { - static const int PRIMMASK = 0x0e; // for now ignore 0x10 (AA) - - if ((PRIMMASK & prim->_val) != (PRIMMASK & curprim._val) || primtype[prim->prim] != primtype[curprim.prim]) - return nCount > 0; - - return false; - } - - void SetCurrentPrim() - { - curprim._val = prim->_val; - curprim.prim = prim->prim; - } - - void CheckFrame(int tbp); - - // context specific state - Point offset; - Rect2 scissor; - tex0Info tex0; - tex1Info tex1; - miptbpInfo miptbp0; - miptbpInfo miptbp1; - alphaInfo alpha; - fbaInfo fba; - clampInfo clamp; - pixTest test; - u32 ptexClamp[2]; // textures for x and y dir region clamping - - void FlushTexData(); - inline int CheckFrameAddConstraints(int tbp); - inline void CheckScissors(int maxpos); - inline void CheckFrame32bitRes(int maxpos); - inline int FindMinimalMemoryConstrain(int tbp, int maxpos); - inline int FindZbufferMemoryConstrain(int tbp, int maxpos); - inline int FindMinimalHeightConstrain(int maxpos); - - inline int CheckFrameResolveRender(int tbp); - inline void CheckFrame16vs32Conversion(); - inline int CheckFrameResolveDepth(int tbp); - - inline void FlushTexUnchangedClutDontUpdate() ; - inline void FlushTexClutDontUpdate() ; - inline void FlushTexClutting() ; - inline void FlushTexSetNewVars(u32 psm) ; - - // Increase the size of pbuf - void IncreaseVertexBuffer() - { - assert(pBufferData != NULL); - nNumVertices *= 2; - VertexGPU* ptemp = (VertexGPU*)_aligned_malloc(sizeof(VertexGPU) * nNumVertices, 256); - memcpy(ptemp, pBufferData, sizeof(VertexGPU) * nCount); - assert(nCount <= nNumVertices); - _aligned_free(pBufferData); - pBufferData = ptemp; - } - - void Init(int nVerts) - { - if (pBufferData == NULL && nVerts > 0) - { - pBufferData = (VertexGPU*)_aligned_malloc(sizeof(VertexGPU) * nVerts, 256); - nNumVertices = nVerts; - } - - nCount = 0; - } - - u8 bNeedFrameCheck; - u8 bNeedZCheck; - u8 bNeedTexCheck; - u8 dummy0; - - union - { - struct - { - u8 bTexConstsSync; // only pixel shader constants that context owns - u8 bVarsTexSync; // texture info - u8 bVarsSetTarg; - u8 dummy1; - }; - - u32 bSyncVars; - }; - - int ictx; - VertexGPU* pBufferData; // current allocated data - - int nNumVertices; // size of pBufferData in terms of VertexGPU objects - int nCount; - primInfo curprim; // the previous prim the current buffers are set to - - zbufInfo zbuf; - frameInfo gsfb; // the real info set by FRAME cmd - frameInfo frame; - int zprimmask; // zmask for incoming points - - union - { - u32 uCurTex0Data[2]; // current tex0 data - GIFRegTEX0 uCurTex0; - }; - u32 uNextTex0Data[2]; // tex0 data that has to be applied if bNeedTexCheck is 1 - - //int nFrameHeights[8]; // frame heights for the past frame changes - int nNextFrameHeight; - - CMemoryTarget* pmemtarg; // the current mem target set - CRenderTarget* prndr; - CDepthTarget* pdepth; - -}; - -// VB variables -extern VB vb[2]; - -#endif // ZZOGLVB_H_INCLUDED diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/CMakeLists.txt b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/CMakeLists.txt deleted file mode 100644 index 4093c51444..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/CMakeLists.txt +++ /dev/null @@ -1,61 +0,0 @@ -# Check that people use the good file -if(NOT TOP_CMAKE_WAS_SOURCED) - message(FATAL_ERROR " - You did not 'cmake' the good CMakeLists.txt file. Use the one in the top dir. - It is advice to delete all wrongly generated cmake stuff => CMakeFiles & CMakeCache.txt") -endif(NOT TOP_CMAKE_WAS_SOURCED) - - -# plugin name -set(Output zzogl-cg-shader) - -set(CommonFlags - -pthread - -DZEROGS_SSE2 - -fno-strict-aliasing - -Wstrict-aliasing # Allow to track strict aliasing issue. - -Wunused-variable - -DNVIDIA_CG_API - ) - -set(OptimizationFlags - -O2 - -DNDEBUG - ) - -# Debug - Build -if(CMAKE_BUILD_TYPE STREQUAL Debug) - # add defines - set(zerogsshadersFinalFlags - ${CommonFlags} -g -Wall -D_DEBUG - ) -endif(CMAKE_BUILD_TYPE STREQUAL Debug) - -# Devel - Build -if(CMAKE_BUILD_TYPE STREQUAL Devel) - # add defines - set(zerogsshadersFinalFlags - ${CommonFlags} ${OptimizationFlags} -g -W -DZEROGS_DEVBUILD - ) -endif(CMAKE_BUILD_TYPE STREQUAL Devel) - -# Release - Build -if(CMAKE_BUILD_TYPE STREQUAL Release) - # add defines - set(zerogsshadersFinalFlags - ${CommonFlags} ${OptimizationFlags} -W - ) -endif(CMAKE_BUILD_TYPE STREQUAL Release) - -set(zerogsshadersFinalSources - zerogsshaders.cpp - zpipe.cpp -) - -set(zerogsshadersFinalLibs - ${ZLIB_LIBRARIES} - ${CG_LIBRARIES} - ${OPENGL_LIBRARIES} -) - -add_pcsx2_executable(${Output} "${zerogsshadersFinalSources}" "${zerogsshadersFinalLibs}" "${zerogsshadersFinalFlags}") diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/ZeroGSShaders_2005.sln b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/ZeroGSShaders_2005.sln deleted file mode 100644 index 45a5aa122b..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/ZeroGSShaders_2005.sln +++ /dev/null @@ -1,23 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 9.00 -# Visual Studio 2005 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ZeroGSShaders", "ZeroGSShaders_2005.vcproj", "{811D47CC-E5F0-456A-918E-5908005E8FC0}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release (to Public)|Win32 = Release (to Public)|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {811D47CC-E5F0-456A-918E-5908005E8FC0}.Debug|Win32.ActiveCfg = Debug|Win32 - {811D47CC-E5F0-456A-918E-5908005E8FC0}.Debug|Win32.Build.0 = Debug|Win32 - {811D47CC-E5F0-456A-918E-5908005E8FC0}.Release (to Public)|Win32.ActiveCfg = Release (to Public)|Win32 - {811D47CC-E5F0-456A-918E-5908005E8FC0}.Release (to Public)|Win32.Build.0 = Release (to Public)|Win32 - {811D47CC-E5F0-456A-918E-5908005E8FC0}.Release|Win32.ActiveCfg = Release|Win32 - {811D47CC-E5F0-456A-918E-5908005E8FC0}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/copytozerogs.bat b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/copytozerogs.bat deleted file mode 100644 index 32c9820600..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/copytozerogs.bat +++ /dev/null @@ -1 +0,0 @@ -copy .\Release\ZeroGSShaders.exe ..\ \ No newline at end of file diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zerogsshaders.cpp b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zerogsshaders.cpp deleted file mode 100644 index e9de686399..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zerogsshaders.cpp +++ /dev/null @@ -1,362 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#define _CRT_SECURE_NO_DEPRECATE - -// Builds all possible shader files from ps2hw.fx and stores them in -// a preprocessed database -#include -#include -#include -#include - -#ifdef _WIN32 -# include -#else -# include -#endif - -#include "zpipe.h" - -#include -#include - -#define SAFE_RELEASE(x) { if( (x) != NULL ) { (x)->Release(); x = NULL; } } - -#include -#include - -using namespace std; - -#include "zerogsshaders.h" - -char* srcfilename = "ps2hw.fx"; -char* dstfilename = "ps2hw.dat"; - -#ifndef ArraySize -#define ArraySize(x) (sizeof(x) / sizeof((x)[0])) -#endif - -struct SHADERINFO -{ - int type; - vector buf; -}; - -map mapShaders; -CGcontext g_cgcontext; - -void LoadShader(int index, const char* pshader, CGprofile prof, vector& vargs, int context) -{ - vector realargs; - realargs.reserve(16); - realargs.resize(vargs.size()); - if( vargs.size() > 0 ) - memcpy(&realargs[0], &vargs[0], realargs.size() * sizeof(realargs[0])); - realargs.push_back(context ? "-Ictx1" : "-Ictx0"); - realargs.push_back(NULL); - - CGprogram prog = cgCreateProgramFromFile(g_cgcontext, CG_SOURCE, srcfilename, prof, pshader, &realargs[0]); - if( !cgIsProgram(prog) ) { - printf("Failed to load shader %s: \n%s\n", pshader, cgGetLastListing(g_cgcontext)); - return; - } - - if( mapShaders.find(index) != mapShaders.end() ) { - printf("error: two shaders share the same index %d\n", index); - exit(0); - } - - if( !cgIsProgramCompiled(prog) ) - cgCompileProgram(prog); - - const char* pstr = cgGetProgramString(prog, CG_COMPILED_PROGRAM); - - const char* pprog = strstr(pstr, "#program"); - if( pprog == NULL ) { - printf("program field not found!\n"); - return; - } - pprog += 9; - const char* progend = strchr(pprog, '\r'); - if( progend == NULL ) progend = strchr(pprog, '\n'); - - if( progend == NULL ) { - printf("prog end not found!\n"); - return; - } - - const char* defname = "main"; - - SHADERINFO info; - info.type = 0; - info.buf.resize(strlen(pstr)+1); - - // change the program name to main - memset(&info.buf[0], 0, info.buf.size()); - memcpy(&info.buf[0], pstr, pprog-pstr); - memcpy(&info.buf[pprog-pstr], defname, 4); - memcpy(&info.buf[pprog-pstr+4], progend, strlen(pstr)-(progend-pstr)); - - if( mapShaders.find(index) != mapShaders.end() ) - printf("same shader\n"); - assert( mapShaders.find(index) == mapShaders.end() ); - mapShaders[index] = info; - - cgDestroyProgram(prog); -} - -int main(int argc, char** argv) -{ - printf("usage: [src] [dst] [opts]\n"); - - if( argc >= 2 ) srcfilename = argv[1]; - if( argc >= 3 ) dstfilename = argv[2]; - - FILE* fsrc = fopen(srcfilename, "r"); - if( fsrc == NULL ) { - printf("cannot open %s\n", srcfilename); - return 0; - } - fclose(fsrc); - - g_cgcontext = cgCreateContext(); - if( !cgIsContext(g_cgcontext) ) { - printf("failed to create cg context\n"); - return -1; - } - - CGprofile cgvProf = CG_PROFILE_ARBVP1; - CGprofile cgfProf = CG_PROFILE_ARBFP1; - if( !cgGLIsProfileSupported(cgvProf) != CG_TRUE ) { - printf("arbvp1 not supported\n"); - return 0; - } - if( !cgGLIsProfileSupported(cgfProf) != CG_TRUE ) { - printf("arbfp1 not supported\n"); - return 0; - } - - cgGLEnableProfile(cgvProf); - cgGLEnableProfile(cgfProf); - cgGLSetOptimalOptions(cgvProf); - cgGLSetOptimalOptions(cgfProf); - - vector vmacros; - - LoadShader(SH_BITBLTVS, "BitBltVS", cgvProf, vmacros, 0); - LoadShader(SH_BITBLTPS, "BitBltPS", cgfProf, vmacros, 0); - LoadShader(SH_BITBLTDEPTHPS, "BitBltDepthPS", cgfProf, vmacros, 0); - LoadShader(SH_BITBLTDEPTHMRTPS, "BitBltDepthMRTPS", cgfProf, vmacros, 0); - LoadShader(SH_CRTCTARGPS, "CRTCTargPS", cgfProf, vmacros, 0); - LoadShader(SH_CRTCPS, "CRTCPS", cgfProf, vmacros, 0); - LoadShader(SH_CRTC_NEARESTPS, "CRTCPS_Nearest", cgfProf, vmacros, 0); - LoadShader(SH_CRTC24PS, "CRTC24PS", cgfProf, vmacros, 0); - LoadShader(SH_ZEROPS, "ZeroPS", cgfProf, vmacros, 0); - LoadShader(SH_BASETEXTUREPS, "BaseTexturePS", cgfProf, vmacros, 0); - LoadShader(SH_BITBLTAAPS, "BitBltPS", cgfProf, vmacros, 0); - LoadShader(SH_CRTCTARGINTERPS, "CRTCTargInterPS", cgfProf, vmacros, 0); - LoadShader(SH_CRTCINTERPS, "CRTCInterPS", cgfProf, vmacros, 0); - LoadShader(SH_CRTCINTER_NEARESTPS, "CRTCInterPS_Nearest", cgfProf, vmacros, 0); - LoadShader(SH_CRTC24INTERPS, "CRTC24InterPS", cgfProf, vmacros, 0); - LoadShader(SH_CONVERT16TO32PS, "Convert16to32PS", cgfProf, vmacros, 0); - LoadShader(SH_CONVERT32TO16PS, "Convert32to16PS", cgfProf, vmacros, 0); - - const int vsshaders[4] = { SH_REGULARVS, SH_TEXTUREVS, SH_REGULARFOGVS, SH_TEXTUREFOGVS }; - const char* pvsshaders[4] = { "RegularVS", "TextureVS", "RegularFogVS", "TextureFogVS" }; - - // load the texture shaders - char str[255], strdir[255]; - - strcpy(strdir, srcfilename); - int i = (int)strlen(strdir); - while(i > 0) { - if( strdir[i-1] == '/' || strdir[i-1] == '\\' ) - break; - --i; - } - - strdir[i] = 0; - - for(i = 0; i < ArraySize(vsshaders); ++i) { - for(int writedepth = 0; writedepth < 2; ++writedepth ) { - - if( writedepth ) vmacros.push_back("-DWRITE_DEPTH"); - LoadShader(vsshaders[i]|(writedepth?SH_WRITEDEPTH:0), pvsshaders[i], cgvProf, vmacros, 0); - LoadShader(vsshaders[i]|(writedepth?SH_WRITEDEPTH:0)|SH_CONTEXT1, pvsshaders[i], cgvProf, vmacros, 1); - if( writedepth ) vmacros.pop_back(); - } - } - - const int psshaders[2] = { SH_REGULARPS, SH_REGULARFOGPS }; - const char* ppsshaders[2] = { "RegularPS", "RegularFogPS" }; - - for(i = 0; i < ArraySize(psshaders); ++i) { - for(int writedepth = 0; writedepth < 2; ++writedepth ) { - if( writedepth ) vmacros.push_back("-DWRITE_DEPTH"); - LoadShader(psshaders[i]|(writedepth?SH_WRITEDEPTH:0), ppsshaders[i], cgfProf, vmacros, 0); - if( writedepth ) vmacros.pop_back(); - } - } - - printf("creating shaders, note that ctx0/ps2hw_ctx.fx, and ctx1/ps2hw_ctx.fx are required\n"); - vmacros.resize(0); - - for(int texwrap = 0; texwrap < NUM_TEXWRAPS; ++texwrap ) { - - if( g_pPsTexWrap[texwrap] != NULL ) - vmacros.push_back(g_pPsTexWrap[texwrap]); - - for(int context = 0; context < 2; ++context) { - - for(int texfilter = 0; texfilter < NUM_FILTERS; ++texfilter) { - for(int fog = 0; fog < 2; ++fog ) { - for(int writedepth = 0; writedepth < 2; ++writedepth ) { - - if( writedepth ) - vmacros.push_back("-DWRITE_DEPTH"); - - for(int testaem = 0; testaem < 2; ++testaem ) { - - if( testaem ) - vmacros.push_back("-DTEST_AEM"); - - for(int exactcolor = 0; exactcolor < 2; ++exactcolor ) { - - if( exactcolor ) - vmacros.push_back("-DEXACT_COLOR"); - - // 32 - sprintf(str, "Texture%s%d_32PS", fog?"Fog":"", texfilter); - - vmacros.push_back("-DACCURATE_DECOMPRESSION"); - LoadShader(GET_SHADER_INDEX(0, texfilter, texwrap, fog, writedepth, testaem, exactcolor, context, SHADER_ACCURATE), str, cgfProf, vmacros, context); - vmacros.pop_back(); - - LoadShader(GET_SHADER_INDEX(0, texfilter, texwrap, fog, writedepth, testaem, exactcolor, context, 0), str, cgfProf, vmacros, context); - - if( texfilter == 0 ) { - // tex32 - sprintf(str, "Texture%s%d_tex32PS", fog?"Fog":"", texfilter); - -// vmacros.push_back("-DACCURATE_DECOMPRESSION"); -// LoadShader(GET_SHADER_INDEX(1, texfilter, texwrap, fog, writedepth, testaem, exactcolor, context, SHADER_ACCURATE), str, cgfProf, vmacros, context); -// vmacros.pop_back(); - - LoadShader(GET_SHADER_INDEX(1, texfilter, texwrap, fog, writedepth, testaem, exactcolor, context, 0), str, cgfProf, vmacros, context); - - // clut32 - sprintf(str, "Texture%s%d_clut32PS", fog?"Fog":"", texfilter); - -// vmacros.push_back("-DACCURATE_DECOMPRESSION"); -// LoadShader(GET_SHADER_INDEX(2, texfilter, texwrap, fog, writedepth, testaem, exactcolor, context, SHADER_ACCURATE), str, cgfProf, vmacros, context); -// vmacros.pop_back(); - - LoadShader(GET_SHADER_INDEX(2, texfilter, texwrap, fog, writedepth, testaem, exactcolor, context, 0), str, cgfProf, vmacros, context); - - // tex32to16 - sprintf(str, "Texture%s%d_tex32to16PS", fog?"Fog":"", texfilter); - -// vmacros.push_back("-DACCURATE_DECOMPRESSION"); -// LoadShader(GET_SHADER_INDEX(3, texfilter, texwrap, fog, writedepth, testaem, exactcolor, context, SHADER_ACCURATE), str, cgfProf, vmacros, context); -// vmacros.pop_back(); - - LoadShader(GET_SHADER_INDEX(3, texfilter, texwrap, fog, writedepth, testaem, exactcolor, context, 0), str, cgfProf, vmacros, context); - - // tex16to8h - sprintf(str, "Texture%s%d_tex16to8hPS", fog?"Fog":"", texfilter); - -// vmacros.push_back("-DACCURATE_DECOMPRESSION"); -// LoadShader(GET_SHADER_INDEX(4, texfilter, texwrap, fog, writedepth, testaem, exactcolor, context, SHADER_ACCURATE), str, cgfProf, vmacros, context); -// vmacros.pop_back(); - - LoadShader(GET_SHADER_INDEX(4, texfilter, texwrap, fog, writedepth, testaem, exactcolor, context, 0), str, cgfProf, vmacros, context); - } - - if( exactcolor ) - vmacros.pop_back(); - } - - if( testaem ) - vmacros.pop_back(); - } - - if( writedepth ) - vmacros.pop_back(); - } - } - } - } - - if( g_pPsTexWrap[texwrap] != NULL ) - vmacros.pop_back(); - } - - if( vmacros.size() != 0 ) - printf("error with macros!\n"); - - // create the database - - int num = (int)mapShaders.size(); - - // first compress - vector buffer; - buffer.reserve(10000000); // 10mb - buffer.resize(sizeof(SHADERHEADER)*num); - - i = 0; - for(map::iterator it = mapShaders.begin(); it != mapShaders.end(); ++it, ++i) { - SHADERHEADER h; - h.index = it->first | it->second.type; - h.offset = (int)buffer.size(); - h.size = (int)it->second.buf.size(); - - memcpy(&buffer[0] + i*sizeof(SHADERHEADER), &h, sizeof(SHADERHEADER)); - - size_t cur = buffer.size(); - buffer.resize(cur + it->second.buf.size()); - memcpy(&buffer[cur], &it->second.buf[0], it->second.buf.size()); - } - - int compressed_size; - int real_size = (int)buffer.size(); - vector dst; - dst.resize(buffer.size()); - def(&buffer[0], &dst[0], (int)buffer.size(), &compressed_size); - - // write to file - // fmt: num shaders, size of compressed, compressed data - FILE* fdst = fopen(dstfilename, "wb"); - if( fdst == NULL ) { - printf("failed to open %s\n", dstfilename); - return 0; - } - - fwrite(&num, 4, 1, fdst); - fwrite(&compressed_size, 4, 1, fdst); - fwrite(&real_size, 4, 1, fdst); - fwrite(&dst[0], compressed_size, 1, fdst); - - fclose(fdst); - - printf("wrote %s\n", dstfilename); - - cgDestroyContext(g_cgcontext); - - return 0; -} diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zerogsshaders.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zerogsshaders.h deleted file mode 100644 index 388bd1c7ab..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zerogsshaders.h +++ /dev/null @@ -1,120 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __ZEROGS_SHADERS_H__ -#define __ZEROGS_SHADERS_H__ - -#include -#include -#include "PS2Edefs.h" - -#include -#include - -#define ZZshProgram CGprogram -#define ZZshContext CGcontext - -using namespace std; - -#define NUM_FILTERS 2 // texture filtering -#define NUM_TYPES 5 // types of texture read modes -#define NUM_TEXWRAPS 4 // texture wrapping - -#define SHADER_REDUCED 1 // equivalent to ps2.0 -#define SHADER_ACCURATE 2 // for older cards with less accurate math (ps2.x+) - -#define NUM_SHADERS (NUM_FILTERS*NUM_TYPES*NUM_TEXWRAPS*32) // # shaders for a given ps - -const static char* g_pPsTexWrap[] = { "-DREPEAT", "-DCLAMP", "-DREGION_REPEAT", NULL }; -const static char* g_pTexTypes[] = { "32", "tex32", "clut32", "tex32to16", "tex16to8h" }; - -#define TEXWRAP_REPEAT 0 -#define TEXWRAP_CLAMP 1 -#define TEXWRAP_REGION_REPEAT 2 -#define TEXWRAP_REPEAT_CLAMP 3 - -static __forceinline int GET_SHADER_INDEX(int type, int texfilter, int texwrap, int fog, int writedepth, int testaem, int exactcolor, int context, int ps) -{ - return type + texfilter*NUM_TYPES + NUM_FILTERS*NUM_TYPES*texwrap + NUM_TEXWRAPS*NUM_FILTERS*NUM_TYPES*(fog+2*writedepth+4*testaem+8*exactcolor+16*context+32*ps); -} - -extern ZZshContext g_cgcontext; - -static __forceinline CGprogram LoadShaderFromType(const char* srcdir, const char* srcfile, int type, int texfilter, int texwrap, int fog, int writedepth, int testaem, int exactcolor, int ps, int context) -{ - assert( texwrap < NUM_TEXWRAPS); - assert( type < NUM_TYPES ); - - char str[255], strctx[255]; - sprintf(str, "Texture%s%d_%sPS", fog?"Fog":"", texfilter, g_pTexTypes[type]); - sprintf(strctx, "-I%s%s", srcdir, context?"ctx1":"ctx0"); - - vector macros; - macros.push_back(strctx); -#ifdef _DEBUG - macros.push_back("-bestprecision"); -#endif - if( g_pPsTexWrap[texwrap] != NULL ) macros.push_back(g_pPsTexWrap[texwrap]); - if( writedepth ) macros.push_back("-DWRITE_DEPTH"); - if( testaem ) macros.push_back("-DTEST_AEM"); - if( exactcolor ) macros.push_back("-DEXACT_COLOR"); - if( ps & SHADER_ACCURATE ) macros.push_back("-DACCURATE_DECOMPRESSION"); - macros.push_back(NULL); - - ZZshProgram prog = cgCreateProgramFromFile(g_cgcontext, CG_SOURCE, srcfile, CG_PROFILE_ARBFP1, str, ¯os[0]); - if( !cgIsProgram(prog) ) { - printf("Failed to load shader %s: \n%s\n", str, cgGetLastListing(g_cgcontext)); - return NULL; - } - - return prog; -} - -struct SHADERHEADER -{ - unsigned int index, offset, size; // if highest bit of index is set, pixel shader -}; - -#define SH_WRITEDEPTH 0x2000 // depth is written -#define SH_CONTEXT1 0x1000 // context1 is used - -#define SH_REGULARVS 0x8000 -#define SH_TEXTUREVS 0x8001 -#define SH_REGULARFOGVS 0x8002 -#define SH_TEXTUREFOGVS 0x8003 -#define SH_REGULARPS 0x8004 -#define SH_REGULARFOGPS 0x8005 -#define SH_BITBLTVS 0x8006 -#define SH_BITBLTPS 0x8007 -#define SH_BITBLTDEPTHPS 0x8009 -#define SH_CRTCTARGPS 0x800a -#define SH_CRTCPS 0x800b -#define SH_CRTC24PS 0x800c -#define SH_ZEROPS 0x800e -#define SH_BASETEXTUREPS 0x800f -#define SH_BITBLTAAPS 0x8010 -#define SH_CRTCTARGINTERPS 0x8012 -#define SH_CRTCINTERPS 0x8013 -#define SH_CRTC24INTERPS 0x8014 -#define SH_BITBLTDEPTHMRTPS 0x8016 -#define SH_CONVERT16TO32PS 0x8020 -#define SH_CONVERT32TO16PS 0x8021 -#define SH_CRTC_NEARESTPS 0x8022 -#define SH_CRTCINTER_NEARESTPS 0x8023 - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/crc32.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/crc32.h deleted file mode 100644 index 8053b6117c..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/crc32.h +++ /dev/null @@ -1,441 +0,0 @@ -/* crc32.h -- tables for rapid CRC calculation - * Generated automatically by crc32.c - */ - -local const unsigned long FAR crc_table[TBLS][256] = -{ - { - 0x00000000UL, 0x77073096UL, 0xee0e612cUL, 0x990951baUL, 0x076dc419UL, - 0x706af48fUL, 0xe963a535UL, 0x9e6495a3UL, 0x0edb8832UL, 0x79dcb8a4UL, - 0xe0d5e91eUL, 0x97d2d988UL, 0x09b64c2bUL, 0x7eb17cbdUL, 0xe7b82d07UL, - 0x90bf1d91UL, 0x1db71064UL, 0x6ab020f2UL, 0xf3b97148UL, 0x84be41deUL, - 0x1adad47dUL, 0x6ddde4ebUL, 0xf4d4b551UL, 0x83d385c7UL, 0x136c9856UL, - 0x646ba8c0UL, 0xfd62f97aUL, 0x8a65c9ecUL, 0x14015c4fUL, 0x63066cd9UL, - 0xfa0f3d63UL, 0x8d080df5UL, 0x3b6e20c8UL, 0x4c69105eUL, 0xd56041e4UL, - 0xa2677172UL, 0x3c03e4d1UL, 0x4b04d447UL, 0xd20d85fdUL, 0xa50ab56bUL, - 0x35b5a8faUL, 0x42b2986cUL, 0xdbbbc9d6UL, 0xacbcf940UL, 0x32d86ce3UL, - 0x45df5c75UL, 0xdcd60dcfUL, 0xabd13d59UL, 0x26d930acUL, 0x51de003aUL, - 0xc8d75180UL, 0xbfd06116UL, 0x21b4f4b5UL, 0x56b3c423UL, 0xcfba9599UL, - 0xb8bda50fUL, 0x2802b89eUL, 0x5f058808UL, 0xc60cd9b2UL, 0xb10be924UL, - 0x2f6f7c87UL, 0x58684c11UL, 0xc1611dabUL, 0xb6662d3dUL, 0x76dc4190UL, - 0x01db7106UL, 0x98d220bcUL, 0xefd5102aUL, 0x71b18589UL, 0x06b6b51fUL, - 0x9fbfe4a5UL, 0xe8b8d433UL, 0x7807c9a2UL, 0x0f00f934UL, 0x9609a88eUL, - 0xe10e9818UL, 0x7f6a0dbbUL, 0x086d3d2dUL, 0x91646c97UL, 0xe6635c01UL, - 0x6b6b51f4UL, 0x1c6c6162UL, 0x856530d8UL, 0xf262004eUL, 0x6c0695edUL, - 0x1b01a57bUL, 0x8208f4c1UL, 0xf50fc457UL, 0x65b0d9c6UL, 0x12b7e950UL, - 0x8bbeb8eaUL, 0xfcb9887cUL, 0x62dd1ddfUL, 0x15da2d49UL, 0x8cd37cf3UL, - 0xfbd44c65UL, 0x4db26158UL, 0x3ab551ceUL, 0xa3bc0074UL, 0xd4bb30e2UL, - 0x4adfa541UL, 0x3dd895d7UL, 0xa4d1c46dUL, 0xd3d6f4fbUL, 0x4369e96aUL, - 0x346ed9fcUL, 0xad678846UL, 0xda60b8d0UL, 0x44042d73UL, 0x33031de5UL, - 0xaa0a4c5fUL, 0xdd0d7cc9UL, 0x5005713cUL, 0x270241aaUL, 0xbe0b1010UL, - 0xc90c2086UL, 0x5768b525UL, 0x206f85b3UL, 0xb966d409UL, 0xce61e49fUL, - 0x5edef90eUL, 0x29d9c998UL, 0xb0d09822UL, 0xc7d7a8b4UL, 0x59b33d17UL, - 0x2eb40d81UL, 0xb7bd5c3bUL, 0xc0ba6cadUL, 0xedb88320UL, 0x9abfb3b6UL, - 0x03b6e20cUL, 0x74b1d29aUL, 0xead54739UL, 0x9dd277afUL, 0x04db2615UL, - 0x73dc1683UL, 0xe3630b12UL, 0x94643b84UL, 0x0d6d6a3eUL, 0x7a6a5aa8UL, - 0xe40ecf0bUL, 0x9309ff9dUL, 0x0a00ae27UL, 0x7d079eb1UL, 0xf00f9344UL, - 0x8708a3d2UL, 0x1e01f268UL, 0x6906c2feUL, 0xf762575dUL, 0x806567cbUL, - 0x196c3671UL, 0x6e6b06e7UL, 0xfed41b76UL, 0x89d32be0UL, 0x10da7a5aUL, - 0x67dd4accUL, 0xf9b9df6fUL, 0x8ebeeff9UL, 0x17b7be43UL, 0x60b08ed5UL, - 0xd6d6a3e8UL, 0xa1d1937eUL, 0x38d8c2c4UL, 0x4fdff252UL, 0xd1bb67f1UL, - 0xa6bc5767UL, 0x3fb506ddUL, 0x48b2364bUL, 0xd80d2bdaUL, 0xaf0a1b4cUL, - 0x36034af6UL, 0x41047a60UL, 0xdf60efc3UL, 0xa867df55UL, 0x316e8eefUL, - 0x4669be79UL, 0xcb61b38cUL, 0xbc66831aUL, 0x256fd2a0UL, 0x5268e236UL, - 0xcc0c7795UL, 0xbb0b4703UL, 0x220216b9UL, 0x5505262fUL, 0xc5ba3bbeUL, - 0xb2bd0b28UL, 0x2bb45a92UL, 0x5cb36a04UL, 0xc2d7ffa7UL, 0xb5d0cf31UL, - 0x2cd99e8bUL, 0x5bdeae1dUL, 0x9b64c2b0UL, 0xec63f226UL, 0x756aa39cUL, - 0x026d930aUL, 0x9c0906a9UL, 0xeb0e363fUL, 0x72076785UL, 0x05005713UL, - 0x95bf4a82UL, 0xe2b87a14UL, 0x7bb12baeUL, 0x0cb61b38UL, 0x92d28e9bUL, - 0xe5d5be0dUL, 0x7cdcefb7UL, 0x0bdbdf21UL, 0x86d3d2d4UL, 0xf1d4e242UL, - 0x68ddb3f8UL, 0x1fda836eUL, 0x81be16cdUL, 0xf6b9265bUL, 0x6fb077e1UL, - 0x18b74777UL, 0x88085ae6UL, 0xff0f6a70UL, 0x66063bcaUL, 0x11010b5cUL, - 0x8f659effUL, 0xf862ae69UL, 0x616bffd3UL, 0x166ccf45UL, 0xa00ae278UL, - 0xd70dd2eeUL, 0x4e048354UL, 0x3903b3c2UL, 0xa7672661UL, 0xd06016f7UL, - 0x4969474dUL, 0x3e6e77dbUL, 0xaed16a4aUL, 0xd9d65adcUL, 0x40df0b66UL, - 0x37d83bf0UL, 0xa9bcae53UL, 0xdebb9ec5UL, 0x47b2cf7fUL, 0x30b5ffe9UL, - 0xbdbdf21cUL, 0xcabac28aUL, 0x53b39330UL, 0x24b4a3a6UL, 0xbad03605UL, - 0xcdd70693UL, 0x54de5729UL, 0x23d967bfUL, 0xb3667a2eUL, 0xc4614ab8UL, - 0x5d681b02UL, 0x2a6f2b94UL, 0xb40bbe37UL, 0xc30c8ea1UL, 0x5a05df1bUL, - 0x2d02ef8dUL -#ifdef BYFOUR - }, - { - 0x00000000UL, 0x191b3141UL, 0x32366282UL, 0x2b2d53c3UL, 0x646cc504UL, - 0x7d77f445UL, 0x565aa786UL, 0x4f4196c7UL, 0xc8d98a08UL, 0xd1c2bb49UL, - 0xfaefe88aUL, 0xe3f4d9cbUL, 0xacb54f0cUL, 0xb5ae7e4dUL, 0x9e832d8eUL, - 0x87981ccfUL, 0x4ac21251UL, 0x53d92310UL, 0x78f470d3UL, 0x61ef4192UL, - 0x2eaed755UL, 0x37b5e614UL, 0x1c98b5d7UL, 0x05838496UL, 0x821b9859UL, - 0x9b00a918UL, 0xb02dfadbUL, 0xa936cb9aUL, 0xe6775d5dUL, 0xff6c6c1cUL, - 0xd4413fdfUL, 0xcd5a0e9eUL, 0x958424a2UL, 0x8c9f15e3UL, 0xa7b24620UL, - 0xbea97761UL, 0xf1e8e1a6UL, 0xe8f3d0e7UL, 0xc3de8324UL, 0xdac5b265UL, - 0x5d5daeaaUL, 0x44469febUL, 0x6f6bcc28UL, 0x7670fd69UL, 0x39316baeUL, - 0x202a5aefUL, 0x0b07092cUL, 0x121c386dUL, 0xdf4636f3UL, 0xc65d07b2UL, - 0xed705471UL, 0xf46b6530UL, 0xbb2af3f7UL, 0xa231c2b6UL, 0x891c9175UL, - 0x9007a034UL, 0x179fbcfbUL, 0x0e848dbaUL, 0x25a9de79UL, 0x3cb2ef38UL, - 0x73f379ffUL, 0x6ae848beUL, 0x41c51b7dUL, 0x58de2a3cUL, 0xf0794f05UL, - 0xe9627e44UL, 0xc24f2d87UL, 0xdb541cc6UL, 0x94158a01UL, 0x8d0ebb40UL, - 0xa623e883UL, 0xbf38d9c2UL, 0x38a0c50dUL, 0x21bbf44cUL, 0x0a96a78fUL, - 0x138d96ceUL, 0x5ccc0009UL, 0x45d73148UL, 0x6efa628bUL, 0x77e153caUL, - 0xbabb5d54UL, 0xa3a06c15UL, 0x888d3fd6UL, 0x91960e97UL, 0xded79850UL, - 0xc7cca911UL, 0xece1fad2UL, 0xf5facb93UL, 0x7262d75cUL, 0x6b79e61dUL, - 0x4054b5deUL, 0x594f849fUL, 0x160e1258UL, 0x0f152319UL, 0x243870daUL, - 0x3d23419bUL, 0x65fd6ba7UL, 0x7ce65ae6UL, 0x57cb0925UL, 0x4ed03864UL, - 0x0191aea3UL, 0x188a9fe2UL, 0x33a7cc21UL, 0x2abcfd60UL, 0xad24e1afUL, - 0xb43fd0eeUL, 0x9f12832dUL, 0x8609b26cUL, 0xc94824abUL, 0xd05315eaUL, - 0xfb7e4629UL, 0xe2657768UL, 0x2f3f79f6UL, 0x362448b7UL, 0x1d091b74UL, - 0x04122a35UL, 0x4b53bcf2UL, 0x52488db3UL, 0x7965de70UL, 0x607eef31UL, - 0xe7e6f3feUL, 0xfefdc2bfUL, 0xd5d0917cUL, 0xcccba03dUL, 0x838a36faUL, - 0x9a9107bbUL, 0xb1bc5478UL, 0xa8a76539UL, 0x3b83984bUL, 0x2298a90aUL, - 0x09b5fac9UL, 0x10aecb88UL, 0x5fef5d4fUL, 0x46f46c0eUL, 0x6dd93fcdUL, - 0x74c20e8cUL, 0xf35a1243UL, 0xea412302UL, 0xc16c70c1UL, 0xd8774180UL, - 0x9736d747UL, 0x8e2de606UL, 0xa500b5c5UL, 0xbc1b8484UL, 0x71418a1aUL, - 0x685abb5bUL, 0x4377e898UL, 0x5a6cd9d9UL, 0x152d4f1eUL, 0x0c367e5fUL, - 0x271b2d9cUL, 0x3e001cddUL, 0xb9980012UL, 0xa0833153UL, 0x8bae6290UL, - 0x92b553d1UL, 0xddf4c516UL, 0xc4eff457UL, 0xefc2a794UL, 0xf6d996d5UL, - 0xae07bce9UL, 0xb71c8da8UL, 0x9c31de6bUL, 0x852aef2aUL, 0xca6b79edUL, - 0xd37048acUL, 0xf85d1b6fUL, 0xe1462a2eUL, 0x66de36e1UL, 0x7fc507a0UL, - 0x54e85463UL, 0x4df36522UL, 0x02b2f3e5UL, 0x1ba9c2a4UL, 0x30849167UL, - 0x299fa026UL, 0xe4c5aeb8UL, 0xfdde9ff9UL, 0xd6f3cc3aUL, 0xcfe8fd7bUL, - 0x80a96bbcUL, 0x99b25afdUL, 0xb29f093eUL, 0xab84387fUL, 0x2c1c24b0UL, - 0x350715f1UL, 0x1e2a4632UL, 0x07317773UL, 0x4870e1b4UL, 0x516bd0f5UL, - 0x7a468336UL, 0x635db277UL, 0xcbfad74eUL, 0xd2e1e60fUL, 0xf9ccb5ccUL, - 0xe0d7848dUL, 0xaf96124aUL, 0xb68d230bUL, 0x9da070c8UL, 0x84bb4189UL, - 0x03235d46UL, 0x1a386c07UL, 0x31153fc4UL, 0x280e0e85UL, 0x674f9842UL, - 0x7e54a903UL, 0x5579fac0UL, 0x4c62cb81UL, 0x8138c51fUL, 0x9823f45eUL, - 0xb30ea79dUL, 0xaa1596dcUL, 0xe554001bUL, 0xfc4f315aUL, 0xd7626299UL, - 0xce7953d8UL, 0x49e14f17UL, 0x50fa7e56UL, 0x7bd72d95UL, 0x62cc1cd4UL, - 0x2d8d8a13UL, 0x3496bb52UL, 0x1fbbe891UL, 0x06a0d9d0UL, 0x5e7ef3ecUL, - 0x4765c2adUL, 0x6c48916eUL, 0x7553a02fUL, 0x3a1236e8UL, 0x230907a9UL, - 0x0824546aUL, 0x113f652bUL, 0x96a779e4UL, 0x8fbc48a5UL, 0xa4911b66UL, - 0xbd8a2a27UL, 0xf2cbbce0UL, 0xebd08da1UL, 0xc0fdde62UL, 0xd9e6ef23UL, - 0x14bce1bdUL, 0x0da7d0fcUL, 0x268a833fUL, 0x3f91b27eUL, 0x70d024b9UL, - 0x69cb15f8UL, 0x42e6463bUL, 0x5bfd777aUL, 0xdc656bb5UL, 0xc57e5af4UL, - 0xee530937UL, 0xf7483876UL, 0xb809aeb1UL, 0xa1129ff0UL, 0x8a3fcc33UL, - 0x9324fd72UL - }, - { - 0x00000000UL, 0x01c26a37UL, 0x0384d46eUL, 0x0246be59UL, 0x0709a8dcUL, - 0x06cbc2ebUL, 0x048d7cb2UL, 0x054f1685UL, 0x0e1351b8UL, 0x0fd13b8fUL, - 0x0d9785d6UL, 0x0c55efe1UL, 0x091af964UL, 0x08d89353UL, 0x0a9e2d0aUL, - 0x0b5c473dUL, 0x1c26a370UL, 0x1de4c947UL, 0x1fa2771eUL, 0x1e601d29UL, - 0x1b2f0bacUL, 0x1aed619bUL, 0x18abdfc2UL, 0x1969b5f5UL, 0x1235f2c8UL, - 0x13f798ffUL, 0x11b126a6UL, 0x10734c91UL, 0x153c5a14UL, 0x14fe3023UL, - 0x16b88e7aUL, 0x177ae44dUL, 0x384d46e0UL, 0x398f2cd7UL, 0x3bc9928eUL, - 0x3a0bf8b9UL, 0x3f44ee3cUL, 0x3e86840bUL, 0x3cc03a52UL, 0x3d025065UL, - 0x365e1758UL, 0x379c7d6fUL, 0x35dac336UL, 0x3418a901UL, 0x3157bf84UL, - 0x3095d5b3UL, 0x32d36beaUL, 0x331101ddUL, 0x246be590UL, 0x25a98fa7UL, - 0x27ef31feUL, 0x262d5bc9UL, 0x23624d4cUL, 0x22a0277bUL, 0x20e69922UL, - 0x2124f315UL, 0x2a78b428UL, 0x2bbade1fUL, 0x29fc6046UL, 0x283e0a71UL, - 0x2d711cf4UL, 0x2cb376c3UL, 0x2ef5c89aUL, 0x2f37a2adUL, 0x709a8dc0UL, - 0x7158e7f7UL, 0x731e59aeUL, 0x72dc3399UL, 0x7793251cUL, 0x76514f2bUL, - 0x7417f172UL, 0x75d59b45UL, 0x7e89dc78UL, 0x7f4bb64fUL, 0x7d0d0816UL, - 0x7ccf6221UL, 0x798074a4UL, 0x78421e93UL, 0x7a04a0caUL, 0x7bc6cafdUL, - 0x6cbc2eb0UL, 0x6d7e4487UL, 0x6f38fadeUL, 0x6efa90e9UL, 0x6bb5866cUL, - 0x6a77ec5bUL, 0x68315202UL, 0x69f33835UL, 0x62af7f08UL, 0x636d153fUL, - 0x612bab66UL, 0x60e9c151UL, 0x65a6d7d4UL, 0x6464bde3UL, 0x662203baUL, - 0x67e0698dUL, 0x48d7cb20UL, 0x4915a117UL, 0x4b531f4eUL, 0x4a917579UL, - 0x4fde63fcUL, 0x4e1c09cbUL, 0x4c5ab792UL, 0x4d98dda5UL, 0x46c49a98UL, - 0x4706f0afUL, 0x45404ef6UL, 0x448224c1UL, 0x41cd3244UL, 0x400f5873UL, - 0x4249e62aUL, 0x438b8c1dUL, 0x54f16850UL, 0x55330267UL, 0x5775bc3eUL, - 0x56b7d609UL, 0x53f8c08cUL, 0x523aaabbUL, 0x507c14e2UL, 0x51be7ed5UL, - 0x5ae239e8UL, 0x5b2053dfUL, 0x5966ed86UL, 0x58a487b1UL, 0x5deb9134UL, - 0x5c29fb03UL, 0x5e6f455aUL, 0x5fad2f6dUL, 0xe1351b80UL, 0xe0f771b7UL, - 0xe2b1cfeeUL, 0xe373a5d9UL, 0xe63cb35cUL, 0xe7fed96bUL, 0xe5b86732UL, - 0xe47a0d05UL, 0xef264a38UL, 0xeee4200fUL, 0xeca29e56UL, 0xed60f461UL, - 0xe82fe2e4UL, 0xe9ed88d3UL, 0xebab368aUL, 0xea695cbdUL, 0xfd13b8f0UL, - 0xfcd1d2c7UL, 0xfe976c9eUL, 0xff5506a9UL, 0xfa1a102cUL, 0xfbd87a1bUL, - 0xf99ec442UL, 0xf85cae75UL, 0xf300e948UL, 0xf2c2837fUL, 0xf0843d26UL, - 0xf1465711UL, 0xf4094194UL, 0xf5cb2ba3UL, 0xf78d95faUL, 0xf64fffcdUL, - 0xd9785d60UL, 0xd8ba3757UL, 0xdafc890eUL, 0xdb3ee339UL, 0xde71f5bcUL, - 0xdfb39f8bUL, 0xddf521d2UL, 0xdc374be5UL, 0xd76b0cd8UL, 0xd6a966efUL, - 0xd4efd8b6UL, 0xd52db281UL, 0xd062a404UL, 0xd1a0ce33UL, 0xd3e6706aUL, - 0xd2241a5dUL, 0xc55efe10UL, 0xc49c9427UL, 0xc6da2a7eUL, 0xc7184049UL, - 0xc25756ccUL, 0xc3953cfbUL, 0xc1d382a2UL, 0xc011e895UL, 0xcb4dafa8UL, - 0xca8fc59fUL, 0xc8c97bc6UL, 0xc90b11f1UL, 0xcc440774UL, 0xcd866d43UL, - 0xcfc0d31aUL, 0xce02b92dUL, 0x91af9640UL, 0x906dfc77UL, 0x922b422eUL, - 0x93e92819UL, 0x96a63e9cUL, 0x976454abUL, 0x9522eaf2UL, 0x94e080c5UL, - 0x9fbcc7f8UL, 0x9e7eadcfUL, 0x9c381396UL, 0x9dfa79a1UL, 0x98b56f24UL, - 0x99770513UL, 0x9b31bb4aUL, 0x9af3d17dUL, 0x8d893530UL, 0x8c4b5f07UL, - 0x8e0de15eUL, 0x8fcf8b69UL, 0x8a809decUL, 0x8b42f7dbUL, 0x89044982UL, - 0x88c623b5UL, 0x839a6488UL, 0x82580ebfUL, 0x801eb0e6UL, 0x81dcdad1UL, - 0x8493cc54UL, 0x8551a663UL, 0x8717183aUL, 0x86d5720dUL, 0xa9e2d0a0UL, - 0xa820ba97UL, 0xaa6604ceUL, 0xaba46ef9UL, 0xaeeb787cUL, 0xaf29124bUL, - 0xad6fac12UL, 0xacadc625UL, 0xa7f18118UL, 0xa633eb2fUL, 0xa4755576UL, - 0xa5b73f41UL, 0xa0f829c4UL, 0xa13a43f3UL, 0xa37cfdaaUL, 0xa2be979dUL, - 0xb5c473d0UL, 0xb40619e7UL, 0xb640a7beUL, 0xb782cd89UL, 0xb2cddb0cUL, - 0xb30fb13bUL, 0xb1490f62UL, 0xb08b6555UL, 0xbbd72268UL, 0xba15485fUL, - 0xb853f606UL, 0xb9919c31UL, 0xbcde8ab4UL, 0xbd1ce083UL, 0xbf5a5edaUL, - 0xbe9834edUL - }, - { - 0x00000000UL, 0xb8bc6765UL, 0xaa09c88bUL, 0x12b5afeeUL, 0x8f629757UL, - 0x37def032UL, 0x256b5fdcUL, 0x9dd738b9UL, 0xc5b428efUL, 0x7d084f8aUL, - 0x6fbde064UL, 0xd7018701UL, 0x4ad6bfb8UL, 0xf26ad8ddUL, 0xe0df7733UL, - 0x58631056UL, 0x5019579fUL, 0xe8a530faUL, 0xfa109f14UL, 0x42acf871UL, - 0xdf7bc0c8UL, 0x67c7a7adUL, 0x75720843UL, 0xcdce6f26UL, 0x95ad7f70UL, - 0x2d111815UL, 0x3fa4b7fbUL, 0x8718d09eUL, 0x1acfe827UL, 0xa2738f42UL, - 0xb0c620acUL, 0x087a47c9UL, 0xa032af3eUL, 0x188ec85bUL, 0x0a3b67b5UL, - 0xb28700d0UL, 0x2f503869UL, 0x97ec5f0cUL, 0x8559f0e2UL, 0x3de59787UL, - 0x658687d1UL, 0xdd3ae0b4UL, 0xcf8f4f5aUL, 0x7733283fUL, 0xeae41086UL, - 0x525877e3UL, 0x40edd80dUL, 0xf851bf68UL, 0xf02bf8a1UL, 0x48979fc4UL, - 0x5a22302aUL, 0xe29e574fUL, 0x7f496ff6UL, 0xc7f50893UL, 0xd540a77dUL, - 0x6dfcc018UL, 0x359fd04eUL, 0x8d23b72bUL, 0x9f9618c5UL, 0x272a7fa0UL, - 0xbafd4719UL, 0x0241207cUL, 0x10f48f92UL, 0xa848e8f7UL, 0x9b14583dUL, - 0x23a83f58UL, 0x311d90b6UL, 0x89a1f7d3UL, 0x1476cf6aUL, 0xaccaa80fUL, - 0xbe7f07e1UL, 0x06c36084UL, 0x5ea070d2UL, 0xe61c17b7UL, 0xf4a9b859UL, - 0x4c15df3cUL, 0xd1c2e785UL, 0x697e80e0UL, 0x7bcb2f0eUL, 0xc377486bUL, - 0xcb0d0fa2UL, 0x73b168c7UL, 0x6104c729UL, 0xd9b8a04cUL, 0x446f98f5UL, - 0xfcd3ff90UL, 0xee66507eUL, 0x56da371bUL, 0x0eb9274dUL, 0xb6054028UL, - 0xa4b0efc6UL, 0x1c0c88a3UL, 0x81dbb01aUL, 0x3967d77fUL, 0x2bd27891UL, - 0x936e1ff4UL, 0x3b26f703UL, 0x839a9066UL, 0x912f3f88UL, 0x299358edUL, - 0xb4446054UL, 0x0cf80731UL, 0x1e4da8dfUL, 0xa6f1cfbaUL, 0xfe92dfecUL, - 0x462eb889UL, 0x549b1767UL, 0xec277002UL, 0x71f048bbUL, 0xc94c2fdeUL, - 0xdbf98030UL, 0x6345e755UL, 0x6b3fa09cUL, 0xd383c7f9UL, 0xc1366817UL, - 0x798a0f72UL, 0xe45d37cbUL, 0x5ce150aeUL, 0x4e54ff40UL, 0xf6e89825UL, - 0xae8b8873UL, 0x1637ef16UL, 0x048240f8UL, 0xbc3e279dUL, 0x21e91f24UL, - 0x99557841UL, 0x8be0d7afUL, 0x335cb0caUL, 0xed59b63bUL, 0x55e5d15eUL, - 0x47507eb0UL, 0xffec19d5UL, 0x623b216cUL, 0xda874609UL, 0xc832e9e7UL, - 0x708e8e82UL, 0x28ed9ed4UL, 0x9051f9b1UL, 0x82e4565fUL, 0x3a58313aUL, - 0xa78f0983UL, 0x1f336ee6UL, 0x0d86c108UL, 0xb53aa66dUL, 0xbd40e1a4UL, - 0x05fc86c1UL, 0x1749292fUL, 0xaff54e4aUL, 0x322276f3UL, 0x8a9e1196UL, - 0x982bbe78UL, 0x2097d91dUL, 0x78f4c94bUL, 0xc048ae2eUL, 0xd2fd01c0UL, - 0x6a4166a5UL, 0xf7965e1cUL, 0x4f2a3979UL, 0x5d9f9697UL, 0xe523f1f2UL, - 0x4d6b1905UL, 0xf5d77e60UL, 0xe762d18eUL, 0x5fdeb6ebUL, 0xc2098e52UL, - 0x7ab5e937UL, 0x680046d9UL, 0xd0bc21bcUL, 0x88df31eaUL, 0x3063568fUL, - 0x22d6f961UL, 0x9a6a9e04UL, 0x07bda6bdUL, 0xbf01c1d8UL, 0xadb46e36UL, - 0x15080953UL, 0x1d724e9aUL, 0xa5ce29ffUL, 0xb77b8611UL, 0x0fc7e174UL, - 0x9210d9cdUL, 0x2aacbea8UL, 0x38191146UL, 0x80a57623UL, 0xd8c66675UL, - 0x607a0110UL, 0x72cfaefeUL, 0xca73c99bUL, 0x57a4f122UL, 0xef189647UL, - 0xfdad39a9UL, 0x45115eccUL, 0x764dee06UL, 0xcef18963UL, 0xdc44268dUL, - 0x64f841e8UL, 0xf92f7951UL, 0x41931e34UL, 0x5326b1daUL, 0xeb9ad6bfUL, - 0xb3f9c6e9UL, 0x0b45a18cUL, 0x19f00e62UL, 0xa14c6907UL, 0x3c9b51beUL, - 0x842736dbUL, 0x96929935UL, 0x2e2efe50UL, 0x2654b999UL, 0x9ee8defcUL, - 0x8c5d7112UL, 0x34e11677UL, 0xa9362eceUL, 0x118a49abUL, 0x033fe645UL, - 0xbb838120UL, 0xe3e09176UL, 0x5b5cf613UL, 0x49e959fdUL, 0xf1553e98UL, - 0x6c820621UL, 0xd43e6144UL, 0xc68bceaaUL, 0x7e37a9cfUL, 0xd67f4138UL, - 0x6ec3265dUL, 0x7c7689b3UL, 0xc4caeed6UL, 0x591dd66fUL, 0xe1a1b10aUL, - 0xf3141ee4UL, 0x4ba87981UL, 0x13cb69d7UL, 0xab770eb2UL, 0xb9c2a15cUL, - 0x017ec639UL, 0x9ca9fe80UL, 0x241599e5UL, 0x36a0360bUL, 0x8e1c516eUL, - 0x866616a7UL, 0x3eda71c2UL, 0x2c6fde2cUL, 0x94d3b949UL, 0x090481f0UL, - 0xb1b8e695UL, 0xa30d497bUL, 0x1bb12e1eUL, 0x43d23e48UL, 0xfb6e592dUL, - 0xe9dbf6c3UL, 0x516791a6UL, 0xccb0a91fUL, 0x740cce7aUL, 0x66b96194UL, - 0xde0506f1UL - }, - { - 0x00000000UL, 0x96300777UL, 0x2c610eeeUL, 0xba510999UL, 0x19c46d07UL, - 0x8ff46a70UL, 0x35a563e9UL, 0xa395649eUL, 0x3288db0eUL, 0xa4b8dc79UL, - 0x1ee9d5e0UL, 0x88d9d297UL, 0x2b4cb609UL, 0xbd7cb17eUL, 0x072db8e7UL, - 0x911dbf90UL, 0x6410b71dUL, 0xf220b06aUL, 0x4871b9f3UL, 0xde41be84UL, - 0x7dd4da1aUL, 0xebe4dd6dUL, 0x51b5d4f4UL, 0xc785d383UL, 0x56986c13UL, - 0xc0a86b64UL, 0x7af962fdUL, 0xecc9658aUL, 0x4f5c0114UL, 0xd96c0663UL, - 0x633d0ffaUL, 0xf50d088dUL, 0xc8206e3bUL, 0x5e10694cUL, 0xe44160d5UL, - 0x727167a2UL, 0xd1e4033cUL, 0x47d4044bUL, 0xfd850dd2UL, 0x6bb50aa5UL, - 0xfaa8b535UL, 0x6c98b242UL, 0xd6c9bbdbUL, 0x40f9bcacUL, 0xe36cd832UL, - 0x755cdf45UL, 0xcf0dd6dcUL, 0x593dd1abUL, 0xac30d926UL, 0x3a00de51UL, - 0x8051d7c8UL, 0x1661d0bfUL, 0xb5f4b421UL, 0x23c4b356UL, 0x9995bacfUL, - 0x0fa5bdb8UL, 0x9eb80228UL, 0x0888055fUL, 0xb2d90cc6UL, 0x24e90bb1UL, - 0x877c6f2fUL, 0x114c6858UL, 0xab1d61c1UL, 0x3d2d66b6UL, 0x9041dc76UL, - 0x0671db01UL, 0xbc20d298UL, 0x2a10d5efUL, 0x8985b171UL, 0x1fb5b606UL, - 0xa5e4bf9fUL, 0x33d4b8e8UL, 0xa2c90778UL, 0x34f9000fUL, 0x8ea80996UL, - 0x18980ee1UL, 0xbb0d6a7fUL, 0x2d3d6d08UL, 0x976c6491UL, 0x015c63e6UL, - 0xf4516b6bUL, 0x62616c1cUL, 0xd8306585UL, 0x4e0062f2UL, 0xed95066cUL, - 0x7ba5011bUL, 0xc1f40882UL, 0x57c40ff5UL, 0xc6d9b065UL, 0x50e9b712UL, - 0xeab8be8bUL, 0x7c88b9fcUL, 0xdf1ddd62UL, 0x492dda15UL, 0xf37cd38cUL, - 0x654cd4fbUL, 0x5861b24dUL, 0xce51b53aUL, 0x7400bca3UL, 0xe230bbd4UL, - 0x41a5df4aUL, 0xd795d83dUL, 0x6dc4d1a4UL, 0xfbf4d6d3UL, 0x6ae96943UL, - 0xfcd96e34UL, 0x468867adUL, 0xd0b860daUL, 0x732d0444UL, 0xe51d0333UL, - 0x5f4c0aaaUL, 0xc97c0dddUL, 0x3c710550UL, 0xaa410227UL, 0x10100bbeUL, - 0x86200cc9UL, 0x25b56857UL, 0xb3856f20UL, 0x09d466b9UL, 0x9fe461ceUL, - 0x0ef9de5eUL, 0x98c9d929UL, 0x2298d0b0UL, 0xb4a8d7c7UL, 0x173db359UL, - 0x810db42eUL, 0x3b5cbdb7UL, 0xad6cbac0UL, 0x2083b8edUL, 0xb6b3bf9aUL, - 0x0ce2b603UL, 0x9ad2b174UL, 0x3947d5eaUL, 0xaf77d29dUL, 0x1526db04UL, - 0x8316dc73UL, 0x120b63e3UL, 0x843b6494UL, 0x3e6a6d0dUL, 0xa85a6a7aUL, - 0x0bcf0ee4UL, 0x9dff0993UL, 0x27ae000aUL, 0xb19e077dUL, 0x44930ff0UL, - 0xd2a30887UL, 0x68f2011eUL, 0xfec20669UL, 0x5d5762f7UL, 0xcb676580UL, - 0x71366c19UL, 0xe7066b6eUL, 0x761bd4feUL, 0xe02bd389UL, 0x5a7ada10UL, - 0xcc4add67UL, 0x6fdfb9f9UL, 0xf9efbe8eUL, 0x43beb717UL, 0xd58eb060UL, - 0xe8a3d6d6UL, 0x7e93d1a1UL, 0xc4c2d838UL, 0x52f2df4fUL, 0xf167bbd1UL, - 0x6757bca6UL, 0xdd06b53fUL, 0x4b36b248UL, 0xda2b0dd8UL, 0x4c1b0aafUL, - 0xf64a0336UL, 0x607a0441UL, 0xc3ef60dfUL, 0x55df67a8UL, 0xef8e6e31UL, - 0x79be6946UL, 0x8cb361cbUL, 0x1a8366bcUL, 0xa0d26f25UL, 0x36e26852UL, - 0x95770cccUL, 0x03470bbbUL, 0xb9160222UL, 0x2f260555UL, 0xbe3bbac5UL, - 0x280bbdb2UL, 0x925ab42bUL, 0x046ab35cUL, 0xa7ffd7c2UL, 0x31cfd0b5UL, - 0x8b9ed92cUL, 0x1daede5bUL, 0xb0c2649bUL, 0x26f263ecUL, 0x9ca36a75UL, - 0x0a936d02UL, 0xa906099cUL, 0x3f360eebUL, 0x85670772UL, 0x13570005UL, - 0x824abf95UL, 0x147ab8e2UL, 0xae2bb17bUL, 0x381bb60cUL, 0x9b8ed292UL, - 0x0dbed5e5UL, 0xb7efdc7cUL, 0x21dfdb0bUL, 0xd4d2d386UL, 0x42e2d4f1UL, - 0xf8b3dd68UL, 0x6e83da1fUL, 0xcd16be81UL, 0x5b26b9f6UL, 0xe177b06fUL, - 0x7747b718UL, 0xe65a0888UL, 0x706a0fffUL, 0xca3b0666UL, 0x5c0b0111UL, - 0xff9e658fUL, 0x69ae62f8UL, 0xd3ff6b61UL, 0x45cf6c16UL, 0x78e20aa0UL, - 0xeed20dd7UL, 0x5483044eUL, 0xc2b30339UL, 0x612667a7UL, 0xf71660d0UL, - 0x4d476949UL, 0xdb776e3eUL, 0x4a6ad1aeUL, 0xdc5ad6d9UL, 0x660bdf40UL, - 0xf03bd837UL, 0x53aebca9UL, 0xc59ebbdeUL, 0x7fcfb247UL, 0xe9ffb530UL, - 0x1cf2bdbdUL, 0x8ac2bacaUL, 0x3093b353UL, 0xa6a3b424UL, 0x0536d0baUL, - 0x9306d7cdUL, 0x2957de54UL, 0xbf67d923UL, 0x2e7a66b3UL, 0xb84a61c4UL, - 0x021b685dUL, 0x942b6f2aUL, 0x37be0bb4UL, 0xa18e0cc3UL, 0x1bdf055aUL, - 0x8def022dUL - }, - { - 0x00000000UL, 0x41311b19UL, 0x82623632UL, 0xc3532d2bUL, 0x04c56c64UL, - 0x45f4777dUL, 0x86a75a56UL, 0xc796414fUL, 0x088ad9c8UL, 0x49bbc2d1UL, - 0x8ae8effaUL, 0xcbd9f4e3UL, 0x0c4fb5acUL, 0x4d7eaeb5UL, 0x8e2d839eUL, - 0xcf1c9887UL, 0x5112c24aUL, 0x1023d953UL, 0xd370f478UL, 0x9241ef61UL, - 0x55d7ae2eUL, 0x14e6b537UL, 0xd7b5981cUL, 0x96848305UL, 0x59981b82UL, - 0x18a9009bUL, 0xdbfa2db0UL, 0x9acb36a9UL, 0x5d5d77e6UL, 0x1c6c6cffUL, - 0xdf3f41d4UL, 0x9e0e5acdUL, 0xa2248495UL, 0xe3159f8cUL, 0x2046b2a7UL, - 0x6177a9beUL, 0xa6e1e8f1UL, 0xe7d0f3e8UL, 0x2483dec3UL, 0x65b2c5daUL, - 0xaaae5d5dUL, 0xeb9f4644UL, 0x28cc6b6fUL, 0x69fd7076UL, 0xae6b3139UL, - 0xef5a2a20UL, 0x2c09070bUL, 0x6d381c12UL, 0xf33646dfUL, 0xb2075dc6UL, - 0x715470edUL, 0x30656bf4UL, 0xf7f32abbUL, 0xb6c231a2UL, 0x75911c89UL, - 0x34a00790UL, 0xfbbc9f17UL, 0xba8d840eUL, 0x79dea925UL, 0x38efb23cUL, - 0xff79f373UL, 0xbe48e86aUL, 0x7d1bc541UL, 0x3c2ade58UL, 0x054f79f0UL, - 0x447e62e9UL, 0x872d4fc2UL, 0xc61c54dbUL, 0x018a1594UL, 0x40bb0e8dUL, - 0x83e823a6UL, 0xc2d938bfUL, 0x0dc5a038UL, 0x4cf4bb21UL, 0x8fa7960aUL, - 0xce968d13UL, 0x0900cc5cUL, 0x4831d745UL, 0x8b62fa6eUL, 0xca53e177UL, - 0x545dbbbaUL, 0x156ca0a3UL, 0xd63f8d88UL, 0x970e9691UL, 0x5098d7deUL, - 0x11a9ccc7UL, 0xd2fae1ecUL, 0x93cbfaf5UL, 0x5cd76272UL, 0x1de6796bUL, - 0xdeb55440UL, 0x9f844f59UL, 0x58120e16UL, 0x1923150fUL, 0xda703824UL, - 0x9b41233dUL, 0xa76bfd65UL, 0xe65ae67cUL, 0x2509cb57UL, 0x6438d04eUL, - 0xa3ae9101UL, 0xe29f8a18UL, 0x21cca733UL, 0x60fdbc2aUL, 0xafe124adUL, - 0xeed03fb4UL, 0x2d83129fUL, 0x6cb20986UL, 0xab2448c9UL, 0xea1553d0UL, - 0x29467efbUL, 0x687765e2UL, 0xf6793f2fUL, 0xb7482436UL, 0x741b091dUL, - 0x352a1204UL, 0xf2bc534bUL, 0xb38d4852UL, 0x70de6579UL, 0x31ef7e60UL, - 0xfef3e6e7UL, 0xbfc2fdfeUL, 0x7c91d0d5UL, 0x3da0cbccUL, 0xfa368a83UL, - 0xbb07919aUL, 0x7854bcb1UL, 0x3965a7a8UL, 0x4b98833bUL, 0x0aa99822UL, - 0xc9fab509UL, 0x88cbae10UL, 0x4f5def5fUL, 0x0e6cf446UL, 0xcd3fd96dUL, - 0x8c0ec274UL, 0x43125af3UL, 0x022341eaUL, 0xc1706cc1UL, 0x804177d8UL, - 0x47d73697UL, 0x06e62d8eUL, 0xc5b500a5UL, 0x84841bbcUL, 0x1a8a4171UL, - 0x5bbb5a68UL, 0x98e87743UL, 0xd9d96c5aUL, 0x1e4f2d15UL, 0x5f7e360cUL, - 0x9c2d1b27UL, 0xdd1c003eUL, 0x120098b9UL, 0x533183a0UL, 0x9062ae8bUL, - 0xd153b592UL, 0x16c5f4ddUL, 0x57f4efc4UL, 0x94a7c2efUL, 0xd596d9f6UL, - 0xe9bc07aeUL, 0xa88d1cb7UL, 0x6bde319cUL, 0x2aef2a85UL, 0xed796bcaUL, - 0xac4870d3UL, 0x6f1b5df8UL, 0x2e2a46e1UL, 0xe136de66UL, 0xa007c57fUL, - 0x6354e854UL, 0x2265f34dUL, 0xe5f3b202UL, 0xa4c2a91bUL, 0x67918430UL, - 0x26a09f29UL, 0xb8aec5e4UL, 0xf99fdefdUL, 0x3accf3d6UL, 0x7bfde8cfUL, - 0xbc6ba980UL, 0xfd5ab299UL, 0x3e099fb2UL, 0x7f3884abUL, 0xb0241c2cUL, - 0xf1150735UL, 0x32462a1eUL, 0x73773107UL, 0xb4e17048UL, 0xf5d06b51UL, - 0x3683467aUL, 0x77b25d63UL, 0x4ed7facbUL, 0x0fe6e1d2UL, 0xccb5ccf9UL, - 0x8d84d7e0UL, 0x4a1296afUL, 0x0b238db6UL, 0xc870a09dUL, 0x8941bb84UL, - 0x465d2303UL, 0x076c381aUL, 0xc43f1531UL, 0x850e0e28UL, 0x42984f67UL, - 0x03a9547eUL, 0xc0fa7955UL, 0x81cb624cUL, 0x1fc53881UL, 0x5ef42398UL, - 0x9da70eb3UL, 0xdc9615aaUL, 0x1b0054e5UL, 0x5a314ffcUL, 0x996262d7UL, - 0xd85379ceUL, 0x174fe149UL, 0x567efa50UL, 0x952dd77bUL, 0xd41ccc62UL, - 0x138a8d2dUL, 0x52bb9634UL, 0x91e8bb1fUL, 0xd0d9a006UL, 0xecf37e5eUL, - 0xadc26547UL, 0x6e91486cUL, 0x2fa05375UL, 0xe836123aUL, 0xa9070923UL, - 0x6a542408UL, 0x2b653f11UL, 0xe479a796UL, 0xa548bc8fUL, 0x661b91a4UL, - 0x272a8abdUL, 0xe0bccbf2UL, 0xa18dd0ebUL, 0x62defdc0UL, 0x23efe6d9UL, - 0xbde1bc14UL, 0xfcd0a70dUL, 0x3f838a26UL, 0x7eb2913fUL, 0xb924d070UL, - 0xf815cb69UL, 0x3b46e642UL, 0x7a77fd5bUL, 0xb56b65dcUL, 0xf45a7ec5UL, - 0x370953eeUL, 0x763848f7UL, 0xb1ae09b8UL, 0xf09f12a1UL, 0x33cc3f8aUL, - 0x72fd2493UL - }, - { - 0x00000000UL, 0x376ac201UL, 0x6ed48403UL, 0x59be4602UL, 0xdca80907UL, - 0xebc2cb06UL, 0xb27c8d04UL, 0x85164f05UL, 0xb851130eUL, 0x8f3bd10fUL, - 0xd685970dUL, 0xe1ef550cUL, 0x64f91a09UL, 0x5393d808UL, 0x0a2d9e0aUL, - 0x3d475c0bUL, 0x70a3261cUL, 0x47c9e41dUL, 0x1e77a21fUL, 0x291d601eUL, - 0xac0b2f1bUL, 0x9b61ed1aUL, 0xc2dfab18UL, 0xf5b56919UL, 0xc8f23512UL, - 0xff98f713UL, 0xa626b111UL, 0x914c7310UL, 0x145a3c15UL, 0x2330fe14UL, - 0x7a8eb816UL, 0x4de47a17UL, 0xe0464d38UL, 0xd72c8f39UL, 0x8e92c93bUL, - 0xb9f80b3aUL, 0x3cee443fUL, 0x0b84863eUL, 0x523ac03cUL, 0x6550023dUL, - 0x58175e36UL, 0x6f7d9c37UL, 0x36c3da35UL, 0x01a91834UL, 0x84bf5731UL, - 0xb3d59530UL, 0xea6bd332UL, 0xdd011133UL, 0x90e56b24UL, 0xa78fa925UL, - 0xfe31ef27UL, 0xc95b2d26UL, 0x4c4d6223UL, 0x7b27a022UL, 0x2299e620UL, - 0x15f32421UL, 0x28b4782aUL, 0x1fdeba2bUL, 0x4660fc29UL, 0x710a3e28UL, - 0xf41c712dUL, 0xc376b32cUL, 0x9ac8f52eUL, 0xada2372fUL, 0xc08d9a70UL, - 0xf7e75871UL, 0xae591e73UL, 0x9933dc72UL, 0x1c259377UL, 0x2b4f5176UL, - 0x72f11774UL, 0x459bd575UL, 0x78dc897eUL, 0x4fb64b7fUL, 0x16080d7dUL, - 0x2162cf7cUL, 0xa4748079UL, 0x931e4278UL, 0xcaa0047aUL, 0xfdcac67bUL, - 0xb02ebc6cUL, 0x87447e6dUL, 0xdefa386fUL, 0xe990fa6eUL, 0x6c86b56bUL, - 0x5bec776aUL, 0x02523168UL, 0x3538f369UL, 0x087faf62UL, 0x3f156d63UL, - 0x66ab2b61UL, 0x51c1e960UL, 0xd4d7a665UL, 0xe3bd6464UL, 0xba032266UL, - 0x8d69e067UL, 0x20cbd748UL, 0x17a11549UL, 0x4e1f534bUL, 0x7975914aUL, - 0xfc63de4fUL, 0xcb091c4eUL, 0x92b75a4cUL, 0xa5dd984dUL, 0x989ac446UL, - 0xaff00647UL, 0xf64e4045UL, 0xc1248244UL, 0x4432cd41UL, 0x73580f40UL, - 0x2ae64942UL, 0x1d8c8b43UL, 0x5068f154UL, 0x67023355UL, 0x3ebc7557UL, - 0x09d6b756UL, 0x8cc0f853UL, 0xbbaa3a52UL, 0xe2147c50UL, 0xd57ebe51UL, - 0xe839e25aUL, 0xdf53205bUL, 0x86ed6659UL, 0xb187a458UL, 0x3491eb5dUL, - 0x03fb295cUL, 0x5a456f5eUL, 0x6d2fad5fUL, 0x801b35e1UL, 0xb771f7e0UL, - 0xeecfb1e2UL, 0xd9a573e3UL, 0x5cb33ce6UL, 0x6bd9fee7UL, 0x3267b8e5UL, - 0x050d7ae4UL, 0x384a26efUL, 0x0f20e4eeUL, 0x569ea2ecUL, 0x61f460edUL, - 0xe4e22fe8UL, 0xd388ede9UL, 0x8a36abebUL, 0xbd5c69eaUL, 0xf0b813fdUL, - 0xc7d2d1fcUL, 0x9e6c97feUL, 0xa90655ffUL, 0x2c101afaUL, 0x1b7ad8fbUL, - 0x42c49ef9UL, 0x75ae5cf8UL, 0x48e900f3UL, 0x7f83c2f2UL, 0x263d84f0UL, - 0x115746f1UL, 0x944109f4UL, 0xa32bcbf5UL, 0xfa958df7UL, 0xcdff4ff6UL, - 0x605d78d9UL, 0x5737bad8UL, 0x0e89fcdaUL, 0x39e33edbUL, 0xbcf571deUL, - 0x8b9fb3dfUL, 0xd221f5ddUL, 0xe54b37dcUL, 0xd80c6bd7UL, 0xef66a9d6UL, - 0xb6d8efd4UL, 0x81b22dd5UL, 0x04a462d0UL, 0x33cea0d1UL, 0x6a70e6d3UL, - 0x5d1a24d2UL, 0x10fe5ec5UL, 0x27949cc4UL, 0x7e2adac6UL, 0x494018c7UL, - 0xcc5657c2UL, 0xfb3c95c3UL, 0xa282d3c1UL, 0x95e811c0UL, 0xa8af4dcbUL, - 0x9fc58fcaUL, 0xc67bc9c8UL, 0xf1110bc9UL, 0x740744ccUL, 0x436d86cdUL, - 0x1ad3c0cfUL, 0x2db902ceUL, 0x4096af91UL, 0x77fc6d90UL, 0x2e422b92UL, - 0x1928e993UL, 0x9c3ea696UL, 0xab546497UL, 0xf2ea2295UL, 0xc580e094UL, - 0xf8c7bc9fUL, 0xcfad7e9eUL, 0x9613389cUL, 0xa179fa9dUL, 0x246fb598UL, - 0x13057799UL, 0x4abb319bUL, 0x7dd1f39aUL, 0x3035898dUL, 0x075f4b8cUL, - 0x5ee10d8eUL, 0x698bcf8fUL, 0xec9d808aUL, 0xdbf7428bUL, 0x82490489UL, - 0xb523c688UL, 0x88649a83UL, 0xbf0e5882UL, 0xe6b01e80UL, 0xd1dadc81UL, - 0x54cc9384UL, 0x63a65185UL, 0x3a181787UL, 0x0d72d586UL, 0xa0d0e2a9UL, - 0x97ba20a8UL, 0xce0466aaUL, 0xf96ea4abUL, 0x7c78ebaeUL, 0x4b1229afUL, - 0x12ac6fadUL, 0x25c6adacUL, 0x1881f1a7UL, 0x2feb33a6UL, 0x765575a4UL, - 0x413fb7a5UL, 0xc429f8a0UL, 0xf3433aa1UL, 0xaafd7ca3UL, 0x9d97bea2UL, - 0xd073c4b5UL, 0xe71906b4UL, 0xbea740b6UL, 0x89cd82b7UL, 0x0cdbcdb2UL, - 0x3bb10fb3UL, 0x620f49b1UL, 0x55658bb0UL, 0x6822d7bbUL, 0x5f4815baUL, - 0x06f653b8UL, 0x319c91b9UL, 0xb48adebcUL, 0x83e01cbdUL, 0xda5e5abfUL, - 0xed3498beUL - }, - { - 0x00000000UL, 0x6567bcb8UL, 0x8bc809aaUL, 0xeeafb512UL, 0x5797628fUL, - 0x32f0de37UL, 0xdc5f6b25UL, 0xb938d79dUL, 0xef28b4c5UL, 0x8a4f087dUL, - 0x64e0bd6fUL, 0x018701d7UL, 0xb8bfd64aUL, 0xddd86af2UL, 0x3377dfe0UL, - 0x56106358UL, 0x9f571950UL, 0xfa30a5e8UL, 0x149f10faUL, 0x71f8ac42UL, - 0xc8c07bdfUL, 0xada7c767UL, 0x43087275UL, 0x266fcecdUL, 0x707fad95UL, - 0x1518112dUL, 0xfbb7a43fUL, 0x9ed01887UL, 0x27e8cf1aUL, 0x428f73a2UL, - 0xac20c6b0UL, 0xc9477a08UL, 0x3eaf32a0UL, 0x5bc88e18UL, 0xb5673b0aUL, - 0xd00087b2UL, 0x6938502fUL, 0x0c5fec97UL, 0xe2f05985UL, 0x8797e53dUL, - 0xd1878665UL, 0xb4e03addUL, 0x5a4f8fcfUL, 0x3f283377UL, 0x8610e4eaUL, - 0xe3775852UL, 0x0dd8ed40UL, 0x68bf51f8UL, 0xa1f82bf0UL, 0xc49f9748UL, - 0x2a30225aUL, 0x4f579ee2UL, 0xf66f497fUL, 0x9308f5c7UL, 0x7da740d5UL, - 0x18c0fc6dUL, 0x4ed09f35UL, 0x2bb7238dUL, 0xc518969fUL, 0xa07f2a27UL, - 0x1947fdbaUL, 0x7c204102UL, 0x928ff410UL, 0xf7e848a8UL, 0x3d58149bUL, - 0x583fa823UL, 0xb6901d31UL, 0xd3f7a189UL, 0x6acf7614UL, 0x0fa8caacUL, - 0xe1077fbeUL, 0x8460c306UL, 0xd270a05eUL, 0xb7171ce6UL, 0x59b8a9f4UL, - 0x3cdf154cUL, 0x85e7c2d1UL, 0xe0807e69UL, 0x0e2fcb7bUL, 0x6b4877c3UL, - 0xa20f0dcbUL, 0xc768b173UL, 0x29c70461UL, 0x4ca0b8d9UL, 0xf5986f44UL, - 0x90ffd3fcUL, 0x7e5066eeUL, 0x1b37da56UL, 0x4d27b90eUL, 0x284005b6UL, - 0xc6efb0a4UL, 0xa3880c1cUL, 0x1ab0db81UL, 0x7fd76739UL, 0x9178d22bUL, - 0xf41f6e93UL, 0x03f7263bUL, 0x66909a83UL, 0x883f2f91UL, 0xed589329UL, - 0x546044b4UL, 0x3107f80cUL, 0xdfa84d1eUL, 0xbacff1a6UL, 0xecdf92feUL, - 0x89b82e46UL, 0x67179b54UL, 0x027027ecUL, 0xbb48f071UL, 0xde2f4cc9UL, - 0x3080f9dbUL, 0x55e74563UL, 0x9ca03f6bUL, 0xf9c783d3UL, 0x176836c1UL, - 0x720f8a79UL, 0xcb375de4UL, 0xae50e15cUL, 0x40ff544eUL, 0x2598e8f6UL, - 0x73888baeUL, 0x16ef3716UL, 0xf8408204UL, 0x9d273ebcUL, 0x241fe921UL, - 0x41785599UL, 0xafd7e08bUL, 0xcab05c33UL, 0x3bb659edUL, 0x5ed1e555UL, - 0xb07e5047UL, 0xd519ecffUL, 0x6c213b62UL, 0x094687daUL, 0xe7e932c8UL, - 0x828e8e70UL, 0xd49eed28UL, 0xb1f95190UL, 0x5f56e482UL, 0x3a31583aUL, - 0x83098fa7UL, 0xe66e331fUL, 0x08c1860dUL, 0x6da63ab5UL, 0xa4e140bdUL, - 0xc186fc05UL, 0x2f294917UL, 0x4a4ef5afUL, 0xf3762232UL, 0x96119e8aUL, - 0x78be2b98UL, 0x1dd99720UL, 0x4bc9f478UL, 0x2eae48c0UL, 0xc001fdd2UL, - 0xa566416aUL, 0x1c5e96f7UL, 0x79392a4fUL, 0x97969f5dUL, 0xf2f123e5UL, - 0x05196b4dUL, 0x607ed7f5UL, 0x8ed162e7UL, 0xebb6de5fUL, 0x528e09c2UL, - 0x37e9b57aUL, 0xd9460068UL, 0xbc21bcd0UL, 0xea31df88UL, 0x8f566330UL, - 0x61f9d622UL, 0x049e6a9aUL, 0xbda6bd07UL, 0xd8c101bfUL, 0x366eb4adUL, - 0x53090815UL, 0x9a4e721dUL, 0xff29cea5UL, 0x11867bb7UL, 0x74e1c70fUL, - 0xcdd91092UL, 0xa8beac2aUL, 0x46111938UL, 0x2376a580UL, 0x7566c6d8UL, - 0x10017a60UL, 0xfeaecf72UL, 0x9bc973caUL, 0x22f1a457UL, 0x479618efUL, - 0xa939adfdUL, 0xcc5e1145UL, 0x06ee4d76UL, 0x6389f1ceUL, 0x8d2644dcUL, - 0xe841f864UL, 0x51792ff9UL, 0x341e9341UL, 0xdab12653UL, 0xbfd69aebUL, - 0xe9c6f9b3UL, 0x8ca1450bUL, 0x620ef019UL, 0x07694ca1UL, 0xbe519b3cUL, - 0xdb362784UL, 0x35999296UL, 0x50fe2e2eUL, 0x99b95426UL, 0xfcdee89eUL, - 0x12715d8cUL, 0x7716e134UL, 0xce2e36a9UL, 0xab498a11UL, 0x45e63f03UL, - 0x208183bbUL, 0x7691e0e3UL, 0x13f65c5bUL, 0xfd59e949UL, 0x983e55f1UL, - 0x2106826cUL, 0x44613ed4UL, 0xaace8bc6UL, 0xcfa9377eUL, 0x38417fd6UL, - 0x5d26c36eUL, 0xb389767cUL, 0xd6eecac4UL, 0x6fd61d59UL, 0x0ab1a1e1UL, - 0xe41e14f3UL, 0x8179a84bUL, 0xd769cb13UL, 0xb20e77abUL, 0x5ca1c2b9UL, - 0x39c67e01UL, 0x80fea99cUL, 0xe5991524UL, 0x0b36a036UL, 0x6e511c8eUL, - 0xa7166686UL, 0xc271da3eUL, 0x2cde6f2cUL, 0x49b9d394UL, 0xf0810409UL, - 0x95e6b8b1UL, 0x7b490da3UL, 0x1e2eb11bUL, 0x483ed243UL, 0x2d596efbUL, - 0xc3f6dbe9UL, 0xa6916751UL, 0x1fa9b0ccUL, 0x7ace0c74UL, 0x9461b966UL, - 0xf10605deUL -#endif - } -}; diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/deflate.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/deflate.h deleted file mode 100644 index 804d3abe8f..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/deflate.h +++ /dev/null @@ -1,331 +0,0 @@ -/* deflate.h -- internal compression state - * Copyright (C) 1995-2004 Jean-loup Gailly - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id: deflate.h,v 1.2 2006/03/02 00:10:34 zerocool Exp $ */ - -#ifndef DEFLATE_H -#define DEFLATE_H - -#include "zutil.h" - -/* define NO_GZIP when compiling if you want to disable gzip header and - trailer creation by deflate(). NO_GZIP would be used to avoid linking in - the crc code when it is not needed. For shared libraries, gzip encoding - should be left enabled. */ -#ifndef NO_GZIP -# define GZIP -#endif - -/* =========================================================================== - * Internal compression state. - */ - -#define LENGTH_CODES 29 -/* number of length codes, not counting the special END_BLOCK code */ - -#define LITERALS 256 -/* number of literal bytes 0..255 */ - -#define L_CODES (LITERALS+1+LENGTH_CODES) -/* number of Literal or Length codes, including the END_BLOCK code */ - -#define D_CODES 30 -/* number of distance codes */ - -#define BL_CODES 19 -/* number of codes used to transfer the bit lengths */ - -#define HEAP_SIZE (2*L_CODES+1) -/* maximum heap size */ - -#define MAX_BITS 15 -/* All codes must not exceed MAX_BITS bits */ - -#define INIT_STATE 42 -#define EXTRA_STATE 69 -#define NAME_STATE 73 -#define COMMENT_STATE 91 -#define HCRC_STATE 103 -#define BUSY_STATE 113 -#define FINISH_STATE 666 -/* Stream status */ - - -/* Data structure describing a single value and its code string. */ -typedef struct ct_data_s { - union { - ush freq; /* frequency count */ - ush code; /* bit string */ - } fc; - union { - ush dad; /* father node in Huffman tree */ - ush len; /* length of bit string */ - } dl; -} FAR ct_data; - -#define Freq fc.freq -#define Code fc.code -#define Dad dl.dad -#define Len dl.len - -typedef struct static_tree_desc_s static_tree_desc; - -typedef struct tree_desc_s { - ct_data *dyn_tree; /* the dynamic tree */ - int max_code; /* largest code with non zero frequency */ - static_tree_desc *stat_desc; /* the corresponding static tree */ -} FAR tree_desc; - -typedef ush Pos; -typedef Pos FAR Posf; -typedef unsigned IPos; - -/* A Pos is an index in the character window. We use short instead of int to - * save space in the various tables. IPos is used only for parameter passing. - */ - -typedef struct internal_state { - z_streamp strm; /* pointer back to this zlib stream */ - int status; /* as the name implies */ - Bytef *pending_buf; /* output still pending */ - ulg pending_buf_size; /* size of pending_buf */ - Bytef *pending_out; /* next pending byte to output to the stream */ - uInt pending; /* nb of bytes in the pending buffer */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - gz_headerp gzhead; /* gzip header information to write */ - uInt gzindex; /* where in extra, name, or comment */ - Byte method; /* STORED (for zip only) or DEFLATED */ - int last_flush; /* value of flush param for previous deflate call */ - - /* used by deflate.c: */ - - uInt w_size; /* LZ77 window size (32K by default) */ - uInt w_bits; /* log2(w_size) (8..16) */ - uInt w_mask; /* w_size - 1 */ - - Bytef *window; - /* Sliding window. Input bytes are read into the second half of the window, - * and move to the first half later to keep a dictionary of at least wSize - * bytes. With this organization, matches are limited to a distance of - * wSize-MAX_MATCH bytes, but this ensures that IO is always - * performed with a length multiple of the block size. Also, it limits - * the window size to 64K, which is quite useful on MSDOS. - * To do: use the user input buffer as sliding window. - */ - - ulg window_size; - /* Actual size of window: 2*wSize, except when the user input buffer - * is directly used as sliding window. - */ - - Posf *prev; - /* Link to older string with same hash index. To limit the size of this - * array to 64K, this link is maintained only for the last 32K strings. - * An index in this array is thus a window index modulo 32K. - */ - - Posf *head; /* Heads of the hash chains or NIL. */ - - uInt ins_h; /* hash index of string to be inserted */ - uInt hash_size; /* number of elements in hash table */ - uInt hash_bits; /* log2(hash_size) */ - uInt hash_mask; /* hash_size-1 */ - - uInt hash_shift; - /* Number of bits by which ins_h must be shifted at each input - * step. It must be such that after MIN_MATCH steps, the oldest - * byte no longer takes part in the hash key, that is: - * hash_shift * MIN_MATCH >= hash_bits - */ - - long block_start; - /* Window position at the beginning of the current output block. Gets - * negative when the window is moved backwards. - */ - - uInt match_length; /* length of best match */ - IPos prev_match; /* previous match */ - int match_available; /* set if previous match exists */ - uInt strstart; /* start of string to insert */ - uInt match_start; /* start of matching string */ - uInt lookahead; /* number of valid bytes ahead in window */ - - uInt prev_length; - /* Length of the best match at previous step. Matches not greater than this - * are discarded. This is used in the lazy match evaluation. - */ - - uInt max_chain_length; - /* To speed up deflation, hash chains are never searched beyond this - * length. A higher limit improves compression ratio but degrades the - * speed. - */ - - uInt max_lazy_match; - /* Attempt to find a better match only when the current match is strictly - * smaller than this value. This mechanism is used only for compression - * levels >= 4. - */ -# define max_insert_length max_lazy_match - /* Insert new strings in the hash table only if the match length is not - * greater than this length. This saves time but degrades compression. - * max_insert_length is used only for compression levels <= 3. - */ - - int level; /* compression level (1..9) */ - int strategy; /* favor or force Huffman coding*/ - - uInt good_match; - /* Use a faster search when the previous match is longer than this */ - - int nice_match; /* Stop searching when current match exceeds this */ - - /* used by trees.c: */ - /* Didn't use ct_data typedef below to supress compiler warning */ - struct ct_data_s dyn_ltree[HEAP_SIZE]; /* literal and length tree */ - struct ct_data_s dyn_dtree[2*D_CODES+1]; /* distance tree */ - struct ct_data_s bl_tree[2*BL_CODES+1]; /* Huffman tree for bit lengths */ - - struct tree_desc_s l_desc; /* desc. for literal tree */ - struct tree_desc_s d_desc; /* desc. for distance tree */ - struct tree_desc_s bl_desc; /* desc. for bit length tree */ - - ush bl_count[MAX_BITS+1]; - /* number of codes at each bit length for an optimal tree */ - - int heap[2*L_CODES+1]; /* heap used to build the Huffman trees */ - int heap_len; /* number of elements in the heap */ - int heap_max; /* element of largest frequency */ - /* The sons of heap[n] are heap[2*n] and heap[2*n+1]. heap[0] is not used. - * The same heap array is used to build all trees. - */ - - uch depth[2*L_CODES+1]; - /* Depth of each subtree used as tie breaker for trees of equal frequency - */ - - uchf *l_buf; /* buffer for literals or lengths */ - - uInt lit_bufsize; - /* Size of match buffer for literals/lengths. There are 4 reasons for - * limiting lit_bufsize to 64K: - * - frequencies can be kept in 16 bit counters - * - if compression is not successful for the first block, all input - * data is still in the window so we can still emit a stored block even - * when input comes from standard input. (This can also be done for - * all blocks if lit_bufsize is not greater than 32K.) - * - if compression is not successful for a file smaller than 64K, we can - * even emit a stored file instead of a stored block (saving 5 bytes). - * This is applicable only for zip (not gzip or zlib). - * - creating new Huffman trees less frequently may not provide fast - * adaptation to changes in the input data statistics. (Take for - * example a binary file with poorly compressible code followed by - * a highly compressible string table.) Smaller buffer sizes give - * fast adaptation but have of course the overhead of transmitting - * trees more frequently. - * - I can't count above 4 - */ - - uInt last_lit; /* running index in l_buf */ - - ushf *d_buf; - /* Buffer for distances. To simplify the code, d_buf and l_buf have - * the same number of elements. To use different lengths, an extra flag - * array would be necessary. - */ - - ulg opt_len; /* bit length of current block with optimal trees */ - ulg static_len; /* bit length of current block with static trees */ - uInt matches; /* number of string matches in current block */ - int last_eob_len; /* bit length of EOB code for last block */ - -#ifdef DEBUG - ulg compressed_len; /* total bit length of compressed file mod 2^32 */ - ulg bits_sent; /* bit length of compressed data sent mod 2^32 */ -#endif - - ush bi_buf; - /* Output buffer. bits are inserted starting at the bottom (least - * significant bits). - */ - int bi_valid; - /* Number of valid bits in bi_buf. All bits above the last valid bit - * are always zero. - */ - -} FAR deflate_state; - -/* Output a byte on the stream. - * IN assertion: there is enough room in pending_buf. - */ -#define put_byte(s, c) {s->pending_buf[s->pending++] = (c);} - - -#define MIN_LOOKAHEAD (MAX_MATCH+MIN_MATCH+1) -/* Minimum amount of lookahead, except at the end of the input file. - * See deflate.c for comments about the MIN_MATCH+1. - */ - -#define MAX_DIST(s) ((s)->w_size-MIN_LOOKAHEAD) -/* In order to simplify the code, particularly on 16 bit machines, match - * distances are limited to MAX_DIST instead of WSIZE. - */ - - /* in trees.c */ -void _tr_init OF((deflate_state *s)); -int _tr_tally OF((deflate_state *s, unsigned dist, unsigned lc)); -void _tr_flush_block OF((deflate_state *s, charf *buf, ulg stored_len, - int eof)); -void _tr_align OF((deflate_state *s)); -void _tr_stored_block OF((deflate_state *s, charf *buf, ulg stored_len, - int eof)); - -#define d_code(dist) \ - ((dist) < 256 ? _dist_code[dist] : _dist_code[256+((dist)>>7)]) -/* Mapping from a distance to a distance code. dist is the distance - 1 and - * must not have side effects. _dist_code[256] and _dist_code[257] are never - * used. - */ - -#ifndef DEBUG -/* Inline versions of _tr_tally for speed: */ - -#if defined(GEN_TREES_H) || !defined(STDC) - extern uch _length_code[]; - extern uch _dist_code[]; -#else - extern const uch _length_code[]; - extern const uch _dist_code[]; -#endif - -# define _tr_tally_lit(s, c, flush) \ - { uch cc = (c); \ - s->d_buf[s->last_lit] = 0; \ - s->l_buf[s->last_lit++] = cc; \ - s->dyn_ltree[cc].Freq++; \ - flush = (s->last_lit == s->lit_bufsize-1); \ - } -# define _tr_tally_dist(s, distance, length, flush) \ - { uch len = (length); \ - ush dist = (distance); \ - s->d_buf[s->last_lit] = dist; \ - s->l_buf[s->last_lit++] = len; \ - dist--; \ - s->dyn_ltree[_length_code[len]+LITERALS+1].Freq++; \ - s->dyn_dtree[d_code(dist)].Freq++; \ - flush = (s->last_lit == s->lit_bufsize-1); \ - } -#else -# define _tr_tally_lit(s, c, flush) flush = _tr_tally(s, 0, c) -# define _tr_tally_dist(s, distance, length, flush) \ - flush = _tr_tally(s, distance, length) -#endif - -#endif /* DEFLATE_H */ diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inffast.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inffast.h deleted file mode 100644 index 1e88d2d97b..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inffast.h +++ /dev/null @@ -1,11 +0,0 @@ -/* inffast.h -- header to use inffast.c - * Copyright (C) 1995-2003 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -void inflate_fast OF((z_streamp strm, unsigned start)); diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inffixed.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inffixed.h deleted file mode 100644 index 75ed4b5978..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inffixed.h +++ /dev/null @@ -1,94 +0,0 @@ - /* inffixed.h -- table for decoding fixed codes - * Generated automatically by makefixed(). - */ - - /* WARNING: this file should *not* be used by applications. It - is part of the implementation of the compression library and - is subject to change. Applications should only use zlib.h. - */ - - static const code lenfix[512] = { - {96,7,0},{0,8,80},{0,8,16},{20,8,115},{18,7,31},{0,8,112},{0,8,48}, - {0,9,192},{16,7,10},{0,8,96},{0,8,32},{0,9,160},{0,8,0},{0,8,128}, - {0,8,64},{0,9,224},{16,7,6},{0,8,88},{0,8,24},{0,9,144},{19,7,59}, - {0,8,120},{0,8,56},{0,9,208},{17,7,17},{0,8,104},{0,8,40},{0,9,176}, - {0,8,8},{0,8,136},{0,8,72},{0,9,240},{16,7,4},{0,8,84},{0,8,20}, - {21,8,227},{19,7,43},{0,8,116},{0,8,52},{0,9,200},{17,7,13},{0,8,100}, - {0,8,36},{0,9,168},{0,8,4},{0,8,132},{0,8,68},{0,9,232},{16,7,8}, - {0,8,92},{0,8,28},{0,9,152},{20,7,83},{0,8,124},{0,8,60},{0,9,216}, - {18,7,23},{0,8,108},{0,8,44},{0,9,184},{0,8,12},{0,8,140},{0,8,76}, - {0,9,248},{16,7,3},{0,8,82},{0,8,18},{21,8,163},{19,7,35},{0,8,114}, - {0,8,50},{0,9,196},{17,7,11},{0,8,98},{0,8,34},{0,9,164},{0,8,2}, - {0,8,130},{0,8,66},{0,9,228},{16,7,7},{0,8,90},{0,8,26},{0,9,148}, - {20,7,67},{0,8,122},{0,8,58},{0,9,212},{18,7,19},{0,8,106},{0,8,42}, - {0,9,180},{0,8,10},{0,8,138},{0,8,74},{0,9,244},{16,7,5},{0,8,86}, - {0,8,22},{64,8,0},{19,7,51},{0,8,118},{0,8,54},{0,9,204},{17,7,15}, - {0,8,102},{0,8,38},{0,9,172},{0,8,6},{0,8,134},{0,8,70},{0,9,236}, - {16,7,9},{0,8,94},{0,8,30},{0,9,156},{20,7,99},{0,8,126},{0,8,62}, - {0,9,220},{18,7,27},{0,8,110},{0,8,46},{0,9,188},{0,8,14},{0,8,142}, - {0,8,78},{0,9,252},{96,7,0},{0,8,81},{0,8,17},{21,8,131},{18,7,31}, - {0,8,113},{0,8,49},{0,9,194},{16,7,10},{0,8,97},{0,8,33},{0,9,162}, - {0,8,1},{0,8,129},{0,8,65},{0,9,226},{16,7,6},{0,8,89},{0,8,25}, - {0,9,146},{19,7,59},{0,8,121},{0,8,57},{0,9,210},{17,7,17},{0,8,105}, - {0,8,41},{0,9,178},{0,8,9},{0,8,137},{0,8,73},{0,9,242},{16,7,4}, - {0,8,85},{0,8,21},{16,8,258},{19,7,43},{0,8,117},{0,8,53},{0,9,202}, - {17,7,13},{0,8,101},{0,8,37},{0,9,170},{0,8,5},{0,8,133},{0,8,69}, - {0,9,234},{16,7,8},{0,8,93},{0,8,29},{0,9,154},{20,7,83},{0,8,125}, - {0,8,61},{0,9,218},{18,7,23},{0,8,109},{0,8,45},{0,9,186},{0,8,13}, - {0,8,141},{0,8,77},{0,9,250},{16,7,3},{0,8,83},{0,8,19},{21,8,195}, - {19,7,35},{0,8,115},{0,8,51},{0,9,198},{17,7,11},{0,8,99},{0,8,35}, - {0,9,166},{0,8,3},{0,8,131},{0,8,67},{0,9,230},{16,7,7},{0,8,91}, - {0,8,27},{0,9,150},{20,7,67},{0,8,123},{0,8,59},{0,9,214},{18,7,19}, - {0,8,107},{0,8,43},{0,9,182},{0,8,11},{0,8,139},{0,8,75},{0,9,246}, - {16,7,5},{0,8,87},{0,8,23},{64,8,0},{19,7,51},{0,8,119},{0,8,55}, - {0,9,206},{17,7,15},{0,8,103},{0,8,39},{0,9,174},{0,8,7},{0,8,135}, - {0,8,71},{0,9,238},{16,7,9},{0,8,95},{0,8,31},{0,9,158},{20,7,99}, - {0,8,127},{0,8,63},{0,9,222},{18,7,27},{0,8,111},{0,8,47},{0,9,190}, - {0,8,15},{0,8,143},{0,8,79},{0,9,254},{96,7,0},{0,8,80},{0,8,16}, - {20,8,115},{18,7,31},{0,8,112},{0,8,48},{0,9,193},{16,7,10},{0,8,96}, - {0,8,32},{0,9,161},{0,8,0},{0,8,128},{0,8,64},{0,9,225},{16,7,6}, - {0,8,88},{0,8,24},{0,9,145},{19,7,59},{0,8,120},{0,8,56},{0,9,209}, - {17,7,17},{0,8,104},{0,8,40},{0,9,177},{0,8,8},{0,8,136},{0,8,72}, - {0,9,241},{16,7,4},{0,8,84},{0,8,20},{21,8,227},{19,7,43},{0,8,116}, - {0,8,52},{0,9,201},{17,7,13},{0,8,100},{0,8,36},{0,9,169},{0,8,4}, - {0,8,132},{0,8,68},{0,9,233},{16,7,8},{0,8,92},{0,8,28},{0,9,153}, - {20,7,83},{0,8,124},{0,8,60},{0,9,217},{18,7,23},{0,8,108},{0,8,44}, - {0,9,185},{0,8,12},{0,8,140},{0,8,76},{0,9,249},{16,7,3},{0,8,82}, - {0,8,18},{21,8,163},{19,7,35},{0,8,114},{0,8,50},{0,9,197},{17,7,11}, - {0,8,98},{0,8,34},{0,9,165},{0,8,2},{0,8,130},{0,8,66},{0,9,229}, - {16,7,7},{0,8,90},{0,8,26},{0,9,149},{20,7,67},{0,8,122},{0,8,58}, - {0,9,213},{18,7,19},{0,8,106},{0,8,42},{0,9,181},{0,8,10},{0,8,138}, - {0,8,74},{0,9,245},{16,7,5},{0,8,86},{0,8,22},{64,8,0},{19,7,51}, - {0,8,118},{0,8,54},{0,9,205},{17,7,15},{0,8,102},{0,8,38},{0,9,173}, - {0,8,6},{0,8,134},{0,8,70},{0,9,237},{16,7,9},{0,8,94},{0,8,30}, - {0,9,157},{20,7,99},{0,8,126},{0,8,62},{0,9,221},{18,7,27},{0,8,110}, - {0,8,46},{0,9,189},{0,8,14},{0,8,142},{0,8,78},{0,9,253},{96,7,0}, - {0,8,81},{0,8,17},{21,8,131},{18,7,31},{0,8,113},{0,8,49},{0,9,195}, - {16,7,10},{0,8,97},{0,8,33},{0,9,163},{0,8,1},{0,8,129},{0,8,65}, - {0,9,227},{16,7,6},{0,8,89},{0,8,25},{0,9,147},{19,7,59},{0,8,121}, - {0,8,57},{0,9,211},{17,7,17},{0,8,105},{0,8,41},{0,9,179},{0,8,9}, - {0,8,137},{0,8,73},{0,9,243},{16,7,4},{0,8,85},{0,8,21},{16,8,258}, - {19,7,43},{0,8,117},{0,8,53},{0,9,203},{17,7,13},{0,8,101},{0,8,37}, - {0,9,171},{0,8,5},{0,8,133},{0,8,69},{0,9,235},{16,7,8},{0,8,93}, - {0,8,29},{0,9,155},{20,7,83},{0,8,125},{0,8,61},{0,9,219},{18,7,23}, - {0,8,109},{0,8,45},{0,9,187},{0,8,13},{0,8,141},{0,8,77},{0,9,251}, - {16,7,3},{0,8,83},{0,8,19},{21,8,195},{19,7,35},{0,8,115},{0,8,51}, - {0,9,199},{17,7,11},{0,8,99},{0,8,35},{0,9,167},{0,8,3},{0,8,131}, - {0,8,67},{0,9,231},{16,7,7},{0,8,91},{0,8,27},{0,9,151},{20,7,67}, - {0,8,123},{0,8,59},{0,9,215},{18,7,19},{0,8,107},{0,8,43},{0,9,183}, - {0,8,11},{0,8,139},{0,8,75},{0,9,247},{16,7,5},{0,8,87},{0,8,23}, - {64,8,0},{19,7,51},{0,8,119},{0,8,55},{0,9,207},{17,7,15},{0,8,103}, - {0,8,39},{0,9,175},{0,8,7},{0,8,135},{0,8,71},{0,9,239},{16,7,9}, - {0,8,95},{0,8,31},{0,9,159},{20,7,99},{0,8,127},{0,8,63},{0,9,223}, - {18,7,27},{0,8,111},{0,8,47},{0,9,191},{0,8,15},{0,8,143},{0,8,79}, - {0,9,255} - }; - - static const code distfix[32] = { - {16,5,1},{23,5,257},{19,5,17},{27,5,4097},{17,5,5},{25,5,1025}, - {21,5,65},{29,5,16385},{16,5,3},{24,5,513},{20,5,33},{28,5,8193}, - {18,5,9},{26,5,2049},{22,5,129},{64,5,0},{16,5,2},{23,5,385}, - {19,5,25},{27,5,6145},{17,5,7},{25,5,1537},{21,5,97},{29,5,24577}, - {16,5,4},{24,5,769},{20,5,49},{28,5,12289},{18,5,13},{26,5,3073}, - {22,5,193},{64,5,0} - }; diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inflate.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inflate.h deleted file mode 100644 index 07bd3e78a7..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inflate.h +++ /dev/null @@ -1,115 +0,0 @@ -/* inflate.h -- internal inflate state definition - * Copyright (C) 1995-2004 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* define NO_GZIP when compiling if you want to disable gzip header and - trailer decoding by inflate(). NO_GZIP would be used to avoid linking in - the crc code when it is not needed. For shared libraries, gzip decoding - should be left enabled. */ -#ifndef NO_GZIP -# define GUNZIP -#endif - -/* Possible inflate modes between inflate() calls */ -typedef enum { - HEAD, /* i: waiting for magic header */ - FLAGS, /* i: waiting for method and flags (gzip) */ - TIME, /* i: waiting for modification time (gzip) */ - OS, /* i: waiting for extra flags and operating system (gzip) */ - EXLEN, /* i: waiting for extra length (gzip) */ - EXTRA, /* i: waiting for extra bytes (gzip) */ - NAME, /* i: waiting for end of file name (gzip) */ - COMMENT, /* i: waiting for end of comment (gzip) */ - HCRC, /* i: waiting for header crc (gzip) */ - DICTID, /* i: waiting for dictionary check value */ - DICT, /* waiting for inflateSetDictionary() call */ - TYPE, /* i: waiting for type bits, including last-flag bit */ - TYPEDO, /* i: same, but skip check to exit inflate on new block */ - STORED, /* i: waiting for stored size (length and complement) */ - COPY, /* i/o: waiting for input or output to copy stored block */ - TABLE, /* i: waiting for dynamic block table lengths */ - LENLENS, /* i: waiting for code length code lengths */ - CODELENS, /* i: waiting for length/lit and distance code lengths */ - LEN, /* i: waiting for length/lit code */ - LENEXT, /* i: waiting for length extra bits */ - DIST, /* i: waiting for distance code */ - DISTEXT, /* i: waiting for distance extra bits */ - MATCH, /* o: waiting for output space to copy string */ - LIT, /* o: waiting for output space to write literal */ - CHECK, /* i: waiting for 32-bit check value */ - LENGTH, /* i: waiting for 32-bit length (gzip) */ - DONE, /* finished check, done -- remain here until reset */ - BAD, /* got a data error -- remain here until reset */ - MEM, /* got an inflate() memory error -- remain here until reset */ - SYNC /* looking for synchronization bytes to restart inflate() */ -} inflate_mode; - -/* - State transitions between above modes - - - (most modes can go to the BAD or MEM mode -- not shown for clarity) - - Process header: - HEAD -> (gzip) or (zlib) - (gzip) -> FLAGS -> TIME -> OS -> EXLEN -> EXTRA -> NAME - NAME -> COMMENT -> HCRC -> TYPE - (zlib) -> DICTID or TYPE - DICTID -> DICT -> TYPE - Read deflate blocks: - TYPE -> STORED or TABLE or LEN or CHECK - STORED -> COPY -> TYPE - TABLE -> LENLENS -> CODELENS -> LEN - Read deflate codes: - LEN -> LENEXT or LIT or TYPE - LENEXT -> DIST -> DISTEXT -> MATCH -> LEN - LIT -> LEN - Process trailer: - CHECK -> LENGTH -> DONE - */ - -/* state maintained between inflate() calls. Approximately 7K bytes. */ -struct inflate_state { - inflate_mode mode; /* current inflate mode */ - int last; /* true if processing last block */ - int wrap; /* bit 0 true for zlib, bit 1 true for gzip */ - int havedict; /* true if dictionary provided */ - int flags; /* gzip header method and flags (0 if zlib) */ - unsigned dmax; /* zlib header max distance (INFLATE_STRICT) */ - unsigned long check; /* protected copy of check value */ - unsigned long total; /* protected copy of output count */ - gz_headerp head; /* where to save gzip header information */ - /* sliding window */ - unsigned wbits; /* log base 2 of requested window size */ - unsigned wsize; /* window size or zero if not using window */ - unsigned whave; /* valid bytes in the window */ - unsigned write; /* window write index */ - unsigned char FAR *window; /* allocated sliding window, if needed */ - /* bit accumulator */ - unsigned long hold; /* input bit accumulator */ - unsigned bits; /* number of bits in "in" */ - /* for string and stored block copying */ - unsigned length; /* literal or length of data to copy */ - unsigned offset; /* distance back to copy string from */ - /* for table and code decoding */ - unsigned extra; /* extra bits needed */ - /* fixed and dynamic code tables */ - code const FAR *lencode; /* starting table for length/literal codes */ - code const FAR *distcode; /* starting table for distance codes */ - unsigned lenbits; /* index bits for lencode */ - unsigned distbits; /* index bits for distcode */ - /* dynamic table building */ - unsigned ncode; /* number of code length code lengths */ - unsigned nlen; /* number of length code lengths */ - unsigned ndist; /* number of distance code lengths */ - unsigned have; /* number of code lengths in lens[] */ - code FAR *next; /* next available space in codes[] */ - unsigned short lens[320]; /* temporary storage for code lengths */ - unsigned short work[288]; /* work area for code table building */ - code codes[ENOUGH]; /* space for code tables */ -}; diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inftrees.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inftrees.h deleted file mode 100644 index b1104c87e7..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/inftrees.h +++ /dev/null @@ -1,55 +0,0 @@ -/* inftrees.h -- header to use inftrees.c - * Copyright (C) 1995-2005 Mark Adler - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* Structure for decoding tables. Each entry provides either the - information needed to do the operation requested by the code that - indexed that table entry, or it provides a pointer to another - table that indexes more bits of the code. op indicates whether - the entry is a pointer to another table, a literal, a length or - distance, an end-of-block, or an invalid code. For a table - pointer, the low four bits of op is the number of index bits of - that table. For a length or distance, the low four bits of op - is the number of extra bits to get after the code. bits is - the number of bits in this code or part of the code to drop off - of the bit buffer. val is the actual byte to output in the case - of a literal, the base length or distance, or the offset from - the current table to the next table. Each entry is four bytes. */ -typedef struct { - unsigned char op; /* operation, extra bits, table bits */ - unsigned char bits; /* bits in this part of the code */ - unsigned short val; /* offset in table or code value */ -} code; - -/* op values as set by inflate_table(): - 00000000 - literal - 0000tttt - table link, tttt != 0 is the number of table index bits - 0001eeee - length or distance, eeee is the number of extra bits - 01100000 - end of block - 01000000 - invalid code - */ - -/* Maximum size of dynamic tree. The maximum found in a long but non- - exhaustive search was 1444 code structures (852 for length/literals - and 592 for distances, the latter actually the result of an - exhaustive search). The true maximum is not known, but the value - below is more than safe. */ -#define ENOUGH 2048 -#define MAXD 592 - -/* Type of code to build for inftable() */ -typedef enum { - CODES, - LENS, - DISTS -} codetype; - -extern int inflate_table OF((codetype type, unsigned short FAR *lens, - unsigned codes, code FAR * FAR *table, - unsigned FAR *bits, unsigned short FAR *work)); diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/trees.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/trees.h deleted file mode 100644 index 72facf900f..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/trees.h +++ /dev/null @@ -1,128 +0,0 @@ -/* header created automatically with -DGEN_TREES_H */ - -local const ct_data static_ltree[L_CODES+2] = { -{{ 12},{ 8}}, {{140},{ 8}}, {{ 76},{ 8}}, {{204},{ 8}}, {{ 44},{ 8}}, -{{172},{ 8}}, {{108},{ 8}}, {{236},{ 8}}, {{ 28},{ 8}}, {{156},{ 8}}, -{{ 92},{ 8}}, {{220},{ 8}}, {{ 60},{ 8}}, {{188},{ 8}}, {{124},{ 8}}, -{{252},{ 8}}, {{ 2},{ 8}}, {{130},{ 8}}, {{ 66},{ 8}}, {{194},{ 8}}, -{{ 34},{ 8}}, {{162},{ 8}}, {{ 98},{ 8}}, {{226},{ 8}}, {{ 18},{ 8}}, -{{146},{ 8}}, {{ 82},{ 8}}, {{210},{ 8}}, {{ 50},{ 8}}, {{178},{ 8}}, -{{114},{ 8}}, {{242},{ 8}}, {{ 10},{ 8}}, {{138},{ 8}}, {{ 74},{ 8}}, -{{202},{ 8}}, {{ 42},{ 8}}, {{170},{ 8}}, {{106},{ 8}}, {{234},{ 8}}, -{{ 26},{ 8}}, {{154},{ 8}}, {{ 90},{ 8}}, {{218},{ 8}}, {{ 58},{ 8}}, -{{186},{ 8}}, {{122},{ 8}}, {{250},{ 8}}, {{ 6},{ 8}}, {{134},{ 8}}, -{{ 70},{ 8}}, {{198},{ 8}}, {{ 38},{ 8}}, {{166},{ 8}}, {{102},{ 8}}, -{{230},{ 8}}, {{ 22},{ 8}}, {{150},{ 8}}, {{ 86},{ 8}}, {{214},{ 8}}, -{{ 54},{ 8}}, {{182},{ 8}}, {{118},{ 8}}, {{246},{ 8}}, {{ 14},{ 8}}, -{{142},{ 8}}, {{ 78},{ 8}}, {{206},{ 8}}, {{ 46},{ 8}}, {{174},{ 8}}, -{{110},{ 8}}, {{238},{ 8}}, {{ 30},{ 8}}, {{158},{ 8}}, {{ 94},{ 8}}, -{{222},{ 8}}, {{ 62},{ 8}}, {{190},{ 8}}, {{126},{ 8}}, {{254},{ 8}}, -{{ 1},{ 8}}, {{129},{ 8}}, {{ 65},{ 8}}, {{193},{ 8}}, {{ 33},{ 8}}, -{{161},{ 8}}, {{ 97},{ 8}}, {{225},{ 8}}, {{ 17},{ 8}}, {{145},{ 8}}, -{{ 81},{ 8}}, {{209},{ 8}}, {{ 49},{ 8}}, {{177},{ 8}}, {{113},{ 8}}, -{{241},{ 8}}, {{ 9},{ 8}}, {{137},{ 8}}, {{ 73},{ 8}}, {{201},{ 8}}, -{{ 41},{ 8}}, {{169},{ 8}}, {{105},{ 8}}, {{233},{ 8}}, {{ 25},{ 8}}, -{{153},{ 8}}, {{ 89},{ 8}}, {{217},{ 8}}, {{ 57},{ 8}}, {{185},{ 8}}, -{{121},{ 8}}, {{249},{ 8}}, {{ 5},{ 8}}, {{133},{ 8}}, {{ 69},{ 8}}, -{{197},{ 8}}, {{ 37},{ 8}}, {{165},{ 8}}, {{101},{ 8}}, {{229},{ 8}}, -{{ 21},{ 8}}, {{149},{ 8}}, {{ 85},{ 8}}, {{213},{ 8}}, {{ 53},{ 8}}, -{{181},{ 8}}, {{117},{ 8}}, {{245},{ 8}}, {{ 13},{ 8}}, {{141},{ 8}}, -{{ 77},{ 8}}, {{205},{ 8}}, {{ 45},{ 8}}, {{173},{ 8}}, {{109},{ 8}}, -{{237},{ 8}}, {{ 29},{ 8}}, {{157},{ 8}}, {{ 93},{ 8}}, {{221},{ 8}}, -{{ 61},{ 8}}, {{189},{ 8}}, {{125},{ 8}}, {{253},{ 8}}, {{ 19},{ 9}}, -{{275},{ 9}}, {{147},{ 9}}, {{403},{ 9}}, {{ 83},{ 9}}, {{339},{ 9}}, -{{211},{ 9}}, {{467},{ 9}}, {{ 51},{ 9}}, {{307},{ 9}}, {{179},{ 9}}, -{{435},{ 9}}, {{115},{ 9}}, {{371},{ 9}}, {{243},{ 9}}, {{499},{ 9}}, -{{ 11},{ 9}}, {{267},{ 9}}, {{139},{ 9}}, {{395},{ 9}}, {{ 75},{ 9}}, -{{331},{ 9}}, {{203},{ 9}}, {{459},{ 9}}, {{ 43},{ 9}}, {{299},{ 9}}, -{{171},{ 9}}, {{427},{ 9}}, {{107},{ 9}}, {{363},{ 9}}, {{235},{ 9}}, -{{491},{ 9}}, {{ 27},{ 9}}, {{283},{ 9}}, {{155},{ 9}}, {{411},{ 9}}, -{{ 91},{ 9}}, {{347},{ 9}}, {{219},{ 9}}, {{475},{ 9}}, {{ 59},{ 9}}, -{{315},{ 9}}, {{187},{ 9}}, {{443},{ 9}}, {{123},{ 9}}, {{379},{ 9}}, -{{251},{ 9}}, {{507},{ 9}}, {{ 7},{ 9}}, {{263},{ 9}}, {{135},{ 9}}, -{{391},{ 9}}, {{ 71},{ 9}}, {{327},{ 9}}, {{199},{ 9}}, {{455},{ 9}}, -{{ 39},{ 9}}, {{295},{ 9}}, {{167},{ 9}}, {{423},{ 9}}, {{103},{ 9}}, -{{359},{ 9}}, {{231},{ 9}}, {{487},{ 9}}, {{ 23},{ 9}}, {{279},{ 9}}, -{{151},{ 9}}, {{407},{ 9}}, {{ 87},{ 9}}, {{343},{ 9}}, {{215},{ 9}}, -{{471},{ 9}}, {{ 55},{ 9}}, {{311},{ 9}}, {{183},{ 9}}, {{439},{ 9}}, -{{119},{ 9}}, {{375},{ 9}}, {{247},{ 9}}, {{503},{ 9}}, {{ 15},{ 9}}, -{{271},{ 9}}, {{143},{ 9}}, {{399},{ 9}}, {{ 79},{ 9}}, {{335},{ 9}}, -{{207},{ 9}}, {{463},{ 9}}, {{ 47},{ 9}}, {{303},{ 9}}, {{175},{ 9}}, -{{431},{ 9}}, {{111},{ 9}}, {{367},{ 9}}, {{239},{ 9}}, {{495},{ 9}}, -{{ 31},{ 9}}, {{287},{ 9}}, {{159},{ 9}}, {{415},{ 9}}, {{ 95},{ 9}}, -{{351},{ 9}}, {{223},{ 9}}, {{479},{ 9}}, {{ 63},{ 9}}, {{319},{ 9}}, -{{191},{ 9}}, {{447},{ 9}}, {{127},{ 9}}, {{383},{ 9}}, {{255},{ 9}}, -{{511},{ 9}}, {{ 0},{ 7}}, {{ 64},{ 7}}, {{ 32},{ 7}}, {{ 96},{ 7}}, -{{ 16},{ 7}}, {{ 80},{ 7}}, {{ 48},{ 7}}, {{112},{ 7}}, {{ 8},{ 7}}, -{{ 72},{ 7}}, {{ 40},{ 7}}, {{104},{ 7}}, {{ 24},{ 7}}, {{ 88},{ 7}}, -{{ 56},{ 7}}, {{120},{ 7}}, {{ 4},{ 7}}, {{ 68},{ 7}}, {{ 36},{ 7}}, -{{100},{ 7}}, {{ 20},{ 7}}, {{ 84},{ 7}}, {{ 52},{ 7}}, {{116},{ 7}}, -{{ 3},{ 8}}, {{131},{ 8}}, {{ 67},{ 8}}, {{195},{ 8}}, {{ 35},{ 8}}, -{{163},{ 8}}, {{ 99},{ 8}}, {{227},{ 8}} -}; - -local const ct_data static_dtree[D_CODES] = { -{{ 0},{ 5}}, {{16},{ 5}}, {{ 8},{ 5}}, {{24},{ 5}}, {{ 4},{ 5}}, -{{20},{ 5}}, {{12},{ 5}}, {{28},{ 5}}, {{ 2},{ 5}}, {{18},{ 5}}, -{{10},{ 5}}, {{26},{ 5}}, {{ 6},{ 5}}, {{22},{ 5}}, {{14},{ 5}}, -{{30},{ 5}}, {{ 1},{ 5}}, {{17},{ 5}}, {{ 9},{ 5}}, {{25},{ 5}}, -{{ 5},{ 5}}, {{21},{ 5}}, {{13},{ 5}}, {{29},{ 5}}, {{ 3},{ 5}}, -{{19},{ 5}}, {{11},{ 5}}, {{27},{ 5}}, {{ 7},{ 5}}, {{23},{ 5}} -}; - -const uch _dist_code[DIST_CODE_LEN] = { - 0, 1, 2, 3, 4, 4, 5, 5, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, - 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, -10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, -11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, -12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, -13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, -14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, -15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 0, 0, 16, 17, -18, 18, 19, 19, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, -28, 28, 28, 28, 28, 28, 28, 28, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, -29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29, 29 -}; - -const uch _length_code[MAX_MATCH-MIN_MATCH+1]= { - 0, 1, 2, 3, 4, 5, 6, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 12, 12, -13, 13, 13, 13, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, -17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, -19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, -21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, -22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, -23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, -25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, -26, 26, 26, 26, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, -27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 27, 28 -}; - -local const int base_length[LENGTH_CODES] = { -0, 1, 2, 3, 4, 5, 6, 7, 8, 10, 12, 14, 16, 20, 24, 28, 32, 40, 48, 56, -64, 80, 96, 112, 128, 160, 192, 224, 0 -}; - -local const int base_dist[D_CODES] = { - 0, 1, 2, 3, 4, 6, 8, 12, 16, 24, - 32, 48, 64, 96, 128, 192, 256, 384, 512, 768, - 1024, 1536, 2048, 3072, 4096, 6144, 8192, 12288, 16384, 24576 -}; - diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zconf.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zconf.h deleted file mode 100644 index 5bdcd2c56c..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zconf.h +++ /dev/null @@ -1,332 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: zconf.h,v 1.2 2006/03/02 00:10:34 zerocool Exp $ */ - -#ifndef ZCONF_H -#define ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - */ -#ifdef Z_PREFIX -# define deflateInit_ z_deflateInit_ -# define deflate z_deflate -# define deflateEnd z_deflateEnd -# define inflateInit_ z_inflateInit_ -# define inflate z_inflate -# define inflateEnd z_inflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateSetDictionary z_deflateSetDictionary -# define deflateCopy z_deflateCopy -# define deflateReset z_deflateReset -# define deflateParams z_deflateParams -# define deflateBound z_deflateBound -# define deflatePrime z_deflatePrime -# define inflateInit2_ z_inflateInit2_ -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateCopy z_inflateCopy -# define inflateReset z_inflateReset -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# define uncompress z_uncompress -# define adler32 z_adler32 -# define crc32 z_crc32 -# define get_crc_table z_get_crc_table -# define zError z_zError - -# define alloc_func z_alloc_func -# define free_func z_free_func -# define in_func z_in_func -# define out_func z_out_func -# define Byte z_Byte -# define uInt z_uInt -# define uLong z_uLong -# define Bytef z_Bytef -# define charf z_charf -# define intf z_intf -# define uIntf z_uIntf -# define uLongf z_uLongf -# define voidpf z_voidpf -# define voidp z_voidp -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ -# include /* for off_t */ -# include /* for SEEK_* and off_t */ -# ifdef VMS -# include /* for off_t */ -# endif -# define z_off_t off_t -#endif -#ifndef SEEK_SET -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif -#ifndef z_off_t -# define z_off_t long -#endif - -#if defined(__OS400__) -# define NO_vsnprintf -#endif - -#if defined(__MVS__) -# define NO_vsnprintf -# ifdef FAR -# undef FAR -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) -# pragma map(deflateInit_,"DEIN") -# pragma map(deflateInit2_,"DEIN2") -# pragma map(deflateEnd,"DEEND") -# pragma map(deflateBound,"DEBND") -# pragma map(inflateInit_,"ININ") -# pragma map(inflateInit2_,"ININ2") -# pragma map(inflateEnd,"INEND") -# pragma map(inflateSync,"INSY") -# pragma map(inflateSetDictionary,"INSEDI") -# pragma map(compressBound,"CMBND") -# pragma map(inflate_table,"INTABL") -# pragma map(inflate_fast,"INFA") -# pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zconf.in.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zconf.in.h deleted file mode 100644 index f7176a3b64..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zconf.in.h +++ /dev/null @@ -1,332 +0,0 @@ -/* zconf.h -- configuration of the zlib compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* @(#) $Id: zconf.in.h,v 1.2 2006/03/02 00:10:34 zerocool Exp $ */ - -#ifndef ZCONF_H -#define ZCONF_H - -/* - * If you *really* need a unique prefix for all types and library functions, - * compile with -DZ_PREFIX. The "standard" zlib should be compiled without it. - */ -#ifdef Z_PREFIX -# define deflateInit_ z_deflateInit_ -# define deflate z_deflate -# define deflateEnd z_deflateEnd -# define inflateInit_ z_inflateInit_ -# define inflate z_inflate -# define inflateEnd z_inflateEnd -# define deflateInit2_ z_deflateInit2_ -# define deflateSetDictionary z_deflateSetDictionary -# define deflateCopy z_deflateCopy -# define deflateReset z_deflateReset -# define deflateParams z_deflateParams -# define deflateBound z_deflateBound -# define deflatePrime z_deflatePrime -# define inflateInit2_ z_inflateInit2_ -# define inflateSetDictionary z_inflateSetDictionary -# define inflateSync z_inflateSync -# define inflateSyncPoint z_inflateSyncPoint -# define inflateCopy z_inflateCopy -# define inflateReset z_inflateReset -# define inflateBack z_inflateBack -# define inflateBackEnd z_inflateBackEnd -# define compress z_compress -# define compress2 z_compress2 -# define compressBound z_compressBound -# define uncompress z_uncompress -# define adler32 z_adler32 -# define crc32 z_crc32 -# define get_crc_table z_get_crc_table -# define zError z_zError - -# define alloc_func z_alloc_func -# define free_func z_free_func -# define in_func z_in_func -# define out_func z_out_func -# define Byte z_Byte -# define uInt z_uInt -# define uLong z_uLong -# define Bytef z_Bytef -# define charf z_charf -# define intf z_intf -# define uIntf z_uIntf -# define uLongf z_uLongf -# define voidpf z_voidpf -# define voidp z_voidp -#endif - -#if defined(__MSDOS__) && !defined(MSDOS) -# define MSDOS -#endif -#if (defined(OS_2) || defined(__OS2__)) && !defined(OS2) -# define OS2 -#endif -#if defined(_WINDOWS) && !defined(WINDOWS) -# define WINDOWS -#endif -#if defined(_WIN32) || defined(_WIN32_WCE) || defined(__WIN32__) -# ifndef WIN32 -# define WIN32 -# endif -#endif -#if (defined(MSDOS) || defined(OS2) || defined(WINDOWS)) && !defined(WIN32) -# if !defined(__GNUC__) && !defined(__FLAT__) && !defined(__386__) -# ifndef SYS16BIT -# define SYS16BIT -# endif -# endif -#endif - -/* - * Compile with -DMAXSEG_64K if the alloc function cannot allocate more - * than 64k bytes at a time (needed on systems with 16-bit int). - */ -#ifdef SYS16BIT -# define MAXSEG_64K -#endif -#ifdef MSDOS -# define UNALIGNED_OK -#endif - -#ifdef __STDC_VERSION__ -# ifndef STDC -# define STDC -# endif -# if __STDC_VERSION__ >= 199901L -# ifndef STDC99 -# define STDC99 -# endif -# endif -#endif -#if !defined(STDC) && (defined(__STDC__) || defined(__cplusplus)) -# define STDC -#endif -#if !defined(STDC) && (defined(__GNUC__) || defined(__BORLANDC__)) -# define STDC -#endif -#if !defined(STDC) && (defined(MSDOS) || defined(WINDOWS) || defined(WIN32)) -# define STDC -#endif -#if !defined(STDC) && (defined(OS2) || defined(__HOS_AIX__)) -# define STDC -#endif - -#if defined(__OS400__) && !defined(STDC) /* iSeries (formerly AS/400). */ -# define STDC -#endif - -#ifndef STDC -# ifndef const /* cannot use !defined(STDC) && !defined(const) on Mac */ -# define const /* note: need a more gentle solution here */ -# endif -#endif - -/* Some Mac compilers merge all .h files incorrectly: */ -#if defined(__MWERKS__)||defined(applec)||defined(THINK_C)||defined(__SC__) -# define NO_DUMMY_DECL -#endif - -/* Maximum value for memLevel in deflateInit2 */ -#ifndef MAX_MEM_LEVEL -# ifdef MAXSEG_64K -# define MAX_MEM_LEVEL 8 -# else -# define MAX_MEM_LEVEL 9 -# endif -#endif - -/* Maximum value for windowBits in deflateInit2 and inflateInit2. - * WARNING: reducing MAX_WBITS makes minigzip unable to extract .gz files - * created by gzip. (Files created by minigzip can still be extracted by - * gzip.) - */ -#ifndef MAX_WBITS -# define MAX_WBITS 15 /* 32K LZ77 window */ -#endif - -/* The memory requirements for deflate are (in bytes): - (1 << (windowBits+2)) + (1 << (memLevel+9)) - that is: 128K for windowBits=15 + 128K for memLevel = 8 (default values) - plus a few kilobytes for small objects. For example, if you want to reduce - the default memory requirements from 256K to 128K, compile with - make CFLAGS="-O -DMAX_WBITS=14 -DMAX_MEM_LEVEL=7" - Of course this will generally degrade compression (there's no free lunch). - - The memory requirements for inflate are (in bytes) 1 << windowBits - that is, 32K for windowBits=15 (default value) plus a few kilobytes - for small objects. -*/ - - /* Type declarations */ - -#ifndef OF /* function prototypes */ -# ifdef STDC -# define OF(args) args -# else -# define OF(args) () -# endif -#endif - -/* The following definitions for FAR are needed only for MSDOS mixed - * model programming (small or medium model with some far allocations). - * This was tested only with MSC; for other MSDOS compilers you may have - * to define NO_MEMCPY in zutil.h. If you don't need the mixed model, - * just define FAR to be empty. - */ -#ifdef SYS16BIT -# if defined(M_I86SM) || defined(M_I86MM) - /* MSC small or medium model */ -# define SMALL_MEDIUM -# ifdef _MSC_VER -# define FAR _far -# else -# define FAR far -# endif -# endif -# if (defined(__SMALL__) || defined(__MEDIUM__)) - /* Turbo C small or medium model */ -# define SMALL_MEDIUM -# ifdef __BORLANDC__ -# define FAR _far -# else -# define FAR far -# endif -# endif -#endif - -#if defined(WINDOWS) || defined(WIN32) - /* If building or using zlib as a DLL, define ZLIB_DLL. - * This is not mandatory, but it offers a little performance increase. - */ -# ifdef ZLIB_DLL -# if defined(WIN32) && (!defined(__BORLANDC__) || (__BORLANDC__ >= 0x500)) -# ifdef ZLIB_INTERNAL -# define ZEXTERN extern __declspec(dllexport) -# else -# define ZEXTERN extern __declspec(dllimport) -# endif -# endif -# endif /* ZLIB_DLL */ - /* If building or using zlib with the WINAPI/WINAPIV calling convention, - * define ZLIB_WINAPI. - * Caution: the standard ZLIB1.DLL is NOT compiled using ZLIB_WINAPI. - */ -# ifdef ZLIB_WINAPI -# ifdef FAR -# undef FAR -# endif -# include - /* No need for _export, use ZLIB.DEF instead. */ - /* For complete Windows compatibility, use WINAPI, not __stdcall. */ -# define ZEXPORT WINAPI -# ifdef WIN32 -# define ZEXPORTVA WINAPIV -# else -# define ZEXPORTVA FAR CDECL -# endif -# endif -#endif - -#if defined (__BEOS__) -# ifdef ZLIB_DLL -# ifdef ZLIB_INTERNAL -# define ZEXPORT __declspec(dllexport) -# define ZEXPORTVA __declspec(dllexport) -# else -# define ZEXPORT __declspec(dllimport) -# define ZEXPORTVA __declspec(dllimport) -# endif -# endif -#endif - -#ifndef ZEXTERN -# define ZEXTERN extern -#endif -#ifndef ZEXPORT -# define ZEXPORT -#endif -#ifndef ZEXPORTVA -# define ZEXPORTVA -#endif - -#ifndef FAR -# define FAR -#endif - -#if !defined(__MACTYPES__) -typedef unsigned char Byte; /* 8 bits */ -#endif -typedef unsigned int uInt; /* 16 bits or more */ -typedef unsigned long uLong; /* 32 bits or more */ - -#ifdef SMALL_MEDIUM - /* Borland C/C++ and some old MSC versions ignore FAR inside typedef */ -# define Bytef Byte FAR -#else - typedef Byte FAR Bytef; -#endif -typedef char FAR charf; -typedef int FAR intf; -typedef uInt FAR uIntf; -typedef uLong FAR uLongf; - -#ifdef STDC - typedef void const *voidpc; - typedef void FAR *voidpf; - typedef void *voidp; -#else - typedef Byte const *voidpc; - typedef Byte FAR *voidpf; - typedef Byte *voidp; -#endif - -#if 0 /* HAVE_UNISTD_H -- this line is updated by ./configure */ -# include /* for off_t */ -# include /* for SEEK_* and off_t */ -# ifdef VMS -# include /* for off_t */ -# endif -# define z_off_t off_t -#endif -#ifndef SEEK_SET -# define SEEK_SET 0 /* Seek from beginning of file. */ -# define SEEK_CUR 1 /* Seek from current position. */ -# define SEEK_END 2 /* Set file pointer to EOF plus "offset" */ -#endif -#ifndef z_off_t -# define z_off_t long -#endif - -#if defined(__OS400__) -# define NO_vsnprintf -#endif - -#if defined(__MVS__) -# define NO_vsnprintf -# ifdef FAR -# undef FAR -# endif -#endif - -/* MVS linker does not support external names larger than 8 bytes */ -#if defined(__MVS__) -# pragma map(deflateInit_,"DEIN") -# pragma map(deflateInit2_,"DEIN2") -# pragma map(deflateEnd,"DEEND") -# pragma map(deflateBound,"DEBND") -# pragma map(inflateInit_,"ININ") -# pragma map(inflateInit2_,"ININ2") -# pragma map(inflateEnd,"INEND") -# pragma map(inflateSync,"INSY") -# pragma map(inflateSetDictionary,"INSEDI") -# pragma map(compressBound,"CMBND") -# pragma map(inflate_table,"INTABL") -# pragma map(inflate_fast,"INFA") -# pragma map(inflate_copyright,"INCOPY") -#endif - -#endif /* ZCONF_H */ diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zlib.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zlib.h deleted file mode 100644 index 022817927c..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zlib.h +++ /dev/null @@ -1,1357 +0,0 @@ -/* zlib.h -- interface of the 'zlib' general purpose compression library - version 1.2.3, July 18th, 2005 - - Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler - - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented; you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - 3. This notice may not be removed or altered from any source distribution. - - Jean-loup Gailly Mark Adler - jloup@gzip.org madler@alumni.caltech.edu - - - The data format used by the zlib library is described by RFCs (Request for - Comments) 1950 to 1952 in the files http://www.ietf.org/rfc/rfc1950.txt - (zlib format), rfc1951.txt (deflate format) and rfc1952.txt (gzip format). -*/ - -#ifndef ZLIB_H -#define ZLIB_H - -#include "zconf.h" - -#ifdef __cplusplus -extern "C" { -#endif - -#define ZLIB_VERSION "1.2.3" -#define ZLIB_VERNUM 0x1230 - -/* - The 'zlib' compression library provides in-memory compression and - decompression functions, including integrity checks of the uncompressed - data. This version of the library supports only one compression method - (deflation) but other algorithms will be added later and will have the same - stream interface. - - Compression can be done in a single step if the buffers are large - enough (for example if an input file is mmap'ed), or can be done by - repeated calls of the compression function. In the latter case, the - application must provide more input and/or consume the output - (providing more output space) before each call. - - The compressed data format used by default by the in-memory functions is - the zlib format, which is a zlib wrapper documented in RFC 1950, wrapped - around a deflate stream, which is itself documented in RFC 1951. - - The library also supports reading and writing files in gzip (.gz) format - with an interface similar to that of stdio using the functions that start - with "gz". The gzip format is different from the zlib format. gzip is a - gzip wrapper, documented in RFC 1952, wrapped around a deflate stream. - - This library can optionally read and write gzip streams in memory as well. - - The zlib format was designed to be compact and fast for use in memory - and on communications channels. The gzip format was designed for single- - file compression on file systems, has a larger header than zlib to maintain - directory information, and uses a different, slower check method than zlib. - - The library does not install any signal handler. The decoder checks - the consistency of the compressed data, so the library should never - crash even in case of corrupted input. -*/ - -typedef voidpf (*alloc_func) OF((voidpf opaque, uInt items, uInt size)); -typedef void (*free_func) OF((voidpf opaque, voidpf address)); - -struct internal_state; - -typedef struct z_stream_s { - Bytef *next_in; /* next input byte */ - uInt avail_in; /* number of bytes available at next_in */ - uLong total_in; /* total nb of input bytes read so far */ - - Bytef *next_out; /* next output byte should be put there */ - uInt avail_out; /* remaining free space at next_out */ - uLong total_out; /* total nb of bytes output so far */ - - char *msg; /* last error message, NULL if no error */ - struct internal_state FAR *state; /* not visible by applications */ - - alloc_func zalloc; /* used to allocate the internal state */ - free_func zfree; /* used to free the internal state */ - voidpf opaque; /* private data object passed to zalloc and zfree */ - - int data_type; /* best guess about the data type: binary or text */ - uLong adler; /* adler32 value of the uncompressed data */ - uLong reserved; /* reserved for future use */ -} z_stream; - -typedef z_stream FAR *z_streamp; - -/* - gzip header information passed to and from zlib routines. See RFC 1952 - for more details on the meanings of these fields. -*/ -typedef struct gz_header_s { - int text; /* true if compressed data believed to be text */ - uLong time; /* modification time */ - int xflags; /* extra flags (not used when writing a gzip file) */ - int os; /* operating system */ - Bytef *extra; /* pointer to extra field or Z_NULL if none */ - uInt extra_len; /* extra field length (valid if extra != Z_NULL) */ - uInt extra_max; /* space at extra (only when reading header) */ - Bytef *name; /* pointer to zero-terminated file name or Z_NULL */ - uInt name_max; /* space at name (only when reading header) */ - Bytef *comment; /* pointer to zero-terminated comment or Z_NULL */ - uInt comm_max; /* space at comment (only when reading header) */ - int hcrc; /* true if there was or will be a header crc */ - int done; /* true when done reading gzip header (not used - when writing a gzip file) */ -} gz_header; - -typedef gz_header FAR *gz_headerp; - -/* - The application must update next_in and avail_in when avail_in has - dropped to zero. It must update next_out and avail_out when avail_out - has dropped to zero. The application must initialize zalloc, zfree and - opaque before calling the init function. All other fields are set by the - compression library and must not be updated by the application. - - The opaque value provided by the application will be passed as the first - parameter for calls of zalloc and zfree. This can be useful for custom - memory management. The compression library attaches no meaning to the - opaque value. - - zalloc must return Z_NULL if there is not enough memory for the object. - If zlib is used in a multi-threaded application, zalloc and zfree must be - thread safe. - - On 16-bit systems, the functions zalloc and zfree must be able to allocate - exactly 65536 bytes, but will not be required to allocate more than this - if the symbol MAXSEG_64K is defined (see zconf.h). WARNING: On MSDOS, - pointers returned by zalloc for objects of exactly 65536 bytes *must* - have their offset normalized to zero. The default allocation function - provided by this library ensures this (see zutil.c). To reduce memory - requirements and avoid any allocation of 64K objects, at the expense of - compression ratio, compile the library with -DMAX_WBITS=14 (see zconf.h). - - The fields total_in and total_out can be used for statistics or - progress reports. After compression, total_in holds the total size of - the uncompressed data and may be saved for use in the decompressor - (particularly if the decompressor wants to decompress everything in - a single step). -*/ - - /* constants */ - -#define Z_NO_FLUSH 0 -#define Z_PARTIAL_FLUSH 1 /* will be removed, use Z_SYNC_FLUSH instead */ -#define Z_SYNC_FLUSH 2 -#define Z_FULL_FLUSH 3 -#define Z_FINISH 4 -#define Z_BLOCK 5 -/* Allowed flush values; see deflate() and inflate() below for details */ - -#define Z_OK 0 -#define Z_STREAM_END 1 -#define Z_NEED_DICT 2 -#define Z_ERRNO (-1) -#define Z_STREAM_ERROR (-2) -#define Z_DATA_ERROR (-3) -#define Z_MEM_ERROR (-4) -#define Z_BUF_ERROR (-5) -#define Z_VERSION_ERROR (-6) -/* Return codes for the compression/decompression functions. Negative - * values are errors, positive values are used for special but normal events. - */ - -#define Z_NO_COMPRESSION 0 -#define Z_BEST_SPEED 1 -#define Z_BEST_COMPRESSION 9 -#define Z_DEFAULT_COMPRESSION (-1) -/* compression levels */ - -#define Z_FILTERED 1 -#define Z_HUFFMAN_ONLY 2 -#define Z_RLE 3 -#define Z_FIXED 4 -#define Z_DEFAULT_STRATEGY 0 -/* compression strategy; see deflateInit2() below for details */ - -#define Z_BINARY 0 -#define Z_TEXT 1 -#define Z_ASCII Z_TEXT /* for compatibility with 1.2.2 and earlier */ -#define Z_UNKNOWN 2 -/* Possible values of the data_type field (though see inflate()) */ - -#define Z_DEFLATED 8 -/* The deflate compression method (the only one supported in this version) */ - -#define Z_NULL 0 /* for initializing zalloc, zfree, opaque */ - -#define zlib_version zlibVersion() -/* for compatibility with versions < 1.0.2 */ - - /* basic functions */ - -ZEXTERN const char * ZEXPORT zlibVersion OF((void)); -/* The application can compare zlibVersion and ZLIB_VERSION for consistency. - If the first character differs, the library code actually used is - not compatible with the zlib.h header file used by the application. - This check is automatically made by deflateInit and inflateInit. - */ - -/* -ZEXTERN int ZEXPORT deflateInit OF((z_streamp strm, int level)); - - Initializes the internal stream state for compression. The fields - zalloc, zfree and opaque must be initialized before by the caller. - If zalloc and zfree are set to Z_NULL, deflateInit updates them to - use default allocation functions. - - The compression level must be Z_DEFAULT_COMPRESSION, or between 0 and 9: - 1 gives best speed, 9 gives best compression, 0 gives no compression at - all (the input data is simply copied a block at a time). - Z_DEFAULT_COMPRESSION requests a default compromise between speed and - compression (currently equivalent to level 6). - - deflateInit returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if level is not a valid compression level, - Z_VERSION_ERROR if the zlib library version (zlib_version) is incompatible - with the version assumed by the caller (ZLIB_VERSION). - msg is set to null if there is no error message. deflateInit does not - perform any compression: this will be done by deflate(). -*/ - - -ZEXTERN int ZEXPORT deflate OF((z_streamp strm, int flush)); -/* - deflate compresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce some - output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. deflate performs one or both of the - following actions: - - - Compress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in and avail_in are updated and - processing will resume at this point for the next call of deflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. This action is forced if the parameter flush is non zero. - Forcing flush frequently degrades the compression ratio, so this parameter - should be set only when necessary (in interactive applications). - Some output may be provided even if flush is not set. - - Before the call of deflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating avail_in or avail_out accordingly; avail_out - should never be zero before the call. The application can consume the - compressed output when it wants, for example when the output buffer is full - (avail_out == 0), or after each call of deflate(). If deflate returns Z_OK - and with zero avail_out, it must be called again after making room in the - output buffer because there might be more output pending. - - Normally the parameter flush is set to Z_NO_FLUSH, which allows deflate to - decide how much data to accumualte before producing output, in order to - maximize compression. - - If the parameter flush is set to Z_SYNC_FLUSH, all pending output is - flushed to the output buffer and the output is aligned on a byte boundary, so - that the decompressor can get all input data available so far. (In particular - avail_in is zero after the call if enough output space has been provided - before the call.) Flushing may degrade compression for some compression - algorithms and so it should be used only when necessary. - - If flush is set to Z_FULL_FLUSH, all output is flushed as with - Z_SYNC_FLUSH, and the compression state is reset so that decompression can - restart from this point if previous compressed data has been damaged or if - random access is desired. Using Z_FULL_FLUSH too often can seriously degrade - compression. - - If deflate returns with avail_out == 0, this function must be called again - with the same value of the flush parameter and more output space (updated - avail_out), until the flush is complete (deflate returns with non-zero - avail_out). In the case of a Z_FULL_FLUSH or Z_SYNC_FLUSH, make sure that - avail_out is greater than six to avoid repeated flush markers due to - avail_out == 0 on return. - - If the parameter flush is set to Z_FINISH, pending input is processed, - pending output is flushed and deflate returns with Z_STREAM_END if there - was enough output space; if deflate returns with Z_OK, this function must be - called again with Z_FINISH and more output space (updated avail_out) but no - more input data, until it returns with Z_STREAM_END or an error. After - deflate has returned Z_STREAM_END, the only possible operations on the - stream are deflateReset or deflateEnd. - - Z_FINISH can be used immediately after deflateInit if all the compression - is to be done in a single step. In this case, avail_out must be at least - the value returned by deflateBound (see below). If deflate does not return - Z_STREAM_END, then it must be called again as described above. - - deflate() sets strm->adler to the adler32 checksum of all input read - so far (that is, total_in bytes). - - deflate() may update strm->data_type if it can make a good guess about - the input data type (Z_BINARY or Z_TEXT). In doubt, the data is considered - binary. This field is only for information purposes and does not affect - the compression algorithm in any manner. - - deflate() returns Z_OK if some progress has been made (more input - processed or more output produced), Z_STREAM_END if all input has been - consumed and all output has been produced (only when flush is set to - Z_FINISH), Z_STREAM_ERROR if the stream state was inconsistent (for example - if next_in or next_out was NULL), Z_BUF_ERROR if no progress is possible - (for example avail_in or avail_out was zero). Note that Z_BUF_ERROR is not - fatal, and deflate() can be called again with more input and more output - space to continue compressing. -*/ - - -ZEXTERN int ZEXPORT deflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. - - deflateEnd returns Z_OK if success, Z_STREAM_ERROR if the - stream state was inconsistent, Z_DATA_ERROR if the stream was freed - prematurely (some input or output was discarded). In the error case, - msg may be set but then points to a static string (which must not be - deallocated). -*/ - - -/* -ZEXTERN int ZEXPORT inflateInit OF((z_streamp strm)); - - Initializes the internal stream state for decompression. The fields - next_in, avail_in, zalloc, zfree and opaque must be initialized before by - the caller. If next_in is not Z_NULL and avail_in is large enough (the exact - value depends on the compression method), inflateInit determines the - compression method from the zlib header and allocates all data structures - accordingly; otherwise the allocation will be deferred to the first call of - inflate. If zalloc and zfree are set to Z_NULL, inflateInit updates them to - use default allocation functions. - - inflateInit returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_VERSION_ERROR if the zlib library version is incompatible with the - version assumed by the caller. msg is set to null if there is no error - message. inflateInit does not perform any decompression apart from reading - the zlib header if present: this will be done by inflate(). (So next_in and - avail_in may be modified, but next_out and avail_out are unchanged.) -*/ - - -ZEXTERN int ZEXPORT inflate OF((z_streamp strm, int flush)); -/* - inflate decompresses as much data as possible, and stops when the input - buffer becomes empty or the output buffer becomes full. It may introduce - some output latency (reading input without producing any output) except when - forced to flush. - - The detailed semantics are as follows. inflate performs one or both of the - following actions: - - - Decompress more input starting at next_in and update next_in and avail_in - accordingly. If not all input can be processed (because there is not - enough room in the output buffer), next_in is updated and processing - will resume at this point for the next call of inflate(). - - - Provide more output starting at next_out and update next_out and avail_out - accordingly. inflate() provides as much output as possible, until there - is no more input data or no more space in the output buffer (see below - about the flush parameter). - - Before the call of inflate(), the application should ensure that at least - one of the actions is possible, by providing more input and/or consuming - more output, and updating the next_* and avail_* values accordingly. - The application can consume the uncompressed output when it wants, for - example when the output buffer is full (avail_out == 0), or after each - call of inflate(). If inflate returns Z_OK and with zero avail_out, it - must be called again after making room in the output buffer because there - might be more output pending. - - The flush parameter of inflate() can be Z_NO_FLUSH, Z_SYNC_FLUSH, - Z_FINISH, or Z_BLOCK. Z_SYNC_FLUSH requests that inflate() flush as much - output as possible to the output buffer. Z_BLOCK requests that inflate() stop - if and when it gets to the next deflate block boundary. When decoding the - zlib or gzip format, this will cause inflate() to return immediately after - the header and before the first block. When doing a raw inflate, inflate() - will go ahead and process the first block, and will return when it gets to - the end of that block, or when it runs out of data. - - The Z_BLOCK option assists in appending to or combining deflate streams. - Also to assist in this, on return inflate() will set strm->data_type to the - number of unused bits in the last byte taken from strm->next_in, plus 64 - if inflate() is currently decoding the last block in the deflate stream, - plus 128 if inflate() returned immediately after decoding an end-of-block - code or decoding the complete header up to just before the first byte of the - deflate stream. The end-of-block will not be indicated until all of the - uncompressed data from that block has been written to strm->next_out. The - number of unused bits may in general be greater than seven, except when - bit 7 of data_type is set, in which case the number of unused bits will be - less than eight. - - inflate() should normally be called until it returns Z_STREAM_END or an - error. However if all decompression is to be performed in a single step - (a single call of inflate), the parameter flush should be set to - Z_FINISH. In this case all pending input is processed and all pending - output is flushed; avail_out must be large enough to hold all the - uncompressed data. (The size of the uncompressed data may have been saved - by the compressor for this purpose.) The next operation on this stream must - be inflateEnd to deallocate the decompression state. The use of Z_FINISH - is never required, but can be used to inform inflate that a faster approach - may be used for the single inflate() call. - - In this implementation, inflate() always flushes as much output as - possible to the output buffer, and always uses the faster approach on the - first call. So the only effect of the flush parameter in this implementation - is on the return value of inflate(), as noted below, or when it returns early - because Z_BLOCK is used. - - If a preset dictionary is needed after this call (see inflateSetDictionary - below), inflate sets strm->adler to the adler32 checksum of the dictionary - chosen by the compressor and returns Z_NEED_DICT; otherwise it sets - strm->adler to the adler32 checksum of all output produced so far (that is, - total_out bytes) and returns Z_OK, Z_STREAM_END or an error code as described - below. At the end of the stream, inflate() checks that its computed adler32 - checksum is equal to that saved by the compressor and returns Z_STREAM_END - only if the checksum is correct. - - inflate() will decompress and check either zlib-wrapped or gzip-wrapped - deflate data. The header type is detected automatically. Any information - contained in the gzip header is not retained, so applications that need that - information should instead use raw inflate, see inflateInit2() below, or - inflateBack() and perform their own processing of the gzip header and - trailer. - - inflate() returns Z_OK if some progress has been made (more input processed - or more output produced), Z_STREAM_END if the end of the compressed data has - been reached and all uncompressed output has been produced, Z_NEED_DICT if a - preset dictionary is needed at this point, Z_DATA_ERROR if the input data was - corrupted (input stream not conforming to the zlib format or incorrect check - value), Z_STREAM_ERROR if the stream structure was inconsistent (for example - if next_in or next_out was NULL), Z_MEM_ERROR if there was not enough memory, - Z_BUF_ERROR if no progress is possible or if there was not enough room in the - output buffer when Z_FINISH is used. Note that Z_BUF_ERROR is not fatal, and - inflate() can be called again with more input and more output space to - continue decompressing. If Z_DATA_ERROR is returned, the application may then - call inflateSync() to look for a good compression block if a partial recovery - of the data is desired. -*/ - - -ZEXTERN int ZEXPORT inflateEnd OF((z_streamp strm)); -/* - All dynamically allocated data structures for this stream are freed. - This function discards any unprocessed input and does not flush any - pending output. - - inflateEnd returns Z_OK if success, Z_STREAM_ERROR if the stream state - was inconsistent. In the error case, msg may be set but then points to a - static string (which must not be deallocated). -*/ - - /* Advanced functions */ - -/* - The following functions are needed only in some special applications. -*/ - -/* -ZEXTERN int ZEXPORT deflateInit2 OF((z_streamp strm, - int level, - int method, - int windowBits, - int memLevel, - int strategy)); - - This is another version of deflateInit with more compression options. The - fields next_in, zalloc, zfree and opaque must be initialized before by - the caller. - - The method parameter is the compression method. It must be Z_DEFLATED in - this version of the library. - - The windowBits parameter is the base two logarithm of the window size - (the size of the history buffer). It should be in the range 8..15 for this - version of the library. Larger values of this parameter result in better - compression at the expense of memory usage. The default value is 15 if - deflateInit is used instead. - - windowBits can also be -8..-15 for raw deflate. In this case, -windowBits - determines the window size. deflate() will then generate raw deflate data - with no zlib header or trailer, and will not compute an adler32 check value. - - windowBits can also be greater than 15 for optional gzip encoding. Add - 16 to windowBits to write a simple gzip header and trailer around the - compressed data instead of a zlib wrapper. The gzip header will have no - file name, no extra data, no comment, no modification time (set to zero), - no header crc, and the operating system will be set to 255 (unknown). If a - gzip stream is being written, strm->adler is a crc32 instead of an adler32. - - The memLevel parameter specifies how much memory should be allocated - for the internal compression state. memLevel=1 uses minimum memory but - is slow and reduces compression ratio; memLevel=9 uses maximum memory - for optimal speed. The default value is 8. See zconf.h for total memory - usage as a function of windowBits and memLevel. - - The strategy parameter is used to tune the compression algorithm. Use the - value Z_DEFAULT_STRATEGY for normal data, Z_FILTERED for data produced by a - filter (or predictor), Z_HUFFMAN_ONLY to force Huffman encoding only (no - string match), or Z_RLE to limit match distances to one (run-length - encoding). Filtered data consists mostly of small values with a somewhat - random distribution. In this case, the compression algorithm is tuned to - compress them better. The effect of Z_FILTERED is to force more Huffman - coding and less string matching; it is somewhat intermediate between - Z_DEFAULT and Z_HUFFMAN_ONLY. Z_RLE is designed to be almost as fast as - Z_HUFFMAN_ONLY, but give better compression for PNG image data. The strategy - parameter only affects the compression ratio but not the correctness of the - compressed output even if it is not set appropriately. Z_FIXED prevents the - use of dynamic Huffman codes, allowing for a simpler decoder for special - applications. - - deflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as an invalid - method). msg is set to null if there is no error message. deflateInit2 does - not perform any compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the compression dictionary from the given byte sequence - without producing any compressed output. This function must be called - immediately after deflateInit, deflateInit2 or deflateReset, before any - call of deflate. The compressor and decompressor must use exactly the same - dictionary (see inflateSetDictionary). - - The dictionary should consist of strings (byte sequences) that are likely - to be encountered later in the data to be compressed, with the most commonly - used strings preferably put towards the end of the dictionary. Using a - dictionary is most useful when the data to be compressed is short and can be - predicted with good accuracy; the data can then be compressed better than - with the default empty dictionary. - - Depending on the size of the compression data structures selected by - deflateInit or deflateInit2, a part of the dictionary may in effect be - discarded, for example if the dictionary is larger than the window size in - deflate or deflate2. Thus the strings most likely to be useful should be - put at the end of the dictionary, not at the front. In addition, the - current implementation of deflate will use at most the window size minus - 262 bytes of the provided dictionary. - - Upon return of this function, strm->adler is set to the adler32 value - of the dictionary; the decompressor may later use this value to determine - which dictionary has been used by the compressor. (The adler32 value - applies to the whole dictionary even if only a subset of the dictionary is - actually used by the compressor.) If a raw deflate was requested, then the - adler32 value is not computed and strm->adler is not set. - - deflateSetDictionary returns Z_OK if success, or Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is - inconsistent (for example if deflate has already been called for this stream - or if the compression method is bsort). deflateSetDictionary does not - perform any compression: this will be done by deflate(). -*/ - -ZEXTERN int ZEXPORT deflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when several compression strategies will be - tried, for example when there are several ways of pre-processing the input - data with a filter. The streams that will be discarded should then be freed - by calling deflateEnd. Note that deflateCopy duplicates the internal - compression state which can be quite large, so this strategy is slow and - can consume lots of memory. - - deflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT deflateReset OF((z_streamp strm)); -/* - This function is equivalent to deflateEnd followed by deflateInit, - but does not free and reallocate all the internal compression state. - The stream will keep the same compression level and any other attributes - that may have been set by deflateInit2. - - deflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). -*/ - -ZEXTERN int ZEXPORT deflateParams OF((z_streamp strm, - int level, - int strategy)); -/* - Dynamically update the compression level and compression strategy. The - interpretation of level and strategy is as in deflateInit2. This can be - used to switch between compression and straight copy of the input data, or - to switch to a different kind of input data requiring a different - strategy. If the compression level is changed, the input available so far - is compressed with the old level (and may be flushed); the new level will - take effect only at the next call of deflate(). - - Before the call of deflateParams, the stream state must be set as for - a call of deflate(), since the currently available input may have to - be compressed and flushed. In particular, strm->avail_out must be non-zero. - - deflateParams returns Z_OK if success, Z_STREAM_ERROR if the source - stream state was inconsistent or if a parameter was invalid, Z_BUF_ERROR - if strm->avail_out was zero. -*/ - -ZEXTERN int ZEXPORT deflateTune OF((z_streamp strm, - int good_length, - int max_lazy, - int nice_length, - int max_chain)); -/* - Fine tune deflate's internal compression parameters. This should only be - used by someone who understands the algorithm used by zlib's deflate for - searching for the best matching string, and even then only by the most - fanatic optimizer trying to squeeze out the last compressed bit for their - specific input data. Read the deflate.c source code for the meaning of the - max_lazy, good_length, nice_length, and max_chain parameters. - - deflateTune() can be called after deflateInit() or deflateInit2(), and - returns Z_OK on success, or Z_STREAM_ERROR for an invalid deflate stream. - */ - -ZEXTERN uLong ZEXPORT deflateBound OF((z_streamp strm, - uLong sourceLen)); -/* - deflateBound() returns an upper bound on the compressed size after - deflation of sourceLen bytes. It must be called after deflateInit() - or deflateInit2(). This would be used to allocate an output buffer - for deflation in a single pass, and so would be called before deflate(). -*/ - -ZEXTERN int ZEXPORT deflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - deflatePrime() inserts bits in the deflate output stream. The intent - is that this function is used to start off the deflate output with the - bits leftover from a previous deflate stream when appending to it. As such, - this function can only be used for raw deflate, and must be used before the - first deflate() call after a deflateInit2() or deflateReset(). bits must be - less than or equal to 16, and that many of the least significant bits of - value will be inserted in the output. - - deflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT deflateSetHeader OF((z_streamp strm, - gz_headerp head)); -/* - deflateSetHeader() provides gzip header information for when a gzip - stream is requested by deflateInit2(). deflateSetHeader() may be called - after deflateInit2() or deflateReset() and before the first call of - deflate(). The text, time, os, extra field, name, and comment information - in the provided gz_header structure are written to the gzip header (xflag is - ignored -- the extra flags are set according to the compression level). The - caller must assure that, if not Z_NULL, name and comment are terminated with - a zero byte, and that if extra is not Z_NULL, that extra_len bytes are - available there. If hcrc is true, a gzip header crc is included. Note that - the current versions of the command-line version of gzip (up through version - 1.3.x) do not support header crc's, and will report that it is a "multi-part - gzip file" and give up. - - If deflateSetHeader is not used, the default gzip header has text false, - the time set to zero, and os set to 255, with no extra, name, or comment - fields. The gzip header is returned to the default state by deflateReset(). - - deflateSetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateInit2 OF((z_streamp strm, - int windowBits)); - - This is another version of inflateInit with an extra parameter. The - fields next_in, avail_in, zalloc, zfree and opaque must be initialized - before by the caller. - - The windowBits parameter is the base two logarithm of the maximum window - size (the size of the history buffer). It should be in the range 8..15 for - this version of the library. The default value is 15 if inflateInit is used - instead. windowBits must be greater than or equal to the windowBits value - provided to deflateInit2() while compressing, or it must be equal to 15 if - deflateInit2() was not used. If a compressed stream with a larger window - size is given as input, inflate() will return with the error code - Z_DATA_ERROR instead of trying to allocate a larger window. - - windowBits can also be -8..-15 for raw inflate. In this case, -windowBits - determines the window size. inflate() will then process raw deflate data, - not looking for a zlib or gzip header, not generating a check value, and not - looking for any check values for comparison at the end of the stream. This - is for use with other formats that use the deflate compressed data format - such as zip. Those formats provide their own check values. If a custom - format is developed using the raw deflate format for compressed data, it is - recommended that a check value such as an adler32 or a crc32 be applied to - the uncompressed data as is done in the zlib, gzip, and zip formats. For - most applications, the zlib format should be used as is. Note that comments - above on the use in deflateInit2() applies to the magnitude of windowBits. - - windowBits can also be greater than 15 for optional gzip decoding. Add - 32 to windowBits to enable zlib and gzip decoding with automatic header - detection, or add 16 to decode only the gzip format (the zlib format will - return a Z_DATA_ERROR). If a gzip stream is being decoded, strm->adler is - a crc32 instead of an adler32. - - inflateInit2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_STREAM_ERROR if a parameter is invalid (such as a null strm). msg - is set to null if there is no error message. inflateInit2 does not perform - any decompression apart from reading the zlib header if present: this will - be done by inflate(). (So next_in and avail_in may be modified, but next_out - and avail_out are unchanged.) -*/ - -ZEXTERN int ZEXPORT inflateSetDictionary OF((z_streamp strm, - const Bytef *dictionary, - uInt dictLength)); -/* - Initializes the decompression dictionary from the given uncompressed byte - sequence. This function must be called immediately after a call of inflate, - if that call returned Z_NEED_DICT. The dictionary chosen by the compressor - can be determined from the adler32 value returned by that call of inflate. - The compressor and decompressor must use exactly the same dictionary (see - deflateSetDictionary). For raw inflate, this function can be called - immediately after inflateInit2() or inflateReset() and before any call of - inflate() to set the dictionary. The application must insure that the - dictionary that was used for compression is provided. - - inflateSetDictionary returns Z_OK if success, Z_STREAM_ERROR if a - parameter is invalid (such as NULL dictionary) or the stream state is - inconsistent, Z_DATA_ERROR if the given dictionary doesn't match the - expected one (incorrect adler32 value). inflateSetDictionary does not - perform any decompression: this will be done by subsequent calls of - inflate(). -*/ - -ZEXTERN int ZEXPORT inflateSync OF((z_streamp strm)); -/* - Skips invalid compressed data until a full flush point (see above the - description of deflate with Z_FULL_FLUSH) can be found, or until all - available input is skipped. No output is provided. - - inflateSync returns Z_OK if a full flush point has been found, Z_BUF_ERROR - if no more input was provided, Z_DATA_ERROR if no flush point has been found, - or Z_STREAM_ERROR if the stream structure was inconsistent. In the success - case, the application may save the current current value of total_in which - indicates where valid compressed data was found. In the error case, the - application may repeatedly call inflateSync, providing more input each time, - until success or end of the input data. -*/ - -ZEXTERN int ZEXPORT inflateCopy OF((z_streamp dest, - z_streamp source)); -/* - Sets the destination stream as a complete copy of the source stream. - - This function can be useful when randomly accessing a large stream. The - first pass through the stream can periodically record the inflate state, - allowing restarting inflate at those points when randomly accessing the - stream. - - inflateCopy returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_STREAM_ERROR if the source stream state was inconsistent - (such as zalloc being NULL). msg is left unchanged in both source and - destination. -*/ - -ZEXTERN int ZEXPORT inflateReset OF((z_streamp strm)); -/* - This function is equivalent to inflateEnd followed by inflateInit, - but does not free and reallocate all the internal decompression state. - The stream will keep attributes that may have been set by inflateInit2. - - inflateReset returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent (such as zalloc or state being NULL). -*/ - -ZEXTERN int ZEXPORT inflatePrime OF((z_streamp strm, - int bits, - int value)); -/* - This function inserts bits in the inflate input stream. The intent is - that this function is used to start inflating at a bit position in the - middle of a byte. The provided bits will be used before any bytes are used - from next_in. This function should only be used with raw inflate, and - should be used before the first inflate() call after inflateInit2() or - inflateReset(). bits must be less than or equal to 16, and that many of the - least significant bits of value will be inserted in the input. - - inflatePrime returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -ZEXTERN int ZEXPORT inflateGetHeader OF((z_streamp strm, - gz_headerp head)); -/* - inflateGetHeader() requests that gzip header information be stored in the - provided gz_header structure. inflateGetHeader() may be called after - inflateInit2() or inflateReset(), and before the first call of inflate(). - As inflate() processes the gzip stream, head->done is zero until the header - is completed, at which time head->done is set to one. If a zlib stream is - being decoded, then head->done is set to -1 to indicate that there will be - no gzip header information forthcoming. Note that Z_BLOCK can be used to - force inflate() to return immediately after header processing is complete - and before any actual data is decompressed. - - The text, time, xflags, and os fields are filled in with the gzip header - contents. hcrc is set to true if there is a header CRC. (The header CRC - was valid if done is set to one.) If extra is not Z_NULL, then extra_max - contains the maximum number of bytes to write to extra. Once done is true, - extra_len contains the actual extra field length, and extra contains the - extra field, or that field truncated if extra_max is less than extra_len. - If name is not Z_NULL, then up to name_max characters are written there, - terminated with a zero unless the length is greater than name_max. If - comment is not Z_NULL, then up to comm_max characters are written there, - terminated with a zero unless the length is greater than comm_max. When - any of extra, name, or comment are not Z_NULL and the respective field is - not present in the header, then that field is set to Z_NULL to signal its - absence. This allows the use of deflateSetHeader() with the returned - structure to duplicate the header. However if those fields are set to - allocated memory, then the application will need to save those pointers - elsewhere so that they can be eventually freed. - - If inflateGetHeader is not used, then the header information is simply - discarded. The header is always checked for validity, including the header - CRC if present. inflateReset() will reset the process to discard the header - information. The application would need to call inflateGetHeader() again to - retrieve the header from the next gzip stream. - - inflateGetHeader returns Z_OK if success, or Z_STREAM_ERROR if the source - stream state was inconsistent. -*/ - -/* -ZEXTERN int ZEXPORT inflateBackInit OF((z_streamp strm, int windowBits, - unsigned char FAR *window)); - - Initialize the internal stream state for decompression using inflateBack() - calls. The fields zalloc, zfree and opaque in strm must be initialized - before the call. If zalloc and zfree are Z_NULL, then the default library- - derived memory allocation routines are used. windowBits is the base two - logarithm of the window size, in the range 8..15. window is a caller - supplied buffer of that size. Except for special applications where it is - assured that deflate was used with small window sizes, windowBits must be 15 - and a 32K byte window must be supplied to be able to decompress general - deflate streams. - - See inflateBack() for the usage of these routines. - - inflateBackInit will return Z_OK on success, Z_STREAM_ERROR if any of - the paramaters are invalid, Z_MEM_ERROR if the internal state could not - be allocated, or Z_VERSION_ERROR if the version of the library does not - match the version of the header file. -*/ - -typedef unsigned (*in_func) OF((void FAR *, unsigned char FAR * FAR *)); -typedef int (*out_func) OF((void FAR *, unsigned char FAR *, unsigned)); - -ZEXTERN int ZEXPORT inflateBack OF((z_streamp strm, - in_func in, void FAR *in_desc, - out_func out, void FAR *out_desc)); -/* - inflateBack() does a raw inflate with a single call using a call-back - interface for input and output. This is more efficient than inflate() for - file i/o applications in that it avoids copying between the output and the - sliding window by simply making the window itself the output buffer. This - function trusts the application to not change the output buffer passed by - the output function, at least until inflateBack() returns. - - inflateBackInit() must be called first to allocate the internal state - and to initialize the state with the user-provided window buffer. - inflateBack() may then be used multiple times to inflate a complete, raw - deflate stream with each call. inflateBackEnd() is then called to free - the allocated state. - - A raw deflate stream is one with no zlib or gzip header or trailer. - This routine would normally be used in a utility that reads zip or gzip - files and writes out uncompressed files. The utility would decode the - header and process the trailer on its own, hence this routine expects - only the raw deflate stream to decompress. This is different from the - normal behavior of inflate(), which expects either a zlib or gzip header and - trailer around the deflate stream. - - inflateBack() uses two subroutines supplied by the caller that are then - called by inflateBack() for input and output. inflateBack() calls those - routines until it reads a complete deflate stream and writes out all of the - uncompressed data, or until it encounters an error. The function's - parameters and return types are defined above in the in_func and out_func - typedefs. inflateBack() will call in(in_desc, &buf) which should return the - number of bytes of provided input, and a pointer to that input in buf. If - there is no input available, in() must return zero--buf is ignored in that - case--and inflateBack() will return a buffer error. inflateBack() will call - out(out_desc, buf, len) to write the uncompressed data buf[0..len-1]. out() - should return zero on success, or non-zero on failure. If out() returns - non-zero, inflateBack() will return with an error. Neither in() nor out() - are permitted to change the contents of the window provided to - inflateBackInit(), which is also the buffer that out() uses to write from. - The length written by out() will be at most the window size. Any non-zero - amount of input may be provided by in(). - - For convenience, inflateBack() can be provided input on the first call by - setting strm->next_in and strm->avail_in. If that input is exhausted, then - in() will be called. Therefore strm->next_in must be initialized before - calling inflateBack(). If strm->next_in is Z_NULL, then in() will be called - immediately for input. If strm->next_in is not Z_NULL, then strm->avail_in - must also be initialized, and then if strm->avail_in is not zero, input will - initially be taken from strm->next_in[0 .. strm->avail_in - 1]. - - The in_desc and out_desc parameters of inflateBack() is passed as the - first parameter of in() and out() respectively when they are called. These - descriptors can be optionally used to pass any information that the caller- - supplied in() and out() functions need to do their job. - - On return, inflateBack() will set strm->next_in and strm->avail_in to - pass back any unused input that was provided by the last in() call. The - return values of inflateBack() can be Z_STREAM_END on success, Z_BUF_ERROR - if in() or out() returned an error, Z_DATA_ERROR if there was a format - error in the deflate stream (in which case strm->msg is set to indicate the - nature of the error), or Z_STREAM_ERROR if the stream was not properly - initialized. In the case of Z_BUF_ERROR, an input or output error can be - distinguished using strm->next_in which will be Z_NULL only if in() returned - an error. If strm->next is not Z_NULL, then the Z_BUF_ERROR was due to - out() returning non-zero. (in() will always be called before out(), so - strm->next_in is assured to be defined if out() returns non-zero.) Note - that inflateBack() cannot return Z_OK. -*/ - -ZEXTERN int ZEXPORT inflateBackEnd OF((z_streamp strm)); -/* - All memory allocated by inflateBackInit() is freed. - - inflateBackEnd() returns Z_OK on success, or Z_STREAM_ERROR if the stream - state was inconsistent. -*/ - -ZEXTERN uLong ZEXPORT zlibCompileFlags OF((void)); -/* Return flags indicating compile-time options. - - Type sizes, two bits each, 00 = 16 bits, 01 = 32, 10 = 64, 11 = other: - 1.0: size of uInt - 3.2: size of uLong - 5.4: size of voidpf (pointer) - 7.6: size of z_off_t - - Compiler, assembler, and debug options: - 8: DEBUG - 9: ASMV or ASMINF -- use ASM code - 10: ZLIB_WINAPI -- exported functions use the WINAPI calling convention - 11: 0 (reserved) - - One-time table building (smaller code, but not thread-safe if true): - 12: BUILDFIXED -- build static block decoding tables when needed - 13: DYNAMIC_CRC_TABLE -- build CRC calculation tables when needed - 14,15: 0 (reserved) - - Library content (indicates missing functionality): - 16: NO_GZCOMPRESS -- gz* functions cannot compress (to avoid linking - deflate code when not needed) - 17: NO_GZIP -- deflate can't write gzip streams, and inflate can't detect - and decode gzip streams (to avoid linking crc code) - 18-19: 0 (reserved) - - Operation variations (changes in library functionality): - 20: PKZIP_BUG_WORKAROUND -- slightly more permissive inflate - 21: FASTEST -- deflate algorithm with only one, lowest compression level - 22,23: 0 (reserved) - - The sprintf variant used by gzprintf (zero is best): - 24: 0 = vs*, 1 = s* -- 1 means limited to 20 arguments after the format - 25: 0 = *nprintf, 1 = *printf -- 1 means gzprintf() not secure! - 26: 0 = returns value, 1 = void -- 1 means inferred string length returned - - Remainder: - 27-31: 0 (reserved) - */ - - - /* utility functions */ - -/* - The following utility functions are implemented on top of the - basic stream-oriented functions. To simplify the interface, some - default options are assumed (compression level and memory usage, - standard memory allocation functions). The source code of these - utility functions can easily be modified if you need special options. -*/ - -ZEXTERN int ZEXPORT compress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Compresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be at least the value returned - by compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - This function can be used to compress a whole file at once if the - input file is mmap'ed. - compress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer. -*/ - -ZEXTERN int ZEXPORT compress2 OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen, - int level)); -/* - Compresses the source buffer into the destination buffer. The level - parameter has the same meaning as in deflateInit. sourceLen is the byte - length of the source buffer. Upon entry, destLen is the total size of the - destination buffer, which must be at least the value returned by - compressBound(sourceLen). Upon exit, destLen is the actual size of the - compressed buffer. - - compress2 returns Z_OK if success, Z_MEM_ERROR if there was not enough - memory, Z_BUF_ERROR if there was not enough room in the output buffer, - Z_STREAM_ERROR if the level parameter is invalid. -*/ - -ZEXTERN uLong ZEXPORT compressBound OF((uLong sourceLen)); -/* - compressBound() returns an upper bound on the compressed size after - compress() or compress2() on sourceLen bytes. It would be used before - a compress() or compress2() call to allocate the destination buffer. -*/ - -ZEXTERN int ZEXPORT uncompress OF((Bytef *dest, uLongf *destLen, - const Bytef *source, uLong sourceLen)); -/* - Decompresses the source buffer into the destination buffer. sourceLen is - the byte length of the source buffer. Upon entry, destLen is the total - size of the destination buffer, which must be large enough to hold the - entire uncompressed data. (The size of the uncompressed data must have - been saved previously by the compressor and transmitted to the decompressor - by some mechanism outside the scope of this compression library.) - Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. - - uncompress returns Z_OK if success, Z_MEM_ERROR if there was not - enough memory, Z_BUF_ERROR if there was not enough room in the output - buffer, or Z_DATA_ERROR if the input data was corrupted or incomplete. -*/ - - -typedef voidp gzFile; - -ZEXTERN gzFile ZEXPORT gzopen OF((const char *path, const char *mode)); -/* - Opens a gzip (.gz) file for reading or writing. The mode parameter - is as in fopen ("rb" or "wb") but can also include a compression level - ("wb9") or a strategy: 'f' for filtered data as in "wb6f", 'h' for - Huffman only compression as in "wb1h", or 'R' for run-length encoding - as in "wb1R". (See the description of deflateInit2 for more information - about the strategy parameter.) - - gzopen can be used to read a file which is not in gzip format; in this - case gzread will directly read from the file without decompression. - - gzopen returns NULL if the file could not be opened or if there was - insufficient memory to allocate the (de)compression state; errno - can be checked to distinguish the two cases (if errno is zero, the - zlib error is Z_MEM_ERROR). */ - -ZEXTERN gzFile ZEXPORT gzdopen OF((int fd, const char *mode)); -/* - gzdopen() associates a gzFile with the file descriptor fd. File - descriptors are obtained from calls like open, dup, creat, pipe or - fileno (in the file has been previously opened with fopen). - The mode parameter is as in gzopen. - The next call of gzclose on the returned gzFile will also close the - file descriptor fd, just like fclose(fdopen(fd), mode) closes the file - descriptor fd. If you want to keep fd open, use gzdopen(dup(fd), mode). - gzdopen returns NULL if there was insufficient memory to allocate - the (de)compression state. -*/ - -ZEXTERN int ZEXPORT gzsetparams OF((gzFile file, int level, int strategy)); -/* - Dynamically update the compression level or strategy. See the description - of deflateInit2 for the meaning of these parameters. - gzsetparams returns Z_OK if success, or Z_STREAM_ERROR if the file was not - opened for writing. -*/ - -ZEXTERN int ZEXPORT gzread OF((gzFile file, voidp buf, unsigned len)); -/* - Reads the given number of uncompressed bytes from the compressed file. - If the input file was not in gzip format, gzread copies the given number - of bytes into the buffer. - gzread returns the number of uncompressed bytes actually read (0 for - end of file, -1 for error). */ - -ZEXTERN int ZEXPORT gzwrite OF((gzFile file, - voidpc buf, unsigned len)); -/* - Writes the given number of uncompressed bytes into the compressed file. - gzwrite returns the number of uncompressed bytes actually written - (0 in case of error). -*/ - -ZEXTERN int ZEXPORTVA gzprintf OF((gzFile file, const char *format, ...)); -/* - Converts, formats, and writes the args to the compressed file under - control of the format string, as in fprintf. gzprintf returns the number of - uncompressed bytes actually written (0 in case of error). The number of - uncompressed bytes written is limited to 4095. The caller should assure that - this limit is not exceeded. If it is exceeded, then gzprintf() will return - return an error (0) with nothing written. In this case, there may also be a - buffer overflow with unpredictable consequences, which is possible only if - zlib was compiled with the insecure functions sprintf() or vsprintf() - because the secure snprintf() or vsnprintf() functions were not available. -*/ - -ZEXTERN int ZEXPORT gzputs OF((gzFile file, const char *s)); -/* - Writes the given null-terminated string to the compressed file, excluding - the terminating null character. - gzputs returns the number of characters written, or -1 in case of error. -*/ - -ZEXTERN char * ZEXPORT gzgets OF((gzFile file, char *buf, int len)); -/* - Reads bytes from the compressed file until len-1 characters are read, or - a newline character is read and transferred to buf, or an end-of-file - condition is encountered. The string is then terminated with a null - character. - gzgets returns buf, or Z_NULL in case of error. -*/ - -ZEXTERN int ZEXPORT gzputc OF((gzFile file, int c)); -/* - Writes c, converted to an unsigned char, into the compressed file. - gzputc returns the value that was written, or -1 in case of error. -*/ - -ZEXTERN int ZEXPORT gzgetc OF((gzFile file)); -/* - Reads one byte from the compressed file. gzgetc returns this byte - or -1 in case of end of file or error. -*/ - -ZEXTERN int ZEXPORT gzungetc OF((int c, gzFile file)); -/* - Push one character back onto the stream to be read again later. - Only one character of push-back is allowed. gzungetc() returns the - character pushed, or -1 on failure. gzungetc() will fail if a - character has been pushed but not read yet, or if c is -1. The pushed - character will be discarded if the stream is repositioned with gzseek() - or gzrewind(). -*/ - -ZEXTERN int ZEXPORT gzflush OF((gzFile file, int flush)); -/* - Flushes all pending output into the compressed file. The parameter - flush is as in the deflate() function. The return value is the zlib - error number (see function gzerror below). gzflush returns Z_OK if - the flush parameter is Z_FINISH and all output could be flushed. - gzflush should be called only when strictly necessary because it can - degrade compression. -*/ - -ZEXTERN z_off_t ZEXPORT gzseek OF((gzFile file, - z_off_t offset, int whence)); -/* - Sets the starting position for the next gzread or gzwrite on the - given compressed file. The offset represents a number of bytes in the - uncompressed data stream. The whence parameter is defined as in lseek(2); - the value SEEK_END is not supported. - If the file is opened for reading, this function is emulated but can be - extremely slow. If the file is opened for writing, only forward seeks are - supported; gzseek then compresses a sequence of zeroes up to the new - starting position. - - gzseek returns the resulting offset location as measured in bytes from - the beginning of the uncompressed stream, or -1 in case of error, in - particular if the file is opened for writing and the new starting position - would be before the current position. -*/ - -ZEXTERN int ZEXPORT gzrewind OF((gzFile file)); -/* - Rewinds the given file. This function is supported only for reading. - - gzrewind(file) is equivalent to (int)gzseek(file, 0L, SEEK_SET) -*/ - -ZEXTERN z_off_t ZEXPORT gztell OF((gzFile file)); -/* - Returns the starting position for the next gzread or gzwrite on the - given compressed file. This position represents a number of bytes in the - uncompressed data stream. - - gztell(file) is equivalent to gzseek(file, 0L, SEEK_CUR) -*/ - -ZEXTERN int ZEXPORT gzeof OF((gzFile file)); -/* - Returns 1 when EOF has previously been detected reading the given - input stream, otherwise zero. -*/ - -ZEXTERN int ZEXPORT gzdirect OF((gzFile file)); -/* - Returns 1 if file is being read directly without decompression, otherwise - zero. -*/ - -ZEXTERN int ZEXPORT gzclose OF((gzFile file)); -/* - Flushes all pending output if necessary, closes the compressed file - and deallocates all the (de)compression state. The return value is the zlib - error number (see function gzerror below). -*/ - -ZEXTERN const char * ZEXPORT gzerror OF((gzFile file, int *errnum)); -/* - Returns the error message for the last error which occurred on the - given compressed file. errnum is set to zlib error number. If an - error occurred in the file system and not in the compression library, - errnum is set to Z_ERRNO and the application may consult errno - to get the exact error code. -*/ - -ZEXTERN void ZEXPORT gzclearerr OF((gzFile file)); -/* - Clears the error and end-of-file flags for file. This is analogous to the - clearerr() function in stdio. This is useful for continuing to read a gzip - file that is being written concurrently. -*/ - - /* checksum functions */ - -/* - These functions are not related to compression but are exported - anyway because they might be useful in applications using the - compression library. -*/ - -ZEXTERN uLong ZEXPORT adler32 OF((uLong adler, const Bytef *buf, uInt len)); -/* - Update a running Adler-32 checksum with the bytes buf[0..len-1] and - return the updated checksum. If buf is NULL, this function returns - the required initial value for the checksum. - An Adler-32 checksum is almost as reliable as a CRC32 but can be computed - much faster. Usage example: - - uLong adler = adler32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - adler = adler32(adler, buffer, length); - } - if (adler != original_adler) error(); -*/ - -ZEXTERN uLong ZEXPORT adler32_combine OF((uLong adler1, uLong adler2, - z_off_t len2)); -/* - Combine two Adler-32 checksums into one. For two sequences of bytes, seq1 - and seq2 with lengths len1 and len2, Adler-32 checksums were calculated for - each, adler1 and adler2. adler32_combine() returns the Adler-32 checksum of - seq1 and seq2 concatenated, requiring only adler1, adler2, and len2. -*/ - -ZEXTERN uLong ZEXPORT crc32 OF((uLong crc, const Bytef *buf, uInt len)); -/* - Update a running CRC-32 with the bytes buf[0..len-1] and return the - updated CRC-32. If buf is NULL, this function returns the required initial - value for the for the crc. Pre- and post-conditioning (one's complement) is - performed within this function so it shouldn't be done by the application. - Usage example: - - uLong crc = crc32(0L, Z_NULL, 0); - - while (read_buffer(buffer, length) != EOF) { - crc = crc32(crc, buffer, length); - } - if (crc != original_crc) error(); -*/ - -ZEXTERN uLong ZEXPORT crc32_combine OF((uLong crc1, uLong crc2, z_off_t len2)); - -/* - Combine two CRC-32 check values into one. For two sequences of bytes, - seq1 and seq2 with lengths len1 and len2, CRC-32 check values were - calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32 - check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and - len2. -*/ - - - /* various hacks, don't look :) */ - -/* deflateInit and inflateInit are macros to allow checking the zlib version - * and the compiler's view of z_stream: - */ -ZEXTERN int ZEXPORT deflateInit_ OF((z_streamp strm, int level, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateInit_ OF((z_streamp strm, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT deflateInit2_ OF((z_streamp strm, int level, int method, - int windowBits, int memLevel, - int strategy, const char *version, - int stream_size)); -ZEXTERN int ZEXPORT inflateInit2_ OF((z_streamp strm, int windowBits, - const char *version, int stream_size)); -ZEXTERN int ZEXPORT inflateBackInit_ OF((z_streamp strm, int windowBits, - unsigned char FAR *window, - const char *version, - int stream_size)); -#define deflateInit(strm, level) \ - deflateInit_((strm), (level), ZLIB_VERSION, sizeof(z_stream)) -#define inflateInit(strm) \ - inflateInit_((strm), ZLIB_VERSION, sizeof(z_stream)) -#define deflateInit2(strm, level, method, windowBits, memLevel, strategy) \ - deflateInit2_((strm),(level),(method),(windowBits),(memLevel),\ - (strategy), ZLIB_VERSION, sizeof(z_stream)) -#define inflateInit2(strm, windowBits) \ - inflateInit2_((strm), (windowBits), ZLIB_VERSION, sizeof(z_stream)) -#define inflateBackInit(strm, windowBits, window) \ - inflateBackInit_((strm), (windowBits), (window), \ - ZLIB_VERSION, sizeof(z_stream)) - - -#if !defined(ZUTIL_H) && !defined(NO_DUMMY_DECL) - struct internal_state {int dummy;}; /* hack for buggy compilers */ -#endif - -ZEXTERN const char * ZEXPORT zError OF((int)); -ZEXTERN int ZEXPORT inflateSyncPoint OF((z_streamp z)); -ZEXTERN const uLongf * ZEXPORT get_crc_table OF((void)); - -#ifdef __cplusplus -} -#endif - -#endif /* ZLIB_H */ diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zutil.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zutil.h deleted file mode 100644 index ecfeb756e7..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zlib/zutil.h +++ /dev/null @@ -1,269 +0,0 @@ -/* zutil.h -- internal interface and configuration of the compression library - * Copyright (C) 1995-2005 Jean-loup Gailly. - * For conditions of distribution and use, see copyright notice in zlib.h - */ - -/* WARNING: this file should *not* be used by applications. It is - part of the implementation of the compression library and is - subject to change. Applications should only use zlib.h. - */ - -/* @(#) $Id: zutil.h,v 1.2 2006/03/02 00:10:34 zerocool Exp $ */ - -#ifndef ZUTIL_H -#define ZUTIL_H - -#define ZLIB_INTERNAL -#include "zlib.h" - -#ifdef STDC -# ifndef _WIN32_WCE -# include -# endif -# include -# include -#endif -#ifdef NO_ERRNO_H -# ifdef _WIN32_WCE - /* The Microsoft C Run-Time Library for Windows CE doesn't have - * errno. We define it as a global variable to simplify porting. - * Its value is always 0 and should not be used. We rename it to - * avoid conflict with other libraries that use the same workaround. - */ -# define errno z_errno -# endif - extern int errno; -#else -# ifndef _WIN32_WCE -# include -# endif -#endif - -#ifndef local -# define local static -#endif -/* compile with -Dlocal if your debugger can't find static symbols */ - -typedef unsigned char uch; -typedef uch FAR uchf; -typedef unsigned short ush; -typedef ush FAR ushf; -typedef unsigned long ulg; - -extern const char * const z_errmsg[10]; /* indexed by 2-zlib_error */ -/* (size given to avoid silly warnings with Visual C++) */ - -#define ERR_MSG(err) z_errmsg[Z_NEED_DICT-(err)] - -#define ERR_RETURN(strm,err) \ - return (strm->msg = (char*)ERR_MSG(err), (err)) -/* To be used only when the state is known to be valid */ - - /* common constants */ - -#ifndef DEF_WBITS -# define DEF_WBITS MAX_WBITS -#endif -/* default windowBits for decompression. MAX_WBITS is for compression only */ - -#if MAX_MEM_LEVEL >= 8 -# define DEF_MEM_LEVEL 8 -#else -# define DEF_MEM_LEVEL MAX_MEM_LEVEL -#endif -/* default memLevel */ - -#define STORED_BLOCK 0 -#define STATIC_TREES 1 -#define DYN_TREES 2 -/* The three kinds of block type */ - -#define MIN_MATCH 3 -#define MAX_MATCH 258 -/* The minimum and maximum match lengths */ - -#define PRESET_DICT 0x20 /* preset dictionary flag in zlib header */ - - /* target dependencies */ - -#if defined(MSDOS) || (defined(WINDOWS) && !defined(WIN32)) -# define OS_CODE 0x00 -# if defined(__TURBOC__) || defined(__BORLANDC__) -# if(__STDC__ == 1) && (defined(__LARGE__) || defined(__COMPACT__)) - /* Allow compilation with ANSI keywords only enabled */ - void _Cdecl farfree( void *block ); - void *_Cdecl farmalloc( unsigned long nbytes ); -# else -# include -# endif -# else /* MSC or DJGPP */ -# include -# endif -#endif - -#ifdef AMIGA -# define OS_CODE 0x01 -#endif - -#if defined(VAXC) || defined(VMS) -# define OS_CODE 0x02 -# define F_OPEN(name, mode) \ - fopen((name), (mode), "mbc=60", "ctx=stm", "rfm=fix", "mrs=512") -#endif - -#if defined(ATARI) || defined(atarist) -# define OS_CODE 0x05 -#endif - -#ifdef OS2 -# define OS_CODE 0x06 -# ifdef M_I86 - #include -# endif -#endif - -#if defined(MACOS) || defined(TARGET_OS_MAC) -# define OS_CODE 0x07 -# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os -# include /* for fdopen */ -# else -# ifndef fdopen -# define fdopen(fd,mode) NULL /* No fdopen() */ -# endif -# endif -#endif - -#ifdef TOPS20 -# define OS_CODE 0x0a -#endif - -#ifdef WIN32 -# ifndef __CYGWIN__ /* Cygwin is Unix, not Win32 */ -# define OS_CODE 0x0b -# endif -#endif - -#ifdef __50SERIES /* Prime/PRIMOS */ -# define OS_CODE 0x0f -#endif - -#if defined(_BEOS_) || defined(RISCOS) -# define fdopen(fd,mode) NULL /* No fdopen() */ -#endif - -#if (defined(_MSC_VER) && (_MSC_VER > 600)) -# if defined(_WIN32_WCE) -# define fdopen(fd,mode) NULL /* No fdopen() */ -# ifndef _PTRDIFF_T_DEFINED - typedef int ptrdiff_t; -# define _PTRDIFF_T_DEFINED -# endif -# else -# define fdopen(fd,type) _fdopen(fd,type) -# endif -#endif - - /* common defaults */ - -#ifndef OS_CODE -# define OS_CODE 0x03 /* assume Unix */ -#endif - -#ifndef F_OPEN -# define F_OPEN(name, mode) fopen((name), (mode)) -#endif - - /* functions */ - -#if defined(STDC99) || (defined(__TURBOC__) && __TURBOC__ >= 0x550) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif -#if defined(__CYGWIN__) -# ifndef HAVE_VSNPRINTF -# define HAVE_VSNPRINTF -# endif -#endif -#ifndef HAVE_VSNPRINTF -# ifdef MSDOS - /* vsnprintf may exist on some MS-DOS compilers (DJGPP?), - but for now we just assume it doesn't. */ -# define NO_vsnprintf -# endif -# ifdef __TURBOC__ -# define NO_vsnprintf -# endif -# ifdef WIN32 - /* In Win32, vsnprintf is available as the "non-ANSI" _vsnprintf. */ -# if !defined(vsnprintf) && !defined(NO_vsnprintf) -# define vsnprintf _vsnprintf -# endif -# endif -# ifdef __SASC -# define NO_vsnprintf -# endif -#endif -#ifdef VMS -# define NO_vsnprintf -#endif - -#if defined(pyr) -# define NO_MEMCPY -#endif -#if defined(SMALL_MEDIUM) && !defined(_MSC_VER) && !defined(__SC__) - /* Use our own functions for small and medium model with MSC <= 5.0. - * You may have to use the same strategy for Borland C (untested). - * The __SC__ check is for Symantec. - */ -# define NO_MEMCPY -#endif -#if defined(STDC) && !defined(HAVE_MEMCPY) && !defined(NO_MEMCPY) -# define HAVE_MEMCPY -#endif -#ifdef HAVE_MEMCPY -# ifdef SMALL_MEDIUM /* MSDOS small or medium model */ -# define zmemcpy _fmemcpy -# define zmemcmp _fmemcmp -# define zmemzero(dest, len) _fmemset(dest, 0, len) -# else -# define zmemcpy memcpy -# define zmemcmp memcmp -# define zmemzero(dest, len) memset(dest, 0, len) -# endif -#else - extern void zmemcpy OF((Bytef* dest, const Bytef* source, uInt len)); - extern int zmemcmp OF((const Bytef* s1, const Bytef* s2, uInt len)); - extern void zmemzero OF((Bytef* dest, uInt len)); -#endif - -/* Diagnostic functions */ -#ifdef DEBUG -# include - extern int z_verbose; - extern void z_error OF((char *m)); -# define Assert(cond,msg) {if(!(cond)) z_error(msg);} -# define Trace(x) {if (z_verbose>=0) fprintf x ;} -# define Tracev(x) {if (z_verbose>0) fprintf x ;} -# define Tracevv(x) {if (z_verbose>1) fprintf x ;} -# define Tracec(c,x) {if (z_verbose>0 && (c)) fprintf x ;} -# define Tracecv(c,x) {if (z_verbose>1 && (c)) fprintf x ;} -#else -# define Assert(cond,msg) -# define Trace(x) -# define Tracev(x) -# define Tracevv(x) -# define Tracec(c,x) -# define Tracecv(c,x) -#endif - - -voidpf zcalloc OF((voidpf opaque, unsigned items, unsigned size)); -void zcfree OF((voidpf opaque, voidpf ptr)); - -#define ZALLOC(strm, items, size) \ - (*((strm)->zalloc))((strm)->opaque, (items), (size)) -#define ZFREE(strm, addr) (*((strm)->zfree))((strm)->opaque, (voidpf)(addr)) -#define TRY_FREE(s, p) {if (p) ZFREE(s, p);} - -#endif /* ZUTIL_H */ diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zpipe.cpp b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zpipe.cpp deleted file mode 100644 index f4e946849c..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zpipe.cpp +++ /dev/null @@ -1,122 +0,0 @@ -/* The file is based of zpipe.c + minor rename and minor adaptation - * - * zpipe.c: example of proper use of zlib's inflate() and deflate() - * Not copyrighted -- provided to the public domain - * Version 1.4 11 December 2005 Mark Adler - */ - -// zpipe.cpp : Defines the entry point for the console application. -// - -#include - -#include -#include -#include - -//#define ZLIB_WINAPI -#include - -int def(char *src, char *dst, int bytes_to_compress, int *bytes_after_compressed) ; -int inf(char *src, char *dst, int bytes_to_decompress, int maximum_after_decompress) ; - -int def(char *src, char *dst, int bytes_to_compress, int *bytes_after_compressed) -{ - z_stream strm; - - int ret;//, flush; - unsigned have; - - /* allocate deflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - ret = deflateInit(&strm, Z_DEFAULT_COMPRESSION) ; - if (ret != Z_OK) - return ret; - - /* compress */ - strm.avail_in = bytes_to_compress ; - strm.avail_out = bytes_to_compress ; - strm.next_in = (Bytef *)src ; - strm.next_out = (Bytef *)dst ; - - ret = deflate(&strm, Z_FINISH) ; - have = bytes_to_compress - strm.avail_out ; - *bytes_after_compressed = have ; - - assert(ret == Z_STREAM_END); /* stream will be complete */ - - /* clean up and return */ - (void)deflateEnd(&strm); - return Z_OK; -} - -int inf(char *src, char *dst, int bytes_to_decompress, int maximum_after_decompress, int* outbytes) -{ - z_stream strm; - - int ret; - //unsigned have; - - /* allocate inflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit(&strm); - if (ret != Z_OK) - return ret; - - /* decompress */ - strm.avail_in = bytes_to_decompress ; - strm.next_in = (Bytef *)src ; - strm.next_out = (Bytef *)dst ; - strm.avail_out = maximum_after_decompress ; - - ret = inflate(&strm, Z_NO_FLUSH) ; - assert(ret != Z_STREAM_ERROR); /* state not clobbered */ - switch (ret) { - case Z_NEED_DICT: - ret = Z_DATA_ERROR; /* and fall through */ - case Z_DATA_ERROR: - case Z_MEM_ERROR: - (void)inflateEnd(&strm); - return ret; - } - - assert(strm.avail_in == 0); /* all input will be used */ - - if( outbytes != NULL ) - *outbytes = strm.total_out; - - /* clean up and return */ - (void)inflateEnd(&strm); - return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR; -} - -/* report a zlib or i/o error */ -void zerr(int ret) -{ - fputs("zpipe: ", stderr); - switch (ret) { - case Z_ERRNO: - if (ferror(stdin)) - fputs("error reading stdin\n", stderr); - if (ferror(stdout)) - fputs("error writing stdout\n", stderr); - break; - case Z_STREAM_ERROR: - fputs("invalid compression level\n", stderr); - break; - case Z_DATA_ERROR: - fputs("invalid or incomplete deflate data\n", stderr); - break; - case Z_MEM_ERROR: - fputs("out of memory\n", stderr); - break; - case Z_VERSION_ERROR: - fputs("zlib version mismatch!\n", stderr); - } -} diff --git a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zpipe.h b/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zpipe.h deleted file mode 100644 index 6562c7b5d9..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ZeroGSShaders/zpipe.h +++ /dev/null @@ -1,26 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef zpipe_h -#define zpipe_h - -int def(char *src, char *dst, int bytes_to_compress, int *bytes_after_compressed) ; -int inf(char *src, char *dst, int bytes_to_decompress, int maximum_after_decompress, int* outbytes); - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/buildshaders.bat b/plugins/zzogl-pg-cg/opengl/buildshaders.bat deleted file mode 100644 index a2ceb68b6e..0000000000 --- a/plugins/zzogl-pg-cg/opengl/buildshaders.bat +++ /dev/null @@ -1,3 +0,0 @@ -ZeroGSShaders.exe ps2hw.fx ps2hw.dat -del Win32\ps2hw.dat Win32\Release\*.res Win32\Debug\*.res -move /y ps2hw.dat Win32\ps2hw.dat \ No newline at end of file diff --git a/plugins/zzogl-pg-cg/opengl/common.h b/plugins/zzogl-pg-cg/opengl/common.h deleted file mode 100644 index 5202a6350e..0000000000 --- a/plugins/zzogl-pg-cg/opengl/common.h +++ /dev/null @@ -1,1164 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2005-2008 Zerofrog's ZeroGS KOSMOS - * - * Based on the ffmpeg program, (c)2006 Michael Niedermayer - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU Lesser General Public License as published by - * the Free Software Foundation; either version 2.1 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Lesser General Public License for more details. - * - * You should have received a copy of the GNU Lesser General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -/** - * @file common.h - * common internal api header. - */ - -#ifndef COMMON_H -#define COMMON_H - -#if defined(WIN32) && !defined(__MINGW32__) && !defined(__CYGWIN__) -# define CONFIG_WIN32 -#endif - -//#define ALT_BITSTREAM_WRITER -//#define ALIGNED_BITSTREAM_WRITER - -#define ALT_BITSTREAM_READER -//#define LIBMPEG2_BITSTREAM_READER -//#define A32_BITSTREAM_READER -#define LIBMPEG2_BITSTREAM_READER_HACK //add BERO - -#ifdef HAVE_AV_CONFIG_H -/* only include the following when compiling package */ -# include "config.h" - -# include -# include -# include -# include -# ifndef __BEOS__ -# include -# else -# include "berrno.h" -# endif -# include - -# ifndef ENODATA -# define ENODATA 61 -# endif - -#ifndef M_PI -#define M_PI 3.14159265358979323846 -#endif - -#include -#ifndef offsetof -# define offsetof(T,F) ((unsigned int)((char *)&((T *)0)->F)) -#endif - -#define AVOPTION_CODEC_BOOL(name, help, field) \ - { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_BOOL } -#define AVOPTION_CODEC_DOUBLE(name, help, field, minv, maxv, defval) \ - { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_DOUBLE, minv, maxv, defval } -#define AVOPTION_CODEC_FLAG(name, help, field, flag, defval) \ - { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_FLAG, flag, 0, defval } -#define AVOPTION_CODEC_INT(name, help, field, minv, maxv, defval) \ - { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_INT, minv, maxv, defval } -#define AVOPTION_CODEC_STRING(name, help, field, str, val) \ - { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_STRING, .defval = val, .defstr = str } -#define AVOPTION_CODEC_RCOVERRIDE(name, help, field) \ - { name, help, offsetof(AVCodecContext, field), FF_OPT_TYPE_RCOVERRIDE, .defval = 0, .defstr = NULL } -#define AVOPTION_SUB(ptr) { .name = NULL, .help = (const char*)ptr } -#define AVOPTION_END() AVOPTION_SUB(NULL) - -struct AVOption; -#ifdef HAVE_MMX -extern const struct AVOption avoptions_common[3 + 5]; -#else -extern const struct AVOption avoptions_common[3]; -#endif -extern const struct AVOption avoptions_workaround_bug[11]; - -#endif /* HAVE_AV_CONFIG_H */ - -/* Suppress restrict if it was not defined in config.h. */ -#ifndef restrict -# define restrict -#endif - -#if defined(__GNUC__) && (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ > 0) -# define always_inline __attribute__((always_inline)) inline -#else -# define always_inline inline -#endif - -#ifdef CONFIG_WIN32 - -/* windows */ - -typedef unsigned short uint16_t; -typedef signed short int16_t; -typedef unsigned char uint8_t; -typedef unsigned int uint32_t; -typedef unsigned __int64 uint64_t; -typedef signed char int8_t; -typedef signed int int32_t; -typedef signed __int64 int64_t; - -# ifndef __MINGW32__ -# define int64_t_C(c) (c ## i64) -# define uint64_t_C(c) (c ## i64) - -# define inline __inline - -# else -# define int64_t_C(c) (c ## LL) -# define uint64_t_C(c) (c ## ULL) -# endif /* __MINGW32__ */ - -# ifdef _DEBUG -# define DEBUG -# endif - -# define snprintf _snprintf -# define vsnprintf _vsnprintf - -/* CONFIG_WIN32 end */ -#elif defined (CONFIG_OS2) -/* OS/2 EMX */ - -#include - -#ifndef int64_t_C -#define int64_t_C(c) (c ## LL) -#define uint64_t_C(c) (c ## ULL) -#endif - -#ifdef HAVE_AV_CONFIG_H - -#ifdef USE_FASTMEMCPY -#include "fastmemcpy.h" -#endif - -#include - -#endif /* HAVE_AV_CONFIG_H */ - -/* CONFIG_OS2 end */ -#else - -/* unix */ - -#include - -#ifndef int64_t_C -#define int64_t_C(c) (c ## LL) -#define uint64_t_C(c) (c ## ULL) -#endif - -#ifdef HAVE_AV_CONFIG_H - -# ifdef USE_FASTMEMCPY -# include "fastmemcpy.h" -# endif -# endif /* HAVE_AV_CONFIG_H */ - -#endif /* !CONFIG_WIN32 && !CONFIG_OS2 */ - -#ifdef HAVE_AV_CONFIG_H - -# include "bswap.h" - -# if defined(__MINGW32__) || defined(__CYGWIN__) || \ - defined(__OS2__) || (defined (__OpenBSD__) && !defined(__ELF__)) -# define MANGLE(a) "_" #a -# else -# define MANGLE(a) #a -# endif - -/* debug stuff */ - -# ifndef DEBUG -# define NDEBUG -# endif -# include - -/* dprintf macros */ -# if defined(CONFIG_WIN32) && !defined(__MINGW32__) - -inline void dprintf(const char* fmt,...) {} - -# else - -# ifdef DEBUG -# define dprintf(fmt,args...) printf(fmt, ## args) -# else -# define dprintf(fmt,args...) -# endif - -# endif /* !CONFIG_WIN32 */ - -# define av_abort() do { fprintf(stderr, "Abort at %s:%d\n", __FILE__, __LINE__); abort(); } while (0) - -//rounded divison & shift -#define RSHIFT(a,b) ((a) > 0 ? ((a) + (1<<((b)-1)))>>(b) : ((a) + (1<<((b)-1))-1)>>(b)) -/* assume b>0 */ -#define ROUNDED_DIV(a,b) (((a)>0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b)) -#define ABS(a) ((a) >= 0 ? (a) : (-(a))) - -#define FFMAX(a,b) ((a) > (b) ? (a) : (b)) -#define FFMIN(a,b) ((a) > (b) ? (b) : (a)) - -extern const uint32_t inverse[256]; - -#ifdef ARCH_X86 -# define FASTDIV(a,b) \ - ({\ - int ret,dmy;\ - asm volatile(\ - "mull %3"\ - :"=d"(ret),"=a"(dmy)\ - :"1"(a),"g"(inverse[b])\ - );\ - ret;\ - }) -#elif defined(CONFIG_FASTDIV) -# define FASTDIV(a,b) ((uint32_t)((((uint64_t)a)*inverse[b])>>32)) -#else -# define FASTDIV(a,b) ((a)/(b)) -#endif - -#ifdef ARCH_X86 -// avoid +32 for shift optimization (gcc should do that ...) -static inline int32_t NEG_SSR32( int32_t a, int8_t s){ - asm ("sarl %1, %0\n\t" - : "+r" (a) - : "ic" ((uint8_t)(-s)) - ); - return a; -} -static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ - asm ("shrl %1, %0\n\t" - : "+r" (a) - : "ic" ((uint8_t)(-s)) - ); - return a; -} -#else -# define NEG_SSR32(a,s) ((( int32_t)(a))>>(32-(s))) -# define NEG_USR32(a,s) (((uint32_t)(a))>>(32-(s))) -#endif - -/* bit output */ - -struct PutBitContext; - -typedef void (*WriteDataFunc)(void *, uint8_t *, int); - -typedef struct PutBitContext { -#ifdef ALT_BITSTREAM_WRITER - uint8_t *buf, *buf_end; - int index; -#else - uint32_t bit_buf; - int bit_left; - uint8_t *buf, *buf_ptr, *buf_end; -#endif - int64_t data_out_size; /* in bytes */ -} PutBitContext; - -void init_put_bits(PutBitContext *s, - uint8_t *buffer, int buffer_size, - void *opaque, - void (*write_data)(void *, uint8_t *, int)); - -int64_t get_bit_count(PutBitContext *s); /* XXX: change function name */ -void align_put_bits(PutBitContext *s); -void flush_put_bits(PutBitContext *s); -void put_string(PutBitContext * pbc, char *s); - -/* bit input */ - -typedef struct GetBitContext { - const uint8_t *buffer, *buffer_end; -#ifdef ALT_BITSTREAM_READER - int index; -#elif defined LIBMPEG2_BITSTREAM_READER - uint8_t *buffer_ptr; - uint32_t cache; - int bit_count; -#elif defined A32_BITSTREAM_READER - uint32_t *buffer_ptr; - uint32_t cache0; - uint32_t cache1; - int bit_count; -#endif - int size_in_bits; -} GetBitContext; - -static inline int get_bits_count(GetBitContext *s); - -#define VLC_TYPE int16_t - -typedef struct VLC { - int bits; - VLC_TYPE (*table)[2]; ///< code, bits - int table_size, table_allocated; -} VLC; - -typedef struct RL_VLC_ELEM { - int16_t level; - int8_t len; - uint8_t run; -} RL_VLC_ELEM; - -#ifdef ARCH_SPARC64 -#define UNALIGNED_STORES_ARE_BAD -#endif - -/* used to avoid missaligned exceptions on some archs (alpha, ...) */ -#ifdef ARCH_X86 -# define unaligned32(a) (*(uint32_t*)(a)) -#else -# ifdef __GNUC__ -static inline uint32_t unaligned32(const void *v) { - struct Unaligned { - uint32_t i; - } __attribute__((packed)); - - return ((const struct Unaligned *) v)->i; -} -# elif defined(__DECC) -static inline uint32_t unaligned32(const void *v) { - return *(const __unaligned uint32_t *) v; -} -# else -static inline uint32_t unaligned32(const void *v) { - return *(const uint32_t *) v; -} -# endif -#endif //!ARCH_X86 - -#ifndef ALT_BITSTREAM_WRITER -static inline void put_bits(PutBitContext *s, int n, unsigned int value) -{ - unsigned int bit_buf; - int bit_left; - -#ifdef STATS - st_out_bit_counts[st_current_index] += n; -#endif - // ZZLog::Debug_Log("put_bits=%d %x.", n, value); - assert(n == 32 || value < (1U << n)); - - bit_buf = s->bit_buf; - bit_left = s->bit_left; - - // ZZLog::Debug_Log("n=%d value=%x cnt=%d buf=%x.", n, value, bit_cnt, bit_buf); - /* XXX: optimize */ - if (n < bit_left) { - bit_buf = (bit_buf<> (n - bit_left); -#ifdef UNALIGNED_STORES_ARE_BAD - if (3 & (int) s->buf_ptr) { - s->buf_ptr[0] = bit_buf >> 24; - s->buf_ptr[1] = bit_buf >> 16; - s->buf_ptr[2] = bit_buf >> 8; - s->buf_ptr[3] = bit_buf ; - } else -#endif - *(uint32_t *)s->buf_ptr = be2me_32(bit_buf); - //ZZLog::Debug_Log("bitbuf = %08x.", bit_buf); - s->buf_ptr+=4; - bit_left+=32 - n; - bit_buf = value; - } - - s->bit_buf = bit_buf; - s->bit_left = bit_left; -} -#endif - - -#ifdef ALT_BITSTREAM_WRITER -static inline void put_bits(PutBitContext *s, int n, unsigned int value) -{ -# ifdef ALIGNED_BITSTREAM_WRITER -# ifdef ARCH_X86 - asm volatile( - "movl %0, %%ecx \n\t" - "xorl %%eax, %%eax \n\t" - "shrdl %%cl, %1, %%eax \n\t" - "shrl %%cl, %1 \n\t" - "movl %0, %%ecx \n\t" - "shrl $3, %%ecx \n\t" - "andl $0xFFFFFFFC, %%ecx \n\t" - "bswapl %1 \n\t" - "orl %1, (%2, %%ecx) \n\t" - "bswapl %%eax \n\t" - "addl %3, %0 \n\t" - "movl %%eax, 4(%2, %%ecx) \n\t" - : "=&r" (s->index), "=&r" (value) - : "r" (s->buf), "r" (n), "0" (s->index), "1" (value<<(-n)) - : "%eax", "%ecx" - ); -# else - int index= s->index; - uint32_t *ptr= ((uint32_t *)s->buf)+(index>>5); - - value<<= 32-n; - - ptr[0] |= be2me_32(value>>(index&31)); - ptr[1] = be2me_32(value<<(32-(index&31))); -// if (n > 24) ZZLog::Debug_Log("%d %d", n, value); - index+= n; - s->index= index; -# endif -# else //ALIGNED_BITSTREAM_WRITER -# ifdef ARCH_X86 - asm volatile( - "movl $7, %%ecx \n\t" - "andl %0, %%ecx \n\t" - "addl %3, %%ecx \n\t" - "negl %%ecx \n\t" - "shll %%cl, %1 \n\t" - "bswapl %1 \n\t" - "movl %0, %%ecx \n\t" - "shrl $3, %%ecx \n\t" - "orl %1, (%%ecx, %2) \n\t" - "addl %3, %0 \n\t" - "movl $0, 4(%%ecx, %2) \n\t" - : "=&r" (s->index), "=&r" (value) - : "r" (s->buf), "r" (n), "0" (s->index), "1" (value) - : "%ecx" - ); -# else - int index= s->index; - uint32_t *ptr= (uint32_t*)(((uint8_t *)s->buf)+(index>>3)); - - ptr[0] |= be2me_32(value<<(32-n-(index&7) )); - ptr[1] = 0; -// if (n > 24) ZZLog::Debug_Log("%d %d", n, value); - index+= n; - s->index= index; -# endif -# endif //!ALIGNED_BITSTREAM_WRITER -} -#endif - - -static inline uint8_t* pbBufPtr(PutBitContext *s) -{ -#ifdef ALT_BITSTREAM_WRITER - return s->buf + (s->index>>3); -#else - return s->buf_ptr; -#endif -} - -/* Bitstream reader API docs: -name - abritary name which is used as prefix for the internal variables - -gb - getbitcontext - -OPEN_READER(name, gb) - loads gb into local variables - -CLOSE_READER(name, gb) - stores local vars in gb - -UPDATE_CACHE(name, gb) - refills the internal cache from the bitstream - after this call at least MIN_CACHE_BITS will be available, - -GET_CACHE(name, gb) - will output the contents of the internal cache, next bit is MSB of 32 or 64 bit (FIXME 64bit) - -SHOW_UBITS(name, gb, num) - will return the nest num bits - -SHOW_SBITS(name, gb, num) - will return the nest num bits and do sign extension - -SKIP_BITS(name, gb, num) - will skip over the next num bits - note, this is equinvalent to SKIP_CACHE; SKIP_COUNTER - -SKIP_CACHE(name, gb, num) - will remove the next num bits from the cache (note SKIP_COUNTER MUST be called before UPDATE_CACHE / CLOSE_READER) - -SKIP_COUNTER(name, gb, num) - will increment the internal bit counter (see SKIP_CACHE & SKIP_BITS) - -LAST_SKIP_CACHE(name, gb, num) - will remove the next num bits from the cache if it is needed for UPDATE_CACHE otherwise it will do nothing - -LAST_SKIP_BITS(name, gb, num) - is equinvalent to SKIP_LAST_CACHE; SKIP_COUNTER - -for examples see get_bits, show_bits, skip_bits, get_vlc -*/ - -static inline int unaligned32_be(const void *v) -{ -#ifdef CONFIG_ALIGN - const uint8_t *p=v; - return (((p[0]<<8) | p[1])<<16) | (p[2]<<8) | (p[3]); -#else - return be2me_32( unaligned32(v)); //original -#endif -} - -#ifdef ALT_BITSTREAM_READER -# define MIN_CACHE_BITS 25 - -# define OPEN_READER(name, gb)\ - int name##_index= (gb)->index;\ - int name##_cache= 0;\ - -# define CLOSE_READER(name, gb)\ - (gb)->index= name##_index;\ - -# define UPDATE_CACHE(name, gb)\ - name##_cache= unaligned32_be( ((uint8_t *)(gb)->buffer)+(name##_index>>3) ) << (name##_index&0x07);\ - -# define SKIP_CACHE(name, gb, num)\ - name##_cache <<= (num);\ - -// FIXME name? -# define SKIP_COUNTER(name, gb, num)\ - name##_index += (num);\ - -# define SKIP_BITS(name, gb, num)\ - {\ - SKIP_CACHE(name, gb, num)\ - SKIP_COUNTER(name, gb, num)\ - }\ - -# define LAST_SKIP_BITS(name, gb, num) SKIP_COUNTER(name, gb, num) -# define LAST_SKIP_CACHE(name, gb, num) ; - -# define SHOW_UBITS(name, gb, num)\ - NEG_USR32(name##_cache, num) - -# define SHOW_SBITS(name, gb, num)\ - NEG_SSR32(name##_cache, num) - -# define GET_CACHE(name, gb)\ - ((uint32_t)name##_cache) - -static inline int get_bits_count(GetBitContext *s){ - return s->index; -} -#elif defined LIBMPEG2_BITSTREAM_READER -//libmpeg2 like reader - -# define MIN_CACHE_BITS 17 - -# define OPEN_READER(name, gb)\ - int name##_bit_count=(gb)->bit_count;\ - int name##_cache= (gb)->cache;\ - uint8_t * name##_buffer_ptr=(gb)->buffer_ptr;\ - -# define CLOSE_READER(name, gb)\ - (gb)->bit_count= name##_bit_count;\ - (gb)->cache= name##_cache;\ - (gb)->buffer_ptr= name##_buffer_ptr;\ - -#ifdef LIBMPEG2_BITSTREAM_READER_HACK - -# define UPDATE_CACHE(name, gb)\ - if(name##_bit_count >= 0){\ - name##_cache+= (int)be2me_16(*(uint16_t*)name##_buffer_ptr) << name##_bit_count;\ - ((uint16_t*)name##_buffer_ptr)++;\ - name##_bit_count-= 16;\ - }\ - -#else - -# define UPDATE_CACHE(name, gb)\ - if(name##_bit_count >= 0){\ - name##_cache+= ((name##_buffer_ptr[0]<<8) + name##_buffer_ptr[1]) << name##_bit_count;\ - name##_buffer_ptr+=2;\ - name##_bit_count-= 16;\ - }\ - -#endif - -# define SKIP_CACHE(name, gb, num)\ - name##_cache <<= (num);\ - -# define SKIP_COUNTER(name, gb, num)\ - name##_bit_count += (num);\ - -# define SKIP_BITS(name, gb, num)\ - {\ - SKIP_CACHE(name, gb, num)\ - SKIP_COUNTER(name, gb, num)\ - }\ - -# define LAST_SKIP_BITS(name, gb, num) SKIP_BITS(name, gb, num) -# define LAST_SKIP_CACHE(name, gb, num) SKIP_CACHE(name, gb, num) - -# define SHOW_UBITS(name, gb, num)\ - NEG_USR32(name##_cache, num) - -# define SHOW_SBITS(name, gb, num)\ - NEG_SSR32(name##_cache, num) - -# define GET_CACHE(name, gb)\ - ((uint32_t)name##_cache) - -static inline int get_bits_count(GetBitContext *s){ - return (s->buffer_ptr - s->buffer)*8 - 16 + s->bit_count; -} - -#elif defined A32_BITSTREAM_READER - -# define MIN_CACHE_BITS 32 - -# define OPEN_READER(name, gb)\ - int name##_bit_count=(gb)->bit_count;\ - uint32_t name##_cache0= (gb)->cache0;\ - uint32_t name##_cache1= (gb)->cache1;\ - uint32_t * name##_buffer_ptr=(gb)->buffer_ptr;\ - -# define CLOSE_READER(name, gb)\ - (gb)->bit_count= name##_bit_count;\ - (gb)->cache0= name##_cache0;\ - (gb)->cache1= name##_cache1;\ - (gb)->buffer_ptr= name##_buffer_ptr;\ - -# define UPDATE_CACHE(name, gb)\ - if(name##_bit_count > 0){\ - const uint32_t next= be2me_32( *name##_buffer_ptr );\ - name##_cache0 |= NEG_USR32(next,name##_bit_count);\ - name##_cache1 |= next<buffer_ptr - s->buffer)*8 - 32 + s->bit_count; -} - -#endif - -/** - * read mpeg1 dc style vlc (sign bit + mantisse with no MSB). - * if MSB not set it is negative - * @param n length in bits - * @author BERO - */ -static inline int get_xbits(GetBitContext *s, int n){ - register int tmp; - register int32_t cache; - OPEN_READER(re, s) - UPDATE_CACHE(re, s) - cache = GET_CACHE(re,s); - if ((int32_t)cache<0) { //MSB=1 - tmp = NEG_USR32(cache,n); - } else { - // tmp = (-1<index+=n for the ALT_READER :)) - OPEN_READER(re, s) - UPDATE_CACHE(re, s) - LAST_SKIP_BITS(re, s, n) - CLOSE_READER(re, s) -} - -static inline unsigned int get_bits1(GetBitContext *s){ -#ifdef ALT_BITSTREAM_READER - int index= s->index; - uint8_t result= s->buffer[ index>>3 ]; - result<<= (index&0x07); - result>>= 8 - 1; - index++; - s->index= index; - - return result; -#else - return get_bits(s, 1); -#endif -} - -static inline unsigned int show_bits1(GetBitContext *s){ - return show_bits(s, 1); -} - -static inline void skip_bits1(GetBitContext *s){ - skip_bits(s, 1); -} - -void init_get_bits(GetBitContext *s, - const uint8_t *buffer, int buffer_size); - -int check_marker(GetBitContext *s, const char *msg); -void align_get_bits(GetBitContext *s); -int init_vlc(VLC *vlc, int nb_bits, int nb_codes, - const void *bits, int bits_wrap, int bits_size, - const void *codes, int codes_wrap, int codes_size); -void free_vlc(VLC *vlc); - -/** - * - * if the vlc code is invalid and max_depth=1 than no bits will be removed - * if the vlc code is invalid and max_depth>1 than the number of bits removed - * is undefined - */ -#define GET_VLC(code, name, gb, table, bits, max_depth)\ -{\ - int n, index, nb_bits;\ -\ - index= SHOW_UBITS(name, gb, bits);\ - code = table[index][0];\ - n = table[index][1];\ -\ - if(max_depth > 1 && n < 0){\ - LAST_SKIP_BITS(name, gb, bits)\ - UPDATE_CACHE(name, gb)\ -\ - nb_bits = -n;\ -\ - index= SHOW_UBITS(name, gb, nb_bits) + code;\ - code = table[index][0];\ - n = table[index][1];\ - if(max_depth > 2 && n < 0){\ - LAST_SKIP_BITS(name, gb, nb_bits)\ - UPDATE_CACHE(name, gb)\ -\ - nb_bits = -n;\ -\ - index= SHOW_UBITS(name, gb, nb_bits) + code;\ - code = table[index][0];\ - n = table[index][1];\ - }\ - }\ - SKIP_BITS(name, gb, n)\ -} - -#define GET_RL_VLC(level, run, name, gb, table, bits, max_depth)\ -{\ - int n, index, nb_bits;\ -\ - index= SHOW_UBITS(name, gb, bits);\ - level = table[index].level;\ - n = table[index].len;\ -\ - if(max_depth > 1 && n < 0){\ - LAST_SKIP_BITS(name, gb, bits)\ - UPDATE_CACHE(name, gb)\ -\ - nb_bits = -n;\ -\ - index= SHOW_UBITS(name, gb, nb_bits) + level;\ - level = table[index].level;\ - n = table[index].len;\ - }\ - run= table[index].run;\ - SKIP_BITS(name, gb, n)\ -} - -// deprecated, dont use get_vlc for new code, use get_vlc2 instead or use GET_VLC directly -static inline int get_vlc(GetBitContext *s, VLC *vlc) -{ - int code; - VLC_TYPE (*table)[2]= vlc->table; - - OPEN_READER(re, s) - UPDATE_CACHE(re, s) - - GET_VLC(code, re, s, table, vlc->bits, 3) - - CLOSE_READER(re, s) - return code; -} - -/** - * parses a vlc code, faster then get_vlc() - * @param bits is the number of bits which will be read at once, must be - * identical to nb_bits in init_vlc() - * @param max_depth is the number of times bits bits must be readed to completly - * read the longest vlc code - * = (max_vlc_length + bits - 1) / bits - */ -static always_inline int get_vlc2(GetBitContext *s, VLC_TYPE (*table)[2], - int bits, int max_depth) -{ - int code; - - OPEN_READER(re, s) - UPDATE_CACHE(re, s) - - GET_VLC(code, re, s, table, bits, max_depth) - - CLOSE_READER(re, s) - return code; -} - -//#define TRACE - -#ifdef TRACE - -static inline void print_bin(int bits, int n){ -#if _DEBUG - int i; - - for(i=n-1; i>=0; i--){ - ZZLog::Log("%d", (bits>>i)&1); - } - for(i=n; i<24; i++) - ZZLog::Log(" "); -#endif -} - -static inline int get_bits_trace(GetBitContext *s, int n, char *file, char *func, int line){ - int r= get_bits(s, n); - - print_bin(r, n); - ZZLog::Debug_Log("%5d %2d %3d bit @%5d in %s %s:%d", r, n, r, get_bits_count(s)-n, file, func, line); - return r; -} -static inline int get_vlc_trace(GetBitContext *s, VLC_TYPE (*table)[2], int bits, int max_depth, char *file, char *func, int line){ - int show= show_bits(s, 24); - int pos= get_bits_count(s); - int r= get_vlc2(s, table, bits, max_depth); - int len= get_bits_count(s) - pos; - int bits2= show>>(24-len); - - print_bin(bits2, len); - - ZZLog::Debug_Log("%5d %2d %3d vlc @%5d in %s %s:%d", bits2, len, r, pos, file, func, line); - return r; -} -static inline int get_xbits_trace(GetBitContext *s, int n, char *file, char *func, int line){ - int show= show_bits(s, n); - int r= get_xbits(s, n); - - print_bin(show, n); - ZZLog::Debug_Log("%5d %2d %3d xbt @%5d in %s %s:%d", show, n, r, get_bits_count(s)-n, file, func, line); - return r; -} - -#define get_bits(s, n) get_bits_trace(s, n, __FILE__, __PRETTY_FUNCTION__, __LINE__) -#define get_bits1(s) get_bits_trace(s, 1, __FILE__, __PRETTY_FUNCTION__, __LINE__) -#define get_xbits(s, n) get_xbits_trace(s, n, __FILE__, __PRETTY_FUNCTION__, __LINE__) -#define get_vlc(s, vlc) get_vlc_trace(s, (vlc)->table, (vlc)->bits, 3, __FILE__, __PRETTY_FUNCTION__, __LINE__) -#define get_vlc2(s, tab, bits, max) get_vlc_trace(s, tab, bits, max, __FILE__, __PRETTY_FUNCTION__, __LINE__) - -#define tprintf printf - -#else //TRACE -#define tprintf(_arg...) {} -#endif - -/* define it to include statistics code (useful only for optimizing - codec efficiency */ -//#define STATS - -#ifdef STATS - -enum { - ST_UNKNOWN, - ST_DC, - ST_INTRA_AC, - ST_INTER_AC, - ST_INTRA_MB, - ST_INTER_MB, - ST_MV, - ST_NB, -}; - -extern int st_current_index; -extern unsigned int st_bit_counts[ST_NB]; -extern unsigned int st_out_bit_counts[ST_NB]; - -void print_stats(void); -#endif - -/* misc math functions */ -extern const uint8_t ff_log2_tab[256]; - -static inline int av_log2(unsigned int v) -{ - int n; - - n = 0; - if (v & 0xffff0000) { - v >>= 16; - n += 16; - } - if (v & 0xff00) { - v >>= 8; - n += 8; - } - n += ff_log2_tab[v]; - - return n; -} - -static inline int av_log2_16bit(unsigned int v) -{ - int n; - - n = 0; - if (v & 0xff00) { - v >>= 8; - n += 8; - } - n += ff_log2_tab[v]; - - return n; -} - - -/* median of 3 */ -static inline int mid_pred(int a, int b, int c) -{ - int vmin, vmax; - vmax = vmin = a; - if (b < vmin) - vmin = b; - else - vmax = b; - - if (c < vmin) - vmin = c; - else if (c > vmax) - vmax = c; - - return a + b + c - vmin - vmax; -} - -static inline int clip(int a, int amin, int amax) -{ - if (a < amin) - return amin; - else if (a > amax) - return amax; - else - return a; -} - -/* math */ -extern const uint8_t ff_sqrt_tab[128]; - -int64_t ff_gcd(int64_t a, int64_t b); - -static inline int ff_sqrt(int a) -{ - int ret=0; - int s; - int ret_sq=0; - - if(a<128) return ff_sqrt_tab[a]; - - for(s=15; s>=0; s--){ - int b= ret_sq + (1<<(s*2)) + (ret<>31;\ - level= (level^mask)-mask; -#endif - - -#if __CPU__ >= 686 && !defined(RUNTIME_CPUDETECT) -#define COPY3_IF_LT(x,y,a,b,c,d)\ -asm volatile (\ - "cmpl %0, %3 \n\t"\ - "cmovl %3, %0 \n\t"\ - "cmovl %4, %1 \n\t"\ - "cmovl %5, %2 \n\t"\ - : "+r" (x), "+r" (a), "+r" (c)\ - : "r" (y), "r" (b), "r" (d)\ -); -#else -#define COPY3_IF_LT(x,y,a,b,c,d)\ -if((y)<(x)){\ - (x)=(y);\ - (a)=(b);\ - (c)=(d);\ -} -#endif - -#ifdef ARCH_X86 -static inline long long rdtsc() -{ - long long l; - asm volatile( "rdtsc\n\t" - : "=A" (l) - ); - return l; -} - -#define START_TIMER \ -static uint64_t tsum=0;\ -static int tcount=0;\ -static int tskip_count=0;\ -uint64_t tend;\ -uint64_t tstart= rdtsc();\ - -#define STOP_TIMER(id) \ -tend= rdtsc();\ -if(tcount<2 || tend - tstart < 4*tsum/tcount){\ - tsum+= tend - tstart;\ - tcount++;\ -}else\ - tskip_count++;\ -if(256*256*256*64%(tcount+tskip_count)==0){\ - fprintf(stderr, "%Ld dezicycles in %s, %d runs, %d skips\n", tsum*10/tcount, id, tcount, tskip_count);\ -} -#endif - -#define CLAMP_TO_8BIT(d) ((d > 0xff) ? 0xff : (d < 0) ? 0 : d) - -/* avoid usage of various functions */ -#define malloc please_use_av_malloc -#define free please_use_av_free -#define realloc please_use_av_realloc - -#define CHECKED_ALLOCZ(p, size)\ -{\ - p= av_mallocz(size);\ - if(p==NULL && (size)!=0){\ - perror("malloc");\ - goto fail;\ - }\ -} - -#endif /* HAVE_AV_CONFIG_H */ - -#endif /* COMMON_H */ diff --git a/plugins/zzogl-pg-cg/opengl/ctx0/ps2hw_ctx.fx b/plugins/zzogl-pg-cg/opengl/ctx0/ps2hw_ctx.fx deleted file mode 100644 index 60e37ac4c0..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ctx0/ps2hw_ctx.fx +++ /dev/null @@ -1,24 +0,0 @@ -// main ps2 memory, each pixel is stored in 32bit color -uniform samplerRECT g_sMemory : register(s0); - -// per context pixel shader constants -uniform half4 fTexAlpha2 : register(c2); - -uniform float4 g_fTexOffset : register(c4); // converts the page and block offsets into the mem addr/1024 -uniform float4 g_fTexDims : register(c6); // mult by tex dims when accessing the block texture -uniform float4 g_fTexBlock : register(c8); - -uniform float4 g_fClampExts : register(c10); // if clamping the texture, use (minu, minv, maxu, maxv) -uniform float4 TexWrapMode : register(c12); // 0 - repeat/clamp, 1 - region rep (use fRegRepMask) - -uniform float4 g_fRealTexDims : register(c14); // tex dims used for linear filtering (w,h,1/w,1/h) - -// (alpha0, alpha1, 1 if highlight2 and tcc is rgba, 1-y) -uniform half4 g_fTestBlack : register(c16); // used for aem bit - -uniform float4 g_fPageOffset : register(c18); - -uniform half4 fTexAlpha : register(c20); - -// vertex shader constants -uniform float4 g_fPosXY : register(c2); \ No newline at end of file diff --git a/plugins/zzogl-pg-cg/opengl/ctx1/ps2hw_ctx.fx b/plugins/zzogl-pg-cg/opengl/ctx1/ps2hw_ctx.fx deleted file mode 100644 index 58c755ea92..0000000000 --- a/plugins/zzogl-pg-cg/opengl/ctx1/ps2hw_ctx.fx +++ /dev/null @@ -1,23 +0,0 @@ -uniform samplerRECT g_sMemory : register(s1); - -// per context pixel shader constants -uniform half4 fTexAlpha2 : register(c3); - -uniform float4 g_fTexOffset : register(c5); // converts the page and block offsets into the mem addr/1024 -uniform float4 g_fTexDims : register(c7); // mult by tex dims when accessing the block texture -uniform float4 g_fTexBlock : register(c9); - -uniform float4 g_fClampExts : register(c11); // if clamping the texture, use (minu, minv, maxu, maxv) -uniform float4 TexWrapMode : register(c13); // 0 - repeat/clamp, 1 - region rep (use fRegRepMask) - -uniform float4 g_fRealTexDims : register(c15); // tex dims used for linear filtering (w,h,1/w,1/h) - -// (alpha0, alpha1, 1 if highlight2 and tcc is rgba, 1-y) -uniform half4 g_fTestBlack : register(c17); // used for aem bit - -uniform float4 g_fPageOffset : register(c19); - -uniform half4 fTexAlpha : register(c21); - -// vertex shader constants -uniform float4 g_fPosXY : register(c3); \ No newline at end of file diff --git a/plugins/zzogl-pg-cg/opengl/glprocs.c b/plugins/zzogl-pg-cg/opengl/glprocs.c deleted file mode 100644 index 60fd5eec5d..0000000000 --- a/plugins/zzogl-pg-cg/opengl/glprocs.c +++ /dev/null @@ -1,17868 +0,0 @@ -/* -** GLprocs utility for getting function addresses for OpenGL(R) 1.2, -** OpenGL 1.3, OpenGL 1.4, OpenGL 1.5 and OpenGL extension functions. -** -** SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) -** Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and associated documentation files (the "Software"), -** to deal in the Software without restriction, including without limitation -** the rights to use, copy, modify, merge, publish, distribute, sublicense, -** and/or sell copies of the Software, and to permit persons to whom the -** Software is furnished to do so, subject to the following conditions: -** -** The above copyright notice including the dates of first publication and -** either this permission notice or a reference to -** http://oss.sgi.com/projects/FreeB/ -** shall be included in all copies or substantial portions of the Software. -** -** THE SOFTWARE IS 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 -** SILICON GRAPHICS, INC. 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -** SOFTWARE. -** -** Except as contained in this notice, the name of Silicon Graphics, Inc. -** shall not be used in advertising or otherwise to promote the sale, use or -** other dealings in this Software without prior written authorization from -** Silicon Graphics, Inc. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -** -** Initial version of glprocs.{c,h} contributed by Intel(R) Corporation. -*/ - -#include -#include - -#ifdef _WIN32 - #include "Utilities/RedtapeWindows.h" - #include //"gl.h" /* Include local "gl.h". Don't include vc32 . */ - #include "glprocs.h" -#else /* GLX */ - #include - #include - #include -#include "glprocs.h"// -// #define wglGetProcAddress glXGetProcAddress -inline void* wglGetProcAddress(const char* x) { - return (void*)glXGetProcAddress((const GLubyte*)x); -} - -#endif - -#define _ASSERT(a) assert(a) - -static void APIENTRY InitBlendColor (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBlendColor"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBlendColor = extproc; - - glBlendColor(red, green, blue, alpha); -} - -static void APIENTRY InitBlendEquation (GLenum mode) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBlendEquation"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBlendEquation = extproc; - - glBlendEquation(mode); -} - -static void APIENTRY InitDrawRangeElements (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDrawRangeElements"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDrawRangeElements = extproc; - - glDrawRangeElements(mode, start, end, count, type, indices); -} - -static void APIENTRY InitColorTable (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorTable"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorTable = extproc; - - glColorTable(target, internalformat, width, format, type, table); -} - -static void APIENTRY InitColorTableParameterfv (GLenum target, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorTableParameterfv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorTableParameterfv = extproc; - - glColorTableParameterfv(target, pname, params); -} - -static void APIENTRY InitColorTableParameteriv (GLenum target, GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorTableParameteriv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorTableParameteriv = extproc; - - glColorTableParameteriv(target, pname, params); -} - -static void APIENTRY InitCopyColorTable (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyColorTable"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyColorTable = extproc; - - glCopyColorTable(target, internalformat, x, y, width); -} - -static void APIENTRY InitGetColorTable (GLenum target, GLenum format, GLenum type, GLvoid *table) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetColorTable"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetColorTable = extproc; - - glGetColorTable(target, format, type, table); -} - -static void APIENTRY InitGetColorTableParameterfv (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetColorTableParameterfv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetColorTableParameterfv = extproc; - - glGetColorTableParameterfv(target, pname, params); -} - -static void APIENTRY InitGetColorTableParameteriv (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetColorTableParameteriv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetColorTableParameteriv = extproc; - - glGetColorTableParameteriv(target, pname, params); -} - -static void APIENTRY InitColorSubTable (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorSubTable"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorSubTable = extproc; - - glColorSubTable(target, start, count, format, type, data); -} - -static void APIENTRY InitCopyColorSubTable (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyColorSubTable"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyColorSubTable = extproc; - - glCopyColorSubTable(target, start, x, y, width); -} - -static void APIENTRY InitConvolutionFilter1D (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionFilter1D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionFilter1D = extproc; - - glConvolutionFilter1D(target, internalformat, width, format, type, image); -} - -static void APIENTRY InitConvolutionFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionFilter2D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionFilter2D = extproc; - - glConvolutionFilter2D(target, internalformat, width, height, format, type, image); -} - -static void APIENTRY InitConvolutionParameterf (GLenum target, GLenum pname, GLfloat params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionParameterf"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionParameterf = extproc; - - glConvolutionParameterf(target, pname, params); -} - -static void APIENTRY InitConvolutionParameterfv (GLenum target, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionParameterfv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionParameterfv = extproc; - - glConvolutionParameterfv(target, pname, params); -} - -static void APIENTRY InitConvolutionParameteri (GLenum target, GLenum pname, GLint params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionParameteri"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionParameteri = extproc; - - glConvolutionParameteri(target, pname, params); -} - -static void APIENTRY InitConvolutionParameteriv (GLenum target, GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionParameteriv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionParameteriv = extproc; - - glConvolutionParameteriv(target, pname, params); -} - -static void APIENTRY InitCopyConvolutionFilter1D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyConvolutionFilter1D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyConvolutionFilter1D = extproc; - - glCopyConvolutionFilter1D(target, internalformat, x, y, width); -} - -static void APIENTRY InitCopyConvolutionFilter2D (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyConvolutionFilter2D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyConvolutionFilter2D = extproc; - - glCopyConvolutionFilter2D(target, internalformat, x, y, width, height); -} - -static void APIENTRY InitGetConvolutionFilter (GLenum target, GLenum format, GLenum type, GLvoid *image) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetConvolutionFilter"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetConvolutionFilter = extproc; - - glGetConvolutionFilter(target, format, type, image); -} - -static void APIENTRY InitGetConvolutionParameterfv (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetConvolutionParameterfv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetConvolutionParameterfv = extproc; - - glGetConvolutionParameterfv(target, pname, params); -} - -static void APIENTRY InitGetConvolutionParameteriv (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetConvolutionParameteriv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetConvolutionParameteriv = extproc; - - glGetConvolutionParameteriv(target, pname, params); -} - -static void APIENTRY InitGetSeparableFilter (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetSeparableFilter"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetSeparableFilter = extproc; - - glGetSeparableFilter(target, format, type, row, column, span); -} - -static void APIENTRY InitSeparableFilter2D (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSeparableFilter2D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSeparableFilter2D = extproc; - - glSeparableFilter2D(target, internalformat, width, height, format, type, row, column); -} - -static void APIENTRY InitGetHistogram (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetHistogram"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetHistogram = extproc; - - glGetHistogram(target, reset, format, type, values); -} - -static void APIENTRY InitGetHistogramParameterfv (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetHistogramParameterfv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetHistogramParameterfv = extproc; - - glGetHistogramParameterfv(target, pname, params); -} - -static void APIENTRY InitGetHistogramParameteriv (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetHistogramParameteriv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetHistogramParameteriv = extproc; - - glGetHistogramParameteriv(target, pname, params); -} - -static void APIENTRY InitGetMinmax (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMinmax"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMinmax = extproc; - - glGetMinmax(target, reset, format, type, values); -} - -static void APIENTRY InitGetMinmaxParameterfv (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMinmaxParameterfv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMinmaxParameterfv = extproc; - - glGetMinmaxParameterfv(target, pname, params); -} - -static void APIENTRY InitGetMinmaxParameteriv (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMinmaxParameteriv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMinmaxParameteriv = extproc; - - glGetMinmaxParameteriv(target, pname, params); -} - -static void APIENTRY InitHistogram (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glHistogram"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glHistogram = extproc; - - glHistogram(target, width, internalformat, sink); -} - -static void APIENTRY InitMinmax (GLenum target, GLenum internalformat, GLboolean sink) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMinmax"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMinmax = extproc; - - glMinmax(target, internalformat, sink); -} - -static void APIENTRY InitResetHistogram (GLenum target) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glResetHistogram"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glResetHistogram = extproc; - - glResetHistogram(target); -} - -static void APIENTRY InitResetMinmax (GLenum target) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glResetMinmax"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glResetMinmax = extproc; - - glResetMinmax(target); -} - -static void APIENTRY InitTexImage3D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexImage3D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexImage3D = extproc; - - glTexImage3D(target, level, internalformat, width, height, depth, border, format, type, pixels); -} - -static void APIENTRY InitTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexSubImage3D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexSubImage3D = extproc; - - glTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} - -static void APIENTRY InitCopyTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyTexSubImage3D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyTexSubImage3D = extproc; - - glCopyTexSubImage3D(target, level, xoffset, yoffset, zoffset, x, y, width, height); -} - -static void APIENTRY InitActiveTexture (GLenum texture) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glActiveTexture"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glActiveTexture = extproc; - - glActiveTexture(texture); -} - -static void APIENTRY InitClientActiveTexture (GLenum texture) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glClientActiveTexture"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glClientActiveTexture = extproc; - - glClientActiveTexture(texture); -} - -static void APIENTRY InitMultiTexCoord1d (GLenum target, GLdouble s) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1d"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1d = extproc; - - glMultiTexCoord1d(target, s); -} - -static void APIENTRY InitMultiTexCoord1dv (GLenum target, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1dv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1dv = extproc; - - glMultiTexCoord1dv(target, v); -} - -static void APIENTRY InitMultiTexCoord1f (GLenum target, GLfloat s) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1f"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1f = extproc; - - glMultiTexCoord1f(target, s); -} - -static void APIENTRY InitMultiTexCoord1fv (GLenum target, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1fv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1fv = extproc; - - glMultiTexCoord1fv(target, v); -} - -static void APIENTRY InitMultiTexCoord1i (GLenum target, GLint s) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1i"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1i = extproc; - - glMultiTexCoord1i(target, s); -} - -static void APIENTRY InitMultiTexCoord1iv (GLenum target, const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1iv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1iv = extproc; - - glMultiTexCoord1iv(target, v); -} - -static void APIENTRY InitMultiTexCoord1s (GLenum target, GLshort s) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1s"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1s = extproc; - - glMultiTexCoord1s(target, s); -} - -static void APIENTRY InitMultiTexCoord1sv (GLenum target, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1sv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1sv = extproc; - - glMultiTexCoord1sv(target, v); -} - -static void APIENTRY InitMultiTexCoord2d (GLenum target, GLdouble s, GLdouble t) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2d"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2d = extproc; - - glMultiTexCoord2d(target, s, t); -} - -static void APIENTRY InitMultiTexCoord2dv (GLenum target, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2dv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2dv = extproc; - - glMultiTexCoord2dv(target, v); -} - -static void APIENTRY InitMultiTexCoord2f (GLenum target, GLfloat s, GLfloat t) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2f"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2f = extproc; - - glMultiTexCoord2f(target, s, t); -} - -static void APIENTRY InitMultiTexCoord2fv (GLenum target, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2fv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2fv = extproc; - - glMultiTexCoord2fv(target, v); -} - -static void APIENTRY InitMultiTexCoord2i (GLenum target, GLint s, GLint t) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2i"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2i = extproc; - - glMultiTexCoord2i(target, s, t); -} - -static void APIENTRY InitMultiTexCoord2iv (GLenum target, const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2iv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2iv = extproc; - - glMultiTexCoord2iv(target, v); -} - -static void APIENTRY InitMultiTexCoord2s (GLenum target, GLshort s, GLshort t) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2s"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2s = extproc; - - glMultiTexCoord2s(target, s, t); -} - -static void APIENTRY InitMultiTexCoord2sv (GLenum target, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2sv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2sv = extproc; - - glMultiTexCoord2sv(target, v); -} - -static void APIENTRY InitMultiTexCoord3d (GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3d"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3d = extproc; - - glMultiTexCoord3d(target, s, t, r); -} - -static void APIENTRY InitMultiTexCoord3dv (GLenum target, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3dv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3dv = extproc; - - glMultiTexCoord3dv(target, v); -} - -static void APIENTRY InitMultiTexCoord3f (GLenum target, GLfloat s, GLfloat t, GLfloat r) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3f"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3f = extproc; - - glMultiTexCoord3f(target, s, t, r); -} - -static void APIENTRY InitMultiTexCoord3fv (GLenum target, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3fv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3fv = extproc; - - glMultiTexCoord3fv(target, v); -} - -static void APIENTRY InitMultiTexCoord3i (GLenum target, GLint s, GLint t, GLint r) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3i"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3i = extproc; - - glMultiTexCoord3i(target, s, t, r); -} - -static void APIENTRY InitMultiTexCoord3iv (GLenum target, const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3iv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3iv = extproc; - - glMultiTexCoord3iv(target, v); -} - -static void APIENTRY InitMultiTexCoord3s (GLenum target, GLshort s, GLshort t, GLshort r) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3s"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3s = extproc; - - glMultiTexCoord3s(target, s, t, r); -} - -static void APIENTRY InitMultiTexCoord3sv (GLenum target, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3sv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3sv = extproc; - - glMultiTexCoord3sv(target, v); -} - -static void APIENTRY InitMultiTexCoord4d (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4d"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4d = extproc; - - glMultiTexCoord4d(target, s, t, r, q); -} - -static void APIENTRY InitMultiTexCoord4dv (GLenum target, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4dv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4dv = extproc; - - glMultiTexCoord4dv(target, v); -} - -static void APIENTRY InitMultiTexCoord4f (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4f"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4f = extproc; - - glMultiTexCoord4f(target, s, t, r, q); -} - -static void APIENTRY InitMultiTexCoord4fv (GLenum target, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4fv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4fv = extproc; - - glMultiTexCoord4fv(target, v); -} - -static void APIENTRY InitMultiTexCoord4i (GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4i"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4i = extproc; - - glMultiTexCoord4i(target, s, t, r, q); -} - -static void APIENTRY InitMultiTexCoord4iv (GLenum target, const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4iv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4iv = extproc; - - glMultiTexCoord4iv(target, v); -} - -static void APIENTRY InitMultiTexCoord4s (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4s"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4s = extproc; - - glMultiTexCoord4s(target, s, t, r, q); -} - -static void APIENTRY InitMultiTexCoord4sv (GLenum target, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4sv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4sv = extproc; - - glMultiTexCoord4sv(target, v); -} - -static void APIENTRY InitLoadTransposeMatrixf (const GLfloat *m) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glLoadTransposeMatrixf"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glLoadTransposeMatrixf = extproc; - - glLoadTransposeMatrixf(m); -} - -static void APIENTRY InitLoadTransposeMatrixd (const GLdouble *m) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glLoadTransposeMatrixd"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glLoadTransposeMatrixd = extproc; - - glLoadTransposeMatrixd(m); -} - -static void APIENTRY InitMultTransposeMatrixf (const GLfloat *m) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultTransposeMatrixf"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultTransposeMatrixf = extproc; - - glMultTransposeMatrixf(m); -} - -static void APIENTRY InitMultTransposeMatrixd (const GLdouble *m) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultTransposeMatrixd"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultTransposeMatrixd = extproc; - - glMultTransposeMatrixd(m); -} - -static void APIENTRY InitSampleCoverage (GLclampf value, GLboolean invert) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSampleCoverage"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSampleCoverage = extproc; - - glSampleCoverage(value, invert); -} - -static void APIENTRY InitCompressedTexImage3D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexImage3D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexImage3D = extproc; - - glCompressedTexImage3D(target, level, internalformat, width, height, depth, border, imageSize, data); -} - -static void APIENTRY InitCompressedTexImage2D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexImage2D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexImage2D = extproc; - - glCompressedTexImage2D(target, level, internalformat, width, height, border, imageSize, data); -} - -static void APIENTRY InitCompressedTexImage1D (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexImage1D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexImage1D = extproc; - - glCompressedTexImage1D(target, level, internalformat, width, border, imageSize, data); -} - -static void APIENTRY InitCompressedTexSubImage3D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexSubImage3D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexSubImage3D = extproc; - - glCompressedTexSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} - -static void APIENTRY InitCompressedTexSubImage2D (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexSubImage2D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexSubImage2D = extproc; - - glCompressedTexSubImage2D(target, level, xoffset, yoffset, width, height, format, imageSize, data); -} - -static void APIENTRY InitCompressedTexSubImage1D (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexSubImage1D"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexSubImage1D = extproc; - - glCompressedTexSubImage1D(target, level, xoffset, width, format, imageSize, data); -} - -static void APIENTRY InitGetCompressedTexImage (GLenum target, GLint level, GLvoid *img) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetCompressedTexImage"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetCompressedTexImage = extproc; - - glGetCompressedTexImage(target, level, img); -} - -static void APIENTRY InitBlendFuncSeparate (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBlendFuncSeparate"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBlendFuncSeparate = extproc; - - glBlendFuncSeparate(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); -} - -static void APIENTRY InitFogCoordf (GLfloat coord) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoordf"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoordf = extproc; - - glFogCoordf(coord); -} - -static void APIENTRY InitFogCoordfv (const GLfloat *coord) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoordfv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoordfv = extproc; - - glFogCoordfv(coord); -} - -static void APIENTRY InitFogCoordd (GLdouble coord) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoordd"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoordd = extproc; - - glFogCoordd(coord); -} - -static void APIENTRY InitFogCoorddv (const GLdouble *coord) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoorddv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoorddv = extproc; - - glFogCoorddv(coord); -} - -static void APIENTRY InitFogCoordPointer (GLenum type, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoordPointer"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoordPointer = extproc; - - glFogCoordPointer(type, stride, pointer); -} - -static void APIENTRY InitMultiDrawArrays (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiDrawArrays"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiDrawArrays = extproc; - - glMultiDrawArrays(mode, first, count, primcount); -} - -static void APIENTRY InitMultiDrawElements (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiDrawElements"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiDrawElements = extproc; - - glMultiDrawElements(mode, count, type, indices, primcount); -} - -static void APIENTRY InitPointParameterf (GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameterf"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameterf = extproc; - - glPointParameterf(pname, param); -} - -static void APIENTRY InitPointParameterfv (GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameterfv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameterfv = extproc; - - glPointParameterfv(pname, params); -} - -static void APIENTRY InitPointParameteri (GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameteri"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameteri = extproc; - - glPointParameteri(pname, param); -} - -static void APIENTRY InitPointParameteriv (GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameteriv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameteriv = extproc; - - glPointParameteriv(pname, params); -} - -static void APIENTRY InitSecondaryColor3b (GLbyte red, GLbyte green, GLbyte blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3b"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3b = extproc; - - glSecondaryColor3b(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3bv (const GLbyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3bv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3bv = extproc; - - glSecondaryColor3bv(v); -} - -static void APIENTRY InitSecondaryColor3d (GLdouble red, GLdouble green, GLdouble blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3d"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3d = extproc; - - glSecondaryColor3d(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3dv (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3dv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3dv = extproc; - - glSecondaryColor3dv(v); -} - -static void APIENTRY InitSecondaryColor3f (GLfloat red, GLfloat green, GLfloat blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3f"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3f = extproc; - - glSecondaryColor3f(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3fv (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3fv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3fv = extproc; - - glSecondaryColor3fv(v); -} - -static void APIENTRY InitSecondaryColor3i (GLint red, GLint green, GLint blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3i"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3i = extproc; - - glSecondaryColor3i(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3iv (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3iv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3iv = extproc; - - glSecondaryColor3iv(v); -} - -static void APIENTRY InitSecondaryColor3s (GLshort red, GLshort green, GLshort blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3s"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3s = extproc; - - glSecondaryColor3s(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3sv (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3sv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3sv = extproc; - - glSecondaryColor3sv(v); -} - -static void APIENTRY InitSecondaryColor3ub (GLubyte red, GLubyte green, GLubyte blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3ub"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3ub = extproc; - - glSecondaryColor3ub(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3ubv (const GLubyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3ubv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3ubv = extproc; - - glSecondaryColor3ubv(v); -} - -static void APIENTRY InitSecondaryColor3ui (GLuint red, GLuint green, GLuint blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3ui"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3ui = extproc; - - glSecondaryColor3ui(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3uiv (const GLuint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3uiv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3uiv = extproc; - - glSecondaryColor3uiv(v); -} - -static void APIENTRY InitSecondaryColor3us (GLushort red, GLushort green, GLushort blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3us"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3us = extproc; - - glSecondaryColor3us(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3usv (const GLushort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3usv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3usv = extproc; - - glSecondaryColor3usv(v); -} - -static void APIENTRY InitSecondaryColorPointer (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColorPointer"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColorPointer = extproc; - - glSecondaryColorPointer(size, type, stride, pointer); -} - -static void APIENTRY InitWindowPos2d (GLdouble x, GLdouble y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2d"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2d = extproc; - - glWindowPos2d(x, y); -} - -static void APIENTRY InitWindowPos2dv (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2dv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2dv = extproc; - - glWindowPos2dv(v); -} - -static void APIENTRY InitWindowPos2f (GLfloat x, GLfloat y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2f"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2f = extproc; - - glWindowPos2f(x, y); -} - -static void APIENTRY InitWindowPos2fv (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2fv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2fv = extproc; - - glWindowPos2fv(v); -} - -static void APIENTRY InitWindowPos2i (GLint x, GLint y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2i"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2i = extproc; - - glWindowPos2i(x, y); -} - -static void APIENTRY InitWindowPos2iv (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2iv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2iv = extproc; - - glWindowPos2iv(v); -} - -static void APIENTRY InitWindowPos2s (GLshort x, GLshort y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2s"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2s = extproc; - - glWindowPos2s(x, y); -} - -static void APIENTRY InitWindowPos2sv (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2sv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2sv = extproc; - - glWindowPos2sv(v); -} - -static void APIENTRY InitWindowPos3d (GLdouble x, GLdouble y, GLdouble z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3d"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3d = extproc; - - glWindowPos3d(x, y, z); -} - -static void APIENTRY InitWindowPos3dv (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3dv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3dv = extproc; - - glWindowPos3dv(v); -} - -static void APIENTRY InitWindowPos3f (GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3f"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3f = extproc; - - glWindowPos3f(x, y, z); -} - -static void APIENTRY InitWindowPos3fv (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3fv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3fv = extproc; - - glWindowPos3fv(v); -} - -static void APIENTRY InitWindowPos3i (GLint x, GLint y, GLint z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3i"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3i = extproc; - - glWindowPos3i(x, y, z); -} - -static void APIENTRY InitWindowPos3iv (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3iv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3iv = extproc; - - glWindowPos3iv(v); -} - -static void APIENTRY InitWindowPos3s (GLshort x, GLshort y, GLshort z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3s"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3s = extproc; - - glWindowPos3s(x, y, z); -} - -static void APIENTRY InitWindowPos3sv (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3sv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3sv = extproc; - - glWindowPos3sv(v); -} - -static void APIENTRY InitGenQueries (GLsizei n, GLuint *ids) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenQueries"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenQueries = extproc; - - glGenQueries(n, ids); -} - -static void APIENTRY InitDeleteQueries (GLsizei n, const GLuint *ids) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteQueries"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteQueries = extproc; - - glDeleteQueries(n, ids); -} - -static GLboolean APIENTRY InitIsQuery (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsQuery"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsQuery = extproc; - - return glIsQuery(id); -} - -static void APIENTRY InitBeginQuery (GLenum target, GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBeginQuery"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBeginQuery = extproc; - - glBeginQuery(target, id); -} - -static void APIENTRY InitEndQuery (GLenum target) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glEndQuery"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glEndQuery = extproc; - - glEndQuery(target); -} - -static void APIENTRY InitGetQueryiv (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetQueryiv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetQueryiv = extproc; - - glGetQueryiv(target, pname, params); -} - -static void APIENTRY InitGetQueryObjectiv (GLuint id, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetQueryObjectiv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetQueryObjectiv = extproc; - - glGetQueryObjectiv(id, pname, params); -} - -static void APIENTRY InitGetQueryObjectuiv (GLuint id, GLenum pname, GLuint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetQueryObjectuiv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetQueryObjectuiv = extproc; - - glGetQueryObjectuiv(id, pname, params); -} - -static void APIENTRY InitBindBuffer (GLenum target, GLuint buffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindBuffer"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBindBuffer = extproc; - - glBindBuffer(target, buffer); -} - -static void APIENTRY InitDeleteBuffers (GLsizei n, const GLuint *buffers) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteBuffers"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteBuffers = extproc; - - glDeleteBuffers(n, buffers); -} - -static void APIENTRY InitGenBuffers (GLsizei n, GLuint *buffers) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenBuffers"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenBuffers = extproc; - - glGenBuffers(n, buffers); -} - -static GLboolean APIENTRY InitIsBuffer (GLuint buffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsBuffer"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsBuffer = extproc; - - return glIsBuffer(buffer); -} - -static void APIENTRY InitBufferData (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBufferData"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBufferData = extproc; - - glBufferData(target, size, data, usage); -} - -static void APIENTRY InitBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBufferSubData"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBufferSubData = extproc; - - glBufferSubData(target, offset, size, data); -} - -static void APIENTRY InitGetBufferSubData (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetBufferSubData"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetBufferSubData = extproc; - - glGetBufferSubData(target, offset, size, data); -} - -static GLvoid* APIENTRY InitMapBuffer (GLenum target, GLenum access) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMapBuffer"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glMapBuffer = extproc; - - return glMapBuffer(target, access); -} - -static GLboolean APIENTRY InitUnmapBuffer (GLenum target) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUnmapBuffer"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glUnmapBuffer = extproc; - - return glUnmapBuffer(target); -} - -static void APIENTRY InitGetBufferParameteriv (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetBufferParameteriv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetBufferParameteriv = extproc; - - glGetBufferParameteriv(target, pname, params); -} - -static void APIENTRY InitGetBufferPointerv (GLenum target, GLenum pname, GLvoid* *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetBufferPointerv"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetBufferPointerv = extproc; - - glGetBufferPointerv(target, pname, params); -} - -static void APIENTRY InitActiveTextureARB (GLenum texture) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glActiveTextureARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glActiveTextureARB = extproc; - - glActiveTextureARB(texture); -} - -static void APIENTRY InitClientActiveTextureARB (GLenum texture) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glClientActiveTextureARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glClientActiveTextureARB = extproc; - - glClientActiveTextureARB(texture); -} - -static void APIENTRY InitMultiTexCoord1dARB (GLenum target, GLdouble s) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1dARB = extproc; - - glMultiTexCoord1dARB(target, s); -} - -static void APIENTRY InitMultiTexCoord1dvARB (GLenum target, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1dvARB = extproc; - - glMultiTexCoord1dvARB(target, v); -} - -static void APIENTRY InitMultiTexCoord1fARB (GLenum target, GLfloat s) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1fARB = extproc; - - glMultiTexCoord1fARB(target, s); -} - -static void APIENTRY InitMultiTexCoord1fvARB (GLenum target, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1fvARB = extproc; - - glMultiTexCoord1fvARB(target, v); -} - -static void APIENTRY InitMultiTexCoord1iARB (GLenum target, GLint s) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1iARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1iARB = extproc; - - glMultiTexCoord1iARB(target, s); -} - -static void APIENTRY InitMultiTexCoord1ivARB (GLenum target, const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1ivARB = extproc; - - glMultiTexCoord1ivARB(target, v); -} - -static void APIENTRY InitMultiTexCoord1sARB (GLenum target, GLshort s) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1sARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1sARB = extproc; - - glMultiTexCoord1sARB(target, s); -} - -static void APIENTRY InitMultiTexCoord1svARB (GLenum target, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1svARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1svARB = extproc; - - glMultiTexCoord1svARB(target, v); -} - -static void APIENTRY InitMultiTexCoord2dARB (GLenum target, GLdouble s, GLdouble t) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2dARB = extproc; - - glMultiTexCoord2dARB(target, s, t); -} - -static void APIENTRY InitMultiTexCoord2dvARB (GLenum target, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2dvARB = extproc; - - glMultiTexCoord2dvARB(target, v); -} - -static void APIENTRY InitMultiTexCoord2fARB (GLenum target, GLfloat s, GLfloat t) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2fARB = extproc; - - glMultiTexCoord2fARB(target, s, t); -} - -static void APIENTRY InitMultiTexCoord2fvARB (GLenum target, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2fvARB = extproc; - - glMultiTexCoord2fvARB(target, v); -} - -static void APIENTRY InitMultiTexCoord2iARB (GLenum target, GLint s, GLint t) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2iARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2iARB = extproc; - - glMultiTexCoord2iARB(target, s, t); -} - -static void APIENTRY InitMultiTexCoord2ivARB (GLenum target, const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2ivARB = extproc; - - glMultiTexCoord2ivARB(target, v); -} - -static void APIENTRY InitMultiTexCoord2sARB (GLenum target, GLshort s, GLshort t) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2sARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2sARB = extproc; - - glMultiTexCoord2sARB(target, s, t); -} - -static void APIENTRY InitMultiTexCoord2svARB (GLenum target, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2svARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2svARB = extproc; - - glMultiTexCoord2svARB(target, v); -} - -static void APIENTRY InitMultiTexCoord3dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3dARB = extproc; - - glMultiTexCoord3dARB(target, s, t, r); -} - -static void APIENTRY InitMultiTexCoord3dvARB (GLenum target, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3dvARB = extproc; - - glMultiTexCoord3dvARB(target, v); -} - -static void APIENTRY InitMultiTexCoord3fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3fARB = extproc; - - glMultiTexCoord3fARB(target, s, t, r); -} - -static void APIENTRY InitMultiTexCoord3fvARB (GLenum target, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3fvARB = extproc; - - glMultiTexCoord3fvARB(target, v); -} - -static void APIENTRY InitMultiTexCoord3iARB (GLenum target, GLint s, GLint t, GLint r) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3iARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3iARB = extproc; - - glMultiTexCoord3iARB(target, s, t, r); -} - -static void APIENTRY InitMultiTexCoord3ivARB (GLenum target, const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3ivARB = extproc; - - glMultiTexCoord3ivARB(target, v); -} - -static void APIENTRY InitMultiTexCoord3sARB (GLenum target, GLshort s, GLshort t, GLshort r) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3sARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3sARB = extproc; - - glMultiTexCoord3sARB(target, s, t, r); -} - -static void APIENTRY InitMultiTexCoord3svARB (GLenum target, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3svARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3svARB = extproc; - - glMultiTexCoord3svARB(target, v); -} - -static void APIENTRY InitMultiTexCoord4dARB (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4dARB = extproc; - - glMultiTexCoord4dARB(target, s, t, r, q); -} - -static void APIENTRY InitMultiTexCoord4dvARB (GLenum target, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4dvARB = extproc; - - glMultiTexCoord4dvARB(target, v); -} - -static void APIENTRY InitMultiTexCoord4fARB (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4fARB = extproc; - - glMultiTexCoord4fARB(target, s, t, r, q); -} - -static void APIENTRY InitMultiTexCoord4fvARB (GLenum target, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4fvARB = extproc; - - glMultiTexCoord4fvARB(target, v); -} - -static void APIENTRY InitMultiTexCoord4iARB (GLenum target, GLint s, GLint t, GLint r, GLint q) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4iARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4iARB = extproc; - - glMultiTexCoord4iARB(target, s, t, r, q); -} - -static void APIENTRY InitMultiTexCoord4ivARB (GLenum target, const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4ivARB = extproc; - - glMultiTexCoord4ivARB(target, v); -} - -static void APIENTRY InitMultiTexCoord4sARB (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4sARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4sARB = extproc; - - glMultiTexCoord4sARB(target, s, t, r, q); -} - -static void APIENTRY InitMultiTexCoord4svARB (GLenum target, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4svARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4svARB = extproc; - - glMultiTexCoord4svARB(target, v); -} - -static void APIENTRY InitLoadTransposeMatrixfARB (const GLfloat *m) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glLoadTransposeMatrixfARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glLoadTransposeMatrixfARB = extproc; - - glLoadTransposeMatrixfARB(m); -} - -static void APIENTRY InitLoadTransposeMatrixdARB (const GLdouble *m) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glLoadTransposeMatrixdARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glLoadTransposeMatrixdARB = extproc; - - glLoadTransposeMatrixdARB(m); -} - -static void APIENTRY InitMultTransposeMatrixfARB (const GLfloat *m) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultTransposeMatrixfARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultTransposeMatrixfARB = extproc; - - glMultTransposeMatrixfARB(m); -} - -static void APIENTRY InitMultTransposeMatrixdARB (const GLdouble *m) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultTransposeMatrixdARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultTransposeMatrixdARB = extproc; - - glMultTransposeMatrixdARB(m); -} - -static void APIENTRY InitSampleCoverageARB (GLclampf value, GLboolean invert) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSampleCoverageARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSampleCoverageARB = extproc; - - glSampleCoverageARB(value, invert); -} - -static void APIENTRY InitCompressedTexImage3DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexImage3DARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexImage3DARB = extproc; - - glCompressedTexImage3DARB(target, level, internalformat, width, height, depth, border, imageSize, data); -} - -static void APIENTRY InitCompressedTexImage2DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexImage2DARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexImage2DARB = extproc; - - glCompressedTexImage2DARB(target, level, internalformat, width, height, border, imageSize, data); -} - -static void APIENTRY InitCompressedTexImage1DARB (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexImage1DARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexImage1DARB = extproc; - - glCompressedTexImage1DARB(target, level, internalformat, width, border, imageSize, data); -} - -static void APIENTRY InitCompressedTexSubImage3DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexSubImage3DARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexSubImage3DARB = extproc; - - glCompressedTexSubImage3DARB(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imageSize, data); -} - -static void APIENTRY InitCompressedTexSubImage2DARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexSubImage2DARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexSubImage2DARB = extproc; - - glCompressedTexSubImage2DARB(target, level, xoffset, yoffset, width, height, format, imageSize, data); -} - -static void APIENTRY InitCompressedTexSubImage1DARB (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompressedTexSubImage1DARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompressedTexSubImage1DARB = extproc; - - glCompressedTexSubImage1DARB(target, level, xoffset, width, format, imageSize, data); -} - -static void APIENTRY InitGetCompressedTexImageARB (GLenum target, GLint level, GLvoid *img) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetCompressedTexImageARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetCompressedTexImageARB = extproc; - - glGetCompressedTexImageARB(target, level, img); -} - -static void APIENTRY InitPointParameterfARB (GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameterfARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameterfARB = extproc; - - glPointParameterfARB(pname, param); -} - -static void APIENTRY InitPointParameterfvARB (GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameterfvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameterfvARB = extproc; - - glPointParameterfvARB(pname, params); -} - -static void APIENTRY InitWeightbvARB (GLint size, const GLbyte *weights) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWeightbvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWeightbvARB = extproc; - - glWeightbvARB(size, weights); -} - -static void APIENTRY InitWeightsvARB (GLint size, const GLshort *weights) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWeightsvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWeightsvARB = extproc; - - glWeightsvARB(size, weights); -} - -static void APIENTRY InitWeightivARB (GLint size, const GLint *weights) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWeightivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWeightivARB = extproc; - - glWeightivARB(size, weights); -} - -static void APIENTRY InitWeightfvARB (GLint size, const GLfloat *weights) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWeightfvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWeightfvARB = extproc; - - glWeightfvARB(size, weights); -} - -static void APIENTRY InitWeightdvARB (GLint size, const GLdouble *weights) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWeightdvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWeightdvARB = extproc; - - glWeightdvARB(size, weights); -} - -static void APIENTRY InitWeightubvARB (GLint size, const GLubyte *weights) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWeightubvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWeightubvARB = extproc; - - glWeightubvARB(size, weights); -} - -static void APIENTRY InitWeightusvARB (GLint size, const GLushort *weights) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWeightusvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWeightusvARB = extproc; - - glWeightusvARB(size, weights); -} - -static void APIENTRY InitWeightuivARB (GLint size, const GLuint *weights) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWeightuivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWeightuivARB = extproc; - - glWeightuivARB(size, weights); -} - -static void APIENTRY InitWeightPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWeightPointerARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWeightPointerARB = extproc; - - glWeightPointerARB(size, type, stride, pointer); -} - -static void APIENTRY InitVertexBlendARB (GLint count) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexBlendARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexBlendARB = extproc; - - glVertexBlendARB(count); -} - -static void APIENTRY InitCurrentPaletteMatrixARB (GLint index) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCurrentPaletteMatrixARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCurrentPaletteMatrixARB = extproc; - - glCurrentPaletteMatrixARB(index); -} - -static void APIENTRY InitMatrixIndexubvARB (GLint size, const GLubyte *indices) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMatrixIndexubvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMatrixIndexubvARB = extproc; - - glMatrixIndexubvARB(size, indices); -} - -static void APIENTRY InitMatrixIndexusvARB (GLint size, const GLushort *indices) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMatrixIndexusvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMatrixIndexusvARB = extproc; - - glMatrixIndexusvARB(size, indices); -} - -static void APIENTRY InitMatrixIndexuivARB (GLint size, const GLuint *indices) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMatrixIndexuivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMatrixIndexuivARB = extproc; - - glMatrixIndexuivARB(size, indices); -} - -static void APIENTRY InitMatrixIndexPointerARB (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMatrixIndexPointerARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMatrixIndexPointerARB = extproc; - - glMatrixIndexPointerARB(size, type, stride, pointer); -} - -static void APIENTRY InitWindowPos2dARB (GLdouble x, GLdouble y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2dARB = extproc; - - glWindowPos2dARB(x, y); -} - -static void APIENTRY InitWindowPos2dvARB (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2dvARB = extproc; - - glWindowPos2dvARB(v); -} - -static void APIENTRY InitWindowPos2fARB (GLfloat x, GLfloat y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2fARB = extproc; - - glWindowPos2fARB(x, y); -} - -static void APIENTRY InitWindowPos2fvARB (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2fvARB = extproc; - - glWindowPos2fvARB(v); -} - -static void APIENTRY InitWindowPos2iARB (GLint x, GLint y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2iARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2iARB = extproc; - - glWindowPos2iARB(x, y); -} - -static void APIENTRY InitWindowPos2ivARB (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2ivARB = extproc; - - glWindowPos2ivARB(v); -} - -static void APIENTRY InitWindowPos2sARB (GLshort x, GLshort y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2sARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2sARB = extproc; - - glWindowPos2sARB(x, y); -} - -static void APIENTRY InitWindowPos2svARB (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2svARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2svARB = extproc; - - glWindowPos2svARB(v); -} - -static void APIENTRY InitWindowPos3dARB (GLdouble x, GLdouble y, GLdouble z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3dARB = extproc; - - glWindowPos3dARB(x, y, z); -} - -static void APIENTRY InitWindowPos3dvARB (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3dvARB = extproc; - - glWindowPos3dvARB(v); -} - -static void APIENTRY InitWindowPos3fARB (GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3fARB = extproc; - - glWindowPos3fARB(x, y, z); -} - -static void APIENTRY InitWindowPos3fvARB (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3fvARB = extproc; - - glWindowPos3fvARB(v); -} - -static void APIENTRY InitWindowPos3iARB (GLint x, GLint y, GLint z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3iARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3iARB = extproc; - - glWindowPos3iARB(x, y, z); -} - -static void APIENTRY InitWindowPos3ivARB (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3ivARB = extproc; - - glWindowPos3ivARB(v); -} - -static void APIENTRY InitWindowPos3sARB (GLshort x, GLshort y, GLshort z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3sARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3sARB = extproc; - - glWindowPos3sARB(x, y, z); -} - -static void APIENTRY InitWindowPos3svARB (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3svARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3svARB = extproc; - - glWindowPos3svARB(v); -} - -static void APIENTRY InitVertexAttrib1dARB (GLuint index, GLdouble x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1dARB = extproc; - - glVertexAttrib1dARB(index, x); -} - -static void APIENTRY InitVertexAttrib1dvARB (GLuint index, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1dvARB = extproc; - - glVertexAttrib1dvARB(index, v); -} - -static void APIENTRY InitVertexAttrib1fARB (GLuint index, GLfloat x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1fARB = extproc; - - glVertexAttrib1fARB(index, x); -} - -static void APIENTRY InitVertexAttrib1fvARB (GLuint index, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1fvARB = extproc; - - glVertexAttrib1fvARB(index, v); -} - -static void APIENTRY InitVertexAttrib1sARB (GLuint index, GLshort x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1sARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1sARB = extproc; - - glVertexAttrib1sARB(index, x); -} - -static void APIENTRY InitVertexAttrib1svARB (GLuint index, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1svARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1svARB = extproc; - - glVertexAttrib1svARB(index, v); -} - -static void APIENTRY InitVertexAttrib2dARB (GLuint index, GLdouble x, GLdouble y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2dARB = extproc; - - glVertexAttrib2dARB(index, x, y); -} - -static void APIENTRY InitVertexAttrib2dvARB (GLuint index, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2dvARB = extproc; - - glVertexAttrib2dvARB(index, v); -} - -static void APIENTRY InitVertexAttrib2fARB (GLuint index, GLfloat x, GLfloat y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2fARB = extproc; - - glVertexAttrib2fARB(index, x, y); -} - -static void APIENTRY InitVertexAttrib2fvARB (GLuint index, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2fvARB = extproc; - - glVertexAttrib2fvARB(index, v); -} - -static void APIENTRY InitVertexAttrib2sARB (GLuint index, GLshort x, GLshort y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2sARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2sARB = extproc; - - glVertexAttrib2sARB(index, x, y); -} - -static void APIENTRY InitVertexAttrib2svARB (GLuint index, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2svARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2svARB = extproc; - - glVertexAttrib2svARB(index, v); -} - -static void APIENTRY InitVertexAttrib3dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3dARB = extproc; - - glVertexAttrib3dARB(index, x, y, z); -} - -static void APIENTRY InitVertexAttrib3dvARB (GLuint index, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3dvARB = extproc; - - glVertexAttrib3dvARB(index, v); -} - -static void APIENTRY InitVertexAttrib3fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3fARB = extproc; - - glVertexAttrib3fARB(index, x, y, z); -} - -static void APIENTRY InitVertexAttrib3fvARB (GLuint index, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3fvARB = extproc; - - glVertexAttrib3fvARB(index, v); -} - -static void APIENTRY InitVertexAttrib3sARB (GLuint index, GLshort x, GLshort y, GLshort z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3sARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3sARB = extproc; - - glVertexAttrib3sARB(index, x, y, z); -} - -static void APIENTRY InitVertexAttrib3svARB (GLuint index, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3svARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3svARB = extproc; - - glVertexAttrib3svARB(index, v); -} - -static void APIENTRY InitVertexAttrib4NbvARB (GLuint index, const GLbyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4NbvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4NbvARB = extproc; - - glVertexAttrib4NbvARB(index, v); -} - -static void APIENTRY InitVertexAttrib4NivARB (GLuint index, const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4NivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4NivARB = extproc; - - glVertexAttrib4NivARB(index, v); -} - -static void APIENTRY InitVertexAttrib4NsvARB (GLuint index, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4NsvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4NsvARB = extproc; - - glVertexAttrib4NsvARB(index, v); -} - -static void APIENTRY InitVertexAttrib4NubARB (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4NubARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4NubARB = extproc; - - glVertexAttrib4NubARB(index, x, y, z, w); -} - -static void APIENTRY InitVertexAttrib4NubvARB (GLuint index, const GLubyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4NubvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4NubvARB = extproc; - - glVertexAttrib4NubvARB(index, v); -} - -static void APIENTRY InitVertexAttrib4NuivARB (GLuint index, const GLuint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4NuivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4NuivARB = extproc; - - glVertexAttrib4NuivARB(index, v); -} - -static void APIENTRY InitVertexAttrib4NusvARB (GLuint index, const GLushort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4NusvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4NusvARB = extproc; - - glVertexAttrib4NusvARB(index, v); -} - -static void APIENTRY InitVertexAttrib4bvARB (GLuint index, const GLbyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4bvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4bvARB = extproc; - - glVertexAttrib4bvARB(index, v); -} - -static void APIENTRY InitVertexAttrib4dARB (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4dARB = extproc; - - glVertexAttrib4dARB(index, x, y, z, w); -} - -static void APIENTRY InitVertexAttrib4dvARB (GLuint index, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4dvARB = extproc; - - glVertexAttrib4dvARB(index, v); -} - -static void APIENTRY InitVertexAttrib4fARB (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4fARB = extproc; - - glVertexAttrib4fARB(index, x, y, z, w); -} - -static void APIENTRY InitVertexAttrib4fvARB (GLuint index, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4fvARB = extproc; - - glVertexAttrib4fvARB(index, v); -} - -static void APIENTRY InitVertexAttrib4ivARB (GLuint index, const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4ivARB = extproc; - - glVertexAttrib4ivARB(index, v); -} - -static void APIENTRY InitVertexAttrib4sARB (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4sARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4sARB = extproc; - - glVertexAttrib4sARB(index, x, y, z, w); -} - -static void APIENTRY InitVertexAttrib4svARB (GLuint index, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4svARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4svARB = extproc; - - glVertexAttrib4svARB(index, v); -} - -static void APIENTRY InitVertexAttrib4ubvARB (GLuint index, const GLubyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4ubvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4ubvARB = extproc; - - glVertexAttrib4ubvARB(index, v); -} - -static void APIENTRY InitVertexAttrib4uivARB (GLuint index, const GLuint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4uivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4uivARB = extproc; - - glVertexAttrib4uivARB(index, v); -} - -static void APIENTRY InitVertexAttrib4usvARB (GLuint index, const GLushort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4usvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4usvARB = extproc; - - glVertexAttrib4usvARB(index, v); -} - -static void APIENTRY InitVertexAttribPointerARB (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribPointerARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribPointerARB = extproc; - - glVertexAttribPointerARB(index, size, type, normalized, stride, pointer); -} - -static void APIENTRY InitEnableVertexAttribArrayARB (GLuint index) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glEnableVertexAttribArrayARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glEnableVertexAttribArrayARB = extproc; - - glEnableVertexAttribArrayARB(index); -} - -static void APIENTRY InitDisableVertexAttribArrayARB (GLuint index) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDisableVertexAttribArrayARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDisableVertexAttribArrayARB = extproc; - - glDisableVertexAttribArrayARB(index); -} - -static void APIENTRY InitProgramStringARB (GLenum target, GLenum format, GLsizei len, const GLvoid *string) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramStringARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramStringARB = extproc; - - glProgramStringARB(target, format, len, string); -} - -static void APIENTRY InitBindProgramARB (GLenum target, GLuint program) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindProgramARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBindProgramARB = extproc; - - glBindProgramARB(target, program); -} - -static void APIENTRY InitDeleteProgramsARB (GLsizei n, const GLuint *programs) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteProgramsARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteProgramsARB = extproc; - - glDeleteProgramsARB(n, programs); -} - -static void APIENTRY InitGenProgramsARB (GLsizei n, GLuint *programs) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenProgramsARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenProgramsARB = extproc; - - glGenProgramsARB(n, programs); -} - -static void APIENTRY InitProgramEnvParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramEnvParameter4dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramEnvParameter4dARB = extproc; - - glProgramEnvParameter4dARB(target, index, x, y, z, w); -} - -static void APIENTRY InitProgramEnvParameter4dvARB (GLenum target, GLuint index, const GLdouble *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramEnvParameter4dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramEnvParameter4dvARB = extproc; - - glProgramEnvParameter4dvARB(target, index, params); -} - -static void APIENTRY InitProgramEnvParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramEnvParameter4fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramEnvParameter4fARB = extproc; - - glProgramEnvParameter4fARB(target, index, x, y, z, w); -} - -static void APIENTRY InitProgramEnvParameter4fvARB (GLenum target, GLuint index, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramEnvParameter4fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramEnvParameter4fvARB = extproc; - - glProgramEnvParameter4fvARB(target, index, params); -} - -static void APIENTRY InitProgramLocalParameter4dARB (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramLocalParameter4dARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramLocalParameter4dARB = extproc; - - glProgramLocalParameter4dARB(target, index, x, y, z, w); -} - -static void APIENTRY InitProgramLocalParameter4dvARB (GLenum target, GLuint index, const GLdouble *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramLocalParameter4dvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramLocalParameter4dvARB = extproc; - - glProgramLocalParameter4dvARB(target, index, params); -} - -static void APIENTRY InitProgramLocalParameter4fARB (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramLocalParameter4fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramLocalParameter4fARB = extproc; - - glProgramLocalParameter4fARB(target, index, x, y, z, w); -} - -static void APIENTRY InitProgramLocalParameter4fvARB (GLenum target, GLuint index, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramLocalParameter4fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramLocalParameter4fvARB = extproc; - - glProgramLocalParameter4fvARB(target, index, params); -} - -static void APIENTRY InitGetProgramEnvParameterdvARB (GLenum target, GLuint index, GLdouble *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramEnvParameterdvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramEnvParameterdvARB = extproc; - - glGetProgramEnvParameterdvARB(target, index, params); -} - -static void APIENTRY InitGetProgramEnvParameterfvARB (GLenum target, GLuint index, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramEnvParameterfvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramEnvParameterfvARB = extproc; - - glGetProgramEnvParameterfvARB(target, index, params); -} - -static void APIENTRY InitGetProgramLocalParameterdvARB (GLenum target, GLuint index, GLdouble *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramLocalParameterdvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramLocalParameterdvARB = extproc; - - glGetProgramLocalParameterdvARB(target, index, params); -} - -static void APIENTRY InitGetProgramLocalParameterfvARB (GLenum target, GLuint index, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramLocalParameterfvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramLocalParameterfvARB = extproc; - - glGetProgramLocalParameterfvARB(target, index, params); -} - -static void APIENTRY InitGetProgramivARB (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramivARB = extproc; - - glGetProgramivARB(target, pname, params); -} - -static void APIENTRY InitGetProgramStringARB (GLenum target, GLenum pname, GLvoid *string) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramStringARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramStringARB = extproc; - - glGetProgramStringARB(target, pname, string); -} - -static void APIENTRY InitGetVertexAttribdvARB (GLuint index, GLenum pname, GLdouble *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVertexAttribdvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVertexAttribdvARB = extproc; - - glGetVertexAttribdvARB(index, pname, params); -} - -static void APIENTRY InitGetVertexAttribfvARB (GLuint index, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVertexAttribfvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVertexAttribfvARB = extproc; - - glGetVertexAttribfvARB(index, pname, params); -} - -static void APIENTRY InitGetVertexAttribivARB (GLuint index, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVertexAttribivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVertexAttribivARB = extproc; - - glGetVertexAttribivARB(index, pname, params); -} - -static void APIENTRY InitGetVertexAttribPointervARB (GLuint index, GLenum pname, GLvoid* *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVertexAttribPointervARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVertexAttribPointervARB = extproc; - - glGetVertexAttribPointervARB(index, pname, pointer); -} - -static GLboolean APIENTRY InitIsProgramARB (GLuint program) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsProgramARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsProgramARB = extproc; - - return glIsProgramARB(program); -} - -static void APIENTRY InitBindBufferARB (GLenum target, GLuint buffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindBufferARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBindBufferARB = extproc; - - glBindBufferARB(target, buffer); -} - -static void APIENTRY InitDeleteBuffersARB (GLsizei n, const GLuint *buffers) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteBuffersARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteBuffersARB = extproc; - - glDeleteBuffersARB(n, buffers); -} - -static void APIENTRY InitGenBuffersARB (GLsizei n, GLuint *buffers) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenBuffersARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenBuffersARB = extproc; - - glGenBuffersARB(n, buffers); -} - -static GLboolean APIENTRY InitIsBufferARB (GLuint buffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsBufferARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsBufferARB = extproc; - - return glIsBufferARB(buffer); -} - -static void APIENTRY InitBufferDataARB (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBufferDataARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBufferDataARB = extproc; - - glBufferDataARB(target, size, data, usage); -} - -static void APIENTRY InitBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBufferSubDataARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBufferSubDataARB = extproc; - - glBufferSubDataARB(target, offset, size, data); -} - -static void APIENTRY InitGetBufferSubDataARB (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetBufferSubDataARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetBufferSubDataARB = extproc; - - glGetBufferSubDataARB(target, offset, size, data); -} - -static GLvoid* APIENTRY InitMapBufferARB (GLenum target, GLenum access) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMapBufferARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glMapBufferARB = extproc; - - return glMapBufferARB(target, access); -} - -static GLboolean APIENTRY InitUnmapBufferARB (GLenum target) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUnmapBufferARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glUnmapBufferARB = extproc; - - return glUnmapBufferARB(target); -} - -static void APIENTRY InitGetBufferParameterivARB (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetBufferParameterivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetBufferParameterivARB = extproc; - - glGetBufferParameterivARB(target, pname, params); -} - -static void APIENTRY InitGetBufferPointervARB (GLenum target, GLenum pname, GLvoid* *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetBufferPointervARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetBufferPointervARB = extproc; - - glGetBufferPointervARB(target, pname, params); -} - -static void APIENTRY InitGenQueriesARB (GLsizei n, GLuint *ids) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenQueriesARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenQueriesARB = extproc; - - glGenQueriesARB(n, ids); -} - -static void APIENTRY InitDeleteQueriesARB (GLsizei n, const GLuint *ids) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteQueriesARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteQueriesARB = extproc; - - glDeleteQueriesARB(n, ids); -} - -static GLboolean APIENTRY InitIsQueryARB (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsQueryARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsQueryARB = extproc; - - return glIsQueryARB(id); -} - -static void APIENTRY InitBeginQueryARB (GLenum target, GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBeginQueryARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBeginQueryARB = extproc; - - glBeginQueryARB(target, id); -} - -static void APIENTRY InitEndQueryARB (GLenum target) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glEndQueryARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glEndQueryARB = extproc; - - glEndQueryARB(target); -} - -static void APIENTRY InitGetQueryivARB (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetQueryivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetQueryivARB = extproc; - - glGetQueryivARB(target, pname, params); -} - -static void APIENTRY InitGetQueryObjectivARB (GLuint id, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetQueryObjectivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetQueryObjectivARB = extproc; - - glGetQueryObjectivARB(id, pname, params); -} - -static void APIENTRY InitGetQueryObjectuivARB (GLuint id, GLenum pname, GLuint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetQueryObjectuivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetQueryObjectuivARB = extproc; - - glGetQueryObjectuivARB(id, pname, params); -} - -static void APIENTRY InitDeleteObjectARB (GLhandleARB obj) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteObjectARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteObjectARB = extproc; - - glDeleteObjectARB(obj); -} - -static GLhandleARB APIENTRY InitGetHandleARB (GLenum pname) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetHandleARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glGetHandleARB = extproc; - - return glGetHandleARB(pname); -} - -static void APIENTRY InitDetachObjectARB (GLhandleARB containerObj, GLhandleARB attachedObj) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDetachObjectARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDetachObjectARB = extproc; - - glDetachObjectARB(containerObj, attachedObj); -} - -static GLhandleARB APIENTRY InitCreateShaderObjectARB (GLenum shaderType) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCreateShaderObjectARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glCreateShaderObjectARB = extproc; - - return glCreateShaderObjectARB(shaderType); -} - -static void APIENTRY InitShaderSourceARB (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glShaderSourceARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glShaderSourceARB = extproc; - - glShaderSourceARB(shaderObj, count, string, length); -} - -static void APIENTRY InitCompileShaderARB (GLhandleARB shaderObj) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCompileShaderARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCompileShaderARB = extproc; - - glCompileShaderARB(shaderObj); -} - -static GLhandleARB APIENTRY InitCreateProgramObjectARB (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCreateProgramObjectARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glCreateProgramObjectARB = extproc; - - return glCreateProgramObjectARB(); -} - -static void APIENTRY InitAttachObjectARB (GLhandleARB containerObj, GLhandleARB obj) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glAttachObjectARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glAttachObjectARB = extproc; - - glAttachObjectARB(containerObj, obj); -} - -static void APIENTRY InitLinkProgramARB (GLhandleARB programObj) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glLinkProgramARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glLinkProgramARB = extproc; - - glLinkProgramARB(programObj); -} - -static void APIENTRY InitUseProgramObjectARB (GLhandleARB programObj) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUseProgramObjectARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUseProgramObjectARB = extproc; - - glUseProgramObjectARB(programObj); -} - -static void APIENTRY InitValidateProgramARB (GLhandleARB programObj) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glValidateProgramARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glValidateProgramARB = extproc; - - glValidateProgramARB(programObj); -} - -static void APIENTRY InitUniform1fARB (GLint location, GLfloat v0) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform1fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform1fARB = extproc; - - glUniform1fARB(location, v0); -} - -static void APIENTRY InitUniform2fARB (GLint location, GLfloat v0, GLfloat v1) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform2fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform2fARB = extproc; - - glUniform2fARB(location, v0, v1); -} - -static void APIENTRY InitUniform3fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform3fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform3fARB = extproc; - - glUniform3fARB(location, v0, v1, v2); -} - -static void APIENTRY InitUniform4fARB (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform4fARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform4fARB = extproc; - - glUniform4fARB(location, v0, v1, v2, v3); -} - -static void APIENTRY InitUniform1iARB (GLint location, GLint v0) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform1iARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform1iARB = extproc; - - glUniform1iARB(location, v0); -} - -static void APIENTRY InitUniform2iARB (GLint location, GLint v0, GLint v1) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform2iARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform2iARB = extproc; - - glUniform2iARB(location, v0, v1); -} - -static void APIENTRY InitUniform3iARB (GLint location, GLint v0, GLint v1, GLint v2) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform3iARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform3iARB = extproc; - - glUniform3iARB(location, v0, v1, v2); -} - -static void APIENTRY InitUniform4iARB (GLint location, GLint v0, GLint v1, GLint v2, GLint v3) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform4iARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform4iARB = extproc; - - glUniform4iARB(location, v0, v1, v2, v3); -} - -static void APIENTRY InitUniform1fvARB (GLint location, GLsizei count, const GLfloat *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform1fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform1fvARB = extproc; - - glUniform1fvARB(location, count, value); -} - -static void APIENTRY InitUniform2fvARB (GLint location, GLsizei count, const GLfloat *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform2fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform2fvARB = extproc; - - glUniform2fvARB(location, count, value); -} - -static void APIENTRY InitUniform3fvARB (GLint location, GLsizei count, const GLfloat *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform3fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform3fvARB = extproc; - - glUniform3fvARB(location, count, value); -} - -static void APIENTRY InitUniform4fvARB (GLint location, GLsizei count, const GLfloat *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform4fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform4fvARB = extproc; - - glUniform4fvARB(location, count, value); -} - -static void APIENTRY InitUniform1ivARB (GLint location, GLsizei count, const GLint *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform1ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform1ivARB = extproc; - - glUniform1ivARB(location, count, value); -} - -static void APIENTRY InitUniform2ivARB (GLint location, GLsizei count, const GLint *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform2ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform2ivARB = extproc; - - glUniform2ivARB(location, count, value); -} - -static void APIENTRY InitUniform3ivARB (GLint location, GLsizei count, const GLint *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform3ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform3ivARB = extproc; - - glUniform3ivARB(location, count, value); -} - -static void APIENTRY InitUniform4ivARB (GLint location, GLsizei count, const GLint *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniform4ivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniform4ivARB = extproc; - - glUniform4ivARB(location, count, value); -} - -static void APIENTRY InitUniformMatrix2fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniformMatrix2fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniformMatrix2fvARB = extproc; - - glUniformMatrix2fvARB(location, count, transpose, value); -} - -static void APIENTRY InitUniformMatrix3fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniformMatrix3fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniformMatrix3fvARB = extproc; - - glUniformMatrix3fvARB(location, count, transpose, value); -} - -static void APIENTRY InitUniformMatrix4fvARB (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUniformMatrix4fvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUniformMatrix4fvARB = extproc; - - glUniformMatrix4fvARB(location, count, transpose, value); -} - -static void APIENTRY InitGetObjectParameterfvARB (GLhandleARB obj, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetObjectParameterfvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetObjectParameterfvARB = extproc; - - glGetObjectParameterfvARB(obj, pname, params); -} - -static void APIENTRY InitGetObjectParameterivARB (GLhandleARB obj, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetObjectParameterivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetObjectParameterivARB = extproc; - - glGetObjectParameterivARB(obj, pname, params); -} - -static void APIENTRY InitGetInfoLogARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetInfoLogARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetInfoLogARB = extproc; - - glGetInfoLogARB(obj, maxLength, length, infoLog); -} - -static void APIENTRY InitGetAttachedObjectsARB (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetAttachedObjectsARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetAttachedObjectsARB = extproc; - - glGetAttachedObjectsARB(containerObj, maxCount, count, obj); -} - -static GLint APIENTRY InitGetUniformLocationARB (GLhandleARB programObj, const GLcharARB *name) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetUniformLocationARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glGetUniformLocationARB = extproc; - - return glGetUniformLocationARB(programObj, name); -} - -static void APIENTRY InitGetActiveUniformARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetActiveUniformARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetActiveUniformARB = extproc; - - glGetActiveUniformARB(programObj, index, maxLength, length, size, type, name); -} - -static void APIENTRY InitGetUniformfvARB (GLhandleARB programObj, GLint location, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetUniformfvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetUniformfvARB = extproc; - - glGetUniformfvARB(programObj, location, params); -} - -static void APIENTRY InitGetUniformivARB (GLhandleARB programObj, GLint location, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetUniformivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetUniformivARB = extproc; - - glGetUniformivARB(programObj, location, params); -} - -static void APIENTRY InitGetShaderSourceARB (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetShaderSourceARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetShaderSourceARB = extproc; - - glGetShaderSourceARB(obj, maxLength, length, source); -} - -static void APIENTRY InitBindAttribLocationARB (GLhandleARB programObj, GLuint index, const GLcharARB *name) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindAttribLocationARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBindAttribLocationARB = extproc; - - glBindAttribLocationARB(programObj, index, name); -} - -static void APIENTRY InitGetActiveAttribARB (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetActiveAttribARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetActiveAttribARB = extproc; - - glGetActiveAttribARB(programObj, index, maxLength, length, size, type, name); -} - -static GLint APIENTRY InitGetAttribLocationARB (GLhandleARB programObj, const GLcharARB *name) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetAttribLocationARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glGetAttribLocationARB = extproc; - - return glGetAttribLocationARB(programObj, name); -} - -static void APIENTRY InitBlendColorEXT (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBlendColorEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBlendColorEXT = extproc; - - glBlendColorEXT(red, green, blue, alpha); -} - -static void APIENTRY InitPolygonOffsetEXT (GLfloat factor, GLfloat bias) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPolygonOffsetEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPolygonOffsetEXT = extproc; - - glPolygonOffsetEXT(factor, bias); -} - -static void APIENTRY InitTexImage3DEXT (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexImage3DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexImage3DEXT = extproc; - - glTexImage3DEXT(target, level, internalformat, width, height, depth, border, format, type, pixels); -} - -static void APIENTRY InitTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexSubImage3DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexSubImage3DEXT = extproc; - - glTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, pixels); -} - -static void APIENTRY InitGetTexFilterFuncSGIS (GLenum target, GLenum filter, GLfloat *weights) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetTexFilterFuncSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetTexFilterFuncSGIS = extproc; - - glGetTexFilterFuncSGIS(target, filter, weights); -} - -static void APIENTRY InitTexFilterFuncSGIS (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexFilterFuncSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexFilterFuncSGIS = extproc; - - glTexFilterFuncSGIS(target, filter, n, weights); -} - -static void APIENTRY InitTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexSubImage1DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexSubImage1DEXT = extproc; - - glTexSubImage1DEXT(target, level, xoffset, width, format, type, pixels); -} - -static void APIENTRY InitTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexSubImage2DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexSubImage2DEXT = extproc; - - glTexSubImage2DEXT(target, level, xoffset, yoffset, width, height, format, type, pixels); -} - -static void APIENTRY InitCopyTexImage1DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyTexImage1DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyTexImage1DEXT = extproc; - - glCopyTexImage1DEXT(target, level, internalformat, x, y, width, border); -} - -static void APIENTRY InitCopyTexImage2DEXT (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyTexImage2DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyTexImage2DEXT = extproc; - - glCopyTexImage2DEXT(target, level, internalformat, x, y, width, height, border); -} - -static void APIENTRY InitCopyTexSubImage1DEXT (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyTexSubImage1DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyTexSubImage1DEXT = extproc; - - glCopyTexSubImage1DEXT(target, level, xoffset, x, y, width); -} - -static void APIENTRY InitCopyTexSubImage2DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyTexSubImage2DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyTexSubImage2DEXT = extproc; - - glCopyTexSubImage2DEXT(target, level, xoffset, yoffset, x, y, width, height); -} - -static void APIENTRY InitCopyTexSubImage3DEXT (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyTexSubImage3DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyTexSubImage3DEXT = extproc; - - glCopyTexSubImage3DEXT(target, level, xoffset, yoffset, zoffset, x, y, width, height); -} - -static void APIENTRY InitGetHistogramEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetHistogramEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetHistogramEXT = extproc; - - glGetHistogramEXT(target, reset, format, type, values); -} - -static void APIENTRY InitGetHistogramParameterfvEXT (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetHistogramParameterfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetHistogramParameterfvEXT = extproc; - - glGetHistogramParameterfvEXT(target, pname, params); -} - -static void APIENTRY InitGetHistogramParameterivEXT (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetHistogramParameterivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetHistogramParameterivEXT = extproc; - - glGetHistogramParameterivEXT(target, pname, params); -} - -static void APIENTRY InitGetMinmaxEXT (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMinmaxEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMinmaxEXT = extproc; - - glGetMinmaxEXT(target, reset, format, type, values); -} - -static void APIENTRY InitGetMinmaxParameterfvEXT (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMinmaxParameterfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMinmaxParameterfvEXT = extproc; - - glGetMinmaxParameterfvEXT(target, pname, params); -} - -static void APIENTRY InitGetMinmaxParameterivEXT (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMinmaxParameterivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMinmaxParameterivEXT = extproc; - - glGetMinmaxParameterivEXT(target, pname, params); -} - -static void APIENTRY InitHistogramEXT (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glHistogramEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glHistogramEXT = extproc; - - glHistogramEXT(target, width, internalformat, sink); -} - -static void APIENTRY InitMinmaxEXT (GLenum target, GLenum internalformat, GLboolean sink) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMinmaxEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMinmaxEXT = extproc; - - glMinmaxEXT(target, internalformat, sink); -} - -static void APIENTRY InitResetHistogramEXT (GLenum target) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glResetHistogramEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glResetHistogramEXT = extproc; - - glResetHistogramEXT(target); -} - -static void APIENTRY InitResetMinmaxEXT (GLenum target) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glResetMinmaxEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glResetMinmaxEXT = extproc; - - glResetMinmaxEXT(target); -} - -static void APIENTRY InitConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionFilter1DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionFilter1DEXT = extproc; - - glConvolutionFilter1DEXT(target, internalformat, width, format, type, image); -} - -static void APIENTRY InitConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionFilter2DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionFilter2DEXT = extproc; - - glConvolutionFilter2DEXT(target, internalformat, width, height, format, type, image); -} - -static void APIENTRY InitConvolutionParameterfEXT (GLenum target, GLenum pname, GLfloat params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionParameterfEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionParameterfEXT = extproc; - - glConvolutionParameterfEXT(target, pname, params); -} - -static void APIENTRY InitConvolutionParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionParameterfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionParameterfvEXT = extproc; - - glConvolutionParameterfvEXT(target, pname, params); -} - -static void APIENTRY InitConvolutionParameteriEXT (GLenum target, GLenum pname, GLint params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionParameteriEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionParameteriEXT = extproc; - - glConvolutionParameteriEXT(target, pname, params); -} - -static void APIENTRY InitConvolutionParameterivEXT (GLenum target, GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glConvolutionParameterivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glConvolutionParameterivEXT = extproc; - - glConvolutionParameterivEXT(target, pname, params); -} - -static void APIENTRY InitCopyConvolutionFilter1DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyConvolutionFilter1DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyConvolutionFilter1DEXT = extproc; - - glCopyConvolutionFilter1DEXT(target, internalformat, x, y, width); -} - -static void APIENTRY InitCopyConvolutionFilter2DEXT (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyConvolutionFilter2DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyConvolutionFilter2DEXT = extproc; - - glCopyConvolutionFilter2DEXT(target, internalformat, x, y, width, height); -} - -static void APIENTRY InitGetConvolutionFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *image) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetConvolutionFilterEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetConvolutionFilterEXT = extproc; - - glGetConvolutionFilterEXT(target, format, type, image); -} - -static void APIENTRY InitGetConvolutionParameterfvEXT (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetConvolutionParameterfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetConvolutionParameterfvEXT = extproc; - - glGetConvolutionParameterfvEXT(target, pname, params); -} - -static void APIENTRY InitGetConvolutionParameterivEXT (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetConvolutionParameterivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetConvolutionParameterivEXT = extproc; - - glGetConvolutionParameterivEXT(target, pname, params); -} - -static void APIENTRY InitGetSeparableFilterEXT (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetSeparableFilterEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetSeparableFilterEXT = extproc; - - glGetSeparableFilterEXT(target, format, type, row, column, span); -} - -static void APIENTRY InitSeparableFilter2DEXT (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSeparableFilter2DEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSeparableFilter2DEXT = extproc; - - glSeparableFilter2DEXT(target, internalformat, width, height, format, type, row, column); -} - -static void APIENTRY InitColorTableSGI (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorTableSGI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorTableSGI = extproc; - - glColorTableSGI(target, internalformat, width, format, type, table); -} - -static void APIENTRY InitColorTableParameterfvSGI (GLenum target, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorTableParameterfvSGI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorTableParameterfvSGI = extproc; - - glColorTableParameterfvSGI(target, pname, params); -} - -static void APIENTRY InitColorTableParameterivSGI (GLenum target, GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorTableParameterivSGI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorTableParameterivSGI = extproc; - - glColorTableParameterivSGI(target, pname, params); -} - -static void APIENTRY InitCopyColorTableSGI (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyColorTableSGI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyColorTableSGI = extproc; - - glCopyColorTableSGI(target, internalformat, x, y, width); -} - -static void APIENTRY InitGetColorTableSGI (GLenum target, GLenum format, GLenum type, GLvoid *table) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetColorTableSGI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetColorTableSGI = extproc; - - glGetColorTableSGI(target, format, type, table); -} - -static void APIENTRY InitGetColorTableParameterfvSGI (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetColorTableParameterfvSGI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetColorTableParameterfvSGI = extproc; - - glGetColorTableParameterfvSGI(target, pname, params); -} - -static void APIENTRY InitGetColorTableParameterivSGI (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetColorTableParameterivSGI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetColorTableParameterivSGI = extproc; - - glGetColorTableParameterivSGI(target, pname, params); -} - -static void APIENTRY InitPixelTexGenSGIX (GLenum mode) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPixelTexGenSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPixelTexGenSGIX = extproc; - - glPixelTexGenSGIX(mode); -} - -static void APIENTRY InitPixelTexGenParameteriSGIS (GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPixelTexGenParameteriSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPixelTexGenParameteriSGIS = extproc; - - glPixelTexGenParameteriSGIS(pname, param); -} - -static void APIENTRY InitPixelTexGenParameterivSGIS (GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPixelTexGenParameterivSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPixelTexGenParameterivSGIS = extproc; - - glPixelTexGenParameterivSGIS(pname, params); -} - -static void APIENTRY InitPixelTexGenParameterfSGIS (GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPixelTexGenParameterfSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPixelTexGenParameterfSGIS = extproc; - - glPixelTexGenParameterfSGIS(pname, param); -} - -static void APIENTRY InitPixelTexGenParameterfvSGIS (GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPixelTexGenParameterfvSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPixelTexGenParameterfvSGIS = extproc; - - glPixelTexGenParameterfvSGIS(pname, params); -} - -static void APIENTRY InitGetPixelTexGenParameterivSGIS (GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetPixelTexGenParameterivSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetPixelTexGenParameterivSGIS = extproc; - - glGetPixelTexGenParameterivSGIS(pname, params); -} - -static void APIENTRY InitGetPixelTexGenParameterfvSGIS (GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetPixelTexGenParameterfvSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetPixelTexGenParameterfvSGIS = extproc; - - glGetPixelTexGenParameterfvSGIS(pname, params); -} - -static void APIENTRY InitTexImage4DSGIS (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexImage4DSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexImage4DSGIS = extproc; - - glTexImage4DSGIS(target, level, internalformat, width, height, depth, size4d, border, format, type, pixels); -} - -static void APIENTRY InitTexSubImage4DSGIS (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexSubImage4DSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexSubImage4DSGIS = extproc; - - glTexSubImage4DSGIS(target, level, xoffset, yoffset, zoffset, woffset, width, height, depth, size4d, format, type, pixels); -} - -static GLboolean APIENTRY InitAreTexturesResidentEXT (GLsizei n, const GLuint *textures, GLboolean *residences) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glAreTexturesResidentEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glAreTexturesResidentEXT = extproc; - - return glAreTexturesResidentEXT(n, textures, residences); -} - -static void APIENTRY InitBindTextureEXT (GLenum target, GLuint texture) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindTextureEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBindTextureEXT = extproc; - - glBindTextureEXT(target, texture); -} - -static void APIENTRY InitDeleteTexturesEXT (GLsizei n, const GLuint *textures) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteTexturesEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteTexturesEXT = extproc; - - glDeleteTexturesEXT(n, textures); -} - -static void APIENTRY InitGenTexturesEXT (GLsizei n, GLuint *textures) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenTexturesEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenTexturesEXT = extproc; - - glGenTexturesEXT(n, textures); -} - -static GLboolean APIENTRY InitIsTextureEXT (GLuint texture) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsTextureEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsTextureEXT = extproc; - - return glIsTextureEXT(texture); -} - -static void APIENTRY InitPrioritizeTexturesEXT (GLsizei n, const GLuint *textures, const GLclampf *priorities) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPrioritizeTexturesEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPrioritizeTexturesEXT = extproc; - - glPrioritizeTexturesEXT(n, textures, priorities); -} - -static void APIENTRY InitDetailTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDetailTexFuncSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDetailTexFuncSGIS = extproc; - - glDetailTexFuncSGIS(target, n, points); -} - -static void APIENTRY InitGetDetailTexFuncSGIS (GLenum target, GLfloat *points) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetDetailTexFuncSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetDetailTexFuncSGIS = extproc; - - glGetDetailTexFuncSGIS(target, points); -} - -static void APIENTRY InitSharpenTexFuncSGIS (GLenum target, GLsizei n, const GLfloat *points) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSharpenTexFuncSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSharpenTexFuncSGIS = extproc; - - glSharpenTexFuncSGIS(target, n, points); -} - -static void APIENTRY InitGetSharpenTexFuncSGIS (GLenum target, GLfloat *points) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetSharpenTexFuncSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetSharpenTexFuncSGIS = extproc; - - glGetSharpenTexFuncSGIS(target, points); -} - -static void APIENTRY InitSampleMaskSGIS (GLclampf value, GLboolean invert) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSampleMaskSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSampleMaskSGIS = extproc; - - glSampleMaskSGIS(value, invert); -} - -static void APIENTRY InitSamplePatternSGIS (GLenum pattern) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSamplePatternSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSamplePatternSGIS = extproc; - - glSamplePatternSGIS(pattern); -} - -static void APIENTRY InitArrayElementEXT (GLint i) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glArrayElementEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glArrayElementEXT = extproc; - - glArrayElementEXT(i); -} - -static void APIENTRY InitColorPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorPointerEXT = extproc; - - glColorPointerEXT(size, type, stride, count, pointer); -} - -static void APIENTRY InitDrawArraysEXT (GLenum mode, GLint first, GLsizei count) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDrawArraysEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDrawArraysEXT = extproc; - - glDrawArraysEXT(mode, first, count); -} - -static void APIENTRY InitEdgeFlagPointerEXT (GLsizei stride, GLsizei count, const GLboolean *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glEdgeFlagPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glEdgeFlagPointerEXT = extproc; - - glEdgeFlagPointerEXT(stride, count, pointer); -} - -static void APIENTRY InitGetPointervEXT (GLenum pname, GLvoid* *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetPointervEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetPointervEXT = extproc; - - glGetPointervEXT(pname, params); -} - -static void APIENTRY InitIndexPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIndexPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glIndexPointerEXT = extproc; - - glIndexPointerEXT(type, stride, count, pointer); -} - -static void APIENTRY InitNormalPointerEXT (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalPointerEXT = extproc; - - glNormalPointerEXT(type, stride, count, pointer); -} - -static void APIENTRY InitTexCoordPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoordPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoordPointerEXT = extproc; - - glTexCoordPointerEXT(size, type, stride, count, pointer); -} - -static void APIENTRY InitVertexPointerEXT (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexPointerEXT = extproc; - - glVertexPointerEXT(size, type, stride, count, pointer); -} - -static void APIENTRY InitBlendEquationEXT (GLenum mode) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBlendEquationEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBlendEquationEXT = extproc; - - glBlendEquationEXT(mode); -} - -static void APIENTRY InitSpriteParameterfSGIX (GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSpriteParameterfSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSpriteParameterfSGIX = extproc; - - glSpriteParameterfSGIX(pname, param); -} - -static void APIENTRY InitSpriteParameterfvSGIX (GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSpriteParameterfvSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSpriteParameterfvSGIX = extproc; - - glSpriteParameterfvSGIX(pname, params); -} - -static void APIENTRY InitSpriteParameteriSGIX (GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSpriteParameteriSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSpriteParameteriSGIX = extproc; - - glSpriteParameteriSGIX(pname, param); -} - -static void APIENTRY InitSpriteParameterivSGIX (GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSpriteParameterivSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSpriteParameterivSGIX = extproc; - - glSpriteParameterivSGIX(pname, params); -} - -static void APIENTRY InitPointParameterfEXT (GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameterfEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameterfEXT = extproc; - - glPointParameterfEXT(pname, param); -} - -static void APIENTRY InitPointParameterfvEXT (GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameterfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameterfvEXT = extproc; - - glPointParameterfvEXT(pname, params); -} - -static void APIENTRY InitPointParameterfSGIS (GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameterfSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameterfSGIS = extproc; - - glPointParameterfSGIS(pname, param); -} - -static void APIENTRY InitPointParameterfvSGIS (GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameterfvSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameterfvSGIS = extproc; - - glPointParameterfvSGIS(pname, params); -} - -static GLint APIENTRY InitGetInstrumentsSGIX (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetInstrumentsSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glGetInstrumentsSGIX = extproc; - - return glGetInstrumentsSGIX(); -} - -static void APIENTRY InitInstrumentsBufferSGIX (GLsizei size, GLint *buffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glInstrumentsBufferSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glInstrumentsBufferSGIX = extproc; - - glInstrumentsBufferSGIX(size, buffer); -} - -static GLint APIENTRY InitPollInstrumentsSGIX (GLint *marker_p) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPollInstrumentsSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glPollInstrumentsSGIX = extproc; - - return glPollInstrumentsSGIX(marker_p); -} - -static void APIENTRY InitReadInstrumentsSGIX (GLint marker) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReadInstrumentsSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReadInstrumentsSGIX = extproc; - - glReadInstrumentsSGIX(marker); -} - -static void APIENTRY InitStartInstrumentsSGIX (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glStartInstrumentsSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glStartInstrumentsSGIX = extproc; - - glStartInstrumentsSGIX(); -} - -static void APIENTRY InitStopInstrumentsSGIX (GLint marker) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glStopInstrumentsSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glStopInstrumentsSGIX = extproc; - - glStopInstrumentsSGIX(marker); -} - -static void APIENTRY InitFrameZoomSGIX (GLint factor) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFrameZoomSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFrameZoomSGIX = extproc; - - glFrameZoomSGIX(factor); -} - -static void APIENTRY InitTagSampleBufferSGIX (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTagSampleBufferSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTagSampleBufferSGIX = extproc; - - glTagSampleBufferSGIX(); -} - -static void APIENTRY InitDeformationMap3dSGIX (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeformationMap3dSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeformationMap3dSGIX = extproc; - - glDeformationMap3dSGIX(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points); -} - -static void APIENTRY InitDeformationMap3fSGIX (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeformationMap3fSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeformationMap3fSGIX = extproc; - - glDeformationMap3fSGIX(target, u1, u2, ustride, uorder, v1, v2, vstride, vorder, w1, w2, wstride, worder, points); -} - -static void APIENTRY InitDeformSGIX (GLbitfield mask) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeformSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeformSGIX = extproc; - - glDeformSGIX(mask); -} - -static void APIENTRY InitLoadIdentityDeformationMapSGIX (GLbitfield mask) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glLoadIdentityDeformationMapSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glLoadIdentityDeformationMapSGIX = extproc; - - glLoadIdentityDeformationMapSGIX(mask); -} - -static void APIENTRY InitReferencePlaneSGIX (const GLdouble *equation) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReferencePlaneSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReferencePlaneSGIX = extproc; - - glReferencePlaneSGIX(equation); -} - -static void APIENTRY InitFlushRasterSGIX (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFlushRasterSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFlushRasterSGIX = extproc; - - glFlushRasterSGIX(); -} - -static void APIENTRY InitFogFuncSGIS (GLsizei n, const GLfloat *points) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogFuncSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogFuncSGIS = extproc; - - glFogFuncSGIS(n, points); -} - -static void APIENTRY InitGetFogFuncSGIS (GLfloat *points) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetFogFuncSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetFogFuncSGIS = extproc; - - glGetFogFuncSGIS(points); -} - -static void APIENTRY InitImageTransformParameteriHP (GLenum target, GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glImageTransformParameteriHP"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glImageTransformParameteriHP = extproc; - - glImageTransformParameteriHP(target, pname, param); -} - -static void APIENTRY InitImageTransformParameterfHP (GLenum target, GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glImageTransformParameterfHP"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glImageTransformParameterfHP = extproc; - - glImageTransformParameterfHP(target, pname, param); -} - -static void APIENTRY InitImageTransformParameterivHP (GLenum target, GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glImageTransformParameterivHP"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glImageTransformParameterivHP = extproc; - - glImageTransformParameterivHP(target, pname, params); -} - -static void APIENTRY InitImageTransformParameterfvHP (GLenum target, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glImageTransformParameterfvHP"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glImageTransformParameterfvHP = extproc; - - glImageTransformParameterfvHP(target, pname, params); -} - -static void APIENTRY InitGetImageTransformParameterivHP (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetImageTransformParameterivHP"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetImageTransformParameterivHP = extproc; - - glGetImageTransformParameterivHP(target, pname, params); -} - -static void APIENTRY InitGetImageTransformParameterfvHP (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetImageTransformParameterfvHP"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetImageTransformParameterfvHP = extproc; - - glGetImageTransformParameterfvHP(target, pname, params); -} - -static void APIENTRY InitColorSubTableEXT (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorSubTableEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorSubTableEXT = extproc; - - glColorSubTableEXT(target, start, count, format, type, data); -} - -static void APIENTRY InitCopyColorSubTableEXT (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCopyColorSubTableEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCopyColorSubTableEXT = extproc; - - glCopyColorSubTableEXT(target, start, x, y, width); -} - -static void APIENTRY InitHintPGI (GLenum target, GLint mode) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glHintPGI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glHintPGI = extproc; - - glHintPGI(target, mode); -} - -static void APIENTRY InitColorTableEXT (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorTableEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorTableEXT = extproc; - - glColorTableEXT(target, internalFormat, width, format, type, table); -} - -static void APIENTRY InitGetColorTableEXT (GLenum target, GLenum format, GLenum type, GLvoid *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetColorTableEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetColorTableEXT = extproc; - - glGetColorTableEXT(target, format, type, data); -} - -static void APIENTRY InitGetColorTableParameterivEXT (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetColorTableParameterivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetColorTableParameterivEXT = extproc; - - glGetColorTableParameterivEXT(target, pname, params); -} - -static void APIENTRY InitGetColorTableParameterfvEXT (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetColorTableParameterfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetColorTableParameterfvEXT = extproc; - - glGetColorTableParameterfvEXT(target, pname, params); -} - -static void APIENTRY InitGetListParameterfvSGIX (GLuint list, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetListParameterfvSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetListParameterfvSGIX = extproc; - - glGetListParameterfvSGIX(list, pname, params); -} - -static void APIENTRY InitGetListParameterivSGIX (GLuint list, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetListParameterivSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetListParameterivSGIX = extproc; - - glGetListParameterivSGIX(list, pname, params); -} - -static void APIENTRY InitListParameterfSGIX (GLuint list, GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glListParameterfSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glListParameterfSGIX = extproc; - - glListParameterfSGIX(list, pname, param); -} - -static void APIENTRY InitListParameterfvSGIX (GLuint list, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glListParameterfvSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glListParameterfvSGIX = extproc; - - glListParameterfvSGIX(list, pname, params); -} - -static void APIENTRY InitListParameteriSGIX (GLuint list, GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glListParameteriSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glListParameteriSGIX = extproc; - - glListParameteriSGIX(list, pname, param); -} - -static void APIENTRY InitListParameterivSGIX (GLuint list, GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glListParameterivSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glListParameterivSGIX = extproc; - - glListParameterivSGIX(list, pname, params); -} - -static void APIENTRY InitIndexMaterialEXT (GLenum face, GLenum mode) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIndexMaterialEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glIndexMaterialEXT = extproc; - - glIndexMaterialEXT(face, mode); -} - -static void APIENTRY InitIndexFuncEXT (GLenum func, GLclampf ref) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIndexFuncEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glIndexFuncEXT = extproc; - - glIndexFuncEXT(func, ref); -} - -static void APIENTRY InitLockArraysEXT (GLint first, GLsizei count) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glLockArraysEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glLockArraysEXT = extproc; - - glLockArraysEXT(first, count); -} - -static void APIENTRY InitUnlockArraysEXT (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUnlockArraysEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUnlockArraysEXT = extproc; - - glUnlockArraysEXT(); -} - -static void APIENTRY InitCullParameterdvEXT (GLenum pname, GLdouble *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCullParameterdvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCullParameterdvEXT = extproc; - - glCullParameterdvEXT(pname, params); -} - -static void APIENTRY InitCullParameterfvEXT (GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCullParameterfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCullParameterfvEXT = extproc; - - glCullParameterfvEXT(pname, params); -} - -static void APIENTRY InitFragmentColorMaterialSGIX (GLenum face, GLenum mode) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentColorMaterialSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentColorMaterialSGIX = extproc; - - glFragmentColorMaterialSGIX(face, mode); -} - -static void APIENTRY InitFragmentLightfSGIX (GLenum light, GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentLightfSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentLightfSGIX = extproc; - - glFragmentLightfSGIX(light, pname, param); -} - -static void APIENTRY InitFragmentLightfvSGIX (GLenum light, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentLightfvSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentLightfvSGIX = extproc; - - glFragmentLightfvSGIX(light, pname, params); -} - -static void APIENTRY InitFragmentLightiSGIX (GLenum light, GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentLightiSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentLightiSGIX = extproc; - - glFragmentLightiSGIX(light, pname, param); -} - -static void APIENTRY InitFragmentLightivSGIX (GLenum light, GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentLightivSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentLightivSGIX = extproc; - - glFragmentLightivSGIX(light, pname, params); -} - -static void APIENTRY InitFragmentLightModelfSGIX (GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentLightModelfSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentLightModelfSGIX = extproc; - - glFragmentLightModelfSGIX(pname, param); -} - -static void APIENTRY InitFragmentLightModelfvSGIX (GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentLightModelfvSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentLightModelfvSGIX = extproc; - - glFragmentLightModelfvSGIX(pname, params); -} - -static void APIENTRY InitFragmentLightModeliSGIX (GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentLightModeliSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentLightModeliSGIX = extproc; - - glFragmentLightModeliSGIX(pname, param); -} - -static void APIENTRY InitFragmentLightModelivSGIX (GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentLightModelivSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentLightModelivSGIX = extproc; - - glFragmentLightModelivSGIX(pname, params); -} - -static void APIENTRY InitFragmentMaterialfSGIX (GLenum face, GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentMaterialfSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentMaterialfSGIX = extproc; - - glFragmentMaterialfSGIX(face, pname, param); -} - -static void APIENTRY InitFragmentMaterialfvSGIX (GLenum face, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentMaterialfvSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentMaterialfvSGIX = extproc; - - glFragmentMaterialfvSGIX(face, pname, params); -} - -static void APIENTRY InitFragmentMaterialiSGIX (GLenum face, GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentMaterialiSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentMaterialiSGIX = extproc; - - glFragmentMaterialiSGIX(face, pname, param); -} - -static void APIENTRY InitFragmentMaterialivSGIX (GLenum face, GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFragmentMaterialivSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFragmentMaterialivSGIX = extproc; - - glFragmentMaterialivSGIX(face, pname, params); -} - -static void APIENTRY InitGetFragmentLightfvSGIX (GLenum light, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetFragmentLightfvSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetFragmentLightfvSGIX = extproc; - - glGetFragmentLightfvSGIX(light, pname, params); -} - -static void APIENTRY InitGetFragmentLightivSGIX (GLenum light, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetFragmentLightivSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetFragmentLightivSGIX = extproc; - - glGetFragmentLightivSGIX(light, pname, params); -} - -static void APIENTRY InitGetFragmentMaterialfvSGIX (GLenum face, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetFragmentMaterialfvSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetFragmentMaterialfvSGIX = extproc; - - glGetFragmentMaterialfvSGIX(face, pname, params); -} - -static void APIENTRY InitGetFragmentMaterialivSGIX (GLenum face, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetFragmentMaterialivSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetFragmentMaterialivSGIX = extproc; - - glGetFragmentMaterialivSGIX(face, pname, params); -} - -static void APIENTRY InitLightEnviSGIX (GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glLightEnviSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glLightEnviSGIX = extproc; - - glLightEnviSGIX(pname, param); -} - -static void APIENTRY InitDrawRangeElementsEXT (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDrawRangeElementsEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDrawRangeElementsEXT = extproc; - - glDrawRangeElementsEXT(mode, start, end, count, type, indices); -} - -static void APIENTRY InitApplyTextureEXT (GLenum mode) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glApplyTextureEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glApplyTextureEXT = extproc; - - glApplyTextureEXT(mode); -} - -static void APIENTRY InitTextureLightEXT (GLenum pname) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTextureLightEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTextureLightEXT = extproc; - - glTextureLightEXT(pname); -} - -static void APIENTRY InitTextureMaterialEXT (GLenum face, GLenum mode) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTextureMaterialEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTextureMaterialEXT = extproc; - - glTextureMaterialEXT(face, mode); -} - -static void APIENTRY InitAsyncMarkerSGIX (GLuint marker) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glAsyncMarkerSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glAsyncMarkerSGIX = extproc; - - glAsyncMarkerSGIX(marker); -} - -static GLint APIENTRY InitFinishAsyncSGIX (GLuint *markerp) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFinishAsyncSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glFinishAsyncSGIX = extproc; - - return glFinishAsyncSGIX(markerp); -} - -static GLint APIENTRY InitPollAsyncSGIX (GLuint *markerp) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPollAsyncSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glPollAsyncSGIX = extproc; - - return glPollAsyncSGIX(markerp); -} - -static GLuint APIENTRY InitGenAsyncMarkersSGIX (GLsizei range) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenAsyncMarkersSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glGenAsyncMarkersSGIX = extproc; - - return glGenAsyncMarkersSGIX(range); -} - -static void APIENTRY InitDeleteAsyncMarkersSGIX (GLuint marker, GLsizei range) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteAsyncMarkersSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteAsyncMarkersSGIX = extproc; - - glDeleteAsyncMarkersSGIX(marker, range); -} - -static GLboolean APIENTRY InitIsAsyncMarkerSGIX (GLuint marker) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsAsyncMarkerSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsAsyncMarkerSGIX = extproc; - - return glIsAsyncMarkerSGIX(marker); -} - -static void APIENTRY InitVertexPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexPointervINTEL"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexPointervINTEL = extproc; - - glVertexPointervINTEL(size, type, pointer); -} - -static void APIENTRY InitNormalPointervINTEL (GLenum type, const GLvoid* *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalPointervINTEL"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalPointervINTEL = extproc; - - glNormalPointervINTEL(type, pointer); -} - -static void APIENTRY InitColorPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorPointervINTEL"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorPointervINTEL = extproc; - - glColorPointervINTEL(size, type, pointer); -} - -static void APIENTRY InitTexCoordPointervINTEL (GLint size, GLenum type, const GLvoid* *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoordPointervINTEL"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoordPointervINTEL = extproc; - - glTexCoordPointervINTEL(size, type, pointer); -} - -static void APIENTRY InitPixelTransformParameteriEXT (GLenum target, GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPixelTransformParameteriEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPixelTransformParameteriEXT = extproc; - - glPixelTransformParameteriEXT(target, pname, param); -} - -static void APIENTRY InitPixelTransformParameterfEXT (GLenum target, GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPixelTransformParameterfEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPixelTransformParameterfEXT = extproc; - - glPixelTransformParameterfEXT(target, pname, param); -} - -static void APIENTRY InitPixelTransformParameterivEXT (GLenum target, GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPixelTransformParameterivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPixelTransformParameterivEXT = extproc; - - glPixelTransformParameterivEXT(target, pname, params); -} - -static void APIENTRY InitPixelTransformParameterfvEXT (GLenum target, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPixelTransformParameterfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPixelTransformParameterfvEXT = extproc; - - glPixelTransformParameterfvEXT(target, pname, params); -} - -static void APIENTRY InitSecondaryColor3bEXT (GLbyte red, GLbyte green, GLbyte blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3bEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3bEXT = extproc; - - glSecondaryColor3bEXT(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3bvEXT (const GLbyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3bvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3bvEXT = extproc; - - glSecondaryColor3bvEXT(v); -} - -static void APIENTRY InitSecondaryColor3dEXT (GLdouble red, GLdouble green, GLdouble blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3dEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3dEXT = extproc; - - glSecondaryColor3dEXT(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3dvEXT (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3dvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3dvEXT = extproc; - - glSecondaryColor3dvEXT(v); -} - -static void APIENTRY InitSecondaryColor3fEXT (GLfloat red, GLfloat green, GLfloat blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3fEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3fEXT = extproc; - - glSecondaryColor3fEXT(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3fvEXT (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3fvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3fvEXT = extproc; - - glSecondaryColor3fvEXT(v); -} - -static void APIENTRY InitSecondaryColor3iEXT (GLint red, GLint green, GLint blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3iEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3iEXT = extproc; - - glSecondaryColor3iEXT(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3ivEXT (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3ivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3ivEXT = extproc; - - glSecondaryColor3ivEXT(v); -} - -static void APIENTRY InitSecondaryColor3sEXT (GLshort red, GLshort green, GLshort blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3sEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3sEXT = extproc; - - glSecondaryColor3sEXT(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3svEXT (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3svEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3svEXT = extproc; - - glSecondaryColor3svEXT(v); -} - -static void APIENTRY InitSecondaryColor3ubEXT (GLubyte red, GLubyte green, GLubyte blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3ubEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3ubEXT = extproc; - - glSecondaryColor3ubEXT(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3ubvEXT (const GLubyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3ubvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3ubvEXT = extproc; - - glSecondaryColor3ubvEXT(v); -} - -static void APIENTRY InitSecondaryColor3uiEXT (GLuint red, GLuint green, GLuint blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3uiEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3uiEXT = extproc; - - glSecondaryColor3uiEXT(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3uivEXT (const GLuint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3uivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3uivEXT = extproc; - - glSecondaryColor3uivEXT(v); -} - -static void APIENTRY InitSecondaryColor3usEXT (GLushort red, GLushort green, GLushort blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3usEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3usEXT = extproc; - - glSecondaryColor3usEXT(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3usvEXT (const GLushort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3usvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3usvEXT = extproc; - - glSecondaryColor3usvEXT(v); -} - -static void APIENTRY InitSecondaryColorPointerEXT (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColorPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColorPointerEXT = extproc; - - glSecondaryColorPointerEXT(size, type, stride, pointer); -} - -static void APIENTRY InitTextureNormalEXT (GLenum mode) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTextureNormalEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTextureNormalEXT = extproc; - - glTextureNormalEXT(mode); -} - -static void APIENTRY InitMultiDrawArraysEXT (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiDrawArraysEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiDrawArraysEXT = extproc; - - glMultiDrawArraysEXT(mode, first, count, primcount); -} - -static void APIENTRY InitMultiDrawElementsEXT (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiDrawElementsEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiDrawElementsEXT = extproc; - - glMultiDrawElementsEXT(mode, count, type, indices, primcount); -} - -static void APIENTRY InitFogCoordfEXT (GLfloat coord) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoordfEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoordfEXT = extproc; - - glFogCoordfEXT(coord); -} - -static void APIENTRY InitFogCoordfvEXT (const GLfloat *coord) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoordfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoordfvEXT = extproc; - - glFogCoordfvEXT(coord); -} - -static void APIENTRY InitFogCoorddEXT (GLdouble coord) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoorddEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoorddEXT = extproc; - - glFogCoorddEXT(coord); -} - -static void APIENTRY InitFogCoorddvEXT (const GLdouble *coord) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoorddvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoorddvEXT = extproc; - - glFogCoorddvEXT(coord); -} - -static void APIENTRY InitFogCoordPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoordPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoordPointerEXT = extproc; - - glFogCoordPointerEXT(type, stride, pointer); -} - -static void APIENTRY InitTangent3bEXT (GLbyte tx, GLbyte ty, GLbyte tz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangent3bEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangent3bEXT = extproc; - - glTangent3bEXT(tx, ty, tz); -} - -static void APIENTRY InitTangent3bvEXT (const GLbyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangent3bvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangent3bvEXT = extproc; - - glTangent3bvEXT(v); -} - -static void APIENTRY InitTangent3dEXT (GLdouble tx, GLdouble ty, GLdouble tz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangent3dEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangent3dEXT = extproc; - - glTangent3dEXT(tx, ty, tz); -} - -static void APIENTRY InitTangent3dvEXT (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangent3dvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangent3dvEXT = extproc; - - glTangent3dvEXT(v); -} - -static void APIENTRY InitTangent3fEXT (GLfloat tx, GLfloat ty, GLfloat tz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangent3fEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangent3fEXT = extproc; - - glTangent3fEXT(tx, ty, tz); -} - -static void APIENTRY InitTangent3fvEXT (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangent3fvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangent3fvEXT = extproc; - - glTangent3fvEXT(v); -} - -static void APIENTRY InitTangent3iEXT (GLint tx, GLint ty, GLint tz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangent3iEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangent3iEXT = extproc; - - glTangent3iEXT(tx, ty, tz); -} - -static void APIENTRY InitTangent3ivEXT (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangent3ivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangent3ivEXT = extproc; - - glTangent3ivEXT(v); -} - -static void APIENTRY InitTangent3sEXT (GLshort tx, GLshort ty, GLshort tz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangent3sEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangent3sEXT = extproc; - - glTangent3sEXT(tx, ty, tz); -} - -static void APIENTRY InitTangent3svEXT (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangent3svEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangent3svEXT = extproc; - - glTangent3svEXT(v); -} - -static void APIENTRY InitBinormal3bEXT (GLbyte bx, GLbyte by, GLbyte bz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormal3bEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormal3bEXT = extproc; - - glBinormal3bEXT(bx, by, bz); -} - -static void APIENTRY InitBinormal3bvEXT (const GLbyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormal3bvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormal3bvEXT = extproc; - - glBinormal3bvEXT(v); -} - -static void APIENTRY InitBinormal3dEXT (GLdouble bx, GLdouble by, GLdouble bz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormal3dEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormal3dEXT = extproc; - - glBinormal3dEXT(bx, by, bz); -} - -static void APIENTRY InitBinormal3dvEXT (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormal3dvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormal3dvEXT = extproc; - - glBinormal3dvEXT(v); -} - -static void APIENTRY InitBinormal3fEXT (GLfloat bx, GLfloat by, GLfloat bz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormal3fEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormal3fEXT = extproc; - - glBinormal3fEXT(bx, by, bz); -} - -static void APIENTRY InitBinormal3fvEXT (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormal3fvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormal3fvEXT = extproc; - - glBinormal3fvEXT(v); -} - -static void APIENTRY InitBinormal3iEXT (GLint bx, GLint by, GLint bz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormal3iEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormal3iEXT = extproc; - - glBinormal3iEXT(bx, by, bz); -} - -static void APIENTRY InitBinormal3ivEXT (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormal3ivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormal3ivEXT = extproc; - - glBinormal3ivEXT(v); -} - -static void APIENTRY InitBinormal3sEXT (GLshort bx, GLshort by, GLshort bz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormal3sEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormal3sEXT = extproc; - - glBinormal3sEXT(bx, by, bz); -} - -static void APIENTRY InitBinormal3svEXT (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormal3svEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormal3svEXT = extproc; - - glBinormal3svEXT(v); -} - -static void APIENTRY InitTangentPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTangentPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTangentPointerEXT = extproc; - - glTangentPointerEXT(type, stride, pointer); -} - -static void APIENTRY InitBinormalPointerEXT (GLenum type, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBinormalPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBinormalPointerEXT = extproc; - - glBinormalPointerEXT(type, stride, pointer); -} - -static void APIENTRY InitFinishTextureSUNX (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFinishTextureSUNX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFinishTextureSUNX = extproc; - - glFinishTextureSUNX(); -} - -static void APIENTRY InitGlobalAlphaFactorbSUN (GLbyte factor) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGlobalAlphaFactorbSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGlobalAlphaFactorbSUN = extproc; - - glGlobalAlphaFactorbSUN(factor); -} - -static void APIENTRY InitGlobalAlphaFactorsSUN (GLshort factor) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGlobalAlphaFactorsSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGlobalAlphaFactorsSUN = extproc; - - glGlobalAlphaFactorsSUN(factor); -} - -static void APIENTRY InitGlobalAlphaFactoriSUN (GLint factor) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGlobalAlphaFactoriSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGlobalAlphaFactoriSUN = extproc; - - glGlobalAlphaFactoriSUN(factor); -} - -static void APIENTRY InitGlobalAlphaFactorfSUN (GLfloat factor) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGlobalAlphaFactorfSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGlobalAlphaFactorfSUN = extproc; - - glGlobalAlphaFactorfSUN(factor); -} - -static void APIENTRY InitGlobalAlphaFactordSUN (GLdouble factor) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGlobalAlphaFactordSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGlobalAlphaFactordSUN = extproc; - - glGlobalAlphaFactordSUN(factor); -} - -static void APIENTRY InitGlobalAlphaFactorubSUN (GLubyte factor) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGlobalAlphaFactorubSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGlobalAlphaFactorubSUN = extproc; - - glGlobalAlphaFactorubSUN(factor); -} - -static void APIENTRY InitGlobalAlphaFactorusSUN (GLushort factor) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGlobalAlphaFactorusSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGlobalAlphaFactorusSUN = extproc; - - glGlobalAlphaFactorusSUN(factor); -} - -static void APIENTRY InitGlobalAlphaFactoruiSUN (GLuint factor) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGlobalAlphaFactoruiSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGlobalAlphaFactoruiSUN = extproc; - - glGlobalAlphaFactoruiSUN(factor); -} - -static void APIENTRY InitReplacementCodeuiSUN (GLuint code) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiSUN = extproc; - - glReplacementCodeuiSUN(code); -} - -static void APIENTRY InitReplacementCodeusSUN (GLushort code) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeusSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeusSUN = extproc; - - glReplacementCodeusSUN(code); -} - -static void APIENTRY InitReplacementCodeubSUN (GLubyte code) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeubSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeubSUN = extproc; - - glReplacementCodeubSUN(code); -} - -static void APIENTRY InitReplacementCodeuivSUN (const GLuint *code) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuivSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuivSUN = extproc; - - glReplacementCodeuivSUN(code); -} - -static void APIENTRY InitReplacementCodeusvSUN (const GLushort *code) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeusvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeusvSUN = extproc; - - glReplacementCodeusvSUN(code); -} - -static void APIENTRY InitReplacementCodeubvSUN (const GLubyte *code) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeubvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeubvSUN = extproc; - - glReplacementCodeubvSUN(code); -} - -static void APIENTRY InitReplacementCodePointerSUN (GLenum type, GLsizei stride, const GLvoid* *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodePointerSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodePointerSUN = extproc; - - glReplacementCodePointerSUN(type, stride, pointer); -} - -static void APIENTRY InitColor4ubVertex2fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor4ubVertex2fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor4ubVertex2fSUN = extproc; - - glColor4ubVertex2fSUN(r, g, b, a, x, y); -} - -static void APIENTRY InitColor4ubVertex2fvSUN (const GLubyte *c, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor4ubVertex2fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor4ubVertex2fvSUN = extproc; - - glColor4ubVertex2fvSUN(c, v); -} - -static void APIENTRY InitColor4ubVertex3fSUN (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor4ubVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor4ubVertex3fSUN = extproc; - - glColor4ubVertex3fSUN(r, g, b, a, x, y, z); -} - -static void APIENTRY InitColor4ubVertex3fvSUN (const GLubyte *c, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor4ubVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor4ubVertex3fvSUN = extproc; - - glColor4ubVertex3fvSUN(c, v); -} - -static void APIENTRY InitColor3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor3fVertex3fSUN = extproc; - - glColor3fVertex3fSUN(r, g, b, x, y, z); -} - -static void APIENTRY InitColor3fVertex3fvSUN (const GLfloat *c, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor3fVertex3fvSUN = extproc; - - glColor3fVertex3fvSUN(c, v); -} - -static void APIENTRY InitNormal3fVertex3fSUN (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormal3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormal3fVertex3fSUN = extproc; - - glNormal3fVertex3fSUN(nx, ny, nz, x, y, z); -} - -static void APIENTRY InitNormal3fVertex3fvSUN (const GLfloat *n, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormal3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormal3fVertex3fvSUN = extproc; - - glNormal3fVertex3fvSUN(n, v); -} - -static void APIENTRY InitColor4fNormal3fVertex3fSUN (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor4fNormal3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor4fNormal3fVertex3fSUN = extproc; - - glColor4fNormal3fVertex3fSUN(r, g, b, a, nx, ny, nz, x, y, z); -} - -static void APIENTRY InitColor4fNormal3fVertex3fvSUN (const GLfloat *c, const GLfloat *n, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor4fNormal3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor4fNormal3fVertex3fvSUN = extproc; - - glColor4fNormal3fVertex3fvSUN(c, n, v); -} - -static void APIENTRY InitTexCoord2fVertex3fSUN (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2fVertex3fSUN = extproc; - - glTexCoord2fVertex3fSUN(s, t, x, y, z); -} - -static void APIENTRY InitTexCoord2fVertex3fvSUN (const GLfloat *tc, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2fVertex3fvSUN = extproc; - - glTexCoord2fVertex3fvSUN(tc, v); -} - -static void APIENTRY InitTexCoord4fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord4fVertex4fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord4fVertex4fSUN = extproc; - - glTexCoord4fVertex4fSUN(s, t, p, q, x, y, z, w); -} - -static void APIENTRY InitTexCoord4fVertex4fvSUN (const GLfloat *tc, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord4fVertex4fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord4fVertex4fvSUN = extproc; - - glTexCoord4fVertex4fvSUN(tc, v); -} - -static void APIENTRY InitTexCoord2fColor4ubVertex3fSUN (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2fColor4ubVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2fColor4ubVertex3fSUN = extproc; - - glTexCoord2fColor4ubVertex3fSUN(s, t, r, g, b, a, x, y, z); -} - -static void APIENTRY InitTexCoord2fColor4ubVertex3fvSUN (const GLfloat *tc, const GLubyte *c, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2fColor4ubVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2fColor4ubVertex3fvSUN = extproc; - - glTexCoord2fColor4ubVertex3fvSUN(tc, c, v); -} - -static void APIENTRY InitTexCoord2fColor3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2fColor3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2fColor3fVertex3fSUN = extproc; - - glTexCoord2fColor3fVertex3fSUN(s, t, r, g, b, x, y, z); -} - -static void APIENTRY InitTexCoord2fColor3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2fColor3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2fColor3fVertex3fvSUN = extproc; - - glTexCoord2fColor3fVertex3fvSUN(tc, c, v); -} - -static void APIENTRY InitTexCoord2fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2fNormal3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2fNormal3fVertex3fSUN = extproc; - - glTexCoord2fNormal3fVertex3fSUN(s, t, nx, ny, nz, x, y, z); -} - -static void APIENTRY InitTexCoord2fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *n, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2fNormal3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2fNormal3fVertex3fvSUN = extproc; - - glTexCoord2fNormal3fVertex3fvSUN(tc, n, v); -} - -static void APIENTRY InitTexCoord2fColor4fNormal3fVertex3fSUN (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2fColor4fNormal3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2fColor4fNormal3fVertex3fSUN = extproc; - - glTexCoord2fColor4fNormal3fVertex3fSUN(s, t, r, g, b, a, nx, ny, nz, x, y, z); -} - -static void APIENTRY InitTexCoord2fColor4fNormal3fVertex3fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2fColor4fNormal3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2fColor4fNormal3fVertex3fvSUN = extproc; - - glTexCoord2fColor4fNormal3fVertex3fvSUN(tc, c, n, v); -} - -static void APIENTRY InitTexCoord4fColor4fNormal3fVertex4fSUN (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord4fColor4fNormal3fVertex4fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord4fColor4fNormal3fVertex4fSUN = extproc; - - glTexCoord4fColor4fNormal3fVertex4fSUN(s, t, p, q, r, g, b, a, nx, ny, nz, x, y, z, w); -} - -static void APIENTRY InitTexCoord4fColor4fNormal3fVertex4fvSUN (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord4fColor4fNormal3fVertex4fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord4fColor4fNormal3fVertex4fvSUN = extproc; - - glTexCoord4fColor4fNormal3fVertex4fvSUN(tc, c, n, v); -} - -static void APIENTRY InitReplacementCodeuiVertex3fSUN (GLuint rc, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiVertex3fSUN = extproc; - - glReplacementCodeuiVertex3fSUN(rc, x, y, z); -} - -static void APIENTRY InitReplacementCodeuiVertex3fvSUN (const GLuint *rc, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiVertex3fvSUN = extproc; - - glReplacementCodeuiVertex3fvSUN(rc, v); -} - -static void APIENTRY InitReplacementCodeuiColor4ubVertex3fSUN (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiColor4ubVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiColor4ubVertex3fSUN = extproc; - - glReplacementCodeuiColor4ubVertex3fSUN(rc, r, g, b, a, x, y, z); -} - -static void APIENTRY InitReplacementCodeuiColor4ubVertex3fvSUN (const GLuint *rc, const GLubyte *c, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiColor4ubVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiColor4ubVertex3fvSUN = extproc; - - glReplacementCodeuiColor4ubVertex3fvSUN(rc, c, v); -} - -static void APIENTRY InitReplacementCodeuiColor3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiColor3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiColor3fVertex3fSUN = extproc; - - glReplacementCodeuiColor3fVertex3fSUN(rc, r, g, b, x, y, z); -} - -static void APIENTRY InitReplacementCodeuiColor3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiColor3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiColor3fVertex3fvSUN = extproc; - - glReplacementCodeuiColor3fVertex3fvSUN(rc, c, v); -} - -static void APIENTRY InitReplacementCodeuiNormal3fVertex3fSUN (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiNormal3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiNormal3fVertex3fSUN = extproc; - - glReplacementCodeuiNormal3fVertex3fSUN(rc, nx, ny, nz, x, y, z); -} - -static void APIENTRY InitReplacementCodeuiNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *n, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiNormal3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiNormal3fVertex3fvSUN = extproc; - - glReplacementCodeuiNormal3fVertex3fvSUN(rc, n, v); -} - -static void APIENTRY InitReplacementCodeuiColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiColor4fNormal3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiColor4fNormal3fVertex3fSUN = extproc; - - glReplacementCodeuiColor4fNormal3fVertex3fSUN(rc, r, g, b, a, nx, ny, nz, x, y, z); -} - -static void APIENTRY InitReplacementCodeuiColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiColor4fNormal3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiColor4fNormal3fVertex3fvSUN = extproc; - - glReplacementCodeuiColor4fNormal3fVertex3fvSUN(rc, c, n, v); -} - -static void APIENTRY InitReplacementCodeuiTexCoord2fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiTexCoord2fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiTexCoord2fVertex3fSUN = extproc; - - glReplacementCodeuiTexCoord2fVertex3fSUN(rc, s, t, x, y, z); -} - -static void APIENTRY InitReplacementCodeuiTexCoord2fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiTexCoord2fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiTexCoord2fVertex3fvSUN = extproc; - - glReplacementCodeuiTexCoord2fVertex3fvSUN(rc, tc, v); -} - -static void APIENTRY InitReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN = extproc; - - glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN(rc, s, t, nx, ny, nz, x, y, z); -} - -static void APIENTRY InitReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN = extproc; - - glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN(rc, tc, n, v); -} - -static void APIENTRY InitReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN = extproc; - - glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN(rc, s, t, r, g, b, a, nx, ny, nz, x, y, z); -} - -static void APIENTRY InitReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN = extproc; - - glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN(rc, tc, c, n, v); -} - -static void APIENTRY InitBlendFuncSeparateEXT (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBlendFuncSeparateEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBlendFuncSeparateEXT = extproc; - - glBlendFuncSeparateEXT(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); -} - -static void APIENTRY InitBlendFuncSeparateINGR (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBlendFuncSeparateINGR"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBlendFuncSeparateINGR = extproc; - - glBlendFuncSeparateINGR(sfactorRGB, dfactorRGB, sfactorAlpha, dfactorAlpha); -} - -static void APIENTRY InitVertexWeightfEXT (GLfloat weight) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexWeightfEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexWeightfEXT = extproc; - - glVertexWeightfEXT(weight); -} - -static void APIENTRY InitVertexWeightfvEXT (const GLfloat *weight) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexWeightfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexWeightfvEXT = extproc; - - glVertexWeightfvEXT(weight); -} - -static void APIENTRY InitVertexWeightPointerEXT (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexWeightPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexWeightPointerEXT = extproc; - - glVertexWeightPointerEXT(size, type, stride, pointer); -} - -static void APIENTRY InitFlushVertexArrayRangeNV (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFlushVertexArrayRangeNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFlushVertexArrayRangeNV = extproc; - - glFlushVertexArrayRangeNV(); -} - -static void APIENTRY InitVertexArrayRangeNV (GLsizei length, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexArrayRangeNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexArrayRangeNV = extproc; - - glVertexArrayRangeNV(length, pointer); -} - -static void APIENTRY InitCombinerParameterfvNV (GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCombinerParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCombinerParameterfvNV = extproc; - - glCombinerParameterfvNV(pname, params); -} - -static void APIENTRY InitCombinerParameterfNV (GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCombinerParameterfNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCombinerParameterfNV = extproc; - - glCombinerParameterfNV(pname, param); -} - -static void APIENTRY InitCombinerParameterivNV (GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCombinerParameterivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCombinerParameterivNV = extproc; - - glCombinerParameterivNV(pname, params); -} - -static void APIENTRY InitCombinerParameteriNV (GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCombinerParameteriNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCombinerParameteriNV = extproc; - - glCombinerParameteriNV(pname, param); -} - -static void APIENTRY InitCombinerInputNV (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCombinerInputNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCombinerInputNV = extproc; - - glCombinerInputNV(stage, portion, variable, input, mapping, componentUsage); -} - -static void APIENTRY InitCombinerOutputNV (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCombinerOutputNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCombinerOutputNV = extproc; - - glCombinerOutputNV(stage, portion, abOutput, cdOutput, sumOutput, scale, bias, abDotProduct, cdDotProduct, muxSum); -} - -static void APIENTRY InitFinalCombinerInputNV (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFinalCombinerInputNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFinalCombinerInputNV = extproc; - - glFinalCombinerInputNV(variable, input, mapping, componentUsage); -} - -static void APIENTRY InitGetCombinerInputParameterfvNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetCombinerInputParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetCombinerInputParameterfvNV = extproc; - - glGetCombinerInputParameterfvNV(stage, portion, variable, pname, params); -} - -static void APIENTRY InitGetCombinerInputParameterivNV (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetCombinerInputParameterivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetCombinerInputParameterivNV = extproc; - - glGetCombinerInputParameterivNV(stage, portion, variable, pname, params); -} - -static void APIENTRY InitGetCombinerOutputParameterfvNV (GLenum stage, GLenum portion, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetCombinerOutputParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetCombinerOutputParameterfvNV = extproc; - - glGetCombinerOutputParameterfvNV(stage, portion, pname, params); -} - -static void APIENTRY InitGetCombinerOutputParameterivNV (GLenum stage, GLenum portion, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetCombinerOutputParameterivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetCombinerOutputParameterivNV = extproc; - - glGetCombinerOutputParameterivNV(stage, portion, pname, params); -} - -static void APIENTRY InitGetFinalCombinerInputParameterfvNV (GLenum variable, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetFinalCombinerInputParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetFinalCombinerInputParameterfvNV = extproc; - - glGetFinalCombinerInputParameterfvNV(variable, pname, params); -} - -static void APIENTRY InitGetFinalCombinerInputParameterivNV (GLenum variable, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetFinalCombinerInputParameterivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetFinalCombinerInputParameterivNV = extproc; - - glGetFinalCombinerInputParameterivNV(variable, pname, params); -} - -static void APIENTRY InitResizeBuffersMESA (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glResizeBuffersMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glResizeBuffersMESA = extproc; - - glResizeBuffersMESA(); -} - -static void APIENTRY InitWindowPos2dMESA (GLdouble x, GLdouble y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2dMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2dMESA = extproc; - - glWindowPos2dMESA(x, y); -} - -static void APIENTRY InitWindowPos2dvMESA (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2dvMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2dvMESA = extproc; - - glWindowPos2dvMESA(v); -} - -static void APIENTRY InitWindowPos2fMESA (GLfloat x, GLfloat y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2fMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2fMESA = extproc; - - glWindowPos2fMESA(x, y); -} - -static void APIENTRY InitWindowPos2fvMESA (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2fvMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2fvMESA = extproc; - - glWindowPos2fvMESA(v); -} - -static void APIENTRY InitWindowPos2iMESA (GLint x, GLint y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2iMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2iMESA = extproc; - - glWindowPos2iMESA(x, y); -} - -static void APIENTRY InitWindowPos2ivMESA (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2ivMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2ivMESA = extproc; - - glWindowPos2ivMESA(v); -} - -static void APIENTRY InitWindowPos2sMESA (GLshort x, GLshort y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2sMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2sMESA = extproc; - - glWindowPos2sMESA(x, y); -} - -static void APIENTRY InitWindowPos2svMESA (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos2svMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos2svMESA = extproc; - - glWindowPos2svMESA(v); -} - -static void APIENTRY InitWindowPos3dMESA (GLdouble x, GLdouble y, GLdouble z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3dMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3dMESA = extproc; - - glWindowPos3dMESA(x, y, z); -} - -static void APIENTRY InitWindowPos3dvMESA (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3dvMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3dvMESA = extproc; - - glWindowPos3dvMESA(v); -} - -static void APIENTRY InitWindowPos3fMESA (GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3fMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3fMESA = extproc; - - glWindowPos3fMESA(x, y, z); -} - -static void APIENTRY InitWindowPos3fvMESA (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3fvMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3fvMESA = extproc; - - glWindowPos3fvMESA(v); -} - -static void APIENTRY InitWindowPos3iMESA (GLint x, GLint y, GLint z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3iMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3iMESA = extproc; - - glWindowPos3iMESA(x, y, z); -} - -static void APIENTRY InitWindowPos3ivMESA (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3ivMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3ivMESA = extproc; - - glWindowPos3ivMESA(v); -} - -static void APIENTRY InitWindowPos3sMESA (GLshort x, GLshort y, GLshort z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3sMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3sMESA = extproc; - - glWindowPos3sMESA(x, y, z); -} - -static void APIENTRY InitWindowPos3svMESA (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos3svMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos3svMESA = extproc; - - glWindowPos3svMESA(v); -} - -static void APIENTRY InitWindowPos4dMESA (GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos4dMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos4dMESA = extproc; - - glWindowPos4dMESA(x, y, z, w); -} - -static void APIENTRY InitWindowPos4dvMESA (const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos4dvMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos4dvMESA = extproc; - - glWindowPos4dvMESA(v); -} - -static void APIENTRY InitWindowPos4fMESA (GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos4fMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos4fMESA = extproc; - - glWindowPos4fMESA(x, y, z, w); -} - -static void APIENTRY InitWindowPos4fvMESA (const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos4fvMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos4fvMESA = extproc; - - glWindowPos4fvMESA(v); -} - -static void APIENTRY InitWindowPos4iMESA (GLint x, GLint y, GLint z, GLint w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos4iMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos4iMESA = extproc; - - glWindowPos4iMESA(x, y, z, w); -} - -static void APIENTRY InitWindowPos4ivMESA (const GLint *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos4ivMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos4ivMESA = extproc; - - glWindowPos4ivMESA(v); -} - -static void APIENTRY InitWindowPos4sMESA (GLshort x, GLshort y, GLshort z, GLshort w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos4sMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos4sMESA = extproc; - - glWindowPos4sMESA(x, y, z, w); -} - -static void APIENTRY InitWindowPos4svMESA (const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWindowPos4svMESA"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWindowPos4svMESA = extproc; - - glWindowPos4svMESA(v); -} - -static void APIENTRY InitMultiModeDrawArraysIBM (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiModeDrawArraysIBM"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiModeDrawArraysIBM = extproc; - - glMultiModeDrawArraysIBM(mode, first, count, primcount, modestride); -} - -static void APIENTRY InitMultiModeDrawElementsIBM (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiModeDrawElementsIBM"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiModeDrawElementsIBM = extproc; - - glMultiModeDrawElementsIBM(mode, count, type, indices, primcount, modestride); -} - -static void APIENTRY InitColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorPointerListIBM"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorPointerListIBM = extproc; - - glColorPointerListIBM(size, type, stride, pointer, ptrstride); -} - -static void APIENTRY InitSecondaryColorPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColorPointerListIBM"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColorPointerListIBM = extproc; - - glSecondaryColorPointerListIBM(size, type, stride, pointer, ptrstride); -} - -static void APIENTRY InitEdgeFlagPointerListIBM (GLint stride, const GLboolean* *pointer, GLint ptrstride) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glEdgeFlagPointerListIBM"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glEdgeFlagPointerListIBM = extproc; - - glEdgeFlagPointerListIBM(stride, pointer, ptrstride); -} - -static void APIENTRY InitFogCoordPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoordPointerListIBM"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoordPointerListIBM = extproc; - - glFogCoordPointerListIBM(type, stride, pointer, ptrstride); -} - -static void APIENTRY InitIndexPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIndexPointerListIBM"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glIndexPointerListIBM = extproc; - - glIndexPointerListIBM(type, stride, pointer, ptrstride); -} - -static void APIENTRY InitNormalPointerListIBM (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalPointerListIBM"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalPointerListIBM = extproc; - - glNormalPointerListIBM(type, stride, pointer, ptrstride); -} - -static void APIENTRY InitTexCoordPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoordPointerListIBM"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoordPointerListIBM = extproc; - - glTexCoordPointerListIBM(size, type, stride, pointer, ptrstride); -} - -static void APIENTRY InitVertexPointerListIBM (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexPointerListIBM"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexPointerListIBM = extproc; - - glVertexPointerListIBM(size, type, stride, pointer, ptrstride); -} - -static void APIENTRY InitTbufferMask3DFX (GLuint mask) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTbufferMask3DFX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTbufferMask3DFX = extproc; - - glTbufferMask3DFX(mask); -} - -static void APIENTRY InitSampleMaskEXT (GLclampf value, GLboolean invert) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSampleMaskEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSampleMaskEXT = extproc; - - glSampleMaskEXT(value, invert); -} - -static void APIENTRY InitSamplePatternEXT (GLenum pattern) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSamplePatternEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSamplePatternEXT = extproc; - - glSamplePatternEXT(pattern); -} - -static void APIENTRY InitTextureColorMaskSGIS (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTextureColorMaskSGIS"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTextureColorMaskSGIS = extproc; - - glTextureColorMaskSGIS(red, green, blue, alpha); -} - -static void APIENTRY InitIglooInterfaceSGIX (GLenum pname, const GLvoid *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIglooInterfaceSGIX"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glIglooInterfaceSGIX = extproc; - - glIglooInterfaceSGIX(pname, params); -} - -static void APIENTRY InitDeleteFencesNV (GLsizei n, const GLuint *fences) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteFencesNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteFencesNV = extproc; - - glDeleteFencesNV(n, fences); -} - -static void APIENTRY InitGenFencesNV (GLsizei n, GLuint *fences) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenFencesNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenFencesNV = extproc; - - glGenFencesNV(n, fences); -} - -static GLboolean APIENTRY InitIsFenceNV (GLuint fence) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsFenceNV"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsFenceNV = extproc; - - return glIsFenceNV(fence); -} - -static GLboolean APIENTRY InitTestFenceNV (GLuint fence) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTestFenceNV"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glTestFenceNV = extproc; - - return glTestFenceNV(fence); -} - -static void APIENTRY InitGetFenceivNV (GLuint fence, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetFenceivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetFenceivNV = extproc; - - glGetFenceivNV(fence, pname, params); -} - -static void APIENTRY InitFinishFenceNV (GLuint fence) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFinishFenceNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFinishFenceNV = extproc; - - glFinishFenceNV(fence); -} - -static void APIENTRY InitSetFenceNV (GLuint fence, GLenum condition) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSetFenceNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSetFenceNV = extproc; - - glSetFenceNV(fence, condition); -} - -static void APIENTRY InitMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMapControlPointsNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMapControlPointsNV = extproc; - - glMapControlPointsNV(target, index, type, ustride, vstride, uorder, vorder, packed, points); -} - -static void APIENTRY InitMapParameterivNV (GLenum target, GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMapParameterivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMapParameterivNV = extproc; - - glMapParameterivNV(target, pname, params); -} - -static void APIENTRY InitMapParameterfvNV (GLenum target, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMapParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMapParameterfvNV = extproc; - - glMapParameterfvNV(target, pname, params); -} - -static void APIENTRY InitGetMapControlPointsNV (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMapControlPointsNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMapControlPointsNV = extproc; - - glGetMapControlPointsNV(target, index, type, ustride, vstride, packed, points); -} - -static void APIENTRY InitGetMapParameterivNV (GLenum target, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMapParameterivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMapParameterivNV = extproc; - - glGetMapParameterivNV(target, pname, params); -} - -static void APIENTRY InitGetMapParameterfvNV (GLenum target, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMapParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMapParameterfvNV = extproc; - - glGetMapParameterfvNV(target, pname, params); -} - -static void APIENTRY InitGetMapAttribParameterivNV (GLenum target, GLuint index, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMapAttribParameterivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMapAttribParameterivNV = extproc; - - glGetMapAttribParameterivNV(target, index, pname, params); -} - -static void APIENTRY InitGetMapAttribParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetMapAttribParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetMapAttribParameterfvNV = extproc; - - glGetMapAttribParameterfvNV(target, index, pname, params); -} - -static void APIENTRY InitEvalMapsNV (GLenum target, GLenum mode) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glEvalMapsNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glEvalMapsNV = extproc; - - glEvalMapsNV(target, mode); -} - -static void APIENTRY InitCombinerStageParameterfvNV (GLenum stage, GLenum pname, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glCombinerStageParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glCombinerStageParameterfvNV = extproc; - - glCombinerStageParameterfvNV(stage, pname, params); -} - -static void APIENTRY InitGetCombinerStageParameterfvNV (GLenum stage, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetCombinerStageParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetCombinerStageParameterfvNV = extproc; - - glGetCombinerStageParameterfvNV(stage, pname, params); -} - -static GLboolean APIENTRY InitAreProgramsResidentNV (GLsizei n, const GLuint *programs, GLboolean *residences) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glAreProgramsResidentNV"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glAreProgramsResidentNV = extproc; - - return glAreProgramsResidentNV(n, programs, residences); -} - -static void APIENTRY InitBindProgramNV (GLenum target, GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindProgramNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBindProgramNV = extproc; - - glBindProgramNV(target, id); -} - -static void APIENTRY InitDeleteProgramsNV (GLsizei n, const GLuint *programs) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteProgramsNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteProgramsNV = extproc; - - glDeleteProgramsNV(n, programs); -} - -static void APIENTRY InitExecuteProgramNV (GLenum target, GLuint id, const GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glExecuteProgramNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glExecuteProgramNV = extproc; - - glExecuteProgramNV(target, id, params); -} - -static void APIENTRY InitGenProgramsNV (GLsizei n, GLuint *programs) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenProgramsNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenProgramsNV = extproc; - - glGenProgramsNV(n, programs); -} - -static void APIENTRY InitGetProgramParameterdvNV (GLenum target, GLuint index, GLenum pname, GLdouble *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramParameterdvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramParameterdvNV = extproc; - - glGetProgramParameterdvNV(target, index, pname, params); -} - -static void APIENTRY InitGetProgramParameterfvNV (GLenum target, GLuint index, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramParameterfvNV = extproc; - - glGetProgramParameterfvNV(target, index, pname, params); -} - -static void APIENTRY InitGetProgramivNV (GLuint id, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramivNV = extproc; - - glGetProgramivNV(id, pname, params); -} - -static void APIENTRY InitGetProgramStringNV (GLuint id, GLenum pname, GLubyte *program) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramStringNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramStringNV = extproc; - - glGetProgramStringNV(id, pname, program); -} - -static void APIENTRY InitGetTrackMatrixivNV (GLenum target, GLuint address, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetTrackMatrixivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetTrackMatrixivNV = extproc; - - glGetTrackMatrixivNV(target, address, pname, params); -} - -static void APIENTRY InitGetVertexAttribdvNV (GLuint index, GLenum pname, GLdouble *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVertexAttribdvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVertexAttribdvNV = extproc; - - glGetVertexAttribdvNV(index, pname, params); -} - -static void APIENTRY InitGetVertexAttribfvNV (GLuint index, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVertexAttribfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVertexAttribfvNV = extproc; - - glGetVertexAttribfvNV(index, pname, params); -} - -static void APIENTRY InitGetVertexAttribivNV (GLuint index, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVertexAttribivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVertexAttribivNV = extproc; - - glGetVertexAttribivNV(index, pname, params); -} - -static void APIENTRY InitGetVertexAttribPointervNV (GLuint index, GLenum pname, GLvoid* *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVertexAttribPointervNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVertexAttribPointervNV = extproc; - - glGetVertexAttribPointervNV(index, pname, pointer); -} - -static GLboolean APIENTRY InitIsProgramNV (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsProgramNV"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsProgramNV = extproc; - - return glIsProgramNV(id); -} - -static void APIENTRY InitLoadProgramNV (GLenum target, GLuint id, GLsizei len, const GLubyte *program) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glLoadProgramNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glLoadProgramNV = extproc; - - glLoadProgramNV(target, id, len, program); -} - -static void APIENTRY InitProgramParameter4dNV (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramParameter4dNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramParameter4dNV = extproc; - - glProgramParameter4dNV(target, index, x, y, z, w); -} - -static void APIENTRY InitProgramParameter4dvNV (GLenum target, GLuint index, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramParameter4dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramParameter4dvNV = extproc; - - glProgramParameter4dvNV(target, index, v); -} - -static void APIENTRY InitProgramParameter4fNV (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramParameter4fNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramParameter4fNV = extproc; - - glProgramParameter4fNV(target, index, x, y, z, w); -} - -static void APIENTRY InitProgramParameter4fvNV (GLenum target, GLuint index, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramParameter4fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramParameter4fvNV = extproc; - - glProgramParameter4fvNV(target, index, v); -} - -static void APIENTRY InitProgramParameters4dvNV (GLenum target, GLuint index, GLuint count, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramParameters4dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramParameters4dvNV = extproc; - - glProgramParameters4dvNV(target, index, count, v); -} - -static void APIENTRY InitProgramParameters4fvNV (GLenum target, GLuint index, GLuint count, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramParameters4fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramParameters4fvNV = extproc; - - glProgramParameters4fvNV(target, index, count, v); -} - -static void APIENTRY InitRequestResidentProgramsNV (GLsizei n, const GLuint *programs) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glRequestResidentProgramsNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glRequestResidentProgramsNV = extproc; - - glRequestResidentProgramsNV(n, programs); -} - -static void APIENTRY InitTrackMatrixNV (GLenum target, GLuint address, GLenum matrix, GLenum transform) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTrackMatrixNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTrackMatrixNV = extproc; - - glTrackMatrixNV(target, address, matrix, transform); -} - -static void APIENTRY InitVertexAttribPointerNV (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribPointerNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribPointerNV = extproc; - - glVertexAttribPointerNV(index, fsize, type, stride, pointer); -} - -static void APIENTRY InitVertexAttrib1dNV (GLuint index, GLdouble x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1dNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1dNV = extproc; - - glVertexAttrib1dNV(index, x); -} - -static void APIENTRY InitVertexAttrib1dvNV (GLuint index, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1dvNV = extproc; - - glVertexAttrib1dvNV(index, v); -} - -static void APIENTRY InitVertexAttrib1fNV (GLuint index, GLfloat x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1fNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1fNV = extproc; - - glVertexAttrib1fNV(index, x); -} - -static void APIENTRY InitVertexAttrib1fvNV (GLuint index, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1fvNV = extproc; - - glVertexAttrib1fvNV(index, v); -} - -static void APIENTRY InitVertexAttrib1sNV (GLuint index, GLshort x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1sNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1sNV = extproc; - - glVertexAttrib1sNV(index, x); -} - -static void APIENTRY InitVertexAttrib1svNV (GLuint index, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1svNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1svNV = extproc; - - glVertexAttrib1svNV(index, v); -} - -static void APIENTRY InitVertexAttrib2dNV (GLuint index, GLdouble x, GLdouble y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2dNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2dNV = extproc; - - glVertexAttrib2dNV(index, x, y); -} - -static void APIENTRY InitVertexAttrib2dvNV (GLuint index, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2dvNV = extproc; - - glVertexAttrib2dvNV(index, v); -} - -static void APIENTRY InitVertexAttrib2fNV (GLuint index, GLfloat x, GLfloat y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2fNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2fNV = extproc; - - glVertexAttrib2fNV(index, x, y); -} - -static void APIENTRY InitVertexAttrib2fvNV (GLuint index, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2fvNV = extproc; - - glVertexAttrib2fvNV(index, v); -} - -static void APIENTRY InitVertexAttrib2sNV (GLuint index, GLshort x, GLshort y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2sNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2sNV = extproc; - - glVertexAttrib2sNV(index, x, y); -} - -static void APIENTRY InitVertexAttrib2svNV (GLuint index, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2svNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2svNV = extproc; - - glVertexAttrib2svNV(index, v); -} - -static void APIENTRY InitVertexAttrib3dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3dNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3dNV = extproc; - - glVertexAttrib3dNV(index, x, y, z); -} - -static void APIENTRY InitVertexAttrib3dvNV (GLuint index, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3dvNV = extproc; - - glVertexAttrib3dvNV(index, v); -} - -static void APIENTRY InitVertexAttrib3fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3fNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3fNV = extproc; - - glVertexAttrib3fNV(index, x, y, z); -} - -static void APIENTRY InitVertexAttrib3fvNV (GLuint index, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3fvNV = extproc; - - glVertexAttrib3fvNV(index, v); -} - -static void APIENTRY InitVertexAttrib3sNV (GLuint index, GLshort x, GLshort y, GLshort z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3sNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3sNV = extproc; - - glVertexAttrib3sNV(index, x, y, z); -} - -static void APIENTRY InitVertexAttrib3svNV (GLuint index, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3svNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3svNV = extproc; - - glVertexAttrib3svNV(index, v); -} - -static void APIENTRY InitVertexAttrib4dNV (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4dNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4dNV = extproc; - - glVertexAttrib4dNV(index, x, y, z, w); -} - -static void APIENTRY InitVertexAttrib4dvNV (GLuint index, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4dvNV = extproc; - - glVertexAttrib4dvNV(index, v); -} - -static void APIENTRY InitVertexAttrib4fNV (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4fNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4fNV = extproc; - - glVertexAttrib4fNV(index, x, y, z, w); -} - -static void APIENTRY InitVertexAttrib4fvNV (GLuint index, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4fvNV = extproc; - - glVertexAttrib4fvNV(index, v); -} - -static void APIENTRY InitVertexAttrib4sNV (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4sNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4sNV = extproc; - - glVertexAttrib4sNV(index, x, y, z, w); -} - -static void APIENTRY InitVertexAttrib4svNV (GLuint index, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4svNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4svNV = extproc; - - glVertexAttrib4svNV(index, v); -} - -static void APIENTRY InitVertexAttrib4ubNV (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4ubNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4ubNV = extproc; - - glVertexAttrib4ubNV(index, x, y, z, w); -} - -static void APIENTRY InitVertexAttrib4ubvNV (GLuint index, const GLubyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4ubvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4ubvNV = extproc; - - glVertexAttrib4ubvNV(index, v); -} - -static void APIENTRY InitVertexAttribs1dvNV (GLuint index, GLsizei count, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs1dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs1dvNV = extproc; - - glVertexAttribs1dvNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs1fvNV (GLuint index, GLsizei count, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs1fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs1fvNV = extproc; - - glVertexAttribs1fvNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs1svNV (GLuint index, GLsizei count, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs1svNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs1svNV = extproc; - - glVertexAttribs1svNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs2dvNV (GLuint index, GLsizei count, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs2dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs2dvNV = extproc; - - glVertexAttribs2dvNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs2fvNV (GLuint index, GLsizei count, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs2fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs2fvNV = extproc; - - glVertexAttribs2fvNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs2svNV (GLuint index, GLsizei count, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs2svNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs2svNV = extproc; - - glVertexAttribs2svNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs3dvNV (GLuint index, GLsizei count, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs3dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs3dvNV = extproc; - - glVertexAttribs3dvNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs3fvNV (GLuint index, GLsizei count, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs3fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs3fvNV = extproc; - - glVertexAttribs3fvNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs3svNV (GLuint index, GLsizei count, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs3svNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs3svNV = extproc; - - glVertexAttribs3svNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs4dvNV (GLuint index, GLsizei count, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs4dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs4dvNV = extproc; - - glVertexAttribs4dvNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs4fvNV (GLuint index, GLsizei count, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs4fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs4fvNV = extproc; - - glVertexAttribs4fvNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs4svNV (GLuint index, GLsizei count, const GLshort *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs4svNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs4svNV = extproc; - - glVertexAttribs4svNV(index, count, v); -} - -static void APIENTRY InitVertexAttribs4ubvNV (GLuint index, GLsizei count, const GLubyte *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs4ubvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs4ubvNV = extproc; - - glVertexAttribs4ubvNV(index, count, v); -} - -static void APIENTRY InitTexBumpParameterivATI (GLenum pname, const GLint *param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexBumpParameterivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexBumpParameterivATI = extproc; - - glTexBumpParameterivATI(pname, param); -} - -static void APIENTRY InitTexBumpParameterfvATI (GLenum pname, const GLfloat *param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexBumpParameterfvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexBumpParameterfvATI = extproc; - - glTexBumpParameterfvATI(pname, param); -} - -static void APIENTRY InitGetTexBumpParameterivATI (GLenum pname, GLint *param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetTexBumpParameterivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetTexBumpParameterivATI = extproc; - - glGetTexBumpParameterivATI(pname, param); -} - -static void APIENTRY InitGetTexBumpParameterfvATI (GLenum pname, GLfloat *param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetTexBumpParameterfvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetTexBumpParameterfvATI = extproc; - - glGetTexBumpParameterfvATI(pname, param); -} - -static GLuint APIENTRY InitGenFragmentShadersATI (GLuint range) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenFragmentShadersATI"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glGenFragmentShadersATI = extproc; - - return glGenFragmentShadersATI(range); -} - -static void APIENTRY InitBindFragmentShaderATI (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindFragmentShaderATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBindFragmentShaderATI = extproc; - - glBindFragmentShaderATI(id); -} - -static void APIENTRY InitDeleteFragmentShaderATI (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteFragmentShaderATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteFragmentShaderATI = extproc; - - glDeleteFragmentShaderATI(id); -} - -static void APIENTRY InitBeginFragmentShaderATI (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBeginFragmentShaderATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBeginFragmentShaderATI = extproc; - - glBeginFragmentShaderATI(); -} - -static void APIENTRY InitEndFragmentShaderATI (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glEndFragmentShaderATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glEndFragmentShaderATI = extproc; - - glEndFragmentShaderATI(); -} - -static void APIENTRY InitPassTexCoordATI (GLuint dst, GLuint coord, GLenum swizzle) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPassTexCoordATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPassTexCoordATI = extproc; - - glPassTexCoordATI(dst, coord, swizzle); -} - -static void APIENTRY InitSampleMapATI (GLuint dst, GLuint interp, GLenum swizzle) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSampleMapATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSampleMapATI = extproc; - - glSampleMapATI(dst, interp, swizzle); -} - -static void APIENTRY InitColorFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorFragmentOp1ATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorFragmentOp1ATI = extproc; - - glColorFragmentOp1ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod); -} - -static void APIENTRY InitColorFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorFragmentOp2ATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorFragmentOp2ATI = extproc; - - glColorFragmentOp2ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod); -} - -static void APIENTRY InitColorFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColorFragmentOp3ATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColorFragmentOp3ATI = extproc; - - glColorFragmentOp3ATI(op, dst, dstMask, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod); -} - -static void APIENTRY InitAlphaFragmentOp1ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glAlphaFragmentOp1ATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glAlphaFragmentOp1ATI = extproc; - - glAlphaFragmentOp1ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod); -} - -static void APIENTRY InitAlphaFragmentOp2ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glAlphaFragmentOp2ATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glAlphaFragmentOp2ATI = extproc; - - glAlphaFragmentOp2ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod); -} - -static void APIENTRY InitAlphaFragmentOp3ATI (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glAlphaFragmentOp3ATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glAlphaFragmentOp3ATI = extproc; - - glAlphaFragmentOp3ATI(op, dst, dstMod, arg1, arg1Rep, arg1Mod, arg2, arg2Rep, arg2Mod, arg3, arg3Rep, arg3Mod); -} - -static void APIENTRY InitSetFragmentShaderConstantATI (GLuint dst, const GLfloat *value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSetFragmentShaderConstantATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSetFragmentShaderConstantATI = extproc; - - glSetFragmentShaderConstantATI(dst, value); -} - -static void APIENTRY InitPNTrianglesiATI (GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPNTrianglesiATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPNTrianglesiATI = extproc; - - glPNTrianglesiATI(pname, param); -} - -static void APIENTRY InitPNTrianglesfATI (GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPNTrianglesfATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPNTrianglesfATI = extproc; - - glPNTrianglesfATI(pname, param); -} - -static GLuint APIENTRY InitNewObjectBufferATI (GLsizei size, const GLvoid *pointer, GLenum usage) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNewObjectBufferATI"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glNewObjectBufferATI = extproc; - - return glNewObjectBufferATI(size, pointer, usage); -} - -static GLboolean APIENTRY InitIsObjectBufferATI (GLuint buffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsObjectBufferATI"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsObjectBufferATI = extproc; - - return glIsObjectBufferATI(buffer); -} - -static void APIENTRY InitUpdateObjectBufferATI (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUpdateObjectBufferATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUpdateObjectBufferATI = extproc; - - glUpdateObjectBufferATI(buffer, offset, size, pointer, preserve); -} - -static void APIENTRY InitGetObjectBufferfvATI (GLuint buffer, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetObjectBufferfvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetObjectBufferfvATI = extproc; - - glGetObjectBufferfvATI(buffer, pname, params); -} - -static void APIENTRY InitGetObjectBufferivATI (GLuint buffer, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetObjectBufferivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetObjectBufferivATI = extproc; - - glGetObjectBufferivATI(buffer, pname, params); -} - -static void APIENTRY InitFreeObjectBufferATI (GLuint buffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFreeObjectBufferATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFreeObjectBufferATI = extproc; - - glFreeObjectBufferATI(buffer); -} - -static void APIENTRY InitArrayObjectATI (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glArrayObjectATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glArrayObjectATI = extproc; - - glArrayObjectATI(array, size, type, stride, buffer, offset); -} - -static void APIENTRY InitGetArrayObjectfvATI (GLenum array, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetArrayObjectfvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetArrayObjectfvATI = extproc; - - glGetArrayObjectfvATI(array, pname, params); -} - -static void APIENTRY InitGetArrayObjectivATI (GLenum array, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetArrayObjectivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetArrayObjectivATI = extproc; - - glGetArrayObjectivATI(array, pname, params); -} - -static void APIENTRY InitVariantArrayObjectATI (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVariantArrayObjectATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVariantArrayObjectATI = extproc; - - glVariantArrayObjectATI(id, type, stride, buffer, offset); -} - -static void APIENTRY InitGetVariantArrayObjectfvATI (GLuint id, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVariantArrayObjectfvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVariantArrayObjectfvATI = extproc; - - glGetVariantArrayObjectfvATI(id, pname, params); -} - -static void APIENTRY InitGetVariantArrayObjectivATI (GLuint id, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVariantArrayObjectivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVariantArrayObjectivATI = extproc; - - glGetVariantArrayObjectivATI(id, pname, params); -} - -static void APIENTRY InitBeginVertexShaderEXT (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBeginVertexShaderEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBeginVertexShaderEXT = extproc; - - glBeginVertexShaderEXT(); -} - -static void APIENTRY InitEndVertexShaderEXT (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glEndVertexShaderEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glEndVertexShaderEXT = extproc; - - glEndVertexShaderEXT(); -} - -static void APIENTRY InitBindVertexShaderEXT (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindVertexShaderEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBindVertexShaderEXT = extproc; - - glBindVertexShaderEXT(id); -} - -static GLuint APIENTRY InitGenVertexShadersEXT (GLuint range) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenVertexShadersEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glGenVertexShadersEXT = extproc; - - return glGenVertexShadersEXT(range); -} - -static void APIENTRY InitDeleteVertexShaderEXT (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteVertexShaderEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteVertexShaderEXT = extproc; - - glDeleteVertexShaderEXT(id); -} - -static void APIENTRY InitShaderOp1EXT (GLenum op, GLuint res, GLuint arg1) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glShaderOp1EXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glShaderOp1EXT = extproc; - - glShaderOp1EXT(op, res, arg1); -} - -static void APIENTRY InitShaderOp2EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glShaderOp2EXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glShaderOp2EXT = extproc; - - glShaderOp2EXT(op, res, arg1, arg2); -} - -static void APIENTRY InitShaderOp3EXT (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glShaderOp3EXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glShaderOp3EXT = extproc; - - glShaderOp3EXT(op, res, arg1, arg2, arg3); -} - -static void APIENTRY InitSwizzleEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSwizzleEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSwizzleEXT = extproc; - - glSwizzleEXT(res, in, outX, outY, outZ, outW); -} - -static void APIENTRY InitWriteMaskEXT (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glWriteMaskEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glWriteMaskEXT = extproc; - - glWriteMaskEXT(res, in, outX, outY, outZ, outW); -} - -static void APIENTRY InitInsertComponentEXT (GLuint res, GLuint src, GLuint num) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glInsertComponentEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glInsertComponentEXT = extproc; - - glInsertComponentEXT(res, src, num); -} - -static void APIENTRY InitExtractComponentEXT (GLuint res, GLuint src, GLuint num) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glExtractComponentEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glExtractComponentEXT = extproc; - - glExtractComponentEXT(res, src, num); -} - -static GLuint APIENTRY InitGenSymbolsEXT (GLenum datatype, GLenum storagetype, GLenum range, GLuint components) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenSymbolsEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glGenSymbolsEXT = extproc; - - return glGenSymbolsEXT(datatype, storagetype, range, components); -} - -static void APIENTRY InitSetInvariantEXT (GLuint id, GLenum type, const GLvoid *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSetInvariantEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSetInvariantEXT = extproc; - - glSetInvariantEXT(id, type, addr); -} - -static void APIENTRY InitSetLocalConstantEXT (GLuint id, GLenum type, const GLvoid *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSetLocalConstantEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSetLocalConstantEXT = extproc; - - glSetLocalConstantEXT(id, type, addr); -} - -static void APIENTRY InitVariantbvEXT (GLuint id, const GLbyte *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVariantbvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVariantbvEXT = extproc; - - glVariantbvEXT(id, addr); -} - -static void APIENTRY InitVariantsvEXT (GLuint id, const GLshort *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVariantsvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVariantsvEXT = extproc; - - glVariantsvEXT(id, addr); -} - -static void APIENTRY InitVariantivEXT (GLuint id, const GLint *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVariantivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVariantivEXT = extproc; - - glVariantivEXT(id, addr); -} - -static void APIENTRY InitVariantfvEXT (GLuint id, const GLfloat *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVariantfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVariantfvEXT = extproc; - - glVariantfvEXT(id, addr); -} - -static void APIENTRY InitVariantdvEXT (GLuint id, const GLdouble *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVariantdvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVariantdvEXT = extproc; - - glVariantdvEXT(id, addr); -} - -static void APIENTRY InitVariantubvEXT (GLuint id, const GLubyte *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVariantubvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVariantubvEXT = extproc; - - glVariantubvEXT(id, addr); -} - -static void APIENTRY InitVariantusvEXT (GLuint id, const GLushort *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVariantusvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVariantusvEXT = extproc; - - glVariantusvEXT(id, addr); -} - -static void APIENTRY InitVariantuivEXT (GLuint id, const GLuint *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVariantuivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVariantuivEXT = extproc; - - glVariantuivEXT(id, addr); -} - -static void APIENTRY InitVariantPointerEXT (GLuint id, GLenum type, GLuint stride, const GLvoid *addr) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVariantPointerEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVariantPointerEXT = extproc; - - glVariantPointerEXT(id, type, stride, addr); -} - -static void APIENTRY InitEnableVariantClientStateEXT (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glEnableVariantClientStateEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glEnableVariantClientStateEXT = extproc; - - glEnableVariantClientStateEXT(id); -} - -static void APIENTRY InitDisableVariantClientStateEXT (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDisableVariantClientStateEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDisableVariantClientStateEXT = extproc; - - glDisableVariantClientStateEXT(id); -} - -static GLuint APIENTRY InitBindLightParameterEXT (GLenum light, GLenum value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindLightParameterEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glBindLightParameterEXT = extproc; - - return glBindLightParameterEXT(light, value); -} - -static GLuint APIENTRY InitBindMaterialParameterEXT (GLenum face, GLenum value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindMaterialParameterEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glBindMaterialParameterEXT = extproc; - - return glBindMaterialParameterEXT(face, value); -} - -static GLuint APIENTRY InitBindTexGenParameterEXT (GLenum unit, GLenum coord, GLenum value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindTexGenParameterEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glBindTexGenParameterEXT = extproc; - - return glBindTexGenParameterEXT(unit, coord, value); -} - -static GLuint APIENTRY InitBindTextureUnitParameterEXT (GLenum unit, GLenum value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindTextureUnitParameterEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glBindTextureUnitParameterEXT = extproc; - - return glBindTextureUnitParameterEXT(unit, value); -} - -static GLuint APIENTRY InitBindParameterEXT (GLenum value) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindParameterEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glBindParameterEXT = extproc; - - return glBindParameterEXT(value); -} - -static GLboolean APIENTRY InitIsVariantEnabledEXT (GLuint id, GLenum cap) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsVariantEnabledEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsVariantEnabledEXT = extproc; - - return glIsVariantEnabledEXT(id, cap); -} - -static void APIENTRY InitGetVariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVariantBooleanvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVariantBooleanvEXT = extproc; - - glGetVariantBooleanvEXT(id, value, data); -} - -static void APIENTRY InitGetVariantIntegervEXT (GLuint id, GLenum value, GLint *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVariantIntegervEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVariantIntegervEXT = extproc; - - glGetVariantIntegervEXT(id, value, data); -} - -static void APIENTRY InitGetVariantFloatvEXT (GLuint id, GLenum value, GLfloat *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVariantFloatvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVariantFloatvEXT = extproc; - - glGetVariantFloatvEXT(id, value, data); -} - -static void APIENTRY InitGetVariantPointervEXT (GLuint id, GLenum value, GLvoid* *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVariantPointervEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVariantPointervEXT = extproc; - - glGetVariantPointervEXT(id, value, data); -} - -static void APIENTRY InitGetInvariantBooleanvEXT (GLuint id, GLenum value, GLboolean *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetInvariantBooleanvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetInvariantBooleanvEXT = extproc; - - glGetInvariantBooleanvEXT(id, value, data); -} - -static void APIENTRY InitGetInvariantIntegervEXT (GLuint id, GLenum value, GLint *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetInvariantIntegervEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetInvariantIntegervEXT = extproc; - - glGetInvariantIntegervEXT(id, value, data); -} - -static void APIENTRY InitGetInvariantFloatvEXT (GLuint id, GLenum value, GLfloat *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetInvariantFloatvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetInvariantFloatvEXT = extproc; - - glGetInvariantFloatvEXT(id, value, data); -} - -static void APIENTRY InitGetLocalConstantBooleanvEXT (GLuint id, GLenum value, GLboolean *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetLocalConstantBooleanvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetLocalConstantBooleanvEXT = extproc; - - glGetLocalConstantBooleanvEXT(id, value, data); -} - -static void APIENTRY InitGetLocalConstantIntegervEXT (GLuint id, GLenum value, GLint *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetLocalConstantIntegervEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetLocalConstantIntegervEXT = extproc; - - glGetLocalConstantIntegervEXT(id, value, data); -} - -static void APIENTRY InitGetLocalConstantFloatvEXT (GLuint id, GLenum value, GLfloat *data) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetLocalConstantFloatvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetLocalConstantFloatvEXT = extproc; - - glGetLocalConstantFloatvEXT(id, value, data); -} - -static void APIENTRY InitVertexStream1sATI (GLenum stream, GLshort x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream1sATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream1sATI = extproc; - - glVertexStream1sATI(stream, x); -} - -static void APIENTRY InitVertexStream1svATI (GLenum stream, const GLshort *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream1svATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream1svATI = extproc; - - glVertexStream1svATI(stream, coords); -} - -static void APIENTRY InitVertexStream1iATI (GLenum stream, GLint x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream1iATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream1iATI = extproc; - - glVertexStream1iATI(stream, x); -} - -static void APIENTRY InitVertexStream1ivATI (GLenum stream, const GLint *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream1ivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream1ivATI = extproc; - - glVertexStream1ivATI(stream, coords); -} - -static void APIENTRY InitVertexStream1fATI (GLenum stream, GLfloat x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream1fATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream1fATI = extproc; - - glVertexStream1fATI(stream, x); -} - -static void APIENTRY InitVertexStream1fvATI (GLenum stream, const GLfloat *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream1fvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream1fvATI = extproc; - - glVertexStream1fvATI(stream, coords); -} - -static void APIENTRY InitVertexStream1dATI (GLenum stream, GLdouble x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream1dATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream1dATI = extproc; - - glVertexStream1dATI(stream, x); -} - -static void APIENTRY InitVertexStream1dvATI (GLenum stream, const GLdouble *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream1dvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream1dvATI = extproc; - - glVertexStream1dvATI(stream, coords); -} - -static void APIENTRY InitVertexStream2sATI (GLenum stream, GLshort x, GLshort y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream2sATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream2sATI = extproc; - - glVertexStream2sATI(stream, x, y); -} - -static void APIENTRY InitVertexStream2svATI (GLenum stream, const GLshort *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream2svATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream2svATI = extproc; - - glVertexStream2svATI(stream, coords); -} - -static void APIENTRY InitVertexStream2iATI (GLenum stream, GLint x, GLint y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream2iATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream2iATI = extproc; - - glVertexStream2iATI(stream, x, y); -} - -static void APIENTRY InitVertexStream2ivATI (GLenum stream, const GLint *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream2ivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream2ivATI = extproc; - - glVertexStream2ivATI(stream, coords); -} - -static void APIENTRY InitVertexStream2fATI (GLenum stream, GLfloat x, GLfloat y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream2fATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream2fATI = extproc; - - glVertexStream2fATI(stream, x, y); -} - -static void APIENTRY InitVertexStream2fvATI (GLenum stream, const GLfloat *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream2fvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream2fvATI = extproc; - - glVertexStream2fvATI(stream, coords); -} - -static void APIENTRY InitVertexStream2dATI (GLenum stream, GLdouble x, GLdouble y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream2dATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream2dATI = extproc; - - glVertexStream2dATI(stream, x, y); -} - -static void APIENTRY InitVertexStream2dvATI (GLenum stream, const GLdouble *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream2dvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream2dvATI = extproc; - - glVertexStream2dvATI(stream, coords); -} - -static void APIENTRY InitVertexStream3sATI (GLenum stream, GLshort x, GLshort y, GLshort z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream3sATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream3sATI = extproc; - - glVertexStream3sATI(stream, x, y, z); -} - -static void APIENTRY InitVertexStream3svATI (GLenum stream, const GLshort *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream3svATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream3svATI = extproc; - - glVertexStream3svATI(stream, coords); -} - -static void APIENTRY InitVertexStream3iATI (GLenum stream, GLint x, GLint y, GLint z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream3iATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream3iATI = extproc; - - glVertexStream3iATI(stream, x, y, z); -} - -static void APIENTRY InitVertexStream3ivATI (GLenum stream, const GLint *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream3ivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream3ivATI = extproc; - - glVertexStream3ivATI(stream, coords); -} - -static void APIENTRY InitVertexStream3fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream3fATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream3fATI = extproc; - - glVertexStream3fATI(stream, x, y, z); -} - -static void APIENTRY InitVertexStream3fvATI (GLenum stream, const GLfloat *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream3fvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream3fvATI = extproc; - - glVertexStream3fvATI(stream, coords); -} - -static void APIENTRY InitVertexStream3dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream3dATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream3dATI = extproc; - - glVertexStream3dATI(stream, x, y, z); -} - -static void APIENTRY InitVertexStream3dvATI (GLenum stream, const GLdouble *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream3dvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream3dvATI = extproc; - - glVertexStream3dvATI(stream, coords); -} - -static void APIENTRY InitVertexStream4sATI (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream4sATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream4sATI = extproc; - - glVertexStream4sATI(stream, x, y, z, w); -} - -static void APIENTRY InitVertexStream4svATI (GLenum stream, const GLshort *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream4svATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream4svATI = extproc; - - glVertexStream4svATI(stream, coords); -} - -static void APIENTRY InitVertexStream4iATI (GLenum stream, GLint x, GLint y, GLint z, GLint w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream4iATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream4iATI = extproc; - - glVertexStream4iATI(stream, x, y, z, w); -} - -static void APIENTRY InitVertexStream4ivATI (GLenum stream, const GLint *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream4ivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream4ivATI = extproc; - - glVertexStream4ivATI(stream, coords); -} - -static void APIENTRY InitVertexStream4fATI (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream4fATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream4fATI = extproc; - - glVertexStream4fATI(stream, x, y, z, w); -} - -static void APIENTRY InitVertexStream4fvATI (GLenum stream, const GLfloat *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream4fvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream4fvATI = extproc; - - glVertexStream4fvATI(stream, coords); -} - -static void APIENTRY InitVertexStream4dATI (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream4dATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream4dATI = extproc; - - glVertexStream4dATI(stream, x, y, z, w); -} - -static void APIENTRY InitVertexStream4dvATI (GLenum stream, const GLdouble *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexStream4dvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexStream4dvATI = extproc; - - glVertexStream4dvATI(stream, coords); -} - -static void APIENTRY InitNormalStream3bATI (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalStream3bATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalStream3bATI = extproc; - - glNormalStream3bATI(stream, nx, ny, nz); -} - -static void APIENTRY InitNormalStream3bvATI (GLenum stream, const GLbyte *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalStream3bvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalStream3bvATI = extproc; - - glNormalStream3bvATI(stream, coords); -} - -static void APIENTRY InitNormalStream3sATI (GLenum stream, GLshort nx, GLshort ny, GLshort nz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalStream3sATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalStream3sATI = extproc; - - glNormalStream3sATI(stream, nx, ny, nz); -} - -static void APIENTRY InitNormalStream3svATI (GLenum stream, const GLshort *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalStream3svATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalStream3svATI = extproc; - - glNormalStream3svATI(stream, coords); -} - -static void APIENTRY InitNormalStream3iATI (GLenum stream, GLint nx, GLint ny, GLint nz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalStream3iATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalStream3iATI = extproc; - - glNormalStream3iATI(stream, nx, ny, nz); -} - -static void APIENTRY InitNormalStream3ivATI (GLenum stream, const GLint *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalStream3ivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalStream3ivATI = extproc; - - glNormalStream3ivATI(stream, coords); -} - -static void APIENTRY InitNormalStream3fATI (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalStream3fATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalStream3fATI = extproc; - - glNormalStream3fATI(stream, nx, ny, nz); -} - -static void APIENTRY InitNormalStream3fvATI (GLenum stream, const GLfloat *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalStream3fvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalStream3fvATI = extproc; - - glNormalStream3fvATI(stream, coords); -} - -static void APIENTRY InitNormalStream3dATI (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalStream3dATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalStream3dATI = extproc; - - glNormalStream3dATI(stream, nx, ny, nz); -} - -static void APIENTRY InitNormalStream3dvATI (GLenum stream, const GLdouble *coords) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormalStream3dvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormalStream3dvATI = extproc; - - glNormalStream3dvATI(stream, coords); -} - -static void APIENTRY InitClientActiveVertexStreamATI (GLenum stream) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glClientActiveVertexStreamATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glClientActiveVertexStreamATI = extproc; - - glClientActiveVertexStreamATI(stream); -} - -static void APIENTRY InitVertexBlendEnviATI (GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexBlendEnviATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexBlendEnviATI = extproc; - - glVertexBlendEnviATI(pname, param); -} - -static void APIENTRY InitVertexBlendEnvfATI (GLenum pname, GLfloat param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexBlendEnvfATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexBlendEnvfATI = extproc; - - glVertexBlendEnvfATI(pname, param); -} - -static void APIENTRY InitElementPointerATI (GLenum type, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glElementPointerATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glElementPointerATI = extproc; - - glElementPointerATI(type, pointer); -} - -static void APIENTRY InitDrawElementArrayATI (GLenum mode, GLsizei count) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDrawElementArrayATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDrawElementArrayATI = extproc; - - glDrawElementArrayATI(mode, count); -} - -static void APIENTRY InitDrawRangeElementArrayATI (GLenum mode, GLuint start, GLuint end, GLsizei count) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDrawRangeElementArrayATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDrawRangeElementArrayATI = extproc; - - glDrawRangeElementArrayATI(mode, start, end, count); -} - -static void APIENTRY InitDrawMeshArraysSUN (GLenum mode, GLint first, GLsizei count, GLsizei width) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDrawMeshArraysSUN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDrawMeshArraysSUN = extproc; - - glDrawMeshArraysSUN(mode, first, count, width); -} - -static void APIENTRY InitGenOcclusionQueriesNV (GLsizei n, GLuint *ids) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenOcclusionQueriesNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenOcclusionQueriesNV = extproc; - - glGenOcclusionQueriesNV(n, ids); -} - -static void APIENTRY InitDeleteOcclusionQueriesNV (GLsizei n, const GLuint *ids) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteOcclusionQueriesNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteOcclusionQueriesNV = extproc; - - glDeleteOcclusionQueriesNV(n, ids); -} - -static GLboolean APIENTRY InitIsOcclusionQueryNV (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsOcclusionQueryNV"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsOcclusionQueryNV = extproc; - - return glIsOcclusionQueryNV(id); -} - -static void APIENTRY InitBeginOcclusionQueryNV (GLuint id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBeginOcclusionQueryNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBeginOcclusionQueryNV = extproc; - - glBeginOcclusionQueryNV(id); -} - -static void APIENTRY InitEndOcclusionQueryNV (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glEndOcclusionQueryNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glEndOcclusionQueryNV = extproc; - - glEndOcclusionQueryNV(); -} - -static void APIENTRY InitGetOcclusionQueryivNV (GLuint id, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetOcclusionQueryivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetOcclusionQueryivNV = extproc; - - glGetOcclusionQueryivNV(id, pname, params); -} - -static void APIENTRY InitGetOcclusionQueryuivNV (GLuint id, GLenum pname, GLuint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetOcclusionQueryuivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetOcclusionQueryuivNV = extproc; - - glGetOcclusionQueryuivNV(id, pname, params); -} - -static void APIENTRY InitPointParameteriNV (GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameteriNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameteriNV = extproc; - - glPointParameteriNV(pname, param); -} - -static void APIENTRY InitPointParameterivNV (GLenum pname, const GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPointParameterivNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPointParameterivNV = extproc; - - glPointParameterivNV(pname, params); -} - -static void APIENTRY InitActiveStencilFaceEXT (GLenum face) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glActiveStencilFaceEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glActiveStencilFaceEXT = extproc; - - glActiveStencilFaceEXT(face); -} - -static void APIENTRY InitElementPointerAPPLE (GLenum type, const GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glElementPointerAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glElementPointerAPPLE = extproc; - - glElementPointerAPPLE(type, pointer); -} - -static void APIENTRY InitDrawElementArrayAPPLE (GLenum mode, GLint first, GLsizei count) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDrawElementArrayAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDrawElementArrayAPPLE = extproc; - - glDrawElementArrayAPPLE(mode, first, count); -} - -static void APIENTRY InitDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDrawRangeElementArrayAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDrawRangeElementArrayAPPLE = extproc; - - glDrawRangeElementArrayAPPLE(mode, start, end, first, count); -} - -static void APIENTRY InitMultiDrawElementArrayAPPLE (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiDrawElementArrayAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiDrawElementArrayAPPLE = extproc; - - glMultiDrawElementArrayAPPLE(mode, first, count, primcount); -} - -static void APIENTRY InitMultiDrawRangeElementArrayAPPLE (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiDrawRangeElementArrayAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiDrawRangeElementArrayAPPLE = extproc; - - glMultiDrawRangeElementArrayAPPLE(mode, start, end, first, count, primcount); -} - -static void APIENTRY InitGenFencesAPPLE (GLsizei n, GLuint *fences) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenFencesAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenFencesAPPLE = extproc; - - glGenFencesAPPLE(n, fences); -} - -static void APIENTRY InitDeleteFencesAPPLE (GLsizei n, const GLuint *fences) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteFencesAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteFencesAPPLE = extproc; - - glDeleteFencesAPPLE(n, fences); -} - -static void APIENTRY InitSetFenceAPPLE (GLuint fence) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSetFenceAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSetFenceAPPLE = extproc; - - glSetFenceAPPLE(fence); -} - -static GLboolean APIENTRY InitIsFenceAPPLE (GLuint fence) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsFenceAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsFenceAPPLE = extproc; - - return glIsFenceAPPLE(fence); -} - -static GLboolean APIENTRY InitTestFenceAPPLE (GLuint fence) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTestFenceAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glTestFenceAPPLE = extproc; - - return glTestFenceAPPLE(fence); -} - -static void APIENTRY InitFinishFenceAPPLE (GLuint fence) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFinishFenceAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFinishFenceAPPLE = extproc; - - glFinishFenceAPPLE(fence); -} - -static GLboolean APIENTRY InitTestObjectAPPLE (GLenum object, GLuint name) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTestObjectAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glTestObjectAPPLE = extproc; - - return glTestObjectAPPLE(object, name); -} - -static void APIENTRY InitFinishObjectAPPLE (GLenum object, GLint name) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFinishObjectAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFinishObjectAPPLE = extproc; - - glFinishObjectAPPLE(object, name); -} - -static void APIENTRY InitBindVertexArrayAPPLE (GLuint array) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBindVertexArrayAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBindVertexArrayAPPLE = extproc; - - glBindVertexArrayAPPLE(array); -} - -static void APIENTRY InitDeleteVertexArraysAPPLE (GLsizei n, const GLuint *arrays) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDeleteVertexArraysAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDeleteVertexArraysAPPLE = extproc; - - glDeleteVertexArraysAPPLE(n, arrays); -} - -static void APIENTRY InitGenVertexArraysAPPLE (GLsizei n, const GLuint *arrays) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGenVertexArraysAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGenVertexArraysAPPLE = extproc; - - glGenVertexArraysAPPLE(n, arrays); -} - -static GLboolean APIENTRY InitIsVertexArrayAPPLE (GLuint array) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glIsVertexArrayAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glIsVertexArrayAPPLE = extproc; - - return glIsVertexArrayAPPLE(array); -} - -static void APIENTRY InitVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexArrayRangeAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexArrayRangeAPPLE = extproc; - - glVertexArrayRangeAPPLE(length, pointer); -} - -static void APIENTRY InitFlushVertexArrayRangeAPPLE (GLsizei length, GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFlushVertexArrayRangeAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFlushVertexArrayRangeAPPLE = extproc; - - glFlushVertexArrayRangeAPPLE(length, pointer); -} - -static void APIENTRY InitVertexArrayParameteriAPPLE (GLenum pname, GLint param) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexArrayParameteriAPPLE"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexArrayParameteriAPPLE = extproc; - - glVertexArrayParameteriAPPLE(pname, param); -} - -static void APIENTRY InitDrawBuffersATI (GLsizei n, const GLenum *bufs) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDrawBuffersATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDrawBuffersATI = extproc; - - glDrawBuffersATI(n, bufs); -} - -static void APIENTRY InitProgramNamedParameter4fNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramNamedParameter4fNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramNamedParameter4fNV = extproc; - - glProgramNamedParameter4fNV(id, len, name, x, y, z, w); -} - -static void APIENTRY InitProgramNamedParameter4dNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramNamedParameter4dNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramNamedParameter4dNV = extproc; - - glProgramNamedParameter4dNV(id, len, name, x, y, z, w); -} - -static void APIENTRY InitProgramNamedParameter4fvNV (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramNamedParameter4fvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramNamedParameter4fvNV = extproc; - - glProgramNamedParameter4fvNV(id, len, name, v); -} - -static void APIENTRY InitProgramNamedParameter4dvNV (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glProgramNamedParameter4dvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glProgramNamedParameter4dvNV = extproc; - - glProgramNamedParameter4dvNV(id, len, name, v); -} - -static void APIENTRY InitGetProgramNamedParameterfvNV (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramNamedParameterfvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramNamedParameterfvNV = extproc; - - glGetProgramNamedParameterfvNV(id, len, name, params); -} - -static void APIENTRY InitGetProgramNamedParameterdvNV (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetProgramNamedParameterdvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetProgramNamedParameterdvNV = extproc; - - glGetProgramNamedParameterdvNV(id, len, name, params); -} - -static void APIENTRY InitVertex2hNV (GLhalfNV x, GLhalfNV y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertex2hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertex2hNV = extproc; - - glVertex2hNV(x, y); -} - -static void APIENTRY InitVertex2hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertex2hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertex2hvNV = extproc; - - glVertex2hvNV(v); -} - -static void APIENTRY InitVertex3hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertex3hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertex3hNV = extproc; - - glVertex3hNV(x, y, z); -} - -static void APIENTRY InitVertex3hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertex3hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertex3hvNV = extproc; - - glVertex3hvNV(v); -} - -static void APIENTRY InitVertex4hNV (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertex4hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertex4hNV = extproc; - - glVertex4hNV(x, y, z, w); -} - -static void APIENTRY InitVertex4hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertex4hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertex4hvNV = extproc; - - glVertex4hvNV(v); -} - -static void APIENTRY InitNormal3hNV (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormal3hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormal3hNV = extproc; - - glNormal3hNV(nx, ny, nz); -} - -static void APIENTRY InitNormal3hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glNormal3hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glNormal3hvNV = extproc; - - glNormal3hvNV(v); -} - -static void APIENTRY InitColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor3hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor3hNV = extproc; - - glColor3hNV(red, green, blue); -} - -static void APIENTRY InitColor3hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor3hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor3hvNV = extproc; - - glColor3hvNV(v); -} - -static void APIENTRY InitColor4hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor4hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor4hNV = extproc; - - glColor4hNV(red, green, blue, alpha); -} - -static void APIENTRY InitColor4hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glColor4hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glColor4hvNV = extproc; - - glColor4hvNV(v); -} - -static void APIENTRY InitTexCoord1hNV (GLhalfNV s) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord1hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord1hNV = extproc; - - glTexCoord1hNV(s); -} - -static void APIENTRY InitTexCoord1hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord1hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord1hvNV = extproc; - - glTexCoord1hvNV(v); -} - -static void APIENTRY InitTexCoord2hNV (GLhalfNV s, GLhalfNV t) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2hNV = extproc; - - glTexCoord2hNV(s, t); -} - -static void APIENTRY InitTexCoord2hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord2hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord2hvNV = extproc; - - glTexCoord2hvNV(v); -} - -static void APIENTRY InitTexCoord3hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord3hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord3hNV = extproc; - - glTexCoord3hNV(s, t, r); -} - -static void APIENTRY InitTexCoord3hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord3hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord3hvNV = extproc; - - glTexCoord3hvNV(v); -} - -static void APIENTRY InitTexCoord4hNV (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord4hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord4hNV = extproc; - - glTexCoord4hNV(s, t, r, q); -} - -static void APIENTRY InitTexCoord4hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glTexCoord4hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glTexCoord4hvNV = extproc; - - glTexCoord4hvNV(v); -} - -static void APIENTRY InitMultiTexCoord1hNV (GLenum target, GLhalfNV s) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1hNV = extproc; - - glMultiTexCoord1hNV(target, s); -} - -static void APIENTRY InitMultiTexCoord1hvNV (GLenum target, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord1hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord1hvNV = extproc; - - glMultiTexCoord1hvNV(target, v); -} - -static void APIENTRY InitMultiTexCoord2hNV (GLenum target, GLhalfNV s, GLhalfNV t) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2hNV = extproc; - - glMultiTexCoord2hNV(target, s, t); -} - -static void APIENTRY InitMultiTexCoord2hvNV (GLenum target, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord2hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord2hvNV = extproc; - - glMultiTexCoord2hvNV(target, v); -} - -static void APIENTRY InitMultiTexCoord3hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3hNV = extproc; - - glMultiTexCoord3hNV(target, s, t, r); -} - -static void APIENTRY InitMultiTexCoord3hvNV (GLenum target, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord3hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord3hvNV = extproc; - - glMultiTexCoord3hvNV(target, v); -} - -static void APIENTRY InitMultiTexCoord4hNV (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4hNV = extproc; - - glMultiTexCoord4hNV(target, s, t, r, q); -} - -static void APIENTRY InitMultiTexCoord4hvNV (GLenum target, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMultiTexCoord4hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glMultiTexCoord4hvNV = extproc; - - glMultiTexCoord4hvNV(target, v); -} - -static void APIENTRY InitFogCoordhNV (GLhalfNV fog) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoordhNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoordhNV = extproc; - - glFogCoordhNV(fog); -} - -static void APIENTRY InitFogCoordhvNV (const GLhalfNV *fog) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFogCoordhvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFogCoordhvNV = extproc; - - glFogCoordhvNV(fog); -} - -static void APIENTRY InitSecondaryColor3hNV (GLhalfNV red, GLhalfNV green, GLhalfNV blue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3hNV = extproc; - - glSecondaryColor3hNV(red, green, blue); -} - -static void APIENTRY InitSecondaryColor3hvNV (const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glSecondaryColor3hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glSecondaryColor3hvNV = extproc; - - glSecondaryColor3hvNV(v); -} - -static void APIENTRY InitVertexWeighthNV (GLhalfNV weight) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexWeighthNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexWeighthNV = extproc; - - glVertexWeighthNV(weight); -} - -static void APIENTRY InitVertexWeighthvNV (const GLhalfNV *weight) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexWeighthvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexWeighthvNV = extproc; - - glVertexWeighthvNV(weight); -} - -static void APIENTRY InitVertexAttrib1hNV (GLuint index, GLhalfNV x) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1hNV = extproc; - - glVertexAttrib1hNV(index, x); -} - -static void APIENTRY InitVertexAttrib1hvNV (GLuint index, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib1hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib1hvNV = extproc; - - glVertexAttrib1hvNV(index, v); -} - -static void APIENTRY InitVertexAttrib2hNV (GLuint index, GLhalfNV x, GLhalfNV y) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2hNV = extproc; - - glVertexAttrib2hNV(index, x, y); -} - -static void APIENTRY InitVertexAttrib2hvNV (GLuint index, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib2hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib2hvNV = extproc; - - glVertexAttrib2hvNV(index, v); -} - -static void APIENTRY InitVertexAttrib3hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3hNV = extproc; - - glVertexAttrib3hNV(index, x, y, z); -} - -static void APIENTRY InitVertexAttrib3hvNV (GLuint index, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib3hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib3hvNV = extproc; - - glVertexAttrib3hvNV(index, v); -} - -static void APIENTRY InitVertexAttrib4hNV (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4hNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4hNV = extproc; - - glVertexAttrib4hNV(index, x, y, z, w); -} - -static void APIENTRY InitVertexAttrib4hvNV (GLuint index, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttrib4hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttrib4hvNV = extproc; - - glVertexAttrib4hvNV(index, v); -} - -static void APIENTRY InitVertexAttribs1hvNV (GLuint index, GLsizei n, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs1hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs1hvNV = extproc; - - glVertexAttribs1hvNV(index, n, v); -} - -static void APIENTRY InitVertexAttribs2hvNV (GLuint index, GLsizei n, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs2hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs2hvNV = extproc; - - glVertexAttribs2hvNV(index, n, v); -} - -static void APIENTRY InitVertexAttribs3hvNV (GLuint index, GLsizei n, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs3hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs3hvNV = extproc; - - glVertexAttribs3hvNV(index, n, v); -} - -static void APIENTRY InitVertexAttribs4hvNV (GLuint index, GLsizei n, const GLhalfNV *v) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribs4hvNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribs4hvNV = extproc; - - glVertexAttribs4hvNV(index, n, v); -} - -static void APIENTRY InitPixelDataRangeNV (GLenum target, GLsizei length, GLvoid *pointer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPixelDataRangeNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPixelDataRangeNV = extproc; - - glPixelDataRangeNV(target, length, pointer); -} - -static void APIENTRY InitFlushPixelDataRangeNV (GLenum target) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glFlushPixelDataRangeNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glFlushPixelDataRangeNV = extproc; - - glFlushPixelDataRangeNV(target); -} - -static void APIENTRY InitPrimitiveRestartNV (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPrimitiveRestartNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPrimitiveRestartNV = extproc; - - glPrimitiveRestartNV(); -} - -static void APIENTRY InitPrimitiveRestartIndexNV (GLuint index) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glPrimitiveRestartIndexNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glPrimitiveRestartIndexNV = extproc; - - glPrimitiveRestartIndexNV(index); -} - -static GLvoid* APIENTRY InitMapObjectBufferATI (GLuint buffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glMapObjectBufferATI"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - glMapObjectBufferATI = extproc; - - return glMapObjectBufferATI(buffer); -} - -static void APIENTRY InitUnmapObjectBufferATI (GLuint buffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glUnmapObjectBufferATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glUnmapObjectBufferATI = extproc; - - glUnmapObjectBufferATI(buffer); -} - -static void APIENTRY InitStencilOpSeparateATI (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glStencilOpSeparateATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glStencilOpSeparateATI = extproc; - - glStencilOpSeparateATI(face, sfail, dpfail, dppass); -} - -static void APIENTRY InitStencilFuncSeparateATI (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glStencilFuncSeparateATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glStencilFuncSeparateATI = extproc; - - glStencilFuncSeparateATI(frontfunc, backfunc, ref, mask); -} - -static void APIENTRY InitVertexAttribArrayObjectATI (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glVertexAttribArrayObjectATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glVertexAttribArrayObjectATI = extproc; - - glVertexAttribArrayObjectATI(index, size, type, normalized, stride, buffer, offset); -} - -static void APIENTRY InitGetVertexAttribArrayObjectfvATI (GLuint index, GLenum pname, GLfloat *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVertexAttribArrayObjectfvATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVertexAttribArrayObjectfvATI = extproc; - - glGetVertexAttribArrayObjectfvATI(index, pname, params); -} - -static void APIENTRY InitGetVertexAttribArrayObjectivATI (GLuint index, GLenum pname, GLint *params) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glGetVertexAttribArrayObjectivATI"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glGetVertexAttribArrayObjectivATI = extproc; - - glGetVertexAttribArrayObjectivATI(index, pname, params); -} - -static void APIENTRY InitDepthBoundsEXT (GLclampd zmin, GLclampd zmax) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glDepthBoundsEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glDepthBoundsEXT = extproc; - - glDepthBoundsEXT(zmin, zmax); -} - -static void APIENTRY InitBlendEquationSeparateEXT (GLenum modeRGB, GLenum modeAlpha) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glBlendEquationSeparateEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glBlendEquationSeparateEXT = extproc; - - glBlendEquationSeparateEXT(modeRGB, modeAlpha); -} - -static void APIENTRY InitAddSwapHintRectWIN (GLint x, GLint y, GLsizei width, GLsizei height) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("glAddSwapHintRectWIN"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - glAddSwapHintRectWIN = extproc; - - glAddSwapHintRectWIN(x, y, width, height); -} - -#ifdef _WIN32 - -static HANDLE WINAPI InitCreateBufferRegionARB (HDC hDC, int iLayerPlane, UINT uType) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglCreateBufferRegionARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglCreateBufferRegionARB = extproc; - - return wglCreateBufferRegionARB(hDC, iLayerPlane, uType); -} - -static VOID WINAPI InitDeleteBufferRegionARB (HANDLE hRegion) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglDeleteBufferRegionARB"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - wglDeleteBufferRegionARB = extproc; - - wglDeleteBufferRegionARB(hRegion); -} - -static BOOL WINAPI InitSaveBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglSaveBufferRegionARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglSaveBufferRegionARB = extproc; - - return wglSaveBufferRegionARB(hRegion, x, y, width, height); -} - -static BOOL WINAPI InitRestoreBufferRegionARB (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglRestoreBufferRegionARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglRestoreBufferRegionARB = extproc; - - return wglRestoreBufferRegionARB(hRegion, x, y, width, height, xSrc, ySrc); -} - -static const WINAPI InitGetExtensionsStringARB (HDC hdc) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetExtensionsStringARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetExtensionsStringARB = extproc; - - return wglGetExtensionsStringARB(hdc); -} - -static BOOL WINAPI InitGetPixelFormatAttribivARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetPixelFormatAttribivARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetPixelFormatAttribivARB = extproc; - - return wglGetPixelFormatAttribivARB(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues); -} - -static BOOL WINAPI InitGetPixelFormatAttribfvARB (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetPixelFormatAttribfvARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetPixelFormatAttribfvARB = extproc; - - return wglGetPixelFormatAttribfvARB(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues); -} - -static BOOL WINAPI InitChoosePixelFormatARB (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglChoosePixelFormatARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglChoosePixelFormatARB = extproc; - - return wglChoosePixelFormatARB(hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats); -} - -static BOOL WINAPI InitMakeContextCurrentARB (HDC hDrawDC, HDC hReadDC, HGLRC hglrc) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglMakeContextCurrentARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglMakeContextCurrentARB = extproc; - - return wglMakeContextCurrentARB(hDrawDC, hReadDC, hglrc); -} - -static HDC WINAPI InitGetCurrentReadDCARB (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetCurrentReadDCARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetCurrentReadDCARB = extproc; - - return wglGetCurrentReadDCARB(); -} - -static HPBUFFERARB WINAPI InitCreatePbufferARB (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglCreatePbufferARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglCreatePbufferARB = extproc; - - return wglCreatePbufferARB(hDC, iPixelFormat, iWidth, iHeight, piAttribList); -} - -static HDC WINAPI InitGetPbufferDCARB (HPBUFFERARB hPbuffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetPbufferDCARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetPbufferDCARB = extproc; - - return wglGetPbufferDCARB(hPbuffer); -} - -static int WINAPI InitReleasePbufferDCARB (HPBUFFERARB hPbuffer, HDC hDC) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglReleasePbufferDCARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglReleasePbufferDCARB = extproc; - - return wglReleasePbufferDCARB(hPbuffer, hDC); -} - -static BOOL WINAPI InitDestroyPbufferARB (HPBUFFERARB hPbuffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglDestroyPbufferARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglDestroyPbufferARB = extproc; - - return wglDestroyPbufferARB(hPbuffer); -} - -static BOOL WINAPI InitQueryPbufferARB (HPBUFFERARB hPbuffer, int iAttribute, int *piValue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglQueryPbufferARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglQueryPbufferARB = extproc; - - return wglQueryPbufferARB(hPbuffer, iAttribute, piValue); -} - -static BOOL WINAPI InitBindTexImageARB (HPBUFFERARB hPbuffer, int iBuffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglBindTexImageARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglBindTexImageARB = extproc; - - return wglBindTexImageARB(hPbuffer, iBuffer); -} - -static BOOL WINAPI InitReleaseTexImageARB (HPBUFFERARB hPbuffer, int iBuffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglReleaseTexImageARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglReleaseTexImageARB = extproc; - - return wglReleaseTexImageARB(hPbuffer, iBuffer); -} - -static BOOL WINAPI InitSetPbufferAttribARB (HPBUFFERARB hPbuffer, const int *piAttribList) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglSetPbufferAttribARB"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglSetPbufferAttribARB = extproc; - - return wglSetPbufferAttribARB(hPbuffer, piAttribList); -} - -static GLboolean WINAPI InitCreateDisplayColorTableEXT (GLushort id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglCreateDisplayColorTableEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglCreateDisplayColorTableEXT = extproc; - - return wglCreateDisplayColorTableEXT(id); -} - -static GLboolean WINAPI InitLoadDisplayColorTableEXT (const GLushort *table, GLuint length) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglLoadDisplayColorTableEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglLoadDisplayColorTableEXT = extproc; - - return wglLoadDisplayColorTableEXT(table, length); -} - -static GLboolean WINAPI InitBindDisplayColorTableEXT (GLushort id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglBindDisplayColorTableEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglBindDisplayColorTableEXT = extproc; - - return wglBindDisplayColorTableEXT(id); -} - -static VOID WINAPI InitDestroyDisplayColorTableEXT (GLushort id) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglDestroyDisplayColorTableEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - wglDestroyDisplayColorTableEXT = extproc; - - wglDestroyDisplayColorTableEXT(id); -} - -static const WINAPI InitGetExtensionsStringEXT (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetExtensionsStringEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetExtensionsStringEXT = extproc; - - return wglGetExtensionsStringEXT(); -} - -static BOOL WINAPI InitMakeContextCurrentEXT (HDC hDrawDC, HDC hReadDC, HGLRC hglrc) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglMakeContextCurrentEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglMakeContextCurrentEXT = extproc; - - return wglMakeContextCurrentEXT(hDrawDC, hReadDC, hglrc); -} - -static HDC WINAPI InitGetCurrentReadDCEXT (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetCurrentReadDCEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetCurrentReadDCEXT = extproc; - - return wglGetCurrentReadDCEXT(); -} - -static HPBUFFEREXT WINAPI InitCreatePbufferEXT (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglCreatePbufferEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglCreatePbufferEXT = extproc; - - return wglCreatePbufferEXT(hDC, iPixelFormat, iWidth, iHeight, piAttribList); -} - -static HDC WINAPI InitGetPbufferDCEXT (HPBUFFEREXT hPbuffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetPbufferDCEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetPbufferDCEXT = extproc; - - return wglGetPbufferDCEXT(hPbuffer); -} - -static int WINAPI InitReleasePbufferDCEXT (HPBUFFEREXT hPbuffer, HDC hDC) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglReleasePbufferDCEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglReleasePbufferDCEXT = extproc; - - return wglReleasePbufferDCEXT(hPbuffer, hDC); -} - -static BOOL WINAPI InitDestroyPbufferEXT (HPBUFFEREXT hPbuffer) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglDestroyPbufferEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglDestroyPbufferEXT = extproc; - - return wglDestroyPbufferEXT(hPbuffer); -} - -static BOOL WINAPI InitQueryPbufferEXT (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglQueryPbufferEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglQueryPbufferEXT = extproc; - - return wglQueryPbufferEXT(hPbuffer, iAttribute, piValue); -} - -static BOOL WINAPI InitGetPixelFormatAttribivEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetPixelFormatAttribivEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetPixelFormatAttribivEXT = extproc; - - return wglGetPixelFormatAttribivEXT(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, piValues); -} - -static BOOL WINAPI InitGetPixelFormatAttribfvEXT (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetPixelFormatAttribfvEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetPixelFormatAttribfvEXT = extproc; - - return wglGetPixelFormatAttribfvEXT(hdc, iPixelFormat, iLayerPlane, nAttributes, piAttributes, pfValues); -} - -static BOOL WINAPI InitChoosePixelFormatEXT (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglChoosePixelFormatEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglChoosePixelFormatEXT = extproc; - - return wglChoosePixelFormatEXT(hdc, piAttribIList, pfAttribFList, nMaxFormats, piFormats, nNumFormats); -} - -static BOOL WINAPI InitSwapIntervalEXT (int interval) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglSwapIntervalEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglSwapIntervalEXT = extproc; - - return wglSwapIntervalEXT(interval); -} - -static int WINAPI InitGetSwapIntervalEXT (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetSwapIntervalEXT"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetSwapIntervalEXT = extproc; - - return wglGetSwapIntervalEXT(); -} - -static void* WINAPI InitAllocateMemoryNV (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglAllocateMemoryNV"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglAllocateMemoryNV = extproc; - - return wglAllocateMemoryNV(size, readfreq, writefreq, priority); -} - -static void WINAPI InitFreeMemoryNV (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglFreeMemoryNV"); - - if (extproc == NULL) { - _ASSERT(0); - return; - } - - wglFreeMemoryNV = extproc; - - wglFreeMemoryNV(); -} - -static BOOL WINAPI InitGetSyncValuesOML (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetSyncValuesOML"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetSyncValuesOML = extproc; - - return wglGetSyncValuesOML(hdc, ust, msc, sbc); -} - -static BOOL WINAPI InitGetMscRateOML (HDC hdc, INT32 *numerator, INT32 *denominator) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetMscRateOML"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetMscRateOML = extproc; - - return wglGetMscRateOML(hdc, numerator, denominator); -} - -static INT64 WINAPI InitSwapBuffersMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglSwapBuffersMscOML"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglSwapBuffersMscOML = extproc; - - return wglSwapBuffersMscOML(hdc, target_msc, divisor, remainder); -} - -static INT64 WINAPI InitSwapLayerBuffersMscOML (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglSwapLayerBuffersMscOML"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglSwapLayerBuffersMscOML = extproc; - - return wglSwapLayerBuffersMscOML(hdc, fuPlanes, target_msc, divisor, remainder); -} - -static BOOL WINAPI InitWaitForMscOML (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglWaitForMscOML"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglWaitForMscOML = extproc; - - return wglWaitForMscOML(hdc, target_msc, divisor, remainder, ust, msc, sbc); -} - -static BOOL WINAPI InitWaitForSbcOML (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglWaitForSbcOML"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglWaitForSbcOML = extproc; - - return wglWaitForSbcOML(hdc, target_sbc, ust, msc, sbc); -} - -static BOOL WINAPI InitGetDigitalVideoParametersI3D (HDC hDC, int iAttribute, int *piValue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetDigitalVideoParametersI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetDigitalVideoParametersI3D = extproc; - - return wglGetDigitalVideoParametersI3D(hDC, iAttribute, piValue); -} - -static BOOL WINAPI InitSetDigitalVideoParametersI3D (HDC hDC, int iAttribute, const int *piValue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglSetDigitalVideoParametersI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglSetDigitalVideoParametersI3D = extproc; - - return wglSetDigitalVideoParametersI3D(hDC, iAttribute, piValue); -} - -static BOOL WINAPI InitGetGammaTableParametersI3D (HDC hDC, int iAttribute, int *piValue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetGammaTableParametersI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetGammaTableParametersI3D = extproc; - - return wglGetGammaTableParametersI3D(hDC, iAttribute, piValue); -} - -static BOOL WINAPI InitSetGammaTableParametersI3D (HDC hDC, int iAttribute, const int *piValue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglSetGammaTableParametersI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglSetGammaTableParametersI3D = extproc; - - return wglSetGammaTableParametersI3D(hDC, iAttribute, piValue); -} - -static BOOL WINAPI InitGetGammaTableI3D (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetGammaTableI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetGammaTableI3D = extproc; - - return wglGetGammaTableI3D(hDC, iEntries, puRed, puGreen, puBlue); -} - -static BOOL WINAPI InitSetGammaTableI3D (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglSetGammaTableI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglSetGammaTableI3D = extproc; - - return wglSetGammaTableI3D(hDC, iEntries, puRed, puGreen, puBlue); -} - -static BOOL WINAPI InitEnableGenlockI3D (HDC hDC) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglEnableGenlockI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglEnableGenlockI3D = extproc; - - return wglEnableGenlockI3D(hDC); -} - -static BOOL WINAPI InitDisableGenlockI3D (HDC hDC) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglDisableGenlockI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglDisableGenlockI3D = extproc; - - return wglDisableGenlockI3D(hDC); -} - -static BOOL WINAPI InitIsEnabledGenlockI3D (HDC hDC, BOOL *pFlag) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglIsEnabledGenlockI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglIsEnabledGenlockI3D = extproc; - - return wglIsEnabledGenlockI3D(hDC, pFlag); -} - -static BOOL WINAPI InitGenlockSourceI3D (HDC hDC, UINT uSource) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGenlockSourceI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGenlockSourceI3D = extproc; - - return wglGenlockSourceI3D(hDC, uSource); -} - -static BOOL WINAPI InitGetGenlockSourceI3D (HDC hDC, UINT *uSource) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetGenlockSourceI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetGenlockSourceI3D = extproc; - - return wglGetGenlockSourceI3D(hDC, uSource); -} - -static BOOL WINAPI InitGenlockSourceEdgeI3D (HDC hDC, UINT uEdge) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGenlockSourceEdgeI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGenlockSourceEdgeI3D = extproc; - - return wglGenlockSourceEdgeI3D(hDC, uEdge); -} - -static BOOL WINAPI InitGetGenlockSourceEdgeI3D (HDC hDC, UINT *uEdge) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetGenlockSourceEdgeI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetGenlockSourceEdgeI3D = extproc; - - return wglGetGenlockSourceEdgeI3D(hDC, uEdge); -} - -static BOOL WINAPI InitGenlockSampleRateI3D (HDC hDC, UINT uRate) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGenlockSampleRateI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGenlockSampleRateI3D = extproc; - - return wglGenlockSampleRateI3D(hDC, uRate); -} - -static BOOL WINAPI InitGetGenlockSampleRateI3D (HDC hDC, UINT *uRate) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetGenlockSampleRateI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetGenlockSampleRateI3D = extproc; - - return wglGetGenlockSampleRateI3D(hDC, uRate); -} - -static BOOL WINAPI InitGenlockSourceDelayI3D (HDC hDC, UINT uDelay) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGenlockSourceDelayI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGenlockSourceDelayI3D = extproc; - - return wglGenlockSourceDelayI3D(hDC, uDelay); -} - -static BOOL WINAPI InitGetGenlockSourceDelayI3D (HDC hDC, UINT *uDelay) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetGenlockSourceDelayI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetGenlockSourceDelayI3D = extproc; - - return wglGetGenlockSourceDelayI3D(hDC, uDelay); -} - -static BOOL WINAPI InitQueryGenlockMaxSourceDelayI3D (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglQueryGenlockMaxSourceDelayI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglQueryGenlockMaxSourceDelayI3D = extproc; - - return wglQueryGenlockMaxSourceDelayI3D(hDC, uMaxLineDelay, uMaxPixelDelay); -} - -static LPVOID WINAPI InitCreateImageBufferI3D (HDC hDC, DWORD dwSize, UINT uFlags) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglCreateImageBufferI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglCreateImageBufferI3D = extproc; - - return wglCreateImageBufferI3D(hDC, dwSize, uFlags); -} - -static BOOL WINAPI InitDestroyImageBufferI3D (HDC hDC, LPVOID pAddress) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglDestroyImageBufferI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglDestroyImageBufferI3D = extproc; - - return wglDestroyImageBufferI3D(hDC, pAddress); -} - -static BOOL WINAPI InitAssociateImageBufferEventsI3D (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglAssociateImageBufferEventsI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglAssociateImageBufferEventsI3D = extproc; - - return wglAssociateImageBufferEventsI3D(hDC, pEvent, pAddress, pSize, count); -} - -static BOOL WINAPI InitReleaseImageBufferEventsI3D (HDC hDC, const LPVOID *pAddress, UINT count) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglReleaseImageBufferEventsI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglReleaseImageBufferEventsI3D = extproc; - - return wglReleaseImageBufferEventsI3D(hDC, pAddress, count); -} - -static BOOL WINAPI InitEnableFrameLockI3D (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglEnableFrameLockI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglEnableFrameLockI3D = extproc; - - return wglEnableFrameLockI3D(); -} - -static BOOL WINAPI InitDisableFrameLockI3D (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglDisableFrameLockI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglDisableFrameLockI3D = extproc; - - return wglDisableFrameLockI3D(); -} - -static BOOL WINAPI InitIsEnabledFrameLockI3D (BOOL *pFlag) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglIsEnabledFrameLockI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglIsEnabledFrameLockI3D = extproc; - - return wglIsEnabledFrameLockI3D(pFlag); -} - -static BOOL WINAPI InitQueryFrameLockMasterI3D (BOOL *pFlag) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglQueryFrameLockMasterI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglQueryFrameLockMasterI3D = extproc; - - return wglQueryFrameLockMasterI3D(pFlag); -} - -static BOOL WINAPI InitGetFrameUsageI3D (float *pUsage) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglGetFrameUsageI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglGetFrameUsageI3D = extproc; - - return wglGetFrameUsageI3D(pUsage); -} - -static BOOL WINAPI InitBeginFrameTrackingI3D (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglBeginFrameTrackingI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglBeginFrameTrackingI3D = extproc; - - return wglBeginFrameTrackingI3D(); -} - -static BOOL WINAPI InitEndFrameTrackingI3D (void) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglEndFrameTrackingI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglEndFrameTrackingI3D = extproc; - - return wglEndFrameTrackingI3D(); -} - -static BOOL WINAPI InitQueryFrameTrackingI3D (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage) -{ - void *extproc; - - extproc = (void *) wglGetProcAddress("wglQueryFrameTrackingI3D"); - - if (extproc == NULL) { - _ASSERT(0); - return 0; - } - - wglQueryFrameTrackingI3D = extproc; - - return wglQueryFrameTrackingI3D(pFrameCount, pMissedFrames, pLastMissedUsage); -} - -#endif /* _WIN32 */ - -_GLextensionProcs _extensionProcs = { - InitBlendColor, - InitBlendEquation, - InitDrawRangeElements, - InitColorTable, - InitColorTableParameterfv, - InitColorTableParameteriv, - InitCopyColorTable, - InitGetColorTable, - InitGetColorTableParameterfv, - InitGetColorTableParameteriv, - InitColorSubTable, - InitCopyColorSubTable, - InitConvolutionFilter1D, - InitConvolutionFilter2D, - InitConvolutionParameterf, - InitConvolutionParameterfv, - InitConvolutionParameteri, - InitConvolutionParameteriv, - InitCopyConvolutionFilter1D, - InitCopyConvolutionFilter2D, - InitGetConvolutionFilter, - InitGetConvolutionParameterfv, - InitGetConvolutionParameteriv, - InitGetSeparableFilter, - InitSeparableFilter2D, - InitGetHistogram, - InitGetHistogramParameterfv, - InitGetHistogramParameteriv, - InitGetMinmax, - InitGetMinmaxParameterfv, - InitGetMinmaxParameteriv, - InitHistogram, - InitMinmax, - InitResetHistogram, - InitResetMinmax, - InitTexImage3D, - InitTexSubImage3D, - InitCopyTexSubImage3D, - InitActiveTexture, - InitClientActiveTexture, - InitMultiTexCoord1d, - InitMultiTexCoord1dv, - InitMultiTexCoord1f, - InitMultiTexCoord1fv, - InitMultiTexCoord1i, - InitMultiTexCoord1iv, - InitMultiTexCoord1s, - InitMultiTexCoord1sv, - InitMultiTexCoord2d, - InitMultiTexCoord2dv, - InitMultiTexCoord2f, - InitMultiTexCoord2fv, - InitMultiTexCoord2i, - InitMultiTexCoord2iv, - InitMultiTexCoord2s, - InitMultiTexCoord2sv, - InitMultiTexCoord3d, - InitMultiTexCoord3dv, - InitMultiTexCoord3f, - InitMultiTexCoord3fv, - InitMultiTexCoord3i, - InitMultiTexCoord3iv, - InitMultiTexCoord3s, - InitMultiTexCoord3sv, - InitMultiTexCoord4d, - InitMultiTexCoord4dv, - InitMultiTexCoord4f, - InitMultiTexCoord4fv, - InitMultiTexCoord4i, - InitMultiTexCoord4iv, - InitMultiTexCoord4s, - InitMultiTexCoord4sv, - InitLoadTransposeMatrixf, - InitLoadTransposeMatrixd, - InitMultTransposeMatrixf, - InitMultTransposeMatrixd, - InitSampleCoverage, - InitCompressedTexImage3D, - InitCompressedTexImage2D, - InitCompressedTexImage1D, - InitCompressedTexSubImage3D, - InitCompressedTexSubImage2D, - InitCompressedTexSubImage1D, - InitGetCompressedTexImage, - InitBlendFuncSeparate, - InitFogCoordf, - InitFogCoordfv, - InitFogCoordd, - InitFogCoorddv, - InitFogCoordPointer, - InitMultiDrawArrays, - InitMultiDrawElements, - InitPointParameterf, - InitPointParameterfv, - InitPointParameteri, - InitPointParameteriv, - InitSecondaryColor3b, - InitSecondaryColor3bv, - InitSecondaryColor3d, - InitSecondaryColor3dv, - InitSecondaryColor3f, - InitSecondaryColor3fv, - InitSecondaryColor3i, - InitSecondaryColor3iv, - InitSecondaryColor3s, - InitSecondaryColor3sv, - InitSecondaryColor3ub, - InitSecondaryColor3ubv, - InitSecondaryColor3ui, - InitSecondaryColor3uiv, - InitSecondaryColor3us, - InitSecondaryColor3usv, - InitSecondaryColorPointer, - InitWindowPos2d, - InitWindowPos2dv, - InitWindowPos2f, - InitWindowPos2fv, - InitWindowPos2i, - InitWindowPos2iv, - InitWindowPos2s, - InitWindowPos2sv, - InitWindowPos3d, - InitWindowPos3dv, - InitWindowPos3f, - InitWindowPos3fv, - InitWindowPos3i, - InitWindowPos3iv, - InitWindowPos3s, - InitWindowPos3sv, - InitGenQueries, - InitDeleteQueries, - InitIsQuery, - InitBeginQuery, - InitEndQuery, - InitGetQueryiv, - InitGetQueryObjectiv, - InitGetQueryObjectuiv, - InitBindBuffer, - InitDeleteBuffers, - InitGenBuffers, - InitIsBuffer, - InitBufferData, - InitBufferSubData, - InitGetBufferSubData, - InitMapBuffer, - InitUnmapBuffer, - InitGetBufferParameteriv, - InitGetBufferPointerv, - InitActiveTextureARB, - InitClientActiveTextureARB, - InitMultiTexCoord1dARB, - InitMultiTexCoord1dvARB, - InitMultiTexCoord1fARB, - InitMultiTexCoord1fvARB, - InitMultiTexCoord1iARB, - InitMultiTexCoord1ivARB, - InitMultiTexCoord1sARB, - InitMultiTexCoord1svARB, - InitMultiTexCoord2dARB, - InitMultiTexCoord2dvARB, - InitMultiTexCoord2fARB, - InitMultiTexCoord2fvARB, - InitMultiTexCoord2iARB, - InitMultiTexCoord2ivARB, - InitMultiTexCoord2sARB, - InitMultiTexCoord2svARB, - InitMultiTexCoord3dARB, - InitMultiTexCoord3dvARB, - InitMultiTexCoord3fARB, - InitMultiTexCoord3fvARB, - InitMultiTexCoord3iARB, - InitMultiTexCoord3ivARB, - InitMultiTexCoord3sARB, - InitMultiTexCoord3svARB, - InitMultiTexCoord4dARB, - InitMultiTexCoord4dvARB, - InitMultiTexCoord4fARB, - InitMultiTexCoord4fvARB, - InitMultiTexCoord4iARB, - InitMultiTexCoord4ivARB, - InitMultiTexCoord4sARB, - InitMultiTexCoord4svARB, - InitLoadTransposeMatrixfARB, - InitLoadTransposeMatrixdARB, - InitMultTransposeMatrixfARB, - InitMultTransposeMatrixdARB, - InitSampleCoverageARB, - InitCompressedTexImage3DARB, - InitCompressedTexImage2DARB, - InitCompressedTexImage1DARB, - InitCompressedTexSubImage3DARB, - InitCompressedTexSubImage2DARB, - InitCompressedTexSubImage1DARB, - InitGetCompressedTexImageARB, - InitPointParameterfARB, - InitPointParameterfvARB, - InitWeightbvARB, - InitWeightsvARB, - InitWeightivARB, - InitWeightfvARB, - InitWeightdvARB, - InitWeightubvARB, - InitWeightusvARB, - InitWeightuivARB, - InitWeightPointerARB, - InitVertexBlendARB, - InitCurrentPaletteMatrixARB, - InitMatrixIndexubvARB, - InitMatrixIndexusvARB, - InitMatrixIndexuivARB, - InitMatrixIndexPointerARB, - InitWindowPos2dARB, - InitWindowPos2dvARB, - InitWindowPos2fARB, - InitWindowPos2fvARB, - InitWindowPos2iARB, - InitWindowPos2ivARB, - InitWindowPos2sARB, - InitWindowPos2svARB, - InitWindowPos3dARB, - InitWindowPos3dvARB, - InitWindowPos3fARB, - InitWindowPos3fvARB, - InitWindowPos3iARB, - InitWindowPos3ivARB, - InitWindowPos3sARB, - InitWindowPos3svARB, - InitVertexAttrib1dARB, - InitVertexAttrib1dvARB, - InitVertexAttrib1fARB, - InitVertexAttrib1fvARB, - InitVertexAttrib1sARB, - InitVertexAttrib1svARB, - InitVertexAttrib2dARB, - InitVertexAttrib2dvARB, - InitVertexAttrib2fARB, - InitVertexAttrib2fvARB, - InitVertexAttrib2sARB, - InitVertexAttrib2svARB, - InitVertexAttrib3dARB, - InitVertexAttrib3dvARB, - InitVertexAttrib3fARB, - InitVertexAttrib3fvARB, - InitVertexAttrib3sARB, - InitVertexAttrib3svARB, - InitVertexAttrib4NbvARB, - InitVertexAttrib4NivARB, - InitVertexAttrib4NsvARB, - InitVertexAttrib4NubARB, - InitVertexAttrib4NubvARB, - InitVertexAttrib4NuivARB, - InitVertexAttrib4NusvARB, - InitVertexAttrib4bvARB, - InitVertexAttrib4dARB, - InitVertexAttrib4dvARB, - InitVertexAttrib4fARB, - InitVertexAttrib4fvARB, - InitVertexAttrib4ivARB, - InitVertexAttrib4sARB, - InitVertexAttrib4svARB, - InitVertexAttrib4ubvARB, - InitVertexAttrib4uivARB, - InitVertexAttrib4usvARB, - InitVertexAttribPointerARB, - InitEnableVertexAttribArrayARB, - InitDisableVertexAttribArrayARB, - InitProgramStringARB, - InitBindProgramARB, - InitDeleteProgramsARB, - InitGenProgramsARB, - InitProgramEnvParameter4dARB, - InitProgramEnvParameter4dvARB, - InitProgramEnvParameter4fARB, - InitProgramEnvParameter4fvARB, - InitProgramLocalParameter4dARB, - InitProgramLocalParameter4dvARB, - InitProgramLocalParameter4fARB, - InitProgramLocalParameter4fvARB, - InitGetProgramEnvParameterdvARB, - InitGetProgramEnvParameterfvARB, - InitGetProgramLocalParameterdvARB, - InitGetProgramLocalParameterfvARB, - InitGetProgramivARB, - InitGetProgramStringARB, - InitGetVertexAttribdvARB, - InitGetVertexAttribfvARB, - InitGetVertexAttribivARB, - InitGetVertexAttribPointervARB, - InitIsProgramARB, - InitBindBufferARB, - InitDeleteBuffersARB, - InitGenBuffersARB, - InitIsBufferARB, - InitBufferDataARB, - InitBufferSubDataARB, - InitGetBufferSubDataARB, - InitMapBufferARB, - InitUnmapBufferARB, - InitGetBufferParameterivARB, - InitGetBufferPointervARB, - InitGenQueriesARB, - InitDeleteQueriesARB, - InitIsQueryARB, - InitBeginQueryARB, - InitEndQueryARB, - InitGetQueryivARB, - InitGetQueryObjectivARB, - InitGetQueryObjectuivARB, - InitDeleteObjectARB, - InitGetHandleARB, - InitDetachObjectARB, - InitCreateShaderObjectARB, - InitShaderSourceARB, - InitCompileShaderARB, - InitCreateProgramObjectARB, - InitAttachObjectARB, - InitLinkProgramARB, - InitUseProgramObjectARB, - InitValidateProgramARB, - InitUniform1fARB, - InitUniform2fARB, - InitUniform3fARB, - InitUniform4fARB, - InitUniform1iARB, - InitUniform2iARB, - InitUniform3iARB, - InitUniform4iARB, - InitUniform1fvARB, - InitUniform2fvARB, - InitUniform3fvARB, - InitUniform4fvARB, - InitUniform1ivARB, - InitUniform2ivARB, - InitUniform3ivARB, - InitUniform4ivARB, - InitUniformMatrix2fvARB, - InitUniformMatrix3fvARB, - InitUniformMatrix4fvARB, - InitGetObjectParameterfvARB, - InitGetObjectParameterivARB, - InitGetInfoLogARB, - InitGetAttachedObjectsARB, - InitGetUniformLocationARB, - InitGetActiveUniformARB, - InitGetUniformfvARB, - InitGetUniformivARB, - InitGetShaderSourceARB, - InitBindAttribLocationARB, - InitGetActiveAttribARB, - InitGetAttribLocationARB, - InitBlendColorEXT, - InitPolygonOffsetEXT, - InitTexImage3DEXT, - InitTexSubImage3DEXT, - InitGetTexFilterFuncSGIS, - InitTexFilterFuncSGIS, - InitTexSubImage1DEXT, - InitTexSubImage2DEXT, - InitCopyTexImage1DEXT, - InitCopyTexImage2DEXT, - InitCopyTexSubImage1DEXT, - InitCopyTexSubImage2DEXT, - InitCopyTexSubImage3DEXT, - InitGetHistogramEXT, - InitGetHistogramParameterfvEXT, - InitGetHistogramParameterivEXT, - InitGetMinmaxEXT, - InitGetMinmaxParameterfvEXT, - InitGetMinmaxParameterivEXT, - InitHistogramEXT, - InitMinmaxEXT, - InitResetHistogramEXT, - InitResetMinmaxEXT, - InitConvolutionFilter1DEXT, - InitConvolutionFilter2DEXT, - InitConvolutionParameterfEXT, - InitConvolutionParameterfvEXT, - InitConvolutionParameteriEXT, - InitConvolutionParameterivEXT, - InitCopyConvolutionFilter1DEXT, - InitCopyConvolutionFilter2DEXT, - InitGetConvolutionFilterEXT, - InitGetConvolutionParameterfvEXT, - InitGetConvolutionParameterivEXT, - InitGetSeparableFilterEXT, - InitSeparableFilter2DEXT, - InitColorTableSGI, - InitColorTableParameterfvSGI, - InitColorTableParameterivSGI, - InitCopyColorTableSGI, - InitGetColorTableSGI, - InitGetColorTableParameterfvSGI, - InitGetColorTableParameterivSGI, - InitPixelTexGenSGIX, - InitPixelTexGenParameteriSGIS, - InitPixelTexGenParameterivSGIS, - InitPixelTexGenParameterfSGIS, - InitPixelTexGenParameterfvSGIS, - InitGetPixelTexGenParameterivSGIS, - InitGetPixelTexGenParameterfvSGIS, - InitTexImage4DSGIS, - InitTexSubImage4DSGIS, - InitAreTexturesResidentEXT, - InitBindTextureEXT, - InitDeleteTexturesEXT, - InitGenTexturesEXT, - InitIsTextureEXT, - InitPrioritizeTexturesEXT, - InitDetailTexFuncSGIS, - InitGetDetailTexFuncSGIS, - InitSharpenTexFuncSGIS, - InitGetSharpenTexFuncSGIS, - InitSampleMaskSGIS, - InitSamplePatternSGIS, - InitArrayElementEXT, - InitColorPointerEXT, - InitDrawArraysEXT, - InitEdgeFlagPointerEXT, - InitGetPointervEXT, - InitIndexPointerEXT, - InitNormalPointerEXT, - InitTexCoordPointerEXT, - InitVertexPointerEXT, - InitBlendEquationEXT, - InitSpriteParameterfSGIX, - InitSpriteParameterfvSGIX, - InitSpriteParameteriSGIX, - InitSpriteParameterivSGIX, - InitPointParameterfEXT, - InitPointParameterfvEXT, - InitPointParameterfSGIS, - InitPointParameterfvSGIS, - InitGetInstrumentsSGIX, - InitInstrumentsBufferSGIX, - InitPollInstrumentsSGIX, - InitReadInstrumentsSGIX, - InitStartInstrumentsSGIX, - InitStopInstrumentsSGIX, - InitFrameZoomSGIX, - InitTagSampleBufferSGIX, - InitDeformationMap3dSGIX, - InitDeformationMap3fSGIX, - InitDeformSGIX, - InitLoadIdentityDeformationMapSGIX, - InitReferencePlaneSGIX, - InitFlushRasterSGIX, - InitFogFuncSGIS, - InitGetFogFuncSGIS, - InitImageTransformParameteriHP, - InitImageTransformParameterfHP, - InitImageTransformParameterivHP, - InitImageTransformParameterfvHP, - InitGetImageTransformParameterivHP, - InitGetImageTransformParameterfvHP, - InitColorSubTableEXT, - InitCopyColorSubTableEXT, - InitHintPGI, - InitColorTableEXT, - InitGetColorTableEXT, - InitGetColorTableParameterivEXT, - InitGetColorTableParameterfvEXT, - InitGetListParameterfvSGIX, - InitGetListParameterivSGIX, - InitListParameterfSGIX, - InitListParameterfvSGIX, - InitListParameteriSGIX, - InitListParameterivSGIX, - InitIndexMaterialEXT, - InitIndexFuncEXT, - InitLockArraysEXT, - InitUnlockArraysEXT, - InitCullParameterdvEXT, - InitCullParameterfvEXT, - InitFragmentColorMaterialSGIX, - InitFragmentLightfSGIX, - InitFragmentLightfvSGIX, - InitFragmentLightiSGIX, - InitFragmentLightivSGIX, - InitFragmentLightModelfSGIX, - InitFragmentLightModelfvSGIX, - InitFragmentLightModeliSGIX, - InitFragmentLightModelivSGIX, - InitFragmentMaterialfSGIX, - InitFragmentMaterialfvSGIX, - InitFragmentMaterialiSGIX, - InitFragmentMaterialivSGIX, - InitGetFragmentLightfvSGIX, - InitGetFragmentLightivSGIX, - InitGetFragmentMaterialfvSGIX, - InitGetFragmentMaterialivSGIX, - InitLightEnviSGIX, - InitDrawRangeElementsEXT, - InitApplyTextureEXT, - InitTextureLightEXT, - InitTextureMaterialEXT, - InitAsyncMarkerSGIX, - InitFinishAsyncSGIX, - InitPollAsyncSGIX, - InitGenAsyncMarkersSGIX, - InitDeleteAsyncMarkersSGIX, - InitIsAsyncMarkerSGIX, - InitVertexPointervINTEL, - InitNormalPointervINTEL, - InitColorPointervINTEL, - InitTexCoordPointervINTEL, - InitPixelTransformParameteriEXT, - InitPixelTransformParameterfEXT, - InitPixelTransformParameterivEXT, - InitPixelTransformParameterfvEXT, - InitSecondaryColor3bEXT, - InitSecondaryColor3bvEXT, - InitSecondaryColor3dEXT, - InitSecondaryColor3dvEXT, - InitSecondaryColor3fEXT, - InitSecondaryColor3fvEXT, - InitSecondaryColor3iEXT, - InitSecondaryColor3ivEXT, - InitSecondaryColor3sEXT, - InitSecondaryColor3svEXT, - InitSecondaryColor3ubEXT, - InitSecondaryColor3ubvEXT, - InitSecondaryColor3uiEXT, - InitSecondaryColor3uivEXT, - InitSecondaryColor3usEXT, - InitSecondaryColor3usvEXT, - InitSecondaryColorPointerEXT, - InitTextureNormalEXT, - InitMultiDrawArraysEXT, - InitMultiDrawElementsEXT, - InitFogCoordfEXT, - InitFogCoordfvEXT, - InitFogCoorddEXT, - InitFogCoorddvEXT, - InitFogCoordPointerEXT, - InitTangent3bEXT, - InitTangent3bvEXT, - InitTangent3dEXT, - InitTangent3dvEXT, - InitTangent3fEXT, - InitTangent3fvEXT, - InitTangent3iEXT, - InitTangent3ivEXT, - InitTangent3sEXT, - InitTangent3svEXT, - InitBinormal3bEXT, - InitBinormal3bvEXT, - InitBinormal3dEXT, - InitBinormal3dvEXT, - InitBinormal3fEXT, - InitBinormal3fvEXT, - InitBinormal3iEXT, - InitBinormal3ivEXT, - InitBinormal3sEXT, - InitBinormal3svEXT, - InitTangentPointerEXT, - InitBinormalPointerEXT, - InitFinishTextureSUNX, - InitGlobalAlphaFactorbSUN, - InitGlobalAlphaFactorsSUN, - InitGlobalAlphaFactoriSUN, - InitGlobalAlphaFactorfSUN, - InitGlobalAlphaFactordSUN, - InitGlobalAlphaFactorubSUN, - InitGlobalAlphaFactorusSUN, - InitGlobalAlphaFactoruiSUN, - InitReplacementCodeuiSUN, - InitReplacementCodeusSUN, - InitReplacementCodeubSUN, - InitReplacementCodeuivSUN, - InitReplacementCodeusvSUN, - InitReplacementCodeubvSUN, - InitReplacementCodePointerSUN, - InitColor4ubVertex2fSUN, - InitColor4ubVertex2fvSUN, - InitColor4ubVertex3fSUN, - InitColor4ubVertex3fvSUN, - InitColor3fVertex3fSUN, - InitColor3fVertex3fvSUN, - InitNormal3fVertex3fSUN, - InitNormal3fVertex3fvSUN, - InitColor4fNormal3fVertex3fSUN, - InitColor4fNormal3fVertex3fvSUN, - InitTexCoord2fVertex3fSUN, - InitTexCoord2fVertex3fvSUN, - InitTexCoord4fVertex4fSUN, - InitTexCoord4fVertex4fvSUN, - InitTexCoord2fColor4ubVertex3fSUN, - InitTexCoord2fColor4ubVertex3fvSUN, - InitTexCoord2fColor3fVertex3fSUN, - InitTexCoord2fColor3fVertex3fvSUN, - InitTexCoord2fNormal3fVertex3fSUN, - InitTexCoord2fNormal3fVertex3fvSUN, - InitTexCoord2fColor4fNormal3fVertex3fSUN, - InitTexCoord2fColor4fNormal3fVertex3fvSUN, - InitTexCoord4fColor4fNormal3fVertex4fSUN, - InitTexCoord4fColor4fNormal3fVertex4fvSUN, - InitReplacementCodeuiVertex3fSUN, - InitReplacementCodeuiVertex3fvSUN, - InitReplacementCodeuiColor4ubVertex3fSUN, - InitReplacementCodeuiColor4ubVertex3fvSUN, - InitReplacementCodeuiColor3fVertex3fSUN, - InitReplacementCodeuiColor3fVertex3fvSUN, - InitReplacementCodeuiNormal3fVertex3fSUN, - InitReplacementCodeuiNormal3fVertex3fvSUN, - InitReplacementCodeuiColor4fNormal3fVertex3fSUN, - InitReplacementCodeuiColor4fNormal3fVertex3fvSUN, - InitReplacementCodeuiTexCoord2fVertex3fSUN, - InitReplacementCodeuiTexCoord2fVertex3fvSUN, - InitReplacementCodeuiTexCoord2fNormal3fVertex3fSUN, - InitReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN, - InitReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN, - InitReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN, - InitBlendFuncSeparateEXT, - InitBlendFuncSeparateINGR, - InitVertexWeightfEXT, - InitVertexWeightfvEXT, - InitVertexWeightPointerEXT, - InitFlushVertexArrayRangeNV, - InitVertexArrayRangeNV, - InitCombinerParameterfvNV, - InitCombinerParameterfNV, - InitCombinerParameterivNV, - InitCombinerParameteriNV, - InitCombinerInputNV, - InitCombinerOutputNV, - InitFinalCombinerInputNV, - InitGetCombinerInputParameterfvNV, - InitGetCombinerInputParameterivNV, - InitGetCombinerOutputParameterfvNV, - InitGetCombinerOutputParameterivNV, - InitGetFinalCombinerInputParameterfvNV, - InitGetFinalCombinerInputParameterivNV, - InitResizeBuffersMESA, - InitWindowPos2dMESA, - InitWindowPos2dvMESA, - InitWindowPos2fMESA, - InitWindowPos2fvMESA, - InitWindowPos2iMESA, - InitWindowPos2ivMESA, - InitWindowPos2sMESA, - InitWindowPos2svMESA, - InitWindowPos3dMESA, - InitWindowPos3dvMESA, - InitWindowPos3fMESA, - InitWindowPos3fvMESA, - InitWindowPos3iMESA, - InitWindowPos3ivMESA, - InitWindowPos3sMESA, - InitWindowPos3svMESA, - InitWindowPos4dMESA, - InitWindowPos4dvMESA, - InitWindowPos4fMESA, - InitWindowPos4fvMESA, - InitWindowPos4iMESA, - InitWindowPos4ivMESA, - InitWindowPos4sMESA, - InitWindowPos4svMESA, - InitMultiModeDrawArraysIBM, - InitMultiModeDrawElementsIBM, - InitColorPointerListIBM, - InitSecondaryColorPointerListIBM, - InitEdgeFlagPointerListIBM, - InitFogCoordPointerListIBM, - InitIndexPointerListIBM, - InitNormalPointerListIBM, - InitTexCoordPointerListIBM, - InitVertexPointerListIBM, - InitTbufferMask3DFX, - InitSampleMaskEXT, - InitSamplePatternEXT, - InitTextureColorMaskSGIS, - InitIglooInterfaceSGIX, - InitDeleteFencesNV, - InitGenFencesNV, - InitIsFenceNV, - InitTestFenceNV, - InitGetFenceivNV, - InitFinishFenceNV, - InitSetFenceNV, - InitMapControlPointsNV, - InitMapParameterivNV, - InitMapParameterfvNV, - InitGetMapControlPointsNV, - InitGetMapParameterivNV, - InitGetMapParameterfvNV, - InitGetMapAttribParameterivNV, - InitGetMapAttribParameterfvNV, - InitEvalMapsNV, - InitCombinerStageParameterfvNV, - InitGetCombinerStageParameterfvNV, - InitAreProgramsResidentNV, - InitBindProgramNV, - InitDeleteProgramsNV, - InitExecuteProgramNV, - InitGenProgramsNV, - InitGetProgramParameterdvNV, - InitGetProgramParameterfvNV, - InitGetProgramivNV, - InitGetProgramStringNV, - InitGetTrackMatrixivNV, - InitGetVertexAttribdvNV, - InitGetVertexAttribfvNV, - InitGetVertexAttribivNV, - InitGetVertexAttribPointervNV, - InitIsProgramNV, - InitLoadProgramNV, - InitProgramParameter4dNV, - InitProgramParameter4dvNV, - InitProgramParameter4fNV, - InitProgramParameter4fvNV, - InitProgramParameters4dvNV, - InitProgramParameters4fvNV, - InitRequestResidentProgramsNV, - InitTrackMatrixNV, - InitVertexAttribPointerNV, - InitVertexAttrib1dNV, - InitVertexAttrib1dvNV, - InitVertexAttrib1fNV, - InitVertexAttrib1fvNV, - InitVertexAttrib1sNV, - InitVertexAttrib1svNV, - InitVertexAttrib2dNV, - InitVertexAttrib2dvNV, - InitVertexAttrib2fNV, - InitVertexAttrib2fvNV, - InitVertexAttrib2sNV, - InitVertexAttrib2svNV, - InitVertexAttrib3dNV, - InitVertexAttrib3dvNV, - InitVertexAttrib3fNV, - InitVertexAttrib3fvNV, - InitVertexAttrib3sNV, - InitVertexAttrib3svNV, - InitVertexAttrib4dNV, - InitVertexAttrib4dvNV, - InitVertexAttrib4fNV, - InitVertexAttrib4fvNV, - InitVertexAttrib4sNV, - InitVertexAttrib4svNV, - InitVertexAttrib4ubNV, - InitVertexAttrib4ubvNV, - InitVertexAttribs1dvNV, - InitVertexAttribs1fvNV, - InitVertexAttribs1svNV, - InitVertexAttribs2dvNV, - InitVertexAttribs2fvNV, - InitVertexAttribs2svNV, - InitVertexAttribs3dvNV, - InitVertexAttribs3fvNV, - InitVertexAttribs3svNV, - InitVertexAttribs4dvNV, - InitVertexAttribs4fvNV, - InitVertexAttribs4svNV, - InitVertexAttribs4ubvNV, - InitTexBumpParameterivATI, - InitTexBumpParameterfvATI, - InitGetTexBumpParameterivATI, - InitGetTexBumpParameterfvATI, - InitGenFragmentShadersATI, - InitBindFragmentShaderATI, - InitDeleteFragmentShaderATI, - InitBeginFragmentShaderATI, - InitEndFragmentShaderATI, - InitPassTexCoordATI, - InitSampleMapATI, - InitColorFragmentOp1ATI, - InitColorFragmentOp2ATI, - InitColorFragmentOp3ATI, - InitAlphaFragmentOp1ATI, - InitAlphaFragmentOp2ATI, - InitAlphaFragmentOp3ATI, - InitSetFragmentShaderConstantATI, - InitPNTrianglesiATI, - InitPNTrianglesfATI, - InitNewObjectBufferATI, - InitIsObjectBufferATI, - InitUpdateObjectBufferATI, - InitGetObjectBufferfvATI, - InitGetObjectBufferivATI, - InitFreeObjectBufferATI, - InitArrayObjectATI, - InitGetArrayObjectfvATI, - InitGetArrayObjectivATI, - InitVariantArrayObjectATI, - InitGetVariantArrayObjectfvATI, - InitGetVariantArrayObjectivATI, - InitBeginVertexShaderEXT, - InitEndVertexShaderEXT, - InitBindVertexShaderEXT, - InitGenVertexShadersEXT, - InitDeleteVertexShaderEXT, - InitShaderOp1EXT, - InitShaderOp2EXT, - InitShaderOp3EXT, - InitSwizzleEXT, - InitWriteMaskEXT, - InitInsertComponentEXT, - InitExtractComponentEXT, - InitGenSymbolsEXT, - InitSetInvariantEXT, - InitSetLocalConstantEXT, - InitVariantbvEXT, - InitVariantsvEXT, - InitVariantivEXT, - InitVariantfvEXT, - InitVariantdvEXT, - InitVariantubvEXT, - InitVariantusvEXT, - InitVariantuivEXT, - InitVariantPointerEXT, - InitEnableVariantClientStateEXT, - InitDisableVariantClientStateEXT, - InitBindLightParameterEXT, - InitBindMaterialParameterEXT, - InitBindTexGenParameterEXT, - InitBindTextureUnitParameterEXT, - InitBindParameterEXT, - InitIsVariantEnabledEXT, - InitGetVariantBooleanvEXT, - InitGetVariantIntegervEXT, - InitGetVariantFloatvEXT, - InitGetVariantPointervEXT, - InitGetInvariantBooleanvEXT, - InitGetInvariantIntegervEXT, - InitGetInvariantFloatvEXT, - InitGetLocalConstantBooleanvEXT, - InitGetLocalConstantIntegervEXT, - InitGetLocalConstantFloatvEXT, - InitVertexStream1sATI, - InitVertexStream1svATI, - InitVertexStream1iATI, - InitVertexStream1ivATI, - InitVertexStream1fATI, - InitVertexStream1fvATI, - InitVertexStream1dATI, - InitVertexStream1dvATI, - InitVertexStream2sATI, - InitVertexStream2svATI, - InitVertexStream2iATI, - InitVertexStream2ivATI, - InitVertexStream2fATI, - InitVertexStream2fvATI, - InitVertexStream2dATI, - InitVertexStream2dvATI, - InitVertexStream3sATI, - InitVertexStream3svATI, - InitVertexStream3iATI, - InitVertexStream3ivATI, - InitVertexStream3fATI, - InitVertexStream3fvATI, - InitVertexStream3dATI, - InitVertexStream3dvATI, - InitVertexStream4sATI, - InitVertexStream4svATI, - InitVertexStream4iATI, - InitVertexStream4ivATI, - InitVertexStream4fATI, - InitVertexStream4fvATI, - InitVertexStream4dATI, - InitVertexStream4dvATI, - InitNormalStream3bATI, - InitNormalStream3bvATI, - InitNormalStream3sATI, - InitNormalStream3svATI, - InitNormalStream3iATI, - InitNormalStream3ivATI, - InitNormalStream3fATI, - InitNormalStream3fvATI, - InitNormalStream3dATI, - InitNormalStream3dvATI, - InitClientActiveVertexStreamATI, - InitVertexBlendEnviATI, - InitVertexBlendEnvfATI, - InitElementPointerATI, - InitDrawElementArrayATI, - InitDrawRangeElementArrayATI, - InitDrawMeshArraysSUN, - InitGenOcclusionQueriesNV, - InitDeleteOcclusionQueriesNV, - InitIsOcclusionQueryNV, - InitBeginOcclusionQueryNV, - InitEndOcclusionQueryNV, - InitGetOcclusionQueryivNV, - InitGetOcclusionQueryuivNV, - InitPointParameteriNV, - InitPointParameterivNV, - InitActiveStencilFaceEXT, - InitElementPointerAPPLE, - InitDrawElementArrayAPPLE, - InitDrawRangeElementArrayAPPLE, - InitMultiDrawElementArrayAPPLE, - InitMultiDrawRangeElementArrayAPPLE, - InitGenFencesAPPLE, - InitDeleteFencesAPPLE, - InitSetFenceAPPLE, - InitIsFenceAPPLE, - InitTestFenceAPPLE, - InitFinishFenceAPPLE, - InitTestObjectAPPLE, - InitFinishObjectAPPLE, - InitBindVertexArrayAPPLE, - InitDeleteVertexArraysAPPLE, - InitGenVertexArraysAPPLE, - InitIsVertexArrayAPPLE, - InitVertexArrayRangeAPPLE, - InitFlushVertexArrayRangeAPPLE, - InitVertexArrayParameteriAPPLE, - InitDrawBuffersATI, - InitProgramNamedParameter4fNV, - InitProgramNamedParameter4dNV, - InitProgramNamedParameter4fvNV, - InitProgramNamedParameter4dvNV, - InitGetProgramNamedParameterfvNV, - InitGetProgramNamedParameterdvNV, - InitVertex2hNV, - InitVertex2hvNV, - InitVertex3hNV, - InitVertex3hvNV, - InitVertex4hNV, - InitVertex4hvNV, - InitNormal3hNV, - InitNormal3hvNV, - InitColor3hNV, - InitColor3hvNV, - InitColor4hNV, - InitColor4hvNV, - InitTexCoord1hNV, - InitTexCoord1hvNV, - InitTexCoord2hNV, - InitTexCoord2hvNV, - InitTexCoord3hNV, - InitTexCoord3hvNV, - InitTexCoord4hNV, - InitTexCoord4hvNV, - InitMultiTexCoord1hNV, - InitMultiTexCoord1hvNV, - InitMultiTexCoord2hNV, - InitMultiTexCoord2hvNV, - InitMultiTexCoord3hNV, - InitMultiTexCoord3hvNV, - InitMultiTexCoord4hNV, - InitMultiTexCoord4hvNV, - InitFogCoordhNV, - InitFogCoordhvNV, - InitSecondaryColor3hNV, - InitSecondaryColor3hvNV, - InitVertexWeighthNV, - InitVertexWeighthvNV, - InitVertexAttrib1hNV, - InitVertexAttrib1hvNV, - InitVertexAttrib2hNV, - InitVertexAttrib2hvNV, - InitVertexAttrib3hNV, - InitVertexAttrib3hvNV, - InitVertexAttrib4hNV, - InitVertexAttrib4hvNV, - InitVertexAttribs1hvNV, - InitVertexAttribs2hvNV, - InitVertexAttribs3hvNV, - InitVertexAttribs4hvNV, - InitPixelDataRangeNV, - InitFlushPixelDataRangeNV, - InitPrimitiveRestartNV, - InitPrimitiveRestartIndexNV, - InitMapObjectBufferATI, - InitUnmapObjectBufferATI, - InitStencilOpSeparateATI, - InitStencilFuncSeparateATI, - InitVertexAttribArrayObjectATI, - InitGetVertexAttribArrayObjectfvATI, - InitGetVertexAttribArrayObjectivATI, - InitDepthBoundsEXT, - InitBlendEquationSeparateEXT, - InitAddSwapHintRectWIN, -#ifdef _WIN32 - InitCreateBufferRegionARB, - InitDeleteBufferRegionARB, - InitSaveBufferRegionARB, - InitRestoreBufferRegionARB, - InitGetExtensionsStringARB, - InitGetPixelFormatAttribivARB, - InitGetPixelFormatAttribfvARB, - InitChoosePixelFormatARB, - InitMakeContextCurrentARB, - InitGetCurrentReadDCARB, - InitCreatePbufferARB, - InitGetPbufferDCARB, - InitReleasePbufferDCARB, - InitDestroyPbufferARB, - InitQueryPbufferARB, - InitBindTexImageARB, - InitReleaseTexImageARB, - InitSetPbufferAttribARB, - InitCreateDisplayColorTableEXT, - InitLoadDisplayColorTableEXT, - InitBindDisplayColorTableEXT, - InitDestroyDisplayColorTableEXT, - InitGetExtensionsStringEXT, - InitMakeContextCurrentEXT, - InitGetCurrentReadDCEXT, - InitCreatePbufferEXT, - InitGetPbufferDCEXT, - InitReleasePbufferDCEXT, - InitDestroyPbufferEXT, - InitQueryPbufferEXT, - InitGetPixelFormatAttribivEXT, - InitGetPixelFormatAttribfvEXT, - InitChoosePixelFormatEXT, - InitSwapIntervalEXT, - InitGetSwapIntervalEXT, - InitAllocateMemoryNV, - InitFreeMemoryNV, - InitGetSyncValuesOML, - InitGetMscRateOML, - InitSwapBuffersMscOML, - InitSwapLayerBuffersMscOML, - InitWaitForMscOML, - InitWaitForSbcOML, - InitGetDigitalVideoParametersI3D, - InitSetDigitalVideoParametersI3D, - InitGetGammaTableParametersI3D, - InitSetGammaTableParametersI3D, - InitGetGammaTableI3D, - InitSetGammaTableI3D, - InitEnableGenlockI3D, - InitDisableGenlockI3D, - InitIsEnabledGenlockI3D, - InitGenlockSourceI3D, - InitGetGenlockSourceI3D, - InitGenlockSourceEdgeI3D, - InitGetGenlockSourceEdgeI3D, - InitGenlockSampleRateI3D, - InitGetGenlockSampleRateI3D, - InitGenlockSourceDelayI3D, - InitGetGenlockSourceDelayI3D, - InitQueryGenlockMaxSourceDelayI3D, - InitCreateImageBufferI3D, - InitDestroyImageBufferI3D, - InitAssociateImageBufferEventsI3D, - InitReleaseImageBufferEventsI3D, - InitEnableFrameLockI3D, - InitDisableFrameLockI3D, - InitIsEnabledFrameLockI3D, - InitQueryFrameLockMasterI3D, - InitGetFrameUsageI3D, - InitBeginFrameTrackingI3D, - InitEndFrameTrackingI3D, - InitQueryFrameTrackingI3D, -#endif /* _WIN32 */ -}; diff --git a/plugins/zzogl-pg-cg/opengl/glprocs.h b/plugins/zzogl-pg-cg/opengl/glprocs.h deleted file mode 100644 index 467f6ea0ee..0000000000 --- a/plugins/zzogl-pg-cg/opengl/glprocs.h +++ /dev/null @@ -1,2217 +0,0 @@ -#ifndef _GLPROCS_H_ -#define _GLPROCS_H_ - -/* -** GLprocs utility for getting function addresses for OpenGL(R) 1.2, -** OpenGL 1.3, OpenGL 1.4, OpenGL 1.5 and OpenGL extension functions. -** -** SGI FREE SOFTWARE LICENSE B (Version 2.0, Sept. 18, 2008) -** Copyright (C) 1991-2000 Silicon Graphics, Inc. All Rights Reserved. -** -** Permission is hereby granted, free of charge, to any person obtaining a -** copy of this software and associated documentation files (the "Software"), -** to deal in the Software without restriction, including without limitation -** the rights to use, copy, modify, merge, publish, distribute, sublicense, -** and/or sell copies of the Software, and to permit persons to whom the -** Software is furnished to do so, subject to the following conditions: -** -** The above copyright notice including the dates of first publication and -** either this permission notice or a reference to -** http://oss.sgi.com/projects/FreeB/ -** shall be included in all copies or substantial portions of the Software. -** -** THE SOFTWARE IS 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 -** SILICON GRAPHICS, INC. 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 SOFTWARE OR THE USE OR OTHER DEALINGS IN THE -** SOFTWARE. -** -** Except as contained in this notice, the name of Silicon Graphics, Inc. -** shall not be used in advertising or otherwise to promote the sale, use or -** other dealings in this Software without prior written authorization from -** Silicon Graphics, Inc. -** -** Additional Notice Provisions: This software was created using the -** OpenGL(R) version 1.2.1 Sample Implementation published by SGI, but has -** not been independently verified as being compliant with the OpenGL(R) -** version 1.2.1 Specification. -** -** Initial version of glprocs.{c,h} contributed by Intel(R) Corporation. -*/ - -#ifdef _WIN32 - #include - #include -#else - #include -#endif - -#ifndef _WIN32 /* non-Windows environment */ - #ifndef APIENTRY - #define APIENTRY - #endif - #ifdef __GNUC__ - #define _inline __inline__ - #else - #define _inline - #endif -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Structure of all OpenGL {1.2, 1.3, 1.4, 1.5}, GL extension procs.*/ - -typedef struct { - void (APIENTRY *BlendColor) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - void (APIENTRY *BlendEquation) (GLenum mode); - void (APIENTRY *DrawRangeElements) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); - void (APIENTRY *ColorTable) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); - void (APIENTRY *ColorTableParameterfv) (GLenum target, GLenum pname, const GLfloat *params); - void (APIENTRY *ColorTableParameteriv) (GLenum target, GLenum pname, const GLint *params); - void (APIENTRY *CopyColorTable) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); - void (APIENTRY *GetColorTable) (GLenum target, GLenum format, GLenum type, GLvoid *table); - void (APIENTRY *GetColorTableParameterfv) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *GetColorTableParameteriv) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *ColorSubTable) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); - void (APIENTRY *CopyColorSubTable) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); - void (APIENTRY *ConvolutionFilter1D) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); - void (APIENTRY *ConvolutionFilter2D) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); - void (APIENTRY *ConvolutionParameterf) (GLenum target, GLenum pname, GLfloat params); - void (APIENTRY *ConvolutionParameterfv) (GLenum target, GLenum pname, const GLfloat *params); - void (APIENTRY *ConvolutionParameteri) (GLenum target, GLenum pname, GLint params); - void (APIENTRY *ConvolutionParameteriv) (GLenum target, GLenum pname, const GLint *params); - void (APIENTRY *CopyConvolutionFilter1D) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); - void (APIENTRY *CopyConvolutionFilter2D) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); - void (APIENTRY *GetConvolutionFilter) (GLenum target, GLenum format, GLenum type, GLvoid *image); - void (APIENTRY *GetConvolutionParameterfv) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *GetConvolutionParameteriv) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetSeparableFilter) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); - void (APIENTRY *SeparableFilter2D) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); - void (APIENTRY *GetHistogram) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); - void (APIENTRY *GetHistogramParameterfv) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *GetHistogramParameteriv) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetMinmax) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); - void (APIENTRY *GetMinmaxParameterfv) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *GetMinmaxParameteriv) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *Histogram) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); - void (APIENTRY *Minmax) (GLenum target, GLenum internalformat, GLboolean sink); - void (APIENTRY *ResetHistogram) (GLenum target); - void (APIENTRY *ResetMinmax) (GLenum target); - void (APIENTRY *TexImage3D) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); - void (APIENTRY *TexSubImage3D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); - void (APIENTRY *CopyTexSubImage3D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); - void (APIENTRY *ActiveTexture) (GLenum texture); - void (APIENTRY *ClientActiveTexture) (GLenum texture); - void (APIENTRY *MultiTexCoord1d) (GLenum target, GLdouble s); - void (APIENTRY *MultiTexCoord1dv) (GLenum target, const GLdouble *v); - void (APIENTRY *MultiTexCoord1f) (GLenum target, GLfloat s); - void (APIENTRY *MultiTexCoord1fv) (GLenum target, const GLfloat *v); - void (APIENTRY *MultiTexCoord1i) (GLenum target, GLint s); - void (APIENTRY *MultiTexCoord1iv) (GLenum target, const GLint *v); - void (APIENTRY *MultiTexCoord1s) (GLenum target, GLshort s); - void (APIENTRY *MultiTexCoord1sv) (GLenum target, const GLshort *v); - void (APIENTRY *MultiTexCoord2d) (GLenum target, GLdouble s, GLdouble t); - void (APIENTRY *MultiTexCoord2dv) (GLenum target, const GLdouble *v); - void (APIENTRY *MultiTexCoord2f) (GLenum target, GLfloat s, GLfloat t); - void (APIENTRY *MultiTexCoord2fv) (GLenum target, const GLfloat *v); - void (APIENTRY *MultiTexCoord2i) (GLenum target, GLint s, GLint t); - void (APIENTRY *MultiTexCoord2iv) (GLenum target, const GLint *v); - void (APIENTRY *MultiTexCoord2s) (GLenum target, GLshort s, GLshort t); - void (APIENTRY *MultiTexCoord2sv) (GLenum target, const GLshort *v); - void (APIENTRY *MultiTexCoord3d) (GLenum target, GLdouble s, GLdouble t, GLdouble r); - void (APIENTRY *MultiTexCoord3dv) (GLenum target, const GLdouble *v); - void (APIENTRY *MultiTexCoord3f) (GLenum target, GLfloat s, GLfloat t, GLfloat r); - void (APIENTRY *MultiTexCoord3fv) (GLenum target, const GLfloat *v); - void (APIENTRY *MultiTexCoord3i) (GLenum target, GLint s, GLint t, GLint r); - void (APIENTRY *MultiTexCoord3iv) (GLenum target, const GLint *v); - void (APIENTRY *MultiTexCoord3s) (GLenum target, GLshort s, GLshort t, GLshort r); - void (APIENTRY *MultiTexCoord3sv) (GLenum target, const GLshort *v); - void (APIENTRY *MultiTexCoord4d) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); - void (APIENTRY *MultiTexCoord4dv) (GLenum target, const GLdouble *v); - void (APIENTRY *MultiTexCoord4f) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); - void (APIENTRY *MultiTexCoord4fv) (GLenum target, const GLfloat *v); - void (APIENTRY *MultiTexCoord4i) (GLenum target, GLint s, GLint t, GLint r, GLint q); - void (APIENTRY *MultiTexCoord4iv) (GLenum target, const GLint *v); - void (APIENTRY *MultiTexCoord4s) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); - void (APIENTRY *MultiTexCoord4sv) (GLenum target, const GLshort *v); - void (APIENTRY *LoadTransposeMatrixf) (const GLfloat *m); - void (APIENTRY *LoadTransposeMatrixd) (const GLdouble *m); - void (APIENTRY *MultTransposeMatrixf) (const GLfloat *m); - void (APIENTRY *MultTransposeMatrixd) (const GLdouble *m); - void (APIENTRY *SampleCoverage) (GLclampf value, GLboolean invert); - void (APIENTRY *CompressedTexImage3D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *CompressedTexImage2D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *CompressedTexImage1D) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *CompressedTexSubImage3D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *CompressedTexSubImage2D) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *CompressedTexSubImage1D) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *GetCompressedTexImage) (GLenum target, GLint level, GLvoid *img); - void (APIENTRY *BlendFuncSeparate) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); - void (APIENTRY *FogCoordf) (GLfloat coord); - void (APIENTRY *FogCoordfv) (const GLfloat *coord); - void (APIENTRY *FogCoordd) (GLdouble coord); - void (APIENTRY *FogCoorddv) (const GLdouble *coord); - void (APIENTRY *FogCoordPointer) (GLenum type, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *MultiDrawArrays) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); - void (APIENTRY *MultiDrawElements) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); - void (APIENTRY *PointParameterf) (GLenum pname, GLfloat param); - void (APIENTRY *PointParameterfv) (GLenum pname, const GLfloat *params); - void (APIENTRY *PointParameteri) (GLenum pname, GLint param); - void (APIENTRY *PointParameteriv) (GLenum pname, const GLint *params); - void (APIENTRY *SecondaryColor3b) (GLbyte red, GLbyte green, GLbyte blue); - void (APIENTRY *SecondaryColor3bv) (const GLbyte *v); - void (APIENTRY *SecondaryColor3d) (GLdouble red, GLdouble green, GLdouble blue); - void (APIENTRY *SecondaryColor3dv) (const GLdouble *v); - void (APIENTRY *SecondaryColor3f) (GLfloat red, GLfloat green, GLfloat blue); - void (APIENTRY *SecondaryColor3fv) (const GLfloat *v); - void (APIENTRY *SecondaryColor3i) (GLint red, GLint green, GLint blue); - void (APIENTRY *SecondaryColor3iv) (const GLint *v); - void (APIENTRY *SecondaryColor3s) (GLshort red, GLshort green, GLshort blue); - void (APIENTRY *SecondaryColor3sv) (const GLshort *v); - void (APIENTRY *SecondaryColor3ub) (GLubyte red, GLubyte green, GLubyte blue); - void (APIENTRY *SecondaryColor3ubv) (const GLubyte *v); - void (APIENTRY *SecondaryColor3ui) (GLuint red, GLuint green, GLuint blue); - void (APIENTRY *SecondaryColor3uiv) (const GLuint *v); - void (APIENTRY *SecondaryColor3us) (GLushort red, GLushort green, GLushort blue); - void (APIENTRY *SecondaryColor3usv) (const GLushort *v); - void (APIENTRY *SecondaryColorPointer) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *WindowPos2d) (GLdouble x, GLdouble y); - void (APIENTRY *WindowPos2dv) (const GLdouble *v); - void (APIENTRY *WindowPos2f) (GLfloat x, GLfloat y); - void (APIENTRY *WindowPos2fv) (const GLfloat *v); - void (APIENTRY *WindowPos2i) (GLint x, GLint y); - void (APIENTRY *WindowPos2iv) (const GLint *v); - void (APIENTRY *WindowPos2s) (GLshort x, GLshort y); - void (APIENTRY *WindowPos2sv) (const GLshort *v); - void (APIENTRY *WindowPos3d) (GLdouble x, GLdouble y, GLdouble z); - void (APIENTRY *WindowPos3dv) (const GLdouble *v); - void (APIENTRY *WindowPos3f) (GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *WindowPos3fv) (const GLfloat *v); - void (APIENTRY *WindowPos3i) (GLint x, GLint y, GLint z); - void (APIENTRY *WindowPos3iv) (const GLint *v); - void (APIENTRY *WindowPos3s) (GLshort x, GLshort y, GLshort z); - void (APIENTRY *WindowPos3sv) (const GLshort *v); - void (APIENTRY *GenQueries) (GLsizei n, GLuint *ids); - void (APIENTRY *DeleteQueries) (GLsizei n, const GLuint *ids); - GLboolean (APIENTRY *IsQuery) (GLuint id); - void (APIENTRY *BeginQuery) (GLenum target, GLuint id); - void (APIENTRY *EndQuery) (GLenum target); - void (APIENTRY *GetQueryiv) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetQueryObjectiv) (GLuint id, GLenum pname, GLint *params); - void (APIENTRY *GetQueryObjectuiv) (GLuint id, GLenum pname, GLuint *params); - void (APIENTRY *BindBuffer) (GLenum target, GLuint buffer); - void (APIENTRY *DeleteBuffers) (GLsizei n, const GLuint *buffers); - void (APIENTRY *GenBuffers) (GLsizei n, GLuint *buffers); - GLboolean (APIENTRY *IsBuffer) (GLuint buffer); - void (APIENTRY *BufferData) (GLenum target, GLsizeiptr size, const GLvoid *data, GLenum usage); - void (APIENTRY *BufferSubData) (GLenum target, GLintptr offset, GLsizeiptr size, const GLvoid *data); - void (APIENTRY *GetBufferSubData) (GLenum target, GLintptr offset, GLsizeiptr size, GLvoid *data); - GLvoid* (APIENTRY *MapBuffer) (GLenum target, GLenum access); - GLboolean (APIENTRY *UnmapBuffer) (GLenum target); - void (APIENTRY *GetBufferParameteriv) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetBufferPointerv) (GLenum target, GLenum pname, GLvoid* *params); - void (APIENTRY *ActiveTextureARB) (GLenum texture); - void (APIENTRY *ClientActiveTextureARB) (GLenum texture); - void (APIENTRY *MultiTexCoord1dARB) (GLenum target, GLdouble s); - void (APIENTRY *MultiTexCoord1dvARB) (GLenum target, const GLdouble *v); - void (APIENTRY *MultiTexCoord1fARB) (GLenum target, GLfloat s); - void (APIENTRY *MultiTexCoord1fvARB) (GLenum target, const GLfloat *v); - void (APIENTRY *MultiTexCoord1iARB) (GLenum target, GLint s); - void (APIENTRY *MultiTexCoord1ivARB) (GLenum target, const GLint *v); - void (APIENTRY *MultiTexCoord1sARB) (GLenum target, GLshort s); - void (APIENTRY *MultiTexCoord1svARB) (GLenum target, const GLshort *v); - void (APIENTRY *MultiTexCoord2dARB) (GLenum target, GLdouble s, GLdouble t); - void (APIENTRY *MultiTexCoord2dvARB) (GLenum target, const GLdouble *v); - void (APIENTRY *MultiTexCoord2fARB) (GLenum target, GLfloat s, GLfloat t); - void (APIENTRY *MultiTexCoord2fvARB) (GLenum target, const GLfloat *v); - void (APIENTRY *MultiTexCoord2iARB) (GLenum target, GLint s, GLint t); - void (APIENTRY *MultiTexCoord2ivARB) (GLenum target, const GLint *v); - void (APIENTRY *MultiTexCoord2sARB) (GLenum target, GLshort s, GLshort t); - void (APIENTRY *MultiTexCoord2svARB) (GLenum target, const GLshort *v); - void (APIENTRY *MultiTexCoord3dARB) (GLenum target, GLdouble s, GLdouble t, GLdouble r); - void (APIENTRY *MultiTexCoord3dvARB) (GLenum target, const GLdouble *v); - void (APIENTRY *MultiTexCoord3fARB) (GLenum target, GLfloat s, GLfloat t, GLfloat r); - void (APIENTRY *MultiTexCoord3fvARB) (GLenum target, const GLfloat *v); - void (APIENTRY *MultiTexCoord3iARB) (GLenum target, GLint s, GLint t, GLint r); - void (APIENTRY *MultiTexCoord3ivARB) (GLenum target, const GLint *v); - void (APIENTRY *MultiTexCoord3sARB) (GLenum target, GLshort s, GLshort t, GLshort r); - void (APIENTRY *MultiTexCoord3svARB) (GLenum target, const GLshort *v); - void (APIENTRY *MultiTexCoord4dARB) (GLenum target, GLdouble s, GLdouble t, GLdouble r, GLdouble q); - void (APIENTRY *MultiTexCoord4dvARB) (GLenum target, const GLdouble *v); - void (APIENTRY *MultiTexCoord4fARB) (GLenum target, GLfloat s, GLfloat t, GLfloat r, GLfloat q); - void (APIENTRY *MultiTexCoord4fvARB) (GLenum target, const GLfloat *v); - void (APIENTRY *MultiTexCoord4iARB) (GLenum target, GLint s, GLint t, GLint r, GLint q); - void (APIENTRY *MultiTexCoord4ivARB) (GLenum target, const GLint *v); - void (APIENTRY *MultiTexCoord4sARB) (GLenum target, GLshort s, GLshort t, GLshort r, GLshort q); - void (APIENTRY *MultiTexCoord4svARB) (GLenum target, const GLshort *v); - void (APIENTRY *LoadTransposeMatrixfARB) (const GLfloat *m); - void (APIENTRY *LoadTransposeMatrixdARB) (const GLdouble *m); - void (APIENTRY *MultTransposeMatrixfARB) (const GLfloat *m); - void (APIENTRY *MultTransposeMatrixdARB) (const GLdouble *m); - void (APIENTRY *SampleCoverageARB) (GLclampf value, GLboolean invert); - void (APIENTRY *CompressedTexImage3DARB) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *CompressedTexImage2DARB) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLint border, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *CompressedTexImage1DARB) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLint border, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *CompressedTexSubImage3DARB) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *CompressedTexSubImage2DARB) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *CompressedTexSubImage1DARB) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const GLvoid *data); - void (APIENTRY *GetCompressedTexImageARB) (GLenum target, GLint level, GLvoid *img); - void (APIENTRY *PointParameterfARB) (GLenum pname, GLfloat param); - void (APIENTRY *PointParameterfvARB) (GLenum pname, const GLfloat *params); - void (APIENTRY *WeightbvARB) (GLint size, const GLbyte *weights); - void (APIENTRY *WeightsvARB) (GLint size, const GLshort *weights); - void (APIENTRY *WeightivARB) (GLint size, const GLint *weights); - void (APIENTRY *WeightfvARB) (GLint size, const GLfloat *weights); - void (APIENTRY *WeightdvARB) (GLint size, const GLdouble *weights); - void (APIENTRY *WeightubvARB) (GLint size, const GLubyte *weights); - void (APIENTRY *WeightusvARB) (GLint size, const GLushort *weights); - void (APIENTRY *WeightuivARB) (GLint size, const GLuint *weights); - void (APIENTRY *WeightPointerARB) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *VertexBlendARB) (GLint count); - void (APIENTRY *CurrentPaletteMatrixARB) (GLint index); - void (APIENTRY *MatrixIndexubvARB) (GLint size, const GLubyte *indices); - void (APIENTRY *MatrixIndexusvARB) (GLint size, const GLushort *indices); - void (APIENTRY *MatrixIndexuivARB) (GLint size, const GLuint *indices); - void (APIENTRY *MatrixIndexPointerARB) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *WindowPos2dARB) (GLdouble x, GLdouble y); - void (APIENTRY *WindowPos2dvARB) (const GLdouble *v); - void (APIENTRY *WindowPos2fARB) (GLfloat x, GLfloat y); - void (APIENTRY *WindowPos2fvARB) (const GLfloat *v); - void (APIENTRY *WindowPos2iARB) (GLint x, GLint y); - void (APIENTRY *WindowPos2ivARB) (const GLint *v); - void (APIENTRY *WindowPos2sARB) (GLshort x, GLshort y); - void (APIENTRY *WindowPos2svARB) (const GLshort *v); - void (APIENTRY *WindowPos3dARB) (GLdouble x, GLdouble y, GLdouble z); - void (APIENTRY *WindowPos3dvARB) (const GLdouble *v); - void (APIENTRY *WindowPos3fARB) (GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *WindowPos3fvARB) (const GLfloat *v); - void (APIENTRY *WindowPos3iARB) (GLint x, GLint y, GLint z); - void (APIENTRY *WindowPos3ivARB) (const GLint *v); - void (APIENTRY *WindowPos3sARB) (GLshort x, GLshort y, GLshort z); - void (APIENTRY *WindowPos3svARB) (const GLshort *v); - void (APIENTRY *VertexAttrib1dARB) (GLuint index, GLdouble x); - void (APIENTRY *VertexAttrib1dvARB) (GLuint index, const GLdouble *v); - void (APIENTRY *VertexAttrib1fARB) (GLuint index, GLfloat x); - void (APIENTRY *VertexAttrib1fvARB) (GLuint index, const GLfloat *v); - void (APIENTRY *VertexAttrib1sARB) (GLuint index, GLshort x); - void (APIENTRY *VertexAttrib1svARB) (GLuint index, const GLshort *v); - void (APIENTRY *VertexAttrib2dARB) (GLuint index, GLdouble x, GLdouble y); - void (APIENTRY *VertexAttrib2dvARB) (GLuint index, const GLdouble *v); - void (APIENTRY *VertexAttrib2fARB) (GLuint index, GLfloat x, GLfloat y); - void (APIENTRY *VertexAttrib2fvARB) (GLuint index, const GLfloat *v); - void (APIENTRY *VertexAttrib2sARB) (GLuint index, GLshort x, GLshort y); - void (APIENTRY *VertexAttrib2svARB) (GLuint index, const GLshort *v); - void (APIENTRY *VertexAttrib3dARB) (GLuint index, GLdouble x, GLdouble y, GLdouble z); - void (APIENTRY *VertexAttrib3dvARB) (GLuint index, const GLdouble *v); - void (APIENTRY *VertexAttrib3fARB) (GLuint index, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *VertexAttrib3fvARB) (GLuint index, const GLfloat *v); - void (APIENTRY *VertexAttrib3sARB) (GLuint index, GLshort x, GLshort y, GLshort z); - void (APIENTRY *VertexAttrib3svARB) (GLuint index, const GLshort *v); - void (APIENTRY *VertexAttrib4NbvARB) (GLuint index, const GLbyte *v); - void (APIENTRY *VertexAttrib4NivARB) (GLuint index, const GLint *v); - void (APIENTRY *VertexAttrib4NsvARB) (GLuint index, const GLshort *v); - void (APIENTRY *VertexAttrib4NubARB) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); - void (APIENTRY *VertexAttrib4NubvARB) (GLuint index, const GLubyte *v); - void (APIENTRY *VertexAttrib4NuivARB) (GLuint index, const GLuint *v); - void (APIENTRY *VertexAttrib4NusvARB) (GLuint index, const GLushort *v); - void (APIENTRY *VertexAttrib4bvARB) (GLuint index, const GLbyte *v); - void (APIENTRY *VertexAttrib4dARB) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); - void (APIENTRY *VertexAttrib4dvARB) (GLuint index, const GLdouble *v); - void (APIENTRY *VertexAttrib4fARB) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void (APIENTRY *VertexAttrib4fvARB) (GLuint index, const GLfloat *v); - void (APIENTRY *VertexAttrib4ivARB) (GLuint index, const GLint *v); - void (APIENTRY *VertexAttrib4sARB) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); - void (APIENTRY *VertexAttrib4svARB) (GLuint index, const GLshort *v); - void (APIENTRY *VertexAttrib4ubvARB) (GLuint index, const GLubyte *v); - void (APIENTRY *VertexAttrib4uivARB) (GLuint index, const GLuint *v); - void (APIENTRY *VertexAttrib4usvARB) (GLuint index, const GLushort *v); - void (APIENTRY *VertexAttribPointerARB) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *EnableVertexAttribArrayARB) (GLuint index); - void (APIENTRY *DisableVertexAttribArrayARB) (GLuint index); - void (APIENTRY *ProgramStringARB) (GLenum target, GLenum format, GLsizei len, const GLvoid *string); - void (APIENTRY *BindProgramARB) (GLenum target, GLuint program); - void (APIENTRY *DeleteProgramsARB) (GLsizei n, const GLuint *programs); - void (APIENTRY *GenProgramsARB) (GLsizei n, GLuint *programs); - void (APIENTRY *ProgramEnvParameter4dARB) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); - void (APIENTRY *ProgramEnvParameter4dvARB) (GLenum target, GLuint index, const GLdouble *params); - void (APIENTRY *ProgramEnvParameter4fARB) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void (APIENTRY *ProgramEnvParameter4fvARB) (GLenum target, GLuint index, const GLfloat *params); - void (APIENTRY *ProgramLocalParameter4dARB) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); - void (APIENTRY *ProgramLocalParameter4dvARB) (GLenum target, GLuint index, const GLdouble *params); - void (APIENTRY *ProgramLocalParameter4fARB) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void (APIENTRY *ProgramLocalParameter4fvARB) (GLenum target, GLuint index, const GLfloat *params); - void (APIENTRY *GetProgramEnvParameterdvARB) (GLenum target, GLuint index, GLdouble *params); - void (APIENTRY *GetProgramEnvParameterfvARB) (GLenum target, GLuint index, GLfloat *params); - void (APIENTRY *GetProgramLocalParameterdvARB) (GLenum target, GLuint index, GLdouble *params); - void (APIENTRY *GetProgramLocalParameterfvARB) (GLenum target, GLuint index, GLfloat *params); - void (APIENTRY *GetProgramivARB) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetProgramStringARB) (GLenum target, GLenum pname, GLvoid *string); - void (APIENTRY *GetVertexAttribdvARB) (GLuint index, GLenum pname, GLdouble *params); - void (APIENTRY *GetVertexAttribfvARB) (GLuint index, GLenum pname, GLfloat *params); - void (APIENTRY *GetVertexAttribivARB) (GLuint index, GLenum pname, GLint *params); - void (APIENTRY *GetVertexAttribPointervARB) (GLuint index, GLenum pname, GLvoid* *pointer); - GLboolean (APIENTRY *IsProgramARB) (GLuint program); - void (APIENTRY *BindBufferARB) (GLenum target, GLuint buffer); - void (APIENTRY *DeleteBuffersARB) (GLsizei n, const GLuint *buffers); - void (APIENTRY *GenBuffersARB) (GLsizei n, GLuint *buffers); - GLboolean (APIENTRY *IsBufferARB) (GLuint buffer); - void (APIENTRY *BufferDataARB) (GLenum target, GLsizeiptrARB size, const GLvoid *data, GLenum usage); - void (APIENTRY *BufferSubDataARB) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, const GLvoid *data); - void (APIENTRY *GetBufferSubDataARB) (GLenum target, GLintptrARB offset, GLsizeiptrARB size, GLvoid *data); - GLvoid* (APIENTRY *MapBufferARB) (GLenum target, GLenum access); - GLboolean (APIENTRY *UnmapBufferARB) (GLenum target); - void (APIENTRY *GetBufferParameterivARB) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetBufferPointervARB) (GLenum target, GLenum pname, GLvoid* *params); - void (APIENTRY *GenQueriesARB) (GLsizei n, GLuint *ids); - void (APIENTRY *DeleteQueriesARB) (GLsizei n, const GLuint *ids); - GLboolean (APIENTRY *IsQueryARB) (GLuint id); - void (APIENTRY *BeginQueryARB) (GLenum target, GLuint id); - void (APIENTRY *EndQueryARB) (GLenum target); - void (APIENTRY *GetQueryivARB) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetQueryObjectivARB) (GLuint id, GLenum pname, GLint *params); - void (APIENTRY *GetQueryObjectuivARB) (GLuint id, GLenum pname, GLuint *params); - void (APIENTRY *DeleteObjectARB) (GLhandleARB obj); - GLhandleARB (APIENTRY *GetHandleARB) (GLenum pname); - void (APIENTRY *DetachObjectARB) (GLhandleARB containerObj, GLhandleARB attachedObj); - GLhandleARB (APIENTRY *CreateShaderObjectARB) (GLenum shaderType); - void (APIENTRY *ShaderSourceARB) (GLhandleARB shaderObj, GLsizei count, const GLcharARB* *string, const GLint *length); - void (APIENTRY *CompileShaderARB) (GLhandleARB shaderObj); - GLhandleARB (APIENTRY *CreateProgramObjectARB) (void); - void (APIENTRY *AttachObjectARB) (GLhandleARB containerObj, GLhandleARB obj); - void (APIENTRY *LinkProgramARB) (GLhandleARB programObj); - void (APIENTRY *UseProgramObjectARB) (GLhandleARB programObj); - void (APIENTRY *ValidateProgramARB) (GLhandleARB programObj); - void (APIENTRY *Uniform1fARB) (GLint location, GLfloat v0); - void (APIENTRY *Uniform2fARB) (GLint location, GLfloat v0, GLfloat v1); - void (APIENTRY *Uniform3fARB) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2); - void (APIENTRY *Uniform4fARB) (GLint location, GLfloat v0, GLfloat v1, GLfloat v2, GLfloat v3); - void (APIENTRY *Uniform1iARB) (GLint location, GLint v0); - void (APIENTRY *Uniform2iARB) (GLint location, GLint v0, GLint v1); - void (APIENTRY *Uniform3iARB) (GLint location, GLint v0, GLint v1, GLint v2); - void (APIENTRY *Uniform4iARB) (GLint location, GLint v0, GLint v1, GLint v2, GLint v3); - void (APIENTRY *Uniform1fvARB) (GLint location, GLsizei count, const GLfloat *value); - void (APIENTRY *Uniform2fvARB) (GLint location, GLsizei count, const GLfloat *value); - void (APIENTRY *Uniform3fvARB) (GLint location, GLsizei count, const GLfloat *value); - void (APIENTRY *Uniform4fvARB) (GLint location, GLsizei count, const GLfloat *value); - void (APIENTRY *Uniform1ivARB) (GLint location, GLsizei count, const GLint *value); - void (APIENTRY *Uniform2ivARB) (GLint location, GLsizei count, const GLint *value); - void (APIENTRY *Uniform3ivARB) (GLint location, GLsizei count, const GLint *value); - void (APIENTRY *Uniform4ivARB) (GLint location, GLsizei count, const GLint *value); - void (APIENTRY *UniformMatrix2fvARB) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); - void (APIENTRY *UniformMatrix3fvARB) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); - void (APIENTRY *UniformMatrix4fvARB) (GLint location, GLsizei count, GLboolean transpose, const GLfloat *value); - void (APIENTRY *GetObjectParameterfvARB) (GLhandleARB obj, GLenum pname, GLfloat *params); - void (APIENTRY *GetObjectParameterivARB) (GLhandleARB obj, GLenum pname, GLint *params); - void (APIENTRY *GetInfoLogARB) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *infoLog); - void (APIENTRY *GetAttachedObjectsARB) (GLhandleARB containerObj, GLsizei maxCount, GLsizei *count, GLhandleARB *obj); - GLint (APIENTRY *GetUniformLocationARB) (GLhandleARB programObj, const GLcharARB *name); - void (APIENTRY *GetActiveUniformARB) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); - void (APIENTRY *GetUniformfvARB) (GLhandleARB programObj, GLint location, GLfloat *params); - void (APIENTRY *GetUniformivARB) (GLhandleARB programObj, GLint location, GLint *params); - void (APIENTRY *GetShaderSourceARB) (GLhandleARB obj, GLsizei maxLength, GLsizei *length, GLcharARB *source); - void (APIENTRY *BindAttribLocationARB) (GLhandleARB programObj, GLuint index, const GLcharARB *name); - void (APIENTRY *GetActiveAttribARB) (GLhandleARB programObj, GLuint index, GLsizei maxLength, GLsizei *length, GLint *size, GLenum *type, GLcharARB *name); - GLint (APIENTRY *GetAttribLocationARB) (GLhandleARB programObj, const GLcharARB *name); - void (APIENTRY *BlendColorEXT) (GLclampf red, GLclampf green, GLclampf blue, GLclampf alpha); - void (APIENTRY *PolygonOffsetEXT) (GLfloat factor, GLfloat bias); - void (APIENTRY *TexImage3DEXT) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLint border, GLenum format, GLenum type, const GLvoid *pixels); - void (APIENTRY *TexSubImage3DEXT) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const GLvoid *pixels); - void (APIENTRY *GetTexFilterFuncSGIS) (GLenum target, GLenum filter, GLfloat *weights); - void (APIENTRY *TexFilterFuncSGIS) (GLenum target, GLenum filter, GLsizei n, const GLfloat *weights); - void (APIENTRY *TexSubImage1DEXT) (GLenum target, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const GLvoid *pixels); - void (APIENTRY *TexSubImage2DEXT) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *pixels); - void (APIENTRY *CopyTexImage1DEXT) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLint border); - void (APIENTRY *CopyTexImage2DEXT) (GLenum target, GLint level, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height, GLint border); - void (APIENTRY *CopyTexSubImage1DEXT) (GLenum target, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width); - void (APIENTRY *CopyTexSubImage2DEXT) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height); - void (APIENTRY *CopyTexSubImage3DEXT) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height); - void (APIENTRY *GetHistogramEXT) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); - void (APIENTRY *GetHistogramParameterfvEXT) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *GetHistogramParameterivEXT) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetMinmaxEXT) (GLenum target, GLboolean reset, GLenum format, GLenum type, GLvoid *values); - void (APIENTRY *GetMinmaxParameterfvEXT) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *GetMinmaxParameterivEXT) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *HistogramEXT) (GLenum target, GLsizei width, GLenum internalformat, GLboolean sink); - void (APIENTRY *MinmaxEXT) (GLenum target, GLenum internalformat, GLboolean sink); - void (APIENTRY *ResetHistogramEXT) (GLenum target); - void (APIENTRY *ResetMinmaxEXT) (GLenum target); - void (APIENTRY *ConvolutionFilter1DEXT) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *image); - void (APIENTRY *ConvolutionFilter2DEXT) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *image); - void (APIENTRY *ConvolutionParameterfEXT) (GLenum target, GLenum pname, GLfloat params); - void (APIENTRY *ConvolutionParameterfvEXT) (GLenum target, GLenum pname, const GLfloat *params); - void (APIENTRY *ConvolutionParameteriEXT) (GLenum target, GLenum pname, GLint params); - void (APIENTRY *ConvolutionParameterivEXT) (GLenum target, GLenum pname, const GLint *params); - void (APIENTRY *CopyConvolutionFilter1DEXT) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); - void (APIENTRY *CopyConvolutionFilter2DEXT) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width, GLsizei height); - void (APIENTRY *GetConvolutionFilterEXT) (GLenum target, GLenum format, GLenum type, GLvoid *image); - void (APIENTRY *GetConvolutionParameterfvEXT) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *GetConvolutionParameterivEXT) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetSeparableFilterEXT) (GLenum target, GLenum format, GLenum type, GLvoid *row, GLvoid *column, GLvoid *span); - void (APIENTRY *SeparableFilter2DEXT) (GLenum target, GLenum internalformat, GLsizei width, GLsizei height, GLenum format, GLenum type, const GLvoid *row, const GLvoid *column); - void (APIENTRY *ColorTableSGI) (GLenum target, GLenum internalformat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); - void (APIENTRY *ColorTableParameterfvSGI) (GLenum target, GLenum pname, const GLfloat *params); - void (APIENTRY *ColorTableParameterivSGI) (GLenum target, GLenum pname, const GLint *params); - void (APIENTRY *CopyColorTableSGI) (GLenum target, GLenum internalformat, GLint x, GLint y, GLsizei width); - void (APIENTRY *GetColorTableSGI) (GLenum target, GLenum format, GLenum type, GLvoid *table); - void (APIENTRY *GetColorTableParameterfvSGI) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *GetColorTableParameterivSGI) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *PixelTexGenSGIX) (GLenum mode); - void (APIENTRY *PixelTexGenParameteriSGIS) (GLenum pname, GLint param); - void (APIENTRY *PixelTexGenParameterivSGIS) (GLenum pname, const GLint *params); - void (APIENTRY *PixelTexGenParameterfSGIS) (GLenum pname, GLfloat param); - void (APIENTRY *PixelTexGenParameterfvSGIS) (GLenum pname, const GLfloat *params); - void (APIENTRY *GetPixelTexGenParameterivSGIS) (GLenum pname, GLint *params); - void (APIENTRY *GetPixelTexGenParameterfvSGIS) (GLenum pname, GLfloat *params); - void (APIENTRY *TexImage4DSGIS) (GLenum target, GLint level, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLint border, GLenum format, GLenum type, const GLvoid *pixels); - void (APIENTRY *TexSubImage4DSGIS) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint woffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei size4d, GLenum format, GLenum type, const GLvoid *pixels); - GLboolean (APIENTRY *AreTexturesResidentEXT) (GLsizei n, const GLuint *textures, GLboolean *residences); - void (APIENTRY *BindTextureEXT) (GLenum target, GLuint texture); - void (APIENTRY *DeleteTexturesEXT) (GLsizei n, const GLuint *textures); - void (APIENTRY *GenTexturesEXT) (GLsizei n, GLuint *textures); - GLboolean (APIENTRY *IsTextureEXT) (GLuint texture); - void (APIENTRY *PrioritizeTexturesEXT) (GLsizei n, const GLuint *textures, const GLclampf *priorities); - void (APIENTRY *DetailTexFuncSGIS) (GLenum target, GLsizei n, const GLfloat *points); - void (APIENTRY *GetDetailTexFuncSGIS) (GLenum target, GLfloat *points); - void (APIENTRY *SharpenTexFuncSGIS) (GLenum target, GLsizei n, const GLfloat *points); - void (APIENTRY *GetSharpenTexFuncSGIS) (GLenum target, GLfloat *points); - void (APIENTRY *SampleMaskSGIS) (GLclampf value, GLboolean invert); - void (APIENTRY *SamplePatternSGIS) (GLenum pattern); - void (APIENTRY *ArrayElementEXT) (GLint i); - void (APIENTRY *ColorPointerEXT) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); - void (APIENTRY *DrawArraysEXT) (GLenum mode, GLint first, GLsizei count); - void (APIENTRY *EdgeFlagPointerEXT) (GLsizei stride, GLsizei count, const GLboolean *pointer); - void (APIENTRY *GetPointervEXT) (GLenum pname, GLvoid* *params); - void (APIENTRY *IndexPointerEXT) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); - void (APIENTRY *NormalPointerEXT) (GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); - void (APIENTRY *TexCoordPointerEXT) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); - void (APIENTRY *VertexPointerEXT) (GLint size, GLenum type, GLsizei stride, GLsizei count, const GLvoid *pointer); - void (APIENTRY *BlendEquationEXT) (GLenum mode); - void (APIENTRY *SpriteParameterfSGIX) (GLenum pname, GLfloat param); - void (APIENTRY *SpriteParameterfvSGIX) (GLenum pname, const GLfloat *params); - void (APIENTRY *SpriteParameteriSGIX) (GLenum pname, GLint param); - void (APIENTRY *SpriteParameterivSGIX) (GLenum pname, const GLint *params); - void (APIENTRY *PointParameterfEXT) (GLenum pname, GLfloat param); - void (APIENTRY *PointParameterfvEXT) (GLenum pname, const GLfloat *params); - void (APIENTRY *PointParameterfSGIS) (GLenum pname, GLfloat param); - void (APIENTRY *PointParameterfvSGIS) (GLenum pname, const GLfloat *params); - GLint (APIENTRY *GetInstrumentsSGIX) (void); - void (APIENTRY *InstrumentsBufferSGIX) (GLsizei size, GLint *buffer); - GLint (APIENTRY *PollInstrumentsSGIX) (GLint *marker_p); - void (APIENTRY *ReadInstrumentsSGIX) (GLint marker); - void (APIENTRY *StartInstrumentsSGIX) (void); - void (APIENTRY *StopInstrumentsSGIX) (GLint marker); - void (APIENTRY *FrameZoomSGIX) (GLint factor); - void (APIENTRY *TagSampleBufferSGIX) (void); - void (APIENTRY *DeformationMap3dSGIX) (GLenum target, GLdouble u1, GLdouble u2, GLint ustride, GLint uorder, GLdouble v1, GLdouble v2, GLint vstride, GLint vorder, GLdouble w1, GLdouble w2, GLint wstride, GLint worder, const GLdouble *points); - void (APIENTRY *DeformationMap3fSGIX) (GLenum target, GLfloat u1, GLfloat u2, GLint ustride, GLint uorder, GLfloat v1, GLfloat v2, GLint vstride, GLint vorder, GLfloat w1, GLfloat w2, GLint wstride, GLint worder, const GLfloat *points); - void (APIENTRY *DeformSGIX) (GLbitfield mask); - void (APIENTRY *LoadIdentityDeformationMapSGIX) (GLbitfield mask); - void (APIENTRY *ReferencePlaneSGIX) (const GLdouble *equation); - void (APIENTRY *FlushRasterSGIX) (void); - void (APIENTRY *FogFuncSGIS) (GLsizei n, const GLfloat *points); - void (APIENTRY *GetFogFuncSGIS) (GLfloat *points); - void (APIENTRY *ImageTransformParameteriHP) (GLenum target, GLenum pname, GLint param); - void (APIENTRY *ImageTransformParameterfHP) (GLenum target, GLenum pname, GLfloat param); - void (APIENTRY *ImageTransformParameterivHP) (GLenum target, GLenum pname, const GLint *params); - void (APIENTRY *ImageTransformParameterfvHP) (GLenum target, GLenum pname, const GLfloat *params); - void (APIENTRY *GetImageTransformParameterivHP) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetImageTransformParameterfvHP) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *ColorSubTableEXT) (GLenum target, GLsizei start, GLsizei count, GLenum format, GLenum type, const GLvoid *data); - void (APIENTRY *CopyColorSubTableEXT) (GLenum target, GLsizei start, GLint x, GLint y, GLsizei width); - void (APIENTRY *HintPGI) (GLenum target, GLint mode); - void (APIENTRY *ColorTableEXT) (GLenum target, GLenum internalFormat, GLsizei width, GLenum format, GLenum type, const GLvoid *table); - void (APIENTRY *GetColorTableEXT) (GLenum target, GLenum format, GLenum type, GLvoid *data); - void (APIENTRY *GetColorTableParameterivEXT) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetColorTableParameterfvEXT) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *GetListParameterfvSGIX) (GLuint list, GLenum pname, GLfloat *params); - void (APIENTRY *GetListParameterivSGIX) (GLuint list, GLenum pname, GLint *params); - void (APIENTRY *ListParameterfSGIX) (GLuint list, GLenum pname, GLfloat param); - void (APIENTRY *ListParameterfvSGIX) (GLuint list, GLenum pname, const GLfloat *params); - void (APIENTRY *ListParameteriSGIX) (GLuint list, GLenum pname, GLint param); - void (APIENTRY *ListParameterivSGIX) (GLuint list, GLenum pname, const GLint *params); - void (APIENTRY *IndexMaterialEXT) (GLenum face, GLenum mode); - void (APIENTRY *IndexFuncEXT) (GLenum func, GLclampf ref); - void (APIENTRY *LockArraysEXT) (GLint first, GLsizei count); - void (APIENTRY *UnlockArraysEXT) (void); - void (APIENTRY *CullParameterdvEXT) (GLenum pname, GLdouble *params); - void (APIENTRY *CullParameterfvEXT) (GLenum pname, GLfloat *params); - void (APIENTRY *FragmentColorMaterialSGIX) (GLenum face, GLenum mode); - void (APIENTRY *FragmentLightfSGIX) (GLenum light, GLenum pname, GLfloat param); - void (APIENTRY *FragmentLightfvSGIX) (GLenum light, GLenum pname, const GLfloat *params); - void (APIENTRY *FragmentLightiSGIX) (GLenum light, GLenum pname, GLint param); - void (APIENTRY *FragmentLightivSGIX) (GLenum light, GLenum pname, const GLint *params); - void (APIENTRY *FragmentLightModelfSGIX) (GLenum pname, GLfloat param); - void (APIENTRY *FragmentLightModelfvSGIX) (GLenum pname, const GLfloat *params); - void (APIENTRY *FragmentLightModeliSGIX) (GLenum pname, GLint param); - void (APIENTRY *FragmentLightModelivSGIX) (GLenum pname, const GLint *params); - void (APIENTRY *FragmentMaterialfSGIX) (GLenum face, GLenum pname, GLfloat param); - void (APIENTRY *FragmentMaterialfvSGIX) (GLenum face, GLenum pname, const GLfloat *params); - void (APIENTRY *FragmentMaterialiSGIX) (GLenum face, GLenum pname, GLint param); - void (APIENTRY *FragmentMaterialivSGIX) (GLenum face, GLenum pname, const GLint *params); - void (APIENTRY *GetFragmentLightfvSGIX) (GLenum light, GLenum pname, GLfloat *params); - void (APIENTRY *GetFragmentLightivSGIX) (GLenum light, GLenum pname, GLint *params); - void (APIENTRY *GetFragmentMaterialfvSGIX) (GLenum face, GLenum pname, GLfloat *params); - void (APIENTRY *GetFragmentMaterialivSGIX) (GLenum face, GLenum pname, GLint *params); - void (APIENTRY *LightEnviSGIX) (GLenum pname, GLint param); - void (APIENTRY *DrawRangeElementsEXT) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices); - void (APIENTRY *ApplyTextureEXT) (GLenum mode); - void (APIENTRY *TextureLightEXT) (GLenum pname); - void (APIENTRY *TextureMaterialEXT) (GLenum face, GLenum mode); - void (APIENTRY *AsyncMarkerSGIX) (GLuint marker); - GLint (APIENTRY *FinishAsyncSGIX) (GLuint *markerp); - GLint (APIENTRY *PollAsyncSGIX) (GLuint *markerp); - GLuint (APIENTRY *GenAsyncMarkersSGIX) (GLsizei range); - void (APIENTRY *DeleteAsyncMarkersSGIX) (GLuint marker, GLsizei range); - GLboolean (APIENTRY *IsAsyncMarkerSGIX) (GLuint marker); - void (APIENTRY *VertexPointervINTEL) (GLint size, GLenum type, const GLvoid* *pointer); - void (APIENTRY *NormalPointervINTEL) (GLenum type, const GLvoid* *pointer); - void (APIENTRY *ColorPointervINTEL) (GLint size, GLenum type, const GLvoid* *pointer); - void (APIENTRY *TexCoordPointervINTEL) (GLint size, GLenum type, const GLvoid* *pointer); - void (APIENTRY *PixelTransformParameteriEXT) (GLenum target, GLenum pname, GLint param); - void (APIENTRY *PixelTransformParameterfEXT) (GLenum target, GLenum pname, GLfloat param); - void (APIENTRY *PixelTransformParameterivEXT) (GLenum target, GLenum pname, const GLint *params); - void (APIENTRY *PixelTransformParameterfvEXT) (GLenum target, GLenum pname, const GLfloat *params); - void (APIENTRY *SecondaryColor3bEXT) (GLbyte red, GLbyte green, GLbyte blue); - void (APIENTRY *SecondaryColor3bvEXT) (const GLbyte *v); - void (APIENTRY *SecondaryColor3dEXT) (GLdouble red, GLdouble green, GLdouble blue); - void (APIENTRY *SecondaryColor3dvEXT) (const GLdouble *v); - void (APIENTRY *SecondaryColor3fEXT) (GLfloat red, GLfloat green, GLfloat blue); - void (APIENTRY *SecondaryColor3fvEXT) (const GLfloat *v); - void (APIENTRY *SecondaryColor3iEXT) (GLint red, GLint green, GLint blue); - void (APIENTRY *SecondaryColor3ivEXT) (const GLint *v); - void (APIENTRY *SecondaryColor3sEXT) (GLshort red, GLshort green, GLshort blue); - void (APIENTRY *SecondaryColor3svEXT) (const GLshort *v); - void (APIENTRY *SecondaryColor3ubEXT) (GLubyte red, GLubyte green, GLubyte blue); - void (APIENTRY *SecondaryColor3ubvEXT) (const GLubyte *v); - void (APIENTRY *SecondaryColor3uiEXT) (GLuint red, GLuint green, GLuint blue); - void (APIENTRY *SecondaryColor3uivEXT) (const GLuint *v); - void (APIENTRY *SecondaryColor3usEXT) (GLushort red, GLushort green, GLushort blue); - void (APIENTRY *SecondaryColor3usvEXT) (const GLushort *v); - void (APIENTRY *SecondaryColorPointerEXT) (GLint size, GLenum type, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *TextureNormalEXT) (GLenum mode); - void (APIENTRY *MultiDrawArraysEXT) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount); - void (APIENTRY *MultiDrawElementsEXT) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid* *indices, GLsizei primcount); - void (APIENTRY *FogCoordfEXT) (GLfloat coord); - void (APIENTRY *FogCoordfvEXT) (const GLfloat *coord); - void (APIENTRY *FogCoorddEXT) (GLdouble coord); - void (APIENTRY *FogCoorddvEXT) (const GLdouble *coord); - void (APIENTRY *FogCoordPointerEXT) (GLenum type, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *Tangent3bEXT) (GLbyte tx, GLbyte ty, GLbyte tz); - void (APIENTRY *Tangent3bvEXT) (const GLbyte *v); - void (APIENTRY *Tangent3dEXT) (GLdouble tx, GLdouble ty, GLdouble tz); - void (APIENTRY *Tangent3dvEXT) (const GLdouble *v); - void (APIENTRY *Tangent3fEXT) (GLfloat tx, GLfloat ty, GLfloat tz); - void (APIENTRY *Tangent3fvEXT) (const GLfloat *v); - void (APIENTRY *Tangent3iEXT) (GLint tx, GLint ty, GLint tz); - void (APIENTRY *Tangent3ivEXT) (const GLint *v); - void (APIENTRY *Tangent3sEXT) (GLshort tx, GLshort ty, GLshort tz); - void (APIENTRY *Tangent3svEXT) (const GLshort *v); - void (APIENTRY *Binormal3bEXT) (GLbyte bx, GLbyte by, GLbyte bz); - void (APIENTRY *Binormal3bvEXT) (const GLbyte *v); - void (APIENTRY *Binormal3dEXT) (GLdouble bx, GLdouble by, GLdouble bz); - void (APIENTRY *Binormal3dvEXT) (const GLdouble *v); - void (APIENTRY *Binormal3fEXT) (GLfloat bx, GLfloat by, GLfloat bz); - void (APIENTRY *Binormal3fvEXT) (const GLfloat *v); - void (APIENTRY *Binormal3iEXT) (GLint bx, GLint by, GLint bz); - void (APIENTRY *Binormal3ivEXT) (const GLint *v); - void (APIENTRY *Binormal3sEXT) (GLshort bx, GLshort by, GLshort bz); - void (APIENTRY *Binormal3svEXT) (const GLshort *v); - void (APIENTRY *TangentPointerEXT) (GLenum type, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *BinormalPointerEXT) (GLenum type, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *FinishTextureSUNX) (void); - void (APIENTRY *GlobalAlphaFactorbSUN) (GLbyte factor); - void (APIENTRY *GlobalAlphaFactorsSUN) (GLshort factor); - void (APIENTRY *GlobalAlphaFactoriSUN) (GLint factor); - void (APIENTRY *GlobalAlphaFactorfSUN) (GLfloat factor); - void (APIENTRY *GlobalAlphaFactordSUN) (GLdouble factor); - void (APIENTRY *GlobalAlphaFactorubSUN) (GLubyte factor); - void (APIENTRY *GlobalAlphaFactorusSUN) (GLushort factor); - void (APIENTRY *GlobalAlphaFactoruiSUN) (GLuint factor); - void (APIENTRY *ReplacementCodeuiSUN) (GLuint code); - void (APIENTRY *ReplacementCodeusSUN) (GLushort code); - void (APIENTRY *ReplacementCodeubSUN) (GLubyte code); - void (APIENTRY *ReplacementCodeuivSUN) (const GLuint *code); - void (APIENTRY *ReplacementCodeusvSUN) (const GLushort *code); - void (APIENTRY *ReplacementCodeubvSUN) (const GLubyte *code); - void (APIENTRY *ReplacementCodePointerSUN) (GLenum type, GLsizei stride, const GLvoid* *pointer); - void (APIENTRY *Color4ubVertex2fSUN) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y); - void (APIENTRY *Color4ubVertex2fvSUN) (const GLubyte *c, const GLfloat *v); - void (APIENTRY *Color4ubVertex3fSUN) (GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *Color4ubVertex3fvSUN) (const GLubyte *c, const GLfloat *v); - void (APIENTRY *Color3fVertex3fSUN) (GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *Color3fVertex3fvSUN) (const GLfloat *c, const GLfloat *v); - void (APIENTRY *Normal3fVertex3fSUN) (GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *Normal3fVertex3fvSUN) (const GLfloat *n, const GLfloat *v); - void (APIENTRY *Color4fNormal3fVertex3fSUN) (GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *Color4fNormal3fVertex3fvSUN) (const GLfloat *c, const GLfloat *n, const GLfloat *v); - void (APIENTRY *TexCoord2fVertex3fSUN) (GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *TexCoord2fVertex3fvSUN) (const GLfloat *tc, const GLfloat *v); - void (APIENTRY *TexCoord4fVertex4fSUN) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void (APIENTRY *TexCoord4fVertex4fvSUN) (const GLfloat *tc, const GLfloat *v); - void (APIENTRY *TexCoord2fColor4ubVertex3fSUN) (GLfloat s, GLfloat t, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *TexCoord2fColor4ubVertex3fvSUN) (const GLfloat *tc, const GLubyte *c, const GLfloat *v); - void (APIENTRY *TexCoord2fColor3fVertex3fSUN) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *TexCoord2fColor3fVertex3fvSUN) (const GLfloat *tc, const GLfloat *c, const GLfloat *v); - void (APIENTRY *TexCoord2fNormal3fVertex3fSUN) (GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *TexCoord2fNormal3fVertex3fvSUN) (const GLfloat *tc, const GLfloat *n, const GLfloat *v); - void (APIENTRY *TexCoord2fColor4fNormal3fVertex3fSUN) (GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *TexCoord2fColor4fNormal3fVertex3fvSUN) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); - void (APIENTRY *TexCoord4fColor4fNormal3fVertex4fSUN) (GLfloat s, GLfloat t, GLfloat p, GLfloat q, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void (APIENTRY *TexCoord4fColor4fNormal3fVertex4fvSUN) (const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); - void (APIENTRY *ReplacementCodeuiVertex3fSUN) (GLuint rc, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *ReplacementCodeuiVertex3fvSUN) (const GLuint *rc, const GLfloat *v); - void (APIENTRY *ReplacementCodeuiColor4ubVertex3fSUN) (GLuint rc, GLubyte r, GLubyte g, GLubyte b, GLubyte a, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *ReplacementCodeuiColor4ubVertex3fvSUN) (const GLuint *rc, const GLubyte *c, const GLfloat *v); - void (APIENTRY *ReplacementCodeuiColor3fVertex3fSUN) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *ReplacementCodeuiColor3fVertex3fvSUN) (const GLuint *rc, const GLfloat *c, const GLfloat *v); - void (APIENTRY *ReplacementCodeuiNormal3fVertex3fSUN) (GLuint rc, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *ReplacementCodeuiNormal3fVertex3fvSUN) (const GLuint *rc, const GLfloat *n, const GLfloat *v); - void (APIENTRY *ReplacementCodeuiColor4fNormal3fVertex3fSUN) (GLuint rc, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *ReplacementCodeuiColor4fNormal3fVertex3fvSUN) (const GLuint *rc, const GLfloat *c, const GLfloat *n, const GLfloat *v); - void (APIENTRY *ReplacementCodeuiTexCoord2fVertex3fSUN) (GLuint rc, GLfloat s, GLfloat t, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *ReplacementCodeuiTexCoord2fVertex3fvSUN) (const GLuint *rc, const GLfloat *tc, const GLfloat *v); - void (APIENTRY *ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN) (GLuint rc, GLfloat s, GLfloat t, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN) (const GLuint *rc, const GLfloat *tc, const GLfloat *n, const GLfloat *v); - void (APIENTRY *ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN) (GLuint rc, GLfloat s, GLfloat t, GLfloat r, GLfloat g, GLfloat b, GLfloat a, GLfloat nx, GLfloat ny, GLfloat nz, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN) (const GLuint *rc, const GLfloat *tc, const GLfloat *c, const GLfloat *n, const GLfloat *v); - void (APIENTRY *BlendFuncSeparateEXT) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); - void (APIENTRY *BlendFuncSeparateINGR) (GLenum sfactorRGB, GLenum dfactorRGB, GLenum sfactorAlpha, GLenum dfactorAlpha); - void (APIENTRY *VertexWeightfEXT) (GLfloat weight); - void (APIENTRY *VertexWeightfvEXT) (const GLfloat *weight); - void (APIENTRY *VertexWeightPointerEXT) (GLsizei size, GLenum type, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *FlushVertexArrayRangeNV) (void); - void (APIENTRY *VertexArrayRangeNV) (GLsizei length, const GLvoid *pointer); - void (APIENTRY *CombinerParameterfvNV) (GLenum pname, const GLfloat *params); - void (APIENTRY *CombinerParameterfNV) (GLenum pname, GLfloat param); - void (APIENTRY *CombinerParameterivNV) (GLenum pname, const GLint *params); - void (APIENTRY *CombinerParameteriNV) (GLenum pname, GLint param); - void (APIENTRY *CombinerInputNV) (GLenum stage, GLenum portion, GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); - void (APIENTRY *CombinerOutputNV) (GLenum stage, GLenum portion, GLenum abOutput, GLenum cdOutput, GLenum sumOutput, GLenum scale, GLenum bias, GLboolean abDotProduct, GLboolean cdDotProduct, GLboolean muxSum); - void (APIENTRY *FinalCombinerInputNV) (GLenum variable, GLenum input, GLenum mapping, GLenum componentUsage); - void (APIENTRY *GetCombinerInputParameterfvNV) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLfloat *params); - void (APIENTRY *GetCombinerInputParameterivNV) (GLenum stage, GLenum portion, GLenum variable, GLenum pname, GLint *params); - void (APIENTRY *GetCombinerOutputParameterfvNV) (GLenum stage, GLenum portion, GLenum pname, GLfloat *params); - void (APIENTRY *GetCombinerOutputParameterivNV) (GLenum stage, GLenum portion, GLenum pname, GLint *params); - void (APIENTRY *GetFinalCombinerInputParameterfvNV) (GLenum variable, GLenum pname, GLfloat *params); - void (APIENTRY *GetFinalCombinerInputParameterivNV) (GLenum variable, GLenum pname, GLint *params); - void (APIENTRY *ResizeBuffersMESA) (void); - void (APIENTRY *WindowPos2dMESA) (GLdouble x, GLdouble y); - void (APIENTRY *WindowPos2dvMESA) (const GLdouble *v); - void (APIENTRY *WindowPos2fMESA) (GLfloat x, GLfloat y); - void (APIENTRY *WindowPos2fvMESA) (const GLfloat *v); - void (APIENTRY *WindowPos2iMESA) (GLint x, GLint y); - void (APIENTRY *WindowPos2ivMESA) (const GLint *v); - void (APIENTRY *WindowPos2sMESA) (GLshort x, GLshort y); - void (APIENTRY *WindowPos2svMESA) (const GLshort *v); - void (APIENTRY *WindowPos3dMESA) (GLdouble x, GLdouble y, GLdouble z); - void (APIENTRY *WindowPos3dvMESA) (const GLdouble *v); - void (APIENTRY *WindowPos3fMESA) (GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *WindowPos3fvMESA) (const GLfloat *v); - void (APIENTRY *WindowPos3iMESA) (GLint x, GLint y, GLint z); - void (APIENTRY *WindowPos3ivMESA) (const GLint *v); - void (APIENTRY *WindowPos3sMESA) (GLshort x, GLshort y, GLshort z); - void (APIENTRY *WindowPos3svMESA) (const GLshort *v); - void (APIENTRY *WindowPos4dMESA) (GLdouble x, GLdouble y, GLdouble z, GLdouble w); - void (APIENTRY *WindowPos4dvMESA) (const GLdouble *v); - void (APIENTRY *WindowPos4fMESA) (GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void (APIENTRY *WindowPos4fvMESA) (const GLfloat *v); - void (APIENTRY *WindowPos4iMESA) (GLint x, GLint y, GLint z, GLint w); - void (APIENTRY *WindowPos4ivMESA) (const GLint *v); - void (APIENTRY *WindowPos4sMESA) (GLshort x, GLshort y, GLshort z, GLshort w); - void (APIENTRY *WindowPos4svMESA) (const GLshort *v); - void (APIENTRY *MultiModeDrawArraysIBM) (const GLenum *mode, const GLint *first, const GLsizei *count, GLsizei primcount, GLint modestride); - void (APIENTRY *MultiModeDrawElementsIBM) (const GLenum *mode, const GLsizei *count, GLenum type, const GLvoid* const *indices, GLsizei primcount, GLint modestride); - void (APIENTRY *ColorPointerListIBM) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); - void (APIENTRY *SecondaryColorPointerListIBM) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); - void (APIENTRY *EdgeFlagPointerListIBM) (GLint stride, const GLboolean* *pointer, GLint ptrstride); - void (APIENTRY *FogCoordPointerListIBM) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); - void (APIENTRY *IndexPointerListIBM) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); - void (APIENTRY *NormalPointerListIBM) (GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); - void (APIENTRY *TexCoordPointerListIBM) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); - void (APIENTRY *VertexPointerListIBM) (GLint size, GLenum type, GLint stride, const GLvoid* *pointer, GLint ptrstride); - void (APIENTRY *TbufferMask3DFX) (GLuint mask); - void (APIENTRY *SampleMaskEXT) (GLclampf value, GLboolean invert); - void (APIENTRY *SamplePatternEXT) (GLenum pattern); - void (APIENTRY *TextureColorMaskSGIS) (GLboolean red, GLboolean green, GLboolean blue, GLboolean alpha); - void (APIENTRY *IglooInterfaceSGIX) (GLenum pname, const GLvoid *params); - void (APIENTRY *DeleteFencesNV) (GLsizei n, const GLuint *fences); - void (APIENTRY *GenFencesNV) (GLsizei n, GLuint *fences); - GLboolean (APIENTRY *IsFenceNV) (GLuint fence); - GLboolean (APIENTRY *TestFenceNV) (GLuint fence); - void (APIENTRY *GetFenceivNV) (GLuint fence, GLenum pname, GLint *params); - void (APIENTRY *FinishFenceNV) (GLuint fence); - void (APIENTRY *SetFenceNV) (GLuint fence, GLenum condition); - void (APIENTRY *MapControlPointsNV) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLint uorder, GLint vorder, GLboolean packed, const GLvoid *points); - void (APIENTRY *MapParameterivNV) (GLenum target, GLenum pname, const GLint *params); - void (APIENTRY *MapParameterfvNV) (GLenum target, GLenum pname, const GLfloat *params); - void (APIENTRY *GetMapControlPointsNV) (GLenum target, GLuint index, GLenum type, GLsizei ustride, GLsizei vstride, GLboolean packed, GLvoid *points); - void (APIENTRY *GetMapParameterivNV) (GLenum target, GLenum pname, GLint *params); - void (APIENTRY *GetMapParameterfvNV) (GLenum target, GLenum pname, GLfloat *params); - void (APIENTRY *GetMapAttribParameterivNV) (GLenum target, GLuint index, GLenum pname, GLint *params); - void (APIENTRY *GetMapAttribParameterfvNV) (GLenum target, GLuint index, GLenum pname, GLfloat *params); - void (APIENTRY *EvalMapsNV) (GLenum target, GLenum mode); - void (APIENTRY *CombinerStageParameterfvNV) (GLenum stage, GLenum pname, const GLfloat *params); - void (APIENTRY *GetCombinerStageParameterfvNV) (GLenum stage, GLenum pname, GLfloat *params); - GLboolean (APIENTRY *AreProgramsResidentNV) (GLsizei n, const GLuint *programs, GLboolean *residences); - void (APIENTRY *BindProgramNV) (GLenum target, GLuint id); - void (APIENTRY *DeleteProgramsNV) (GLsizei n, const GLuint *programs); - void (APIENTRY *ExecuteProgramNV) (GLenum target, GLuint id, const GLfloat *params); - void (APIENTRY *GenProgramsNV) (GLsizei n, GLuint *programs); - void (APIENTRY *GetProgramParameterdvNV) (GLenum target, GLuint index, GLenum pname, GLdouble *params); - void (APIENTRY *GetProgramParameterfvNV) (GLenum target, GLuint index, GLenum pname, GLfloat *params); - void (APIENTRY *GetProgramivNV) (GLuint id, GLenum pname, GLint *params); - void (APIENTRY *GetProgramStringNV) (GLuint id, GLenum pname, GLubyte *program); - void (APIENTRY *GetTrackMatrixivNV) (GLenum target, GLuint address, GLenum pname, GLint *params); - void (APIENTRY *GetVertexAttribdvNV) (GLuint index, GLenum pname, GLdouble *params); - void (APIENTRY *GetVertexAttribfvNV) (GLuint index, GLenum pname, GLfloat *params); - void (APIENTRY *GetVertexAttribivNV) (GLuint index, GLenum pname, GLint *params); - void (APIENTRY *GetVertexAttribPointervNV) (GLuint index, GLenum pname, GLvoid* *pointer); - GLboolean (APIENTRY *IsProgramNV) (GLuint id); - void (APIENTRY *LoadProgramNV) (GLenum target, GLuint id, GLsizei len, const GLubyte *program); - void (APIENTRY *ProgramParameter4dNV) (GLenum target, GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); - void (APIENTRY *ProgramParameter4dvNV) (GLenum target, GLuint index, const GLdouble *v); - void (APIENTRY *ProgramParameter4fNV) (GLenum target, GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void (APIENTRY *ProgramParameter4fvNV) (GLenum target, GLuint index, const GLfloat *v); - void (APIENTRY *ProgramParameters4dvNV) (GLenum target, GLuint index, GLuint count, const GLdouble *v); - void (APIENTRY *ProgramParameters4fvNV) (GLenum target, GLuint index, GLuint count, const GLfloat *v); - void (APIENTRY *RequestResidentProgramsNV) (GLsizei n, const GLuint *programs); - void (APIENTRY *TrackMatrixNV) (GLenum target, GLuint address, GLenum matrix, GLenum transform); - void (APIENTRY *VertexAttribPointerNV) (GLuint index, GLint fsize, GLenum type, GLsizei stride, const GLvoid *pointer); - void (APIENTRY *VertexAttrib1dNV) (GLuint index, GLdouble x); - void (APIENTRY *VertexAttrib1dvNV) (GLuint index, const GLdouble *v); - void (APIENTRY *VertexAttrib1fNV) (GLuint index, GLfloat x); - void (APIENTRY *VertexAttrib1fvNV) (GLuint index, const GLfloat *v); - void (APIENTRY *VertexAttrib1sNV) (GLuint index, GLshort x); - void (APIENTRY *VertexAttrib1svNV) (GLuint index, const GLshort *v); - void (APIENTRY *VertexAttrib2dNV) (GLuint index, GLdouble x, GLdouble y); - void (APIENTRY *VertexAttrib2dvNV) (GLuint index, const GLdouble *v); - void (APIENTRY *VertexAttrib2fNV) (GLuint index, GLfloat x, GLfloat y); - void (APIENTRY *VertexAttrib2fvNV) (GLuint index, const GLfloat *v); - void (APIENTRY *VertexAttrib2sNV) (GLuint index, GLshort x, GLshort y); - void (APIENTRY *VertexAttrib2svNV) (GLuint index, const GLshort *v); - void (APIENTRY *VertexAttrib3dNV) (GLuint index, GLdouble x, GLdouble y, GLdouble z); - void (APIENTRY *VertexAttrib3dvNV) (GLuint index, const GLdouble *v); - void (APIENTRY *VertexAttrib3fNV) (GLuint index, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *VertexAttrib3fvNV) (GLuint index, const GLfloat *v); - void (APIENTRY *VertexAttrib3sNV) (GLuint index, GLshort x, GLshort y, GLshort z); - void (APIENTRY *VertexAttrib3svNV) (GLuint index, const GLshort *v); - void (APIENTRY *VertexAttrib4dNV) (GLuint index, GLdouble x, GLdouble y, GLdouble z, GLdouble w); - void (APIENTRY *VertexAttrib4dvNV) (GLuint index, const GLdouble *v); - void (APIENTRY *VertexAttrib4fNV) (GLuint index, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void (APIENTRY *VertexAttrib4fvNV) (GLuint index, const GLfloat *v); - void (APIENTRY *VertexAttrib4sNV) (GLuint index, GLshort x, GLshort y, GLshort z, GLshort w); - void (APIENTRY *VertexAttrib4svNV) (GLuint index, const GLshort *v); - void (APIENTRY *VertexAttrib4ubNV) (GLuint index, GLubyte x, GLubyte y, GLubyte z, GLubyte w); - void (APIENTRY *VertexAttrib4ubvNV) (GLuint index, const GLubyte *v); - void (APIENTRY *VertexAttribs1dvNV) (GLuint index, GLsizei count, const GLdouble *v); - void (APIENTRY *VertexAttribs1fvNV) (GLuint index, GLsizei count, const GLfloat *v); - void (APIENTRY *VertexAttribs1svNV) (GLuint index, GLsizei count, const GLshort *v); - void (APIENTRY *VertexAttribs2dvNV) (GLuint index, GLsizei count, const GLdouble *v); - void (APIENTRY *VertexAttribs2fvNV) (GLuint index, GLsizei count, const GLfloat *v); - void (APIENTRY *VertexAttribs2svNV) (GLuint index, GLsizei count, const GLshort *v); - void (APIENTRY *VertexAttribs3dvNV) (GLuint index, GLsizei count, const GLdouble *v); - void (APIENTRY *VertexAttribs3fvNV) (GLuint index, GLsizei count, const GLfloat *v); - void (APIENTRY *VertexAttribs3svNV) (GLuint index, GLsizei count, const GLshort *v); - void (APIENTRY *VertexAttribs4dvNV) (GLuint index, GLsizei count, const GLdouble *v); - void (APIENTRY *VertexAttribs4fvNV) (GLuint index, GLsizei count, const GLfloat *v); - void (APIENTRY *VertexAttribs4svNV) (GLuint index, GLsizei count, const GLshort *v); - void (APIENTRY *VertexAttribs4ubvNV) (GLuint index, GLsizei count, const GLubyte *v); - void (APIENTRY *TexBumpParameterivATI) (GLenum pname, const GLint *param); - void (APIENTRY *TexBumpParameterfvATI) (GLenum pname, const GLfloat *param); - void (APIENTRY *GetTexBumpParameterivATI) (GLenum pname, GLint *param); - void (APIENTRY *GetTexBumpParameterfvATI) (GLenum pname, GLfloat *param); - GLuint (APIENTRY *GenFragmentShadersATI) (GLuint range); - void (APIENTRY *BindFragmentShaderATI) (GLuint id); - void (APIENTRY *DeleteFragmentShaderATI) (GLuint id); - void (APIENTRY *BeginFragmentShaderATI) (void); - void (APIENTRY *EndFragmentShaderATI) (void); - void (APIENTRY *PassTexCoordATI) (GLuint dst, GLuint coord, GLenum swizzle); - void (APIENTRY *SampleMapATI) (GLuint dst, GLuint interp, GLenum swizzle); - void (APIENTRY *ColorFragmentOp1ATI) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); - void (APIENTRY *ColorFragmentOp2ATI) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); - void (APIENTRY *ColorFragmentOp3ATI) (GLenum op, GLuint dst, GLuint dstMask, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); - void (APIENTRY *AlphaFragmentOp1ATI) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod); - void (APIENTRY *AlphaFragmentOp2ATI) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod); - void (APIENTRY *AlphaFragmentOp3ATI) (GLenum op, GLuint dst, GLuint dstMod, GLuint arg1, GLuint arg1Rep, GLuint arg1Mod, GLuint arg2, GLuint arg2Rep, GLuint arg2Mod, GLuint arg3, GLuint arg3Rep, GLuint arg3Mod); - void (APIENTRY *SetFragmentShaderConstantATI) (GLuint dst, const GLfloat *value); - void (APIENTRY *PNTrianglesiATI) (GLenum pname, GLint param); - void (APIENTRY *PNTrianglesfATI) (GLenum pname, GLfloat param); - GLuint (APIENTRY *NewObjectBufferATI) (GLsizei size, const GLvoid *pointer, GLenum usage); - GLboolean (APIENTRY *IsObjectBufferATI) (GLuint buffer); - void (APIENTRY *UpdateObjectBufferATI) (GLuint buffer, GLuint offset, GLsizei size, const GLvoid *pointer, GLenum preserve); - void (APIENTRY *GetObjectBufferfvATI) (GLuint buffer, GLenum pname, GLfloat *params); - void (APIENTRY *GetObjectBufferivATI) (GLuint buffer, GLenum pname, GLint *params); - void (APIENTRY *FreeObjectBufferATI) (GLuint buffer); - void (APIENTRY *ArrayObjectATI) (GLenum array, GLint size, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); - void (APIENTRY *GetArrayObjectfvATI) (GLenum array, GLenum pname, GLfloat *params); - void (APIENTRY *GetArrayObjectivATI) (GLenum array, GLenum pname, GLint *params); - void (APIENTRY *VariantArrayObjectATI) (GLuint id, GLenum type, GLsizei stride, GLuint buffer, GLuint offset); - void (APIENTRY *GetVariantArrayObjectfvATI) (GLuint id, GLenum pname, GLfloat *params); - void (APIENTRY *GetVariantArrayObjectivATI) (GLuint id, GLenum pname, GLint *params); - void (APIENTRY *BeginVertexShaderEXT) (void); - void (APIENTRY *EndVertexShaderEXT) (void); - void (APIENTRY *BindVertexShaderEXT) (GLuint id); - GLuint (APIENTRY *GenVertexShadersEXT) (GLuint range); - void (APIENTRY *DeleteVertexShaderEXT) (GLuint id); - void (APIENTRY *ShaderOp1EXT) (GLenum op, GLuint res, GLuint arg1); - void (APIENTRY *ShaderOp2EXT) (GLenum op, GLuint res, GLuint arg1, GLuint arg2); - void (APIENTRY *ShaderOp3EXT) (GLenum op, GLuint res, GLuint arg1, GLuint arg2, GLuint arg3); - void (APIENTRY *SwizzleEXT) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); - void (APIENTRY *WriteMaskEXT) (GLuint res, GLuint in, GLenum outX, GLenum outY, GLenum outZ, GLenum outW); - void (APIENTRY *InsertComponentEXT) (GLuint res, GLuint src, GLuint num); - void (APIENTRY *ExtractComponentEXT) (GLuint res, GLuint src, GLuint num); - GLuint (APIENTRY *GenSymbolsEXT) (GLenum datatype, GLenum storagetype, GLenum range, GLuint components); - void (APIENTRY *SetInvariantEXT) (GLuint id, GLenum type, const GLvoid *addr); - void (APIENTRY *SetLocalConstantEXT) (GLuint id, GLenum type, const GLvoid *addr); - void (APIENTRY *VariantbvEXT) (GLuint id, const GLbyte *addr); - void (APIENTRY *VariantsvEXT) (GLuint id, const GLshort *addr); - void (APIENTRY *VariantivEXT) (GLuint id, const GLint *addr); - void (APIENTRY *VariantfvEXT) (GLuint id, const GLfloat *addr); - void (APIENTRY *VariantdvEXT) (GLuint id, const GLdouble *addr); - void (APIENTRY *VariantubvEXT) (GLuint id, const GLubyte *addr); - void (APIENTRY *VariantusvEXT) (GLuint id, const GLushort *addr); - void (APIENTRY *VariantuivEXT) (GLuint id, const GLuint *addr); - void (APIENTRY *VariantPointerEXT) (GLuint id, GLenum type, GLuint stride, const GLvoid *addr); - void (APIENTRY *EnableVariantClientStateEXT) (GLuint id); - void (APIENTRY *DisableVariantClientStateEXT) (GLuint id); - GLuint (APIENTRY *BindLightParameterEXT) (GLenum light, GLenum value); - GLuint (APIENTRY *BindMaterialParameterEXT) (GLenum face, GLenum value); - GLuint (APIENTRY *BindTexGenParameterEXT) (GLenum unit, GLenum coord, GLenum value); - GLuint (APIENTRY *BindTextureUnitParameterEXT) (GLenum unit, GLenum value); - GLuint (APIENTRY *BindParameterEXT) (GLenum value); - GLboolean (APIENTRY *IsVariantEnabledEXT) (GLuint id, GLenum cap); - void (APIENTRY *GetVariantBooleanvEXT) (GLuint id, GLenum value, GLboolean *data); - void (APIENTRY *GetVariantIntegervEXT) (GLuint id, GLenum value, GLint *data); - void (APIENTRY *GetVariantFloatvEXT) (GLuint id, GLenum value, GLfloat *data); - void (APIENTRY *GetVariantPointervEXT) (GLuint id, GLenum value, GLvoid* *data); - void (APIENTRY *GetInvariantBooleanvEXT) (GLuint id, GLenum value, GLboolean *data); - void (APIENTRY *GetInvariantIntegervEXT) (GLuint id, GLenum value, GLint *data); - void (APIENTRY *GetInvariantFloatvEXT) (GLuint id, GLenum value, GLfloat *data); - void (APIENTRY *GetLocalConstantBooleanvEXT) (GLuint id, GLenum value, GLboolean *data); - void (APIENTRY *GetLocalConstantIntegervEXT) (GLuint id, GLenum value, GLint *data); - void (APIENTRY *GetLocalConstantFloatvEXT) (GLuint id, GLenum value, GLfloat *data); - void (APIENTRY *VertexStream1sATI) (GLenum stream, GLshort x); - void (APIENTRY *VertexStream1svATI) (GLenum stream, const GLshort *coords); - void (APIENTRY *VertexStream1iATI) (GLenum stream, GLint x); - void (APIENTRY *VertexStream1ivATI) (GLenum stream, const GLint *coords); - void (APIENTRY *VertexStream1fATI) (GLenum stream, GLfloat x); - void (APIENTRY *VertexStream1fvATI) (GLenum stream, const GLfloat *coords); - void (APIENTRY *VertexStream1dATI) (GLenum stream, GLdouble x); - void (APIENTRY *VertexStream1dvATI) (GLenum stream, const GLdouble *coords); - void (APIENTRY *VertexStream2sATI) (GLenum stream, GLshort x, GLshort y); - void (APIENTRY *VertexStream2svATI) (GLenum stream, const GLshort *coords); - void (APIENTRY *VertexStream2iATI) (GLenum stream, GLint x, GLint y); - void (APIENTRY *VertexStream2ivATI) (GLenum stream, const GLint *coords); - void (APIENTRY *VertexStream2fATI) (GLenum stream, GLfloat x, GLfloat y); - void (APIENTRY *VertexStream2fvATI) (GLenum stream, const GLfloat *coords); - void (APIENTRY *VertexStream2dATI) (GLenum stream, GLdouble x, GLdouble y); - void (APIENTRY *VertexStream2dvATI) (GLenum stream, const GLdouble *coords); - void (APIENTRY *VertexStream3sATI) (GLenum stream, GLshort x, GLshort y, GLshort z); - void (APIENTRY *VertexStream3svATI) (GLenum stream, const GLshort *coords); - void (APIENTRY *VertexStream3iATI) (GLenum stream, GLint x, GLint y, GLint z); - void (APIENTRY *VertexStream3ivATI) (GLenum stream, const GLint *coords); - void (APIENTRY *VertexStream3fATI) (GLenum stream, GLfloat x, GLfloat y, GLfloat z); - void (APIENTRY *VertexStream3fvATI) (GLenum stream, const GLfloat *coords); - void (APIENTRY *VertexStream3dATI) (GLenum stream, GLdouble x, GLdouble y, GLdouble z); - void (APIENTRY *VertexStream3dvATI) (GLenum stream, const GLdouble *coords); - void (APIENTRY *VertexStream4sATI) (GLenum stream, GLshort x, GLshort y, GLshort z, GLshort w); - void (APIENTRY *VertexStream4svATI) (GLenum stream, const GLshort *coords); - void (APIENTRY *VertexStream4iATI) (GLenum stream, GLint x, GLint y, GLint z, GLint w); - void (APIENTRY *VertexStream4ivATI) (GLenum stream, const GLint *coords); - void (APIENTRY *VertexStream4fATI) (GLenum stream, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void (APIENTRY *VertexStream4fvATI) (GLenum stream, const GLfloat *coords); - void (APIENTRY *VertexStream4dATI) (GLenum stream, GLdouble x, GLdouble y, GLdouble z, GLdouble w); - void (APIENTRY *VertexStream4dvATI) (GLenum stream, const GLdouble *coords); - void (APIENTRY *NormalStream3bATI) (GLenum stream, GLbyte nx, GLbyte ny, GLbyte nz); - void (APIENTRY *NormalStream3bvATI) (GLenum stream, const GLbyte *coords); - void (APIENTRY *NormalStream3sATI) (GLenum stream, GLshort nx, GLshort ny, GLshort nz); - void (APIENTRY *NormalStream3svATI) (GLenum stream, const GLshort *coords); - void (APIENTRY *NormalStream3iATI) (GLenum stream, GLint nx, GLint ny, GLint nz); - void (APIENTRY *NormalStream3ivATI) (GLenum stream, const GLint *coords); - void (APIENTRY *NormalStream3fATI) (GLenum stream, GLfloat nx, GLfloat ny, GLfloat nz); - void (APIENTRY *NormalStream3fvATI) (GLenum stream, const GLfloat *coords); - void (APIENTRY *NormalStream3dATI) (GLenum stream, GLdouble nx, GLdouble ny, GLdouble nz); - void (APIENTRY *NormalStream3dvATI) (GLenum stream, const GLdouble *coords); - void (APIENTRY *ClientActiveVertexStreamATI) (GLenum stream); - void (APIENTRY *VertexBlendEnviATI) (GLenum pname, GLint param); - void (APIENTRY *VertexBlendEnvfATI) (GLenum pname, GLfloat param); - void (APIENTRY *ElementPointerATI) (GLenum type, const GLvoid *pointer); - void (APIENTRY *DrawElementArrayATI) (GLenum mode, GLsizei count); - void (APIENTRY *DrawRangeElementArrayATI) (GLenum mode, GLuint start, GLuint end, GLsizei count); - void (APIENTRY *DrawMeshArraysSUN) (GLenum mode, GLint first, GLsizei count, GLsizei width); - void (APIENTRY *GenOcclusionQueriesNV) (GLsizei n, GLuint *ids); - void (APIENTRY *DeleteOcclusionQueriesNV) (GLsizei n, const GLuint *ids); - GLboolean (APIENTRY *IsOcclusionQueryNV) (GLuint id); - void (APIENTRY *BeginOcclusionQueryNV) (GLuint id); - void (APIENTRY *EndOcclusionQueryNV) (void); - void (APIENTRY *GetOcclusionQueryivNV) (GLuint id, GLenum pname, GLint *params); - void (APIENTRY *GetOcclusionQueryuivNV) (GLuint id, GLenum pname, GLuint *params); - void (APIENTRY *PointParameteriNV) (GLenum pname, GLint param); - void (APIENTRY *PointParameterivNV) (GLenum pname, const GLint *params); - void (APIENTRY *ActiveStencilFaceEXT) (GLenum face); - void (APIENTRY *ElementPointerAPPLE) (GLenum type, const GLvoid *pointer); - void (APIENTRY *DrawElementArrayAPPLE) (GLenum mode, GLint first, GLsizei count); - void (APIENTRY *DrawRangeElementArrayAPPLE) (GLenum mode, GLuint start, GLuint end, GLint first, GLsizei count); - void (APIENTRY *MultiDrawElementArrayAPPLE) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount); - void (APIENTRY *MultiDrawRangeElementArrayAPPLE) (GLenum mode, GLuint start, GLuint end, const GLint *first, const GLsizei *count, GLsizei primcount); - void (APIENTRY *GenFencesAPPLE) (GLsizei n, GLuint *fences); - void (APIENTRY *DeleteFencesAPPLE) (GLsizei n, const GLuint *fences); - void (APIENTRY *SetFenceAPPLE) (GLuint fence); - GLboolean (APIENTRY *IsFenceAPPLE) (GLuint fence); - GLboolean (APIENTRY *TestFenceAPPLE) (GLuint fence); - void (APIENTRY *FinishFenceAPPLE) (GLuint fence); - GLboolean (APIENTRY *TestObjectAPPLE) (GLenum object, GLuint name); - void (APIENTRY *FinishObjectAPPLE) (GLenum object, GLint name); - void (APIENTRY *BindVertexArrayAPPLE) (GLuint array); - void (APIENTRY *DeleteVertexArraysAPPLE) (GLsizei n, const GLuint *arrays); - void (APIENTRY *GenVertexArraysAPPLE) (GLsizei n, const GLuint *arrays); - GLboolean (APIENTRY *IsVertexArrayAPPLE) (GLuint array); - void (APIENTRY *VertexArrayRangeAPPLE) (GLsizei length, GLvoid *pointer); - void (APIENTRY *FlushVertexArrayRangeAPPLE) (GLsizei length, GLvoid *pointer); - void (APIENTRY *VertexArrayParameteriAPPLE) (GLenum pname, GLint param); - void (APIENTRY *DrawBuffersATI) (GLsizei n, const GLenum *bufs); - void (APIENTRY *ProgramNamedParameter4fNV) (GLuint id, GLsizei len, const GLubyte *name, GLfloat x, GLfloat y, GLfloat z, GLfloat w); - void (APIENTRY *ProgramNamedParameter4dNV) (GLuint id, GLsizei len, const GLubyte *name, GLdouble x, GLdouble y, GLdouble z, GLdouble w); - void (APIENTRY *ProgramNamedParameter4fvNV) (GLuint id, GLsizei len, const GLubyte *name, const GLfloat *v); - void (APIENTRY *ProgramNamedParameter4dvNV) (GLuint id, GLsizei len, const GLubyte *name, const GLdouble *v); - void (APIENTRY *GetProgramNamedParameterfvNV) (GLuint id, GLsizei len, const GLubyte *name, GLfloat *params); - void (APIENTRY *GetProgramNamedParameterdvNV) (GLuint id, GLsizei len, const GLubyte *name, GLdouble *params); - void (APIENTRY *Vertex2hNV) (GLhalfNV x, GLhalfNV y); - void (APIENTRY *Vertex2hvNV) (const GLhalfNV *v); - void (APIENTRY *Vertex3hNV) (GLhalfNV x, GLhalfNV y, GLhalfNV z); - void (APIENTRY *Vertex3hvNV) (const GLhalfNV *v); - void (APIENTRY *Vertex4hNV) (GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); - void (APIENTRY *Vertex4hvNV) (const GLhalfNV *v); - void (APIENTRY *Normal3hNV) (GLhalfNV nx, GLhalfNV ny, GLhalfNV nz); - void (APIENTRY *Normal3hvNV) (const GLhalfNV *v); - void (APIENTRY *Color3hNV) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); - void (APIENTRY *Color3hvNV) (const GLhalfNV *v); - void (APIENTRY *Color4hNV) (GLhalfNV red, GLhalfNV green, GLhalfNV blue, GLhalfNV alpha); - void (APIENTRY *Color4hvNV) (const GLhalfNV *v); - void (APIENTRY *TexCoord1hNV) (GLhalfNV s); - void (APIENTRY *TexCoord1hvNV) (const GLhalfNV *v); - void (APIENTRY *TexCoord2hNV) (GLhalfNV s, GLhalfNV t); - void (APIENTRY *TexCoord2hvNV) (const GLhalfNV *v); - void (APIENTRY *TexCoord3hNV) (GLhalfNV s, GLhalfNV t, GLhalfNV r); - void (APIENTRY *TexCoord3hvNV) (const GLhalfNV *v); - void (APIENTRY *TexCoord4hNV) (GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); - void (APIENTRY *TexCoord4hvNV) (const GLhalfNV *v); - void (APIENTRY *MultiTexCoord1hNV) (GLenum target, GLhalfNV s); - void (APIENTRY *MultiTexCoord1hvNV) (GLenum target, const GLhalfNV *v); - void (APIENTRY *MultiTexCoord2hNV) (GLenum target, GLhalfNV s, GLhalfNV t); - void (APIENTRY *MultiTexCoord2hvNV) (GLenum target, const GLhalfNV *v); - void (APIENTRY *MultiTexCoord3hNV) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r); - void (APIENTRY *MultiTexCoord3hvNV) (GLenum target, const GLhalfNV *v); - void (APIENTRY *MultiTexCoord4hNV) (GLenum target, GLhalfNV s, GLhalfNV t, GLhalfNV r, GLhalfNV q); - void (APIENTRY *MultiTexCoord4hvNV) (GLenum target, const GLhalfNV *v); - void (APIENTRY *FogCoordhNV) (GLhalfNV fog); - void (APIENTRY *FogCoordhvNV) (const GLhalfNV *fog); - void (APIENTRY *SecondaryColor3hNV) (GLhalfNV red, GLhalfNV green, GLhalfNV blue); - void (APIENTRY *SecondaryColor3hvNV) (const GLhalfNV *v); - void (APIENTRY *VertexWeighthNV) (GLhalfNV weight); - void (APIENTRY *VertexWeighthvNV) (const GLhalfNV *weight); - void (APIENTRY *VertexAttrib1hNV) (GLuint index, GLhalfNV x); - void (APIENTRY *VertexAttrib1hvNV) (GLuint index, const GLhalfNV *v); - void (APIENTRY *VertexAttrib2hNV) (GLuint index, GLhalfNV x, GLhalfNV y); - void (APIENTRY *VertexAttrib2hvNV) (GLuint index, const GLhalfNV *v); - void (APIENTRY *VertexAttrib3hNV) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z); - void (APIENTRY *VertexAttrib3hvNV) (GLuint index, const GLhalfNV *v); - void (APIENTRY *VertexAttrib4hNV) (GLuint index, GLhalfNV x, GLhalfNV y, GLhalfNV z, GLhalfNV w); - void (APIENTRY *VertexAttrib4hvNV) (GLuint index, const GLhalfNV *v); - void (APIENTRY *VertexAttribs1hvNV) (GLuint index, GLsizei n, const GLhalfNV *v); - void (APIENTRY *VertexAttribs2hvNV) (GLuint index, GLsizei n, const GLhalfNV *v); - void (APIENTRY *VertexAttribs3hvNV) (GLuint index, GLsizei n, const GLhalfNV *v); - void (APIENTRY *VertexAttribs4hvNV) (GLuint index, GLsizei n, const GLhalfNV *v); - void (APIENTRY *PixelDataRangeNV) (GLenum target, GLsizei length, GLvoid *pointer); - void (APIENTRY *FlushPixelDataRangeNV) (GLenum target); - void (APIENTRY *PrimitiveRestartNV) (void); - void (APIENTRY *PrimitiveRestartIndexNV) (GLuint index); - GLvoid* (APIENTRY *MapObjectBufferATI) (GLuint buffer); - void (APIENTRY *UnmapObjectBufferATI) (GLuint buffer); - void (APIENTRY *StencilOpSeparateATI) (GLenum face, GLenum sfail, GLenum dpfail, GLenum dppass); - void (APIENTRY *StencilFuncSeparateATI) (GLenum frontfunc, GLenum backfunc, GLint ref, GLuint mask); - void (APIENTRY *VertexAttribArrayObjectATI) (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, GLuint buffer, GLuint offset); - void (APIENTRY *GetVertexAttribArrayObjectfvATI) (GLuint index, GLenum pname, GLfloat *params); - void (APIENTRY *GetVertexAttribArrayObjectivATI) (GLuint index, GLenum pname, GLint *params); - void (APIENTRY *DepthBoundsEXT) (GLclampd zmin, GLclampd zmax); - void (APIENTRY *BlendEquationSeparateEXT) (GLenum modeRGB, GLenum modeAlpha); - void (APIENTRY *AddSwapHintRectWIN) (GLint x, GLint y, GLsizei width, GLsizei height); -#ifdef _WIN32 - HANDLE (WINAPI *CreateBufferRegionARB) (HDC hDC, int iLayerPlane, UINT uType); - VOID (WINAPI *DeleteBufferRegionARB) (HANDLE hRegion); - BOOL (WINAPI *SaveBufferRegionARB) (HANDLE hRegion, int x, int y, int width, int height); - BOOL (WINAPI *RestoreBufferRegionARB) (HANDLE hRegion, int x, int y, int width, int height, int xSrc, int ySrc); - const int (WINAPI *GetExtensionsStringARB) (HDC hdc); - BOOL (WINAPI *GetPixelFormatAttribivARB) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, int *piValues); - BOOL (WINAPI *GetPixelFormatAttribfvARB) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, const int *piAttributes, FLOAT *pfValues); - BOOL (WINAPI *ChoosePixelFormatARB) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); - BOOL (WINAPI *MakeContextCurrentARB) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); - HDC (WINAPI *GetCurrentReadDCARB) (void); - HPBUFFERARB (WINAPI *CreatePbufferARB) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); - HDC (WINAPI *GetPbufferDCARB) (HPBUFFERARB hPbuffer); - int (WINAPI *ReleasePbufferDCARB) (HPBUFFERARB hPbuffer, HDC hDC); - BOOL (WINAPI *DestroyPbufferARB) (HPBUFFERARB hPbuffer); - BOOL (WINAPI *QueryPbufferARB) (HPBUFFERARB hPbuffer, int iAttribute, int *piValue); - BOOL (WINAPI *BindTexImageARB) (HPBUFFERARB hPbuffer, int iBuffer); - BOOL (WINAPI *ReleaseTexImageARB) (HPBUFFERARB hPbuffer, int iBuffer); - BOOL (WINAPI *SetPbufferAttribARB) (HPBUFFERARB hPbuffer, const int *piAttribList); - GLboolean (WINAPI *CreateDisplayColorTableEXT) (GLushort id); - GLboolean (WINAPI *LoadDisplayColorTableEXT) (const GLushort *table, GLuint length); - GLboolean (WINAPI *BindDisplayColorTableEXT) (GLushort id); - VOID (WINAPI *DestroyDisplayColorTableEXT) (GLushort id); - const int (WINAPI *GetExtensionsStringEXT) (void); - BOOL (WINAPI *MakeContextCurrentEXT) (HDC hDrawDC, HDC hReadDC, HGLRC hglrc); - HDC (WINAPI *GetCurrentReadDCEXT) (void); - HPBUFFEREXT (WINAPI *CreatePbufferEXT) (HDC hDC, int iPixelFormat, int iWidth, int iHeight, const int *piAttribList); - HDC (WINAPI *GetPbufferDCEXT) (HPBUFFEREXT hPbuffer); - int (WINAPI *ReleasePbufferDCEXT) (HPBUFFEREXT hPbuffer, HDC hDC); - BOOL (WINAPI *DestroyPbufferEXT) (HPBUFFEREXT hPbuffer); - BOOL (WINAPI *QueryPbufferEXT) (HPBUFFEREXT hPbuffer, int iAttribute, int *piValue); - BOOL (WINAPI *GetPixelFormatAttribivEXT) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, int *piValues); - BOOL (WINAPI *GetPixelFormatAttribfvEXT) (HDC hdc, int iPixelFormat, int iLayerPlane, UINT nAttributes, int *piAttributes, FLOAT *pfValues); - BOOL (WINAPI *ChoosePixelFormatEXT) (HDC hdc, const int *piAttribIList, const FLOAT *pfAttribFList, UINT nMaxFormats, int *piFormats, UINT *nNumFormats); - BOOL (WINAPI *SwapIntervalEXT) (int interval); - int (WINAPI *GetSwapIntervalEXT) (void); - void* (WINAPI *AllocateMemoryNV) (GLsizei size, GLfloat readfreq, GLfloat writefreq, GLfloat priority); - void (WINAPI *FreeMemoryNV) (void); - BOOL (WINAPI *GetSyncValuesOML) (HDC hdc, INT64 *ust, INT64 *msc, INT64 *sbc); - BOOL (WINAPI *GetMscRateOML) (HDC hdc, INT32 *numerator, INT32 *denominator); - INT64 (WINAPI *SwapBuffersMscOML) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder); - INT64 (WINAPI *SwapLayerBuffersMscOML) (HDC hdc, int fuPlanes, INT64 target_msc, INT64 divisor, INT64 remainder); - BOOL (WINAPI *WaitForMscOML) (HDC hdc, INT64 target_msc, INT64 divisor, INT64 remainder, INT64 *ust, INT64 *msc, INT64 *sbc); - BOOL (WINAPI *WaitForSbcOML) (HDC hdc, INT64 target_sbc, INT64 *ust, INT64 *msc, INT64 *sbc); - BOOL (WINAPI *GetDigitalVideoParametersI3D) (HDC hDC, int iAttribute, int *piValue); - BOOL (WINAPI *SetDigitalVideoParametersI3D) (HDC hDC, int iAttribute, const int *piValue); - BOOL (WINAPI *GetGammaTableParametersI3D) (HDC hDC, int iAttribute, int *piValue); - BOOL (WINAPI *SetGammaTableParametersI3D) (HDC hDC, int iAttribute, const int *piValue); - BOOL (WINAPI *GetGammaTableI3D) (HDC hDC, int iEntries, USHORT *puRed, USHORT *puGreen, USHORT *puBlue); - BOOL (WINAPI *SetGammaTableI3D) (HDC hDC, int iEntries, const USHORT *puRed, const USHORT *puGreen, const USHORT *puBlue); - BOOL (WINAPI *EnableGenlockI3D) (HDC hDC); - BOOL (WINAPI *DisableGenlockI3D) (HDC hDC); - BOOL (WINAPI *IsEnabledGenlockI3D) (HDC hDC, BOOL *pFlag); - BOOL (WINAPI *GenlockSourceI3D) (HDC hDC, UINT uSource); - BOOL (WINAPI *GetGenlockSourceI3D) (HDC hDC, UINT *uSource); - BOOL (WINAPI *GenlockSourceEdgeI3D) (HDC hDC, UINT uEdge); - BOOL (WINAPI *GetGenlockSourceEdgeI3D) (HDC hDC, UINT *uEdge); - BOOL (WINAPI *GenlockSampleRateI3D) (HDC hDC, UINT uRate); - BOOL (WINAPI *GetGenlockSampleRateI3D) (HDC hDC, UINT *uRate); - BOOL (WINAPI *GenlockSourceDelayI3D) (HDC hDC, UINT uDelay); - BOOL (WINAPI *GetGenlockSourceDelayI3D) (HDC hDC, UINT *uDelay); - BOOL (WINAPI *QueryGenlockMaxSourceDelayI3D) (HDC hDC, UINT *uMaxLineDelay, UINT *uMaxPixelDelay); - LPVOID (WINAPI *CreateImageBufferI3D) (HDC hDC, DWORD dwSize, UINT uFlags); - BOOL (WINAPI *DestroyImageBufferI3D) (HDC hDC, LPVOID pAddress); - BOOL (WINAPI *AssociateImageBufferEventsI3D) (HDC hDC, const HANDLE *pEvent, const LPVOID *pAddress, const DWORD *pSize, UINT count); - BOOL (WINAPI *ReleaseImageBufferEventsI3D) (HDC hDC, const LPVOID *pAddress, UINT count); - BOOL (WINAPI *EnableFrameLockI3D) (void); - BOOL (WINAPI *DisableFrameLockI3D) (void); - BOOL (WINAPI *IsEnabledFrameLockI3D) (BOOL *pFlag); - BOOL (WINAPI *QueryFrameLockMasterI3D) (BOOL *pFlag); - BOOL (WINAPI *GetFrameUsageI3D) (float *pUsage); - BOOL (WINAPI *BeginFrameTrackingI3D) (void); - BOOL (WINAPI *EndFrameTrackingI3D) (void); - BOOL (WINAPI *QueryFrameTrackingI3D) (DWORD *pFrameCount, DWORD *pMissedFrames, float *pLastMissedUsage); -#endif /* _WIN32 */ -} _GLextensionProcs; - -#define glBlendColor (_GET_TLS_PROCTABLE()->BlendColor) -#define glBlendEquation (_GET_TLS_PROCTABLE()->BlendEquation) -#define glDrawRangeElements (_GET_TLS_PROCTABLE()->DrawRangeElements) -#define glColorTable (_GET_TLS_PROCTABLE()->ColorTable) -#define glColorTableParameterfv (_GET_TLS_PROCTABLE()->ColorTableParameterfv) -#define glColorTableParameteriv (_GET_TLS_PROCTABLE()->ColorTableParameteriv) -#define glCopyColorTable (_GET_TLS_PROCTABLE()->CopyColorTable) -#define glGetColorTable (_GET_TLS_PROCTABLE()->GetColorTable) -#define glGetColorTableParameterfv (_GET_TLS_PROCTABLE()->GetColorTableParameterfv) -#define glGetColorTableParameteriv (_GET_TLS_PROCTABLE()->GetColorTableParameteriv) -#define glColorSubTable (_GET_TLS_PROCTABLE()->ColorSubTable) -#define glCopyColorSubTable (_GET_TLS_PROCTABLE()->CopyColorSubTable) -#define glConvolutionFilter1D (_GET_TLS_PROCTABLE()->ConvolutionFilter1D) -#define glConvolutionFilter2D (_GET_TLS_PROCTABLE()->ConvolutionFilter2D) -#define glConvolutionParameterf (_GET_TLS_PROCTABLE()->ConvolutionParameterf) -#define glConvolutionParameterfv (_GET_TLS_PROCTABLE()->ConvolutionParameterfv) -#define glConvolutionParameteri (_GET_TLS_PROCTABLE()->ConvolutionParameteri) -#define glConvolutionParameteriv (_GET_TLS_PROCTABLE()->ConvolutionParameteriv) -#define glCopyConvolutionFilter1D (_GET_TLS_PROCTABLE()->CopyConvolutionFilter1D) -#define glCopyConvolutionFilter2D (_GET_TLS_PROCTABLE()->CopyConvolutionFilter2D) -#define glGetConvolutionFilter (_GET_TLS_PROCTABLE()->GetConvolutionFilter) -#define glGetConvolutionParameterfv (_GET_TLS_PROCTABLE()->GetConvolutionParameterfv) -#define glGetConvolutionParameteriv (_GET_TLS_PROCTABLE()->GetConvolutionParameteriv) -#define glGetSeparableFilter (_GET_TLS_PROCTABLE()->GetSeparableFilter) -#define glSeparableFilter2D (_GET_TLS_PROCTABLE()->SeparableFilter2D) -#define glGetHistogram (_GET_TLS_PROCTABLE()->GetHistogram) -#define glGetHistogramParameterfv (_GET_TLS_PROCTABLE()->GetHistogramParameterfv) -#define glGetHistogramParameteriv (_GET_TLS_PROCTABLE()->GetHistogramParameteriv) -#define glGetMinmax (_GET_TLS_PROCTABLE()->GetMinmax) -#define glGetMinmaxParameterfv (_GET_TLS_PROCTABLE()->GetMinmaxParameterfv) -#define glGetMinmaxParameteriv (_GET_TLS_PROCTABLE()->GetMinmaxParameteriv) -#define glHistogram (_GET_TLS_PROCTABLE()->Histogram) -#define glMinmax (_GET_TLS_PROCTABLE()->Minmax) -#define glResetHistogram (_GET_TLS_PROCTABLE()->ResetHistogram) -#define glResetMinmax (_GET_TLS_PROCTABLE()->ResetMinmax) -#define glTexImage3D (_GET_TLS_PROCTABLE()->TexImage3D) -#define glTexSubImage3D (_GET_TLS_PROCTABLE()->TexSubImage3D) -#define glCopyTexSubImage3D (_GET_TLS_PROCTABLE()->CopyTexSubImage3D) -#define glActiveTexture (_GET_TLS_PROCTABLE()->ActiveTexture) -#define glClientActiveTexture (_GET_TLS_PROCTABLE()->ClientActiveTexture) -#define glMultiTexCoord1d (_GET_TLS_PROCTABLE()->MultiTexCoord1d) -#define glMultiTexCoord1dv (_GET_TLS_PROCTABLE()->MultiTexCoord1dv) -#define glMultiTexCoord1f (_GET_TLS_PROCTABLE()->MultiTexCoord1f) -#define glMultiTexCoord1fv (_GET_TLS_PROCTABLE()->MultiTexCoord1fv) -#define glMultiTexCoord1i (_GET_TLS_PROCTABLE()->MultiTexCoord1i) -#define glMultiTexCoord1iv (_GET_TLS_PROCTABLE()->MultiTexCoord1iv) -#define glMultiTexCoord1s (_GET_TLS_PROCTABLE()->MultiTexCoord1s) -#define glMultiTexCoord1sv (_GET_TLS_PROCTABLE()->MultiTexCoord1sv) -#define glMultiTexCoord2d (_GET_TLS_PROCTABLE()->MultiTexCoord2d) -#define glMultiTexCoord2dv (_GET_TLS_PROCTABLE()->MultiTexCoord2dv) -#define glMultiTexCoord2f (_GET_TLS_PROCTABLE()->MultiTexCoord2f) -#define glMultiTexCoord2fv (_GET_TLS_PROCTABLE()->MultiTexCoord2fv) -#define glMultiTexCoord2i (_GET_TLS_PROCTABLE()->MultiTexCoord2i) -#define glMultiTexCoord2iv (_GET_TLS_PROCTABLE()->MultiTexCoord2iv) -#define glMultiTexCoord2s (_GET_TLS_PROCTABLE()->MultiTexCoord2s) -#define glMultiTexCoord2sv (_GET_TLS_PROCTABLE()->MultiTexCoord2sv) -#define glMultiTexCoord3d (_GET_TLS_PROCTABLE()->MultiTexCoord3d) -#define glMultiTexCoord3dv (_GET_TLS_PROCTABLE()->MultiTexCoord3dv) -#define glMultiTexCoord3f (_GET_TLS_PROCTABLE()->MultiTexCoord3f) -#define glMultiTexCoord3fv (_GET_TLS_PROCTABLE()->MultiTexCoord3fv) -#define glMultiTexCoord3i (_GET_TLS_PROCTABLE()->MultiTexCoord3i) -#define glMultiTexCoord3iv (_GET_TLS_PROCTABLE()->MultiTexCoord3iv) -#define glMultiTexCoord3s (_GET_TLS_PROCTABLE()->MultiTexCoord3s) -#define glMultiTexCoord3sv (_GET_TLS_PROCTABLE()->MultiTexCoord3sv) -#define glMultiTexCoord4d (_GET_TLS_PROCTABLE()->MultiTexCoord4d) -#define glMultiTexCoord4dv (_GET_TLS_PROCTABLE()->MultiTexCoord4dv) -#define glMultiTexCoord4f (_GET_TLS_PROCTABLE()->MultiTexCoord4f) -#define glMultiTexCoord4fv (_GET_TLS_PROCTABLE()->MultiTexCoord4fv) -#define glMultiTexCoord4i (_GET_TLS_PROCTABLE()->MultiTexCoord4i) -#define glMultiTexCoord4iv (_GET_TLS_PROCTABLE()->MultiTexCoord4iv) -#define glMultiTexCoord4s (_GET_TLS_PROCTABLE()->MultiTexCoord4s) -#define glMultiTexCoord4sv (_GET_TLS_PROCTABLE()->MultiTexCoord4sv) -#define glLoadTransposeMatrixf (_GET_TLS_PROCTABLE()->LoadTransposeMatrixf) -#define glLoadTransposeMatrixd (_GET_TLS_PROCTABLE()->LoadTransposeMatrixd) -#define glMultTransposeMatrixf (_GET_TLS_PROCTABLE()->MultTransposeMatrixf) -#define glMultTransposeMatrixd (_GET_TLS_PROCTABLE()->MultTransposeMatrixd) -#define glSampleCoverage (_GET_TLS_PROCTABLE()->SampleCoverage) -#define glCompressedTexImage3D (_GET_TLS_PROCTABLE()->CompressedTexImage3D) -#define glCompressedTexImage2D (_GET_TLS_PROCTABLE()->CompressedTexImage2D) -#define glCompressedTexImage1D (_GET_TLS_PROCTABLE()->CompressedTexImage1D) -#define glCompressedTexSubImage3D (_GET_TLS_PROCTABLE()->CompressedTexSubImage3D) -#define glCompressedTexSubImage2D (_GET_TLS_PROCTABLE()->CompressedTexSubImage2D) -#define glCompressedTexSubImage1D (_GET_TLS_PROCTABLE()->CompressedTexSubImage1D) -#define glGetCompressedTexImage (_GET_TLS_PROCTABLE()->GetCompressedTexImage) -#define glBlendFuncSeparate (_GET_TLS_PROCTABLE()->BlendFuncSeparate) -#define glFogCoordf (_GET_TLS_PROCTABLE()->FogCoordf) -#define glFogCoordfv (_GET_TLS_PROCTABLE()->FogCoordfv) -#define glFogCoordd (_GET_TLS_PROCTABLE()->FogCoordd) -#define glFogCoorddv (_GET_TLS_PROCTABLE()->FogCoorddv) -#define glFogCoordPointer (_GET_TLS_PROCTABLE()->FogCoordPointer) -#define glMultiDrawArrays (_GET_TLS_PROCTABLE()->MultiDrawArrays) -#define glMultiDrawElements (_GET_TLS_PROCTABLE()->MultiDrawElements) -#define glPointParameterf (_GET_TLS_PROCTABLE()->PointParameterf) -#define glPointParameterfv (_GET_TLS_PROCTABLE()->PointParameterfv) -#define glPointParameteri (_GET_TLS_PROCTABLE()->PointParameteri) -#define glPointParameteriv (_GET_TLS_PROCTABLE()->PointParameteriv) -#define glSecondaryColor3b (_GET_TLS_PROCTABLE()->SecondaryColor3b) -#define glSecondaryColor3bv (_GET_TLS_PROCTABLE()->SecondaryColor3bv) -#define glSecondaryColor3d (_GET_TLS_PROCTABLE()->SecondaryColor3d) -#define glSecondaryColor3dv (_GET_TLS_PROCTABLE()->SecondaryColor3dv) -#define glSecondaryColor3f (_GET_TLS_PROCTABLE()->SecondaryColor3f) -#define glSecondaryColor3fv (_GET_TLS_PROCTABLE()->SecondaryColor3fv) -#define glSecondaryColor3i (_GET_TLS_PROCTABLE()->SecondaryColor3i) -#define glSecondaryColor3iv (_GET_TLS_PROCTABLE()->SecondaryColor3iv) -#define glSecondaryColor3s (_GET_TLS_PROCTABLE()->SecondaryColor3s) -#define glSecondaryColor3sv (_GET_TLS_PROCTABLE()->SecondaryColor3sv) -#define glSecondaryColor3ub (_GET_TLS_PROCTABLE()->SecondaryColor3ub) -#define glSecondaryColor3ubv (_GET_TLS_PROCTABLE()->SecondaryColor3ubv) -#define glSecondaryColor3ui (_GET_TLS_PROCTABLE()->SecondaryColor3ui) -#define glSecondaryColor3uiv (_GET_TLS_PROCTABLE()->SecondaryColor3uiv) -#define glSecondaryColor3us (_GET_TLS_PROCTABLE()->SecondaryColor3us) -#define glSecondaryColor3usv (_GET_TLS_PROCTABLE()->SecondaryColor3usv) -#define glSecondaryColorPointer (_GET_TLS_PROCTABLE()->SecondaryColorPointer) -#define glWindowPos2d (_GET_TLS_PROCTABLE()->WindowPos2d) -#define glWindowPos2dv (_GET_TLS_PROCTABLE()->WindowPos2dv) -#define glWindowPos2f (_GET_TLS_PROCTABLE()->WindowPos2f) -#define glWindowPos2fv (_GET_TLS_PROCTABLE()->WindowPos2fv) -#define glWindowPos2i (_GET_TLS_PROCTABLE()->WindowPos2i) -#define glWindowPos2iv (_GET_TLS_PROCTABLE()->WindowPos2iv) -#define glWindowPos2s (_GET_TLS_PROCTABLE()->WindowPos2s) -#define glWindowPos2sv (_GET_TLS_PROCTABLE()->WindowPos2sv) -#define glWindowPos3d (_GET_TLS_PROCTABLE()->WindowPos3d) -#define glWindowPos3dv (_GET_TLS_PROCTABLE()->WindowPos3dv) -#define glWindowPos3f (_GET_TLS_PROCTABLE()->WindowPos3f) -#define glWindowPos3fv (_GET_TLS_PROCTABLE()->WindowPos3fv) -#define glWindowPos3i (_GET_TLS_PROCTABLE()->WindowPos3i) -#define glWindowPos3iv (_GET_TLS_PROCTABLE()->WindowPos3iv) -#define glWindowPos3s (_GET_TLS_PROCTABLE()->WindowPos3s) -#define glWindowPos3sv (_GET_TLS_PROCTABLE()->WindowPos3sv) -#define glGenQueries (_GET_TLS_PROCTABLE()->GenQueries) -#define glDeleteQueries (_GET_TLS_PROCTABLE()->DeleteQueries) -#define glIsQuery (_GET_TLS_PROCTABLE()->IsQuery) -#define glBeginQuery (_GET_TLS_PROCTABLE()->BeginQuery) -#define glEndQuery (_GET_TLS_PROCTABLE()->EndQuery) -#define glGetQueryiv (_GET_TLS_PROCTABLE()->GetQueryiv) -#define glGetQueryObjectiv (_GET_TLS_PROCTABLE()->GetQueryObjectiv) -#define glGetQueryObjectuiv (_GET_TLS_PROCTABLE()->GetQueryObjectuiv) -#define glBindBuffer (_GET_TLS_PROCTABLE()->BindBuffer) -#define glDeleteBuffers (_GET_TLS_PROCTABLE()->DeleteBuffers) -#define glGenBuffers (_GET_TLS_PROCTABLE()->GenBuffers) -#define glIsBuffer (_GET_TLS_PROCTABLE()->IsBuffer) -#define glBufferData (_GET_TLS_PROCTABLE()->BufferData) -#define glBufferSubData (_GET_TLS_PROCTABLE()->BufferSubData) -#define glGetBufferSubData (_GET_TLS_PROCTABLE()->GetBufferSubData) -#define glMapBuffer (_GET_TLS_PROCTABLE()->MapBuffer) -#define glUnmapBuffer (_GET_TLS_PROCTABLE()->UnmapBuffer) -#define glGetBufferParameteriv (_GET_TLS_PROCTABLE()->GetBufferParameteriv) -#define glGetBufferPointerv (_GET_TLS_PROCTABLE()->GetBufferPointerv) -#define glActiveTextureARB (_GET_TLS_PROCTABLE()->ActiveTextureARB) -#define glClientActiveTextureARB (_GET_TLS_PROCTABLE()->ClientActiveTextureARB) -#define glMultiTexCoord1dARB (_GET_TLS_PROCTABLE()->MultiTexCoord1dARB) -#define glMultiTexCoord1dvARB (_GET_TLS_PROCTABLE()->MultiTexCoord1dvARB) -#define glMultiTexCoord1fARB (_GET_TLS_PROCTABLE()->MultiTexCoord1fARB) -#define glMultiTexCoord1fvARB (_GET_TLS_PROCTABLE()->MultiTexCoord1fvARB) -#define glMultiTexCoord1iARB (_GET_TLS_PROCTABLE()->MultiTexCoord1iARB) -#define glMultiTexCoord1ivARB (_GET_TLS_PROCTABLE()->MultiTexCoord1ivARB) -#define glMultiTexCoord1sARB (_GET_TLS_PROCTABLE()->MultiTexCoord1sARB) -#define glMultiTexCoord1svARB (_GET_TLS_PROCTABLE()->MultiTexCoord1svARB) -#define glMultiTexCoord2dARB (_GET_TLS_PROCTABLE()->MultiTexCoord2dARB) -#define glMultiTexCoord2dvARB (_GET_TLS_PROCTABLE()->MultiTexCoord2dvARB) -#define glMultiTexCoord2fARB (_GET_TLS_PROCTABLE()->MultiTexCoord2fARB) -#define glMultiTexCoord2fvARB (_GET_TLS_PROCTABLE()->MultiTexCoord2fvARB) -#define glMultiTexCoord2iARB (_GET_TLS_PROCTABLE()->MultiTexCoord2iARB) -#define glMultiTexCoord2ivARB (_GET_TLS_PROCTABLE()->MultiTexCoord2ivARB) -#define glMultiTexCoord2sARB (_GET_TLS_PROCTABLE()->MultiTexCoord2sARB) -#define glMultiTexCoord2svARB (_GET_TLS_PROCTABLE()->MultiTexCoord2svARB) -#define glMultiTexCoord3dARB (_GET_TLS_PROCTABLE()->MultiTexCoord3dARB) -#define glMultiTexCoord3dvARB (_GET_TLS_PROCTABLE()->MultiTexCoord3dvARB) -#define glMultiTexCoord3fARB (_GET_TLS_PROCTABLE()->MultiTexCoord3fARB) -#define glMultiTexCoord3fvARB (_GET_TLS_PROCTABLE()->MultiTexCoord3fvARB) -#define glMultiTexCoord3iARB (_GET_TLS_PROCTABLE()->MultiTexCoord3iARB) -#define glMultiTexCoord3ivARB (_GET_TLS_PROCTABLE()->MultiTexCoord3ivARB) -#define glMultiTexCoord3sARB (_GET_TLS_PROCTABLE()->MultiTexCoord3sARB) -#define glMultiTexCoord3svARB (_GET_TLS_PROCTABLE()->MultiTexCoord3svARB) -#define glMultiTexCoord4dARB (_GET_TLS_PROCTABLE()->MultiTexCoord4dARB) -#define glMultiTexCoord4dvARB (_GET_TLS_PROCTABLE()->MultiTexCoord4dvARB) -#define glMultiTexCoord4fARB (_GET_TLS_PROCTABLE()->MultiTexCoord4fARB) -#define glMultiTexCoord4fvARB (_GET_TLS_PROCTABLE()->MultiTexCoord4fvARB) -#define glMultiTexCoord4iARB (_GET_TLS_PROCTABLE()->MultiTexCoord4iARB) -#define glMultiTexCoord4ivARB (_GET_TLS_PROCTABLE()->MultiTexCoord4ivARB) -#define glMultiTexCoord4sARB (_GET_TLS_PROCTABLE()->MultiTexCoord4sARB) -#define glMultiTexCoord4svARB (_GET_TLS_PROCTABLE()->MultiTexCoord4svARB) -#define glLoadTransposeMatrixfARB (_GET_TLS_PROCTABLE()->LoadTransposeMatrixfARB) -#define glLoadTransposeMatrixdARB (_GET_TLS_PROCTABLE()->LoadTransposeMatrixdARB) -#define glMultTransposeMatrixfARB (_GET_TLS_PROCTABLE()->MultTransposeMatrixfARB) -#define glMultTransposeMatrixdARB (_GET_TLS_PROCTABLE()->MultTransposeMatrixdARB) -#define glSampleCoverageARB (_GET_TLS_PROCTABLE()->SampleCoverageARB) -#define glCompressedTexImage3DARB (_GET_TLS_PROCTABLE()->CompressedTexImage3DARB) -#define glCompressedTexImage2DARB (_GET_TLS_PROCTABLE()->CompressedTexImage2DARB) -#define glCompressedTexImage1DARB (_GET_TLS_PROCTABLE()->CompressedTexImage1DARB) -#define glCompressedTexSubImage3DARB (_GET_TLS_PROCTABLE()->CompressedTexSubImage3DARB) -#define glCompressedTexSubImage2DARB (_GET_TLS_PROCTABLE()->CompressedTexSubImage2DARB) -#define glCompressedTexSubImage1DARB (_GET_TLS_PROCTABLE()->CompressedTexSubImage1DARB) -#define glGetCompressedTexImageARB (_GET_TLS_PROCTABLE()->GetCompressedTexImageARB) -#define glPointParameterfARB (_GET_TLS_PROCTABLE()->PointParameterfARB) -#define glPointParameterfvARB (_GET_TLS_PROCTABLE()->PointParameterfvARB) -#define glWeightbvARB (_GET_TLS_PROCTABLE()->WeightbvARB) -#define glWeightsvARB (_GET_TLS_PROCTABLE()->WeightsvARB) -#define glWeightivARB (_GET_TLS_PROCTABLE()->WeightivARB) -#define glWeightfvARB (_GET_TLS_PROCTABLE()->WeightfvARB) -#define glWeightdvARB (_GET_TLS_PROCTABLE()->WeightdvARB) -#define glWeightubvARB (_GET_TLS_PROCTABLE()->WeightubvARB) -#define glWeightusvARB (_GET_TLS_PROCTABLE()->WeightusvARB) -#define glWeightuivARB (_GET_TLS_PROCTABLE()->WeightuivARB) -#define glWeightPointerARB (_GET_TLS_PROCTABLE()->WeightPointerARB) -#define glVertexBlendARB (_GET_TLS_PROCTABLE()->VertexBlendARB) -#define glCurrentPaletteMatrixARB (_GET_TLS_PROCTABLE()->CurrentPaletteMatrixARB) -#define glMatrixIndexubvARB (_GET_TLS_PROCTABLE()->MatrixIndexubvARB) -#define glMatrixIndexusvARB (_GET_TLS_PROCTABLE()->MatrixIndexusvARB) -#define glMatrixIndexuivARB (_GET_TLS_PROCTABLE()->MatrixIndexuivARB) -#define glMatrixIndexPointerARB (_GET_TLS_PROCTABLE()->MatrixIndexPointerARB) -#define glWindowPos2dARB (_GET_TLS_PROCTABLE()->WindowPos2dARB) -#define glWindowPos2dvARB (_GET_TLS_PROCTABLE()->WindowPos2dvARB) -#define glWindowPos2fARB (_GET_TLS_PROCTABLE()->WindowPos2fARB) -#define glWindowPos2fvARB (_GET_TLS_PROCTABLE()->WindowPos2fvARB) -#define glWindowPos2iARB (_GET_TLS_PROCTABLE()->WindowPos2iARB) -#define glWindowPos2ivARB (_GET_TLS_PROCTABLE()->WindowPos2ivARB) -#define glWindowPos2sARB (_GET_TLS_PROCTABLE()->WindowPos2sARB) -#define glWindowPos2svARB (_GET_TLS_PROCTABLE()->WindowPos2svARB) -#define glWindowPos3dARB (_GET_TLS_PROCTABLE()->WindowPos3dARB) -#define glWindowPos3dvARB (_GET_TLS_PROCTABLE()->WindowPos3dvARB) -#define glWindowPos3fARB (_GET_TLS_PROCTABLE()->WindowPos3fARB) -#define glWindowPos3fvARB (_GET_TLS_PROCTABLE()->WindowPos3fvARB) -#define glWindowPos3iARB (_GET_TLS_PROCTABLE()->WindowPos3iARB) -#define glWindowPos3ivARB (_GET_TLS_PROCTABLE()->WindowPos3ivARB) -#define glWindowPos3sARB (_GET_TLS_PROCTABLE()->WindowPos3sARB) -#define glWindowPos3svARB (_GET_TLS_PROCTABLE()->WindowPos3svARB) -#define glVertexAttrib1dARB (_GET_TLS_PROCTABLE()->VertexAttrib1dARB) -#define glVertexAttrib1dvARB (_GET_TLS_PROCTABLE()->VertexAttrib1dvARB) -#define glVertexAttrib1fARB (_GET_TLS_PROCTABLE()->VertexAttrib1fARB) -#define glVertexAttrib1fvARB (_GET_TLS_PROCTABLE()->VertexAttrib1fvARB) -#define glVertexAttrib1sARB (_GET_TLS_PROCTABLE()->VertexAttrib1sARB) -#define glVertexAttrib1svARB (_GET_TLS_PROCTABLE()->VertexAttrib1svARB) -#define glVertexAttrib2dARB (_GET_TLS_PROCTABLE()->VertexAttrib2dARB) -#define glVertexAttrib2dvARB (_GET_TLS_PROCTABLE()->VertexAttrib2dvARB) -#define glVertexAttrib2fARB (_GET_TLS_PROCTABLE()->VertexAttrib2fARB) -#define glVertexAttrib2fvARB (_GET_TLS_PROCTABLE()->VertexAttrib2fvARB) -#define glVertexAttrib2sARB (_GET_TLS_PROCTABLE()->VertexAttrib2sARB) -#define glVertexAttrib2svARB (_GET_TLS_PROCTABLE()->VertexAttrib2svARB) -#define glVertexAttrib3dARB (_GET_TLS_PROCTABLE()->VertexAttrib3dARB) -#define glVertexAttrib3dvARB (_GET_TLS_PROCTABLE()->VertexAttrib3dvARB) -#define glVertexAttrib3fARB (_GET_TLS_PROCTABLE()->VertexAttrib3fARB) -#define glVertexAttrib3fvARB (_GET_TLS_PROCTABLE()->VertexAttrib3fvARB) -#define glVertexAttrib3sARB (_GET_TLS_PROCTABLE()->VertexAttrib3sARB) -#define glVertexAttrib3svARB (_GET_TLS_PROCTABLE()->VertexAttrib3svARB) -#define glVertexAttrib4NbvARB (_GET_TLS_PROCTABLE()->VertexAttrib4NbvARB) -#define glVertexAttrib4NivARB (_GET_TLS_PROCTABLE()->VertexAttrib4NivARB) -#define glVertexAttrib4NsvARB (_GET_TLS_PROCTABLE()->VertexAttrib4NsvARB) -#define glVertexAttrib4NubARB (_GET_TLS_PROCTABLE()->VertexAttrib4NubARB) -#define glVertexAttrib4NubvARB (_GET_TLS_PROCTABLE()->VertexAttrib4NubvARB) -#define glVertexAttrib4NuivARB (_GET_TLS_PROCTABLE()->VertexAttrib4NuivARB) -#define glVertexAttrib4NusvARB (_GET_TLS_PROCTABLE()->VertexAttrib4NusvARB) -#define glVertexAttrib4bvARB (_GET_TLS_PROCTABLE()->VertexAttrib4bvARB) -#define glVertexAttrib4dARB (_GET_TLS_PROCTABLE()->VertexAttrib4dARB) -#define glVertexAttrib4dvARB (_GET_TLS_PROCTABLE()->VertexAttrib4dvARB) -#define glVertexAttrib4fARB (_GET_TLS_PROCTABLE()->VertexAttrib4fARB) -#define glVertexAttrib4fvARB (_GET_TLS_PROCTABLE()->VertexAttrib4fvARB) -#define glVertexAttrib4ivARB (_GET_TLS_PROCTABLE()->VertexAttrib4ivARB) -#define glVertexAttrib4sARB (_GET_TLS_PROCTABLE()->VertexAttrib4sARB) -#define glVertexAttrib4svARB (_GET_TLS_PROCTABLE()->VertexAttrib4svARB) -#define glVertexAttrib4ubvARB (_GET_TLS_PROCTABLE()->VertexAttrib4ubvARB) -#define glVertexAttrib4uivARB (_GET_TLS_PROCTABLE()->VertexAttrib4uivARB) -#define glVertexAttrib4usvARB (_GET_TLS_PROCTABLE()->VertexAttrib4usvARB) -#define glVertexAttribPointerARB (_GET_TLS_PROCTABLE()->VertexAttribPointerARB) -#define glEnableVertexAttribArrayARB (_GET_TLS_PROCTABLE()->EnableVertexAttribArrayARB) -#define glDisableVertexAttribArrayARB (_GET_TLS_PROCTABLE()->DisableVertexAttribArrayARB) -#define glProgramStringARB (_GET_TLS_PROCTABLE()->ProgramStringARB) -#define glBindProgramARB (_GET_TLS_PROCTABLE()->BindProgramARB) -#define glDeleteProgramsARB (_GET_TLS_PROCTABLE()->DeleteProgramsARB) -#define glGenProgramsARB (_GET_TLS_PROCTABLE()->GenProgramsARB) -#define glProgramEnvParameter4dARB (_GET_TLS_PROCTABLE()->ProgramEnvParameter4dARB) -#define glProgramEnvParameter4dvARB (_GET_TLS_PROCTABLE()->ProgramEnvParameter4dvARB) -#define glProgramEnvParameter4fARB (_GET_TLS_PROCTABLE()->ProgramEnvParameter4fARB) -#define glProgramEnvParameter4fvARB (_GET_TLS_PROCTABLE()->ProgramEnvParameter4fvARB) -#define glProgramLocalParameter4dARB (_GET_TLS_PROCTABLE()->ProgramLocalParameter4dARB) -#define glProgramLocalParameter4dvARB (_GET_TLS_PROCTABLE()->ProgramLocalParameter4dvARB) -#define glProgramLocalParameter4fARB (_GET_TLS_PROCTABLE()->ProgramLocalParameter4fARB) -#define glProgramLocalParameter4fvARB (_GET_TLS_PROCTABLE()->ProgramLocalParameter4fvARB) -#define glGetProgramEnvParameterdvARB (_GET_TLS_PROCTABLE()->GetProgramEnvParameterdvARB) -#define glGetProgramEnvParameterfvARB (_GET_TLS_PROCTABLE()->GetProgramEnvParameterfvARB) -#define glGetProgramLocalParameterdvARB (_GET_TLS_PROCTABLE()->GetProgramLocalParameterdvARB) -#define glGetProgramLocalParameterfvARB (_GET_TLS_PROCTABLE()->GetProgramLocalParameterfvARB) -#define glGetProgramivARB (_GET_TLS_PROCTABLE()->GetProgramivARB) -#define glGetProgramStringARB (_GET_TLS_PROCTABLE()->GetProgramStringARB) -#define glGetVertexAttribdvARB (_GET_TLS_PROCTABLE()->GetVertexAttribdvARB) -#define glGetVertexAttribfvARB (_GET_TLS_PROCTABLE()->GetVertexAttribfvARB) -#define glGetVertexAttribivARB (_GET_TLS_PROCTABLE()->GetVertexAttribivARB) -#define glGetVertexAttribPointervARB (_GET_TLS_PROCTABLE()->GetVertexAttribPointervARB) -#define glIsProgramARB (_GET_TLS_PROCTABLE()->IsProgramARB) -#define glBindBufferARB (_GET_TLS_PROCTABLE()->BindBufferARB) -#define glDeleteBuffersARB (_GET_TLS_PROCTABLE()->DeleteBuffersARB) -#define glGenBuffersARB (_GET_TLS_PROCTABLE()->GenBuffersARB) -#define glIsBufferARB (_GET_TLS_PROCTABLE()->IsBufferARB) -#define glBufferDataARB (_GET_TLS_PROCTABLE()->BufferDataARB) -#define glBufferSubDataARB (_GET_TLS_PROCTABLE()->BufferSubDataARB) -#define glGetBufferSubDataARB (_GET_TLS_PROCTABLE()->GetBufferSubDataARB) -#define glMapBufferARB (_GET_TLS_PROCTABLE()->MapBufferARB) -#define glUnmapBufferARB (_GET_TLS_PROCTABLE()->UnmapBufferARB) -#define glGetBufferParameterivARB (_GET_TLS_PROCTABLE()->GetBufferParameterivARB) -#define glGetBufferPointervARB (_GET_TLS_PROCTABLE()->GetBufferPointervARB) -#define glGenQueriesARB (_GET_TLS_PROCTABLE()->GenQueriesARB) -#define glDeleteQueriesARB (_GET_TLS_PROCTABLE()->DeleteQueriesARB) -#define glIsQueryARB (_GET_TLS_PROCTABLE()->IsQueryARB) -#define glBeginQueryARB (_GET_TLS_PROCTABLE()->BeginQueryARB) -#define glEndQueryARB (_GET_TLS_PROCTABLE()->EndQueryARB) -#define glGetQueryivARB (_GET_TLS_PROCTABLE()->GetQueryivARB) -#define glGetQueryObjectivARB (_GET_TLS_PROCTABLE()->GetQueryObjectivARB) -#define glGetQueryObjectuivARB (_GET_TLS_PROCTABLE()->GetQueryObjectuivARB) -#define glDeleteObjectARB (_GET_TLS_PROCTABLE()->DeleteObjectARB) -#define glGetHandleARB (_GET_TLS_PROCTABLE()->GetHandleARB) -#define glDetachObjectARB (_GET_TLS_PROCTABLE()->DetachObjectARB) -#define glCreateShaderObjectARB (_GET_TLS_PROCTABLE()->CreateShaderObjectARB) -#define glShaderSourceARB (_GET_TLS_PROCTABLE()->ShaderSourceARB) -#define glCompileShaderARB (_GET_TLS_PROCTABLE()->CompileShaderARB) -#define glCreateProgramObjectARB (_GET_TLS_PROCTABLE()->CreateProgramObjectARB) -#define glAttachObjectARB (_GET_TLS_PROCTABLE()->AttachObjectARB) -#define glLinkProgramARB (_GET_TLS_PROCTABLE()->LinkProgramARB) -#define glUseProgramObjectARB (_GET_TLS_PROCTABLE()->UseProgramObjectARB) -#define glValidateProgramARB (_GET_TLS_PROCTABLE()->ValidateProgramARB) -#define glUniform1fARB (_GET_TLS_PROCTABLE()->Uniform1fARB) -#define glUniform2fARB (_GET_TLS_PROCTABLE()->Uniform2fARB) -#define glUniform3fARB (_GET_TLS_PROCTABLE()->Uniform3fARB) -#define glUniform4fARB (_GET_TLS_PROCTABLE()->Uniform4fARB) -#define glUniform1iARB (_GET_TLS_PROCTABLE()->Uniform1iARB) -#define glUniform2iARB (_GET_TLS_PROCTABLE()->Uniform2iARB) -#define glUniform3iARB (_GET_TLS_PROCTABLE()->Uniform3iARB) -#define glUniform4iARB (_GET_TLS_PROCTABLE()->Uniform4iARB) -#define glUniform1fvARB (_GET_TLS_PROCTABLE()->Uniform1fvARB) -#define glUniform2fvARB (_GET_TLS_PROCTABLE()->Uniform2fvARB) -#define glUniform3fvARB (_GET_TLS_PROCTABLE()->Uniform3fvARB) -#define glUniform4fvARB (_GET_TLS_PROCTABLE()->Uniform4fvARB) -#define glUniform1ivARB (_GET_TLS_PROCTABLE()->Uniform1ivARB) -#define glUniform2ivARB (_GET_TLS_PROCTABLE()->Uniform2ivARB) -#define glUniform3ivARB (_GET_TLS_PROCTABLE()->Uniform3ivARB) -#define glUniform4ivARB (_GET_TLS_PROCTABLE()->Uniform4ivARB) -#define glUniformMatrix2fvARB (_GET_TLS_PROCTABLE()->UniformMatrix2fvARB) -#define glUniformMatrix3fvARB (_GET_TLS_PROCTABLE()->UniformMatrix3fvARB) -#define glUniformMatrix4fvARB (_GET_TLS_PROCTABLE()->UniformMatrix4fvARB) -#define glGetObjectParameterfvARB (_GET_TLS_PROCTABLE()->GetObjectParameterfvARB) -#define glGetObjectParameterivARB (_GET_TLS_PROCTABLE()->GetObjectParameterivARB) -#define glGetInfoLogARB (_GET_TLS_PROCTABLE()->GetInfoLogARB) -#define glGetAttachedObjectsARB (_GET_TLS_PROCTABLE()->GetAttachedObjectsARB) -#define glGetUniformLocationARB (_GET_TLS_PROCTABLE()->GetUniformLocationARB) -#define glGetActiveUniformARB (_GET_TLS_PROCTABLE()->GetActiveUniformARB) -#define glGetUniformfvARB (_GET_TLS_PROCTABLE()->GetUniformfvARB) -#define glGetUniformivARB (_GET_TLS_PROCTABLE()->GetUniformivARB) -#define glGetShaderSourceARB (_GET_TLS_PROCTABLE()->GetShaderSourceARB) -#define glBindAttribLocationARB (_GET_TLS_PROCTABLE()->BindAttribLocationARB) -#define glGetActiveAttribARB (_GET_TLS_PROCTABLE()->GetActiveAttribARB) -#define glGetAttribLocationARB (_GET_TLS_PROCTABLE()->GetAttribLocationARB) -#define glBlendColorEXT (_GET_TLS_PROCTABLE()->BlendColorEXT) -#define glPolygonOffsetEXT (_GET_TLS_PROCTABLE()->PolygonOffsetEXT) -#define glTexImage3DEXT (_GET_TLS_PROCTABLE()->TexImage3DEXT) -#define glTexSubImage3DEXT (_GET_TLS_PROCTABLE()->TexSubImage3DEXT) -#define glGetTexFilterFuncSGIS (_GET_TLS_PROCTABLE()->GetTexFilterFuncSGIS) -#define glTexFilterFuncSGIS (_GET_TLS_PROCTABLE()->TexFilterFuncSGIS) -#define glTexSubImage1DEXT (_GET_TLS_PROCTABLE()->TexSubImage1DEXT) -#define glTexSubImage2DEXT (_GET_TLS_PROCTABLE()->TexSubImage2DEXT) -#define glCopyTexImage1DEXT (_GET_TLS_PROCTABLE()->CopyTexImage1DEXT) -#define glCopyTexImage2DEXT (_GET_TLS_PROCTABLE()->CopyTexImage2DEXT) -#define glCopyTexSubImage1DEXT (_GET_TLS_PROCTABLE()->CopyTexSubImage1DEXT) -#define glCopyTexSubImage2DEXT (_GET_TLS_PROCTABLE()->CopyTexSubImage2DEXT) -#define glCopyTexSubImage3DEXT (_GET_TLS_PROCTABLE()->CopyTexSubImage3DEXT) -#define glGetHistogramEXT (_GET_TLS_PROCTABLE()->GetHistogramEXT) -#define glGetHistogramParameterfvEXT (_GET_TLS_PROCTABLE()->GetHistogramParameterfvEXT) -#define glGetHistogramParameterivEXT (_GET_TLS_PROCTABLE()->GetHistogramParameterivEXT) -#define glGetMinmaxEXT (_GET_TLS_PROCTABLE()->GetMinmaxEXT) -#define glGetMinmaxParameterfvEXT (_GET_TLS_PROCTABLE()->GetMinmaxParameterfvEXT) -#define glGetMinmaxParameterivEXT (_GET_TLS_PROCTABLE()->GetMinmaxParameterivEXT) -#define glHistogramEXT (_GET_TLS_PROCTABLE()->HistogramEXT) -#define glMinmaxEXT (_GET_TLS_PROCTABLE()->MinmaxEXT) -#define glResetHistogramEXT (_GET_TLS_PROCTABLE()->ResetHistogramEXT) -#define glResetMinmaxEXT (_GET_TLS_PROCTABLE()->ResetMinmaxEXT) -#define glConvolutionFilter1DEXT (_GET_TLS_PROCTABLE()->ConvolutionFilter1DEXT) -#define glConvolutionFilter2DEXT (_GET_TLS_PROCTABLE()->ConvolutionFilter2DEXT) -#define glConvolutionParameterfEXT (_GET_TLS_PROCTABLE()->ConvolutionParameterfEXT) -#define glConvolutionParameterfvEXT (_GET_TLS_PROCTABLE()->ConvolutionParameterfvEXT) -#define glConvolutionParameteriEXT (_GET_TLS_PROCTABLE()->ConvolutionParameteriEXT) -#define glConvolutionParameterivEXT (_GET_TLS_PROCTABLE()->ConvolutionParameterivEXT) -#define glCopyConvolutionFilter1DEXT (_GET_TLS_PROCTABLE()->CopyConvolutionFilter1DEXT) -#define glCopyConvolutionFilter2DEXT (_GET_TLS_PROCTABLE()->CopyConvolutionFilter2DEXT) -#define glGetConvolutionFilterEXT (_GET_TLS_PROCTABLE()->GetConvolutionFilterEXT) -#define glGetConvolutionParameterfvEXT (_GET_TLS_PROCTABLE()->GetConvolutionParameterfvEXT) -#define glGetConvolutionParameterivEXT (_GET_TLS_PROCTABLE()->GetConvolutionParameterivEXT) -#define glGetSeparableFilterEXT (_GET_TLS_PROCTABLE()->GetSeparableFilterEXT) -#define glSeparableFilter2DEXT (_GET_TLS_PROCTABLE()->SeparableFilter2DEXT) -#define glColorTableSGI (_GET_TLS_PROCTABLE()->ColorTableSGI) -#define glColorTableParameterfvSGI (_GET_TLS_PROCTABLE()->ColorTableParameterfvSGI) -#define glColorTableParameterivSGI (_GET_TLS_PROCTABLE()->ColorTableParameterivSGI) -#define glCopyColorTableSGI (_GET_TLS_PROCTABLE()->CopyColorTableSGI) -#define glGetColorTableSGI (_GET_TLS_PROCTABLE()->GetColorTableSGI) -#define glGetColorTableParameterfvSGI (_GET_TLS_PROCTABLE()->GetColorTableParameterfvSGI) -#define glGetColorTableParameterivSGI (_GET_TLS_PROCTABLE()->GetColorTableParameterivSGI) -#define glPixelTexGenSGIX (_GET_TLS_PROCTABLE()->PixelTexGenSGIX) -#define glPixelTexGenParameteriSGIS (_GET_TLS_PROCTABLE()->PixelTexGenParameteriSGIS) -#define glPixelTexGenParameterivSGIS (_GET_TLS_PROCTABLE()->PixelTexGenParameterivSGIS) -#define glPixelTexGenParameterfSGIS (_GET_TLS_PROCTABLE()->PixelTexGenParameterfSGIS) -#define glPixelTexGenParameterfvSGIS (_GET_TLS_PROCTABLE()->PixelTexGenParameterfvSGIS) -#define glGetPixelTexGenParameterivSGIS (_GET_TLS_PROCTABLE()->GetPixelTexGenParameterivSGIS) -#define glGetPixelTexGenParameterfvSGIS (_GET_TLS_PROCTABLE()->GetPixelTexGenParameterfvSGIS) -#define glTexImage4DSGIS (_GET_TLS_PROCTABLE()->TexImage4DSGIS) -#define glTexSubImage4DSGIS (_GET_TLS_PROCTABLE()->TexSubImage4DSGIS) -#define glAreTexturesResidentEXT (_GET_TLS_PROCTABLE()->AreTexturesResidentEXT) -#define glBindTextureEXT (_GET_TLS_PROCTABLE()->BindTextureEXT) -#define glDeleteTexturesEXT (_GET_TLS_PROCTABLE()->DeleteTexturesEXT) -#define glGenTexturesEXT (_GET_TLS_PROCTABLE()->GenTexturesEXT) -#define glIsTextureEXT (_GET_TLS_PROCTABLE()->IsTextureEXT) -#define glPrioritizeTexturesEXT (_GET_TLS_PROCTABLE()->PrioritizeTexturesEXT) -#define glDetailTexFuncSGIS (_GET_TLS_PROCTABLE()->DetailTexFuncSGIS) -#define glGetDetailTexFuncSGIS (_GET_TLS_PROCTABLE()->GetDetailTexFuncSGIS) -#define glSharpenTexFuncSGIS (_GET_TLS_PROCTABLE()->SharpenTexFuncSGIS) -#define glGetSharpenTexFuncSGIS (_GET_TLS_PROCTABLE()->GetSharpenTexFuncSGIS) -#define glSampleMaskSGIS (_GET_TLS_PROCTABLE()->SampleMaskSGIS) -#define glSamplePatternSGIS (_GET_TLS_PROCTABLE()->SamplePatternSGIS) -#define glArrayElementEXT (_GET_TLS_PROCTABLE()->ArrayElementEXT) -#define glColorPointerEXT (_GET_TLS_PROCTABLE()->ColorPointerEXT) -#define glDrawArraysEXT (_GET_TLS_PROCTABLE()->DrawArraysEXT) -#define glEdgeFlagPointerEXT (_GET_TLS_PROCTABLE()->EdgeFlagPointerEXT) -#define glGetPointervEXT (_GET_TLS_PROCTABLE()->GetPointervEXT) -#define glIndexPointerEXT (_GET_TLS_PROCTABLE()->IndexPointerEXT) -#define glNormalPointerEXT (_GET_TLS_PROCTABLE()->NormalPointerEXT) -#define glTexCoordPointerEXT (_GET_TLS_PROCTABLE()->TexCoordPointerEXT) -#define glVertexPointerEXT (_GET_TLS_PROCTABLE()->VertexPointerEXT) -#define glBlendEquationEXT (_GET_TLS_PROCTABLE()->BlendEquationEXT) -#define glSpriteParameterfSGIX (_GET_TLS_PROCTABLE()->SpriteParameterfSGIX) -#define glSpriteParameterfvSGIX (_GET_TLS_PROCTABLE()->SpriteParameterfvSGIX) -#define glSpriteParameteriSGIX (_GET_TLS_PROCTABLE()->SpriteParameteriSGIX) -#define glSpriteParameterivSGIX (_GET_TLS_PROCTABLE()->SpriteParameterivSGIX) -#define glPointParameterfEXT (_GET_TLS_PROCTABLE()->PointParameterfEXT) -#define glPointParameterfvEXT (_GET_TLS_PROCTABLE()->PointParameterfvEXT) -#define glPointParameterfSGIS (_GET_TLS_PROCTABLE()->PointParameterfSGIS) -#define glPointParameterfvSGIS (_GET_TLS_PROCTABLE()->PointParameterfvSGIS) -#define glGetInstrumentsSGIX (_GET_TLS_PROCTABLE()->GetInstrumentsSGIX) -#define glInstrumentsBufferSGIX (_GET_TLS_PROCTABLE()->InstrumentsBufferSGIX) -#define glPollInstrumentsSGIX (_GET_TLS_PROCTABLE()->PollInstrumentsSGIX) -#define glReadInstrumentsSGIX (_GET_TLS_PROCTABLE()->ReadInstrumentsSGIX) -#define glStartInstrumentsSGIX (_GET_TLS_PROCTABLE()->StartInstrumentsSGIX) -#define glStopInstrumentsSGIX (_GET_TLS_PROCTABLE()->StopInstrumentsSGIX) -#define glFrameZoomSGIX (_GET_TLS_PROCTABLE()->FrameZoomSGIX) -#define glTagSampleBufferSGIX (_GET_TLS_PROCTABLE()->TagSampleBufferSGIX) -#define glDeformationMap3dSGIX (_GET_TLS_PROCTABLE()->DeformationMap3dSGIX) -#define glDeformationMap3fSGIX (_GET_TLS_PROCTABLE()->DeformationMap3fSGIX) -#define glDeformSGIX (_GET_TLS_PROCTABLE()->DeformSGIX) -#define glLoadIdentityDeformationMapSGIX (_GET_TLS_PROCTABLE()->LoadIdentityDeformationMapSGIX) -#define glReferencePlaneSGIX (_GET_TLS_PROCTABLE()->ReferencePlaneSGIX) -#define glFlushRasterSGIX (_GET_TLS_PROCTABLE()->FlushRasterSGIX) -#define glFogFuncSGIS (_GET_TLS_PROCTABLE()->FogFuncSGIS) -#define glGetFogFuncSGIS (_GET_TLS_PROCTABLE()->GetFogFuncSGIS) -#define glImageTransformParameteriHP (_GET_TLS_PROCTABLE()->ImageTransformParameteriHP) -#define glImageTransformParameterfHP (_GET_TLS_PROCTABLE()->ImageTransformParameterfHP) -#define glImageTransformParameterivHP (_GET_TLS_PROCTABLE()->ImageTransformParameterivHP) -#define glImageTransformParameterfvHP (_GET_TLS_PROCTABLE()->ImageTransformParameterfvHP) -#define glGetImageTransformParameterivHP (_GET_TLS_PROCTABLE()->GetImageTransformParameterivHP) -#define glGetImageTransformParameterfvHP (_GET_TLS_PROCTABLE()->GetImageTransformParameterfvHP) -#define glColorSubTableEXT (_GET_TLS_PROCTABLE()->ColorSubTableEXT) -#define glCopyColorSubTableEXT (_GET_TLS_PROCTABLE()->CopyColorSubTableEXT) -#define glHintPGI (_GET_TLS_PROCTABLE()->HintPGI) -#define glColorTableEXT (_GET_TLS_PROCTABLE()->ColorTableEXT) -#define glGetColorTableEXT (_GET_TLS_PROCTABLE()->GetColorTableEXT) -#define glGetColorTableParameterivEXT (_GET_TLS_PROCTABLE()->GetColorTableParameterivEXT) -#define glGetColorTableParameterfvEXT (_GET_TLS_PROCTABLE()->GetColorTableParameterfvEXT) -#define glGetListParameterfvSGIX (_GET_TLS_PROCTABLE()->GetListParameterfvSGIX) -#define glGetListParameterivSGIX (_GET_TLS_PROCTABLE()->GetListParameterivSGIX) -#define glListParameterfSGIX (_GET_TLS_PROCTABLE()->ListParameterfSGIX) -#define glListParameterfvSGIX (_GET_TLS_PROCTABLE()->ListParameterfvSGIX) -#define glListParameteriSGIX (_GET_TLS_PROCTABLE()->ListParameteriSGIX) -#define glListParameterivSGIX (_GET_TLS_PROCTABLE()->ListParameterivSGIX) -#define glIndexMaterialEXT (_GET_TLS_PROCTABLE()->IndexMaterialEXT) -#define glIndexFuncEXT (_GET_TLS_PROCTABLE()->IndexFuncEXT) -#define glLockArraysEXT (_GET_TLS_PROCTABLE()->LockArraysEXT) -#define glUnlockArraysEXT (_GET_TLS_PROCTABLE()->UnlockArraysEXT) -#define glCullParameterdvEXT (_GET_TLS_PROCTABLE()->CullParameterdvEXT) -#define glCullParameterfvEXT (_GET_TLS_PROCTABLE()->CullParameterfvEXT) -#define glFragmentColorMaterialSGIX (_GET_TLS_PROCTABLE()->FragmentColorMaterialSGIX) -#define glFragmentLightfSGIX (_GET_TLS_PROCTABLE()->FragmentLightfSGIX) -#define glFragmentLightfvSGIX (_GET_TLS_PROCTABLE()->FragmentLightfvSGIX) -#define glFragmentLightiSGIX (_GET_TLS_PROCTABLE()->FragmentLightiSGIX) -#define glFragmentLightivSGIX (_GET_TLS_PROCTABLE()->FragmentLightivSGIX) -#define glFragmentLightModelfSGIX (_GET_TLS_PROCTABLE()->FragmentLightModelfSGIX) -#define glFragmentLightModelfvSGIX (_GET_TLS_PROCTABLE()->FragmentLightModelfvSGIX) -#define glFragmentLightModeliSGIX (_GET_TLS_PROCTABLE()->FragmentLightModeliSGIX) -#define glFragmentLightModelivSGIX (_GET_TLS_PROCTABLE()->FragmentLightModelivSGIX) -#define glFragmentMaterialfSGIX (_GET_TLS_PROCTABLE()->FragmentMaterialfSGIX) -#define glFragmentMaterialfvSGIX (_GET_TLS_PROCTABLE()->FragmentMaterialfvSGIX) -#define glFragmentMaterialiSGIX (_GET_TLS_PROCTABLE()->FragmentMaterialiSGIX) -#define glFragmentMaterialivSGIX (_GET_TLS_PROCTABLE()->FragmentMaterialivSGIX) -#define glGetFragmentLightfvSGIX (_GET_TLS_PROCTABLE()->GetFragmentLightfvSGIX) -#define glGetFragmentLightivSGIX (_GET_TLS_PROCTABLE()->GetFragmentLightivSGIX) -#define glGetFragmentMaterialfvSGIX (_GET_TLS_PROCTABLE()->GetFragmentMaterialfvSGIX) -#define glGetFragmentMaterialivSGIX (_GET_TLS_PROCTABLE()->GetFragmentMaterialivSGIX) -#define glLightEnviSGIX (_GET_TLS_PROCTABLE()->LightEnviSGIX) -#define glDrawRangeElementsEXT (_GET_TLS_PROCTABLE()->DrawRangeElementsEXT) -#define glApplyTextureEXT (_GET_TLS_PROCTABLE()->ApplyTextureEXT) -#define glTextureLightEXT (_GET_TLS_PROCTABLE()->TextureLightEXT) -#define glTextureMaterialEXT (_GET_TLS_PROCTABLE()->TextureMaterialEXT) -#define glAsyncMarkerSGIX (_GET_TLS_PROCTABLE()->AsyncMarkerSGIX) -#define glFinishAsyncSGIX (_GET_TLS_PROCTABLE()->FinishAsyncSGIX) -#define glPollAsyncSGIX (_GET_TLS_PROCTABLE()->PollAsyncSGIX) -#define glGenAsyncMarkersSGIX (_GET_TLS_PROCTABLE()->GenAsyncMarkersSGIX) -#define glDeleteAsyncMarkersSGIX (_GET_TLS_PROCTABLE()->DeleteAsyncMarkersSGIX) -#define glIsAsyncMarkerSGIX (_GET_TLS_PROCTABLE()->IsAsyncMarkerSGIX) -#define glVertexPointervINTEL (_GET_TLS_PROCTABLE()->VertexPointervINTEL) -#define glNormalPointervINTEL (_GET_TLS_PROCTABLE()->NormalPointervINTEL) -#define glColorPointervINTEL (_GET_TLS_PROCTABLE()->ColorPointervINTEL) -#define glTexCoordPointervINTEL (_GET_TLS_PROCTABLE()->TexCoordPointervINTEL) -#define glPixelTransformParameteriEXT (_GET_TLS_PROCTABLE()->PixelTransformParameteriEXT) -#define glPixelTransformParameterfEXT (_GET_TLS_PROCTABLE()->PixelTransformParameterfEXT) -#define glPixelTransformParameterivEXT (_GET_TLS_PROCTABLE()->PixelTransformParameterivEXT) -#define glPixelTransformParameterfvEXT (_GET_TLS_PROCTABLE()->PixelTransformParameterfvEXT) -#define glSecondaryColor3bEXT (_GET_TLS_PROCTABLE()->SecondaryColor3bEXT) -#define glSecondaryColor3bvEXT (_GET_TLS_PROCTABLE()->SecondaryColor3bvEXT) -#define glSecondaryColor3dEXT (_GET_TLS_PROCTABLE()->SecondaryColor3dEXT) -#define glSecondaryColor3dvEXT (_GET_TLS_PROCTABLE()->SecondaryColor3dvEXT) -#define glSecondaryColor3fEXT (_GET_TLS_PROCTABLE()->SecondaryColor3fEXT) -#define glSecondaryColor3fvEXT (_GET_TLS_PROCTABLE()->SecondaryColor3fvEXT) -#define glSecondaryColor3iEXT (_GET_TLS_PROCTABLE()->SecondaryColor3iEXT) -#define glSecondaryColor3ivEXT (_GET_TLS_PROCTABLE()->SecondaryColor3ivEXT) -#define glSecondaryColor3sEXT (_GET_TLS_PROCTABLE()->SecondaryColor3sEXT) -#define glSecondaryColor3svEXT (_GET_TLS_PROCTABLE()->SecondaryColor3svEXT) -#define glSecondaryColor3ubEXT (_GET_TLS_PROCTABLE()->SecondaryColor3ubEXT) -#define glSecondaryColor3ubvEXT (_GET_TLS_PROCTABLE()->SecondaryColor3ubvEXT) -#define glSecondaryColor3uiEXT (_GET_TLS_PROCTABLE()->SecondaryColor3uiEXT) -#define glSecondaryColor3uivEXT (_GET_TLS_PROCTABLE()->SecondaryColor3uivEXT) -#define glSecondaryColor3usEXT (_GET_TLS_PROCTABLE()->SecondaryColor3usEXT) -#define glSecondaryColor3usvEXT (_GET_TLS_PROCTABLE()->SecondaryColor3usvEXT) -#define glSecondaryColorPointerEXT (_GET_TLS_PROCTABLE()->SecondaryColorPointerEXT) -#define glTextureNormalEXT (_GET_TLS_PROCTABLE()->TextureNormalEXT) -#define glMultiDrawArraysEXT (_GET_TLS_PROCTABLE()->MultiDrawArraysEXT) -#define glMultiDrawElementsEXT (_GET_TLS_PROCTABLE()->MultiDrawElementsEXT) -#define glFogCoordfEXT (_GET_TLS_PROCTABLE()->FogCoordfEXT) -#define glFogCoordfvEXT (_GET_TLS_PROCTABLE()->FogCoordfvEXT) -#define glFogCoorddEXT (_GET_TLS_PROCTABLE()->FogCoorddEXT) -#define glFogCoorddvEXT (_GET_TLS_PROCTABLE()->FogCoorddvEXT) -#define glFogCoordPointerEXT (_GET_TLS_PROCTABLE()->FogCoordPointerEXT) -#define glTangent3bEXT (_GET_TLS_PROCTABLE()->Tangent3bEXT) -#define glTangent3bvEXT (_GET_TLS_PROCTABLE()->Tangent3bvEXT) -#define glTangent3dEXT (_GET_TLS_PROCTABLE()->Tangent3dEXT) -#define glTangent3dvEXT (_GET_TLS_PROCTABLE()->Tangent3dvEXT) -#define glTangent3fEXT (_GET_TLS_PROCTABLE()->Tangent3fEXT) -#define glTangent3fvEXT (_GET_TLS_PROCTABLE()->Tangent3fvEXT) -#define glTangent3iEXT (_GET_TLS_PROCTABLE()->Tangent3iEXT) -#define glTangent3ivEXT (_GET_TLS_PROCTABLE()->Tangent3ivEXT) -#define glTangent3sEXT (_GET_TLS_PROCTABLE()->Tangent3sEXT) -#define glTangent3svEXT (_GET_TLS_PROCTABLE()->Tangent3svEXT) -#define glBinormal3bEXT (_GET_TLS_PROCTABLE()->Binormal3bEXT) -#define glBinormal3bvEXT (_GET_TLS_PROCTABLE()->Binormal3bvEXT) -#define glBinormal3dEXT (_GET_TLS_PROCTABLE()->Binormal3dEXT) -#define glBinormal3dvEXT (_GET_TLS_PROCTABLE()->Binormal3dvEXT) -#define glBinormal3fEXT (_GET_TLS_PROCTABLE()->Binormal3fEXT) -#define glBinormal3fvEXT (_GET_TLS_PROCTABLE()->Binormal3fvEXT) -#define glBinormal3iEXT (_GET_TLS_PROCTABLE()->Binormal3iEXT) -#define glBinormal3ivEXT (_GET_TLS_PROCTABLE()->Binormal3ivEXT) -#define glBinormal3sEXT (_GET_TLS_PROCTABLE()->Binormal3sEXT) -#define glBinormal3svEXT (_GET_TLS_PROCTABLE()->Binormal3svEXT) -#define glTangentPointerEXT (_GET_TLS_PROCTABLE()->TangentPointerEXT) -#define glBinormalPointerEXT (_GET_TLS_PROCTABLE()->BinormalPointerEXT) -#define glFinishTextureSUNX (_GET_TLS_PROCTABLE()->FinishTextureSUNX) -#define glGlobalAlphaFactorbSUN (_GET_TLS_PROCTABLE()->GlobalAlphaFactorbSUN) -#define glGlobalAlphaFactorsSUN (_GET_TLS_PROCTABLE()->GlobalAlphaFactorsSUN) -#define glGlobalAlphaFactoriSUN (_GET_TLS_PROCTABLE()->GlobalAlphaFactoriSUN) -#define glGlobalAlphaFactorfSUN (_GET_TLS_PROCTABLE()->GlobalAlphaFactorfSUN) -#define glGlobalAlphaFactordSUN (_GET_TLS_PROCTABLE()->GlobalAlphaFactordSUN) -#define glGlobalAlphaFactorubSUN (_GET_TLS_PROCTABLE()->GlobalAlphaFactorubSUN) -#define glGlobalAlphaFactorusSUN (_GET_TLS_PROCTABLE()->GlobalAlphaFactorusSUN) -#define glGlobalAlphaFactoruiSUN (_GET_TLS_PROCTABLE()->GlobalAlphaFactoruiSUN) -#define glReplacementCodeuiSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiSUN) -#define glReplacementCodeusSUN (_GET_TLS_PROCTABLE()->ReplacementCodeusSUN) -#define glReplacementCodeubSUN (_GET_TLS_PROCTABLE()->ReplacementCodeubSUN) -#define glReplacementCodeuivSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuivSUN) -#define glReplacementCodeusvSUN (_GET_TLS_PROCTABLE()->ReplacementCodeusvSUN) -#define glReplacementCodeubvSUN (_GET_TLS_PROCTABLE()->ReplacementCodeubvSUN) -#define glReplacementCodePointerSUN (_GET_TLS_PROCTABLE()->ReplacementCodePointerSUN) -#define glColor4ubVertex2fSUN (_GET_TLS_PROCTABLE()->Color4ubVertex2fSUN) -#define glColor4ubVertex2fvSUN (_GET_TLS_PROCTABLE()->Color4ubVertex2fvSUN) -#define glColor4ubVertex3fSUN (_GET_TLS_PROCTABLE()->Color4ubVertex3fSUN) -#define glColor4ubVertex3fvSUN (_GET_TLS_PROCTABLE()->Color4ubVertex3fvSUN) -#define glColor3fVertex3fSUN (_GET_TLS_PROCTABLE()->Color3fVertex3fSUN) -#define glColor3fVertex3fvSUN (_GET_TLS_PROCTABLE()->Color3fVertex3fvSUN) -#define glNormal3fVertex3fSUN (_GET_TLS_PROCTABLE()->Normal3fVertex3fSUN) -#define glNormal3fVertex3fvSUN (_GET_TLS_PROCTABLE()->Normal3fVertex3fvSUN) -#define glColor4fNormal3fVertex3fSUN (_GET_TLS_PROCTABLE()->Color4fNormal3fVertex3fSUN) -#define glColor4fNormal3fVertex3fvSUN (_GET_TLS_PROCTABLE()->Color4fNormal3fVertex3fvSUN) -#define glTexCoord2fVertex3fSUN (_GET_TLS_PROCTABLE()->TexCoord2fVertex3fSUN) -#define glTexCoord2fVertex3fvSUN (_GET_TLS_PROCTABLE()->TexCoord2fVertex3fvSUN) -#define glTexCoord4fVertex4fSUN (_GET_TLS_PROCTABLE()->TexCoord4fVertex4fSUN) -#define glTexCoord4fVertex4fvSUN (_GET_TLS_PROCTABLE()->TexCoord4fVertex4fvSUN) -#define glTexCoord2fColor4ubVertex3fSUN (_GET_TLS_PROCTABLE()->TexCoord2fColor4ubVertex3fSUN) -#define glTexCoord2fColor4ubVertex3fvSUN (_GET_TLS_PROCTABLE()->TexCoord2fColor4ubVertex3fvSUN) -#define glTexCoord2fColor3fVertex3fSUN (_GET_TLS_PROCTABLE()->TexCoord2fColor3fVertex3fSUN) -#define glTexCoord2fColor3fVertex3fvSUN (_GET_TLS_PROCTABLE()->TexCoord2fColor3fVertex3fvSUN) -#define glTexCoord2fNormal3fVertex3fSUN (_GET_TLS_PROCTABLE()->TexCoord2fNormal3fVertex3fSUN) -#define glTexCoord2fNormal3fVertex3fvSUN (_GET_TLS_PROCTABLE()->TexCoord2fNormal3fVertex3fvSUN) -#define glTexCoord2fColor4fNormal3fVertex3fSUN (_GET_TLS_PROCTABLE()->TexCoord2fColor4fNormal3fVertex3fSUN) -#define glTexCoord2fColor4fNormal3fVertex3fvSUN (_GET_TLS_PROCTABLE()->TexCoord2fColor4fNormal3fVertex3fvSUN) -#define glTexCoord4fColor4fNormal3fVertex4fSUN (_GET_TLS_PROCTABLE()->TexCoord4fColor4fNormal3fVertex4fSUN) -#define glTexCoord4fColor4fNormal3fVertex4fvSUN (_GET_TLS_PROCTABLE()->TexCoord4fColor4fNormal3fVertex4fvSUN) -#define glReplacementCodeuiVertex3fSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiVertex3fSUN) -#define glReplacementCodeuiVertex3fvSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiVertex3fvSUN) -#define glReplacementCodeuiColor4ubVertex3fSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiColor4ubVertex3fSUN) -#define glReplacementCodeuiColor4ubVertex3fvSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiColor4ubVertex3fvSUN) -#define glReplacementCodeuiColor3fVertex3fSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiColor3fVertex3fSUN) -#define glReplacementCodeuiColor3fVertex3fvSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiColor3fVertex3fvSUN) -#define glReplacementCodeuiNormal3fVertex3fSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiNormal3fVertex3fSUN) -#define glReplacementCodeuiNormal3fVertex3fvSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiNormal3fVertex3fvSUN) -#define glReplacementCodeuiColor4fNormal3fVertex3fSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiColor4fNormal3fVertex3fSUN) -#define glReplacementCodeuiColor4fNormal3fVertex3fvSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiColor4fNormal3fVertex3fvSUN) -#define glReplacementCodeuiTexCoord2fVertex3fSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiTexCoord2fVertex3fSUN) -#define glReplacementCodeuiTexCoord2fVertex3fvSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiTexCoord2fVertex3fvSUN) -#define glReplacementCodeuiTexCoord2fNormal3fVertex3fSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiTexCoord2fNormal3fVertex3fSUN) -#define glReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiTexCoord2fNormal3fVertex3fvSUN) -#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fSUN) -#define glReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN (_GET_TLS_PROCTABLE()->ReplacementCodeuiTexCoord2fColor4fNormal3fVertex3fvSUN) -#define glBlendFuncSeparateEXT (_GET_TLS_PROCTABLE()->BlendFuncSeparateEXT) -#define glBlendFuncSeparateINGR (_GET_TLS_PROCTABLE()->BlendFuncSeparateINGR) -#define glVertexWeightfEXT (_GET_TLS_PROCTABLE()->VertexWeightfEXT) -#define glVertexWeightfvEXT (_GET_TLS_PROCTABLE()->VertexWeightfvEXT) -#define glVertexWeightPointerEXT (_GET_TLS_PROCTABLE()->VertexWeightPointerEXT) -#define glFlushVertexArrayRangeNV (_GET_TLS_PROCTABLE()->FlushVertexArrayRangeNV) -#define glVertexArrayRangeNV (_GET_TLS_PROCTABLE()->VertexArrayRangeNV) -#define glCombinerParameterfvNV (_GET_TLS_PROCTABLE()->CombinerParameterfvNV) -#define glCombinerParameterfNV (_GET_TLS_PROCTABLE()->CombinerParameterfNV) -#define glCombinerParameterivNV (_GET_TLS_PROCTABLE()->CombinerParameterivNV) -#define glCombinerParameteriNV (_GET_TLS_PROCTABLE()->CombinerParameteriNV) -#define glCombinerInputNV (_GET_TLS_PROCTABLE()->CombinerInputNV) -#define glCombinerOutputNV (_GET_TLS_PROCTABLE()->CombinerOutputNV) -#define glFinalCombinerInputNV (_GET_TLS_PROCTABLE()->FinalCombinerInputNV) -#define glGetCombinerInputParameterfvNV (_GET_TLS_PROCTABLE()->GetCombinerInputParameterfvNV) -#define glGetCombinerInputParameterivNV (_GET_TLS_PROCTABLE()->GetCombinerInputParameterivNV) -#define glGetCombinerOutputParameterfvNV (_GET_TLS_PROCTABLE()->GetCombinerOutputParameterfvNV) -#define glGetCombinerOutputParameterivNV (_GET_TLS_PROCTABLE()->GetCombinerOutputParameterivNV) -#define glGetFinalCombinerInputParameterfvNV (_GET_TLS_PROCTABLE()->GetFinalCombinerInputParameterfvNV) -#define glGetFinalCombinerInputParameterivNV (_GET_TLS_PROCTABLE()->GetFinalCombinerInputParameterivNV) -#define glResizeBuffersMESA (_GET_TLS_PROCTABLE()->ResizeBuffersMESA) -#define glWindowPos2dMESA (_GET_TLS_PROCTABLE()->WindowPos2dMESA) -#define glWindowPos2dvMESA (_GET_TLS_PROCTABLE()->WindowPos2dvMESA) -#define glWindowPos2fMESA (_GET_TLS_PROCTABLE()->WindowPos2fMESA) -#define glWindowPos2fvMESA (_GET_TLS_PROCTABLE()->WindowPos2fvMESA) -#define glWindowPos2iMESA (_GET_TLS_PROCTABLE()->WindowPos2iMESA) -#define glWindowPos2ivMESA (_GET_TLS_PROCTABLE()->WindowPos2ivMESA) -#define glWindowPos2sMESA (_GET_TLS_PROCTABLE()->WindowPos2sMESA) -#define glWindowPos2svMESA (_GET_TLS_PROCTABLE()->WindowPos2svMESA) -#define glWindowPos3dMESA (_GET_TLS_PROCTABLE()->WindowPos3dMESA) -#define glWindowPos3dvMESA (_GET_TLS_PROCTABLE()->WindowPos3dvMESA) -#define glWindowPos3fMESA (_GET_TLS_PROCTABLE()->WindowPos3fMESA) -#define glWindowPos3fvMESA (_GET_TLS_PROCTABLE()->WindowPos3fvMESA) -#define glWindowPos3iMESA (_GET_TLS_PROCTABLE()->WindowPos3iMESA) -#define glWindowPos3ivMESA (_GET_TLS_PROCTABLE()->WindowPos3ivMESA) -#define glWindowPos3sMESA (_GET_TLS_PROCTABLE()->WindowPos3sMESA) -#define glWindowPos3svMESA (_GET_TLS_PROCTABLE()->WindowPos3svMESA) -#define glWindowPos4dMESA (_GET_TLS_PROCTABLE()->WindowPos4dMESA) -#define glWindowPos4dvMESA (_GET_TLS_PROCTABLE()->WindowPos4dvMESA) -#define glWindowPos4fMESA (_GET_TLS_PROCTABLE()->WindowPos4fMESA) -#define glWindowPos4fvMESA (_GET_TLS_PROCTABLE()->WindowPos4fvMESA) -#define glWindowPos4iMESA (_GET_TLS_PROCTABLE()->WindowPos4iMESA) -#define glWindowPos4ivMESA (_GET_TLS_PROCTABLE()->WindowPos4ivMESA) -#define glWindowPos4sMESA (_GET_TLS_PROCTABLE()->WindowPos4sMESA) -#define glWindowPos4svMESA (_GET_TLS_PROCTABLE()->WindowPos4svMESA) -#define glMultiModeDrawArraysIBM (_GET_TLS_PROCTABLE()->MultiModeDrawArraysIBM) -#define glMultiModeDrawElementsIBM (_GET_TLS_PROCTABLE()->MultiModeDrawElementsIBM) -#define glColorPointerListIBM (_GET_TLS_PROCTABLE()->ColorPointerListIBM) -#define glSecondaryColorPointerListIBM (_GET_TLS_PROCTABLE()->SecondaryColorPointerListIBM) -#define glEdgeFlagPointerListIBM (_GET_TLS_PROCTABLE()->EdgeFlagPointerListIBM) -#define glFogCoordPointerListIBM (_GET_TLS_PROCTABLE()->FogCoordPointerListIBM) -#define glIndexPointerListIBM (_GET_TLS_PROCTABLE()->IndexPointerListIBM) -#define glNormalPointerListIBM (_GET_TLS_PROCTABLE()->NormalPointerListIBM) -#define glTexCoordPointerListIBM (_GET_TLS_PROCTABLE()->TexCoordPointerListIBM) -#define glVertexPointerListIBM (_GET_TLS_PROCTABLE()->VertexPointerListIBM) -#define glTbufferMask3DFX (_GET_TLS_PROCTABLE()->TbufferMask3DFX) -#define glSampleMaskEXT (_GET_TLS_PROCTABLE()->SampleMaskEXT) -#define glSamplePatternEXT (_GET_TLS_PROCTABLE()->SamplePatternEXT) -#define glTextureColorMaskSGIS (_GET_TLS_PROCTABLE()->TextureColorMaskSGIS) -#define glIglooInterfaceSGIX (_GET_TLS_PROCTABLE()->IglooInterfaceSGIX) -#define glDeleteFencesNV (_GET_TLS_PROCTABLE()->DeleteFencesNV) -#define glGenFencesNV (_GET_TLS_PROCTABLE()->GenFencesNV) -#define glIsFenceNV (_GET_TLS_PROCTABLE()->IsFenceNV) -#define glTestFenceNV (_GET_TLS_PROCTABLE()->TestFenceNV) -#define glGetFenceivNV (_GET_TLS_PROCTABLE()->GetFenceivNV) -#define glFinishFenceNV (_GET_TLS_PROCTABLE()->FinishFenceNV) -#define glSetFenceNV (_GET_TLS_PROCTABLE()->SetFenceNV) -#define glMapControlPointsNV (_GET_TLS_PROCTABLE()->MapControlPointsNV) -#define glMapParameterivNV (_GET_TLS_PROCTABLE()->MapParameterivNV) -#define glMapParameterfvNV (_GET_TLS_PROCTABLE()->MapParameterfvNV) -#define glGetMapControlPointsNV (_GET_TLS_PROCTABLE()->GetMapControlPointsNV) -#define glGetMapParameterivNV (_GET_TLS_PROCTABLE()->GetMapParameterivNV) -#define glGetMapParameterfvNV (_GET_TLS_PROCTABLE()->GetMapParameterfvNV) -#define glGetMapAttribParameterivNV (_GET_TLS_PROCTABLE()->GetMapAttribParameterivNV) -#define glGetMapAttribParameterfvNV (_GET_TLS_PROCTABLE()->GetMapAttribParameterfvNV) -#define glEvalMapsNV (_GET_TLS_PROCTABLE()->EvalMapsNV) -#define glCombinerStageParameterfvNV (_GET_TLS_PROCTABLE()->CombinerStageParameterfvNV) -#define glGetCombinerStageParameterfvNV (_GET_TLS_PROCTABLE()->GetCombinerStageParameterfvNV) -#define glAreProgramsResidentNV (_GET_TLS_PROCTABLE()->AreProgramsResidentNV) -#define glBindProgramNV (_GET_TLS_PROCTABLE()->BindProgramNV) -#define glDeleteProgramsNV (_GET_TLS_PROCTABLE()->DeleteProgramsNV) -#define glExecuteProgramNV (_GET_TLS_PROCTABLE()->ExecuteProgramNV) -#define glGenProgramsNV (_GET_TLS_PROCTABLE()->GenProgramsNV) -#define glGetProgramParameterdvNV (_GET_TLS_PROCTABLE()->GetProgramParameterdvNV) -#define glGetProgramParameterfvNV (_GET_TLS_PROCTABLE()->GetProgramParameterfvNV) -#define glGetProgramivNV (_GET_TLS_PROCTABLE()->GetProgramivNV) -#define glGetProgramStringNV (_GET_TLS_PROCTABLE()->GetProgramStringNV) -#define glGetTrackMatrixivNV (_GET_TLS_PROCTABLE()->GetTrackMatrixivNV) -#define glGetVertexAttribdvNV (_GET_TLS_PROCTABLE()->GetVertexAttribdvNV) -#define glGetVertexAttribfvNV (_GET_TLS_PROCTABLE()->GetVertexAttribfvNV) -#define glGetVertexAttribivNV (_GET_TLS_PROCTABLE()->GetVertexAttribivNV) -#define glGetVertexAttribPointervNV (_GET_TLS_PROCTABLE()->GetVertexAttribPointervNV) -#define glIsProgramNV (_GET_TLS_PROCTABLE()->IsProgramNV) -#define glLoadProgramNV (_GET_TLS_PROCTABLE()->LoadProgramNV) -#define glProgramParameter4dNV (_GET_TLS_PROCTABLE()->ProgramParameter4dNV) -#define glProgramParameter4dvNV (_GET_TLS_PROCTABLE()->ProgramParameter4dvNV) -#define glProgramParameter4fNV (_GET_TLS_PROCTABLE()->ProgramParameter4fNV) -#define glProgramParameter4fvNV (_GET_TLS_PROCTABLE()->ProgramParameter4fvNV) -#define glProgramParameters4dvNV (_GET_TLS_PROCTABLE()->ProgramParameters4dvNV) -#define glProgramParameters4fvNV (_GET_TLS_PROCTABLE()->ProgramParameters4fvNV) -#define glRequestResidentProgramsNV (_GET_TLS_PROCTABLE()->RequestResidentProgramsNV) -#define glTrackMatrixNV (_GET_TLS_PROCTABLE()->TrackMatrixNV) -#define glVertexAttribPointerNV (_GET_TLS_PROCTABLE()->VertexAttribPointerNV) -#define glVertexAttrib1dNV (_GET_TLS_PROCTABLE()->VertexAttrib1dNV) -#define glVertexAttrib1dvNV (_GET_TLS_PROCTABLE()->VertexAttrib1dvNV) -#define glVertexAttrib1fNV (_GET_TLS_PROCTABLE()->VertexAttrib1fNV) -#define glVertexAttrib1fvNV (_GET_TLS_PROCTABLE()->VertexAttrib1fvNV) -#define glVertexAttrib1sNV (_GET_TLS_PROCTABLE()->VertexAttrib1sNV) -#define glVertexAttrib1svNV (_GET_TLS_PROCTABLE()->VertexAttrib1svNV) -#define glVertexAttrib2dNV (_GET_TLS_PROCTABLE()->VertexAttrib2dNV) -#define glVertexAttrib2dvNV (_GET_TLS_PROCTABLE()->VertexAttrib2dvNV) -#define glVertexAttrib2fNV (_GET_TLS_PROCTABLE()->VertexAttrib2fNV) -#define glVertexAttrib2fvNV (_GET_TLS_PROCTABLE()->VertexAttrib2fvNV) -#define glVertexAttrib2sNV (_GET_TLS_PROCTABLE()->VertexAttrib2sNV) -#define glVertexAttrib2svNV (_GET_TLS_PROCTABLE()->VertexAttrib2svNV) -#define glVertexAttrib3dNV (_GET_TLS_PROCTABLE()->VertexAttrib3dNV) -#define glVertexAttrib3dvNV (_GET_TLS_PROCTABLE()->VertexAttrib3dvNV) -#define glVertexAttrib3fNV (_GET_TLS_PROCTABLE()->VertexAttrib3fNV) -#define glVertexAttrib3fvNV (_GET_TLS_PROCTABLE()->VertexAttrib3fvNV) -#define glVertexAttrib3sNV (_GET_TLS_PROCTABLE()->VertexAttrib3sNV) -#define glVertexAttrib3svNV (_GET_TLS_PROCTABLE()->VertexAttrib3svNV) -#define glVertexAttrib4dNV (_GET_TLS_PROCTABLE()->VertexAttrib4dNV) -#define glVertexAttrib4dvNV (_GET_TLS_PROCTABLE()->VertexAttrib4dvNV) -#define glVertexAttrib4fNV (_GET_TLS_PROCTABLE()->VertexAttrib4fNV) -#define glVertexAttrib4fvNV (_GET_TLS_PROCTABLE()->VertexAttrib4fvNV) -#define glVertexAttrib4sNV (_GET_TLS_PROCTABLE()->VertexAttrib4sNV) -#define glVertexAttrib4svNV (_GET_TLS_PROCTABLE()->VertexAttrib4svNV) -#define glVertexAttrib4ubNV (_GET_TLS_PROCTABLE()->VertexAttrib4ubNV) -#define glVertexAttrib4ubvNV (_GET_TLS_PROCTABLE()->VertexAttrib4ubvNV) -#define glVertexAttribs1dvNV (_GET_TLS_PROCTABLE()->VertexAttribs1dvNV) -#define glVertexAttribs1fvNV (_GET_TLS_PROCTABLE()->VertexAttribs1fvNV) -#define glVertexAttribs1svNV (_GET_TLS_PROCTABLE()->VertexAttribs1svNV) -#define glVertexAttribs2dvNV (_GET_TLS_PROCTABLE()->VertexAttribs2dvNV) -#define glVertexAttribs2fvNV (_GET_TLS_PROCTABLE()->VertexAttribs2fvNV) -#define glVertexAttribs2svNV (_GET_TLS_PROCTABLE()->VertexAttribs2svNV) -#define glVertexAttribs3dvNV (_GET_TLS_PROCTABLE()->VertexAttribs3dvNV) -#define glVertexAttribs3fvNV (_GET_TLS_PROCTABLE()->VertexAttribs3fvNV) -#define glVertexAttribs3svNV (_GET_TLS_PROCTABLE()->VertexAttribs3svNV) -#define glVertexAttribs4dvNV (_GET_TLS_PROCTABLE()->VertexAttribs4dvNV) -#define glVertexAttribs4fvNV (_GET_TLS_PROCTABLE()->VertexAttribs4fvNV) -#define glVertexAttribs4svNV (_GET_TLS_PROCTABLE()->VertexAttribs4svNV) -#define glVertexAttribs4ubvNV (_GET_TLS_PROCTABLE()->VertexAttribs4ubvNV) -#define glTexBumpParameterivATI (_GET_TLS_PROCTABLE()->TexBumpParameterivATI) -#define glTexBumpParameterfvATI (_GET_TLS_PROCTABLE()->TexBumpParameterfvATI) -#define glGetTexBumpParameterivATI (_GET_TLS_PROCTABLE()->GetTexBumpParameterivATI) -#define glGetTexBumpParameterfvATI (_GET_TLS_PROCTABLE()->GetTexBumpParameterfvATI) -#define glGenFragmentShadersATI (_GET_TLS_PROCTABLE()->GenFragmentShadersATI) -#define glBindFragmentShaderATI (_GET_TLS_PROCTABLE()->BindFragmentShaderATI) -#define glDeleteFragmentShaderATI (_GET_TLS_PROCTABLE()->DeleteFragmentShaderATI) -#define glBeginFragmentShaderATI (_GET_TLS_PROCTABLE()->BeginFragmentShaderATI) -#define glEndFragmentShaderATI (_GET_TLS_PROCTABLE()->EndFragmentShaderATI) -#define glPassTexCoordATI (_GET_TLS_PROCTABLE()->PassTexCoordATI) -#define glSampleMapATI (_GET_TLS_PROCTABLE()->SampleMapATI) -#define glColorFragmentOp1ATI (_GET_TLS_PROCTABLE()->ColorFragmentOp1ATI) -#define glColorFragmentOp2ATI (_GET_TLS_PROCTABLE()->ColorFragmentOp2ATI) -#define glColorFragmentOp3ATI (_GET_TLS_PROCTABLE()->ColorFragmentOp3ATI) -#define glAlphaFragmentOp1ATI (_GET_TLS_PROCTABLE()->AlphaFragmentOp1ATI) -#define glAlphaFragmentOp2ATI (_GET_TLS_PROCTABLE()->AlphaFragmentOp2ATI) -#define glAlphaFragmentOp3ATI (_GET_TLS_PROCTABLE()->AlphaFragmentOp3ATI) -#define glSetFragmentShaderConstantATI (_GET_TLS_PROCTABLE()->SetFragmentShaderConstantATI) -#define glPNTrianglesiATI (_GET_TLS_PROCTABLE()->PNTrianglesiATI) -#define glPNTrianglesfATI (_GET_TLS_PROCTABLE()->PNTrianglesfATI) -#define glNewObjectBufferATI (_GET_TLS_PROCTABLE()->NewObjectBufferATI) -#define glIsObjectBufferATI (_GET_TLS_PROCTABLE()->IsObjectBufferATI) -#define glUpdateObjectBufferATI (_GET_TLS_PROCTABLE()->UpdateObjectBufferATI) -#define glGetObjectBufferfvATI (_GET_TLS_PROCTABLE()->GetObjectBufferfvATI) -#define glGetObjectBufferivATI (_GET_TLS_PROCTABLE()->GetObjectBufferivATI) -#define glFreeObjectBufferATI (_GET_TLS_PROCTABLE()->FreeObjectBufferATI) -#define glArrayObjectATI (_GET_TLS_PROCTABLE()->ArrayObjectATI) -#define glGetArrayObjectfvATI (_GET_TLS_PROCTABLE()->GetArrayObjectfvATI) -#define glGetArrayObjectivATI (_GET_TLS_PROCTABLE()->GetArrayObjectivATI) -#define glVariantArrayObjectATI (_GET_TLS_PROCTABLE()->VariantArrayObjectATI) -#define glGetVariantArrayObjectfvATI (_GET_TLS_PROCTABLE()->GetVariantArrayObjectfvATI) -#define glGetVariantArrayObjectivATI (_GET_TLS_PROCTABLE()->GetVariantArrayObjectivATI) -#define glBeginVertexShaderEXT (_GET_TLS_PROCTABLE()->BeginVertexShaderEXT) -#define glEndVertexShaderEXT (_GET_TLS_PROCTABLE()->EndVertexShaderEXT) -#define glBindVertexShaderEXT (_GET_TLS_PROCTABLE()->BindVertexShaderEXT) -#define glGenVertexShadersEXT (_GET_TLS_PROCTABLE()->GenVertexShadersEXT) -#define glDeleteVertexShaderEXT (_GET_TLS_PROCTABLE()->DeleteVertexShaderEXT) -#define glShaderOp1EXT (_GET_TLS_PROCTABLE()->ShaderOp1EXT) -#define glShaderOp2EXT (_GET_TLS_PROCTABLE()->ShaderOp2EXT) -#define glShaderOp3EXT (_GET_TLS_PROCTABLE()->ShaderOp3EXT) -#define glSwizzleEXT (_GET_TLS_PROCTABLE()->SwizzleEXT) -#define glWriteMaskEXT (_GET_TLS_PROCTABLE()->WriteMaskEXT) -#define glInsertComponentEXT (_GET_TLS_PROCTABLE()->InsertComponentEXT) -#define glExtractComponentEXT (_GET_TLS_PROCTABLE()->ExtractComponentEXT) -#define glGenSymbolsEXT (_GET_TLS_PROCTABLE()->GenSymbolsEXT) -#define glSetInvariantEXT (_GET_TLS_PROCTABLE()->SetInvariantEXT) -#define glSetLocalConstantEXT (_GET_TLS_PROCTABLE()->SetLocalConstantEXT) -#define glVariantbvEXT (_GET_TLS_PROCTABLE()->VariantbvEXT) -#define glVariantsvEXT (_GET_TLS_PROCTABLE()->VariantsvEXT) -#define glVariantivEXT (_GET_TLS_PROCTABLE()->VariantivEXT) -#define glVariantfvEXT (_GET_TLS_PROCTABLE()->VariantfvEXT) -#define glVariantdvEXT (_GET_TLS_PROCTABLE()->VariantdvEXT) -#define glVariantubvEXT (_GET_TLS_PROCTABLE()->VariantubvEXT) -#define glVariantusvEXT (_GET_TLS_PROCTABLE()->VariantusvEXT) -#define glVariantuivEXT (_GET_TLS_PROCTABLE()->VariantuivEXT) -#define glVariantPointerEXT (_GET_TLS_PROCTABLE()->VariantPointerEXT) -#define glEnableVariantClientStateEXT (_GET_TLS_PROCTABLE()->EnableVariantClientStateEXT) -#define glDisableVariantClientStateEXT (_GET_TLS_PROCTABLE()->DisableVariantClientStateEXT) -#define glBindLightParameterEXT (_GET_TLS_PROCTABLE()->BindLightParameterEXT) -#define glBindMaterialParameterEXT (_GET_TLS_PROCTABLE()->BindMaterialParameterEXT) -#define glBindTexGenParameterEXT (_GET_TLS_PROCTABLE()->BindTexGenParameterEXT) -#define glBindTextureUnitParameterEXT (_GET_TLS_PROCTABLE()->BindTextureUnitParameterEXT) -#define glBindParameterEXT (_GET_TLS_PROCTABLE()->BindParameterEXT) -#define glIsVariantEnabledEXT (_GET_TLS_PROCTABLE()->IsVariantEnabledEXT) -#define glGetVariantBooleanvEXT (_GET_TLS_PROCTABLE()->GetVariantBooleanvEXT) -#define glGetVariantIntegervEXT (_GET_TLS_PROCTABLE()->GetVariantIntegervEXT) -#define glGetVariantFloatvEXT (_GET_TLS_PROCTABLE()->GetVariantFloatvEXT) -#define glGetVariantPointervEXT (_GET_TLS_PROCTABLE()->GetVariantPointervEXT) -#define glGetInvariantBooleanvEXT (_GET_TLS_PROCTABLE()->GetInvariantBooleanvEXT) -#define glGetInvariantIntegervEXT (_GET_TLS_PROCTABLE()->GetInvariantIntegervEXT) -#define glGetInvariantFloatvEXT (_GET_TLS_PROCTABLE()->GetInvariantFloatvEXT) -#define glGetLocalConstantBooleanvEXT (_GET_TLS_PROCTABLE()->GetLocalConstantBooleanvEXT) -#define glGetLocalConstantIntegervEXT (_GET_TLS_PROCTABLE()->GetLocalConstantIntegervEXT) -#define glGetLocalConstantFloatvEXT (_GET_TLS_PROCTABLE()->GetLocalConstantFloatvEXT) -#define glVertexStream1sATI (_GET_TLS_PROCTABLE()->VertexStream1sATI) -#define glVertexStream1svATI (_GET_TLS_PROCTABLE()->VertexStream1svATI) -#define glVertexStream1iATI (_GET_TLS_PROCTABLE()->VertexStream1iATI) -#define glVertexStream1ivATI (_GET_TLS_PROCTABLE()->VertexStream1ivATI) -#define glVertexStream1fATI (_GET_TLS_PROCTABLE()->VertexStream1fATI) -#define glVertexStream1fvATI (_GET_TLS_PROCTABLE()->VertexStream1fvATI) -#define glVertexStream1dATI (_GET_TLS_PROCTABLE()->VertexStream1dATI) -#define glVertexStream1dvATI (_GET_TLS_PROCTABLE()->VertexStream1dvATI) -#define glVertexStream2sATI (_GET_TLS_PROCTABLE()->VertexStream2sATI) -#define glVertexStream2svATI (_GET_TLS_PROCTABLE()->VertexStream2svATI) -#define glVertexStream2iATI (_GET_TLS_PROCTABLE()->VertexStream2iATI) -#define glVertexStream2ivATI (_GET_TLS_PROCTABLE()->VertexStream2ivATI) -#define glVertexStream2fATI (_GET_TLS_PROCTABLE()->VertexStream2fATI) -#define glVertexStream2fvATI (_GET_TLS_PROCTABLE()->VertexStream2fvATI) -#define glVertexStream2dATI (_GET_TLS_PROCTABLE()->VertexStream2dATI) -#define glVertexStream2dvATI (_GET_TLS_PROCTABLE()->VertexStream2dvATI) -#define glVertexStream3sATI (_GET_TLS_PROCTABLE()->VertexStream3sATI) -#define glVertexStream3svATI (_GET_TLS_PROCTABLE()->VertexStream3svATI) -#define glVertexStream3iATI (_GET_TLS_PROCTABLE()->VertexStream3iATI) -#define glVertexStream3ivATI (_GET_TLS_PROCTABLE()->VertexStream3ivATI) -#define glVertexStream3fATI (_GET_TLS_PROCTABLE()->VertexStream3fATI) -#define glVertexStream3fvATI (_GET_TLS_PROCTABLE()->VertexStream3fvATI) -#define glVertexStream3dATI (_GET_TLS_PROCTABLE()->VertexStream3dATI) -#define glVertexStream3dvATI (_GET_TLS_PROCTABLE()->VertexStream3dvATI) -#define glVertexStream4sATI (_GET_TLS_PROCTABLE()->VertexStream4sATI) -#define glVertexStream4svATI (_GET_TLS_PROCTABLE()->VertexStream4svATI) -#define glVertexStream4iATI (_GET_TLS_PROCTABLE()->VertexStream4iATI) -#define glVertexStream4ivATI (_GET_TLS_PROCTABLE()->VertexStream4ivATI) -#define glVertexStream4fATI (_GET_TLS_PROCTABLE()->VertexStream4fATI) -#define glVertexStream4fvATI (_GET_TLS_PROCTABLE()->VertexStream4fvATI) -#define glVertexStream4dATI (_GET_TLS_PROCTABLE()->VertexStream4dATI) -#define glVertexStream4dvATI (_GET_TLS_PROCTABLE()->VertexStream4dvATI) -#define glNormalStream3bATI (_GET_TLS_PROCTABLE()->NormalStream3bATI) -#define glNormalStream3bvATI (_GET_TLS_PROCTABLE()->NormalStream3bvATI) -#define glNormalStream3sATI (_GET_TLS_PROCTABLE()->NormalStream3sATI) -#define glNormalStream3svATI (_GET_TLS_PROCTABLE()->NormalStream3svATI) -#define glNormalStream3iATI (_GET_TLS_PROCTABLE()->NormalStream3iATI) -#define glNormalStream3ivATI (_GET_TLS_PROCTABLE()->NormalStream3ivATI) -#define glNormalStream3fATI (_GET_TLS_PROCTABLE()->NormalStream3fATI) -#define glNormalStream3fvATI (_GET_TLS_PROCTABLE()->NormalStream3fvATI) -#define glNormalStream3dATI (_GET_TLS_PROCTABLE()->NormalStream3dATI) -#define glNormalStream3dvATI (_GET_TLS_PROCTABLE()->NormalStream3dvATI) -#define glClientActiveVertexStreamATI (_GET_TLS_PROCTABLE()->ClientActiveVertexStreamATI) -#define glVertexBlendEnviATI (_GET_TLS_PROCTABLE()->VertexBlendEnviATI) -#define glVertexBlendEnvfATI (_GET_TLS_PROCTABLE()->VertexBlendEnvfATI) -#define glElementPointerATI (_GET_TLS_PROCTABLE()->ElementPointerATI) -#define glDrawElementArrayATI (_GET_TLS_PROCTABLE()->DrawElementArrayATI) -#define glDrawRangeElementArrayATI (_GET_TLS_PROCTABLE()->DrawRangeElementArrayATI) -#define glDrawMeshArraysSUN (_GET_TLS_PROCTABLE()->DrawMeshArraysSUN) -#define glGenOcclusionQueriesNV (_GET_TLS_PROCTABLE()->GenOcclusionQueriesNV) -#define glDeleteOcclusionQueriesNV (_GET_TLS_PROCTABLE()->DeleteOcclusionQueriesNV) -#define glIsOcclusionQueryNV (_GET_TLS_PROCTABLE()->IsOcclusionQueryNV) -#define glBeginOcclusionQueryNV (_GET_TLS_PROCTABLE()->BeginOcclusionQueryNV) -#define glEndOcclusionQueryNV (_GET_TLS_PROCTABLE()->EndOcclusionQueryNV) -#define glGetOcclusionQueryivNV (_GET_TLS_PROCTABLE()->GetOcclusionQueryivNV) -#define glGetOcclusionQueryuivNV (_GET_TLS_PROCTABLE()->GetOcclusionQueryuivNV) -#define glPointParameteriNV (_GET_TLS_PROCTABLE()->PointParameteriNV) -#define glPointParameterivNV (_GET_TLS_PROCTABLE()->PointParameterivNV) -#define glActiveStencilFaceEXT (_GET_TLS_PROCTABLE()->ActiveStencilFaceEXT) -#define glElementPointerAPPLE (_GET_TLS_PROCTABLE()->ElementPointerAPPLE) -#define glDrawElementArrayAPPLE (_GET_TLS_PROCTABLE()->DrawElementArrayAPPLE) -#define glDrawRangeElementArrayAPPLE (_GET_TLS_PROCTABLE()->DrawRangeElementArrayAPPLE) -#define glMultiDrawElementArrayAPPLE (_GET_TLS_PROCTABLE()->MultiDrawElementArrayAPPLE) -#define glMultiDrawRangeElementArrayAPPLE (_GET_TLS_PROCTABLE()->MultiDrawRangeElementArrayAPPLE) -#define glGenFencesAPPLE (_GET_TLS_PROCTABLE()->GenFencesAPPLE) -#define glDeleteFencesAPPLE (_GET_TLS_PROCTABLE()->DeleteFencesAPPLE) -#define glSetFenceAPPLE (_GET_TLS_PROCTABLE()->SetFenceAPPLE) -#define glIsFenceAPPLE (_GET_TLS_PROCTABLE()->IsFenceAPPLE) -#define glTestFenceAPPLE (_GET_TLS_PROCTABLE()->TestFenceAPPLE) -#define glFinishFenceAPPLE (_GET_TLS_PROCTABLE()->FinishFenceAPPLE) -#define glTestObjectAPPLE (_GET_TLS_PROCTABLE()->TestObjectAPPLE) -#define glFinishObjectAPPLE (_GET_TLS_PROCTABLE()->FinishObjectAPPLE) -#define glBindVertexArrayAPPLE (_GET_TLS_PROCTABLE()->BindVertexArrayAPPLE) -#define glDeleteVertexArraysAPPLE (_GET_TLS_PROCTABLE()->DeleteVertexArraysAPPLE) -#define glGenVertexArraysAPPLE (_GET_TLS_PROCTABLE()->GenVertexArraysAPPLE) -#define glIsVertexArrayAPPLE (_GET_TLS_PROCTABLE()->IsVertexArrayAPPLE) -#define glVertexArrayRangeAPPLE (_GET_TLS_PROCTABLE()->VertexArrayRangeAPPLE) -#define glFlushVertexArrayRangeAPPLE (_GET_TLS_PROCTABLE()->FlushVertexArrayRangeAPPLE) -#define glVertexArrayParameteriAPPLE (_GET_TLS_PROCTABLE()->VertexArrayParameteriAPPLE) -#define glDrawBuffersATI (_GET_TLS_PROCTABLE()->DrawBuffersATI) -#define glProgramNamedParameter4fNV (_GET_TLS_PROCTABLE()->ProgramNamedParameter4fNV) -#define glProgramNamedParameter4dNV (_GET_TLS_PROCTABLE()->ProgramNamedParameter4dNV) -#define glProgramNamedParameter4fvNV (_GET_TLS_PROCTABLE()->ProgramNamedParameter4fvNV) -#define glProgramNamedParameter4dvNV (_GET_TLS_PROCTABLE()->ProgramNamedParameter4dvNV) -#define glGetProgramNamedParameterfvNV (_GET_TLS_PROCTABLE()->GetProgramNamedParameterfvNV) -#define glGetProgramNamedParameterdvNV (_GET_TLS_PROCTABLE()->GetProgramNamedParameterdvNV) -#define glVertex2hNV (_GET_TLS_PROCTABLE()->Vertex2hNV) -#define glVertex2hvNV (_GET_TLS_PROCTABLE()->Vertex2hvNV) -#define glVertex3hNV (_GET_TLS_PROCTABLE()->Vertex3hNV) -#define glVertex3hvNV (_GET_TLS_PROCTABLE()->Vertex3hvNV) -#define glVertex4hNV (_GET_TLS_PROCTABLE()->Vertex4hNV) -#define glVertex4hvNV (_GET_TLS_PROCTABLE()->Vertex4hvNV) -#define glNormal3hNV (_GET_TLS_PROCTABLE()->Normal3hNV) -#define glNormal3hvNV (_GET_TLS_PROCTABLE()->Normal3hvNV) -#define glColor3hNV (_GET_TLS_PROCTABLE()->Color3hNV) -#define glColor3hvNV (_GET_TLS_PROCTABLE()->Color3hvNV) -#define glColor4hNV (_GET_TLS_PROCTABLE()->Color4hNV) -#define glColor4hvNV (_GET_TLS_PROCTABLE()->Color4hvNV) -#define glTexCoord1hNV (_GET_TLS_PROCTABLE()->TexCoord1hNV) -#define glTexCoord1hvNV (_GET_TLS_PROCTABLE()->TexCoord1hvNV) -#define glTexCoord2hNV (_GET_TLS_PROCTABLE()->TexCoord2hNV) -#define glTexCoord2hvNV (_GET_TLS_PROCTABLE()->TexCoord2hvNV) -#define glTexCoord3hNV (_GET_TLS_PROCTABLE()->TexCoord3hNV) -#define glTexCoord3hvNV (_GET_TLS_PROCTABLE()->TexCoord3hvNV) -#define glTexCoord4hNV (_GET_TLS_PROCTABLE()->TexCoord4hNV) -#define glTexCoord4hvNV (_GET_TLS_PROCTABLE()->TexCoord4hvNV) -#define glMultiTexCoord1hNV (_GET_TLS_PROCTABLE()->MultiTexCoord1hNV) -#define glMultiTexCoord1hvNV (_GET_TLS_PROCTABLE()->MultiTexCoord1hvNV) -#define glMultiTexCoord2hNV (_GET_TLS_PROCTABLE()->MultiTexCoord2hNV) -#define glMultiTexCoord2hvNV (_GET_TLS_PROCTABLE()->MultiTexCoord2hvNV) -#define glMultiTexCoord3hNV (_GET_TLS_PROCTABLE()->MultiTexCoord3hNV) -#define glMultiTexCoord3hvNV (_GET_TLS_PROCTABLE()->MultiTexCoord3hvNV) -#define glMultiTexCoord4hNV (_GET_TLS_PROCTABLE()->MultiTexCoord4hNV) -#define glMultiTexCoord4hvNV (_GET_TLS_PROCTABLE()->MultiTexCoord4hvNV) -#define glFogCoordhNV (_GET_TLS_PROCTABLE()->FogCoordhNV) -#define glFogCoordhvNV (_GET_TLS_PROCTABLE()->FogCoordhvNV) -#define glSecondaryColor3hNV (_GET_TLS_PROCTABLE()->SecondaryColor3hNV) -#define glSecondaryColor3hvNV (_GET_TLS_PROCTABLE()->SecondaryColor3hvNV) -#define glVertexWeighthNV (_GET_TLS_PROCTABLE()->VertexWeighthNV) -#define glVertexWeighthvNV (_GET_TLS_PROCTABLE()->VertexWeighthvNV) -#define glVertexAttrib1hNV (_GET_TLS_PROCTABLE()->VertexAttrib1hNV) -#define glVertexAttrib1hvNV (_GET_TLS_PROCTABLE()->VertexAttrib1hvNV) -#define glVertexAttrib2hNV (_GET_TLS_PROCTABLE()->VertexAttrib2hNV) -#define glVertexAttrib2hvNV (_GET_TLS_PROCTABLE()->VertexAttrib2hvNV) -#define glVertexAttrib3hNV (_GET_TLS_PROCTABLE()->VertexAttrib3hNV) -#define glVertexAttrib3hvNV (_GET_TLS_PROCTABLE()->VertexAttrib3hvNV) -#define glVertexAttrib4hNV (_GET_TLS_PROCTABLE()->VertexAttrib4hNV) -#define glVertexAttrib4hvNV (_GET_TLS_PROCTABLE()->VertexAttrib4hvNV) -#define glVertexAttribs1hvNV (_GET_TLS_PROCTABLE()->VertexAttribs1hvNV) -#define glVertexAttribs2hvNV (_GET_TLS_PROCTABLE()->VertexAttribs2hvNV) -#define glVertexAttribs3hvNV (_GET_TLS_PROCTABLE()->VertexAttribs3hvNV) -#define glVertexAttribs4hvNV (_GET_TLS_PROCTABLE()->VertexAttribs4hvNV) -#define glPixelDataRangeNV (_GET_TLS_PROCTABLE()->PixelDataRangeNV) -#define glFlushPixelDataRangeNV (_GET_TLS_PROCTABLE()->FlushPixelDataRangeNV) -#define glPrimitiveRestartNV (_GET_TLS_PROCTABLE()->PrimitiveRestartNV) -#define glPrimitiveRestartIndexNV (_GET_TLS_PROCTABLE()->PrimitiveRestartIndexNV) -#define glMapObjectBufferATI (_GET_TLS_PROCTABLE()->MapObjectBufferATI) -#define glUnmapObjectBufferATI (_GET_TLS_PROCTABLE()->UnmapObjectBufferATI) -#define glStencilOpSeparateATI (_GET_TLS_PROCTABLE()->StencilOpSeparateATI) -#define glStencilFuncSeparateATI (_GET_TLS_PROCTABLE()->StencilFuncSeparateATI) -#define glVertexAttribArrayObjectATI (_GET_TLS_PROCTABLE()->VertexAttribArrayObjectATI) -#define glGetVertexAttribArrayObjectfvATI (_GET_TLS_PROCTABLE()->GetVertexAttribArrayObjectfvATI) -#define glGetVertexAttribArrayObjectivATI (_GET_TLS_PROCTABLE()->GetVertexAttribArrayObjectivATI) -#define glDepthBoundsEXT (_GET_TLS_PROCTABLE()->DepthBoundsEXT) -#define glBlendEquationSeparateEXT (_GET_TLS_PROCTABLE()->BlendEquationSeparateEXT) -#define glAddSwapHintRectWIN (_GET_TLS_PROCTABLE()->AddSwapHintRectWIN) -#ifdef _WIN32 -#define wglCreateBufferRegionARB (_GET_TLS_PROCTABLE()->CreateBufferRegionARB) -#define wglDeleteBufferRegionARB (_GET_TLS_PROCTABLE()->DeleteBufferRegionARB) -#define wglSaveBufferRegionARB (_GET_TLS_PROCTABLE()->SaveBufferRegionARB) -#define wglRestoreBufferRegionARB (_GET_TLS_PROCTABLE()->RestoreBufferRegionARB) -#define wglGetExtensionsStringARB (_GET_TLS_PROCTABLE()->GetExtensionsStringARB) -#define wglGetPixelFormatAttribivARB (_GET_TLS_PROCTABLE()->GetPixelFormatAttribivARB) -#define wglGetPixelFormatAttribfvARB (_GET_TLS_PROCTABLE()->GetPixelFormatAttribfvARB) -#define wglChoosePixelFormatARB (_GET_TLS_PROCTABLE()->ChoosePixelFormatARB) -#define wglMakeContextCurrentARB (_GET_TLS_PROCTABLE()->MakeContextCurrentARB) -#define wglGetCurrentReadDCARB (_GET_TLS_PROCTABLE()->GetCurrentReadDCARB) -#define wglCreatePbufferARB (_GET_TLS_PROCTABLE()->CreatePbufferARB) -#define wglGetPbufferDCARB (_GET_TLS_PROCTABLE()->GetPbufferDCARB) -#define wglReleasePbufferDCARB (_GET_TLS_PROCTABLE()->ReleasePbufferDCARB) -#define wglDestroyPbufferARB (_GET_TLS_PROCTABLE()->DestroyPbufferARB) -#define wglQueryPbufferARB (_GET_TLS_PROCTABLE()->QueryPbufferARB) -#define wglBindTexImageARB (_GET_TLS_PROCTABLE()->BindTexImageARB) -#define wglReleaseTexImageARB (_GET_TLS_PROCTABLE()->ReleaseTexImageARB) -#define wglSetPbufferAttribARB (_GET_TLS_PROCTABLE()->SetPbufferAttribARB) -#define wglCreateDisplayColorTableEXT (_GET_TLS_PROCTABLE()->CreateDisplayColorTableEXT) -#define wglLoadDisplayColorTableEXT (_GET_TLS_PROCTABLE()->LoadDisplayColorTableEXT) -#define wglBindDisplayColorTableEXT (_GET_TLS_PROCTABLE()->BindDisplayColorTableEXT) -#define wglDestroyDisplayColorTableEXT (_GET_TLS_PROCTABLE()->DestroyDisplayColorTableEXT) -#define wglGetExtensionsStringEXT (_GET_TLS_PROCTABLE()->GetExtensionsStringEXT) -#define wglMakeContextCurrentEXT (_GET_TLS_PROCTABLE()->MakeContextCurrentEXT) -#define wglGetCurrentReadDCEXT (_GET_TLS_PROCTABLE()->GetCurrentReadDCEXT) -#define wglCreatePbufferEXT (_GET_TLS_PROCTABLE()->CreatePbufferEXT) -#define wglGetPbufferDCEXT (_GET_TLS_PROCTABLE()->GetPbufferDCEXT) -#define wglReleasePbufferDCEXT (_GET_TLS_PROCTABLE()->ReleasePbufferDCEXT) -#define wglDestroyPbufferEXT (_GET_TLS_PROCTABLE()->DestroyPbufferEXT) -#define wglQueryPbufferEXT (_GET_TLS_PROCTABLE()->QueryPbufferEXT) -#define wglGetPixelFormatAttribivEXT (_GET_TLS_PROCTABLE()->GetPixelFormatAttribivEXT) -#define wglGetPixelFormatAttribfvEXT (_GET_TLS_PROCTABLE()->GetPixelFormatAttribfvEXT) -#define wglChoosePixelFormatEXT (_GET_TLS_PROCTABLE()->ChoosePixelFormatEXT) -#define wglSwapIntervalEXT (_GET_TLS_PROCTABLE()->SwapIntervalEXT) -#define wglGetSwapIntervalEXT (_GET_TLS_PROCTABLE()->GetSwapIntervalEXT) -#define wglAllocateMemoryNV (_GET_TLS_PROCTABLE()->AllocateMemoryNV) -#define wglFreeMemoryNV (_GET_TLS_PROCTABLE()->FreeMemoryNV) -#define wglGetSyncValuesOML (_GET_TLS_PROCTABLE()->GetSyncValuesOML) -#define wglGetMscRateOML (_GET_TLS_PROCTABLE()->GetMscRateOML) -#define wglSwapBuffersMscOML (_GET_TLS_PROCTABLE()->SwapBuffersMscOML) -#define wglSwapLayerBuffersMscOML (_GET_TLS_PROCTABLE()->SwapLayerBuffersMscOML) -#define wglWaitForMscOML (_GET_TLS_PROCTABLE()->WaitForMscOML) -#define wglWaitForSbcOML (_GET_TLS_PROCTABLE()->WaitForSbcOML) -#define wglGetDigitalVideoParametersI3D (_GET_TLS_PROCTABLE()->GetDigitalVideoParametersI3D) -#define wglSetDigitalVideoParametersI3D (_GET_TLS_PROCTABLE()->SetDigitalVideoParametersI3D) -#define wglGetGammaTableParametersI3D (_GET_TLS_PROCTABLE()->GetGammaTableParametersI3D) -#define wglSetGammaTableParametersI3D (_GET_TLS_PROCTABLE()->SetGammaTableParametersI3D) -#define wglGetGammaTableI3D (_GET_TLS_PROCTABLE()->GetGammaTableI3D) -#define wglSetGammaTableI3D (_GET_TLS_PROCTABLE()->SetGammaTableI3D) -#define wglEnableGenlockI3D (_GET_TLS_PROCTABLE()->EnableGenlockI3D) -#define wglDisableGenlockI3D (_GET_TLS_PROCTABLE()->DisableGenlockI3D) -#define wglIsEnabledGenlockI3D (_GET_TLS_PROCTABLE()->IsEnabledGenlockI3D) -#define wglGenlockSourceI3D (_GET_TLS_PROCTABLE()->GenlockSourceI3D) -#define wglGetGenlockSourceI3D (_GET_TLS_PROCTABLE()->GetGenlockSourceI3D) -#define wglGenlockSourceEdgeI3D (_GET_TLS_PROCTABLE()->GenlockSourceEdgeI3D) -#define wglGetGenlockSourceEdgeI3D (_GET_TLS_PROCTABLE()->GetGenlockSourceEdgeI3D) -#define wglGenlockSampleRateI3D (_GET_TLS_PROCTABLE()->GenlockSampleRateI3D) -#define wglGetGenlockSampleRateI3D (_GET_TLS_PROCTABLE()->GetGenlockSampleRateI3D) -#define wglGenlockSourceDelayI3D (_GET_TLS_PROCTABLE()->GenlockSourceDelayI3D) -#define wglGetGenlockSourceDelayI3D (_GET_TLS_PROCTABLE()->GetGenlockSourceDelayI3D) -#define wglQueryGenlockMaxSourceDelayI3D (_GET_TLS_PROCTABLE()->QueryGenlockMaxSourceDelayI3D) -#define wglCreateImageBufferI3D (_GET_TLS_PROCTABLE()->CreateImageBufferI3D) -#define wglDestroyImageBufferI3D (_GET_TLS_PROCTABLE()->DestroyImageBufferI3D) -#define wglAssociateImageBufferEventsI3D (_GET_TLS_PROCTABLE()->AssociateImageBufferEventsI3D) -#define wglReleaseImageBufferEventsI3D (_GET_TLS_PROCTABLE()->ReleaseImageBufferEventsI3D) -#define wglEnableFrameLockI3D (_GET_TLS_PROCTABLE()->EnableFrameLockI3D) -#define wglDisableFrameLockI3D (_GET_TLS_PROCTABLE()->DisableFrameLockI3D) -#define wglIsEnabledFrameLockI3D (_GET_TLS_PROCTABLE()->IsEnabledFrameLockI3D) -#define wglQueryFrameLockMasterI3D (_GET_TLS_PROCTABLE()->QueryFrameLockMasterI3D) -#define wglGetFrameUsageI3D (_GET_TLS_PROCTABLE()->GetFrameUsageI3D) -#define wglBeginFrameTrackingI3D (_GET_TLS_PROCTABLE()->BeginFrameTrackingI3D) -#define wglEndFrameTrackingI3D (_GET_TLS_PROCTABLE()->EndFrameTrackingI3D) -#define wglQueryFrameTrackingI3D (_GET_TLS_PROCTABLE()->QueryFrameTrackingI3D) -#endif /* _WIN32 */ - -#ifndef _APP_PROCTABLE - -/* - * Applications can replace the following function with its own function - * for accessing thread local proc/context dependent proc table. - * The following default function works for most applications which - * are using the same device for all their contexts - even if - * the contexts are on different threads. - */ - -static _inline _GLextensionProcs *_GET_TLS_PROCTABLE(void) - -{ - extern _GLextensionProcs _extensionProcs; - - return (&_extensionProcs); -} - -#else - -/* - * Application should replace this compiled function with - * an inlined function for maximum performance. - */ - -extern _GLextensionProcs *_GET_TLS_PROCTABLE(void); - -#endif - -/* - * Provide an initialization function for the application - * to initialize its own proc tables in case the application - * needs to use multiple proc tables. - */ - -static _inline void _InitExtensionProcs(_GLextensionProcs *appProcs) -{ - extern _GLextensionProcs _extensionProcs; - - *appProcs = _extensionProcs; -} - -#ifdef __cplusplus -} -#endif - - -#endif /* _GLPROCS_H_ */ diff --git a/plugins/zzogl-pg-cg/opengl/linux_replay.cpp b/plugins/zzogl-pg-cg/opengl/linux_replay.cpp deleted file mode 100644 index e3dd2ef227..0000000000 --- a/plugins/zzogl-pg-cg/opengl/linux_replay.cpp +++ /dev/null @@ -1,44 +0,0 @@ -/* - * Copyright (C) 2011-2012 Hainaut gregory - * - * This Program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2, or (at your option) - * any later version. - * - * This Program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with GNU Make; see the file COPYING. If not, write to - * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA. - * http://www.gnu.org/copyleft/gpl.html - * - */ - -#include "GS.h" - -EXPORT_C_(void) GSsetLogDir(const char* dir); -EXPORT_C_(void) GSsetSettingsDir(const char* dir); -EXPORT_C_(void) GSReplay(char* lpszCmdLine); - - -void help() -{ - fprintf(stderr, "Loader gs file\n"); - fprintf(stderr, "ARG1 Ini directory\n"); - fprintf(stderr, "ARG2 .gs file\n"); - exit(1); -} - -int main ( int argc, char *argv[] ) -{ - if ( argc < 2 ) help(); - - GSsetSettingsDir(argv[1]); - GSsetLogDir("/tmp"); - GSReplay(argv[2]); -} - diff --git a/plugins/zzogl-pg-cg/opengl/ps2hw.dat b/plugins/zzogl-pg-cg/opengl/ps2hw.dat deleted file mode 100644 index 2d3b43cae0cdc3de4925148f558b574b9dd1d7ea..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 113923 zcmZU4XIv9s&^3aHf>M+w9Z~6BK%@kz3euw>ErQZSKty_p1qA7e^b$HDQl+<`(rZ8r zz5J>a8k(cFb2Nf=W;B7>+w%<1Y|+gO z|B~BPo<`hM37Jl)RIgpRYvS~Es?tYTOXuR#^FJP3Zs=af`Y|9N-RhiTo~On1?dg;J zZFB$Y&S_`^@its&i>+1ai~fmrE9#L0q{BL3)3D`hIC12JNw}*W!5YhOaqK%32&_3z!hXfCE9dC3EoNwN0UhKlsA3 z++Z7qv9yHyU$z|n+y|R!e8TE@ZwMXchs75YQ$PW%pweJIG(F0nm0|SPqY~l=s6Q*q zxPOURJHD0KNxDKU1 zV@da7&~Kp_Gjc6v<4b|_`T!BeuP2Y*hifjiCOBP^2EnkUA%0i);WDKyiGLpIZk(4X zAa?yRS+=~F+YMF$`&}&^lb2${kG#FgVrG9Uk^0VLSz~6s5)26o6y4)P8?8MLa}nJW z_N-0ChE?s}L>BLy#$o4i+c(4Yw*FWegr2&I?%hSVnvnPaaGxDo4ZH>NRb95JhAy4VODk26V zsUH#_vrT4M7*sFmK#I zB0;t+eD}C=S?j{UFZvFfmUNRVwu87RK3roOEfDR2m08?IgLbm0o%#7L z-n!i@c%13mYvheUuWuMC!K*-}BIFu+1%$hO+bm2G{g}Ts7CP$hRT{iJy1Q&aBniU9 zU%w2f5%t_>4zkZ2x6jrlkwXNye zgNve7$yRT-5M^sDf{k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oANuCEMiD0JER9<2`ze!FBAo3Ve2ClQhab{sY6_V47y~WSTt;( zB1qrcGhosnBQ}fU56zZZ?V-^w|KufbEN)dxI(z4=L*_O4EH)`*7L`%J;e6N3ThGkf z?6cT(^IQ-0k!)r>96PO82<4_O%9guPb(1Va(J? z##U>SjhYw}+?XCR^a1N4-A-9^tTVpg>R(si6>aDJ(81oe!4ctsI5%MeV`b?bTs#SLj8wD>c{P(^t}JK8c|V_8agW4?Bh`f6-YSaS#Cw3^c+i!H9)7 zE!8EhnOf}lQFrEtN$%laVWE)I$#LsFX;0GASFn-M<9uqP3)b6L9>`TW1Ru8cRZ|)+ z$5vYFo^vZADqV96pdKcqM!xup3wg(7H0W^Bdpf-Ovi$)fkB><%{OY28u+wTweC~V1 zj8+ml9CI}oKJyFXAi+K4b9MxR`56iQ)??* z?H-GmAUCy`04C zjfs?3t3#OSSqFYGbi+=-USZR7G6X_+hc z>kXLx#MYk>OVHK%!RV^n@j#&0WD6f!oVA2wVn6Mw`zN5HpuF$yLH`p}MF&917fV?| ze#+w?Bc$fvrdmNh@>|zX g_fBilinear.z ) // region repeat mode for x (umsk&x)|ufix - final.x = texRECT(g_sBitwiseANDX, abs(coord.x)*TexWrapMode.zx).x * g_fClampExts.x + g_fClampExts.z; - if( TexWrapMode.y > g_fBilinear.z ) // region repeat mode for x (vmsk&x)|vfix - final.y = texRECT(g_sBitwiseANDY, abs(coord.y)*TexWrapMode.wy).x * g_fClampExts.y + g_fClampExts.w; - - return final; -} - -#else - -float2 ps2addr(float2 coord) -{ - return frac(clamp(coord.xy, g_fClampExts.xy, g_fClampExts.zw)); -} - -#endif - -half4 tex2DPS_32(float2 tex0) -{ - return texRECT(g_sMemory, ps2memcoord(tex0).xy); -} - -// use when texture is not tiled -- shader 1 -half4 tex2DPS_tex32(float2 tex0) -{ - return texRECT(g_sMemory, g_fTexDims.xy*tex0+g_fTexDims.zw)*g_fZBias.zzzw+g_fPageOffset.w; -} - -// use when texture is not tiled -- shader 2 -half4 tex2DPS_clut32(float2 tex0) -{ - float index = texRECT(g_sMemory, g_fTexDims.xy*tex0+g_fTexDims.zw).a+g_fPageOffset.w; - return tex2D(g_sCLUT, index*g_fExactColor.xz+g_fExactColor.yz); -} - -// Shader 3 -// use when texture is not tiled and converting from 32bit to 16bit -// don't convert on the block level, only on the column level -// so every other 8 pixels, use the upper bits instead of lower -half4 tex2DPS_tex32to16(float2 tex0) -{ - bool upper = false; - tex0.y += g_fPageOffset.z; - float2 ffrac = fmod(tex0, g_fTexOffset.xy); - tex0.xy = g_fc0.ww * (tex0.xy + ffrac); - if( ffrac.x > g_fTexOffset.z ) { - tex0.x -= g_fTexOffset.z; - upper = true; - } - if( ffrac.y >= g_fTexOffset.w ) { - tex0.y -= g_fTexOffset.w; - tex0.x += g_fc0.w; - } - - half4 color = texRECT(g_sMemory, g_fTexDims.xy*tex0+g_fTexDims.zw)*g_fZBias.zzzw+g_fPageOffset.w; - float2 uv = upper ? color.xw : color.zy; - return tex2D(g_sConv16to32, uv+g_fPageOffset.xy); -} - -// Shader 4 -// used when a 16 bit texture is used an 8h -half4 tex2DPS_tex16to8h(float2 tex0) -{ - float4 final; - float2 ffrac = fmod(tex0+g_fPageOffset.zw, g_fTexOffset.xy); - tex0.xy = g_fPageOffset.xy * tex0.xy - ffrac * g_fc0.yw; - - if( ffrac.x > g_fTexOffset.x*g_fc0.w ) - tex0.x += g_fTexOffset.x*g_fc0.w; - if( tex0.x >= g_fc0.y ) tex0 += g_fTexOffset.zw; - - float4 upper = texRECT(g_sMemory, g_fTexDims.xy*tex0+g_fTexDims.zw); - - // only need alpha - float index = tex3D(g_sConv32to16, upper.zyx-g_fc0.z).y + upper.w*g_fc0.w*g_fc0.w; - return tex2D(g_sCLUT, index+g_fExactColor.yz); -} - -// Shader 5 -// used when a 16 bit texture is used a 32bit one -half4 tex2DPS_tex16to32(float2 tex0) -{ - float4 final; - float2 ffrac = fmod(tex0+g_fPageOffset.zw, g_fTexOffset.xy); - //tex0.xy = g_fPageOffset.xy * tex0.xy - ffrac * g_fc0.yw; - tex0.y += g_fPageOffset.y * ffrac.y; - - if( ffrac.x > g_fTexOffset.z ) { - tex0.x -= g_fTexOffset.z; - tex0.y += g_fTexOffset.w; - } - - float fconst = g_fc0.w*g_fc0.w; - float4 lower = tex2D(g_sSrcFinal, g_fTexDims.xy*tex0); - float4 upper = tex2D(g_sMemory, g_fTexDims.xy*tex0+g_fTexDims.zw); - - final.zy = tex3D(g_sConv32to16, lower.zyx).xy + lower.ww*fconst; - final.xw = tex3D(g_sConv32to16, upper.zyx).xy + upper.ww*fconst; - return final; -} - - -//half4 f; -//f.w = old.y > (127.2f/255.0f) ? 1 : 0; -//old.y -= 0.5f * f.w; -//f.xyz = frac(old.yyx*half3(2.002*255.0f/256.0f, 64.025f*255.0f/256.0f, 8.002*255.0f/256.0f)); -//f.y += old.x * (0.25f*255.0f/256.0f); - -//////////////////////////////// -// calculates the texture color -//////////////////////////////// - -#define decl_ps2shade(num) \ -decl_ps2shade_##num(_32) \ -decl_ps2shade_##num(_tex32) \ -decl_ps2shade_##num(_clut32) \ -decl_ps2shade_##num(_tex32to16) \ -decl_ps2shade_##num(_tex16to8h) \ -decl_ps2shade_##num(_tex16to32h) \ - -// nearest -#define decl_ps2shade_0(bit) \ -float4 ps2shade0##bit( TEX_DECL tex) \ -{ \ - return tex2DPS##bit( ps2addr(TEX_XY)); \ -} \ - -// do fast memcoord4 calcs when textures behave well -#ifdef REPEAT -#define PS2MEMCOORD4 ps2memcoord4 -#else -#define PS2MEMCOORD4 ps2memcoord4 -#endif - -#define decl_BilinearFilter(bit, addrfn) \ -half4 BilinearFilter##bit(float2 tex0) \ -{ \ - float4 off0, off1; \ - float4 ftex; \ - float2 ffrac; \ - ftex.xy = tex0 + g_fBilinear.xy * g_fRealTexDims.zw; \ - ffrac = frac(ftex.xy*g_fRealTexDims.xy); \ - ftex.xy -= ffrac.xy * g_fRealTexDims.zw; \ - \ - ftex.zw = ps2addr(ftex.xy + g_fRealTexDims.zw); \ - ftex.xy = ps2addr(ftex.xy); \ - \ - PS2MEMCOORD4(ftex, off0, off1); \ - half4 c0 = texRECT(g_sMemory, off0.xy); \ - half4 c1 = texRECT(g_sMemory, off0.zw); \ - half4 c2 = texRECT(g_sMemory, off1.xy); \ - half4 c3 = texRECT(g_sMemory, off1.zw); \ - return lerp( lerp(c0, c1, ffrac.x), lerp(c2, c3, ffrac.x), ffrac.y ); \ -} \ - -decl_BilinearFilter(_32, ps2addr) -decl_BilinearFilter(_tex32, ps2addr) -decl_BilinearFilter(_clut32, ps2addr) -decl_BilinearFilter(_tex32to16, ps2addr) -decl_BilinearFilter(_tex16to8h, ps2addr) -decl_BilinearFilter(_tex16to32h, ps2addr) - -//TODO! For mip maps, only apply when LOD >= 0 -// lcm == 0, LOD = log(1/Q)*L + K, lcm == 1, LOD = K - -// bilinear -#define decl_ps2shade_1(bit) \ -half4 ps2shade1##bit(TEX_DECL tex) \ -{ \ - return BilinearFilter##bit(TEX_XY); \ -} \ - -// nearest, mip nearest -#define decl_ps2shade_2(bit) \ -half4 ps2shade2##bit(TEX_DECL tex) \ -{ \ - return tex2DPS##bit( ps2addr(TEX_XY)); \ -} \ - -// nearest, mip linear -#define decl_ps2shade_3(bit) \ -half4 ps2shade3##bit(TEX_DECL tex) \ -{ \ - return tex2DPS##bit(ps2addr(TEX_XY)); \ -} \ - -// linear, mip nearest -#define decl_ps2shade_4(bit) \ -half4 ps2shade4##bit(TEX_DECL tex) \ -{ \ - return BilinearFilter##bit(TEX_XY); \ -} \ - -// linear, mip linear -#define decl_ps2shade_5(bit) \ -half4 ps2shade5##bit(TEX_DECL tex) \ -{ \ - return BilinearFilter##bit(TEX_XY); \ -} \ - -decl_ps2shade(0) -decl_ps2shade(1) -decl_ps2shade(2) -decl_ps2shade(3) -decl_ps2shade(4) -decl_ps2shade(5) - -half4 ps2CalcShade(half4 texcol, half4 color) -{ -#ifdef TEST_AEM - if( dot(texcol.xyzw, g_fTestBlack.xyzw) <= g_fc0.z ) - texcol.w = g_fc0.x; - else -#endif - texcol.w = texcol.w * fTexAlpha.y + fTexAlpha.x; - - texcol = texcol * (fTexAlpha2.zzzw * color + fTexAlpha2.xxxy) + fTexAlpha.zzzw * color.wwww; - - return texcol; -} - -// final ops on the color -#ifdef EXACT_COLOR - -half4 ps2FinalColor(half4 col) -{ - // g_fOneColor has to scale by 255 - half4 temp = col * g_fOneColor.xxxy + g_fOneColor.zzzw; - temp.w = floor(temp.w)*g_fExactColor.w; - return temp; -} - -#else -half4 ps2FinalColor(half4 col) -{ - return col * g_fOneColor.xxxy + g_fOneColor.zzzw; -} -#endif - -//////////////// -// Techniques // -//////////////// - -// technique to copy a rectangle from source to target -struct VSOUT_ -{ - float4 pos : POSITION; - half4 color : COLOR0; - DOZWRITE(float4 z : TEXCOORD0;) -}; - -struct VSOUT_T -{ - float4 pos : POSITION; - half4 color : COLOR0; - TEX_DECL tex : TEXCOORD0; - DOZWRITE(float4 z : TEXCOORD1;) -}; - -struct VSOUT_F -{ - float4 pos : POSITION; - half4 color : COLOR0; - float fog : TEXCOORD0; - DOZWRITE(float4 z : TEXCOORD1;) -}; - -struct VSOUT_TF -{ - float4 pos : POSITION; - half4 color : COLOR0; - TEX_DECL tex : TEXCOORD0; - half fog : TEXCOORD1; - DOZWRITE(float4 z : TEXCOORD2;) -}; - -// just smooth shadering -VSOUT_ RegularVS(float4 pos : POSITION, - half4 color : COLOR0, - float4 z : COLOR1 - ) -{ - VSOUT_ o; - - o.pos.xy = pos.xy*g_fPosXY.xy+g_fPosXY.zw; - o.pos.z = (log(g_fc0.y+dot(g_fZ, z.zyxw))*g_fZNorm.x+g_fZNorm.y) * g_fZMin.y + dot(g_fZ, z.zyxw) * g_fZMin.x ; - o.pos.w = g_fc0.y; // 1 - o.color = color; - - DOZWRITE(o.z = z*g_fZBias.x+g_fZBias.y; o.z.w = g_fc0.y;) - return o; -} - -void RegularPS(VSOUT_ i, out float4 c0 : COLOR0 -#ifdef WRITE_DEPTH - , out float4 c1 : COLOR1 -#endif - ) -{ - // whenever outputting depth, make sure to mult by 255/256 and 1 - c0 = ps2FinalColor(i.color); - DOZWRITE(c1 = i.z;) -} - -// diffuse texture mapping -VSOUT_T TextureVS(float4 pos : POSITION, - half4 color : COLOR0, - float4 z : COLOR1, - float3 tex0 : TEXCOORD0) -{ - VSOUT_T o; - o.pos.xy = pos.xy*g_fPosXY.xy+g_fPosXY.zw; - o.pos.z = (log(g_fc0.y+dot(g_fZ, z.zyxw))*g_fZNorm.x + g_fZNorm.y) * g_fZMin.y + dot(g_fZ, z.zyxw) * g_fZMin.x ; - o.pos.w = g_fc0.y; - o.color = color; - DOZWRITE(o.z = z*g_fZBias.x+g_fZBias.y; o.z.w = g_fc0.y;) -#ifdef PERSPECTIVE_CORRECT_TEX - o.tex = tex0; -#else - o.tex = tex0.xy/tex0.z; -#endif - return o; -} - -#ifdef WRITE_DEPTH - -#define DECL_TEXPS(num, bit) \ -void Texture##num##bit##PS(VSOUT_T i, out half4 c0 : COLOR0, out float4 c1 : COLOR1) \ -{ \ - c0 = ps2FinalColor(ps2CalcShade(ps2shade##num##bit(i.tex), i.color)); \ - c1 = i.z; \ -} \ - -#else - -#define DECL_TEXPS(num, bit) \ -void Texture##num##bit##PS(VSOUT_T i, out half4 c0 : COLOR0) \ -{ \ - c0 = ps2FinalColor(ps2CalcShade(ps2shade##num##bit(i.tex), i.color)); \ -} \ - -#endif - -#define DECL_TEXPS_(num) \ -DECL_TEXPS(num, _32) \ -DECL_TEXPS(num, _tex32) \ -DECL_TEXPS(num, _clut32) \ -DECL_TEXPS(num, _tex32to16) \ -DECL_TEXPS(num, _tex16to8h) \ - -DECL_TEXPS_(0) -DECL_TEXPS_(1) -DECL_TEXPS_(2) -DECL_TEXPS_(3) -DECL_TEXPS_(4) -DECL_TEXPS_(5) - -VSOUT_F RegularFogVS(float4 pos : POSITION, - half4 color : COLOR0, - float4 z : COLOR1) -{ - VSOUT_F o; - - o.pos.xy = pos.xy*g_fPosXY.xy+g_fPosXY.zw; - o.pos.z = (log(g_fc0.y+dot(g_fZ, z.zyxw))*g_fZNorm.x+g_fZNorm.y) * g_fZMin.y + dot(g_fZ, z.zyxw) * g_fZMin.x ; - o.pos.w = g_fc0.y; - DOZWRITE(o.z = z*g_fZBias.x+g_fZBias.y; o.z.w = g_fc0.y;) - o.color = color; - o.fog = pos.z*g_fBilinear.w; - return o; -} - -void RegularFogPS(VSOUT_F i, out half4 c0 : COLOR0 -#ifdef WRITE_DEPTH - , out float4 c1 : COLOR1 -#endif - ) -{ - half4 c; - c.xyz = lerp(g_fFogColor.xyz, i.color.xyz, i.fog); - c.w = i.color.w; - c0 = ps2FinalColor(c); - DOZWRITE(c1 = i.z;) -} - -VSOUT_TF TextureFogVS(float4 pos : POSITION, - half4 color : COLOR0, - float4 z : COLOR1, - float3 tex0 : TEXCOORD0) -{ - VSOUT_TF o; - - o.pos.xy = pos.xy*g_fPosXY.xy+g_fPosXY.zw; - o.pos.z = (log(g_fc0.y+dot(g_fZ, z.zyxw))*g_fZNorm.x+g_fZNorm.y) * g_fZMin.y + dot(g_fZ, z.zyxw) * g_fZMin.x ; - o.pos.w = g_fc0.y; - o.color = color; - o.fog = pos.z*g_fBilinear.w; - DOZWRITE(o.z = z*g_fZBias.x+g_fZBias.y; o.z.w = g_fc0.y;) -#ifdef PERSPECTIVE_CORRECT_TEX - o.tex = tex0; -#else - o.tex = tex0.xy/tex0.z; -#endif - return o; -} - -#ifdef WRITE_DEPTH - -#define DECL_TEXFOGPS(num, bit) \ -void TextureFog##num##bit##PS(VSOUT_TF i, out half4 c0 : COLOR0, out float4 c1 : COLOR1 ) \ -{ \ - half4 c = ps2CalcShade(ps2shade##num##bit(i.tex), i.color); \ - c.xyz = lerp(g_fFogColor.xyz, c.xyz, i.fog); \ - c0 = ps2FinalColor(c); \ - c1 = i.z; \ -} \ - -#else - -#define DECL_TEXFOGPS(num, bit) \ -void TextureFog##num##bit##PS(VSOUT_TF i, out half4 c0 : COLOR0) \ -{ \ - half4 c = ps2CalcShade(ps2shade##num##bit(i.tex), i.color); \ - c.xyz = lerp(g_fFogColor.xyz, c.xyz, i.fog); \ - c0 = ps2FinalColor(c); \ -} \ - -#endif - -#define DECL_TEXFOGPS_(num) \ -DECL_TEXFOGPS(num, _32) \ -DECL_TEXFOGPS(num, _tex32) \ -DECL_TEXFOGPS(num, _clut32) \ -DECL_TEXFOGPS(num, _tex32to16) \ -DECL_TEXFOGPS(num, _tex16to8h) \ - -DECL_TEXFOGPS_(0) -DECL_TEXFOGPS_(1) -DECL_TEXFOGPS_(2) -DECL_TEXFOGPS_(3) -DECL_TEXFOGPS_(4) -DECL_TEXFOGPS_(5) - -//------------------------------------------------------- -// Techniques not related to the main primitive commands -half4 BilinearBitBlt(float2 tex0) -{ - float4 ftex; - float2 ffrac; - - ffrac.xy = frac(tex0*g_fRealTexDims.xy); - ftex.xy = tex0 - ffrac.xy * g_fRealTexDims.zw; - ftex.zw = ftex.xy + g_fRealTexDims.zw; - - float4 off0, off1; - ps2memcoord4_fast(ftex, off0, off1); - half4 c0 = texRECT(g_sMemory, off0.xy); - half4 c1 = texRECT(g_sMemory, off0.zw); - half4 c2 = texRECT(g_sMemory, off1.xy); - half4 c3 = texRECT(g_sMemory, off1.zw); - - return lerp( lerp(c0, c1, ffrac.x), lerp(c2, c3, ffrac.x), ffrac.y ); -} - -void BitBltVS(in float4 pos : POSITION, - in half4 tex0 : COLOR1, - in float3 tex : TEXCOORD0, - out float4 opos : POSITION, - out float2 otex0 : TEXCOORD0, - out float2 ointerpos : TEXCOORD1) -{ - opos.xy = pos.xy * g_fBitBltPos.xy + g_fBitBltPos.zw; - ointerpos = opos.xy * g_fBitBltTrans.xy + g_fBitBltTrans.zw; - opos.zw = g_fc0.xy; - otex0 = tex.xy * g_fBitBltTex.xy + g_fBitBltTex.zw; -} - -half4 BitBltPS(in float2 tex0 : TEXCOORD0) : COLOR -{ - return texRECT(g_sMemory, ps2memcoord(tex0).xy)*g_fOneColor.xxxy; -} - -// used when AA -half4 BitBltAAPS(in float2 tex0 : TEXCOORD0) : COLOR -{ - return BilinearBitBlt(tex0)*g_fOneColor.xxxy; -} - -void BitBltDepthPS(in float2 tex0 : TEXCOORD0, - out float4 c : COLOR0, - out float depth : DEPTH) -{ - c = texRECT(g_sMemory, ps2memcoord(tex0)); - - depth = (log(g_fc0.y+dot(c, g_fBitBltZ))*g_fOneColor.w) * g_fZMin.y + dot(c, g_fBitBltZ) * g_fZMin.x ; - c += g_fZBias.y; -} - -void BitBltDepthMRTPS(in float2 tex0 : TEXCOORD0, - out half4 c0 : COLOR0, - out float4 c1 : COLOR1, - out float depth : DEPTH) -{ - c1 = texRECT(g_sMemory, ps2memcoord(tex0)); - - depth = (log(g_fc0.y+dot(c1, g_fBitBltZ))*g_fOneColor.w) * g_fZMin.y + dot(c1, g_fBitBltZ) * g_fZMin.x ; - c1 += g_fZBias.y; - c0 = g_fc0.x; -} - -/*static const float BlurKernel[9] = { - 0.027601, - 0.066213, - 0.123701, - 0.179952, - 0.205065, - 0.179952, - 0.123701, - 0.066213, - 0.027601 -};*/ - -half4 BilinearFloat16(float2 tex0) -{ - return texRECT(g_sSrcFinal, tex0.xy); -} - -half4 CRTCTargInterPS(in float2 tex0 : TEXCOORD0, in float2 ointerpos : TEXCOORD1) : COLOR -{ - float finter = texRECT(g_sInterlace, ointerpos.yy).x * g_fOneColor.z + g_fOneColor.w + g_fc0.w; - float4 c = BilinearFloat16(tex0); - c.w = ( g_fc0.w*c.w * g_fOneColor.x + g_fOneColor.y ) * finter; - return c; -} - -half4 CRTCTargPS(in float2 tex0 : TEXCOORD0) : COLOR -{ - float4 c = BilinearFloat16(tex0); - c.w = g_fc0.w*c.w * g_fOneColor.x + g_fOneColor.y; - return c; -} - -half4 CRTCInterPS(in float2 tex0 : TEXCOORD0, in float2 ointerpos : TEXCOORD1) : COLOR -{ - float finter = texRECT(g_sInterlace, ointerpos.yy).x * g_fOneColor.z + g_fOneColor.w + g_fc0.w; - float2 filtcoord = (tex0-frac(tex0))*g_fInvTexDims.xy+g_fInvTexDims.zw; - half4 c = BilinearBitBlt(filtcoord); - c.w = (c.w * g_fOneColor.x + g_fOneColor.y)*finter; - - return c; -} - -// simpler -half4 CRTCInterPS_Nearest(in float2 tex0 : TEXCOORD0, in float2 ointerpos : TEXCOORD1) : COLOR -{ - float finter = texRECT(g_sInterlace, ointerpos.yy).x * g_fOneColor.z + g_fOneColor.w + g_fc0.w; - half4 c = texRECT(g_sMemory, ps2memcoord(tex0).xy); - c.w = (c.w * g_fOneColor.x + g_fOneColor.y)*finter; - return c; -} - -half4 CRTCPS(in float2 tex0 : TEXCOORD0) : COLOR -{ - float2 filtcoord = (tex0/*-frac(tex0)*/)*g_fInvTexDims.xy+g_fInvTexDims.zw; - half4 c = BilinearBitBlt(filtcoord); - c.w = c.w * g_fOneColor.x + g_fOneColor.y; - - return c; -} - -// simpler -half4 CRTCPS_Nearest(in float2 tex0 : TEXCOORD0) : COLOR -{ - half4 c = texRECT(g_sMemory, ps2memcoord(tex0).xy); - c.w = c.w * g_fOneColor.x + g_fOneColor.y; - return c; -} - -half4 CRTC24InterPS(in float2 tex0 : TEXCOORD0, in float2 ointerpos : TEXCOORD1) : COLOR -{ - float finter = texRECT(g_sInterlace, ointerpos.yy).x * g_fOneColor.z + g_fOneColor.w + g_fc0.w; - float2 filtcoord = (tex0-frac(tex0))*g_fInvTexDims.xy+g_fInvTexDims.zw; - - half4 c = texRECT(g_sMemory, ps2memcoord(filtcoord).xy).x; - c.w = (c.w * g_fOneColor.x + g_fOneColor.y)*finter; - - return c; -} - -half4 CRTC24PS(in float2 tex0 : TEXCOORD0) : COLOR -{ - float2 filtcoord = (tex0-frac(tex0))*g_fInvTexDims.xy+g_fInvTexDims.zw; - half4 c = texRECT(g_sMemory, ps2memcoord(filtcoord).xy).x; - c.w = c.w * g_fOneColor.x + g_fOneColor.y; - - return c; -} - -half4 ZeroPS() : COLOR -{ - return g_fOneColor.x; -} - -half4 BaseTexturePS(in float2 tex0 : TEXCOORD0) : COLOR -{ - return texRECT(g_sSrcFinal, tex0) * g_fOneColor; -} - -half4 Convert16to32PS(float2 tex0 : TEXCOORD0) : COLOR -{ - float4 final; - float2 ffrac = fmod(tex0+g_fTexDims.zw, g_fTexOffset.xy); - tex0.xy = g_fTexDims.xy * tex0.xy - ffrac * g_fc0.yw; - - if( ffrac.x > g_fTexOffset.x*g_fc0.w ) - tex0.x += g_fTexOffset.x*g_fc0.w; - if( tex0.x >= g_fc0.y ) tex0 += g_fTexOffset.zw; - - float4 lower = texRECT(g_sSrcFinal, tex0); - float4 upper = texRECT(g_sSrcFinal, tex0+g_fPageOffset.xy); - - final.zy = tex3D(g_sConv32to16, lower.zyx).xy + lower.ww*g_fPageOffset.zw; - final.xw = tex3D(g_sConv32to16, upper.zyx).xy + upper.ww*g_fPageOffset.zw; - - return final; -} - -// use when texture is not tiled and converting from 32bit to 16bit -// don't convert on the block level, only on the column level -// so every other 8 pixels, use the upper bits instead of lower -half4 Convert32to16PS(float2 tex0 : TEXCOORD0) : COLOR -{ - bool upper = false; - float2 ffrac = fmod(tex0+g_fTexDims.zw, g_fTexOffset.xy); - tex0.xy = g_fc0.ww * (tex0.xy + ffrac); - if( ffrac.x > g_fTexOffset.z ) { - tex0.x -= g_fTexOffset.z; - upper = true; - } - if( ffrac.y >= g_fTexOffset.w ) { - tex0.y -= g_fTexOffset.w; - tex0.x += g_fc0.w; - } - - half4 color = texRECT(g_sSrcFinal, tex0*g_fTexDims.xy)*g_fc0.yyyw; - float2 uv = upper ? color.xw : color.zy; - return tex2D(g_sConv16to32, uv*g_fPageOffset.xy+g_fPageOffset.zw)*g_fTexDims.xxxy; -} diff --git a/plugins/zzogl-pg-cg/opengl/rasterfont.cpp b/plugins/zzogl-pg-cg/opengl/rasterfont.cpp deleted file mode 100644 index 38b04ccf43..0000000000 --- a/plugins/zzogl-pg-cg/opengl/rasterfont.cpp +++ /dev/null @@ -1,168 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifdef _WIN32 -#include "Utilities/RedtapeWindows.h" -#endif - -#include -#include - -#include "rasterfont.h" -// globals - -GLubyte rasters[][13] = -{ - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x36, 0x36, 0x36}, - {0x00, 0x00, 0x00, 0x66, 0x66, 0xff, 0x66, 0x66, 0xff, 0x66, 0x66, 0x00, 0x00}, - {0x00, 0x00, 0x18, 0x7e, 0xff, 0x1b, 0x1f, 0x7e, 0xf8, 0xd8, 0xff, 0x7e, 0x18}, - {0x00, 0x00, 0x0e, 0x1b, 0xdb, 0x6e, 0x30, 0x18, 0x0c, 0x76, 0xdb, 0xd8, 0x70}, - {0x00, 0x00, 0x7f, 0xc6, 0xcf, 0xd8, 0x70, 0x70, 0xd8, 0xcc, 0xcc, 0x6c, 0x38}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x1c, 0x0c, 0x0e}, - {0x00, 0x00, 0x0c, 0x18, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c}, - {0x00, 0x00, 0x30, 0x18, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x18, 0x30}, - {0x00, 0x00, 0x00, 0x00, 0x99, 0x5a, 0x3c, 0xff, 0x3c, 0x5a, 0x99, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x18, 0x18, 0x18, 0xff, 0xff, 0x18, 0x18, 0x18, 0x00, 0x00}, - {0x00, 0x00, 0x30, 0x18, 0x1c, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x60, 0x60, 0x30, 0x30, 0x18, 0x18, 0x0c, 0x0c, 0x06, 0x06, 0x03, 0x03}, - {0x00, 0x00, 0x3c, 0x66, 0xc3, 0xe3, 0xf3, 0xdb, 0xcf, 0xc7, 0xc3, 0x66, 0x3c}, - {0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78, 0x38, 0x18}, - {0x00, 0x00, 0xff, 0xc0, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x03, 0xe7, 0x7e}, - {0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x07, 0x7e, 0x07, 0x03, 0x03, 0xe7, 0x7e}, - {0x00, 0x00, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0xff, 0xcc, 0x6c, 0x3c, 0x1c, 0x0c}, - {0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x07, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xff}, - {0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xc7, 0xfe, 0xc0, 0xc0, 0xc0, 0xe7, 0x7e}, - {0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x18, 0x0c, 0x06, 0x03, 0x03, 0x03, 0xff}, - {0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xe7, 0x7e, 0xe7, 0xc3, 0xc3, 0xe7, 0x7e}, - {0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x03, 0x7f, 0xe7, 0xc3, 0xc3, 0xe7, 0x7e}, - {0x00, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x38, 0x38, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x30, 0x18, 0x1c, 0x1c, 0x00, 0x00, 0x1c, 0x1c, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x06, 0x0c, 0x18, 0x30, 0x60, 0xc0, 0x60, 0x30, 0x18, 0x0c, 0x06}, - {0x00, 0x00, 0x00, 0x00, 0xff, 0xff, 0x00, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x60, 0x30, 0x18, 0x0c, 0x06, 0x03, 0x06, 0x0c, 0x18, 0x30, 0x60}, - {0x00, 0x00, 0x18, 0x00, 0x00, 0x18, 0x18, 0x0c, 0x06, 0x03, 0xc3, 0xc3, 0x7e}, - {0x00, 0x00, 0x3f, 0x60, 0xcf, 0xdb, 0xd3, 0xdd, 0xc3, 0x7e, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xff, 0xc3, 0xc3, 0xc3, 0x66, 0x3c, 0x18}, - {0x00, 0x00, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe}, - {0x00, 0x00, 0x7e, 0xe7, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe7, 0x7e}, - {0x00, 0x00, 0xfc, 0xce, 0xc7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc7, 0xce, 0xfc}, - {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f0, 0xfe, 0xc7, 0xc3, 0xc3, 0xc7, 0xfe}, - {0x00, 0x00, 0x7e, 0xe7, 0x03, 0x03, 0x07, 0x7e, 0xe0, 0xc0, 0xc0, 0xe7, 0x7e}, - {0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0xff}, - {0x00, 0x00, 0x7e, 0xe7, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, - {0x00, 0x00, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, - {0x00, 0x00, 0xc3, 0xe7, 0xff, 0xff, 0xdb, 0xdb, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3}, - {0x00, 0x00, 0xc3, 0x66, 0x66, 0x3c, 0x3c, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3}, - {0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3}, - {0x00, 0x00, 0xff, 0xc0, 0xc0, 0x60, 0x30, 0x7e, 0x0c, 0x06, 0x03, 0x03, 0xff}, - {0x00, 0x00, 0x3c, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x3c}, - {0x00, 0x03, 0x03, 0x06, 0x06, 0x0c, 0x0c, 0x18, 0x18, 0x30, 0x30, 0x60, 0x60}, - {0x00, 0x00, 0x3c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x3c}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18}, - {0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x18, 0x38, 0x30, 0x70}, - {0x00, 0x00, 0x7f, 0xc3, 0xc3, 0x7f, 0x03, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0xfe, 0xc3, 0xc3, 0xc3, 0xc3, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0}, - {0x00, 0x00, 0x7e, 0xc3, 0xc0, 0xc0, 0xc0, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x7f, 0xc3, 0xc3, 0xc3, 0xc3, 0x7f, 0x03, 0x03, 0x03, 0x03, 0x03}, - {0x00, 0x00, 0x7f, 0xc0, 0xc0, 0xfe, 0xc3, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x30, 0x30, 0x30, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x33, 0x1e}, - {0x7e, 0xc3, 0x03, 0x03, 0x7f, 0xc3, 0xc3, 0xc3, 0x7e, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xc3, 0xfe, 0xc0, 0xc0, 0xc0, 0xc0}, - {0x00, 0x00, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x00, 0x00, 0x18, 0x00}, - {0x38, 0x6c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x00, 0x00, 0x0c, 0x00}, - {0x00, 0x00, 0xc6, 0xcc, 0xf8, 0xf0, 0xd8, 0xcc, 0xc6, 0xc0, 0xc0, 0xc0, 0xc0}, - {0x00, 0x00, 0x7e, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x78}, - {0x00, 0x00, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xdb, 0xfe, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xfc, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x7c, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x7c, 0x00, 0x00, 0x00, 0x00}, - {0xc0, 0xc0, 0xc0, 0xfe, 0xc3, 0xc3, 0xc3, 0xc3, 0xfe, 0x00, 0x00, 0x00, 0x00}, - {0x03, 0x03, 0x03, 0x7f, 0xc3, 0xc3, 0xc3, 0xc3, 0x7f, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0xc0, 0xc0, 0xc0, 0xc0, 0xc0, 0xe0, 0xfe, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0xfe, 0x03, 0x03, 0x7e, 0xc0, 0xc0, 0x7f, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x1c, 0x36, 0x30, 0x30, 0x30, 0x30, 0xfc, 0x30, 0x30, 0x30, 0x00}, - {0x00, 0x00, 0x7e, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0xc6, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x18, 0x3c, 0x3c, 0x66, 0x66, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0xc3, 0xe7, 0xff, 0xdb, 0xc3, 0xc3, 0xc3, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0xc3, 0x66, 0x3c, 0x18, 0x3c, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00}, - {0xc0, 0x60, 0x60, 0x30, 0x18, 0x3c, 0x66, 0x66, 0xc3, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0xff, 0x60, 0x30, 0x18, 0x0c, 0x06, 0xff, 0x00, 0x00, 0x00, 0x00}, - {0x00, 0x00, 0x0f, 0x18, 0x18, 0x18, 0x38, 0xf0, 0x38, 0x18, 0x18, 0x18, 0x0f}, - {0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18, 0x18}, - {0x00, 0x00, 0xf0, 0x18, 0x18, 0x18, 0x1c, 0x0f, 0x1c, 0x18, 0x18, 0x18, 0xf0}, - {0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x8f, 0xf1, 0x60, 0x00, 0x00, 0x00} -}; - -RasterFont::RasterFont() -{ - // set GL modes - glPixelStorei(GL_UNPACK_ALIGNMENT, 1); - - // create the raster font - fontOffset = glGenLists(128); - - for (int i = 32; i < 127; i++) - { - glNewList(i + fontOffset, GL_COMPILE); - glBitmap(8, 13, 0.0f, 2.0f, 10.0f, 0.0f, rasters[i-32]); - glEndList(); - } -} - -RasterFont::~RasterFont() -{ - glDeleteLists(fontOffset, 128); -} - -void RasterFont::printString(const char *s, double x, double y, double z) -{ - // go to the right spot - glRasterPos3d(x, y, z); - - glPushAttrib(GL_LIST_BIT); - glListBase(fontOffset); - glCallLists(strlen(s), GL_UNSIGNED_BYTE, (GLubyte *) s); - glPopAttrib(); -} - -void RasterFont::printCenteredString(const char *s, double y, int screen_width, double z) -{ - int length = strlen(s); - int x = int(screen_width / 2.0 - (length / 2.0) * char_width); - - printString(s, x, y, z); -} - diff --git a/plugins/zzogl-pg-cg/opengl/rasterfont.h b/plugins/zzogl-pg-cg/opengl/rasterfont.h deleted file mode 100644 index 80a3410999..0000000000 --- a/plugins/zzogl-pg-cg/opengl/rasterfont.h +++ /dev/null @@ -1,43 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef RasterFont_Header -#define RasterFont_Header - -class RasterFont -{ - - protected: - int fontOffset; - - public: - RasterFont(); - ~RasterFont(void); - static int debug; - - // some useful constants - enum {char_width = 10}; - enum {char_height = 15}; - - // and the happy helper functions - void printString(const char *s, double x, double y, double z = 0.0); - void printCenteredString(const char *s, double y, int screen_width, double z = 0.0); -}; - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/shaders.sh b/plugins/zzogl-pg-cg/opengl/shaders.sh deleted file mode 100755 index 7c5e57b04d..0000000000 --- a/plugins/zzogl-pg-cg/opengl/shaders.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/sh - -# PCSX2 - PS2 Emulator for PCs -# Copyright (C) 2002-2011 PCSX2 Dev Team -# -# PCSX2 is free software: you can redistribute it and/or modify it under the terms -# of the GNU Lesser General Public License as published by the Free Software Found- -# ation, either version 3 of the License, or (at your option) any later version. -# -# PCSX2 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; -# without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR -# PURPOSE. See the GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along with PCSX2. -# If not, see . - -./zgsbuild ps2hw.fx -cp ps2hw.dat ../../../bin/plugins/ diff --git a/plugins/zzogl-pg-cg/opengl/targets.cpp b/plugins/zzogl-pg-cg/opengl/targets.cpp deleted file mode 100644 index 9b889a38ef..0000000000 --- a/plugins/zzogl-pg-cg/opengl/targets.cpp +++ /dev/null @@ -1,3521 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" - -#include - -#include "Mem.h" -#include "x86.h" -#include "targets.h" -#include "ZZoglShaders.h" -#include "ZZClut.h" -#include -#include "ZZoglVB.h" - -#ifdef ZEROGS_SSE2 -#include -#endif - -const float g_filog32 = 0.999f / (32.0f * logf(2.0f)); -#define RHA -//#define RW - -extern int g_TransferredToGPU; -extern bool g_bUpdateStencil; - -#if !defined(ZEROGS_DEVBUILD) -# define INC_RESOLVE() -#else -# define INC_RESOLVE() ++g_nResolve -#endif - -extern int s_nResolved; -extern u32 g_nResolve; -extern bool g_bSaveTrans; - -CRenderTargetMngr s_RTs, s_DepthRTs; -CBitwiseTextureMngr s_BitwiseTextures; -CMemoryTargetMngr g_MemTargs; - -//extern u32 s_ptexCurSet[2]; -bool g_bSaveZUpdate = 0; - -int VALIDATE_THRESH = 8; -u32 TEXDESTROY_THRESH = 16; -#define FORCE_TEXDESTROY_THRESH (3) // destroy texture after FORCE_TEXDESTROY_THRESH frames - -void _Resolve(const void* psrc, int fbp, int fbw, int fbh, int psm, u32 fbm, bool mode); -void SetWriteDepth(); -bool IsWriteDepth(); -bool IsWriteDestAlphaTest(); - -// ------------------------- Useful inlines ------------------------------------ - -// memory size for one row of texture. It depends on width of texture and number of bytes -// per pixel -inline u32 Pitch(int fbw) { return (RW(fbw) * 4) ; } - -// memory size of whole texture. It is number of rows multiplied by memory size of row -inline u32 Tex_Memory_Size(int fbw, int fbh) { return (RH(fbh) * Pitch(fbw)); } - -// Often called for several reasons -// Call flush if renderer or depth target is equal to ptr -inline void FlushIfNecesary(void* ptr) -{ - if (vb[0].prndr == ptr || vb[0].pdepth == ptr) Flush(0); - if (vb[1].prndr == ptr || vb[1].pdepth == ptr) Flush(1); -} - -// This block was repeated several times, so I inlined it. -inline void DestroyAllTargetsHelper(void* ptr) -{ - for (int i = 0; i < 2; ++i) - { - if (ptr == vb[i].prndr) { vb[i].prndr = NULL; vb[i].bNeedFrameCheck = 1; } - if (ptr == vb[i].pdepth) { vb[i].pdepth = NULL; vb[i].bNeedZCheck = 1; } - } -} - -// Made an empty texture and bind it to $ptr_p -// returns false if creating texture was unsuccessful -// fbh and fdb should be properly shifted before calling this! -// We should ignore framebuffer trouble here, as we put textures of different sizes to it. -inline bool CRenderTarget::InitialiseDefaultTexture(u32 *ptr_p, int fbw, int fbh) -{ - glGenTextures(1, ptr_p); - glBindTexture(GL_TEXTURE_RECTANGLE_NV, *ptr_p); - - // initialize to default - TextureRect(GL_RGBA, fbw, fbh, GL_RGBA, GL_UNSIGNED_BYTE, NULL); - - setRectWrap(GL_CLAMP); - setRectFilters(GL_LINEAR); - - GLenum Error = glGetError(); - return ((Error == GL_NO_ERROR) || (Error == GL_INVALID_FRAMEBUFFER_OPERATION_EXT)); -} - -// Draw 4 triangles from binded array using only stencil buffer -inline void FillOnlyStencilBuffer() -{ - if (IsWriteDestAlphaTest() && !(conf.settings().no_stencil)) - { - glColorMask(0, 0, 0, 0); - glEnable(GL_ALPHA_TEST); - glAlphaFunc(GL_GEQUAL, 1.0f); - - glStencilOp(GL_KEEP, GL_KEEP, GL_REPLACE); - glStencilFunc(GL_ALWAYS, 1, 0xff); - - DrawTriangleArray(); - glColorMask(1, 1, 1, 1); - } -} - -// used for transformation from vertex position in GS window.coords (I hope) -// to view coordinates (in range 0, 1). -inline float4 CRenderTarget::DefaultBitBltPos() -{ - float4 v = float4(1, -1, 0.5f / (float)RW(fbw), 0.5f / (float)RH(fbh)); - v *= 1.0f / 32767.0f; - ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.sBitBltPos, v, "g_sBitBltPos"); - return v; -} - -// Used to transform texture coordinates from GS (when 0,0 is upper left) to -// OpenGL (0,0 - lower left). -inline float4 CRenderTarget::DefaultBitBltTex() -{ - // I really sure that -0.5 is correct, because OpenGL have no half-offset - // issue, DirectX known for. - float4 v = float4(1, -1, 0.5f / (float)RW(fbw), -0.5f / (float)RH(fbh)); - ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.sBitBltTex, v, "g_sBitBltTex"); - return v; -} - -inline void BindToSample(u32 *p_ptr) -{ - glBindTexture(GL_TEXTURE_RECTANGLE_NV, *p_ptr); - setRectFilters(GL_NEAREST); -} - -//////////////////// -// Render Targets // -//////////////////// -CRenderTarget::CRenderTarget() : ptex(0), ptexFeedback(0), psys(NULL) -{ - FUNCLOG - nUpdateTarg = 0; -} - -CRenderTarget::~CRenderTarget() -{ - FUNCLOG - Destroy(); -} - -bool CRenderTarget::Create(const frameInfo& frame) -{ - FUNCLOG - Resolve(); - Destroy(); - created = 123; - - lastused = timeGetTime(); - fbp = frame.fbp; - fbw = frame.fbw; - fbh = frame.fbh; - psm = (u8)frame.psm; - fbm = frame.fbm; - - vposxy.x = 2.0f * (1.0f / 8.0f) / (float)fbw; - vposxy.y = 2.0f * (1.0f / 8.0f) / (float)fbh; - vposxy.z = -1 - 0.5f / (float)fbw; - vposxy.w = -1 + 0.5f / (float)fbh; - status = 0; - - if (fbw > 0 && fbh > 0) - { - GetRectMemAddress(start, end, psm, 0, 0, fbw, fbh, fbp, fbw); - psys = _aligned_malloc(Tex_Memory_Size(fbw, fbh), 16); - - GL_REPORT_ERRORD(); - - if (!InitialiseDefaultTexture(&ptex, RW(fbw), RH(fbh))) - { - Destroy(); - return false; - } - - status = TS_NeedUpdate; - } - else - { - start = end = 0; - } - - return true; -} - -void CRenderTarget::Destroy() -{ - FUNCLOG - created = 1; - _aligned_free(psys); - psys = NULL; - SAFE_RELEASE_TEX(ptex); - SAFE_RELEASE_TEX(ptexFeedback); -} - -void CRenderTarget::SetTarget(int fbplocal, const Rect2& scissor, int context) -{ - FUNCLOG - int dy = 0; - - if (fbplocal != fbp) - { - float4 v; - - // will be rendering to a subregion - u32 bpp = PSMT_ISHALF(psm) ? 2 : 4; - assert(((256 / bpp)*(fbplocal - fbp)) % fbw == 0); - assert(fbplocal >= fbp); - - dy = ((256 / bpp) * (fbplocal - fbp)) / fbw; - - v.x = vposxy.x; - v.y = vposxy.y; - v.z = vposxy.z; - v.w = vposxy.w - dy * 2.0f / (float)fbh; - ZZshSetParameter4fv(g_vparamPosXY[context], v, "g_fPosXY"); - } - else - { - ZZshSetParameter4fv(g_vparamPosXY[context], vposxy, "g_fPosXY"); - } - - // set render states - // Bleh. I *really* need to fix this. << 3 when setting the scissors, then >> 3 when using them... --Arcum42 - scissorrect.x = scissor.x0 >> 3; - scissorrect.y = (scissor.y0 >> 3) + dy; - scissorrect.w = (scissor.x1 >> 3) + 1; - scissorrect.h = (scissor.y1 >> 3) + 1 + dy; - - scissorrect.w = min(scissorrect.w, fbw) - scissorrect.x; - scissorrect.h = min(scissorrect.h, fbh) - scissorrect.y; - - scissorrect.x = RW(scissorrect.x); - scissorrect.y = RH(scissorrect.y); - scissorrect.w = RW(scissorrect.w); - scissorrect.h = RH(scissorrect.h); -} - -void CRenderTarget::SetViewport() -{ - FUNCLOG - glViewport(0, 0, RW(fbw), RH(fbh)); -} - -inline bool NotResolveHelper() -{ - return ((s_nResolved > 8 && (2 * s_nResolved > fFPS - 10)) || (conf.settings().no_target_resolve)); -} - -void CRenderTarget::Resolve() -{ - FUNCLOG - - if (ptex != 0 && !(status&TS_Resolved) && !(status&TS_NeedUpdate)) - { - // flush if necessary - FlushIfNecesary(this) ; - - if ((IsDepth() && !IsWriteDepth()) || NotResolveHelper()) - { - // don't resolve if depths aren't used - status = TS_Resolved; - return; - } - - glBindTexture(GL_TEXTURE_RECTANGLE_NV, ptex); - - GL_REPORT_ERRORD(); - // This code extremely slow on DC1. -// _aligned_free(psys); -// psys = _aligned_malloc( Tex_Memory_Size ( fbw, fbh ), 16 ); - - glGetTexImage(GL_TEXTURE_RECTANGLE_NV, 0, GL_RGBA, GL_UNSIGNED_BYTE, psys); - - GL_REPORT_ERRORD(); - -#if defined(ZEROGS_DEVBUILD) - - if (g_bSaveResolved) - { - SaveTexture("resolved.tga", GL_TEXTURE_RECTANGLE_NV, ptex, RW(fbw), RH(fbh)); - g_bSaveResolved = 0; - } - -#endif - _Resolve(psys, fbp, fbw, fbh, psm, fbm, true); - - status = TS_Resolved; - } -} - -void CRenderTarget::Resolve(int startrange, int endrange) -{ - FUNCLOG - - assert(startrange < end && endrange > start); // make sure it at least intersects - - if (ptex != 0 && !(status&TS_Resolved) && !(status&TS_NeedUpdate)) - { - // flush if necessary - FlushIfNecesary(this) ; - -#if defined(ZEROGS_DEVBUILD) - if (g_bSaveResolved) - { - SaveTexture("resolved.tga", GL_TEXTURE_RECTANGLE_NV, ptex, RW(fbw), RH(fbh)); - g_bSaveResolved = 0; - } -#endif - if (conf.settings().no_target_resolve) - { - status = TS_Resolved; - return; - } - - int blockheight = PSMT_ISHALF(psm) ? 64 : 32; - int resolvefbp = fbp, resolveheight = fbh; - int scanlinewidth = 0x2000 * (fbw >> 6); - - // in no way should data be overwritten!, instead resolve less - - if (endrange < end) - { - // round down to nearest block and scanline - resolveheight = ((endrange - start) / (0x2000 * (fbw >> 6))) * blockheight; - - if (resolveheight <= 32) - { - status = TS_Resolved; - return; - } - } - else if (startrange > start) - { - // round up to nearest block and scanline - resolvefbp = startrange + scanlinewidth - 1; - resolvefbp -= resolvefbp % scanlinewidth; - - resolveheight = fbh - ((resolvefbp - fbp) * blockheight / scanlinewidth); - - if (resolveheight <= 64) // this is a total hack, but kh doesn't resolve now - { - status = TS_Resolved; - return; - } - - resolvefbp >>= 8; - } - - glBindTexture(GL_TEXTURE_RECTANGLE_NV, ptex); - - glGetTexImage(GL_TEXTURE_RECTANGLE_NV, 0, GL_RGBA, GL_UNSIGNED_BYTE, psys); - GL_REPORT_ERRORD(); - - u8* pbits = (u8*)psys; - - if (fbp != resolvefbp) pbits += ((resolvefbp - fbp) * 256 / scanlinewidth) * blockheight * Pitch(fbw); - - _Resolve(pbits, resolvefbp, fbw, resolveheight, psm, fbm, true); - - status = TS_Resolved; - } -} - -void CRenderTarget::Update(int context, CRenderTarget* pdepth) -{ - FUNCLOG - - DisableAllgl(); - - glBindBuffer(GL_ARRAY_BUFFER, vboRect); - SET_STREAM(); - - // assume depth already set - //pd3dDevice->SetDepthStencilSurface(psurfDepth); - ResetRenderTarget(1); - SetRenderTarget(0); - assert(pdepth != NULL); - ((CDepthTarget*)pdepth)->SetDepthStencilSurface(); - - SetShaderCaller("CRenderTarget::Update"); - float4 v = DefaultBitBltPos(); - - CRenderTargetMngr::MAPTARGETS::iterator ittarg; - - if (nUpdateTarg) - { - ittarg = s_RTs.mapTargets.find(nUpdateTarg); - - if (ittarg == s_RTs.mapTargets.end()) - { - ittarg = s_DepthRTs.mapTargets.find(nUpdateTarg); - - if (ittarg == s_DepthRTs.mapTargets.end()) - nUpdateTarg = 0; - else if (ittarg->second == this) - { - ZZLog::Debug_Log("Updating self."); - nUpdateTarg = 0; - } - } - else if (ittarg->second == this) - { - ZZLog::Debug_Log("Updating self."); - nUpdateTarg = 0; - } - } - - SetViewport(); - - if (nUpdateTarg) - { - ZZshGLSetTextureParameter(ppsBaseTexture.prog, ppsBaseTexture.sFinal, ittarg->second->ptex, "BaseTexture.final"); - - //assert( ittarg->second->fbw == fbw ); - int offset = (fbp - ittarg->second->fbp) * 64 / fbw; - - if (PSMT_ISHALF(psm)) // 16 bit - offset *= 2; - - v.x = (float)RW(fbw); - v.y = (float)RH(fbh); - v.z = 0.25f; - v.w = (float)RH(offset) + 0.25f; - - ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.sBitBltTex, v, "g_fBitBltTex"); - -// v = DefaultBitBltTex(); Maybe? - ZZshDefaultOneColor ( ppsBaseTexture ); - - ZZshSetPixelShader(ppsBaseTexture.prog); - - nUpdateTarg = 0; - } - else - { - u32 bit_idx = (AA.x == 0) ? 0 : 1; - - // align the rect to the nearest page - // note that fbp is always aligned on page boundaries - tex0Info texframe; - texframe.tbp0 = fbp; - texframe.tbw = fbw; - texframe.tw = fbw; - texframe.th = fbh; - texframe.psm = psm; - // FIXME some field are not initialized... - // in particular the clut related one - assert(!PSMT_ISCLUT(psm)); - - // write color and zero out stencil buf, always 0 context! - // force bilinear if using AA - // Fix in r133 -- FFX movies and Gust backgrounds! - //SetTexVariablesInt(0, 0*(AA.x || AA.y) ? 2 : 0, texframe, false, &ppsBitBlt[!!s_AAx], 1); - SetTexVariablesInt(0, 0, texframe, false, &ppsBitBlt[bit_idx], 1); - ZZshGLSetTextureParameter(ppsBitBlt[bit_idx].prog, ppsBitBlt[bit_idx].sMemory, vb[0].pmemtarg->ptex->tex, "BitBlt.memory"); - - v = float4(1, 1, 0.0f, 0.0f); - ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.sBitBltTex, v, "g_fBitBltTex"); - - v.x = 1; - v.y = 2; - ZZshSetParameter4fv(ppsBitBlt[bit_idx].prog, ppsBitBlt[bit_idx].sOneColor, v, "g_fOneColor"); - - assert(ptex != 0); - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - if (IsWriteDestAlphaTest()) - { - glEnable(GL_STENCIL_TEST); - glStencilFunc(GL_ALWAYS, 0, 0xff); - glStencilMask(0xff); - glStencilOp(GL_KEEP, GL_KEEP, GL_ZERO); - } - - // render with an AA shader if possible (bilinearly interpolates data) - //cgGLLoadProgram(ppsBitBlt[bit_idx].prog); - ZZshSetPixelShader(ppsBitBlt[bit_idx].prog); - } - - ZZshSetVertexShader(pvsBitBlt.prog); - - DrawTriangleArray(); - - // fill stencil buf only - FillOnlyStencilBuffer(); - glEnable(GL_SCISSOR_TEST); - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - if (conf.mrtdepth && pdepth != NULL && IsWriteDepth()) pdepth->SetRenderTarget(1); - - status = TS_Resolved; - - // reset since settings changed - vb[0].bVarsTexSync = 0; - -// ResetAlphaVariables(); -} - -void CRenderTarget::ConvertTo32() -{ - FUNCLOG - - u32 ptexConv; -// ZZLog::Error_Log("Convert to 32, report if something missing."); - // create new target - - if (! InitialiseDefaultTexture(&ptexConv, RW(fbw), RH(fbh) / 2)) - { - ZZLog::Error_Log("Failed to create target for ConvertTo32 %dx%d.", RW(fbw), RH(fbh) / 2); - return; - } - - DisableAllgl(); - - SetShaderCaller("CRenderTarget::ConvertTo32"); - - // tex coords, test ffx bikanel island when changing these - float4 v = DefaultBitBltPos(); - v = DefaultBitBltTex(); - - v.x = (float)RW(16); - v.y = (float)RH(16); - v.z = -(float)RW(fbw); - v.w = (float)RH(8); - ZZshSetParameter4fv(ppsConvert16to32.prog, ppsConvert16to32.fTexOffset, v, "g_fTexOffset"); - - v.x = (float)RW(8); - v.y = 0; - v.z = 0; - v.w = 0.25f; - ZZshSetParameter4fv(ppsConvert16to32.prog, ppsConvert16to32.fPageOffset, v, "g_fPageOffset"); - - v.x = (float)RW(2 * fbw); - v.y = (float)RH(fbh); - v.z = 0; - v.w = 0.0001f * (float)RH(fbh); - ZZshSetParameter4fv(ppsConvert16to32.prog, ppsConvert16to32.fTexDims, v, "g_fTexDims"); - -// v.x = 0; -// ZZshSetParameter4fv(ppsConvert16to32.fTexBlock, v, "g_fTexBlock"); - - glBindBuffer(GL_ARRAY_BUFFER, vboRect); - SET_STREAM(); - - // assume depth already set !? - FBTexture(0, ptexConv); - ResetRenderTarget(1); - - BindToSample(&ptex); - ZZshGLSetTextureParameter(ppsConvert16to32.prog, ppsConvert16to32.sFinal, ptex, "Convert 16 to 32.Final"); - - fbh /= 2; // have 16 bit surfaces are usually 2x higher - SetViewport(); - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - // render with an AA shader if possible (bilinearly interpolates data) - ZZshSetVertexShader(pvsBitBlt.prog); - ZZshSetPixelShader(ppsConvert16to32.prog); - DrawTriangleArray(); - -#ifdef _DEBUG - if (g_bSaveZUpdate) - { - // buggy - SaveTexture("tex1.tga", GL_TEXTURE_RECTANGLE_NV, ptex, RW(fbw), RH(fbh)*2); - SaveTexture("tex3.tga", GL_TEXTURE_RECTANGLE_NV, ptexConv, RW(fbw), RH(fbh)); - } - -#endif - - vposxy.y = -2.0f * (32767.0f / 8.0f) / (float)fbh; - vposxy.w = 1 + 0.5f / fbh; - - // restore - SAFE_RELEASE_TEX(ptex); - SAFE_RELEASE_TEX(ptexFeedback); - - ptex = ptexConv; - - // no need to free psys since the render target is getting shrunk - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - - // reset textures - BindToSample(&ptex); - - glEnable(GL_SCISSOR_TEST); - - status = TS_Resolved; - - // TODO, reset depth? - if (icurctx >= 0) - { - // reset since settings changed - vb[icurctx].bVarsTexSync = 0; - vb[icurctx].bVarsSetTarg = 0; - } - - vb[0].bVarsTexSync = 0; -} - -void CRenderTarget::ConvertTo16() -{ - FUNCLOG - - u32 ptexConv; - -// ZZLog::Error_Log("Convert to 16, report if something missing."); - // create new target - - if (! InitialiseDefaultTexture(&ptexConv, RW(fbw), RH(fbh)*2)) - { - ZZLog::Error_Log("Failed to create target for ConvertTo16 %dx%d.", RW(fbw), RH(fbh)*2); - return; - } - - DisableAllgl(); - - SetShaderCaller("CRenderTarget::ConvertTo16"); - - // tex coords, test ffx bikanel island when changing these - float4 v = DefaultBitBltPos(); - v = DefaultBitBltTex(); - - v.x = 16.0f / (float)fbw; - v.y = 8.0f / (float)fbh; - v.z = 0.5f * v.x; - v.w = 0.5f * v.y; - ZZshSetParameter4fv(ppsConvert32to16.prog, ppsConvert32to16.fTexOffset, v, "g_fTexOffset"); - - v.x = 256.0f / 255.0f; - v.y = 256.0f / 255.0f; - v.z = 0.05f / 256.0f; - v.w = -0.001f / 256.0f; - ZZshSetParameter4fv(ppsConvert32to16.prog, ppsConvert32to16.fPageOffset, v, "g_fPageOffset"); - - v.x = (float)RW(fbw); - v.y = (float)RH(2 * fbh); - v.z = 0; - v.w = -0.1f / RH(fbh); - ZZshSetParameter4fv(ppsConvert32to16.prog, ppsConvert32to16.fTexDims, v, "g_fTexDims"); - - glBindBuffer(GL_ARRAY_BUFFER, vboRect); - SET_STREAM(); - - // assume depth already set !? - FBTexture(0, ptexConv); - ResetRenderTarget(1); - GL_REPORT_ERRORD(); - - BindToSample(&ptex); - - ZZshGLSetTextureParameter(ppsConvert32to16.prog, ppsConvert32to16.sFinal, ptex, "Convert 32 to 16"); - -// fbh *= 2; // have 16 bit surfaces are usually 2x higher - - SetViewport(); - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - // render with an AA shader if possible (bilinearly interpolates data) - ZZshSetVertexShader(pvsBitBlt.prog); - ZZshSetPixelShader(ppsConvert32to16.prog); - DrawTriangleArray(); - -#ifdef _DEBUG - //g_bSaveZUpdate = 1; - if (g_bSaveZUpdate) - { - SaveTexture("tex1.tga", GL_TEXTURE_RECTANGLE_NV, ptexConv, RW(fbw), RH(fbh)); - } - -#endif - - vposxy.y = -2.0f * (32767.0f / 8.0f) / (float)fbh; - vposxy.w = 1 + 0.5f / fbh; - - // restore - SAFE_RELEASE_TEX(ptex); - SAFE_RELEASE_TEX(ptexFeedback); - - ptex = ptexConv; - - _aligned_free(psys); - - psys = _aligned_malloc(Tex_Memory_Size(fbw, fbh), 16); - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - - // reset textures - BindToSample(&ptex) ; - - glEnable(GL_SCISSOR_TEST); - - status = TS_Resolved; - - // TODO, reset depth? - if (icurctx >= 0) - { - // reset since settings changed - vb[icurctx].bVarsTexSync = 0; - vb[icurctx].bVarsSetTarg = 0; - } - - vb[0].bVarsTexSync = 0; -} - -void CRenderTarget::_CreateFeedback() -{ - FUNCLOG - - if (ptexFeedback == 0) - { - // create - if (! InitialiseDefaultTexture(&ptexFeedback, RW(fbw), RH(fbh))) - { - ZZLog::Error_Log("Failed to create feedback %dx%d.", RW(fbw), RH(fbh)); - return; - } - } - - DisableAllgl(); - - SetShaderCaller("CRenderTarget::_CreateFeedback"); - - // assume depth already set - ResetRenderTarget(1); - - // tex coords, test ffx bikanel island when changing these - /* float4 v = DefaultBitBltPos(); - v = float4 ((float)(RW(fbw+4)), (float)(RH(fbh+4)), +0.25f, -0.25f); - ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.sBitBltTex, v, "BitBltTex");*/ - - // tex coords, test ffx bikanel island when changing these - -// float4 v = float4(1, -1, 0.5f / (fbw << AA.x), 0.5f / (fbh << AA.y)); -// v *= 1/32767.0f; -// cgGLSetParameter4fv(pvsBitBlt.sBitBltPos, v); - float4 v = DefaultBitBltPos(); - - v.x = (float)(RW(fbw)); - v.y = (float)(RH(fbh)); - v.z = 0.0f; - v.w = 0.0f; - ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.sBitBltTex, v, "BitBlt.Feedback"); - ZZshDefaultOneColor(ppsBaseTexture); - - glBindBuffer(GL_ARRAY_BUFFER, vboRect); - SET_STREAM(); - - FBTexture(0, ptexFeedback); - glBindTexture(GL_TEXTURE_RECTANGLE_NV, ptex); - GL_REPORT_ERRORD(); - - ZZshGLSetTextureParameter(ppsBaseTexture.prog, ppsBaseTexture.sFinal, ptex, "BaseTexture.Feedback"); - - SetViewport(); - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - // render with an AA shader if possible (bilinearly interpolates data) - ZZshSetVertexShader(pvsBitBlt.prog); - ZZshSetPixelShader(ppsBaseTexture.prog); - DrawTriangleArray(); - - // restore - swap(ptex, ptexFeedback); - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - - glEnable(GL_SCISSOR_TEST); - - status |= TS_FeedbackReady; - - // TODO, reset depth? - if (icurctx >= 0) - { - // reset since settings changed - vb[icurctx].bVarsTexSync = 0; - } - - GL_REPORT_ERRORD(); -} - -void CRenderTarget::SetRenderTarget(int targ) -{ - FUNCLOG - - FBTexture(targ, ptex); - - //GL_REPORT_ERRORD(); - //if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) != GL_FRAMEBUFFER_COMPLETE_EXT) - //ERROR_LOG_SPAM("The Framebuffer is not complete. Glitches could appear onscreen.\n"); -} - -CDepthTarget::CDepthTarget() : CRenderTarget(), pdepth(0), pstencil(0), icount(0) {} - -CDepthTarget::~CDepthTarget() -{ - FUNCLOG - - Destroy(); -} - -bool CDepthTarget::Create(const frameInfo& frame) -{ - FUNCLOG - - if (!CRenderTarget::Create(frame)) return false; - - GL_REPORT_ERROR(); - - glGenRenderbuffersEXT(1, &pdepth); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, pdepth); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH24_STENCIL8_EXT, RW(fbw), RH(fbh)); - - if (glGetError() != GL_NO_ERROR) - { - // try a separate depth and stencil buffer - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, pdepth); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_DEPTH_COMPONENT24, RW(fbw), RH(fbh)); - - if (g_bUpdateStencil) - { - glGenRenderbuffersEXT(1, &pstencil); - glBindRenderbufferEXT(GL_RENDERBUFFER_EXT, pstencil); - glRenderbufferStorageEXT(GL_RENDERBUFFER_EXT, GL_STENCIL_INDEX8_EXT, RW(fbw), RH(fbh)); - - if (glGetError() != GL_NO_ERROR) - { - ZZLog::Error_Log("Failed to create depth buffer %dx%d.", RW(fbw), RH(fbh)); - return false; - } - } - else - { - pstencil = 0; - } - } - else - { - pstencil = pdepth; - } - - status = TS_NeedUpdate; - - return true; -} - -void CDepthTarget::Destroy() -{ - FUNCLOG - - if (status) // In this case Framebuffer extension is off-use and lead to segfault - { - ResetRenderTarget(1); - TextureRect(GL_DEPTH_ATTACHMENT_EXT); - TextureRect(GL_STENCIL_ATTACHMENT_EXT); - GL_REPORT_ERRORD(); - - if (pstencil != 0) - { - if (pstencil != pdepth) glDeleteRenderbuffersEXT(1, &pstencil); - pstencil = 0; - } - - if (pdepth != 0) - { - glDeleteRenderbuffersEXT(1, &pdepth); - pdepth = 0; - } - - GL_REPORT_ERRORD(); - } - - CRenderTarget::Destroy(); -} - - -extern int g_nDepthUsed; // > 0 if depth is used - -void CDepthTarget::Resolve() -{ - FUNCLOG - - if (g_nDepthUsed > 0 && conf.mrtdepth && !(status&TS_Virtual) && IsWriteDepth() && !(conf.settings().no_depth_resolve)) - CRenderTarget::Resolve(); - else - { - // flush if necessary - FlushIfNecesary(this) ; - - if (!(status & TS_Virtual)) status |= TS_Resolved; - } - - if (!(status&TS_Virtual)) - { - SetWriteDepth(); - } -} - -void CDepthTarget::Resolve(int startrange, int endrange) -{ - FUNCLOG - - if (g_nDepthUsed > 0 && conf.mrtdepth && !(status&TS_Virtual) && IsWriteDepth()) - { - CRenderTarget::Resolve(startrange, endrange); - } - else - { - // flush if necessary - FlushIfNecesary(this) ; - - if (!(status & TS_Virtual)) - status |= TS_Resolved; - } - - if (!(status&TS_Virtual)) - { - SetWriteDepth(); - } -} - -void CDepthTarget::Update(int context, CRenderTarget* prndr) -{ - FUNCLOG - - assert(!(status & TS_Virtual)); - - // align the rect to the nearest page - // note that fbp is always aligned on page boundaries - tex0Info texframe; - texframe.tbp0 = fbp; - texframe.tbw = fbw; - texframe.tw = fbw; - texframe.th = fbh; - texframe.psm = psm; - // FIXME some field are not initialized... - // in particular the clut related one - assert(!PSMT_ISCLUT(psm)); - - DisableAllgl(); - - VB& curvb = vb[context]; - - if (curvb.test.zte == 0) return; - - SetShaderCaller("CDepthTarget::Update"); - - glEnable(GL_DEPTH_TEST); - - glDepthMask(!curvb.zbuf.zmsk); - - static const u32 g_dwZCmp[] = { GL_NEVER, GL_ALWAYS, GL_GEQUAL, GL_GREATER }; - - glDepthFunc(g_dwZCmp[curvb.test.ztst]); - - // write color and zero out stencil buf, always 0 context! - SetTexVariablesInt(0, 0, texframe, false, &ppsBitBltDepth, 1); - ZZshGLSetTextureParameter(ppsBitBltDepth.prog, ppsBitBltDepth.sMemory, vb[0].pmemtarg->ptex->tex, "BitBltDepth"); - - float4 v = DefaultBitBltPos(); - - v = DefaultBitBltTex(); - - v.x = 1; - v.y = 2; - v.z = PSMT_IS16Z(psm) ? 1.0f : 0.0f; - v.w = g_filog32; - ZZshSetParameter4fv(ppsBitBltDepth.prog, ppsBitBltDepth.sOneColor, v, "g_fOneColor"); - - float4 vdepth = g_vdepth; - - if (psm == PSMT24Z) - { - vdepth.w = 0; - } - else if (psm != PSMT32Z) - { - vdepth.z = vdepth.w = 0; - } - - assert(ppsBitBltDepth.sBitBltZ != 0); - - ZZshSetParameter4fv(ppsBitBltDepth.prog, ppsBitBltDepth.sBitBltZ, (vdepth*(255.0f / 256.0f)), "g_fBitBltZ"); - - assert(pdepth != 0); - //GLint w1 = 0; - //GLint h1 = 0; - - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT, GL_TEXTURE_RECTANGLE_NV, ptex, 0); - //glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, GL_RENDERBUFFER_WIDTH_EXT, &w1); - //glGetRenderbufferParameterivEXT(GL_RENDERBUFFER_EXT, GL_RENDERBUFFER_HEIGHT_EXT, &h1); - SetDepthStencilSurface(); - - FBTexture(1); - - GLenum buffer = GL_COLOR_ATTACHMENT0_EXT; - - //ZZLog::Error_Log("CDepthTarget::Update: w1 = 0x%x; h1 = 0x%x", w1, h1); - DrawBuffers(&buffer); - - SetViewport(); - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); - - glBindBuffer(GL_ARRAY_BUFFER, vboRect); - - SET_STREAM(); - ZZshSetVertexShader(pvsBitBlt.prog); - ZZshSetPixelShader(ppsBitBltDepth.prog); - - DrawTriangleArray(); - - status = TS_Resolved; - - if (!IsWriteDepth()) - { - ResetRenderTarget(1); - } - - if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); - - glEnable(GL_SCISSOR_TEST); - -#ifdef _DEBUG - if (g_bSaveZUpdate) - { - SaveTex(&texframe, 1); - SaveTexture("frame1.tga", GL_TEXTURE_RECTANGLE_NV, ptex, RW(fbw), RH(fbh)); - } -#endif -} - -void CDepthTarget::SetDepthStencilSurface() -{ - FUNCLOG - TextureRect(GL_DEPTH_ATTACHMENT_EXT, pdepth); - - if (pstencil) - { - // there's a bug with attaching stencil and depth buffers - TextureRect(GL_STENCIL_ATTACHMENT_EXT, pstencil); - - if (icount++ < 8) // not going to fail if succeeded 4 times - { - GL_REPORT_ERRORD(); - - if (glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT) != GL_FRAMEBUFFER_COMPLETE_EXT) - { - TextureRect(GL_STENCIL_ATTACHMENT_EXT); - - if (pstencil != pdepth) glDeleteRenderbuffersEXT(1, &pstencil); - - pstencil = 0; - g_bUpdateStencil = 0; - } - } - } - else - { - TextureRect(GL_STENCIL_ATTACHMENT_EXT); - } -} - -void CRenderTargetMngr::Destroy() -{ - FUNCLOG - - for (MAPTARGETS::iterator it = mapTargets.begin(); it != mapTargets.end(); ++it) - { - delete it->second; - } - - mapTargets.clear(); - - for (MAPTARGETS::iterator it = mapDummyTargs.begin(); it != mapDummyTargs.end(); ++it) - { - delete it->second; - } - - mapDummyTargs.clear(); -} - -void CRenderTargetMngr::DestroyAllTargs(int start, int end, int fbw) -{ - FUNCLOG - - for (MAPTARGETS::iterator it = mapTargets.begin(); it != mapTargets.end();) - { - if (it->second->start < end && start < it->second->end) - { - // if is depth, only resolve if fbw is the same - if (!it->second->IsDepth()) - { - // only resolve if the widths are the same or it->second has bit outside the range - // shadow of colossus swaps between fbw=256,fbh=256 and fbw=512,fbh=448. This kills the game if doing || it->second->end > end - - // kh hack, sometimes kh movies do this to clear the target, so have a static count that periodically checks end - static int count = 0; - - if (it->second->fbw == fbw || (it->second->fbw != fbw && (it->second->start < start || ((count++&0xf) ? 0 : it->second->end > end)))) - { - it->second->Resolve(); - } - else - { - FlushIfNecesary(it->second) ; - it->second->status |= CRenderTarget::TS_Resolved; - } - } - else - { - if (it->second->fbw == fbw) - { - it->second->Resolve(); - } - else - { - FlushIfNecesary(it->second) ; - it->second->status |= CRenderTarget::TS_Resolved; - } - } - - DestroyAllTargetsHelper(it->second) ; - - u32 dummykey = GetFrameKeyDummy(it->second); - - if (mapDummyTargs.find(dummykey) == mapDummyTargs.end()) - { - mapDummyTargs[dummykey] = it->second; - } - else - { - delete it->second; - } - - mapTargets.erase(it++); - } - else - { - ++it; - } - } -} - -void CRenderTargetMngr::DestroyTarg(CRenderTarget* ptarg) -{ - FUNCLOG - DestroyAllTargetsHelper(ptarg) ; - delete ptarg; -} - -void CRenderTargetMngr::DestroyIntersecting(CRenderTarget* prndr) -{ - FUNCLOG - assert(prndr != NULL); - - int start, end; - GetRectMemAddress(start, end, prndr->psm, 0, 0, prndr->fbw, prndr->fbh, prndr->fbp, prndr->fbw); - - for (MAPTARGETS::iterator it = mapTargets.begin(); it != mapTargets.end();) - { - if ((it->second != prndr) && (it->second->start < end) && (start < it->second->end)) - { - it->second->Resolve(); - DestroyAllTargetsHelper(it->second) ; - u32 dummykey = GetFrameKeyDummy(it->second); - - if (mapDummyTargs.find(dummykey) == mapDummyTargs.end()) - { - mapDummyTargs[dummykey] = it->second; - } - else - { - delete it->second; - } - - mapTargets.erase(it++); - } - else - { - ++it; - } - } -} - -//-------------------------------------------------- - - -inline bool CheckWidthIsSame(const frameInfo& frame, CRenderTarget* ptarg) -{ - if (PSMT_ISHALF(frame.psm) == PSMT_ISHALF(ptarg->psm)) - return (frame.fbw == ptarg->fbw); - - if (PSMT_ISHALF(frame.psm)) - return (frame.fbw == 2 * ptarg->fbw); - else - return (2 * frame.fbw == ptarg->fbw); -} - -void CRenderTargetMngr::PrintTargets() -{ -#ifdef _DEBUG - for (MAPTARGETS::iterator it1 = mapDummyTargs.begin(); it1 != mapDummyTargs.end(); ++it1) - ZZLog::Debug_Log("\t Dummy Targets(0x%x) fbw:0x%x fbh:0x%x psm:0x%x fbp:0x%x", GetFrameKey(it1->second), it1->second->fbw, it1->second->fbh, it1->second->psm, it1->second->fbp); - - for (MAPTARGETS::iterator it1 = mapTargets.begin(); it1 != mapTargets.end(); ++it1) - ZZLog::Debug_Log("\t Targets(0x%x) fbw:0x%x fbh:0x%x psm:0x%x fbp:0x%x", GetFrameKey(it1->second), it1->second->fbw, it1->second->fbh, it1->second->psm, it1->second->fbp); -#endif -} - -bool CRenderTargetMngr::isFound(const frameInfo& frame, MAPTARGETS::iterator& it, u32 opts, u32 key, int maxposheight) -{ - // only enforce height if frame.fbh <= 0x1c0 - bool bfound = it != mapTargets.end(); - - if (bfound) - { - if (opts&TO_StrictHeight) - { - bfound = it->second->fbh == frame.fbh; - - if ((conf.settings().partial_depth) && !bfound) - { - MAPTARGETS::iterator itnew = mapTargets.find(key + 1); - - if (itnew != mapTargets.end() && itnew->second->fbh == frame.fbh) - { - // found! delete the previous and restore - delete it->second; - mapTargets.erase(it); - - it = mapTargets.insert(MAPTARGETS::value_type(key, itnew->second)).first; // readd - mapTargets.erase(itnew); // delete old - - bfound = true; - } - } - } - else - { - if (PSMT_ISHALF(frame.psm) == PSMT_ISHALF(it->second->psm) && !(conf.settings().full_16_bit_res)) - bfound = ((frame.fbh > 0x1c0) || (it->second->fbh >= frame.fbh)) && (it->second->fbh <= maxposheight); - } - } - - if (!bfound) - { - // might be a virtual target - it = mapTargets.find(key | TARGET_VIRTUAL_KEY); - bfound = it != mapTargets.end() && ((opts & TO_StrictHeight) ? it->second->fbh == frame.fbh : it->second->fbh >= frame.fbh) && it->second->fbh <= maxposheight; - } - - if (bfound && PSMT_ISHALF(frame.psm) && PSMT_ISHALF(it->second->psm) && (conf.settings().full_16_bit_res)) - { - // mgs3 - if (frame.fbh > it->second->fbh) - { - bfound = false; - } - } - - return bfound; -} - -CRenderTarget* CRenderTargetMngr::GetTarg(const frameInfo& frame, u32 opts, int maxposheight) -{ - FUNCLOG - - if (frame.fbw <= 0 || frame.fbh <= 0) - { - //ZZLog::Dev_Log("frame fbw == %d; fbh == %d", frame.fbw, frame.fbh); - return NULL; - } - - GL_REPORT_ERRORD(); - - u32 key = GetFrameKey(frame); - - MAPTARGETS::iterator it = mapTargets.find(key); - - if (isFound(frame, it, opts, key, maxposheight)) - { - // can be both 16bit and 32bit - if (PSMT_ISHALF(frame.psm) != PSMT_ISHALF(it->second->psm)) - { - // a lot of games do this, actually... - ZZLog::Debug_Log("Really bad formats! %d %d", frame.psm, it->second->psm); - -// This code SHOULD be commented, until I redo the _Resolve function - - if (!(opts & TO_StrictHeight)) - { - if ((conf.settings().vss_hack_off)) - { - if (PSMT_ISHALF(it->second->psm)) - { - it->second->status |= CRenderTarget::TS_NeedConvert32; - it->second->fbh /= 2; - } - else - { - it->second->status |= CRenderTarget::TS_NeedConvert16; - it->second->fbh *= 2; - } - } - } - - // recalc extents - GetRectMemAddress(it->second->start, it->second->end, frame.psm, 0, 0, frame.fbw, it->second->fbh, it->second->fbp, frame.fbw); - } - else - { - // certain variables have to be reset every time - if ((it->second->psm & ~1) != (frame.psm & ~1)) - { - ZZLog::Dev_Log("Bad formats 2: %d %d", frame.psm, it->second->psm); - - it->second->psm = frame.psm; - - // recalc extents - GetRectMemAddress(it->second->start, it->second->end, frame.psm, 0, 0, frame.fbw, it->second->fbh, it->second->fbp, frame.fbw); - } - } - - if (it->second->fbm != frame.fbm) - { - //ZZLog::Dev_Log("Bad fbm: 0x%8.8x 0x%8.8x, psm: %d", frame.fbm, it->second->fbm, frame.psm); - } - - it->second->fbm &= frame.fbm; - it->second->psm = frame.psm; // have to convert (ffx2) - - if ((it->first & TARGET_VIRTUAL_KEY) && !(opts&TO_Virtual)) - { - // switch - it->second->lastused = timeGetTime(); - return Promote(it->first&~TARGET_VIRTUAL_KEY); - } - - // check if there exists a more recent target that this target could update from - // only update if target isn't mirrored - bool bCheckHalfCovering = (conf.settings().full_16_bit_res) && PSMT_ISHALF(it->second->psm) && it->second->fbh + 32 < frame.fbh; - - for (MAPTARGETS::iterator itnew = mapTargets.begin(); itnew != mapTargets.end(); ++itnew) - { - if (itnew->second != it->second && itnew->second->ptex != it->second->ptex && itnew->second->ptexFeedback != it->second->ptex && - itnew->second->lastused > it->second->lastused && !(itnew->second->status & CRenderTarget::TS_NeedUpdate)) - { - - // if new target totally encompasses the current one - if (itnew->second->start <= it->second->start && itnew->second->end >= it->second->end) - { - it->second->status |= CRenderTarget::TS_NeedUpdate; - it->second->nUpdateTarg = itnew->first; - break; - } - - // if 16bit, then check for half encompassing targets - if (bCheckHalfCovering && itnew->second->start > it->second->start && itnew->second->start < it->second->end && itnew->second->end <= it->second->end + 0x2000) - { - it->second->status |= CRenderTarget::TS_NeedUpdate; - it->second->nUpdateTarg = itnew->first; - break; - } - } - } - - it->second->lastused = timeGetTime(); - - return it->second; - } - - // NOTE: instead of resolving, if current render targ is completely outside of old, can transfer - // the data like that. - - // first search for the target - CRenderTarget* ptarg = NULL; - - // have to change, so recreate (find all intersecting targets and Resolve) - u32 besttarg = 0; - - if (!(opts & CRenderTargetMngr::TO_Virtual)) - { - - int start, end; - GetRectMemAddress(start, end, frame.psm, 0, 0, frame.fbw, frame.fbh, frame.fbp, frame.fbw); - CRenderTarget* pbesttarg = NULL; - - if (besttarg == 0) - { - // if there is only one intersecting target and it encompasses the current one, update the new render target with - // its data instead of resolving then updating (ffx2). Do not change the original target. - for (MAPTARGETS::iterator it = mapTargets.begin(); it != mapTargets.end(); ++it) - { - if (it->second->start < end && start < it->second->end) - { - if ((conf.settings().fast_update) || - ((frame.fbw == it->second->fbw) && - // check depth targets only if partialdepth option - ((it->second->fbp != frame.fbp) || ((conf.settings().partial_depth) && (opts & CRenderTargetMngr::TO_DepthBuffer))))) - { - if (besttarg != 0) - { - besttarg = 0; - break; - } - - if (start >= it->second->start && end <= it->second->end) - { - besttarg = it->first; - pbesttarg = it->second; - } - } - } - } - } - - if (besttarg != 0 && pbesttarg->fbw != frame.fbw) - { - //ZZLog::Debug_Log("A %d %d %d %d\n", frame.psm, frame.fbw, pbesttarg->psm, pbesttarg->fbw); - - vb[0].frame.fbw = pbesttarg->fbw; - // Something should be here, but what? - } - - if (besttarg == 0) - { - // if none found, resolve all - DestroyAllTargs(start, end, frame.fbw); - } - else if (key == besttarg && pbesttarg != NULL) - { - // add one and store in a different location until best targ is processed - mapTargets.erase(besttarg); - besttarg++; - mapTargets[besttarg] = pbesttarg; - } - } - - if (mapTargets.size() > 8) - { - // release some resources - it = GetOldestTarg(mapTargets); - - // if more than 5s passed since target used, destroy - - if ((it->second != vb[0].prndr) && (it->second != vb[1].prndr) && - (it->second != vb[0].pdepth) && (it->second != vb[1].pdepth) && - ((timeGetTime() - it->second->lastused) > 5000)) - { - delete it->second; - mapTargets.erase(it); - } - } - - if (ptarg == NULL) - { - // not found yet, so create - - if (mapDummyTargs.size() > 8) - { - it = GetOldestTarg(mapDummyTargs); - - delete it->second; - mapDummyTargs.erase(it); - } - - it = mapDummyTargs.find(GetFrameKeyDummy(frame)); - - if (it != mapDummyTargs.end()) - { - ZZLog::Debug_Log("Dummy Frame fbw:0x%x fbh:0x%x psm:0x%x fbp:0x%x", frame.fbw, frame.fbh, frame.psm, frame.fbp); - PrintTargets(); - ZZLog::Debug_Log("Dummy it->second fbw:0x%x fbh:0x%x psm:0x%x fbp:0x%x", it->second->fbw, it->second->fbh, it->second->psm, it->second->fbp); - ptarg = it->second; - - mapDummyTargs.erase(it); - - // restore all setttings - ptarg->psm = frame.psm; - ptarg->fbm = frame.fbm; - ptarg->fbp = frame.fbp; - - GetRectMemAddress(ptarg->start, ptarg->end, frame.psm, 0, 0, frame.fbw, frame.fbh, frame.fbp, frame.fbw); - - ptarg->status = CRenderTarget::TS_NeedUpdate; - } - else - { - ZZLog::Debug_Log("Frame fbw:0x%x fbh:0x%x psm:0x%x fbp:0x%x", frame.fbw, frame.fbh, frame.psm, frame.fbp); - PrintTargets(); - // create anew - ptarg = (opts & TO_DepthBuffer) ? new CDepthTarget : new CRenderTarget; - CRenderTargetMngr* pmngrs[2] = { &s_DepthRTs, this == &s_RTs ? &s_RTs : NULL }; - int cur = 0; - - while (!ptarg->Create(frame)) - { - // destroy unused targets - if (mapDummyTargs.size() > 0) - { - it = mapDummyTargs.begin(); - delete it->second; - mapDummyTargs.erase(it); - continue; - } - - if (g_MemTargs.listClearedTargets.size() > 0) - { - g_MemTargs.DestroyCleared(); - continue; - } - else if (g_MemTargs.listTargets.size() > 32) - { - g_MemTargs.DestroyOldest(); - continue; - } - - if (pmngrs[cur] == NULL) - { - cur = !cur; - - if (pmngrs[cur] == NULL) - { - ZZLog::Warn_Log("Out of memory!"); - delete ptarg; - return NULL; - } - } - - if (pmngrs[cur]->mapTargets.size() == 0) - { - pmngrs[cur] = NULL; - cur = !cur; - continue; - } - - it = GetOldestTarg(pmngrs[cur]->mapTargets); - - DestroyTarg(it->second); - pmngrs[cur]->mapTargets.erase(it); - cur = !cur; - } - } - } - - if ((opts & CRenderTargetMngr::TO_Virtual)) - { - ptarg->status = CRenderTarget::TS_Virtual; - key |= TARGET_VIRTUAL_KEY; - - if ((it = mapTargets.find(key)) != mapTargets.end()) - { - - DestroyTarg(it->second); - it->second = ptarg; - ptarg->nUpdateTarg = besttarg; - return ptarg; - } - } - else - { - assert(mapTargets.find(key) == mapTargets.end()); - } - - ptarg->nUpdateTarg = besttarg; - - mapTargets[key] = ptarg; - - return ptarg; -} - -CRenderTargetMngr::MAPTARGETS::iterator CRenderTargetMngr::GetOldestTarg(MAPTARGETS& m) -{ - FUNCLOG - - if (m.size() == 0) - { - return m.end(); - } - - // release some resources - MAPTARGETS::iterator itmaxtarg = m.begin(); - - for (MAPTARGETS::iterator it = ++m.begin(); it != m.end(); ++it) - { - if (itmaxtarg->second->lastused < it->second->lastused) itmaxtarg = it; - } - - return itmaxtarg; -} - -void CRenderTargetMngr::GetTargs(int start, int end, list& listTargets) const -{ - FUNCLOG - - for (MAPTARGETS::const_iterator it = mapTargets.begin(); it != mapTargets.end(); ++it) - { - if ((it->second->start < end) && (start < it->second->end)) listTargets.push_back(it->second); - } -} - -void CRenderTargetMngr::Resolve(int start, int end) -{ - FUNCLOG - - for (MAPTARGETS::const_iterator it = mapTargets.begin(); it != mapTargets.end(); ++it) - { - if ((it->second->start < end) && (start < it->second->end)) - it->second->Resolve(); - } -} - -void CMemoryTargetMngr::Destroy() -{ - FUNCLOG - listTargets.clear(); - listClearedTargets.clear(); -} - -bool CMemoryTarget::ValidateTex(const tex0Info& tex0, int starttex, int endtex, bool bDeleteBadTex) -{ - FUNCLOG - - if (clearmaxy == 0) return true; - - int checkstarty = max(starttex, clearminy); - int checkendy = min(endtex, clearmaxy); - - if (checkstarty >= checkendy) return true; - - if (validatecount++ > VALIDATE_THRESH) - { - height = 0; - return false; - } - - // lock and compare - assert(ptex != NULL && ptex->memptr != NULL); - - int result = memcmp_mmx(ptex->memptr + MemorySize(checkstarty-realy), MemoryAddress(checkstarty), MemorySize(checkendy-checkstarty)); - - if (result == 0) - { - clearmaxy = 0; - return true; - } - - if (!bDeleteBadTex) return false; - - // delete clearminy, clearmaxy range (not the checkstarty, checkendy range) - //int newstarty = 0; - if (clearminy <= starty) - { - if (clearmaxy < starty + height) - { - // preserve end - height = starty + height - clearmaxy; - starty = clearmaxy; - assert(height > 0); - } - else - { - // destroy - height = 0; - } - } - else - { - // beginning can be preserved - height = clearminy - starty; - } - - clearmaxy = 0; - - assert((starty >= realy) && ((starty + height) <= (realy + realheight))); - - return false; -} - -#define TARGET_THRESH 0x500 - -extern int g_MaxTexWidth, g_MaxTexHeight; // Maximum height & width of supported texture. - -//#define SORT_TARGETS -inline list::iterator CMemoryTargetMngr::DestroyTargetIter(list::iterator& it) -{ - // find the target and destroy - list::iterator itprev = it; - ++it; - listClearedTargets.splice(listClearedTargets.end(), listTargets, itprev); - - if (listClearedTargets.size() > TEXDESTROY_THRESH) - { - listClearedTargets.pop_front(); - } - - return it; -} - -// Compare target to current texture info -// Not same format -> 1 -// Same format, not same data (clut only) -> 2 -// identical -> 0 -int CMemoryTargetMngr::CompareTarget(list::iterator& it, const tex0Info& tex0, int clutsize) -{ - if (PSMT_ISCLUT(it->psm) != PSMT_ISCLUT(tex0.psm)) - return 1; - - if (PSMT_ISCLUT(tex0.psm)) { - if (it->psm != tex0.psm || it->cpsm != tex0.cpsm || it->clutsize != clutsize) - return 1; - - if (PSMT_IS32BIT(tex0.cpsm)) { - if (Cmp_ClutBuffer_SavedClut((u32*)&it->clut[0], tex0.csa, clutsize)) - return 2; - } else { - if (Cmp_ClutBuffer_SavedClut((u16*)&it->clut[0], tex0.csa, clutsize)) - return 2; - } - - } else { - if (PSMT_IS16BIT(tex0.psm) != PSMT_IS16BIT(it->psm)) - return 1; - } - - return 0; -} - -void CMemoryTargetMngr::GetClutVariables(int& clutsize, const tex0Info& tex0) -{ - clutsize = 0; - - if (PSMT_ISCLUT(tex0.psm)) - { - int entries = PSMT_IS8CLUT(tex0.psm) ? 256 : 16; - - if (PSMT_IS32BIT(tex0.cpsm)) - clutsize = min(entries, 256 - tex0.csa * 16) * 4; - else - clutsize = min(entries, 512 - tex0.csa * 16) * 2; - } -} - -void CMemoryTargetMngr::GetMemAddress(int& start, int& end, const tex0Info& tex0) -{ - int nbStart, nbEnd; - GetRectMemAddress(nbStart, nbEnd, tex0.psm, 0, 0, tex0.tw, tex0.th, tex0.tbp0, tex0.tbw); - assert(nbStart < nbEnd); - nbEnd = min(nbEnd, MEMORY_END); - - start = nbStart / (4 * GPU_TEXWIDTH); - end = (nbEnd + GPU_TEXWIDTH * 4 - 1) / (4 * GPU_TEXWIDTH); - assert(start < end); - -} - -CMemoryTarget* CMemoryTargetMngr::SearchExistTarget(int start, int end, int clutsize, const tex0Info& tex0, int forcevalidate) -{ - for (list::iterator it = listTargets.begin(); it != listTargets.end();) - { - - if (it->starty <= start && it->starty + it->height >= end) - { - - int res = CompareTarget(it, tex0, clutsize); - - if (res == 1) - { - if (it->validatecount++ > VALIDATE_THRESH) - { - it = DestroyTargetIter(it); - - if (listTargets.size() == 0) break; - } - else - ++it; - - continue; - } - else if (res == 2) - { - ++it; - continue; - } - - if (forcevalidate) //&& listTargets.size() < TARGET_THRESH ) { - { - // do more validation checking. delete if not been used for a while - - if (!it->ValidateTex(tex0, start, end, curstamp > it->usedstamp + FORCE_TEXDESTROY_THRESH)) - { - - if (it->height <= 0) - { - it = DestroyTargetIter(it); - - if (listTargets.size() == 0) break; - } - else - ++it; - - continue; - } - } - - it->usedstamp = curstamp; - - it->validatecount = 0; - - return &(*it); - } - -#ifdef SORT_TARGETS - else if (it->starty >= end) break; - -#endif - - ++it; - } - - return NULL; -} - -CMemoryTarget* CMemoryTargetMngr::ClearedTargetsSearch(int fmt, int widthmult, int channels, int height) -{ - CMemoryTarget* targ = NULL; - - if (listClearedTargets.size() > 0) - { - list::iterator itbest = listClearedTargets.begin(); - - while (itbest != listClearedTargets.end()) - { - if ((height == itbest->realheight) && (itbest->fmt == fmt) && (itbest->widthmult == widthmult) && (itbest->channels == channels)) - { - // check channels - if (PIXELS_PER_WORD(itbest->psm) == channels) break; - } - - ++itbest; - } - - if (itbest != listClearedTargets.end()) - { - listTargets.splice(listTargets.end(), listClearedTargets, itbest); - targ = &listTargets.back(); - targ->validatecount = 0; - } - else - { - // create a new - listTargets.push_back(CMemoryTarget()); - targ = &listTargets.back(); - } - } - else - { - listTargets.push_back(CMemoryTarget()); - targ = &listTargets.back(); - } - - return targ; -} - -CMemoryTarget* CMemoryTargetMngr::GetMemoryTarget(const tex0Info& tex0, int forcevalidate) -{ - FUNCLOG - int start, end, clutsize; - - GetClutVariables(clutsize, tex0); - GetMemAddress(start, end, tex0); - - CMemoryTarget* it = SearchExistTarget(start, end, clutsize, tex0, forcevalidate); - - if (it != NULL) return it; - - // couldn't find so create - CMemoryTarget* targ; - - u32 fmt; - u32 internal_fmt; - if (PSMT_ISHALF_STORAGE(tex0)) { - // RGBA_5551 storage format - fmt = GL_UNSIGNED_SHORT_1_5_5_5_REV; - internal_fmt = GL_RGB5_A1; - } else { - // RGBA_8888 storage format - fmt = GL_UNSIGNED_BYTE; - internal_fmt = GL_RGBA; - } - - int widthmult = 1, channels = 1; - - // If our texture is too big and could not be placed in 1 GPU texture. Pretty rare in modern cards. - if ((g_MaxTexHeight < 4096) && (end - start > g_MaxTexHeight)) - { - // In this rare case we made a texture of half height and place it on the screen. - ZZLog::Debug_Log("Making a half height texture (start - end == 0x%x)", (end-start)); - widthmult = 2; - } - - channels = PIXELS_PER_WORD(tex0.psm); - - targ = ClearedTargetsSearch(fmt, widthmult, channels, end - start); - - if (targ->ptex != NULL) - { - assert(end - start <= targ->realheight && targ->fmt == fmt && targ->widthmult == widthmult); - - // good enough, so init - targ->realy = targ->starty = start; - targ->usedstamp = curstamp; - targ->psm = tex0.psm; - targ->cpsm = tex0.cpsm; - targ->height = end - start; - } else { - // not initialized yet - targ->fmt = fmt; - targ->realy = targ->starty = start; - targ->realheight = targ->height = end - start; - targ->usedstamp = curstamp; - targ->psm = tex0.psm; - targ->cpsm = tex0.cpsm; - targ->widthmult = widthmult; - targ->channels = channels; - targ->texH = (targ->realheight + widthmult - 1)/widthmult; - targ->texW = GPU_TEXWIDTH * widthmult * channels; - - // alloc the mem - targ->ptex = new CMemoryTarget::TEXTURE(); - targ->ptex->ref = 1; - } - -#if defined(ZEROGS_DEVBUILD) - g_TransferredToGPU += MemorySize(channels * targ->height); -#endif - - // fill with data - if (targ->ptex->memptr == NULL) - { - targ->ptex->memptr = (u8*)_aligned_malloc(MemorySize(targ->realheight), 16); - assert(targ->ptex->ref > 0); - } - - memcpy(targ->ptex->memptr, MemoryAddress(targ->realy), MemorySize(targ->height)); - - __aligned16 u8* ptexdata = NULL; - bool has_data = false; - - if (PSMT_ISCLUT(tex0.psm)) - { - assert(clutsize > 0); - - // Local clut parameter - targ->cpsm = tex0.cpsm; - - // Allocate a local clut array - targ->clutsize = clutsize; - if(targ->clut == NULL) - targ->clut = (u8*)_aligned_malloc(clutsize, 16); - else { - // In case it could occured - // realloc would be better but you need to get it from libutilies first - // _aligned_realloc is brought in from ScopedAlloc.h now. --arcum42 - _aligned_free(targ->clut); - targ->clut = (u8*)_aligned_malloc(clutsize, 16); - } - - // texture parameter - ptexdata = (u8*)_aligned_malloc(CLUT_PIXEL_SIZE(tex0.cpsm) * targ->texH * targ->texW, 16); - has_data = true; - - u8* psrc = (u8*)(MemoryAddress(targ->realy)); - - // Fill a local clut then build the real texture - if (PSMT_IS32BIT(tex0.cpsm)) - { - ClutBuffer_to_Array((u32*)targ->clut, tex0.csa, clutsize); - Build_Clut_Texture(tex0.psm, targ->height, (u32*)targ->clut, psrc, (u32*)ptexdata); - } - else - { - ClutBuffer_to_Array((u16*)targ->clut, tex0.csa, clutsize); - Build_Clut_Texture(tex0.psm, targ->height, (u16*)targ->clut, psrc, (u16*)ptexdata); - } - - assert(targ->clutsize > 0); - } - else if (tex0.psm == PSMT16Z || tex0.psm == PSMT16SZ) - { - ptexdata = (u8*)_aligned_malloc(4 * targ->texH * targ->texW, 16); - has_data = true; - - // needs to be 8 bit, use xmm for unpacking - u16* dst = (u16*)ptexdata; - u16* src = (u16*)(MemoryAddress(targ->realy)); - -#ifdef ZEROGS_SSE2 - assert(((u32)(uptr)dst) % 16 == 0); - // FIXME Uncomment to test intrinsic versions (instead of asm) - // perf improvement vs asm: - // 1/ gcc updates both pointer with 1 addition - // 2/ Bypass the cache for the store -#define NEW_INTRINSIC_VERSION -#ifdef NEW_INTRINSIC_VERSION - - __m128i zero_128 = _mm_setzero_si128(); - // NOTE: future performance improvement - // SSE4.1 support uncacheable load 128bits. Maybe it can - // avoid some cache pollution - // NOTE2: I create multiple _n variable to mimic the previous ASM behavior - // but I'm not sure there are real gains. - for (int i = targ->height * GPU_TEXWIDTH/16 ; i > 0 ; --i) - { - // Convert 16 bits pixels to 32bits (zero extended) - // Batch 64 bytes (32 pixels) at once. - __m128i pixels_1 = _mm_load_si128((__m128i*)src); - __m128i pixels_2 = _mm_load_si128((__m128i*)(src+8)); - __m128i pixels_3 = _mm_load_si128((__m128i*)(src+16)); - __m128i pixels_4 = _mm_load_si128((__m128i*)(src+24)); - - __m128i pix_low_1 = _mm_unpacklo_epi16(pixels_1, zero_128); - __m128i pix_high_1 = _mm_unpackhi_epi16(pixels_1, zero_128); - __m128i pix_low_2 = _mm_unpacklo_epi16(pixels_2, zero_128); - __m128i pix_high_2 = _mm_unpackhi_epi16(pixels_2, zero_128); - - // Note: bypass cache - _mm_stream_si128((__m128i*)dst, pix_low_1); - _mm_stream_si128((__m128i*)(dst+8), pix_high_1); - _mm_stream_si128((__m128i*)(dst+16), pix_low_2); - _mm_stream_si128((__m128i*)(dst+24), pix_high_2); - - __m128i pix_low_3 = _mm_unpacklo_epi16(pixels_3, zero_128); - __m128i pix_high_3 = _mm_unpackhi_epi16(pixels_3, zero_128); - __m128i pix_low_4 = _mm_unpacklo_epi16(pixels_4, zero_128); - __m128i pix_high_4 = _mm_unpackhi_epi16(pixels_4, zero_128); - - // Note: bypass cache - _mm_stream_si128((__m128i*)(dst+32), pix_low_3); - _mm_stream_si128((__m128i*)(dst+40), pix_high_3); - _mm_stream_si128((__m128i*)(dst+48), pix_low_4); - _mm_stream_si128((__m128i*)(dst+56), pix_high_4); - - src += 32; - dst += 64; - } - // It is advise to use a fence instruction after non temporal move (mm_stream) instruction... - // store fence insures that previous store are finish before execute new one. - _mm_sfence(); -#else - SSE2_UnswizzleZ16Target(dst, src, targ->height * GPU_TEXWIDTH / 16); -#endif -#else // ZEROGS_SSE2 - - for (int i = 0; i < targ->height; ++i) - { - for (int j = 0; j < GPU_TEXWIDTH; ++j) - { - dst[0] = src[0]; - dst[1] = 0; - dst[2] = src[1]; - dst[3] = 0; - dst += 4; - src += 2; - } - } - -#endif // ZEROGS_SSE2 - } - else - { - ptexdata = targ->ptex->memptr; - // We really don't want to deallocate memptr. As a reminder... - has_data = false; - } - - // create the texture - GL_REPORT_ERRORD(); - - assert(ptexdata != NULL); - - if (targ->ptex->tex == 0) glGenTextures(1, &targ->ptex->tex); - - glBindTexture(GL_TEXTURE_RECTANGLE_NV, targ->ptex->tex); - - TextureRect(internal_fmt, targ->texW, targ->texH, GL_RGBA, fmt, ptexdata); - - while (glGetError() != GL_NO_ERROR) - { - // release resources until can create - if (listClearedTargets.size() > 0) - { - listClearedTargets.pop_front(); - } - else - { - if (listTargets.size() == 0) - { - ZZLog::Error_Log("Failed to create %dx%x texture.", targ->texW, targ->texH); - channels = 1; - if (has_data) _aligned_free(ptexdata); - return NULL; - } - - DestroyOldest(); - } - - TextureRect(internal_fmt, targ->texW, targ->texH, GL_RGBA, fmt, ptexdata); - } - - setRectWrap(GL_CLAMP); - if (has_data) _aligned_free(ptexdata); - - assert(tex0.psm != 0xd); - - return targ; -} - -void CMemoryTargetMngr::ClearRange(int nbStartY, int nbEndY) -{ - FUNCLOG - int starty = nbStartY / (4 * GPU_TEXWIDTH); - int endy = (nbEndY + 4 * GPU_TEXWIDTH - 1) / (4 * GPU_TEXWIDTH); - //int endy = (nbEndY+4096-1) / 4096; - - //if( listTargets.size() < TARGET_THRESH ) { - - for (list::iterator it = listTargets.begin(); it != listTargets.end();) - { - - if (it->starty < endy && (it->starty + it->height) > starty) - { - - // intersects, reduce valid texture mem (or totally delete texture) - // there are 4 cases - int miny = max(it->starty, starty); - int maxy = min(it->starty + it->height, endy); - assert(miny < maxy); - - if (it->clearmaxy == 0) - { - it->clearminy = miny; - it->clearmaxy = maxy; - } - else - { - if (it->clearminy > miny) it->clearminy = miny; - if (it->clearmaxy < maxy) it->clearmaxy = maxy; - } - } - - ++it; - } - -// } -// else { -// for(list::iterator it = listTargets.begin(); it != listTargets.end(); ) { -// -// if( it->starty < endy && (it->starty+it->height) > starty ) { -// int newstarty = 0; -// if( starty <= it->starty ) { -// if( endy < it->starty + it->height) { -// // preserve end -// it->height = it->starty+it->height-endy; -// it->starty = endy; -// assert(it->height > 0); -// } -// else { -// // destroy -// it->height = 0; -// } -// } -// else { -// // beginning can be preserved -// it->height = starty-it->starty; -// } -// -// assert( it->starty >= it->realy && it->starty+it->height<=it->realy+it->realheight ); -// if( it->height <= 0 ) { -// list::iterator itprev = it; ++it; -// listClearedTargets.splice(listClearedTargets.end(), listTargets, itprev); -// continue; -// } -// } -// -// ++it; -// } -// } -} - -void CMemoryTargetMngr::DestroyCleared() -{ - FUNCLOG - - for (list::iterator it = listClearedTargets.begin(); it != listClearedTargets.end();) - { - if (it->usedstamp < curstamp - (FORCE_TEXDESTROY_THRESH -1)) - { - it = listClearedTargets.erase(it); - continue; - } - - ++it; - } - - if ((curstamp % FORCE_TEXDESTROY_THRESH) == 0) - { - // purge old targets every FORCE_TEXDESTROY_THRESH frames - for (list::iterator it = listTargets.begin(); it != listTargets.end();) - { - if (it->usedstamp < curstamp - FORCE_TEXDESTROY_THRESH) - { - it = listTargets.erase(it); - continue; - } - - ++it; - } - } - - ++curstamp; -} - -void CMemoryTargetMngr::DestroyOldest() -{ - FUNCLOG - - if (listTargets.size() == 0) - return; - - list::iterator it, itbest; - - it = itbest = listTargets.begin(); - - while (it != listTargets.end()) - { - if (it->usedstamp < itbest->usedstamp) itbest = it; - ++it; - } - - listTargets.erase(itbest); -} - -////////////////////////////////////// -// Texture Mngr For Bitwise AND Ops // -////////////////////////////////////// -void CBitwiseTextureMngr::Destroy() -{ - FUNCLOG - - for (map::iterator it = mapTextures.begin(); it != mapTextures.end(); ++it) - { - glDeleteTextures(1, &it->second); - } - - mapTextures.clear(); -} - -u32 CBitwiseTextureMngr::GetTexInt(u32 bitvalue, u32 ptexDoNotDelete) -{ - FUNCLOG - - if (mapTextures.size() > 32) - { - // randomly delete 8 - for (map::iterator it = mapTextures.begin(); it != mapTextures.end();) - { - if (!(rand()&3) && it->second != ptexDoNotDelete) - { - glDeleteTextures(1, &it->second); - mapTextures.erase(it++); - } - else - { - ++it; - } - } - } - - if (glGetError() != GL_NO_ERROR) ZZLog::Error_Log("Error before creation of bitmask texture."); - - // create a new tex - u32 ptex; - - glGenTextures(1, &ptex); - - if (glGetError() != GL_NO_ERROR) ZZLog::Error_Log("Error on generation of bitmask texture."); - - vector data(GPU_TEXMASKWIDTH); - - for (u32 i = 0; i < GPU_TEXMASKWIDTH; ++i) - { - data[i] = (((i << MASKDIVISOR) & bitvalue) << 6); // add the 1/2 offset so that - } - - // data[GPU_TEXMASKWIDTH] = 0; // I remove GPU_TEXMASKWIDTH+1 element of this texture, because it was a reason of FFC crush - // Probably, some sort of PoT incompability in drivers. - - glBindTexture(GL_TEXTURE_RECTANGLE, ptex); - if (glGetError() != GL_NO_ERROR) ZZLog::Error_Log("Error on binding bitmask texture."); - - TextureRect2(GL_LUMINANCE16, GPU_TEXMASKWIDTH, 1, GL_LUMINANCE, GL_UNSIGNED_SHORT, &data[0]); - if (glGetError() != GL_NO_ERROR) ZZLog::Error_Log("Error on applying bitmask texture."); - -// Removing clamping, as it seems lead to numerous troubles at some drivers -// Need to observe, may be clamping is not really needed. - /* setRectWrap2(GL_REPEAT); - - GLint Error = glGetError(); - if( Error != GL_NO_ERROR ) { - ERROR_LOG_SPAM_TEST("Failed to create bitmask texture; \t"); - if (SPAM_PASS) { - ZZLog::Log("bitmask cache %d; \t", mapTextures.size()); - switch (Error) { - case GL_INVALID_ENUM: ZZLog::Error_Log("Invalid enumerator.") ; break; - case GL_INVALID_VALUE: ZZLog::Error_Log("Invalid value."); break; - case GL_INVALID_OPERATION: ZZLog::Error_Log("Invalid operation."); break; - default: ZZLog::Error_Log("Error number: %d.", Error); - } - } - return 0; - }*/ - - mapTextures[bitvalue] = ptex; - - return ptex; -} - -void CRangeManager::RangeSanityCheck() -{ -#ifdef _DEBUG - // sanity check - - for (int i = 0; i < (int)ranges.size() - 1; ++i) - { - assert(ranges[i].end < ranges[i+1].start); - } - -#endif -} - -void CRangeManager::Insert(int start, int end) -{ - FUNCLOG - int imin = 0, imax = (int)ranges.size(), imid; - - RangeSanityCheck(); - - switch (ranges.size()) - { - - case 0: - ranges.push_back(RANGE(start, end)); - return; - - case 1: - if (end < ranges.front().start) - { - ranges.insert(ranges.begin(), RANGE(start, end)); - } - else if (start > ranges.front().end) - { - ranges.push_back(RANGE(start, end)); - } - else - { - if (start < ranges.front().start) ranges.front().start = start; - if (end > ranges.front().end) ranges.front().end = end; - } - - return; - } - - // find where start is - while (imin < imax) - { - imid = (imin + imax) >> 1; - - assert(imid < (int)ranges.size()); - - if ((ranges[imid].end >= start) && ((imid == 0) || (ranges[imid-1].end < start))) - { - imin = imid; - break; - } - else if (ranges[imid].start > start) - { - imax = imid; - } - else - { - imin = imid + 1; - } - } - - int startindex = imin; - - if (startindex >= (int)ranges.size()) - { - // non intersecting - assert(start > ranges.back().end); - ranges.push_back(RANGE(start, end)); - return; - } - - if (startindex == 0 && end < ranges.front().start) - { - ranges.insert(ranges.begin(), RANGE(start, end)); - RangeSanityCheck(); - return; - } - - imin = 0; - imax = (int)ranges.size(); - - // find where end is - - while (imin < imax) - { - imid = (imin + imax) >> 1; - - assert(imid < (int)ranges.size()); - - if ((ranges[imid].end <= end) && ((imid == ranges.size() - 1) || (ranges[imid+1].start > end))) - { - imin = imid; - break; - } - else if (ranges[imid].start >= end) - { - imax = imid; - } - else - { - imin = imid + 1; - } - } - - int endindex = imin; - - if (startindex > endindex) - { - // create a new range - ranges.insert(ranges.begin() + startindex, RANGE(start, end)); - RangeSanityCheck(); - return; - } - - if (endindex >= (int)ranges.size() - 1) - { - // pop until startindex is reached - int lastend = ranges.back().end; - int numpop = (int)ranges.size() - startindex - 1; - - while (numpop-- > 0) - { - ranges.pop_back(); - } - - assert(start <= ranges.back().end); - - if (start < ranges.back().start) ranges.back().start = start; - if (lastend > ranges.back().end) ranges.back().end = lastend; - if (end > ranges.back().end) ranges.back().end = end; - - RangeSanityCheck(); - - return; - } - - if (endindex == 0) - { - assert(end >= ranges.front().start); - - if (start < ranges.front().start) ranges.front().start = start; - if (end > ranges.front().end) ranges.front().end = end; - - RangeSanityCheck(); - } - - // somewhere in the middle - if (ranges[startindex].start < start) start = ranges[startindex].start; - - if (startindex < endindex) - { - ranges.erase(ranges.begin() + startindex, ranges.begin() + endindex); - } - - if (start < ranges[startindex].start) ranges[startindex].start = start; - if (end > ranges[startindex].end) ranges[startindex].end = end; - - RangeSanityCheck(); -} - -CRangeManager s_RangeMngr; // manages overwritten memory - -void ResolveInRange(int start, int end) -{ - FUNCLOG - list listTargs = CreateTargetsList(start, end); - /* s_DepthRTs.GetTargs(start, end, listTargs); - s_RTs.GetTargs(start, end, listTargs);*/ - - if (listTargs.size() > 0) - { - FlushBoth(); - - // We need another list, because old one could be brocken by Flush(). - listTargs.clear(); - listTargs = CreateTargetsList(start, end); - /* s_DepthRTs.GetTargs(start, end, listTargs_1); - s_RTs.GetTargs(start, end, listTargs_1);*/ - - for (list::iterator it = listTargs.begin(); it != listTargs.end(); ++it) - { - // only resolve if not completely covered - if ((*it)->created == 123) - (*it)->Resolve(); - else - ZZLog::Debug_Log("Resolving non-existing object! Destroy code %d.", (*it)->created); - } - } -} - -////////////////// -// Transferring // -////////////////// -void FlushTransferRanges(const tex0Info* ptex) -{ - FUNCLOG - assert(s_RangeMngr.ranges.size() > 0); - //bool bHasFlushed = false; - list listTransmissionUpdateTargs; - - int texstart = -1, texend = -1; - - if (ptex != NULL) - { - GetRectMemAddress(texstart, texend, ptex->psm, 0, 0, ptex->tw, ptex->th, ptex->tbp0, ptex->tbw); - } - - for (vector::iterator itrange = s_RangeMngr.ranges.begin(); itrange != s_RangeMngr.ranges.end(); ++itrange) - { - - int start = itrange->start; - int end = itrange->end; - - listTransmissionUpdateTargs.clear(); - listTransmissionUpdateTargs = CreateTargetsList(start, end); - - /* s_DepthRTs.GetTargs(start, end, listTransmissionUpdateTargs); - s_RTs.GetTargs(start, end, listTransmissionUpdateTargs);*/ - -// if( !bHasFlushed && listTransmissionUpdateTargs.size() > 0 ) { -// FlushBoth(); -// -//#ifdef _DEBUG -// // make sure targets are still the same -// list::iterator it; -// FORIT(it, listTransmissionUpdateTargs) { -// CRenderTargetMngr::MAPTARGETS::iterator itmap; -// for(itmap = s_RTs.mapTargets.begin(); itmap != s_RTs.mapTargets.end(); ++itmap) { -// if( itmap->second == *it ) -// break; -// } -// -// if( itmap == s_RTs.mapTargets.end() ) { -// -// for(itmap = s_DepthRTs.mapTargets.begin(); itmap != s_DepthRTs.mapTargets.end(); ++itmap) { -// if( itmap->second == *it ) -// break; -// } -// -// assert( itmap != s_DepthRTs.mapTargets.end() ); -// } -// } -//#endif -// } - - for (list::iterator it = listTransmissionUpdateTargs.begin(); it != listTransmissionUpdateTargs.end(); ++it) - { - - CRenderTarget* ptarg = *it; - - if ((ptarg->status & CRenderTarget::TS_Virtual)) continue; - - if (!(ptarg->start < texend && ptarg->end > texstart)) - { - // check if target is currently being used - - if (!(conf.settings().no_quick_resolve)) - { - if (ptarg->fbp != vb[0].gsfb.fbp) //&& (vb[0].prndr == NULL || ptarg->fbp != vb[0].prndr->fbp) ) { - { - if (ptarg->fbp != vb[1].gsfb.fbp) //&& (vb[1].prndr == NULL || ptarg->fbp != vb[1].prndr->fbp) ) { - { - // this render target currently isn't used and is not in the texture's way, so can safely ignore - // resolving it. Also the range has to be big enough compared to the target to really call it resolved - // (ffx changing screens, shadowhearts) - // start == ptarg->start, used for kh to transfer text - - if (ptarg->IsDepth() || end - start > 0x50000 || ((conf.settings().quick_resolve_1) && start == ptarg->start)) - ptarg->status |= CRenderTarget::TS_NeedUpdate | CRenderTarget::TS_Resolved; - - continue; - } - } - } - } - else - { -// if( start <= texstart && end >= texend ) { -// // texture taken care of so can skip!? -// continue; -// } - } - - // the first range check was very rough; some games (dragonball z) have the zbuf in the same page as textures (but not overlapping) - // so detect that condition - if (ptarg->fbh % m_Blocks[ptarg->psm].height) - { - - // get start of left-most boundry page - int targstart, targend; - GetRectMemAddress(targstart, targend, ptarg->psm, 0, 0, ptarg->fbw, ptarg->fbh & ~(m_Blocks[ptarg->psm].height - 1), ptarg->fbp, ptarg->fbw); - - if (start >= targend) - { - // don't bother - if ((ptarg->fbh % m_Blocks[ptarg->psm].height) <= 2) continue; - - // calc how many bytes of the block that the page spans - } - } - - if (!(ptarg->status & CRenderTarget::TS_Virtual)) - { - - if (start < ptarg->end && end > ptarg->start) - { - - // suikoden5 is faster with check, but too big of a value and kh screens mess up - /* Zeydlitz remove this check, it does not do anything good - if ((end - start > 0x8000) && (!(conf.settings() & GAME_GUSTHACK) || (end-start > 0x40000))) { - // intersects, do only one sided resolves - if( end-start > 4*ptarg->fbw ) { // at least it be greater than one scanline (spiro is faster) - if( start > ptarg->start ) { - ptarg->Resolve(ptarg->start, start); - - } - else if( end < ptarg->end ) { - ptarg->Resolve(end, ptarg->end); - } - } - }*/ - - ptarg->status |= CRenderTarget::TS_Resolved; - - if ((!ptarg->IsDepth() || (!(conf.settings().no_depth_update) || end - start > 0x1000)) && ((end - start > 0x40000) || !(conf.settings().gust))) - ptarg->status |= CRenderTarget::TS_NeedUpdate; - } - } - } - - g_MemTargs.ClearRange(start, end); - } - - s_RangeMngr.Clear(); -} - - -#if 0 -// I removed some code here that wasn't getting called. The old versions #if'ed out below this. -#define RESOLVE_32_BIT(PSM, T, Tsrc, convfn) \ - { \ - u32 mask, imask; \ - \ - if (PSMT_ISHALF(psm)) /* 16 bit */ \ - {\ - /* mask is shifted*/ \ - imask = RGBA32to16(fbm);\ - mask = (~imask)&0xffff;\ - }\ - else \ - {\ - mask = ~fbm;\ - imask = fbm;\ - }\ - \ - Tsrc* src = (Tsrc*)(psrc); \ - T* pPageOffset = (T*)g_pbyGSMemory + fbp*(256/sizeof(T)), *dst; \ - int maxfbh = (MEMORY_END-fbp*256) / (sizeof(T) * fbw); \ - if( maxfbh > fbh ) maxfbh = fbh; \ - \ - for(int i = 0; i < maxfbh; ++i) { \ - for(int j = 0; j < fbw; ++j) { \ - T dsrc = convfn(src[RW(j)]); \ - dst = pPageOffset + getPixelAddress##PSM##_0(j, i, fbw); \ - *dst = (dsrc & mask) | (*dst & imask); \ - } \ - src += RH(Pitch(fbw))/sizeof(Tsrc); \ - } \ - } \ - -#endif - -#ifdef __linux__ -//#define LOG_RESOLVE_PROFILE -#endif - -template -inline void Resolve_32_Bit(const void* psrc, int fbp, int fbw, int fbh, const int psm, u32 fbm) -{ - u32 mask, imask; -#ifdef LOG_RESOLVE_PROFILE - u32 startime = timeGetPreciseTime(); -#endif - - if (PSMT_ISHALF(psm)) /* 16 bit */ - { - /* mask is shifted*/ - imask = RGBA32to16(fbm); - mask = (~imask)&0xffff; - } - else - { - mask = ~fbm; - imask = fbm; - } - - Tdst* pPageOffset = (Tdst*)g_pbyGSMemory + fbp*(256/sizeof(Tdst)); - Tdst* dst; - Tdst dsrc; - - int maxfbh = (MEMORY_END-fbp*256) / (sizeof(Tdst) * fbw); - if( maxfbh > fbh ) maxfbh = fbh; - -#ifdef LOG_RESOLVE_PROFILE - ZZLog::Dev_Log("*** Resolve 32 bits: %dx%d in %x", maxfbh, fbw, psm); -#endif - - // Start the src array at the end to reduce testing in loop - u32 raw_size = RH(Pitch(fbw))/sizeof(u32); - u32* src = (u32*)(psrc) + (maxfbh-1)*raw_size; - - for(int i = maxfbh-1; i >= 0; --i) { - for(int j = fbw-1; j >= 0; --j) { - if (do_conversion) { - dsrc = RGBA32to16(src[RW(j)]); - } else { - dsrc = (Tdst)src[RW(j)]; - } - // They are 3 methods to call the functions - // macro (compact, inline) but need a nice psm ; swich (inline) ; function pointer (compact) - // Use a switch to allow inlining of the getPixel function. - // Note: psm is const so the switch is completely optimized - // Function method example: - // dst = pPageOffset + getPixelFun_0[psm](j, i, fbw); - switch (psm) - { - case PSMCT32: - case PSMCT24: - dst = pPageOffset + getPixelAddress32_0(j, i, fbw); - break; - - case PSMCT16: - dst = pPageOffset + getPixelAddress16_0(j, i, fbw); - break; - - case PSMCT16S: - dst = pPageOffset + getPixelAddress16S_0(j, i, fbw); - break; - - case PSMT32Z: - case PSMT24Z: - dst = pPageOffset + getPixelAddress32Z_0(j, i, fbw); - break; - - case PSMT16Z: - dst = pPageOffset + getPixelAddress16Z_0(j, i, fbw); - break; - - case PSMT16SZ: - dst = pPageOffset + getPixelAddress16SZ_0(j, i, fbw); - break; - } - *dst = (dsrc & mask) | (*dst & imask); - } - src -= raw_size; - } -#ifdef LOG_RESOLVE_PROFILE - ZZLog::Dev_Log("*** 32 bits: execution time %d", timeGetPreciseTime()-startime); -#endif -} - -static const __aligned16 unsigned int pixel_5b_mask[4] = {0x0000001F, 0x0000001F, 0x0000001F, 0x0000001F}; - -#ifdef ZEROGS_SSE2 -// The function process 2*2 pixels in 32bits. And 2*4 pixels in 16bits -template -__forceinline void update_8pixels_sse2(u32* src, u32* basepage, u32 i_msk, u32 j, u32 pix_mask, u32 src_pitch) -{ - u32* base_ptr; - __m128i pixels_0; - __m128i pixel_0_low; - __m128i pixel_0_high; - - __m128i pixels_1; - __m128i pixel_1_low; - __m128i pixel_1_high; - - assert((i_msk&0x1) == 0); // Failure => wrong line selected - - // Note: pixels have a special arrangement in column. Here a short description when AA.x = 0 - // - // 32 bits format: 8x2 pixels: the idea is to read pixels 0-3 - // It is easier to process 4 bits (we can not cross column bondary) - // 0 1 4 5 8 9 12 13 - // 2 3 6 7 10 11 14 15 - // - // 16 bits format: 16x2 pixels, each pixels have a lower and higher part. - // Here the idea to read 0L-3L & 0H-3H to combine lower and higher part this avoid - // data interleaving and useless read/write - // 0L 1L 4L 5L 8L 9L 12L 13L 0H 1H 4H 5H 8H 9H 12H 13H - // 2L 3L 6L 7L 10L 11L 14L 15L 2H 3H 6H 7H 10H 11H 14H 15H - // - if (AA.x == 2) { - // Note: pixels (32bits) are stored like that: - // p0 p0 p0 p0 p1 p1 p1 p1 p4 p4 p4 p4 p5 p5 p5 p5 - // ... - // p2 p2 p2 p2 p3 p3 p3 p3 p6 p6 p6 p6 p7 p7 p7 p7 - base_ptr = &src[((j+INDEX)<<2)]; - pixel_0_low = _mm_loadl_epi64((__m128i*)(base_ptr + 3)); - if (!null_second_line) pixel_0_high = _mm_loadl_epi64((__m128i*)(base_ptr + 3 + src_pitch)); - - if (PSMT_ISHALF(psm)) { - pixel_1_low = _mm_loadl_epi64((__m128i*)(base_ptr + 3 + 32)); - if (!null_second_line) pixel_1_high = _mm_loadl_epi64((__m128i*)(base_ptr + 3 + 32 + src_pitch)); - } - } else if(AA.x ==1) { - // Note: pixels (32bits) are stored like that: - // p0 p0 p1 p1 p4 p4 p5 p5 - // ... - // p2 p2 p3 p3 p6 p6 p7 p7 - base_ptr = &src[((j+INDEX)<<1)]; - pixel_0_low = _mm_loadl_epi64((__m128i*)(base_ptr + 1)); - if (!null_second_line) pixel_0_high = _mm_loadl_epi64((__m128i*)(base_ptr + 1 + src_pitch)); - - if (PSMT_ISHALF(psm)) { - pixel_1_low = _mm_loadl_epi64((__m128i*)(base_ptr + 1 + 16)); - if (!null_second_line) pixel_1_high = _mm_loadl_epi64((__m128i*)(base_ptr + 1 + 16 + src_pitch)); - } - } else { - // Note: pixels (32bits) are stored like that: - // p0 p1 p4 p5 - // p2 p3 p6 p7 - base_ptr = &src[(j+INDEX)]; - pixel_0_low = _mm_loadl_epi64((__m128i*)base_ptr); - if (!null_second_line) pixel_0_high = _mm_loadl_epi64((__m128i*)(base_ptr + src_pitch)); - - if (PSMT_ISHALF(psm)) { - pixel_1_low = _mm_loadl_epi64((__m128i*)(base_ptr + 8)); - if (!null_second_line) pixel_1_high = _mm_loadl_epi64((__m128i*)(base_ptr + 8 + src_pitch)); - } - } - - // 2nd line does not exist... Just duplicate the pixel value - if(null_second_line) { - pixel_0_high = pixel_0_low; - if (PSMT_ISHALF(psm)) pixel_1_high = pixel_1_low; - } - - // Merge the 2 dword - pixels_0 = _mm_unpacklo_epi64(pixel_0_low, pixel_0_high); - if (PSMT_ISHALF(psm)) pixels_1 = _mm_unpacklo_epi64(pixel_1_low, pixel_1_high); - - // transform pixel from ARGB:8888 to ARGB:1555 - if (psm == PSMCT16 || psm == PSMCT16S) { - // shift pixel instead of the mask. It allow to keep 1 mask into a register - // instead of 4 (not enough room on x86...). - __m128i pixel_mask = _mm_load_si128((__m128i*)pixel_5b_mask); - - __m128i pixel_0_B = _mm_srli_epi32(pixels_0, 3); - pixel_0_B = _mm_and_si128(pixel_0_B, pixel_mask); - - __m128i pixel_0_G = _mm_srli_epi32(pixels_0, 11); - pixel_0_G = _mm_and_si128(pixel_0_G, pixel_mask); - - __m128i pixel_0_R = _mm_srli_epi32(pixels_0, 19); - pixel_0_R = _mm_and_si128(pixel_0_R, pixel_mask); - - // Note: because of the logical shift we do not need to mask the value - __m128i pixel_0_A = _mm_srli_epi32(pixels_0, 31); - - // Realignment of pixels - pixel_0_A = _mm_slli_epi32(pixel_0_A, 15); - pixel_0_R = _mm_slli_epi32(pixel_0_R, 10); - pixel_0_G = _mm_slli_epi32(pixel_0_G, 5); - - // rebuild a complete pixel - pixels_0 = _mm_or_si128(pixel_0_A, pixel_0_B); - pixels_0 = _mm_or_si128(pixels_0, pixel_0_G); - pixels_0 = _mm_or_si128(pixels_0, pixel_0_R); - - // do the same for pixel_1 - __m128i pixel_1_B = _mm_srli_epi32(pixels_1, 3); - pixel_1_B = _mm_and_si128(pixel_1_B, pixel_mask); - - __m128i pixel_1_G = _mm_srli_epi32(pixels_1, 11); - pixel_1_G = _mm_and_si128(pixel_1_G, pixel_mask); - - __m128i pixel_1_R = _mm_srli_epi32(pixels_1, 19); - pixel_1_R = _mm_and_si128(pixel_1_R, pixel_mask); - - __m128i pixel_1_A = _mm_srli_epi32(pixels_1, 31); - - // Realignment of pixels - pixel_1_A = _mm_slli_epi32(pixel_1_A, 15); - pixel_1_R = _mm_slli_epi32(pixel_1_R, 10); - pixel_1_G = _mm_slli_epi32(pixel_1_G, 5); - - // rebuild a complete pixel - pixels_1 = _mm_or_si128(pixel_1_A, pixel_1_B); - pixels_1 = _mm_or_si128(pixels_1, pixel_1_G); - pixels_1 = _mm_or_si128(pixels_1, pixel_1_R); - } - - // Move the pixels to higher parts and merge it with pixels_0 - if (PSMT_ISHALF(psm)) { - pixels_1 = _mm_slli_epi32(pixels_1, 16); - pixels_0 = _mm_or_si128(pixels_0, pixels_1); - } - - // Status 16 bits - // pixels_0 = p3H p3L p2H p2L p1H p1L p0H p0L - // Status 32 bits - // pixels_0 = p3 p2 p1 p0 - - // load the destination add - u32* dst_add; - if (PSMT_ISHALF(psm)) - dst_add = basepage + (pageTable[i_msk][(INDEX)] >> 1); - else - dst_add = basepage + pageTable[i_msk][(INDEX)]; - - // Save some memory access when pix_mask is 0. - if (pix_mask) { - // Build fbm mask (tranform a u32 to a 4 packets u32) - // In 16 bits texture one packet is "0000 DATA" - __m128i imask = _mm_cvtsi32_si128(pix_mask); - imask = _mm_shuffle_epi32(imask, 0); - - // apply the mask on new values - pixels_0 = _mm_andnot_si128(imask, pixels_0); - - __m128i old_pixels_0; - __m128i final_pixels_0; - - old_pixels_0 = _mm_and_si128(imask, _mm_load_si128((__m128i*)dst_add)); - final_pixels_0 = _mm_or_si128(old_pixels_0, pixels_0); - - _mm_store_si128((__m128i*)dst_add, final_pixels_0); - } else { - // Note: because we did not read the previous value of add. We could bypass the cache. - // We gains a few percents - _mm_stream_si128((__m128i*)dst_add, pixels_0); - } - -} - -// Update 2 lines of a page (2*64 pixels) -template -__forceinline void update_pixels_row_sse2(u32* src, u32* basepage, u32 i_msk, u32 j, u32 pix_mask, u32 raw_size) -{ - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - - if(!PSMT_ISHALF(psm)) { - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - } - - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - - if(!PSMT_ISHALF(psm)) { - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - } - - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - - if(!PSMT_ISHALF(psm)) { - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - } - - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - - if(!PSMT_ISHALF(psm)) { - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - update_8pixels_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - } -} - -template -void Resolve_32_Bit_sse2(const void* psrc, int fbp, int fbw, int fbh, u32 fbm) -{ - // Note a basic implementation was done in Resolve_32_Bit function -#ifdef LOG_RESOLVE_PROFILE - u32 startime = timeGetPreciseTime(); -#endif - u32 pix_mask; - if (PSMT_ISHALF(psm)) /* 16 bit format */ - { - /* Use 2 16bits mask */ - u32 pix16_mask = RGBA32to16(fbm); - pix_mask = (pix16_mask<<16) | pix16_mask; - } - else - pix_mask = fbm; - - // Note GS register: frame_register__fbp is specified in units of the 32 bits address divided by 2048 - // fbp is stored as 32*frame_register__fbp - u32* pPageOffset = (u32*)g_pbyGSMemory + (fbp/32)*2048; - - int maxfbh; - int memory_space = MEMORY_END-(fbp/32)*2048*4; - if (PSMT_ISHALF(psm)) - maxfbh = memory_space / (2*fbw); - else - maxfbh = memory_space / (4*fbw); - - if( maxfbh > fbh ) maxfbh = fbh; - -#ifdef LOG_RESOLVE_PROFILE - ZZLog::Dev_Log("*** Resolve 32 to 32 bits: %dx%d. Frame Mask %x. Format %x", maxfbh, fbw, pix_mask, psm); -#endif - - // Start the src array at the end to reduce testing in loop - // If maxfbh is odd, proces maxfbh -1 alone and then go back to maxfbh -3 - u32 raw_size = RH(Pitch(fbw))/sizeof(u32); - u32* src; - if (maxfbh&0x1) { - ZZLog::Dev_Log("*** Warning resolve 32bits have an odd number of lines"); - - // decrease maxfbh to process the bottom line (maxfbh-1) - maxfbh--; - - src = (u32*)(psrc) + maxfbh*raw_size; - u32 i_msk = maxfbh & (size-1); - // Note fbw is a multiple of 64. So you can unroll the loop 64 times - for(int j = (fbw - 64); j >= 0; j -= 64) { - u32* basepage = pPageOffset + ((maxfbh/size) * (fbw/64) + (j/64)) * 2048; - update_pixels_row_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - } - // realign the src pointer to process others lines - src -= 2*raw_size; - } else { - // Because we process 2 lines at once go back to maxfbh-2. - src = (u32*)(psrc) + (maxfbh-2)*raw_size; - } - - // Note i must be even for the update_8pixels functions - assert((maxfbh&0x1) == 0); - for(int i = (maxfbh-2); i >= 0; i -= 2) { - u32 i_msk = i & (size-1); - // Note fbw is a multiple of 64. So you can unroll the loop 64 times - for(int j = (fbw - 64); j >= 0; j -= 64) { - u32* basepage = pPageOffset + ((i/size) * (fbw/64) + (j/64)) * 2048; - update_pixels_row_sse2(src, basepage, i_msk, j, pix_mask, raw_size); - } - - // Note update_8pixels process 2 lines at onces hence the factor 2 - src -= 2*raw_size; - } - - if(!pix_mask) { - // Ensure that previous (out of order) write are done. It must be done after non temporal instruction - // (or *_stream_* intrinsic) - _mm_sfence(); - } - -#ifdef LOG_RESOLVE_PROFILE - ZZLog::Dev_Log("*** 32 bits: execution time %d", timeGetPreciseTime()-startime); -#endif -} -#endif - -void _Resolve(const void* psrc, int fbp, int fbw, int fbh, int psm, u32 fbm, bool mode = true) -{ - FUNCLOG - - int start, end; - - s_nResolved += 2; - - // align the rect to the nearest page - // note that fbp is always aligned on page boundaries - GetRectMemAddress(start, end, psm, 0, 0, fbw, fbh, fbp, fbw); - - // Comment this to restore the previous resolve_32 version -#define OPTI_RESOLVE_32 - // start the conversion process A8R8G8B8 -> psm - switch (psm) - { - - // NOTE pass psm as a constant value otherwise gcc does not do its job. It keep - // the psm switch in Resolve_32_Bit - case PSMCT32: - case PSMCT24: -#if defined(ZEROGS_SSE2) && defined(OPTI_RESOLVE_32) - Resolve_32_Bit_sse2(psrc, fbp, fbw, fbh, fbm); -#else - Resolve_32_Bit(psrc, fbp, fbw, fbh, PSMCT32, fbm); -#endif - break; - - case PSMCT16: -#if defined(ZEROGS_SSE2) && defined(OPTI_RESOLVE_32) - Resolve_32_Bit_sse2(psrc, fbp, fbw, fbh, fbm); -#else - Resolve_32_Bit(psrc, fbp, fbw, fbh, PSMCT16, fbm); -#endif - break; - - case PSMCT16S: -#if defined(ZEROGS_SSE2) && defined(OPTI_RESOLVE_32) - Resolve_32_Bit_sse2(psrc, fbp, fbw, fbh, fbm); -#else - Resolve_32_Bit(psrc, fbp, fbw, fbh, PSMCT16S, fbm); -#endif - break; - - case PSMT32Z: - case PSMT24Z: -#if defined(ZEROGS_SSE2) && defined(OPTI_RESOLVE_32) - Resolve_32_Bit_sse2(psrc, fbp, fbw, fbh, fbm); -#else - Resolve_32_Bit(psrc, fbp, fbw, fbh, PSMT32Z, fbm); -#endif - break; - - case PSMT16Z: -#if defined(ZEROGS_SSE2) && defined(OPTI_RESOLVE_32) - Resolve_32_Bit_sse2(psrc, fbp, fbw, fbh, fbm); -#else - Resolve_32_Bit(psrc, fbp, fbw, fbh, PSMT16Z, fbm); -#endif - break; - - case PSMT16SZ: -#if defined(ZEROGS_SSE2) && defined(OPTI_RESOLVE_32) - Resolve_32_Bit_sse2(psrc, fbp, fbw, fbh, fbm); -#else - Resolve_32_Bit(psrc, fbp, fbw, fbh, PSMT16SZ, fbm); -#endif - break; - } - - g_MemTargs.ClearRange(start, end); - - INC_RESOLVE(); -} - -// Leaving this code in for reference for the moment. -#if 0 -void _Resolve(const void* psrc, int fbp, int fbw, int fbh, int psm, u32 fbm, bool mode) -{ - FUNCLOG - //GL_REPORT_ERRORD(); - s_nResolved += 2; - - // align the rect to the nearest page - // note that fbp is always aligned on page boundaries - int start, end; - GetRectMemAddress(start, end, psm, 0, 0, fbw, fbh, fbp, fbw); - - int i, j; - //short smask1 = gs.smask&1; - //short smask2 = gs.smask&2; - u32 mask, imask; - - if (PSMT_ISHALF(psm)) // 16 bit - { - // mask is shifted - imask = RGBA32to16(fbm); - mask = (~imask) & 0xffff; - } - else - { - mask = ~fbm; - imask = fbm; - - if ((psm&0xf) > 0 && 0) - { - // preserve the alpha? - mask &= 0x00ffffff; - imask |= 0xff000000; - } - } - - // Targets over 2000 should be shuffle. FFX and KH2 (0x2100) - int X = (psm == 0) ? 0 : 0; - -//if (X == 1) -//ZZLog::Error_Log("resolve: %x %x %x %x (%x-%x).", psm, fbp, fbw, fbh, start, end); - - -#define RESOLVE_32BIT(psm, T, Tsrc, blockbits, blockwidth, blockheight, convfn, frame, aax, aay) \ - { \ - Tsrc* src = (Tsrc*)(psrc); \ - T* pPageOffset = (T*)g_pbyGSMemory + fbp*(256/sizeof(T)), *dst; \ - int srcpitch = Pitch(fbw) * blockheight/sizeof(Tsrc); \ - int maxfbh = (MEMORY_END-fbp*256) / (sizeof(T) * fbw); \ - if( maxfbh > fbh ) maxfbh = fbh; \ - for(i = 0; i < (maxfbh&~(blockheight-1))*X; i += blockheight) { \ - /*if( smask2 && (i&1) == smask1 ) continue; */ \ - for(j = 0; j < fbw; j += blockwidth) { \ - /* have to write in the tiled format*/ \ - frame##SwizzleBlock##blockbits(pPageOffset + getPixelAddress##psm##_0(j, i, fbw), \ - src+RW(j), Pitch(fbw)/sizeof(Tsrc), mask); \ - } \ - src += RH(srcpitch); \ - } \ - for(; i < maxfbh; ++i) { \ - for(j = 0; j < fbw; ++j) { \ - T dsrc = convfn(src[RW(j)]); \ - dst = pPageOffset + getPixelAddress##psm##_0(j, i, fbw); \ - *dst = (dsrc & mask) | (*dst & imask); \ - } \ - src += RH(Pitch(fbw))/sizeof(Tsrc); \ - } \ - } \ - - if( GetRenderFormat() == RFT_byte8 ) { - // start the conversion process A8R8G8B8 -> psm - switch (psm) - { - - case PSMCT32: - - case PSMCT24: - - if (AA.y) - { - RESOLVE_32BIT(32, u32, u32, 32A4, 8, 8, (u32), Frame, AA.x, AA.y); - } - else if (AA.x) - { - RESOLVE_32BIT(32, u32, u32, 32A2, 8, 8, (u32), Frame, 1, 0); - } - else - { - RESOLVE_32BIT(32, u32, u32, 32, 8, 8, (u32), Frame, 0, 0); - } - - break; - - case PSMCT16: - - if (AA.y) - { - RESOLVE_32BIT(16, u16, u32, 16A4, 16, 8, RGBA32to16, Frame, AA.x, AA.y); - } - else if (AA.x) - { - RESOLVE_32BIT(16, u16, u32, 16A2, 16, 8, RGBA32to16, Frame, 1, 0); - } - else - { - RESOLVE_32BIT(16, u16, u32, 16, 16, 8, RGBA32to16, Frame, 0, 0); - } - - break; - - case PSMCT16S: - - if (AA.y) - { - RESOLVE_32BIT(16S, u16, u32, 16A4, 16, 8, RGBA32to16, Frame, AA.x, AA.y); - } - else if (AA.x) - { - RESOLVE_32BIT(16S, u16, u32, 16A2, 16, 8, RGBA32to16, Frame, 1, 0); - } - else - { - RESOLVE_32BIT(16S, u16, u32, 16, 16, 8, RGBA32to16, Frame, 0, 0); - } - - break; - - case PSMT32Z: - - case PSMT24Z: - - if (AA.y) - { - RESOLVE_32BIT(32Z, u32, u32, 32A4, 8, 8, (u32), Frame, AA.x, AA.y); - } - else if (AA.x) - { - RESOLVE_32BIT(32Z, u32, u32, 32A2, 8, 8, (u32), Frame, 1, 0); - } - else - { - RESOLVE_32BIT(32Z, u32, u32, 32, 8, 8, (u32), Frame, 0, 0); - } - - break; - - case PSMT16Z: - - if (AA.y) - { - RESOLVE_32BIT(16Z, u16, u32, 16A4, 16, 8, (u16), Frame, AA.x, AA.y); - } - else if (AA.x) - { - RESOLVE_32BIT(16Z, u16, u32, 16A2, 16, 8, (u16), Frame, 1, 0); - } - else - { - RESOLVE_32BIT(16Z, u16, u32, 16, 16, 8, (u16), Frame, 0, 0); - } - - break; - - case PSMT16SZ: - - if (AA.y) - { - RESOLVE_32BIT(16SZ, u16, u32, 16A4, 16, 8, (u16), Frame, AA.x, AA.y); - } - else if (AA.x) - { - RESOLVE_32BIT(16SZ, u16, u32, 16A2, 16, 8, (u16), Frame, 1, 0); - } - else - { - RESOLVE_32BIT(16SZ, u16, u32, 16, 16, 8, (u16), Frame, 0, 0); - } - - break; - } - } - else // float16 - { - switch (psm) - { - - case PSMCT32: - - case PSMCT24: - - if (AA.y) - { - RESOLVE_32BIT(32, u32, Vector_16F, 32A4, 8, 8, Float16ToARGB, Frame16, 1, 1); - } - else if (AA.x) - { - RESOLVE_32BIT(32, u32, Vector_16F, 32A2, 8, 8, Float16ToARGB, Frame16, 1, 0); - } - else - { - RESOLVE_32BIT(32, u32, Vector_16F, 32, 8, 8, Float16ToARGB, Frame16, 0, 0); - } - - break; - - case PSMCT16: - - if (AA.y) - { - RESOLVE_32BIT(16, u16, Vector_16F, 16A4, 16, 8, Float16ToARGB16, Frame16, 1, 1); - } - else if (AA.x) - { - RESOLVE_32BIT(16, u16, Vector_16F, 16A2, 16, 8, Float16ToARGB16, Frame16, 1, 0); - } - else - { - RESOLVE_32BIT(16, u16, Vector_16F, 16, 16, 8, Float16ToARGB16, Frame16, 0, 0); - } - - break; - - case PSMCT16S: - - if (AA.y) - { - RESOLVE_32BIT(16S, u16, Vector_16F, 16A4, 16, 8, Float16ToARGB16, Frame16, 1, 1); - } - else if (AA.x) - { - RESOLVE_32BIT(16S, u16, Vector_16F, 16A2, 16, 8, Float16ToARGB16, Frame16, 1, 0); - } - else - { - RESOLVE_32BIT(16S, u16, Vector_16F, 16, 16, 8, Float16ToARGB16, Frame16, 0, 0); - } - - break; - - case PSMT32Z: - - case PSMT24Z: - - if (AA.y) - { - RESOLVE_32BIT(32Z, u32, Vector_16F, 32ZA4, 8, 8, Float16ToARGB_Z, Frame16, 1, 1); - } - else if (AA.x) - { - RESOLVE_32BIT(32Z, u32, Vector_16F, 32ZA2, 8, 8, Float16ToARGB_Z, Frame16, 1, 0); - } - else - { - RESOLVE_32BIT(32Z, u32, Vector_16F, 32Z, 8, 8, Float16ToARGB_Z, Frame16, 0, 0); - } - - break; - - case PSMT16Z: - - if (AA.y) - { - RESOLVE_32BIT(16Z, u16, Vector_16F, 16ZA4, 16, 8, Float16ToARGB16_Z, Frame16, 1, 1); - } - else if (AA.x) - { - RESOLVE_32BIT(16Z, u16, Vector_16F, 16ZA2, 16, 8, Float16ToARGB16_Z, Frame16, 1, 0); - } - else - { - RESOLVE_32BIT(16Z, u16, Vector_16F, 16Z, 16, 8, Float16ToARGB16_Z, Frame16, 0, 0); - } - - break; - - case PSMT16SZ: - - if (AA.y) - { - RESOLVE_32BIT(16SZ, u16, Vector_16F, 16ZA4, 16, 8, Float16ToARGB16_Z, Frame16, 1, 1); - } - else if (AA.x) - { - RESOLVE_32BIT(16SZ, u16, Vector_16F, 16ZA2, 16, 8, Float16ToARGB16_Z, Frame16, 1, 0); - } - else - { - RESOLVE_32BIT(16SZ, u16, Vector_16F, 16Z, 16, 8, Float16ToARGB16_Z, Frame16, 0, 0); - } - - break; - } - } - - g_MemTargs.ClearRange(start, end); - - INC_RESOLVE(); -} - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/targets.h b/plugins/zzogl-pg-cg/opengl/targets.h deleted file mode 100644 index d48fc59773..0000000000 --- a/plugins/zzogl-pg-cg/opengl/targets.h +++ /dev/null @@ -1,607 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __ZEROGS_TARGETS_H__ -#define __ZEROGS_TARGETS_H__ - -#define TARGET_VIRTUAL_KEY 0x80000000 -#include "PS2Edefs.h" -#include -#include -#include "GS.h" -#include "ZZGl.h" -//#include "ZZoglVB.h" - -#ifndef GL_TEXTURE_RECTANGLE -#define GL_TEXTURE_RECTANGLE GL_TEXTURE_RECTANGLE_NV -#endif - -#define VB_BUFFERSIZE 0x4000 - -// all textures have this width -extern int GPU_TEXWIDTH; -extern float g_fiGPU_TEXWIDTH; -#define MASKDIVISOR 0 // Used for decrement bitwise mask texture size if 1024 is too big -#define GPU_TEXMASKWIDTH (1024 >> MASKDIVISOR) // bitwise mask width for region repeat mode - -// managers render-to-texture targets -class CRenderTarget -{ - - public: - CRenderTarget(); - virtual ~CRenderTarget(); - - virtual bool Create(const frameInfo& frame); - virtual void Destroy(); - - // set the GPU_POSXY variable, scissor rect, and current render target - void SetTarget(int fbplocal, const Rect2& scissor, int context); - void SetViewport(); - - // copies/creates the feedback contents - inline void CreateFeedback() - { - if (ptexFeedback == 0 || !(status&TS_FeedbackReady)) - _CreateFeedback(); - } - - virtual void Resolve(); - virtual void Resolve(int startrange, int endrange); // resolves only in the allowed range - virtual void Update(int context, CRenderTarget* pdepth); - virtual void ConvertTo32(); // converts a psm==2 target, to a psm==0 - virtual void ConvertTo16(); // converts a psm==0 target, to a psm==2 - - virtual bool IsDepth() { return false; } - - void SetRenderTarget(int targ); - - void* psys; // system data used for comparison - u32 ptex; - - int fbp, fbw, fbh, fbhCalc; // if fbp is negative, virtual target (not mapped to any real addr) - int start, end; // in bytes - u32 lastused; // time stamp since last used - float4 vposxy; - - u32 fbm; - u16 status; - u8 psm; - u8 resv0; - Rect scissorrect; - - u8 created; // Check for object destruction/creating for r201. - - //int startresolve, endresolve; - u32 nUpdateTarg; // use this target to update the texture if non 0 (one time only) - - // this is optionally used when feedback effects are used (render target is used as a texture when rendering to itself) - u32 ptexFeedback; - - enum TargetStatus - { - TS_Resolved = 1, - TS_NeedUpdate = 2, - TS_Virtual = 4, // currently not mapped to memory - TS_FeedbackReady = 8, // feedback effect is ready and doesn't need to be updated - TS_NeedConvert32 = 16, - TS_NeedConvert16 = 32, - }; - inline float4 DefaultBitBltPos(); - inline float4 DefaultBitBltTex(); - - private: - void _CreateFeedback(); - inline bool InitialiseDefaultTexture(u32 *p_ptr, int fbw, int fbh) ; -}; - -// manages zbuffers - -class CDepthTarget : public CRenderTarget -{ - - public: - CDepthTarget(); - virtual ~CDepthTarget(); - - virtual bool Create(const frameInfo& frame); - virtual void Destroy(); - - virtual void Resolve(); - virtual void Resolve(int startrange, int endrange); // resolves only in the allowed range - virtual void Update(int context, CRenderTarget* prndr); - - virtual bool IsDepth() { return true; } - - void SetDepthStencilSurface(); - - u32 pdepth; // 24 bit, will contain the stencil buffer if possible - u32 pstencil; // if not 0, contains the stencil buffer - int icount; // internal counter -}; - -// manages contiguous chunks of memory (width is always 1024) - -class CMemoryTarget -{ - public: - struct TEXTURE - { - inline TEXTURE() : tex(0), memptr(NULL), ref(0) {} - inline ~TEXTURE() { glDeleteTextures(1, &tex); _aligned_free(memptr); } - - u32 tex; - u8* memptr; // GPU memory used for comparison - int ref; - }; - - inline CMemoryTarget() : ptex(NULL), starty(0), height(0), realy(0), realheight(0), usedstamp(0), psm(0), cpsm(0), channels(0), clearminy(0), clearmaxy(0), validatecount(0), clut(NULL), clutsize(0) {} - - inline CMemoryTarget(const CMemoryTarget& r) - { - ptex = r.ptex; - - if (ptex != NULL) ptex->ref++; - - starty = r.starty; - height = r.height; - realy = r.realy; - realheight = r.realheight; - usedstamp = r.usedstamp; - psm = r.psm; - cpsm = r.cpsm; - clut = r.clut; - clearminy = r.clearminy; - clearmaxy = r.clearmaxy; - widthmult = r.widthmult; - texH = r.texH; - texW = r.texW; - channels = r.channels; - validatecount = r.validatecount; - fmt = r.fmt; - } - - ~CMemoryTarget() { Destroy(); } - - inline void Destroy() - { - if (ptex != NULL && ptex->ref > 0) - { - if (--ptex->ref <= 0) delete ptex; - } - - ptex = NULL; - - _aligned_free(clut); - clut = NULL; - clutsize = 0; - } - - // returns true if clut data is synced - bool ValidateClut(const tex0Info& tex0); - // returns true if tex data is synced - bool ValidateTex(const tex0Info& tex0, int starttex, int endtex, bool bDeleteBadTex); - - // realy is offset in pixels from start of valid region - // so texture in memory is [realy,starty+height] - // valid texture is [starty,starty+height] - // offset in mem [starty-realy, height] - TEXTURE* ptex; // can be 16bit - - int starty, height; // assert(starty >= realy) - int realy, realheight; // this is never touched once allocated - // realy is start pointer of data in 4M data block (start) and size (end-start). - - u32 usedstamp; - u8 psm, cpsm; // texture and clut format. For psm, only 16bit/32bit differentiation matters - - u32 fmt; - - int widthmult; // Either 1 or 2. - int channels; // The number of pixels per PSM format word. channels == PIXELS_PER_WORD(psm) - // This is the real drawing size in pixels of the texture in renderbuffer. - int texW; // (realheight + widthmult - 1)/widthmult == realheight or [(realheight+1)/2] - int texH; // GPU_TEXWIDTH *widthmult * channels; - - int clearminy, clearmaxy; // when maxy > 0, need to check for clearing - - int validatecount; // count how many times has been validated, if too many, destroy - - u8* clut; // Clut texture data. Null otherwise - int clutsize; // size of the clut array. 0 otherwise -}; - -inline u32 GetFrameKey(int fbp, int fbw); - -// manages render targets -class CRenderTargetMngr -{ - public: - typedef map MAPTARGETS; - - enum TargetOptions - { - TO_DepthBuffer = 1, - TO_StrictHeight = 2, // height returned has to be the same as requested - TO_Virtual = 4 - }; - - ~CRenderTargetMngr() { Destroy(); } - - void Destroy(); - static MAPTARGETS::iterator GetOldestTarg(MAPTARGETS& m); - - bool isFound(const frameInfo& frame, MAPTARGETS::iterator& it, u32 opts, u32 key, int maxposheight); - - CRenderTarget* GetTarg(const frameInfo& frame, u32 Options, int maxposheight); - inline CRenderTarget* GetTarg(int fbp, int fbw) - { - MAPTARGETS::iterator it = mapTargets.find(GetFrameKey(fbp, fbw)); - - /* if (fbp == 0x3600 && fbw == 0x100 && it == mapTargets.end()) - { - ZZLog::Debug_Log("%x", GetFrameKey(fbp, fbw)) ; - ZZLog::Debug_Log("%x %x", fbp, fbw); - for(MAPTARGETS::iterator it1 = mapTargets.begin(); it1 != mapTargets.end(); ++it1) - ZZLog::Debug_Log("\t %x %x %x %x", it1->second->fbw, it1->second->fbh, it1->second->psm, it1->second->fbp); - }*/ - return it != mapTargets.end() ? it->second : NULL; - } - - // gets all targets with a range - void GetTargs(int start, int end, list& listTargets) const; - - // resolves all targets within a range - __forceinline void Resolve(int start, int end); - __forceinline void ResolveAll() - { - for (MAPTARGETS::iterator it = mapTargets.begin(); it != mapTargets.end(); ++it) - it->second->Resolve(); - } - - void DestroyAllTargs(int start, int end, int fbw); - void DestroyIntersecting(CRenderTarget* prndr); - - // promotes a target from virtual to real - inline CRenderTarget* Promote(u32 key) - { - assert(!(key & TARGET_VIRTUAL_KEY)); - - // promote to regular targ - CRenderTargetMngr::MAPTARGETS::iterator it = mapTargets.find(key | TARGET_VIRTUAL_KEY); - assert(it != mapTargets.end()); - - CRenderTarget* ptarg = it->second; - mapTargets.erase(it); - - DestroyIntersecting(ptarg); - - it = mapTargets.find(key); - - if (it != mapTargets.end()) - { - DestroyTarg(it->second); - it->second = ptarg; - } - else - mapTargets[key] = ptarg; - - if (conf.settings().resolve_promoted) - ptarg->status = CRenderTarget::TS_Resolved; - else - ptarg->status = CRenderTarget::TS_NeedUpdate; - - return ptarg; - } - - static void DestroyTarg(CRenderTarget* ptarg); - void PrintTargets(); - MAPTARGETS mapTargets, mapDummyTargs; -}; - -class CMemoryTargetMngr -{ - public: - CMemoryTargetMngr() : curstamp(0) {} - - CMemoryTarget* GetMemoryTarget(const tex0Info& tex0, int forcevalidate); // pcbp is pointer to start of clut - CMemoryTarget* SearchExistTarget(int start, int end, int clutsize, const tex0Info& tex0, int forcevalidate); - CMemoryTarget* ClearedTargetsSearch(int fmt, int widthmult, int channels, int height); - int CompareTarget(list::iterator& it, const tex0Info& tex0, int clutsize); - - void Destroy(); // destroy all targs - - void ClearRange(int starty, int endy); // set all targets to cleared - void DestroyCleared(); // flush all cleared targes - void DestroyOldest(); - - list listTargets, listClearedTargets; - u32 curstamp; - - private: - list::iterator DestroyTargetIter(list::iterator& it); - void GetClutVariables(int& clutsize, const tex0Info& tex0); - void GetMemAddress(int& start, int& end, const tex0Info& tex0); -}; - -class CBitwiseTextureMngr -{ - public: - ~CBitwiseTextureMngr() { Destroy(); } - - void Destroy(); - - // since GetTex can delete textures to free up mem, it is dangerous if using that texture, so specify at least one other tex to save - __forceinline u32 GetTex(u32 bitvalue, u32 ptexDoNotDelete) - { - map::iterator it = mapTextures.find(bitvalue); - - if (it != mapTextures.end()) return it->second; - - return GetTexInt(bitvalue, ptexDoNotDelete); - } - - private: - u32 GetTexInt(u32 bitvalue, u32 ptexDoNotDelete); - - map mapTextures; -}; - -// manages - -class CRangeManager -{ - public: - CRangeManager() - { - ranges.reserve(16); - } - - // [start, end) - - struct RANGE - { - RANGE() {} - - inline RANGE(int start, int end) : start(start), end(end) {} - - int start, end; - }; - - // works in semi logN - void Insert(int start, int end); - void RangeSanityCheck(); - inline void Clear() - { - ranges.resize(0); - } - - vector ranges; // organized in ascending order, non-intersecting -}; - -extern CRenderTargetMngr s_RTs, s_DepthRTs; -extern CBitwiseTextureMngr s_BitwiseTextures; -extern CMemoryTargetMngr g_MemTargs; -extern CRangeManager s_RangeMngr; // manages overwritten memory - -//extern u8 s_AAx, s_AAy; -extern Point AA; - -// Real rendered width, depends on AA. -inline int RW(int tbw) -{ - return (tbw << AA.x); -} - -// Real rendered height, depends on AA. -inline int RH(int tbh) -{ - return (tbh << AA.y); -} - -/* inline void CreateTargetsList(int start, int end, list& listTargs) { - s_DepthRTs.GetTargs(start, end, listTargs); - s_RTs.GetTargs(start, end, listTargs); - }*/ - -// This pattern of functions is called 3 times, so I add creating Targets list into one. -inline list CreateTargetsList(int start, int end) -{ - list listTargs; - s_DepthRTs.GetTargs(start, end, listTargs); - s_RTs.GetTargs(start, end, listTargs); - return listTargs; -} - -extern int icurctx; -extern GLuint vboRect; - -// Unworking -#define PSMPOSITION 28 - -// Code width and height of frame into key, that used in targetmanager -// This is 3 variants of one function, Key dependant on fbp and fbw. -inline u32 GetFrameKey(const frameInfo& frame) -{ - return (((frame.fbw) << 16) | (frame.fbp)); -} - -inline u32 GetFrameKey(CRenderTarget* frame) -{ - return (((frame->fbw) << 16) | (frame->fbp)); -} - -inline u32 GetFrameKey(int fbp, int fbw) -{ - return (((fbw) << 16) | (fbp)); -} - -inline u16 ShiftHeight(int fbh, int fbp, int fbhCalc) -{ - return fbh; -} - -//#define FRAME_KEY_BY_FBH - -//FIXME: this code is for P4 and KH1. It should not be so strange! -//Dummy targets was deleted from mapTargets, but not erased. -inline u32 GetFrameKeyDummy(int fbp, int fbw, int fbh, int psm) -{ -// if (fbp > 0x2000 && ZZOgl_fbh_Calc(fbp, fbw, psm) < 0x400 && ZZOgl_fbh_Calc(fbp, fbw, psm) != fbh) -// ZZLog::Debug_Log("Z %x %x %x %x\n", fbh, fbhCalc, fbp, ZZOgl_fbh_Calc(fbp, fbw, psm)); - // height over 1024 would shrink to 1024, so dummy targets with calculated size more than 0x400 should be - // distinct by real height. But in FFX there is 3e0 height target, so I put 0x300 as limit. - -#ifndef FRAME_KEY_BY_FBH - int calc = ZZOgl_fbh_Calc(fbp, fbw, psm); - if (/*fbp > 0x2000 && */calc < /*0x300*/0x2E0) - return ((fbw << 16) | calc); - else -#endif - return ((fbw << 16) | fbh); -} - -inline u32 GetFrameKeyDummy(const frameInfo& frame) -{ - return GetFrameKeyDummy(frame.fbp, frame.fbw, frame.fbh, frame.psm); -} - -inline u32 GetFrameKeyDummy(CRenderTarget* frame) -{ - return GetFrameKeyDummy(frame->fbp, frame->fbw, frame->fbh, frame->psm); -} - -#include "Mem.h" - -static __forceinline void DrawTriangleArray() -{ - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); - GL_REPORT_ERRORD(); -} - -static __forceinline void DrawBuffers(GLenum *buffer) -{ - if (glDrawBuffers != NULL) - { - glDrawBuffers(1, buffer); - } - - GL_REPORT_ERRORD(); -} - -static __forceinline void FBTexture(int attach, int id = 0) -{ - glFramebufferTexture2DEXT(GL_FRAMEBUFFER_EXT, GL_COLOR_ATTACHMENT0_EXT + attach, GL_TEXTURE_RECTANGLE_NV, id, 0); - GL_REPORT_ERRORD(); -} - -static __forceinline void ResetRenderTarget(int index) -{ - FBTexture(index); -} - -static __forceinline void Texture2D(GLint iFormat, GLint width, GLint height, GLenum format, GLenum type, const GLvoid* pixels) -{ - glTexImage2D(GL_TEXTURE_2D, 0, iFormat, width, height, 0, format, type, pixels); -} - -static __forceinline void Texture2D(GLint iFormat, GLenum format, GLenum type, const GLvoid* pixels) -{ - glTexImage2D(GL_TEXTURE_2D, 0, iFormat, BLOCK_TEXWIDTH, BLOCK_TEXHEIGHT, 0, format, type, pixels); -} - -static __forceinline void Texture3D(GLint iFormat, GLint width, GLint height, GLint depth, GLenum format, GLenum type, const GLvoid* pixels) -{ - glTexImage3D(GL_TEXTURE_3D, 0, iFormat, width, height, depth, 0, format, type, pixels); -} - -static __forceinline void TextureRect(GLint iFormat, GLint width, GLint height, GLenum format, GLenum type, const GLvoid* pixels) -{ - glTexImage2D(GL_TEXTURE_RECTANGLE_NV, 0, iFormat, width, height, 0, format, type, pixels); -} - -static __forceinline void TextureRect2(GLint iFormat, GLint width, GLint height, GLenum format, GLenum type, const GLvoid* pixels) -{ - glTexImage2D(GL_TEXTURE_RECTANGLE, 0, iFormat, width, height, 0, format, type, pixels); -} - -static __forceinline void TextureRect(GLenum attach, GLuint id = 0) -{ - glFramebufferRenderbufferEXT(GL_FRAMEBUFFER_EXT, attach, GL_RENDERBUFFER_EXT, id); -} - -static __forceinline void setTex2DFilters(GLint type) -{ - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, type); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, type); -} - -static __forceinline void setTex2DWrap(GLint type) -{ - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, type); - glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, type); -} - -static __forceinline void setTex3DFilters(GLint type) -{ - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MAG_FILTER, type); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_MIN_FILTER, type); -} - -static __forceinline void setTex3DWrap(GLint type) -{ - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_S, type); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_T, type); - glTexParameteri(GL_TEXTURE_3D, GL_TEXTURE_WRAP_R, type); -} - -static __forceinline void setRectFilters(GLint type) -{ - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MAG_FILTER, type); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_MIN_FILTER, type); -} - -static __forceinline void setRectWrap(GLint type) -{ - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_S, type); - glTexParameteri(GL_TEXTURE_RECTANGLE_NV, GL_TEXTURE_WRAP_T, type); -} - -static __forceinline void setRectWrap2(GLint type) -{ - glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_S, type); - glTexParameteri(GL_TEXTURE_RECTANGLE, GL_TEXTURE_WRAP_T, type); -} - -//------------------------ Inlines ------------------------- - -// Calculate maximum height for target -inline int get_maxheight(int fbp, int fbw, int psm) -{ - int ret; - - if (fbw == 0) return 0; - - ret = (((0x00100000 - 64 * fbp) / fbw) & ~0x1f); - if (PSMT_ISHALF(psm)) ret *= 2; - - return ret; -} - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/x86-32.S b/plugins/zzogl-pg-cg/opengl/x86-32.S deleted file mode 100644 index 011e6c65e0..0000000000 --- a/plugins/zzogl-pg-cg/opengl/x86-32.S +++ /dev/null @@ -1,716 +0,0 @@ -# Copyright (C) 2005-2006 zerofrog(@gmail.com) -# -# This Program is free software you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation either ve%rsion 2, or (at your option) -# any later ve%rsion. -# -# This Program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with GNU Make see the file COPYING. If not, write to -# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA. -# http://www.gnu.org/copyleft/gpl.html -# -# -.intel_syntax - -#ifdef ZEROGS_SSE2 -// SSE2 extensions - -// Note: pshufd 0xea <=> movdqa !!! -// What the function does is -// Interleave s1 and sd0 -> d1 (high) & sd0 (low) -// Interleave s3 and sd2 -> d3 (high) & sd2 (low) -#define punpck(op, sd0, sd2, s1, s3, d1, d3) \ - movdqa %xmm##d1, %xmm##sd0; \ - pshufd %xmm##d3, %xmm##sd2, 0xe4; \ - punpckl##op %xmm##sd0, %xmm##s1; \ - punpckh##op %xmm##d1, %xmm##s1; \ - punpckl##op %xmm##sd2, %xmm##s3; \ - punpckh##op %xmm##d3, %xmm##s3; \ - - -// Input xmm7 == 0x0F0F0F0F 0x0F0F0F0F 0x0F0F0F0F 0x0F0F0F0F -// DATA xmm[0-3] -// This function does a 4-bits interleaving of 4 xmm registers -// -// ARG Can not put comment in the middle of the define... -// After the first por -// low 32bits (4bits packed) == 1.6 0.6 1.4 0.4 1.2 0.2 1.0 0.0 -// After the second one -// low 32bits (4bits packed) == 1.7 0.7 1.5 0.5 1.3 0.3 1.1 0.1 -#define punpcknb \ - movdqa %xmm4, %xmm0; \ - pshufd %xmm5, %xmm1, 0xe4; \ - \ - psllq %xmm1, 4; \ - psrlq %xmm4, 4; \ - \ - movdqa %xmm6, %xmm7; \ - pand %xmm0, %xmm7; \ - pandn %xmm6, %xmm1; \ - por %xmm0, %xmm6; \ - \ - movdqa %xmm6, %xmm7; \ - pand %xmm4, %xmm7; \ - pandn %xmm6, %xmm5; \ - por %xmm4, %xmm6; \ - \ - movdqa %xmm1, %xmm4; \ - \ - \ - movdqa %xmm4, %xmm2; \ - pshufd %xmm5, %xmm3, 0xe4; \ - \ - psllq %xmm3, 4; \ - psrlq %xmm4, 4; \ - \ - movdqa %xmm6, %xmm7; \ - pand %xmm2, %xmm7; \ - pandn %xmm6, %xmm3; \ - por %xmm2, %xmm6; \ - \ - movdqa %xmm6, %xmm7; \ - pand %xmm4, %xmm7; \ - pandn %xmm6, %xmm5; \ - por %xmm4, %xmm6; \ - \ - movdqa %xmm3, %xmm4; \ - \ - punpck(bw, 0, 2, 1, 3, 4, 6);\ - -// output -// low 32 bits 0 (4 bits packed) == 1.3 0.3 1.2 0.2 1.1 0.1 1.0 0.0 -// low 32 bits 4 (4 bits packed) == 1.19 0.19 1.18 0.18 1.17 0.17 1.16 0.16 -// low 32 bits 2 (4 bits packed) == 3.3 2.3 3.2 2.2 3.1 2.1 3.0 2.0 -// low 32 bits 6 (4 bits packed) == 3.19 2.19 3.18 2.18 3.17 2.17 3.16 2.16 - - -// -// swizzling -// - -// -// SwizzleBlock32 -// - -.globl SwizzleBlock32_sse2 - .type SwizzleBlock32_sse2, @function -SwizzleBlock32_sse2: - - push %esi - push %edi - - // save dst - mov %edi, %ecx - // save src - mov %esi, %edx - // get pitch - mov %edx, [%esp+4+8] - mov %ecx, 4 - - // get WriteMask - mov %eax, [%esp+8+8] - cmp %eax, 0xffffffff - jne SwizzleBlock32_sse2_2 - - .align 16 -SwizzleBlock32_sse2_1: - movdqa %xmm0, [%esi] - movdqa %xmm4, [%esi+16] - movdqa %xmm1, [%esi+%edx] - movdqa %xmm5, [%esi+%edx+16] - - // 64bits interleave 1&0 -> 2&0 - // 64bits interleave 5&4 -> 6&4 - punpck(qdq, 0, 4, 1, 5, 2, 6) - - movntps [%edi+16*0], %xmm0 - movntps [%edi+16*1], %xmm2 - movntps [%edi+16*2], %xmm4 - movntps [%edi+16*3], %xmm6 - - // update ptr - lea %esi, [%esi+%edx*2] - add %edi, 64 - - dec %ecx - jnz SwizzleBlock32_sse2_1 - - pop %edi - pop %esi - - ret 8 - -SwizzleBlock32_sse2_2: - - // WriteMask: 32bits to 4*32bits - movd %xmm7, %eax - pshufd %xmm7, %xmm7, 0 - - .align 16 -SwizzleBlock32_sse2_3: - movdqa %xmm0, [%esi] - movdqa %xmm4, [%esi+16] - movdqa %xmm1, [%esi+%edx] - movdqa %xmm5, [%esi+%edx+16] - - // 64bits interleave 1&0 -> 2&0 - // 64bits interleave 5&4 -> 6&4 - punpck(qdq, 0, 4, 1, 5, 2, 6) - - // save a mask copy - movdqa %xmm3, %xmm7 - pshufd %xmm5, %xmm7, 0xe4 - - // *dst & ~WriteMask - pandn %xmm3, [%edi+16*0] - // *src & WriteMask - pand %xmm0, %xmm7 - // Final value to save - por %xmm0, %xmm3 - movntps [%edi+16*0], %xmm0 - - pandn %xmm5, [%edi+16*1] - pand %xmm2, %xmm7 - por %xmm2, %xmm5 - movntps [%edi+16*1], %xmm2 - - movdqa %xmm3, %xmm7 - pshufd %xmm5, %xmm7, 0xe4 - - pandn %xmm3, [%edi+16*2] - pand %xmm4, %xmm7 - por %xmm4, %xmm3 - movntps [%edi+16*2], %xmm4 - - pandn %xmm5, [%edi+16*3] - pand %xmm6, %xmm7 - por %xmm6, %xmm5 - movntps [%edi+16*3], %xmm6 - - // update ptr - lea %esi, [%esi+%edx*2] - add %edi, 64 - - dec %ecx - jnz SwizzleBlock32_sse2_3 - - pop %edi - pop %esi - - ret 8 - -// -// SwizzleBlock16 -// - -.globl SwizzleBlock16_sse2 - .type SwizzleBlock16_sse2, @function -SwizzleBlock16_sse2: - - push %ebx - - // srcpitch - mov %ebx, [%esp+4+4] - mov %eax, 4 - - .align 16 -SwizzleBlock16_sse2_1: - movdqa %xmm0, [%edx] - movdqa %xmm1, [%edx+16] - movdqa %xmm2, [%edx+%ebx] - movdqa %xmm3, [%edx+%ebx+16] - - // 16bits interleave 1&0 -> 4&0 - // 16bits interleave 3&2 -> 6&2 - punpck(wd, 0, 2, 1, 3, 4, 6) - // 64bits interleave 2&0 -> 1&0 - // 64bits interleave 6&4 -> 5&4 - punpck(qdq, 0, 4, 2, 6, 1, 5) - - movntps [%ecx+16*0], %xmm0 - movntps [%ecx+16*1], %xmm1 - movntps [%ecx+16*2], %xmm4 - movntps [%ecx+16*3], %xmm5 - - // update ptr - lea %edx, [%edx+%ebx*2] - add %ecx, 64 - - dec %eax - jnz SwizzleBlock16_sse2_1 - - pop %ebx - - ret 4 - -// -// SwizzleBlock8 -// - -.globl SwizzleBlock8_sse2 - .type SwizzleBlock8_sse2, @function -SwizzleBlock8_sse2: - - push %ebx - - // load srcpitch - mov %ebx, [%esp+4+4] - // basic counter - mov %eax, 2 - - .align 16 -SwizzleBlock8_sse2_1: - // col 0, 2 - - movdqa %xmm0, [%edx] - movdqa %xmm2, [%edx+%ebx] - // update src pointer - lea %edx, [%edx+%ebx*2] - - // 2 3 0 1 - pshufd %xmm1, [%edx], 0xb1 - pshufd %xmm3, [%edx+%ebx], 0xb1 - // update src pointer - lea %edx, [%edx+%ebx*2] - - // 8bits interleave 1&0 -> 4&0 - // 8bits interleave 3&2 -> 6&2 - punpck(bw, 0, 2, 1, 3, 4, 6) - // 16bits interleave 4&0 -> 1&0 - // 16bits interleave 6&2 -> 3&2 - punpck(wd, 0, 2, 4, 6, 1, 3) - // 64bits interleave 2&0 -> 4&0 - // 64bits interleave 3&1 -> 5&1 - punpck(qdq, 0, 1, 2, 3, 4, 5) - - movntps [%ecx+16*0], %xmm0 - movntps [%ecx+16*1], %xmm4 - movntps [%ecx+16*2], %xmm1 - movntps [%ecx+16*3], %xmm5 - - // col 1, 3 (same as previous column) - - // 2 3 0 1 - pshufd %xmm0, [%edx], 0xb1 - pshufd %xmm2, [%edx+%ebx], 0xb1 - // update src pointer - lea %edx, [%edx+%ebx*2] - - movdqa %xmm1, [%edx] - movdqa %xmm3, [%edx+%ebx] - // update src pointer - lea %edx, [%edx+%ebx*2] - - // 8bits interleave 1&0 -> 4&0 - // 8bits interleave 3&2 -> 6&2 - punpck(bw, 0, 2, 1, 3, 4, 6) - // 16bits interleave 4&0 -> 1&0 - // 16bits interleave 6&2 -> 3&2 - punpck(wd, 0, 2, 4, 6, 1, 3) - // 64bits interleave 2&0 -> 4&0 - // 64bits interleave 3&1 -> 5&1 - punpck(qdq, 0, 1, 2, 3, 4, 5) - - movntps [%ecx+16*4], %xmm0 - movntps [%ecx+16*5], %xmm4 - movntps [%ecx+16*6], %xmm1 - movntps [%ecx+16*7], %xmm5 - - // update dst pointer - add %ecx, 128 - - dec %eax - jnz SwizzleBlock8_sse2_1 - - pop %ebx - - ret 4 - -// -// SwizzleBlock4 -// - -.globl SwizzleBlock4_sse2 - .type SwizzleBlock4_sse2, @function -SwizzleBlock4_sse2: - - push %ebx - - // load 4 0x0F0F0F0F - mov %eax, 0xf0f0f0f - movd %xmm7, %eax - pshufd %xmm7, %xmm7, 0 - - // load srcpitch - mov %ebx, [%esp+4+4] - mov %eax, 2 - - .align 16 -SwizzleBlock4_sse2_1: - // col 0, 2 - - movdqa %xmm0, [%edx] - movdqa %xmm2, [%edx+%ebx] - //update src pointer - lea %edx, [%edx+%ebx*2] - - movdqa %xmm1, [%edx] - movdqa %xmm3, [%edx+%ebx] - // update src pointer - lea %edx, [%edx+%ebx*2] - - // - - - - 2 3 0 1 - pshuflw %xmm1, %xmm1, 0xb1 - pshuflw %xmm3, %xmm3, 0xb1 - // 6 7 4 5 - - - - - pshufhw %xmm1, %xmm1, 0xb1 - pshufhw %xmm3, %xmm3, 0xb1 - - // 4bits interleave 1&0 -> 4&0 - // 4bits interleave 3&2 -> 6&2 - punpcknb - // 8bits interleave 4&0 -> 1&0 - // 8bits interleave 6&2 -> 3&2 - punpck(bw, 0, 2, 4, 6, 1, 3) - // 8bits interleave 1&0 -> 4&0 - // 8bits interleave 3&2 -> 6&2 - punpck(bw, 0, 2, 1, 3, 4, 6) - // 64bits interleave 2&0 -> 1&0 - // 64bits interleave 6&4 -> 3&4 - punpck(qdq, 0, 4, 2, 6, 1, 3) - - movntps [%ecx+16*0], %xmm0 - movntps [%ecx+16*1], %xmm1 - movntps [%ecx+16*2], %xmm4 - movntps [%ecx+16*3], %xmm3 - - // col 1, 3 (same as previous column) - - movdqa %xmm0, [%edx] - movdqa %xmm2, [%edx+%ebx] - lea %edx, [%edx+%ebx*2] - - movdqa %xmm1, [%edx] - movdqa %xmm3, [%edx+%ebx] - lea %edx, [%edx+%ebx*2] - - pshuflw %xmm0, %xmm0, 0xb1 - pshuflw %xmm2, %xmm2, 0xb1 - pshufhw %xmm0, %xmm0, 0xb1 - pshufhw %xmm2, %xmm2, 0xb1 - - punpcknb - punpck(bw, 0, 2, 4, 6, 1, 3) - punpck(bw, 0, 2, 1, 3, 4, 6) - punpck(qdq, 0, 4, 2, 6, 1, 3) - - movntps [%ecx+16*4], %xmm0 - movntps [%ecx+16*5], %xmm1 - movntps [%ecx+16*6], %xmm4 - movntps [%ecx+16*7], %xmm3 - - add %ecx, 128 - - dec %eax - jnz SwizzleBlock4_sse2_1 - - pop %ebx - - ret 4 - -// -// swizzling with unaligned reads -// Same functions as a above with movdqu instead of movdqa for the reads -// Movdqu is as fast as movdqa with aligned address... So do not bother, directly -// use movdqu -// - -// -// SwizzleBlock32u -// - -.globl SwizzleBlock32u_sse2 - .type SwizzleBlock32u_sse2, @function -SwizzleBlock32u_sse2: - - push %esi - push %edi - - mov %edi, %ecx - mov %esi, %edx - mov %edx, [%esp+4+8] - mov %ecx, 4 - - mov %eax, [%esp+8+8] - cmp %eax, 0xffffffff - jne SwizzleBlock32u_sse2_2 - - .align 16 -SwizzleBlock32u_sse2_1: - movdqu %xmm0, [%esi] - movdqu %xmm4, [%esi+16] - movdqu %xmm1, [%esi+%edx] - movdqu %xmm5, [%esi+%edx+16] - - punpck(qdq, 0, 4, 1, 5, 2, 6) - - movntps [%edi+16*0], %xmm0 - movntps [%edi+16*1], %xmm2 - movntps [%edi+16*2], %xmm4 - movntps [%edi+16*3], %xmm6 - - lea %esi, [%esi+%edx*2] - add %edi, 64 - - dec %ecx - jnz SwizzleBlock32u_sse2_1 - - pop %edi - pop %esi - - ret 8 - -SwizzleBlock32u_sse2_2: - - movd %xmm7, %eax - pshufd %xmm7, %xmm7, 0 - - .align 16 -SwizzleBlock32u_sse2_3: - movdqu %xmm0, [%esi] - movdqu %xmm4, [%esi+16] - movdqu %xmm1, [%esi+%edx] - movdqu %xmm5, [%esi+%edx+16] - - punpck(qdq, 0, 4, 1, 5, 2, 6) - - movdqa %xmm3, %xmm7 - pshufd %xmm5, %xmm7, 0xe4 - - pandn %xmm3, [%edi+16*0] - pand %xmm0, %xmm7 - por %xmm0, %xmm3 - movdqa [%edi+16*0], %xmm0 - - pandn %xmm5, [%edi+16*1] - pand %xmm2, %xmm7 - por %xmm2, %xmm5 - movdqa [%edi+16*1], %xmm2 - - movdqa %xmm3, %xmm7 - pshufd %xmm5, %xmm7, 0xe4 - - pandn %xmm3, [%edi+16*2] - pand %xmm4, %xmm7 - por %xmm4, %xmm3 - movdqa [%edi+16*2], %xmm4 - - pandn %xmm5, [%edi+16*3] - pand %xmm6, %xmm7 - por %xmm6, %xmm5 - movdqa [%edi+16*3], %xmm6 - - lea %esi, [%esi+%edx*2] - add %edi, 64 - - dec %ecx - jnz SwizzleBlock32u_sse2_3 - - pop %edi - pop %esi - - ret 8 - -// -// SwizzleBlock16u -// - -.globl SwizzleBlock16u_sse2 - .type SwizzleBlock16u_sse2, @function -SwizzleBlock16u_sse2: - - push %ebx - - mov %ebx, [%esp+4+4] - mov %eax, 4 - - .align 16 -SwizzleBlock16u_sse2_1: - movdqu %xmm0, [%edx] - movdqu %xmm1, [%edx+16] - movdqu %xmm2, [%edx+%ebx] - movdqu %xmm3, [%edx+%ebx+16] - - punpck(wd, 0, 2, 1, 3, 4, 6) - punpck(qdq, 0, 4, 2, 6, 1, 5) - - movntps [%ecx+16*0], %xmm0 - movntps [%ecx+16*1], %xmm1 - movntps [%ecx+16*2], %xmm4 - movntps [%ecx+16*3], %xmm5 - - lea %edx, [%edx+%ebx*2] - add %ecx, 64 - - dec %eax - jnz SwizzleBlock16u_sse2_1 - - pop %ebx - - ret 4 - -// -// SwizzleBlock8u -// - -.globl SwizzleBlock8u_sse2 - .type SwizzleBlock8u_sse2, @function -SwizzleBlock8u_sse2: - - push %ebx - - mov %ebx, [%esp+4+4] - mov %eax, 2 - - .align 16 -SwizzleBlock8u_sse2_1: - // col 0, 2 - - movdqu %xmm0, [%edx] - movdqu %xmm2, [%edx+%ebx] - lea %edx, [%edx+%ebx*2] - - movdqu %xmm1, [%edx] - movdqu %xmm3, [%edx+%ebx] - pshufd %xmm1, %xmm1, 0xb1 - pshufd %xmm3, %xmm3, 0xb1 - lea %edx, [%edx+%ebx*2] - - punpck(bw, 0, 2, 1, 3, 4, 6) - punpck(wd, 0, 2, 4, 6, 1, 3) - punpck(qdq, 0, 1, 2, 3, 4, 5) - - movntps [%ecx+16*0], %xmm0 - movntps [%ecx+16*1], %xmm4 - movntps [%ecx+16*2], %xmm1 - movntps [%ecx+16*3], %xmm5 - - // col 1, 3 - - movdqu %xmm0, [%edx] - movdqu %xmm2, [%edx+%ebx] - pshufd %xmm0, %xmm0, 0xb1 - pshufd %xmm2, %xmm2, 0xb1 - lea %edx, [%edx+%ebx*2] - - movdqu %xmm1, [%edx] - movdqu %xmm3, [%edx+%ebx] - lea %edx, [%edx+%ebx*2] - - punpck(bw, 0, 2, 1, 3, 4, 6) - punpck(wd, 0, 2, 4, 6, 1, 3) - punpck(qdq, 0, 1, 2, 3, 4, 5) - - movntps [%ecx+16*4], %xmm0 - movntps [%ecx+16*5], %xmm4 - movntps [%ecx+16*6], %xmm1 - movntps [%ecx+16*7], %xmm5 - - add %ecx, 128 - - dec %eax - jnz SwizzleBlock8u_sse2_1 - - pop %ebx - - ret 4 - -// -// SwizzleBlock4u -// - -.globl SwizzleBlock4u_sse2 - .type SwizzleBlock4u_sse2, @function -SwizzleBlock4u_sse2: - - push %ebx - - mov %eax, 0xf0f0f0f - movd %xmm7, %eax - pshufd %xmm7, %xmm7, 0 - - mov %ebx, [%esp+4+4] - mov %eax, 2 - - .align 16 -SwizzleBlock4u_sse2_1: - // col 0, 2 - - movdqu %xmm0, [%edx] - movdqu %xmm2, [%edx+%ebx] - lea %edx, [%edx+%ebx*2] - - movdqu %xmm1, [%edx] - movdqu %xmm3, [%edx+%ebx] - lea %edx, [%edx+%ebx*2] - - pshuflw %xmm1, %xmm1, 0xb1 - pshuflw %xmm3, %xmm3, 0xb1 - pshufhw %xmm1, %xmm1, 0xb1 - pshufhw %xmm3, %xmm3, 0xb1 - - punpcknb - punpck(bw, 0, 2, 4, 6, 1, 3) - punpck(bw, 0, 2, 1, 3, 4, 6) - punpck(qdq, 0, 4, 2, 6, 1, 3) - - movntps [%ecx+16*0], %xmm0 - movntps [%ecx+16*1], %xmm1 - movntps [%ecx+16*2], %xmm4 - movntps [%ecx+16*3], %xmm3 - - // col 1, 3 - - movdqu %xmm0, [%edx] - movdqu %xmm2, [%edx+%ebx] - lea %edx, [%edx+%ebx*2] - - movdqu %xmm1, [%edx] - movdqu %xmm3, [%edx+%ebx] - lea %edx, [%edx+%ebx*2] - - pshuflw %xmm0, %xmm0, 0xb1 - pshuflw %xmm2, %xmm2, 0xb1 - pshufhw %xmm0, %xmm0, 0xb1 - pshufhw %xmm2, %xmm2, 0xb1 - - punpcknb - punpck(bw, 0, 2, 4, 6, 1, 3) - punpck(bw, 0, 2, 1, 3, 4, 6) - punpck(qdq, 0, 4, 2, 6, 1, 3) - - movntps [%ecx+16*4], %xmm0 - movntps [%ecx+16*5], %xmm1 - movntps [%ecx+16*6], %xmm4 - movntps [%ecx+16*7], %xmm3 - - add %ecx, 128 - - dec %eax - jnz SwizzleBlock4u_sse2_1 - - pop %ebx - - ret 4 - -#endif - -#if defined(__linux__) && defined(__ELF__) -.section .note.GNU-stack,"",%progbits -#endif diff --git a/plugins/zzogl-pg-cg/opengl/x86-32.asm b/plugins/zzogl-pg-cg/opengl/x86-32.asm deleted file mode 100644 index 2add757975..0000000000 --- a/plugins/zzogl-pg-cg/opengl/x86-32.asm +++ /dev/null @@ -1,652 +0,0 @@ -; Copyright (C) 2003-2005 Gabest -; http://www.gabest.org -; -; This Program is free software; you can redistribute it and/or modify -; it under the terms of the GNU General Public License as published by -; the Free Software Foundation; either version 2, or (at your option) -; any later version. -; -; This Program is distributed in the hope that it will be useful, -; but WITHOUT ANY WARRANTY; without even the implied warranty of -; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -; GNU General Public License for more details. -; -; You should have received a copy of the GNU General Public License -; along with GNU Make; see the file COPYING. If not, write to -; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA USA. -; http://www.gnu.org/copyleft/gpl.html -; -; - .686 - .model flat - .mmx - .xmm - - .const - - __uvmin DD 0d01502f9r ; -1e+010 - __uvmax DD 0501502f9r ; +1e+010 - - .code - -; -; swizzling -; - -punpck macro op, sd0, sd2, s1, s3, d1, d3 - - movdqa @CatStr(xmm, %d1), @CatStr(xmm, %sd0) - pshufd @CatStr(xmm, %d3), @CatStr(xmm, %sd2), 0e4h - - @CatStr(punpckl, op) @CatStr(xmm, %sd0), @CatStr(xmm, %s1) - @CatStr(punpckh, op) @CatStr(xmm, %d1), @CatStr(xmm, %s1) - @CatStr(punpckl, op) @CatStr(xmm, %sd2), @CatStr(xmm, %s3) - @CatStr(punpckh, op) @CatStr(xmm, %d3), @CatStr(xmm, %s3) - - endm - -punpcknb macro - - movdqa xmm4, xmm0 - pshufd xmm5, xmm1, 0e4h - - psllq xmm1, 4 - psrlq xmm4, 4 - - movdqa xmm6, xmm7 - pand xmm0, xmm7 - pandn xmm6, xmm1 - por xmm0, xmm6 - - movdqa xmm6, xmm7 - pand xmm4, xmm7 - pandn xmm6, xmm5 - por xmm4, xmm6 - - movdqa xmm1, xmm4 - - movdqa xmm4, xmm2 - pshufd xmm5, xmm3, 0e4h - - psllq xmm3, 4 - psrlq xmm4, 4 - - movdqa xmm6, xmm7 - pand xmm2, xmm7 - pandn xmm6, xmm3 - por xmm2, xmm6 - - movdqa xmm6, xmm7 - pand xmm4, xmm7 - pandn xmm6, xmm5 - por xmm4, xmm6 - - movdqa xmm3, xmm4 - - punpck bw, 0, 2, 1, 3, 4, 6 - - endm - - -; -; swizzling -; - -; -; SwizzleBlock32 -; - -@SwizzleBlock32_sse2@16 proc public - - - push esi - push edi - - mov edi, ecx - mov esi, edx - mov edx, [esp+4+8] - mov ecx, 4 - - mov eax, [esp+8+8] - cmp eax, 0ffffffffh - jne SwizzleBlock32_sse2@WM - - align 16 -@@: - movdqa xmm0, [esi] - movdqa xmm4, [esi+16] - movdqa xmm1, [esi+edx] - movdqa xmm5, [esi+edx+16] - - punpck qdq, 0, 4, 1, 5, 2, 6 - - movntps [edi+16*0], xmm0 - movntps [edi+16*1], xmm2 - movntps [edi+16*2], xmm4 - movntps [edi+16*3], xmm6 - - lea esi, [esi+edx*2] - add edi, 64 - - dec ecx - jnz @B - - pop edi - pop esi - - ret 8 - -SwizzleBlock32_sse2@WM: - - movd xmm7, eax - pshufd xmm7, xmm7, 0 - - align 16 -@@: - movdqa xmm0, [esi] - movdqa xmm4, [esi+16] - movdqa xmm1, [esi+edx] - movdqa xmm5, [esi+edx+16] - - punpck qdq, 0, 4, 1, 5, 2, 6 - - movdqa xmm3, xmm7 - pshufd xmm5, xmm7, 0e4h - - pandn xmm3, [edi+16*0] - pand xmm0, xmm7 - por xmm0, xmm3 - movntps [edi+16*0], xmm0 - - pandn xmm5, [edi+16*1] - pand xmm2, xmm7 - por xmm2, xmm5 - movntps [edi+16*1], xmm2 - - movdqa xmm3, xmm7 - pshufd xmm5, xmm7, 0e4h - - pandn xmm3, [edi+16*2] - pand xmm4, xmm7 - por xmm4, xmm3 - movntps [edi+16*2], xmm4 - - pandn xmm5, [edi+16*3] - pand xmm6, xmm7 - por xmm6, xmm5 - movntps [edi+16*3], xmm6 - - lea esi, [esi+edx*2] - add edi, 64 - - dec ecx - jnz @B - - pop edi - pop esi - - ret 8 - -@SwizzleBlock32_sse2@16 endp - -; -; SwizzleBlock16 -; - -@SwizzleBlock16_sse2@12 proc public - - push ebx - - mov ebx, [esp+4+4] - mov eax, 4 - - align 16 -@@: - movdqa xmm0, [edx] - movdqa xmm1, [edx+16] - movdqa xmm2, [edx+ebx] - movdqa xmm3, [edx+ebx+16] - - punpck wd, 0, 2, 1, 3, 4, 6 - punpck qdq, 0, 4, 2, 6, 1, 5 - - movntps [ecx+16*0], xmm0 - movntps [ecx+16*1], xmm1 - movntps [ecx+16*2], xmm4 - movntps [ecx+16*3], xmm5 - - lea edx, [edx+ebx*2] - add ecx, 64 - - dec eax - jnz @B - - pop ebx - - ret 4 - -@SwizzleBlock16_sse2@12 endp - -; -; SwizzleBlock8 -; - -@SwizzleBlock8_sse2@12 proc public - - push ebx - - mov ebx, [esp+4+4] - mov eax, 2 - - align 16 -@@: - ; col 0, 2 - - movdqa xmm0, [edx] - movdqa xmm2, [edx+ebx] - lea edx, [edx+ebx*2] - - pshufd xmm1, [edx], 0b1h - pshufd xmm3, [edx+ebx], 0b1h - lea edx, [edx+ebx*2] - - punpck bw, 0, 2, 1, 3, 4, 6 - punpck wd, 0, 2, 4, 6, 1, 3 - punpck qdq, 0, 1, 2, 3, 4, 5 - - movntps [ecx+16*0], xmm0 - movntps [ecx+16*1], xmm4 - movntps [ecx+16*2], xmm1 - movntps [ecx+16*3], xmm5 - - ; col 1, 3 - - pshufd xmm0, [edx], 0b1h - pshufd xmm2, [edx+ebx], 0b1h - lea edx, [edx+ebx*2] - - movdqa xmm1, [edx] - movdqa xmm3, [edx+ebx] - lea edx, [edx+ebx*2] - - punpck bw, 0, 2, 1, 3, 4, 6 - punpck wd, 0, 2, 4, 6, 1, 3 - punpck qdq, 0, 1, 2, 3, 4, 5 - - movntps [ecx+16*4], xmm0 - movntps [ecx+16*5], xmm4 - movntps [ecx+16*6], xmm1 - movntps [ecx+16*7], xmm5 - - add ecx, 128 - - dec eax - jnz @B - - pop ebx - - ret 4 - -@SwizzleBlock8_sse2@12 endp - -; -; SwizzleBlock4 -; - -@SwizzleBlock4_sse2@12 proc public - - push ebx - - mov eax, 0f0f0f0fh - movd xmm7, eax - pshufd xmm7, xmm7, 0 - - mov ebx, [esp+4+4] - mov eax, 2 - - align 16 -@@: - ; col 0, 2 - - movdqa xmm0, [edx] - movdqa xmm2, [edx+ebx] - lea edx, [edx+ebx*2] - - movdqa xmm1, [edx] - movdqa xmm3, [edx+ebx] - lea edx, [edx+ebx*2] - - pshuflw xmm1, xmm1, 0b1h - pshuflw xmm3, xmm3, 0b1h - pshufhw xmm1, xmm1, 0b1h - pshufhw xmm3, xmm3, 0b1h - - punpcknb - punpck bw, 0, 2, 4, 6, 1, 3 - punpck bw, 0, 2, 1, 3, 4, 6 - punpck qdq, 0, 4, 2, 6, 1, 3 - - movntps [ecx+16*0], xmm0 - movntps [ecx+16*1], xmm1 - movntps [ecx+16*2], xmm4 - movntps [ecx+16*3], xmm3 - - ; col 1, 3 - - movdqa xmm0, [edx] - movdqa xmm2, [edx+ebx] - lea edx, [edx+ebx*2] - - movdqa xmm1, [edx] - movdqa xmm3, [edx+ebx] - lea edx, [edx+ebx*2] - - pshuflw xmm0, xmm0, 0b1h - pshuflw xmm2, xmm2, 0b1h - pshufhw xmm0, xmm0, 0b1h - pshufhw xmm2, xmm2, 0b1h - - punpcknb - punpck bw, 0, 2, 4, 6, 1, 3 - punpck bw, 0, 2, 1, 3, 4, 6 - punpck qdq, 0, 4, 2, 6, 1, 3 - - movntps [ecx+16*4], xmm0 - movntps [ecx+16*5], xmm1 - movntps [ecx+16*6], xmm4 - movntps [ecx+16*7], xmm3 - - add ecx, 128 - - dec eax - jnz @B - - pop ebx - - ret 4 - -@SwizzleBlock4_sse2@12 endp - -; -; swizzling with unaligned reads -; - -; -; SwizzleBlock32u -; - -@SwizzleBlock32u_sse2@16 proc public - - push esi - push edi - - mov edi, ecx - mov esi, edx - mov edx, [esp+4+8] - mov ecx, 4 - - mov eax, [esp+8+8] - cmp eax, 0ffffffffh - jne SwizzleBlock32u_sse2@WM - - align 16 -@@: - movdqu xmm0, [esi] - movdqu xmm4, [esi+16] - movdqu xmm1, [esi+edx] - movdqu xmm5, [esi+edx+16] - - punpck qdq, 0, 4, 1, 5, 2, 6 - - movntps [edi+16*0], xmm0 - movntps [edi+16*1], xmm2 - movntps [edi+16*2], xmm4 - movntps [edi+16*3], xmm6 - - lea esi, [esi+edx*2] - add edi, 64 - - dec ecx - jnz @B - - pop edi - pop esi - - ret 8 - -SwizzleBlock32u_sse2@WM: - - movd xmm7, eax - pshufd xmm7, xmm7, 0 - - align 16 -@@: - movdqu xmm0, [esi] - movdqu xmm4, [esi+16] - movdqu xmm1, [esi+edx] - movdqu xmm5, [esi+edx+16] - - punpck qdq, 0, 4, 1, 5, 2, 6 - - movdqa xmm3, xmm7 - pshufd xmm5, xmm7, 0e4h - - pandn xmm3, [edi+16*0] - pand xmm0, xmm7 - por xmm0, xmm3 - movdqa [edi+16*0], xmm0 - - pandn xmm5, [edi+16*1] - pand xmm2, xmm7 - por xmm2, xmm5 - movdqa [edi+16*1], xmm2 - - movdqa xmm3, xmm7 - pshufd xmm5, xmm7, 0e4h - - pandn xmm3, [edi+16*2] - pand xmm4, xmm7 - por xmm4, xmm3 - movdqa [edi+16*2], xmm4 - - pandn xmm5, [edi+16*3] - pand xmm6, xmm7 - por xmm6, xmm5 - movdqa [edi+16*3], xmm6 - - lea esi, [esi+edx*2] - add edi, 64 - - dec ecx - jnz @B - - pop edi - pop esi - - ret 8 - -@SwizzleBlock32u_sse2@16 endp - -; -; SwizzleBlock16u -; - -@SwizzleBlock16u_sse2@12 proc public - - push ebx - - mov ebx, [esp+4+4] - mov eax, 4 - - align 16 -@@: - movdqu xmm0, [edx] - movdqu xmm1, [edx+16] - movdqu xmm2, [edx+ebx] - movdqu xmm3, [edx+ebx+16] - - punpck wd, 0, 2, 1, 3, 4, 6 - punpck qdq, 0, 4, 2, 6, 1, 5 - - movntps [ecx+16*0], xmm0 - movntps [ecx+16*1], xmm1 - movntps [ecx+16*2], xmm4 - movntps [ecx+16*3], xmm5 - - lea edx, [edx+ebx*2] - add ecx, 64 - - dec eax - jnz @B - - pop ebx - - ret 4 - -@SwizzleBlock16u_sse2@12 endp - -; -; SwizzleBlock8u -; - -@SwizzleBlock8u_sse2@12 proc public - - push ebx - - mov ebx, [esp+4+4] - mov eax, 2 - - align 16 -@@: - ; col 0, 2 - - movdqu xmm0, [edx] - movdqu xmm2, [edx+ebx] - lea edx, [edx+ebx*2] - - movdqu xmm1, [edx] - movdqu xmm3, [edx+ebx] - pshufd xmm1, xmm1, 0b1h - pshufd xmm3, xmm3, 0b1h - lea edx, [edx+ebx*2] - - punpck bw, 0, 2, 1, 3, 4, 6 - punpck wd, 0, 2, 4, 6, 1, 3 - punpck qdq, 0, 1, 2, 3, 4, 5 - - movntps [ecx+16*0], xmm0 - movntps [ecx+16*1], xmm4 - movntps [ecx+16*2], xmm1 - movntps [ecx+16*3], xmm5 - - ; col 1, 3 - - movdqu xmm0, [edx] - movdqu xmm2, [edx+ebx] - pshufd xmm0, xmm0, 0b1h - pshufd xmm2, xmm2, 0b1h - lea edx, [edx+ebx*2] - - movdqu xmm1, [edx] - movdqu xmm3, [edx+ebx] - lea edx, [edx+ebx*2] - - punpck bw, 0, 2, 1, 3, 4, 6 - punpck wd, 0, 2, 4, 6, 1, 3 - punpck qdq, 0, 1, 2, 3, 4, 5 - - movntps [ecx+16*4], xmm0 - movntps [ecx+16*5], xmm4 - movntps [ecx+16*6], xmm1 - movntps [ecx+16*7], xmm5 - - add ecx, 128 - - dec eax - jnz @B - - pop ebx - - ret 4 - -@SwizzleBlock8u_sse2@12 endp - -; -; SwizzleBlock4u -; - -@SwizzleBlock4u_sse2@12 proc public - - push ebx - - mov eax, 0f0f0f0fh - movd xmm7, eax - pshufd xmm7, xmm7, 0 - - mov ebx, [esp+4+4] - mov eax, 2 - - align 16 -@@: - ; col 0, 2 - - movdqu xmm0, [edx] - movdqu xmm2, [edx+ebx] - lea edx, [edx+ebx*2] - - movdqu xmm1, [edx] - movdqu xmm3, [edx+ebx] - lea edx, [edx+ebx*2] - - pshuflw xmm1, xmm1, 0b1h - pshuflw xmm3, xmm3, 0b1h - pshufhw xmm1, xmm1, 0b1h - pshufhw xmm3, xmm3, 0b1h - - punpcknb - punpck bw, 0, 2, 4, 6, 1, 3 - punpck bw, 0, 2, 1, 3, 4, 6 - punpck qdq, 0, 4, 2, 6, 1, 3 - - movntps [ecx+16*0], xmm0 - movntps [ecx+16*1], xmm1 - movntps [ecx+16*2], xmm4 - movntps [ecx+16*3], xmm3 - - ; col 1, 3 - - movdqu xmm0, [edx] - movdqu xmm2, [edx+ebx] - lea edx, [edx+ebx*2] - - movdqu xmm1, [edx] - movdqu xmm3, [edx+ebx] - lea edx, [edx+ebx*2] - - pshuflw xmm0, xmm0, 0b1h - pshuflw xmm2, xmm2, 0b1h - pshufhw xmm0, xmm0, 0b1h - pshufhw xmm2, xmm2, 0b1h - - punpcknb - punpck bw, 0, 2, 4, 6, 1, 3 - punpck bw, 0, 2, 1, 3, 4, 6 - punpck qdq, 0, 4, 2, 6, 1, 3 - - movntps [ecx+16*4], xmm0 - movntps [ecx+16*5], xmm1 - movntps [ecx+16*6], xmm4 - movntps [ecx+16*7], xmm3 - - add ecx, 128 - - dec eax - jnz @B - - pop ebx - - ret 4 - -@SwizzleBlock4u_sse2@12 endp - - end \ No newline at end of file diff --git a/plugins/zzogl-pg-cg/opengl/x86.cpp b/plugins/zzogl-pg-cg/opengl/x86.cpp deleted file mode 100644 index c798151b8a..0000000000 --- a/plugins/zzogl-pg-cg/opengl/x86.cpp +++ /dev/null @@ -1,1366 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#include "GS.h" -#include "Mem.h" -#include "x86.h" - -#if defined(ZEROGS_SSE2) -#include -#endif - -// swizzling - -//These were only used in the old version of RESOLVE_32_BITS. Keeping for reference. -#if 0 - -/* FrameSwizzleBlock32 */ -void __fastcall FrameSwizzleBlock32_c(u32* dst, u32* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable32[0][0]; - - if (WriteMask == 0xffffffff) - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - dst[d[j]] = (src[j]); - } - src += srcpitch; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - dst[d[j]] = ((src[j])&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch; - } - } -} - -void __fastcall FrameSwizzleBlock32A2_c(u32* dst, u32* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable32[0][0]; - - if( WriteMask == 0xffffffff ) { - for(int i = 0; i < 8; ++i, d += 8) { - for(int j = 0; j < 8; ++j) { - dst[d[j]] = ((src[2*j] + src[2*j+1]) >> 1); - } - src += srcpitch; - } - } - else { - for(int i = 0; i < 8; ++i, d += 8) { - for(int j = 0; j < 8; ++j) { - dst[d[j]] = (((src[2*j] + src[2*j+1]) >> 1)&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch; - } - } -} - -void __fastcall FrameSwizzleBlock32A4_c(u32* dst, u32* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable32[0][0]; - - if( WriteMask == 0xffffffff ) { - for(int i = 0; i < 8; ++i, d += 8) { - for(int j = 0; j < 8; ++j) { - dst[d[j]] = ((src[2*j] + src[2*j+1] + src[2*j+srcpitch] + src[2*j+srcpitch+1]) >> 2); - } - src += srcpitch << 1; - } - } - else { - for(int i = 0; i < 8; ++i, d += 8) { - for(int j = 0; j < 8; ++j) { - dst[d[j]] = (((src[2*j] + src[2*j+1] + src[2*j+srcpitch] + src[2*j+srcpitch+1]) >> 2)&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch << 1; - } - } -} - -#define FrameSwizzleBlock24_c FrameSwizzleBlock32_c -#define FrameSwizzleBlock24A2_c FrameSwizzleBlock32A2_c -#define FrameSwizzleBlock24A4_c FrameSwizzleBlock32A4_c - -/* FrameSwizzleBlock16 */ -void __fastcall FrameSwizzleBlock16_c(u16* dst, u32* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable16[0][0]; - - if (WriteMask == 0xffff) - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - u32 temp = (src[j]); - dst[d[j]] = RGBA32to16(temp); - } - src += srcpitch; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - u32 temp = (src[j]); - u32 dsrc = RGBA32to16(temp); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch; - } - } -} - -void __fastcall FrameSwizzleBlock16A2_c(u16* dst, u32* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable16[0][0]; - - if (WriteMask == 0xffff) - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - u32 temp = ((src[2*j] + src[2*j+1]) >> 1); - dst[d[j]] = RGBA32to16(temp); - } - src += srcpitch; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - u32 temp = ((src[2*j] + src[2*j+1]) >> 1); - u32 dsrc = RGBA32to16(temp); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch; - } - } -} - -void __fastcall FrameSwizzleBlock16A4_c(u16* dst, u32* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable16[0][0]; - - if (WriteMask == 0xffff) - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - u32 temp = ((src[2*j] + src[2*j+1] + src[2*j+srcpitch] + src[2*j+srcpitch+1]) >> 2); - dst[d[j]] = RGBA32to16(temp); - } - src += srcpitch << 1; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - u32 temp = ((src[2*j] + src[2*j+1] + src[2*j+srcpitch] + src[2*j+srcpitch+1]) >> 2); - u32 dsrc = RGBA32to16(temp); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch << 1; - } - } -} - - -/* Frame16SwizzleBlock32 */ -void __fastcall Frame16SwizzleBlock32_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable32[0][0]; - - if( WriteMask == 0xffffffff ) - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[j]); - dst[d[j]] = Float16ToARGB(dsrc16); - } - src += srcpitch; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[j]); - u32 dsrc = Float16ToARGB(dsrc16); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch; - } - } - } - -void __fastcall Frame16SwizzleBlock32A2_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable32[0][0]; - - if( WriteMask == 0xffffffff ) - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - dst[d[j]] = Float16ToARGB(dsrc16); - } - src += srcpitch; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - u32 dsrc = Float16ToARGB(dsrc16); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch; - } - } - } - -void __fastcall Frame16SwizzleBlock32A4_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable32[0][0]; - - if( WriteMask == 0xffffffff ) - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - dst[d[j]] = Float16ToARGB(dsrc16); - } - src += srcpitch << 1; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - u32 dsrc = Float16ToARGB(dsrc16); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch << 1; - } - } - } - -/* Frame16SwizzleBlock32Z */ -void __fastcall Frame16SwizzleBlock32Z_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable32[0][0]; - if( WriteMask == 0xffffffff ) /* breaks KH text if not checked */ - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[j]); - dst[d[j]] = Float16ToARGB_Z(dsrc16); - } - src += srcpitch; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[j]); - u32 dsrc = Float16ToARGB_Z(dsrc16); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch; - } - } - } - -void __fastcall Frame16SwizzleBlock32ZA2_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable32[0][0]; - if( WriteMask == 0xffffffff ) /* breaks KH text if not checked */ - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - dst[d[j]] = Float16ToARGB_Z(dsrc16); - } - src += srcpitch; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - u32 dsrc = Float16ToARGB_Z(dsrc16); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch; - } - } - } - -void __fastcall Frame16SwizzleBlock32ZA4_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable32[0][0]; - if( WriteMask == 0xffffffff ) /* breaks KH text if not checked */ - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - dst[d[j]] = Float16ToARGB_Z(dsrc16); - } - src += srcpitch << 1; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 8) - { - for(int j = 0; j < 8; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - u32 dsrc = Float16ToARGB_Z(dsrc16); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch << 1; - } - } - } - - - /* Frame16SwizzleBlock16 */ -void __fastcall Frame16SwizzleBlock16_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable16[0][0]; - - if ((WriteMask&0xfff8f8f8) == 0xfff8f8f8) - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - Vector_16F dsrc16 = (src[j]); - dst[d[j]] = Float16ToARGB16(dsrc16); - } - src += srcpitch; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - Vector_16F dsrc16 = (src[j]); - u32 dsrc = Float16ToARGB16(dsrc16); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch; - } - } - } - -void __fastcall Frame16SwizzleBlock16A2_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable16[0][0]; - - if ((WriteMask&0xfff8f8f8) == 0xfff8f8f8) - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - dst[d[j]] = Float16ToARGB16(dsrc16); - } - src += srcpitch; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - u32 dsrc = Float16ToARGB16(dsrc16); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch; - } - } - } - -void __fastcall Frame16SwizzleBlock16A4_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable16[0][0]; - - if ((WriteMask&0xfff8f8f8) == 0xfff8f8f8) - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - dst[d[j]] = Float16ToARGB16(dsrc16); - } - src += srcpitch << 1; - } - } - else - { - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - u32 dsrc = Float16ToARGB16(dsrc16); - dst[d[j]] = (dsrc&WriteMask)|(dst[d[j]]&~WriteMask); - } - src += srcpitch << 1; - } - } - } - - /* Frame16SwizzleBlock16Z */ -void __fastcall Frame16SwizzleBlock16Z_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable16[0][0]; - - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - Vector_16F dsrc16 = (src[j]); - dst[d[j]] = Float16ToARGB16_Z(dsrc16); - } - src += srcpitch; - } -} - -void __fastcall Frame16SwizzleBlock16ZA2_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable16[0][0]; - - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - dst[d[j]] = Float16ToARGB16_Z(dsrc16); - } - src += srcpitch; - } -} - -void __fastcall Frame16SwizzleBlock16ZA4_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask) -{ - u32* d = &g_columnTable16[0][0]; - - for(int i = 0; i < 8; ++i, d += 16) - { - for(int j = 0; j < 16; ++j) - { - Vector_16F dsrc16 = (src[2*j]); - dst[d[j]] = Float16ToARGB16_Z(dsrc16); - } - src += srcpitch << 1; - } -} -#endif - -#ifdef ZEROGS_SSE2 - -//void __fastcall WriteCLUT_T16_I8_CSM1_sse2(u32* vm, u32* clut) -//{ -// __asm { -// mov eax, vm -// mov ecx, clut -// mov edx, 8 -// } -// -//Extract32x2: -// __asm { -// movdqa xmm0, qword ptr [eax] -// movdqa xmm1, qword ptr [eax+16] -// movdqa xmm2, qword ptr [eax+32] -// movdqa xmm3, qword ptr [eax+48] -// -// // rearrange -// pshuflw xmm0, xmm0, 0xd8 -// pshufhw xmm0, xmm0, 0xd8 -// pshuflw xmm1, xmm1, 0xd8 -// pshufhw xmm1, xmm1, 0xd8 -// pshuflw xmm2, xmm2, 0xd8 -// pshufhw xmm2, xmm2, 0xd8 -// pshuflw xmm3, xmm3, 0xd8 -// pshufhw xmm3, xmm3, 0xd8 -// -// movdqa xmm4, xmm0 -// movdqa xmm6, xmm2 -// -// shufps xmm0, xmm1, 0x88 -// shufps xmm2, xmm3, 0x88 -// -// shufps xmm4, xmm1, 0xdd -// shufps xmm6, xmm3, 0xdd -// -// pshufd xmm0, xmm0, 0xd8 -// pshufd xmm2, xmm2, 0xd8 -// pshufd xmm4, xmm4, 0xd8 -// pshufd xmm6, xmm6, 0xd8 -// -// // left column -// movhlps xmm1, xmm0 -// movlhps xmm0, xmm2 -// //movdqa xmm7, [ecx] -// -// movdqa [ecx], xmm0 -// shufps xmm1, xmm2, 0xe4 -// movdqa [ecx+16], xmm1 -// -// // right column -// movhlps xmm3, xmm4 -// movlhps xmm4, xmm6 -// movdqa [ecx+32], xmm4 -// shufps xmm3, xmm6, 0xe4 -// movdqa [ecx+48], xmm3 -// -// add eax, 16*4 -// add ecx, 16*8 -// sub edx, 1 -// cmp edx, 0 -// jne Extract32x2 -// } -//} - -#if 0 -extern "C" void __fastcall WriteCLUT_T32_I8_CSM1_sse2(u32* vm, u32* clut) -{ - __m128i* src = (__m128i*)vm; - __m128i* dst = (__m128i*)clut; - - for (int j = 0; j < 64; j += 32, src += 32, dst += 32) - { - for (int i = 0; i < 16; i += 4) - { - __m128i r0 = _mm_load_si128(&src[i+0]); - __m128i r1 = _mm_load_si128(&src[i+1]); - __m128i r2 = _mm_load_si128(&src[i+2]); - __m128i r3 = _mm_load_si128(&src[i+3]); - - _mm_store_si128(&dst[i*2+0], _mm_unpacklo_epi64(r0, r1)); - _mm_store_si128(&dst[i*2+1], _mm_unpacklo_epi64(r2, r3)); - _mm_store_si128(&dst[i*2+2], _mm_unpackhi_epi64(r0, r1)); - _mm_store_si128(&dst[i*2+3], _mm_unpackhi_epi64(r2, r3)); - - __m128i r4 = _mm_load_si128(&src[i+0+16]); - __m128i r5 = _mm_load_si128(&src[i+1+16]); - __m128i r6 = _mm_load_si128(&src[i+2+16]); - __m128i r7 = _mm_load_si128(&src[i+3+16]); - - _mm_store_si128(&dst[i*2+4], _mm_unpacklo_epi64(r4, r5)); - _mm_store_si128(&dst[i*2+5], _mm_unpacklo_epi64(r6, r7)); - _mm_store_si128(&dst[i*2+6], _mm_unpackhi_epi64(r4, r5)); - _mm_store_si128(&dst[i*2+7], _mm_unpackhi_epi64(r6, r7)); - } - } -} - - -extern "C" void __fastcall WriteCLUT_T32_I4_CSM1_sse2(u32* vm, u32* clut) -{ - __m128i* src = (__m128i*)vm; - __m128i* dst = (__m128i*)clut; - - __m128i r0 = _mm_load_si128(&src[0]); - __m128i r1 = _mm_load_si128(&src[1]); - __m128i r2 = _mm_load_si128(&src[2]); - __m128i r3 = _mm_load_si128(&src[3]); - - _mm_store_si128(&dst[0], _mm_unpacklo_epi64(r0, r1)); - _mm_store_si128(&dst[1], _mm_unpacklo_epi64(r2, r3)); - _mm_store_si128(&dst[2], _mm_unpackhi_epi64(r0, r1)); - _mm_store_si128(&dst[3], _mm_unpackhi_epi64(r2, r3)); -} - -static const __aligned16 int s_clut_16bits_mask[4] = { 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff }; -static const __aligned16 int s_clut16mask2[4] = { 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff }; -static const __aligned16 int s_clut16mask[8] = { 0xffff0000, 0xffff0000, 0xffff0000, 0xffff0000, - 0x0000ffff, 0x0000ffff, 0x0000ffff, 0x0000ffff - }; - -template -void __fastcall WriteCLUT_T16_I4_CSM1_core_sse2(u32* vm, u32* clut) -{ - __m128i vm_0; - __m128i vm_1; - __m128i vm_2; - __m128i vm_3; - __m128i clut_0; - __m128i clut_1; - __m128i clut_2; - __m128i clut_3; - - __m128i clut_mask = _mm_load_si128((__m128i*)s_clut_16bits_mask); - - // !HIGH_16BITS_VM - // CSA in 0-15 - // Replace lower 16 bits of clut0 with lower 16 bits of vm - // CSA in 16-31 - // Replace higher 16 bits of clut0 with lower 16 bits of vm - - // HIGH_16BITS_VM - // CSA in 0-15 - // Replace lower 16 bits of clut0 with higher 16 bits of vm - // CSA in 16-31 - // Replace higher 16 bits of clut0 with higher 16 bits of vm - if(HIGH_16BITS_VM && CSA_0_15) { - // move up to low - vm_0 = _mm_load_si128((__m128i*)vm); // 9 8 1 0 - vm_1 = _mm_load_si128((__m128i*)vm+1); // 11 10 3 2 - vm_2 = _mm_load_si128((__m128i*)vm+2); // 13 12 5 4 - vm_3 = _mm_load_si128((__m128i*)vm+3); // 15 14 7 6 - vm_0 = _mm_srli_epi32(vm_0, 16); - vm_1 = _mm_srli_epi32(vm_1, 16); - vm_2 = _mm_srli_epi32(vm_2, 16); - vm_3 = _mm_srli_epi32(vm_3, 16); - } else if(HIGH_16BITS_VM && !CSA_0_15) { - // Remove lower 16 bits - vm_0 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)vm)); // 9 8 1 0 - vm_1 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)vm+1)); // 11 10 3 2 - vm_2 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)vm+2)); // 13 12 5 4 - vm_3 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)vm+3)); // 15 14 7 6 - } else if(!HIGH_16BITS_VM && CSA_0_15) { - // Remove higher 16 bits - vm_0 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)vm)); // 9 8 1 0 - vm_1 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)vm+1)); // 11 10 3 2 - vm_2 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)vm+2)); // 13 12 5 4 - vm_3 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)vm+3)); // 15 14 7 6 - } else if(!HIGH_16BITS_VM && !CSA_0_15) { - // move low to high - vm_0 = _mm_load_si128((__m128i*)vm); // 9 8 1 0 - vm_1 = _mm_load_si128((__m128i*)vm+1); // 11 10 3 2 - vm_2 = _mm_load_si128((__m128i*)vm+2); // 13 12 5 4 - vm_3 = _mm_load_si128((__m128i*)vm+3); // 15 14 7 6 - vm_0 = _mm_slli_epi32(vm_0, 16); - vm_1 = _mm_slli_epi32(vm_1, 16); - vm_2 = _mm_slli_epi32(vm_2, 16); - vm_3 = _mm_slli_epi32(vm_3, 16); - } - - // Unsizzle the data - __m128i row_0 = _mm_unpacklo_epi32(vm_0, vm_1); // 3 2 1 0 - __m128i row_1 = _mm_unpacklo_epi32(vm_2, vm_3); // 7 6 5 4 - __m128i row_2 = _mm_unpackhi_epi32(vm_0, vm_1); // 11 10 9 8 - __m128i row_3 = _mm_unpackhi_epi32(vm_2, vm_3); // 15 14 13 12 - - // load old data & remove useless part - if(CSA_0_15) { - // Remove lower 16 bits - clut_0 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut)); - clut_1 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut+1)); - clut_2 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut+2)); - clut_3 = _mm_andnot_si128(clut_mask, _mm_load_si128((__m128i*)clut+3)); - } else { - // Remove higher 16 bits - clut_0 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut)); - clut_1 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut+1)); - clut_2 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut+2)); - clut_3 = _mm_and_si128(clut_mask, _mm_load_si128((__m128i*)clut+3)); - } - - // Merge old & new data - clut_0 = _mm_or_si128(clut_0, row_0); - clut_1 = _mm_or_si128(clut_1, row_1); - clut_2 = _mm_or_si128(clut_2, row_2); - clut_3 = _mm_or_si128(clut_3, row_3); - - _mm_store_si128((__m128i*)clut, clut_0); - _mm_store_si128((__m128i*)clut+1, clut_1); - _mm_store_si128((__m128i*)clut+2, clut_2); - _mm_store_si128((__m128i*)clut+3, clut_3); -} - -extern "C" void __fastcall WriteCLUT_T16_I4_CSM1_sse2(u32* vm, u32 csa) -{ - u32* clut = (u32*)(g_pbyGSClut + 64*(csa & 15)); - - if (csa > 15) { - WriteCLUT_T16_I4_CSM1_core_sse2(vm, clut); - } else { - WriteCLUT_T16_I4_CSM1_core_sse2(vm, clut); - } -} - -extern "C" void __fastcall WriteCLUT_T16_I4_CSM1_sse2_old(u32* vm, u32* clut) -{ -#define YET_ANOTHER_INTRINSIC -#ifdef YET_ANOTHER_INTRINSIC - __m128i vm0 = _mm_load_si128((__m128i*)vm); - __m128i vm1 = _mm_load_si128((__m128i*)vm+1); - __m128i vm2 = _mm_load_si128((__m128i*)vm+2); - __m128i vm3 = _mm_load_si128((__m128i*)vm+3); - - // rearrange 16bits words - vm0 = _mm_shufflehi_epi16(vm0, 0x88); - vm0 = _mm_shufflelo_epi16(vm0, 0x88); // 6 4 6 4 2 0 2 0 - vm1 = _mm_shufflehi_epi16(vm1, 0x88); - vm1 = _mm_shufflelo_epi16(vm1, 0x88); // 14 12 14 12 10 8 10 8 - - // Note: MSVC complains about direct c-cast... - // vm0 = (__m128i)_mm_shuffle_ps((__m128)vm0, (__m128)vm1, 0x88); // 14 12 10 8 6 4 2 0 - __m128 vm0_f = (_mm_shuffle_ps((__m128&)vm0, (__m128&)vm1, 0x88)); // 14 12 10 8 6 4 2 0 - vm0 = (__m128i&)vm0_f; - vm0 = _mm_shuffle_epi32(vm0, 0xD8); // 14 12 6 4 10 8 2 0 - - // *** Same jobs for vm2 and vm3 - vm2 = _mm_shufflehi_epi16(vm2, 0x88); - vm2 = _mm_shufflelo_epi16(vm2, 0x88); - vm3 = _mm_shufflehi_epi16(vm3, 0x88); - vm3 = _mm_shufflelo_epi16(vm3, 0x88); - - // Note: MSVC complains about direct c-cast... - // vm2 = (__m128i)_mm_shuffle_ps((__m128)vm2, (__m128)vm3, 0x88); - __m128 vm2_f = (_mm_shuffle_ps((__m128&)vm2, (__m128&)vm3, 0x88)); - vm2 = (__m128i&)vm2_f; - vm2 = _mm_shuffle_epi32(vm2, 0xD8); - - // Create a zero register. - __m128i zero_128 = _mm_setzero_si128(); - - if ((u32)clut & 0x0F) { - // Unaligned write. - - u16* clut_word_ptr = (u16*)clut; - __m128i clut_mask = _mm_load_si128((__m128i*)s_clut16mask2); - - // Load previous data and clear high 16 bits of double words - __m128i clut_0 = _mm_load_si128((__m128i*)(clut_word_ptr-1)); // 6 5 4 3 2 1 0 x - __m128i clut_2 = _mm_load_si128((__m128i*)(clut_word_ptr-1)+2); // 22 21 20 19 18 17 16 15 - clut_0 = _mm_and_si128(clut_0, clut_mask); // - 5 - 3 - 1 - x - clut_2 = _mm_and_si128(clut_2, clut_mask); // - 21 - 19 - 17 - 15 - - // Convert 16bits to 32 bits vm0 (zero entended) - __m128i vm0_low = _mm_unpacklo_epi16(vm0, zero_128); // - 10 - 8 - 2 - 0 - __m128i vm0_high = _mm_unpackhi_epi16(vm0, zero_128); // - 14 - 12 - 6 - 4 - - // shift the value to aligned it with clut - vm0_low = _mm_slli_epi32(vm0_low, 16); // 10 - 8 - 2 - 0 - - vm0_high = _mm_slli_epi32(vm0_high, 16); // 14 - 12 - 6 - 4 - - - // Interlace old and new data - clut_0 = _mm_or_si128(clut_0, vm0_low); // 10 5 8 3 2 1 0 x - clut_2 = _mm_or_si128(clut_2, vm0_high); // 14 21 12 19 6 17 4 15 - - // Save the result - _mm_store_si128((__m128i*)(clut_word_ptr-1), clut_0); - _mm_store_si128((__m128i*)(clut_word_ptr-1)+2, clut_2); - - // *** Same jobs for clut_1 and clut_3 - __m128i clut_1 = _mm_load_si128((__m128i*)(clut_word_ptr-1)+1); - __m128i clut_3 = _mm_load_si128((__m128i*)(clut_word_ptr-1)+3); - clut_1 = _mm_and_si128(clut_1, clut_mask); - clut_3 = _mm_and_si128(clut_3, clut_mask); - - __m128i vm2_low = _mm_unpacklo_epi16(vm2, zero_128); - __m128i vm2_high = _mm_unpackhi_epi16(vm2, zero_128); - vm2_low = _mm_slli_epi32(vm2_low, 16); - vm2_high = _mm_slli_epi32(vm2_high, 16); - - clut_1 = _mm_or_si128(clut_1, vm2_low); - clut_3 = _mm_or_si128(clut_3, vm2_high); - - _mm_store_si128((__m128i*)(clut_word_ptr-1)+1, clut_1); - _mm_store_si128((__m128i*)(clut_word_ptr-1)+3, clut_3); - } else { - // Standard write - - __m128i clut_mask = _mm_load_si128((__m128i*)s_clut16mask); - - // Load previous data and clear low 16 bits of double words - __m128i clut_0 = _mm_and_si128(_mm_load_si128((__m128i*)clut), clut_mask); // 7 - 5 - 3 - 1 - - __m128i clut_2 = _mm_and_si128(_mm_load_si128((__m128i*)clut+2), clut_mask); // 23 - 21 - 19 - 17 - - - // Convert 16bits to 32 bits vm0 (zero entended) - __m128i vm0_low = _mm_unpacklo_epi16(vm0, zero_128); // - 10 - 8 - 2 - 0 - __m128i vm0_high = _mm_unpackhi_epi16(vm0, zero_128); // - 14 - 12 - 6 - 4 - - // Interlace old and new data - clut_0 = _mm_or_si128(clut_0, vm0_low); // 7 10 5 8 3 2 1 0 - clut_2 = _mm_or_si128(clut_2, vm0_high); // 23 14 21 12 19 6 17 4 - - // Save the result - _mm_store_si128((__m128i*)clut, clut_0); - _mm_store_si128((__m128i*)clut+2, clut_2); - - // *** Same jobs for clut_1 and clut_3 - __m128i clut_1 = _mm_and_si128(_mm_load_si128((__m128i*)clut+1), clut_mask); - __m128i clut_3 = _mm_and_si128(_mm_load_si128((__m128i*)clut+3), clut_mask); - - __m128i vm2_low = _mm_unpacklo_epi16(vm2, zero_128); - __m128i vm2_high = _mm_unpackhi_epi16(vm2, zero_128); - - clut_1 = _mm_or_si128(clut_1, vm2_low); - clut_3 = _mm_or_si128(clut_3, vm2_high); - - _mm_store_si128((__m128i*)clut+1, clut_1); - _mm_store_si128((__m128i*)clut+3, clut_3); - } - -#else -#if defined(_MSC_VER) - __asm - { - mov eax, vm - mov ecx, clut - movdqa xmm0, qword ptr [eax] - movdqa xmm1, qword ptr [eax+16] - movdqa xmm2, qword ptr [eax+32] - movdqa xmm3, qword ptr [eax+48] - - // rearrange - pshuflw xmm0, xmm0, 0x88 - pshufhw xmm0, xmm0, 0x88 - pshuflw xmm1, xmm1, 0x88 - pshufhw xmm1, xmm1, 0x88 - pshuflw xmm2, xmm2, 0x88 - pshufhw xmm2, xmm2, 0x88 - pshuflw xmm3, xmm3, 0x88 - pshufhw xmm3, xmm3, 0x88 - - shufps xmm0, xmm1, 0x88 - shufps xmm2, xmm3, 0x88 - - pshufd xmm0, xmm0, 0xd8 - pshufd xmm2, xmm2, 0xd8 - - pxor xmm6, xmm6 - - test ecx, 15 - jnz WriteUnaligned - - movdqa xmm7, s_clut16mask // saves upper 16 bytes - - // have to save interlaced with the old data - movdqa xmm4, [ecx] - movdqa xmm5, [ecx+32] - movhlps xmm1, xmm0 - movlhps xmm0, xmm2 // lower 8 colors - - pand xmm4, xmm7 - pand xmm5, xmm7 - - shufps xmm1, xmm2, 0xe4 // upper 8 colors - movdqa xmm2, xmm0 - movdqa xmm3, xmm1 - - punpcklwd xmm0, xmm6 - punpcklwd xmm1, xmm6 - por xmm0, xmm4 - por xmm1, xmm5 - - punpckhwd xmm2, xmm6 - punpckhwd xmm3, xmm6 - - movdqa [ecx], xmm0 - movdqa [ecx+32], xmm1 - - movdqa xmm5, xmm7 - pand xmm7, [ecx+16] - pand xmm5, [ecx+48] - - por xmm2, xmm7 - por xmm3, xmm5 - - movdqa [ecx+16], xmm2 - movdqa [ecx+48], xmm3 - jmp End - -WriteUnaligned: - // ecx is offset by 2 - sub ecx, 2 - - movdqa xmm7, s_clut16mask2 // saves lower 16 bytes - - // have to save interlaced with the old data - movdqa xmm4, [ecx] - movdqa xmm5, [ecx+32] - movhlps xmm1, xmm0 - movlhps xmm0, xmm2 // lower 8 colors - - pand xmm4, xmm7 - pand xmm5, xmm7 - - shufps xmm1, xmm2, 0xe4 // upper 8 colors - movdqa xmm2, xmm0 - movdqa xmm3, xmm1 - - punpcklwd xmm0, xmm6 - punpcklwd xmm1, xmm6 - pslld xmm0, 16 - pslld xmm1, 16 - por xmm0, xmm4 - por xmm1, xmm5 - - punpckhwd xmm2, xmm6 - punpckhwd xmm3, xmm6 - pslld xmm2, 16 - pslld xmm3, 16 - - movdqa [ecx], xmm0 - movdqa [ecx+32], xmm1 - - movdqa xmm5, xmm7 - pand xmm7, [ecx+16] - pand xmm5, [ecx+48] - - por xmm2, xmm7 - por xmm3, xmm5 - - movdqa [ecx+16], xmm2 - movdqa [ecx+48], xmm3 - -End: - } -#else - __asm__ __volatile__(".intel_syntax noprefix\n" - "movdqa xmm0, xmmword ptr [%[vm]]\n" - "movdqa xmm1, xmmword ptr [%[vm]+16]\n" - "movdqa xmm2, xmmword ptr [%[vm]+32]\n" - "movdqa xmm3, xmmword ptr [%[vm]+48]\n" - - // rearrange - "pshuflw xmm0, xmm0, 0x88\n" - "pshufhw xmm0, xmm0, 0x88\n" - "pshuflw xmm1, xmm1, 0x88\n" - "pshufhw xmm1, xmm1, 0x88\n" - "pshuflw xmm2, xmm2, 0x88\n" - "pshufhw xmm2, xmm2, 0x88\n" - "pshuflw xmm3, xmm3, 0x88\n" - "pshufhw xmm3, xmm3, 0x88\n" - - "shufps xmm0, xmm1, 0x88\n" - "shufps xmm2, xmm3, 0x88\n" - - "pshufd xmm0, xmm0, 0xd8\n" - "pshufd xmm2, xmm2, 0xd8\n" - - "pxor xmm6, xmm6\n" - - "test %[clut], 15\n" - "jnz WriteUnaligned\n" - - "movdqa xmm7, %[s_clut16mask]\n" // saves upper 16 bits - - // have to save interlaced with the old data - "movdqa xmm4, [%[clut]]\n" - "movdqa xmm5, [%[clut]+32]\n" - "movhlps xmm1, xmm0\n" - "movlhps xmm0, xmm2\n"// lower 8 colors - - "pand xmm4, xmm7\n" - "pand xmm5, xmm7\n" - - "shufps xmm1, xmm2, 0xe4\n" // upper 8 colors - "movdqa xmm2, xmm0\n" - "movdqa xmm3, xmm1\n" - - "punpcklwd xmm0, xmm6\n" - "punpcklwd xmm1, xmm6\n" - "por xmm0, xmm4\n" - "por xmm1, xmm5\n" - - "punpckhwd xmm2, xmm6\n" - "punpckhwd xmm3, xmm6\n" - - "movdqa [%[clut]], xmm0\n" - "movdqa [%[clut]+32], xmm1\n" - - "movdqa xmm5, xmm7\n" - "pand xmm7, [%[clut]+16]\n" - "pand xmm5, [%[clut]+48]\n" - - "por xmm2, xmm7\n" - "por xmm3, xmm5\n" - - "movdqa [%[clut]+16], xmm2\n" - "movdqa [%[clut]+48], xmm3\n" - "jmp WriteCLUT_T16_I4_CSM1_End\n" - - "WriteUnaligned:\n" - // %[clut] is offset by 2 - "sub %[clut], 2\n" - - "movdqa xmm7, %[s_clut16mask2]\n" // saves lower 16 bits - - // have to save interlaced with the old data - "movdqa xmm4, [%[clut]]\n" - "movdqa xmm5, [%[clut]+32]\n" - "movhlps xmm1, xmm0\n" - "movlhps xmm0, xmm2\n" // lower 8 colors - - "pand xmm4, xmm7\n" - "pand xmm5, xmm7\n" - - "shufps xmm1, xmm2, 0xe4\n" // upper 8 colors - "movdqa xmm2, xmm0\n" - "movdqa xmm3, xmm1\n" - - "punpcklwd xmm0, xmm6\n" - "punpcklwd xmm1, xmm6\n" - "pslld xmm0, 16\n" - "pslld xmm1, 16\n" - "por xmm0, xmm4\n" - "por xmm1, xmm5\n" - - "punpckhwd xmm2, xmm6\n" - "punpckhwd xmm3, xmm6\n" - "pslld xmm2, 16\n" - "pslld xmm3, 16\n" - - "movdqa [%[clut]], xmm0\n" - "movdqa [%[clut]+32], xmm1\n" - - "movdqa xmm5, xmm7\n" - "pand xmm7, [%[clut]+16]\n" - "pand xmm5, [%[clut]+48]\n" - - "por xmm2, xmm7\n" - "por xmm3, xmm5\n" - - "movdqa [%[clut]+16], xmm2\n" - "movdqa [%[clut]+48], xmm3\n" - "WriteCLUT_T16_I4_CSM1_End:\n" - "\n" - ".att_syntax\n" - : - : [vm] "r" (vm), [clut] "r" (clut), [s_clut16mask] "m" (*s_clut16mask), [s_clut16mask2] "m" (*s_clut16mask2) - : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "memory" - ); -#endif // _MSC_VER -#endif -} - -__forceinline void WriteCLUT_T16_I8_CSM1_sse2(u32* vm, u32 csa) -{ - // update the right clut column (csa < 16) - u32* clut = (u32*)(g_pbyGSClut + 64*(csa & 15)); - u32 csa_right = (csa < 16) ? 16 - csa : 0; - - for(int i = (csa_right/2); i > 0 ; --i) { - WriteCLUT_T16_I4_CSM1_core_sse2(vm, clut); - clut += 16; - WriteCLUT_T16_I4_CSM1_core_sse2(vm, clut); - clut += 16; - vm += 16; // go down one column - } - - // update the left clut column - u32 csa_left = (csa >= 16) ? 16 : csa; - - // In case csa_right is odd (so csa_left is also odd), we cross the clut column - if(csa_right & 0x1) { - WriteCLUT_T16_I4_CSM1_core_sse2(vm, clut); - // go back to the base before processing left clut column - clut = (u32*)(g_pbyGSClut); - WriteCLUT_T16_I4_CSM1_core_sse2(vm, clut); - } else if(csa_right != 0) { - // go back to the base before processing left clut column - clut = (u32*)(g_pbyGSClut); - } - - for(int i = (csa_left/2); i > 0 ; --i) { - WriteCLUT_T16_I4_CSM1_core_sse2(vm, clut); - clut += 16; - WriteCLUT_T16_I4_CSM1_core_sse2(vm, clut); - clut += 16; - vm += 16; // go down one column - } -} -#endif - -#endif // ZEROGS_SSE2 - -#if 0 -void __fastcall WriteCLUT_T16_I8_CSM1_c(u32* _vm, u32* _clut) -{ - const static u32 map[] = - { - 0, 2, 8, 10, 16, 18, 24, 26, - 4, 6, 12, 14, 20, 22, 28, 30, - 1, 3, 9, 11, 17, 19, 25, 27, - 5, 7, 13, 15, 21, 23, 29, 31 - }; - - u16* vm = (u16*)_vm; - u16* clut = (u16*)_clut; - - int left = ((u32)(uptr)clut & 2) ? 512 : 512 - (((u32)(uptr)clut) & 0x3ff) / 2; - - for (int j = 0; j < 8; j++, vm += 32, clut += 64, left -= 32) - { - if (left == 32) - { - assert(left == 32); - - for (int i = 0; i < 16; i++) - clut[2*i] = vm[map[i]]; - - clut = (u16*)((uptr)clut & ~0x3ff) + 1; - - for (int i = 16; i < 32; i++) - clut[2*i] = vm[map[i]]; - } - else - { - if (left == 0) - { - clut = (u16*)((uptr)clut & ~0x3ff) + 1; - left = -1; - } - - for (int i = 0; i < 32; i++) - clut[2*i] = vm[map[i]]; - } - } -} - -void __fastcall WriteCLUT_T32_I8_CSM1_c(u32* vm, u32* clut) -{ - u64* src = (u64*)vm; - u64* dst = (u64*)clut; - - for (int j = 0; j < 2; j++, src += 32) - { - for (int i = 0; i < 4; i++, dst += 16, src += 8) - { - dst[0] = src[0]; - dst[1] = src[2]; - dst[2] = src[4]; - dst[3] = src[6]; - dst[4] = src[1]; - dst[5] = src[3]; - dst[6] = src[5]; - dst[7] = src[7]; - - dst[8] = src[32]; - dst[9] = src[32+2]; - dst[10] = src[32+4]; - dst[11] = src[32+6]; - dst[12] = src[32+1]; - dst[13] = src[32+3]; - dst[14] = src[32+5]; - dst[15] = src[32+7]; - } - } -} - -void __fastcall WriteCLUT_T16_I4_CSM1_c(u32* _vm, u32* _clut) -{ - u16* dst = (u16*)_clut; - u16* src = (u16*)_vm; - - dst[0] = src[0]; - dst[2] = src[2]; - dst[4] = src[8]; - dst[6] = src[10]; - dst[8] = src[16]; - dst[10] = src[18]; - dst[12] = src[24]; - dst[14] = src[26]; - dst[16] = src[4]; - dst[18] = src[6]; - dst[20] = src[12]; - dst[22] = src[14]; - dst[24] = src[20]; - dst[26] = src[22]; - dst[28] = src[28]; - dst[30] = src[30]; -} - -void __fastcall WriteCLUT_T32_I4_CSM1_c(u32* vm, u32* clut) -{ - u64* src = (u64*)vm; - u64* dst = (u64*)clut; - - dst[0] = src[0]; - dst[1] = src[2]; - dst[2] = src[4]; - dst[3] = src[6]; - dst[4] = src[1]; - dst[5] = src[3]; - dst[6] = src[5]; - dst[7] = src[7]; -} - -#endif - -void SSE2_UnswizzleZ16Target(u16* dst, u16* src, int iters) -{ - -#if defined(_MSC_VER) - __asm - { - mov edx, iters - pxor xmm7, xmm7 - mov eax, dst - mov ecx, src - -Z16Loop: - // unpack 64 bytes at a time - movdqa xmm0, [ecx] - movdqa xmm2, [ecx+16] - movdqa xmm4, [ecx+32] - movdqa xmm6, [ecx+48] - - movdqa xmm1, xmm0 - movdqa xmm3, xmm2 - movdqa xmm5, xmm4 - - punpcklwd xmm0, xmm7 - punpckhwd xmm1, xmm7 - punpcklwd xmm2, xmm7 - punpckhwd xmm3, xmm7 - - // start saving - movdqa [eax], xmm0 - movdqa [eax+16], xmm1 - - punpcklwd xmm4, xmm7 - punpckhwd xmm5, xmm7 - - movdqa [eax+32], xmm2 - movdqa [eax+48], xmm3 - - movdqa xmm0, xmm6 - punpcklwd xmm6, xmm7 - - movdqa [eax+64], xmm4 - movdqa [eax+80], xmm5 - - punpckhwd xmm0, xmm7 - - movdqa [eax+96], xmm6 - movdqa [eax+112], xmm0 - - add ecx, 64 - add eax, 128 - sub edx, 1 - jne Z16Loop - } -#else // _MSC_VER - - __asm__ __volatile__(".intel_syntax\n" - "pxor %%xmm7, %%xmm7\n" - - "Z16Loop:\n" - // unpack 64 bytes at a time - "movdqa %%xmm0, [%[src]]\n" - "movdqa %%xmm2, [%[src]+16]\n" - "movdqa %%xmm4, [%[src]+32]\n" - "movdqa %%xmm6, [%[src]+48]\n" - - "movdqa %%xmm1, %%xmm0\n" - "movdqa %%xmm3, %%xmm2\n" - "movdqa %%xmm5, %%xmm4\n" - - "punpcklwd %%xmm0, %%xmm7\n" - "punpckhwd %%xmm1, %%xmm7\n" - "punpcklwd %%xmm2, %%xmm7\n" - "punpckhwd %%xmm3, %%xmm7\n" - - // start saving - "movdqa [%[dst]], %%xmm0\n" - "movdqa [%[dst]+16], %%xmm1\n" - - "punpcklwd %%xmm4, %%xmm7\n" - "punpckhwd %%xmm5, %%xmm7\n" - - "movdqa [%[dst]+32], %%xmm2\n" - "movdqa [%[dst]+48], %%xmm3\n" - - "movdqa %%xmm0, %%xmm6\n" - "punpcklwd %%xmm6, %%xmm7\n" - - "movdqa [%[dst]+64], %%xmm4\n" - "movdqa [%[dst]+80], %%xmm5\n" - - "punpckhwd %%xmm0, %%xmm7\n" - - "movdqa [%[dst]+96], %%xmm6\n" - "movdqa [%[dst]+112], %%xmm0\n" - - "add %[src], 64\n" - "add %[dst], 128\n" - "sub %[iters], 1\n" - "jne Z16Loop\n" - -".att_syntax\n" - : "=&r"(src), "=&r"(dst), "=&r"(iters) - : [src] "0"(src), [dst] "1"(dst), [iters] "2"(iters) - : "xmm0", "xmm1", "xmm2", "xmm3", "xmm4", "xmm5", "xmm6", "xmm7", "memory" - ); -#endif // _MSC_VER -} - diff --git a/plugins/zzogl-pg-cg/opengl/x86.h b/plugins/zzogl-pg-cg/opengl/x86.h deleted file mode 100644 index 547b8484c7..0000000000 --- a/plugins/zzogl-pg-cg/opengl/x86.h +++ /dev/null @@ -1,174 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef ZEROGS_X86 -#define ZEROGS_X86 - -#include "GS.h" - -extern "C" void __fastcall SwizzleBlock32_sse2(u8* dst, u8* src, int srcpitch, u32 WriteMask = 0xffffffff); -extern "C" void __fastcall SwizzleBlock16_sse2(u8* dst, u8* src, int srcpitch); -extern "C" void __fastcall SwizzleBlock8_sse2(u8* dst, u8* src, int srcpitch); -extern "C" void __fastcall SwizzleBlock4_sse2(u8* dst, u8* src, int srcpitch); -extern "C" void __fastcall SwizzleBlock32u_sse2(u8* dst, u8* src, int srcpitch, u32 WriteMask = 0xffffffff); -extern "C" void __fastcall SwizzleBlock16u_sse2(u8* dst, u8* src, int srcpitch); -extern "C" void __fastcall SwizzleBlock8u_sse2(u8* dst, u8* src, int srcpitch); -extern "C" void __fastcall SwizzleBlock4u_sse2(u8* dst, u8* src, int srcpitch); - -// frame swizzling - -#if 0 -// no AA -extern "C" void __fastcall FrameSwizzleBlock32_sse2(u32* dst, u32* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall FrameSwizzleBlock16_sse2(u16* dst, u32* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock32_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock32Z_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock16_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock16Z_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); - -// AA 2x -extern "C" void __fastcall FrameSwizzleBlock32A2_sse2(u32* dst, u32* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall FrameSwizzleBlock16A2_sse2(u16* dst, u32* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock32A2_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock32ZA2_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock16A2_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock16ZA2_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); - -// AA 4x -extern "C" void __fastcall FrameSwizzleBlock32A4_sse2(u32* dst, u32* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall FrameSwizzleBlock16A4_sse2(u16* dst, u32* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock32A4_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock32ZA4_sse2(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock16A4_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern "C" void __fastcall Frame16SwizzleBlock16ZA4_sse2(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); - -/*extern void __fastcall SwizzleBlock32_c(u8* dst, u8* src, int srcpitch, u32 WriteMask = 0xffffffff); -extern void __fastcall SwizzleBlock16_c(u8* dst, u8* src, int srcpitch); -extern void __fastcall SwizzleBlock8_c(u8* dst, u8* src, int srcpitch); -extern void __fastcall SwizzleBlock4_c(u8* dst, u8* src, int srcpitch);*/ - -// no AA -extern void __fastcall FrameSwizzleBlock32_c(u32* dst, u32* src, int srcpitch, u32 WriteMask); -extern void __fastcall FrameSwizzleBlock24_c(u32* dst, u32* src, int srcpitch, u32 WriteMask); -extern void __fastcall FrameSwizzleBlock16_c(u16* dst, u32* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock32_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock32Z_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock16_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock16Z_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); - -// AA 2x -extern void __fastcall FrameSwizzleBlock32A2_c(u32* dst, u32* src, int srcpitch, u32 WriteMask); -extern void __fastcall FrameSwizzleBlock24A2_c(u32* dst, u32* src, int srcpitch, u32 WriteMask); -extern void __fastcall FrameSwizzleBlock16A2_c(u16* dst, u32* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock32A2_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock32ZA2_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock16A2_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock16ZA2_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); - -// AA 4x -extern void __fastcall FrameSwizzleBlock32A4_c(u32* dst, u32* src, int srcpitch, u32 WriteMask); -extern void __fastcall FrameSwizzleBlock24A4_c(u32* dst, u32* src, int srcpitch, u32 WriteMask); -extern void __fastcall FrameSwizzleBlock16A4_c(u16* dst, u32* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock32A4_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock32ZA4_c(u32* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock16A4_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -extern void __fastcall Frame16SwizzleBlock16ZA4_c(u16* dst, Vector_16F* src, int srcpitch, u32 WriteMask); -#endif - -extern void __fastcall SwizzleColumn32_c(int y, u8* dst, u8* src, int srcpitch, u32 WriteMask = 0xffffffff); -extern void __fastcall SwizzleColumn16_c(int y, u8* dst, u8* src, int srcpitch); -extern void __fastcall SwizzleColumn8_c(int y, u8* dst, u8* src, int srcpitch); -extern void __fastcall SwizzleColumn4_c(int y, u8* dst, u8* src, int srcpitch); - -// extern "C" void __fastcall WriteCLUT_T16_I8_CSM1_sse2(u32* vm, u32* clut); -extern "C" void __fastcall WriteCLUT_T16_I8_CSM1_sse2(u32* vm, u32 csa); -extern "C" void __fastcall WriteCLUT_T32_I8_CSM1_sse2(u32* vm, u32* clut); -// extern "C" void __fastcall WriteCLUT_T16_I4_CSM1_sse2(u32* vm, u32* clut); -extern "C" void __fastcall WriteCLUT_T16_I4_CSM1_sse2(u32* vm, u32 csa); -extern "C" void __fastcall WriteCLUT_T32_I4_CSM1_sse2(u32* vm, u32* clut); -extern void __fastcall WriteCLUT_T16_I8_CSM1_c(u32* vm, u32* clut); -extern void __fastcall WriteCLUT_T32_I8_CSM1_c(u32* vm, u32* clut); - -extern void __fastcall WriteCLUT_T16_I4_CSM1_c(u32* vm, u32* clut); -extern void __fastcall WriteCLUT_T32_I4_CSM1_c(u32* vm, u32* clut); - -extern void SSE2_UnswizzleZ16Target(u16* dst, u16* src, int iters); - -#ifdef ZEROGS_SSE2 - -#define FrameSwizzleBlock32 FrameSwizzleBlock32_c -#define FrameSwizzleBlock24 FrameSwizzleBlock24_c -#define FrameSwizzleBlock16 FrameSwizzleBlock16_c -#define Frame16SwizzleBlock32 Frame16SwizzleBlock32_c -#define Frame16SwizzleBlock32Z Frame16SwizzleBlock32Z_c -#define Frame16SwizzleBlock16 Frame16SwizzleBlock16_c -#define Frame16SwizzleBlock16Z Frame16SwizzleBlock16Z_c - -#define FrameSwizzleBlock32A2 FrameSwizzleBlock32A2_c -#define FrameSwizzleBlock24A2 FrameSwizzleBlock24A2_c -#define FrameSwizzleBlock16A2 FrameSwizzleBlock16A2_c -#define Frame16SwizzleBlock32A2 Frame16SwizzleBlock32A2_c -#define Frame16SwizzleBlock32ZA2 Frame16SwizzleBlock32ZA2_c -#define Frame16SwizzleBlock16A2 Frame16SwizzleBlock16A2_c -#define Frame16SwizzleBlock16ZA2 Frame16SwizzleBlock16ZA2_c - -#define FrameSwizzleBlock32A4 FrameSwizzleBlock32A4_c -#define FrameSwizzleBlock24A4 FrameSwizzleBlock24A4_c -#define FrameSwizzleBlock16A4 FrameSwizzleBlock16A4_c -#define Frame16SwizzleBlock32A4 Frame16SwizzleBlock32A4_c -#define Frame16SwizzleBlock32ZA4 Frame16SwizzleBlock32ZA4_c -#define Frame16SwizzleBlock16A4 Frame16SwizzleBlock16A4_c -#define Frame16SwizzleBlock16ZA4 Frame16SwizzleBlock16ZA4_c - -#define WriteCLUT_T16_I8_CSM1 WriteCLUT_T16_I8_CSM1_sse2 -#define WriteCLUT_T32_I8_CSM1 WriteCLUT_T32_I8_CSM1_sse2 -#define WriteCLUT_T16_I4_CSM1 WriteCLUT_T16_I4_CSM1_sse2 -#define WriteCLUT_T32_I4_CSM1 WriteCLUT_T32_I4_CSM1_sse2 - -#else - -#define FrameSwizzleBlock32 FrameSwizzleBlock32_c -#define FrameSwizzleBlock16 FrameSwizzleBlock16_c -#define Frame16SwizzleBlock32 Frame16SwizzleBlock32_c -#define Frame16SwizzleBlock32Z Frame16SwizzleBlock32Z_c -#define Frame16SwizzleBlock16 Frame16SwizzleBlock16_c -#define Frame16SwizzleBlock16Z Frame16SwizzleBlock16Z_c - -#define FrameSwizzleBlock32A2 FrameSwizzleBlock32A2_c -#define FrameSwizzleBlock16A2 FrameSwizzleBlock16A2_c -#define Frame16SwizzleBlock32A2 Frame16SwizzleBlock32A2_c -#define Frame16SwizzleBlock32ZA2 Frame16SwizzleBlock32ZA2_c -#define Frame16SwizzleBlock16A2 Frame16SwizzleBlock16A2_c -#define Frame16SwizzleBlock16ZA2 Frame16SwizzleBlock16ZA2_c - -#define FrameSwizzleBlock32A4 FrameSwizzleBlock32A4_c -#define FrameSwizzleBlock16A4 FrameSwizzleBlock16A4_c -#define Frame16SwizzleBlock32A4 Frame16SwizzleBlock32A4_c -#define Frame16SwizzleBlock32ZA4 Frame16SwizzleBlock32ZA4_c -#define Frame16SwizzleBlock16A4 Frame16SwizzleBlock16A4_c -#define Frame16SwizzleBlock16ZA4 Frame16SwizzleBlock16ZA4_c - -#define WriteCLUT_T16_I8_CSM1 WriteCLUT_T16_I8_CSM1_c -#define WriteCLUT_T32_I8_CSM1 WriteCLUT_T32_I8_CSM1_c -#define WriteCLUT_T16_I4_CSM1 WriteCLUT_T16_I4_CSM1_c -#define WriteCLUT_T32_I4_CSM1 WriteCLUT_T32_I4_CSM1_c - -#endif - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/zerogs.cpp b/plugins/zzogl-pg-cg/opengl/zerogs.cpp deleted file mode 100644 index 432d4ee84d..0000000000 --- a/plugins/zzogl-pg-cg/opengl/zerogs.cpp +++ /dev/null @@ -1,442 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -//-------------------------- Includes -#include "Util.h" -#include "zerogs.h" -#include "ZZoglVB.h" - -///////////////////// -// graphics resources - -bool s_bTexFlush = false; -int s_nLastResolveReset = 0; -int s_nResolveCounts[30] = {0}; // resolve counts for last 30 frames -int s_nNewWidth = -1, s_nNewHeight = -1; - -primInfo *prim; -//////////////////// -// State parameters -int g_nDepthUpdateCount = 0; - -static ZeroGSInit s_ZeroGSInit; - -// does one time only initializing/destruction - -void HandleGLError() -{ - FUNCLOG - // check the error status of this framebuffer */ - GLenum error = glCheckFramebufferStatusEXT(GL_FRAMEBUFFER_EXT); - - // if error != GL_FRAMEBUFFER_COMPLETE_EXT, there's an error of some sort - - if (error != 0) - { - int w = 0; - int h = 0; - GLint fmt; - glGetRenderbufferParameterivEXT(GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_INTERNAL_FORMAT_EXT, &fmt); - glGetRenderbufferParameterivEXT(GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_WIDTH_EXT, &w); - glGetRenderbufferParameterivEXT(GL_COLOR_ATTACHMENT0_EXT, GL_RENDERBUFFER_HEIGHT_EXT, &h); - - switch (error) - { - case GL_FRAMEBUFFER_COMPLETE_EXT: - break; - - case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT: - ZZLog::Error_Log("Error! missing a required image/buffer attachment!"); - break; - - case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT: - ZZLog::Error_Log("Error! has no images/buffers attached!"); - break; - -// case GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT: -// ZZLog::Error_Log("Error! has an image/buffer attached in multiple locations!"); -// break; - - case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT: - ZZLog::Error_Log("Error! has mismatched image/buffer dimensions!"); - break; - - case GL_FRAMEBUFFER_INCOMPLETE_FORMATS_EXT: - ZZLog::Error_Log("Error! colorbuffer attachments have different types!"); - break; - - case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT: - ZZLog::Error_Log("Error! trying to draw to non-attached color buffer!"); - break; - - case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT: - ZZLog::Error_Log("Error! trying to read from a non-attached color buffer!"); - break; - - case GL_FRAMEBUFFER_UNSUPPORTED_EXT: - ZZLog::Error_Log("Error! format is not supported by current graphics card/driver!"); - break; - - default: - ZZLog::Error_Log("*UNKNOWN ERROR* reported from glCheckFramebufferStatusEXT(0x%x)!", error); - break; - } - } -} - -void ZZGSStateReset() -{ - FUNCLOG - icurctx = -1; - - for (int i = 0; i < 2; ++i) - { - vb[i].Destroy(); - memset(&vb[i], 0, sizeof(VB)); - - vb[i].tex0.tw = 1; - vb[i].tex0.th = 1; - vb[i].scissor.x1 = 639; - vb[i].scissor.y1 = 479; - vb[i].tex0.tbw = 64; - vb[i].Init(VB_BUFFERSIZE); - } - - s_RangeMngr.Clear(); - - g_MemTargs.Destroy(); - s_RTs.Destroy(); - s_DepthRTs.Destroy(); - s_BitwiseTextures.Destroy(); - - vb[0].ictx = 0; - vb[1].ictx = 1; -} - -void SetDeviceSize(int nNewWidth, int nNewHeight) -{ - FUNCLOG - s_nNewWidth = nNewWidth; - s_nNewHeight = nNewHeight; - - if (!(conf.fullscreen())) - { - conf.width = nNewWidth; - conf.height = nNewHeight; - } -} - -void ChangeDeviceSize(int nNewWidth, int nNewHeight) -{ - FUNCLOG - - Size oldSize = GLWin.backbuffer; - - if (!ZZCreate(nNewWidth&~7, nNewHeight&~7)) - { - ZZLog::Error_Log("Failed to recreate, changing to old device."); - - if (!ZZCreate(oldSize.w, oldSize.h)) - { - SysMessage("Failed to create device, exiting..."); - exit(0); - } - } - - for (int i = 0; i < 2; ++i) - { - vb[i].bNeedFrameCheck = vb[i].bNeedZCheck = 1; - vb[i].CheckFrame(0); - } - - assert(vb[0].pBufferData != NULL && vb[1].pBufferData != NULL); -} - -void SetAA(int mode) -{ - FUNCLOG - float f = 1.0f; - - // need to flush all targets - s_RTs.ResolveAll(); - s_RTs.Destroy(); - s_DepthRTs.ResolveAll(); - s_DepthRTs.Destroy(); - - AA.x = AA.y = 0; // This is code for x0, x2, x4, x8 and x16 anti-aliasing. - - if (mode > 0) - { - // ( 1, 0 ) ; ( 1, 1 ) ; ( 2, 1 ) ; ( 2, 2 ) - // it's used as a binary shift, so x >> AA.x, y >> AA.y - AA.x = (mode + 1) / 2; - AA.y = mode / 2; - f = 2.0f; - } - - memset(s_nResolveCounts, 0, sizeof(s_nResolveCounts)); - s_nLastResolveReset = 0; - - vb[0].prndr = NULL; - vb[0].pdepth = NULL; - vb[1].prndr = NULL; - vb[1].pdepth = NULL; - - vb[0].bNeedFrameCheck = vb[0].bNeedZCheck = 1; - vb[1].bNeedFrameCheck = vb[1].bNeedZCheck = 1; - - glPointSize(f); -} - -//void RenderCustom(float fAlpha) -//{ -// FUNCLOG -// GL_REPORT_ERROR(); -// -// fAlpha = 1; -// glBindFramebufferEXT(GL_FRAMEBUFFER_EXT, 0); // switch to the backbuffer -// -// DisableAllgl() ; -// SetShaderCaller("RenderCustom"); -// -// glViewport(0, 0, GLWin.backbuffer.w, GLWin.backbuffer.h); -// -// // play custom animation -// glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); -// -// // tex coords -// float4 v = float4(1 / 32767.0f, 1 / 32767.0f, 0, 0); -// ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.sBitBltPos, v, "g_fBitBltPos"); -// v.x = (float)nLogoWidth; -// v.y = (float)nLogoHeight; -// ZZshSetParameter4fv(pvsBitBlt.prog, pvsBitBlt.sBitBltTex, v, "g_fBitBltTex"); -// -// v.x = v.y = v.z = v.w = fAlpha; -// ZZshSetParameter4fv(ppsBaseTexture.prog, ppsBaseTexture.sOneColor, v, "g_fOneColor"); -// -// if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_FILL); -// -// // inside vhDCb[0]'s target area, so render that region only -// ZZshGLSetTextureParameter(ppsBaseTexture.prog, ppsBaseTexture.sFinal, ptexLogo, "Logo"); -// glBindBuffer(GL_ARRAY_BUFFER, vboRect); -// -// SET_STREAM(); -// -// ZZshSetVertexShader(pvsBitBlt.prog); -// ZZshSetPixelShader(ppsBaseTexture.prog); -// DrawTriangleArray(); -// -// // restore -// if (conf.wireframe()) glPolygonMode(GL_FRONT_AND_BACK, GL_LINE); -// -// ProcessMessages(); -// -// GLWin.SwapGLBuffers(); -// -// glEnable(GL_SCISSOR_TEST); -// glEnable(GL_STENCIL_TEST); -// -// vb[0].bSyncVars = 0; -// vb[1].bSyncVars = 0; -// -// GL_REPORT_ERROR(); -//} - -////////////////////////// -// Internal Definitions // -////////////////////////// - -__forceinline void SetFogColor(float4 v) -{ - FUNCLOG - - SetShaderCaller("SetFogColor"); - ZZshSetParameter4fv(g_fparamFogColor, v, "g_fParamFogColor"); -} - -__forceinline void SetFogColor(u32 fog) -{ - FUNCLOG - - gs.fogcol = fog; - - FlushBoth(); - - float4 v; - - // set it immediately - v.SetColor(gs.fogcol); - SetFogColor(v); -} - -__forceinline void SetFogColor(GIFRegFOGCOL* fog) -{ - FUNCLOG - - float4 v; - - v.x = fog->FCR / 255.0f; - v.y = fog->FCG / 255.0f; - v.z = fog->FCB / 255.0f; - SetFogColor(v); -} - -void ExtWrite() -{ - FUNCLOG - ZZLog::Warn_Log("A hollow voice says 'EXTWRITE'! Nothing happens."); - - // use local DISPFB, EXTDATA, EXTBUF, and PMODE -// int bpp, start, end; -// tex0Info texframe; - -// bpp = 4; -// if( texframe.psm == PSMT16S ) bpp = 3; -// else if (PSMT_ISHALF(texframe.psm)) bpp = 2; -// -// // get the start and end addresses of the buffer -// GetRectMemAddress(start, end, texframe.psm, 0, 0, texframe.tw, texframe.th, texframe.tbp0, texframe.tbw); -} - -//////////// -// Caches // -//////////// - - -// case 0: return false; -// case 1: break; -// case 2: m_CBP[0] = TEX0.CBP; break; -// case 3: m_CBP[1] = TEX0.CBP; break; -// case 4: if(m_CBP[0] == TEX0.CBP) return false; m_CBP[0] = TEX0.CBP; break; -// case 5: if(m_CBP[1] == TEX0.CBP) return false; m_CBP[1] = TEX0.CBP; break; -// case 6: ASSERT(0); return false; // ffx2 menu -// case 7: ASSERT(0); return false; -// default: __assume(0); - -// cld state: -// 000 - clut data is not loaded; data in the temp buffer is stored -// 001 - clut data is always loaded. -// 010 - clut data is always loaded; cbp0 = cbp. -// 011 - clut data is always loadedl cbp1 = cbp. -// 100 - cbp0 is compared with cbp. if different, clut data is loaded. -// 101 - cbp1 is compared with cbp. if different, clut data is loaded. - -// GSdx sets cbp0 & cbp1 when checking for clut changes. ZeroGS sets them in texClutWrite. -bool CheckChangeInClut(u32 highdword, u32 psm) -{ - FUNCLOG - int cld = ZZOglGet_cld_TexBits(highdword); - int cbp = ZZOglGet_cbp_TexBits(highdword); - - // processing the CLUT after tex0/2 are written - //ZZLog::Error_Log("high == 0x%x; cld == %d", highdword, cld); - - switch (cld) - { - case 0: - return false; - - case 1: - break; - - case 2: - break; - - case 3: - break; - - case 4: - if (gs.cbp[0] == cbp) return false; - break; - - case 5: - if (gs.cbp[1] == cbp) return false; - break; - - default: - break; - } - - // Compare the cache with current memory - - // CSM2 is not supported - if (ZZOglGet_csm_TexBits(highdword)) - return true; - - int cpsm = ZZOglGet_cpsm_TexBits(highdword); - int csa = ZZOglGet_csa_TexBits(highdword); - int entries = PSMT_IS8CLUT(psm) ? 256 : 16; - - u8* GSMem = g_pbyGSMemory + cbp * 256; - - if (PSMT_IS32BIT(cpsm)) - return Cmp_ClutBuffer_GSMem((u32*)GSMem, csa, entries*4); - else { - // Mana Khemia triggers this. - //ZZLog::Error_Log("16 bit clut not supported."); - return Cmp_ClutBuffer_GSMem((u16*)GSMem, csa, entries*2); - } -} - -void texClutWrite(int ctx) -{ - FUNCLOG - s_bTexFlush = false; - - tex0Info& tex0 = vb[ctx].tex0; - - assert(PSMT_ISCLUT(tex0.psm)); - - // processing the CLUT after tex0/2 are written - switch (tex0.cld) - { - case 0: - return; - - case 1: - break; // tex0.cld is usually 1. - - case 2: - gs.cbp[0] = tex0.cbp; - break; - - case 3: - gs.cbp[1] = tex0.cbp; - break; - - case 4: - if (gs.cbp[0] == tex0.cbp) return; - gs.cbp[0] = tex0.cbp; - break; - - case 5: - if (gs.cbp[1] == tex0.cbp) return; - gs.cbp[1] = tex0.cbp; - break; - - default: //ZZLog::Debug_Log("cld isn't 0-5!"); - break; - } - - Flush(!ctx); - - // Write the memory to clut buffer - GSMem_to_ClutBuffer(tex0); -} - diff --git a/plugins/zzogl-pg-cg/opengl/zerogs.h b/plugins/zzogl-pg-cg/opengl/zerogs.h deleted file mode 100644 index b898d46829..0000000000 --- a/plugins/zzogl-pg-cg/opengl/zerogs.h +++ /dev/null @@ -1,86 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef __ZEROGS__H -#define __ZEROGS__H - -#ifdef _MSC_VER -#pragma warning(disable:4200) // nonstandard extension used : zero-sized array in struct/union -#endif - -// ----------------------------- Includes -#include "PS2Edefs.h" -// ------------------------ Variables ------------------------- - -////////////////////////// -// State parameters - -#if defined(_WIN32) -# include "Utilities/RedtapeWindows.h" -# include "resource.h" -#endif - -#include - -#include "GS.h" -#include "targets.h" -#include "GLWin.h" -#include "ZZoglShaders.h" -#include "ZZClut.h" -#include "HostMemory.h" - -typedef void (APIENTRYP _PFNSWAPINTERVAL)(int); - -PFNGLISRENDERBUFFEREXTPROC glIsRenderbufferEXT = NULL; -PFNGLBINDRENDERBUFFEREXTPROC glBindRenderbufferEXT = NULL; -PFNGLDELETERENDERBUFFERSEXTPROC glDeleteRenderbuffersEXT = NULL; -PFNGLGENRENDERBUFFERSEXTPROC glGenRenderbuffersEXT = NULL; -PFNGLRENDERBUFFERSTORAGEEXTPROC glRenderbufferStorageEXT = NULL; -PFNGLGETRENDERBUFFERPARAMETERIVEXTPROC glGetRenderbufferParameterivEXT = NULL; -PFNGLISFRAMEBUFFEREXTPROC glIsFramebufferEXT = NULL; -PFNGLBINDFRAMEBUFFEREXTPROC glBindFramebufferEXT = NULL; -PFNGLDELETEFRAMEBUFFERSEXTPROC glDeleteFramebuffersEXT = NULL; -PFNGLGENFRAMEBUFFERSEXTPROC glGenFramebuffersEXT = NULL; -PFNGLCHECKFRAMEBUFFERSTATUSEXTPROC glCheckFramebufferStatusEXT = NULL; -PFNGLFRAMEBUFFERTEXTURE1DEXTPROC glFramebufferTexture1DEXT = NULL; -PFNGLFRAMEBUFFERTEXTURE2DEXTPROC glFramebufferTexture2DEXT = NULL; -PFNGLFRAMEBUFFERTEXTURE3DEXTPROC glFramebufferTexture3DEXT = NULL; -PFNGLFRAMEBUFFERRENDERBUFFEREXTPROC glFramebufferRenderbufferEXT = NULL; -PFNGLGETFRAMEBUFFERATTACHMENTPARAMETERIVEXTPROC glGetFramebufferAttachmentParameterivEXT = NULL; -PFNGLGENERATEMIPMAPEXTPROC glGenerateMipmapEXT = NULL; -PFNGLDRAWBUFFERSPROC glDrawBuffers = NULL; - -#ifndef GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT -#define GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT 0x8CD8 -#endif - -bool ZZCreate(int width, int height); -void ZZGSStateReset(); - -// flush current vertices, call before setting new registers (the main render method) -void Flush(int context); -void FlushBoth(); - -//extern u32 ptexLogo; -//extern int nLogoWidth, nLogoHeight; -//extern GLuint vboRect; -//void ProcessMessages(); -//void RenderCustom(float fAlpha); // intro anim - -#endif diff --git a/plugins/zzogl-pg-cg/opengl/zpipe.cpp b/plugins/zzogl-pg-cg/opengl/zpipe.cpp deleted file mode 100644 index 45f80824d7..0000000000 --- a/plugins/zzogl-pg-cg/opengl/zpipe.cpp +++ /dev/null @@ -1,131 +0,0 @@ -/* The file is based of zpipe.c + minor rename and minor adaptation - * - * zpipe.c: example of proper use of zlib's inflate() and deflate() - * Not copyrighted -- provided to the public domain - * Version 1.4 11 December 2005 Mark Adler - */ - -#include - -#include -#include -#include - -//#define ZLIB_WINAPI -#include "zlib.h" - -int def(char *src, char *dst, int bytes_to_compress, int *bytes_after_compressed) -{ - z_stream strm; - - int ret; - unsigned have; - - /* allocate deflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - ret = deflateInit(&strm, Z_DEFAULT_COMPRESSION) ; - - if (ret != Z_OK) - return ret; - - /* compress */ - strm.avail_in = bytes_to_compress ; - strm.avail_out = bytes_to_compress ; - - strm.next_in = (Bytef *)src ; - strm.next_out = (Bytef *)dst ; - - ret = deflate(&strm, Z_FINISH) ; - - have = bytes_to_compress - strm.avail_out ; - - *bytes_after_compressed = have ; - - assert(ret == Z_STREAM_END); /* stream will be complete */ - - /* clean up and return */ - (void)deflateEnd(&strm); - - return Z_OK; -} - -int inf(char *src, char *dst, int bytes_to_decompress, int maximum_after_decompress, int* outbytes) -{ - z_stream strm; - - int ret; - - /* allocate inflate state */ - strm.zalloc = Z_NULL; - strm.zfree = Z_NULL; - strm.opaque = Z_NULL; - strm.avail_in = 0; - strm.next_in = Z_NULL; - ret = inflateInit(&strm); - - if (ret != Z_OK) return ret; - - /* decompress */ - strm.avail_in = bytes_to_decompress ; - strm.next_in = (Bytef *)src ; - strm.next_out = (Bytef *)dst ; - strm.avail_out = maximum_after_decompress ; - - ret = inflate(&strm, Z_NO_FLUSH) ; - - assert(ret != Z_STREAM_ERROR); /* state not clobbered */ - - switch (ret) - { - - case Z_NEED_DICT: - ret = Z_DATA_ERROR; /* and fall through */ - - case Z_DATA_ERROR: - - case Z_MEM_ERROR: - (void)inflateEnd(&strm); - return ret; - } - - assert(strm.avail_in == 0); /* all input will be used */ - - if (outbytes != NULL) *outbytes = strm.total_out; - - /* clean up and return */ - (void)inflateEnd(&strm); - - return ret == Z_STREAM_END ? Z_OK : Z_DATA_ERROR; -} - -/* report a zlib or i/o error */ -void zerr(int ret) -{ - fputs("zpipe: ", stderr); - - switch (ret) - { - - case Z_ERRNO: - if (ferror(stdin)) fputs("error reading stdin\n", stderr); - if (ferror(stdout)) fputs("error writing stdout\n", stderr); - break; - - case Z_STREAM_ERROR: - fputs("invalid compression level\n", stderr); - break; - - case Z_DATA_ERROR: - fputs("invalid or incomplete deflate data\n", stderr); - break; - - case Z_MEM_ERROR: - fputs("out of memory\n", stderr); - break; - - case Z_VERSION_ERROR: - fputs("zlib version mismatch!\n", stderr); - } -} diff --git a/plugins/zzogl-pg-cg/opengl/zpipe.h b/plugins/zzogl-pg-cg/opengl/zpipe.h deleted file mode 100644 index 6562c7b5d9..0000000000 --- a/plugins/zzogl-pg-cg/opengl/zpipe.h +++ /dev/null @@ -1,26 +0,0 @@ -/* ZZ Open GL graphics plugin - * Copyright (c)2009-2010 zeydlitz@gmail.com, arcum42@gmail.com - * Based on Zerofrog's ZeroGS KOSMOS (c)2005-2008 - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA - */ - -#ifndef zpipe_h -#define zpipe_h - -int def(char *src, char *dst, int bytes_to_compress, int *bytes_after_compressed) ; -int inf(char *src, char *dst, int bytes_to_decompress, int maximum_after_decompress, int* outbytes); - -#endif