From 69473b5dae8187154fa366cac67ef6cb36551735 Mon Sep 17 00:00:00 2001 From: asuessenbach Date: Wed, 23 Oct 2024 18:32:12 +0200 Subject: [PATCH] Make subgroups enabled work --- .../subgroups_operations/subgroups_operations.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/samples/extensions/subgroups_operations/subgroups_operations.cpp b/samples/extensions/subgroups_operations/subgroups_operations.cpp index 4a683a70..85cdbb70 100644 --- a/samples/extensions/subgroups_operations/subgroups_operations.cpp +++ b/samples/extensions/subgroups_operations/subgroups_operations.cpp @@ -1559,12 +1559,6 @@ void SubgroupsOperations::create_fft() VK_CHECK(vkCreateComputePipelines(get_device().get_handle(), pipeline_cache, 1u, &computeInfo, nullptr, &fft.pipelines.horizontal.pipeline)); -#ifdef DEBUG_SUBGROUPS_SWITCH_ENABLE - computeInfo.stage = load_shader("subgroups_operations/fft_subgroups_off.comp", VK_SHADER_STAGE_COMPUTE_BIT); - VK_CHECK(vkCreateComputePipelines(get_device().get_handle(), pipeline_cache, 1u, &computeInfo, nullptr, &fft.pipelines.horizontal_subgroups_off.pipeline)); - computeInfo.stage = load_shader("subgroups_operations/fft.comp", VK_SHADER_STAGE_COMPUTE_BIT); -#endif - direction = 1u; computeInfo.layout = fft.pipelines.vertical.pipeline_layout; @@ -1572,6 +1566,15 @@ void SubgroupsOperations::create_fft() #ifdef DEBUG_SUBGROUPS_SWITCH_ENABLE computeInfo.stage = load_shader("subgroups_operations/fft_subgroups_off.comp", VK_SHADER_STAGE_COMPUTE_BIT); + + direction = 0u; + computeInfo.layout = fft.pipelines.horizontal.pipeline_layout; + + VK_CHECK(vkCreateComputePipelines(get_device().get_handle(), pipeline_cache, 1u, &computeInfo, nullptr, &fft.pipelines.horizontal_subgroups_off.pipeline)); + + direction = 1u; + computeInfo.layout = fft.pipelines.vertical.pipeline_layout; + VK_CHECK(vkCreateComputePipelines(get_device().get_handle(), pipeline_cache, 1u, &computeInfo, nullptr, &fft.pipelines.vertical_subgroups_off.pipeline)); #endif -- 2.43.0.windows.1