summaryrefslogtreecommitdiff
path: root/Source/Core
diff options
context:
space:
mode:
authorXTra.KrazzY <XTra.KrazzY@gmail.com>2009-09-30 00:39:32 +0000
committerXTra.KrazzY <XTra.KrazzY@gmail.com>2009-09-30 00:39:32 +0000
commitaa1fd81e3756c4beecd762f8c8a2b28ebb59c747 (patch)
tree3d53b9024b8f220d2c7bbd001f91e1edb3e1e0dc /Source/Core
parentfb258e3ca5930d66b4c0dbb796731b9080cb9282 (diff)
OpenCL: A bit more work.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4347 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core')
-rw-r--r--Source/Core/VideoCommon/Src/OpenCL/TextureDecoder.cpp10
-rw-r--r--Source/Core/VideoCommon/Src/TextureDecoder.cpp4
2 files changed, 10 insertions, 4 deletions
diff --git a/Source/Core/VideoCommon/Src/OpenCL/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/OpenCL/TextureDecoder.cpp
index 933559bc3a..982b7eea66 100644
--- a/Source/Core/VideoCommon/Src/OpenCL/TextureDecoder.cpp
+++ b/Source/Core/VideoCommon/Src/OpenCL/TextureDecoder.cpp
@@ -58,6 +58,8 @@ sDecoders Decoders[] = { {NULL, NULL, &Kernel},
};
bool Inited = false;
+// TODO: Deinit (clRelease...)
+
bool Init_OpenCL()
{
int err; // error code returned from api calls
@@ -124,15 +126,19 @@ bool Init_OpenCL()
} */
}
-PC_TexFormat TexDecoder_Decode_real(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt)
+PC_TexFormat TexDecoder_Decode_OpenCL(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt)
{
if(!Inited)
{
// Not yet inited, let's init now
// Need to make a init function later
if(!Init_OpenCL())
- ;// Crap, seems we can't use OpenCL, should fallback on regular decoding
+ PanicAlert("OpenCL could not initialize successfully");
}
+
+ // clEnqueueNDRangeKernel
+
+
/*switch (texformat)
{
case GX_TF_C4:
diff --git a/Source/Core/VideoCommon/Src/TextureDecoder.cpp b/Source/Core/VideoCommon/Src/TextureDecoder.cpp
index eebb4c9f8d..ed15472433 100644
--- a/Source/Core/VideoCommon/Src/TextureDecoder.cpp
+++ b/Source/Core/VideoCommon/Src/TextureDecoder.cpp
@@ -21,7 +21,7 @@
#include "CPUDetect.h"
#include "TextureDecoder.h"
-#ifdef OPENCL
+#ifdef HAVE_OPENCL
#include "OpenCL/TextureDecoder.h"
#endif
@@ -581,7 +581,7 @@ void TexDecoder_SetTexFmtOverlayOptions(bool enable, bool center)
PC_TexFormat TexDecoder_Decode(u8 *dst, const u8 *src, int width, int height, int texformat, int tlutaddr, int tlutfmt)
{
- #ifdef OPENCL
+ #ifdef HAVE_OPENCL
PC_TexFormat retval = TexDecoder_Decode_OpenCL(dst, src, width, height, texformat, tlutaddr, tlutfmt);
#else
PC_TexFormat retval = TexDecoder_Decode_real(dst,src,width,height,texformat,tlutaddr,tlutfmt);