File tree Expand file tree Collapse file tree 1 file changed +9
-4
lines changed
07_StagingAndMultipleQueues Expand file tree Collapse file tree 1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -104,6 +104,10 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
104
104
105
105
void loadImages ()
106
106
{
107
+ const core::set<uint32_t > uniqueFamilyIndices = { getTransferUpQueue ()->getFamilyIndex (), getComputeQueue ()->getFamilyIndex () };
108
+ const std::vector<uint32_t > familyIndices (uniqueFamilyIndices.begin (),uniqueFamilyIndices.end ());
109
+ const bool multipleQueueFamilies = familyIndices.size ()>1 ;
110
+
107
111
IAssetLoader::SAssetLoadParams lp;
108
112
lp.logger = m_logger.get ();
109
113
@@ -161,10 +165,11 @@ class StagingAndMultipleQueuesApp final : public application_templates::BasicMul
161
165
imgParams.arrayLayers = 1u ;
162
166
imgParams.samples = IImage::E_SAMPLE_COUNT_FLAGS::ESCF_1_BIT;
163
167
imgParams.usage = asset::IImage::EUF_TRANSFER_DST_BIT | asset::IImage::EUF_SAMPLED_BIT;
164
- // constexpr uint32_t FAMILY_INDICES_CNT = 3; // TODO: test on intel integrated GPU (which allows only one queue family)
165
- std::array familyIndices = { getTransferUpQueue ()->getFamilyIndex (), getComputeQueue ()->getFamilyIndex () };
166
- imgParams.queueFamilyIndexCount = familyIndices.size ();
167
- imgParams.queueFamilyIndices = familyIndices.data ();
168
+ if (multipleQueueFamilies)
169
+ {
170
+ imgParams.queueFamilyIndexCount = familyIndices.size ();
171
+ imgParams.queueFamilyIndices = familyIndices.data ();
172
+ }
168
173
imgParams.preinitialized = false ;
169
174
170
175
images[imageIdx] = m_device->createImage (std::move (imgParams));
You can’t perform that action at this time.
0 commit comments