Skip to content

Commit

Permalink
GPU: Don't apply OCL compile flags when reading SPIR-V IL code
Browse files Browse the repository at this point in the history
  • Loading branch information
davidrohr committed Oct 25, 2023
1 parent bc2e06c commit bfa572a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion GPU/GPUTracking/Base/opencl-common/GPUReconstructionOCL.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,12 @@ int GPUReconstructionOCL::InitDevice_Runtime()
if (mProcessingSettings.debugLevel >= 2) {
GPUInfo("Available Platform %d: (%s %s) %s %s", i_platform, platform_profile, platform_version, platform_vendor, platform_name);
}
if (CheckPlatform(i_platform)) {
if (!found && CheckPlatform(i_platform)) {
found = true;
mInternals->platform = mInternals->platforms[i_platform];
if (mProcessingSettings.debugLevel >= 2) {
GPUInfo(" Using this platform");
}
}
}
}
Expand Down
3 changes: 2 additions & 1 deletion GPU/GPUTracking/Base/opencl2/GPUReconstructionOCL2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ int GPUReconstructionOCL2Backend::GetOCLPrograms()
#ifdef OPENCL2_ENABLED_SPIRV // clang-format off
if (ver >= 2.2) {
mInternals->program = clCreateProgramWithIL(mInternals->context, _binary_GPUReconstructionOCL2Code_spirv_start, _binary_GPUReconstructionOCL2Code_spirv_len, &ocl_error);
#undef OCL_FLAGS
#define OCL_FLAGS
} else
#endif // clang-format on

{
size_t program_sizes[1] = {_binary_GPUReconstructionOCL2Code_src_len};
char* programs_sources[1] = {_binary_GPUReconstructionOCL2Code_src_start};
Expand Down

0 comments on commit bfa572a

Please sign in to comment.