Refactor: code where neither Vulkan/OpenCL is used
This commit is contained in:
parent
bc02b924e2
commit
a7dc666082
1 changed files with 5 additions and 13 deletions
|
@ -70,9 +70,6 @@ QueueFamilyIndices find_queue_families(VkPhysicalDevice device) {
|
||||||
|
|
||||||
image::Bl dither::blue_noise(int width, int height, int threads,
|
image::Bl dither::blue_noise(int width, int height, int threads,
|
||||||
bool use_opencl, bool use_vulkan) {
|
bool use_opencl, bool use_vulkan) {
|
||||||
bool using_opencl = false;
|
|
||||||
bool using_vulkan = false;
|
|
||||||
|
|
||||||
#if DITHERING_VULKAN_ENABLED == 1
|
#if DITHERING_VULKAN_ENABLED == 1
|
||||||
if (use_vulkan) {
|
if (use_vulkan) {
|
||||||
// Try to use Vulkan.
|
// Try to use Vulkan.
|
||||||
|
@ -525,16 +522,11 @@ ENDOF_VULKAN:
|
||||||
std::clog << "WARNING: Not compiled with OpenCL support!\n";
|
std::clog << "WARNING: Not compiled with OpenCL support!\n";
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (!using_opencl) {
|
std::cout << "Vulkan/OpenCL: Failed to setup/use or is not enabled, using "
|
||||||
std::cout << "OpenCL: Failed to setup/use or is not enabled, using "
|
"regular impl..."
|
||||||
"regular impl..."
|
<< std::endl;
|
||||||
<< std::endl;
|
return internal::rangeToBl(internal::blue_noise_impl(width, height, threads),
|
||||||
return internal::rangeToBl(
|
width);
|
||||||
internal::blue_noise_impl(width, height, threads), width);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::cout << "ERROR: Invalid state (end of blue_noise fn)\n";
|
|
||||||
return {};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<unsigned int> dither::internal::blue_noise_impl(int width,
|
std::vector<unsigned int> dither::internal::blue_noise_impl(int width,
|
||||||
|
|
Loading…
Reference in a new issue