Added OpenCL texture decoding to RGBA usable by DX11 for formats RGB565, RGBA8, RGB5A3 and CMPR

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5765 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Orphis
2010-06-22 03:10:43 +00:00
parent c2e32371f6
commit 2cc5b98f07
3 changed files with 118 additions and 3 deletions

View File

@ -163,7 +163,9 @@ cl_kernel CompileKernel(cl_program program, const char *Function)
cl_kernel kernel = clCreateKernel(program, Function, &err);
if (!kernel || err != CL_SUCCESS)
{
HandleCLError(err, "Failed to create compute kernel!");
char buffer[1024];
sprintf(buffer, "Failed to create compute kernel '%s' !", Function);
HandleCLError(err, buffer);
return NULL;
}
NOTICE_LOG(COMMON, "OpenCL CompileKernel took %.3f seconds", (float)(Common::Timer::GetTimeMs() - compileStart) / 1000.0);

View File

@ -102,11 +102,11 @@ void TexDecoder_OpenCL_Initialize() {
g_program = OpenCL::CompileProgram(code.c_str());
int i = 0;
for(int i = 0; i < GX_TF_CMPR; ++i) {
for(int i = 0; i <= GX_TF_CMPR; ++i) {
if(g_DecodeParametersNative[i].name)
g_DecodeParametersNative[i].kernel = OpenCL::CompileKernel(g_program, g_DecodeParametersNative[i].name);
if(false && g_DecodeParametersRGBA[i].name)
if(g_DecodeParametersRGBA[i].name)
g_DecodeParametersRGBA[i].kernel = OpenCL::CompileKernel(g_program, g_DecodeParametersRGBA[i].name);
}