mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
Cached the compiled OpenCL kernels to disk (User/OpenCL/kernel.bin). This reduces the start up delay in OpenCL mode. Added a 10 byte header to the file which contains the current svn rev string. This will recompile the OpenCL kernels with every new revision.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6608 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -150,10 +150,10 @@ cl_program CompileProgram(const char *Kernel)
|
||||
cl_program program;
|
||||
program = clCreateProgramWithSource(OpenCL::g_context, 1,
|
||||
(const char **) & Kernel, NULL, &err);
|
||||
|
||||
if (!program)
|
||||
{
|
||||
HandleCLError(err, "Error: Failed to create compute program!");
|
||||
return NULL;
|
||||
}
|
||||
|
||||
// Build the program executable
|
||||
@ -181,7 +181,7 @@ cl_program CompileProgram(const char *Kernel)
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NOTICE_LOG(COMMON, "OpenCL CompileProgram took %.3f seconds",
|
||||
INFO_LOG(COMMON, "OpenCL CompileProgram took %.3f seconds",
|
||||
(float)(Common::Timer::GetTimeMs() - compileStart) / 1000.0);
|
||||
return program;
|
||||
}
|
||||
@ -200,7 +200,7 @@ cl_kernel CompileKernel(cl_program program, const char *Function)
|
||||
HandleCLError(err, buffer);
|
||||
return NULL;
|
||||
}
|
||||
NOTICE_LOG(COMMON, "OpenCL CompileKernel took %.3f seconds",
|
||||
INFO_LOG(COMMON, "OpenCL CompileKernel took %.3f seconds",
|
||||
(float)(Common::Timer::GetTimeMs() - compileStart) / 1000.0);
|
||||
return kernel;
|
||||
}
|
||||
|
Reference in New Issue
Block a user