forked from baldurk/renderdoc
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvk_manager.cpp
More file actions
602 lines (510 loc) · 23.6 KB
/
vk_manager.cpp
File metadata and controls
602 lines (510 loc) · 23.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
/******************************************************************************
* The MIT License (MIT)
*
* Copyright (c) 2015-2017 Baldur Karlsson
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
******************************************************************************/
#include "vk_manager.h"
#include "vk_core.h"
template <>
void Serialiser::Serialise(const char *name, ImageRegionState &el)
{
ScopedContext scope(this, name, "ImageRegionState", 0, true);
Serialise("range", el.subresourceRange);
Serialise("prevstate", el.oldLayout);
Serialise("state", el.newLayout);
}
bool VulkanResourceManager::SerialisableResource(ResourceId id, VkResourceRecord *record)
{
if(record->SpecialResource || id == m_Core->GetContextResourceID())
return false;
return true;
}
// debugging logging for barriers
#if 0
#define TRDBG(...) RDCLOG(__VA_ARGS__)
#else
#define TRDBG(...)
#endif
template <typename SrcBarrierType>
void VulkanResourceManager::RecordSingleBarrier(vector<pair<ResourceId, ImageRegionState> > &dststates,
ResourceId id, const SrcBarrierType &t,
uint32_t nummips, uint32_t numslices)
{
bool done = false;
auto it = dststates.begin();
for(; it != dststates.end(); ++it)
{
// image barriers are handled by initially inserting one subresource range for each aspect,
// and whenever we need more fine-grained detail we split it immediately for one range for
// each subresource in that aspect. Thereafter if a barrier comes in that covers multiple
// subresources, we update all matching ranges.
// find the states matching this id
if(it->first < id)
continue;
if(it->first != id)
break;
{
// we've found a range that completely matches our region, doesn't matter if that's
// a whole image and the barrier is the whole image, or it's one subresource.
// note that for images with only one array/mip slice (e.g. render targets) we'll never
// really have to worry about the else{} branch
if(it->second.subresourceRange.baseMipLevel == t.subresourceRange.baseMipLevel &&
it->second.subresourceRange.levelCount == nummips &&
it->second.subresourceRange.baseArrayLayer == t.subresourceRange.baseArrayLayer &&
it->second.subresourceRange.layerCount == numslices)
{
// verify
// RDCASSERT(it->second.newLayout == t.oldLayout);
// apply it (prevstate is from the start of all barriers accumulated, so only set once)
if(it->second.oldLayout == UNKNOWN_PREV_IMG_LAYOUT)
it->second.oldLayout = t.oldLayout;
it->second.newLayout = t.newLayout;
done = true;
break;
}
else
{
// this handles the case where the barrier covers a number of subresources and we need
// to update each matching subresource. If the barrier was only one mip & array slice
// it would have hit the case above. Find each subresource within the range, update it,
// and continue (marking as done so whenever we stop finding matching ranges, we are
// satisfied.
//
// note that regardless of how we lay out our subresources (slice-major or mip-major) the
// new
// range could be sparse, but that's OK as we only break out of the loop once we go past the
// whole
// aspect. Any subresources that don't match the range, after the split, will fail to meet
// any
// of the handled cases, so we'll just continue processing.
if(it->second.subresourceRange.levelCount == 1 &&
it->second.subresourceRange.layerCount == 1 &&
it->second.subresourceRange.baseMipLevel >= t.subresourceRange.baseMipLevel &&
it->second.subresourceRange.baseMipLevel < t.subresourceRange.baseMipLevel + nummips &&
it->second.subresourceRange.baseArrayLayer >= t.subresourceRange.baseArrayLayer &&
it->second.subresourceRange.baseArrayLayer < t.subresourceRange.baseArrayLayer + numslices)
{
// apply it (prevstate is from the start of all barriers accumulated, so only set once)
if(it->second.oldLayout == UNKNOWN_PREV_IMG_LAYOUT)
it->second.oldLayout = t.oldLayout;
it->second.newLayout = t.newLayout;
// continue as there might be more, but we're done
done = true;
continue;
}
// finally handle the case where we have a range that covers a whole image but we need to
// split it. If the barrier covered the whole image too it would have hit the very first
// case, so we know that the barrier doesn't cover the whole range.
// Also, if we've already done the split this case won't be hit and we'll either fall into
// the case above, or we'll finish as we've covered the whole barrier.
else if(it->second.subresourceRange.levelCount > 1 ||
it->second.subresourceRange.layerCount > 1)
{
pair<ResourceId, ImageRegionState> existing = *it;
// remember where we were in the array, as after this iterators will be
// invalidated.
size_t offs = it - dststates.begin();
size_t count =
it->second.subresourceRange.levelCount * it->second.subresourceRange.layerCount;
// only insert count-1 as we want count entries total - one per subresource
dststates.insert(it, count - 1, existing);
// it now points at the first subresource, but we need to modify the ranges
// to be valid
it = dststates.begin() + offs;
for(size_t i = 0; i < count; i++)
{
it->second.subresourceRange.levelCount = 1;
it->second.subresourceRange.layerCount = 1;
// slice-major
it->second.subresourceRange.baseArrayLayer =
uint32_t(i / existing.second.subresourceRange.levelCount);
it->second.subresourceRange.baseMipLevel =
uint32_t(i % existing.second.subresourceRange.levelCount);
it++;
}
// reset the iterator to point to the first subresource
it = dststates.begin() + offs;
// the loop will continue after this point and look at the next subresources
// so we need to check to see if the first subresource lies in the range here
if(it->second.subresourceRange.baseMipLevel >= t.subresourceRange.baseMipLevel &&
it->second.subresourceRange.baseMipLevel < t.subresourceRange.baseMipLevel + nummips &&
it->second.subresourceRange.baseArrayLayer >= t.subresourceRange.baseArrayLayer &&
it->second.subresourceRange.baseArrayLayer <
t.subresourceRange.baseArrayLayer + numslices)
{
// apply it (prevstate is from the start of all barriers accumulated, so only set once)
if(it->second.oldLayout == UNKNOWN_PREV_IMG_LAYOUT)
it->second.oldLayout = t.oldLayout;
it->second.newLayout = t.newLayout;
// continue as there might be more, but we're done
done = true;
}
// continue processing from here
continue;
}
}
}
// otherwise continue to try and find the subresource range
}
if(done)
return;
// we don't have an existing barrier for this memory region, insert into place. it points to
// where it should be inserted
VkImageSubresourceRange subRange = t.subresourceRange;
subRange.levelCount = nummips;
subRange.layerCount = numslices;
dststates.insert(it, std::make_pair(id, ImageRegionState(subRange, t.oldLayout, t.newLayout)));
}
void VulkanResourceManager::RecordBarriers(vector<pair<ResourceId, ImageRegionState> > &states,
const map<ResourceId, ImageLayouts> &layouts,
uint32_t numBarriers, const VkImageMemoryBarrier *barriers)
{
TRDBG("Recording %u barriers", numBarriers);
for(uint32_t ti = 0; ti < numBarriers; ti++)
{
const VkImageMemoryBarrier &t = barriers[ti];
ResourceId id = m_State < WRITING ? GetNonDispWrapper(t.image)->id : GetResID(t.image);
if(id == ResourceId())
{
RDCERR("Couldn't get ID for image %p in barrier", t.image);
continue;
}
uint32_t nummips = t.subresourceRange.levelCount;
uint32_t numslices = t.subresourceRange.layerCount;
auto it = layouts.find(id);
if(nummips == VK_REMAINING_MIP_LEVELS)
{
if(it != layouts.end())
nummips = it->second.levelCount - t.subresourceRange.baseMipLevel;
else
nummips = 1;
}
if(numslices == VK_REMAINING_ARRAY_LAYERS)
{
if(it != layouts.end())
numslices = it->second.layerCount - t.subresourceRange.baseArrayLayer;
else
numslices = 1;
}
RecordSingleBarrier(states, id, t, nummips, numslices);
}
TRDBG("Post-record, there are %u states", (uint32_t)states.size());
}
void VulkanResourceManager::MergeBarriers(vector<pair<ResourceId, ImageRegionState> > &dststates,
vector<pair<ResourceId, ImageRegionState> > &srcstates)
{
TRDBG("Merging %u states", (uint32_t)srcstates.size());
for(size_t ti = 0; ti < srcstates.size(); ti++)
{
const ImageRegionState &t = srcstates[ti].second;
RecordSingleBarrier(dststates, srcstates[ti].first, t, t.subresourceRange.levelCount,
t.subresourceRange.layerCount);
}
TRDBG("Post-merge, there are %u states", (uint32_t)dststates.size());
}
void VulkanResourceManager::SerialiseImageStates(map<ResourceId, ImageLayouts> &states,
vector<VkImageMemoryBarrier> &barriers)
{
Serialiser *localSerialiser = m_pSerialiser;
SERIALISE_ELEMENT(uint32_t, NumMems, (uint32_t)states.size());
auto srcit = states.begin();
vector<pair<ResourceId, ImageRegionState> > vec;
for(uint32_t i = 0; i < NumMems; i++)
{
SERIALISE_ELEMENT(ResourceId, id, srcit->first);
SERIALISE_ELEMENT(uint32_t, NumStates, (uint32_t)srcit->second.subresourceStates.size());
ResourceId liveid;
if(m_State < WRITING && HasLiveResource(id))
liveid = GetLiveID(id);
for(uint32_t m = 0; m < NumStates; m++)
{
SERIALISE_ELEMENT(ImageRegionState, state, srcit->second.subresourceStates[m]);
if(m_State < WRITING && liveid != ResourceId() && srcit != states.end())
{
VkImageMemoryBarrier t;
t.sType = VK_STRUCTURE_TYPE_IMAGE_MEMORY_BARRIER;
t.pNext = NULL;
// these access masks aren't used, we need to apply a global memory barrier
// to memory each time we restart log replaying. These barriers are just
// to get images into the right layout
t.srcAccessMask = 0;
t.dstAccessMask = 0;
// MULTIDEVICE need to handle multiple queues
t.srcQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
t.dstQueueFamilyIndex = VK_QUEUE_FAMILY_IGNORED;
t.image = Unwrap(GetCurrentHandle<VkImage>(liveid));
t.oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
ReplacePresentableImageLayout(state.newLayout);
t.newLayout = state.newLayout;
t.subresourceRange = state.subresourceRange;
barriers.push_back(t);
vec.push_back(std::make_pair(liveid, state));
}
}
if(m_State >= WRITING)
srcit++;
}
ApplyBarriers(vec, states);
for(size_t i = 0; i < vec.size(); i++)
barriers[i].oldLayout = vec[i].second.oldLayout;
// erase any do-nothing barriers
for(auto it = barriers.begin(); it != barriers.end();)
{
if(it->oldLayout == UNKNOWN_PREV_IMG_LAYOUT)
it->oldLayout = VK_IMAGE_LAYOUT_UNDEFINED;
if(it->oldLayout == it->newLayout)
it = barriers.erase(it);
else
++it;
}
// try to merge images that have been split up by subresource but are now all in the same state
// again.
for(auto it = states.begin(); it != states.end(); ++it)
{
ImageLayouts &layouts = it->second;
if(layouts.subresourceStates.size() > 1 &&
layouts.subresourceStates.size() == size_t(layouts.layerCount * layouts.levelCount))
{
VkImageLayout layout = layouts.subresourceStates[0].newLayout;
bool allIdentical = true;
for(size_t i = 0; i < layouts.subresourceStates.size(); i++)
{
if(layouts.subresourceStates[i].newLayout != layout)
{
allIdentical = false;
break;
}
}
if(allIdentical)
{
layouts.subresourceStates.erase(layouts.subresourceStates.begin() + 1,
layouts.subresourceStates.end());
layouts.subresourceStates[0].subresourceRange.baseArrayLayer = 0;
layouts.subresourceStates[0].subresourceRange.baseMipLevel = 0;
layouts.subresourceStates[0].subresourceRange.layerCount = layouts.layerCount;
layouts.subresourceStates[0].subresourceRange.levelCount = layouts.levelCount;
}
}
}
}
void VulkanResourceManager::MarkSparseMapReferenced(SparseMapping *sparse)
{
if(sparse == NULL)
{
RDCERR("Unexpected NULL sparse mapping");
return;
}
for(size_t i = 0; i < sparse->opaquemappings.size(); i++)
MarkResourceFrameReferenced(GetResID(sparse->opaquemappings[i].memory), eFrameRef_Read);
for(int a = 0; a < NUM_VK_IMAGE_ASPECTS; a++)
for(VkDeviceSize i = 0;
sparse->pages[a] &&
i < VkDeviceSize(sparse->imgdim.width * sparse->imgdim.height * sparse->imgdim.depth);
i++)
MarkResourceFrameReferenced(GetResID(sparse->pages[a][i].first), eFrameRef_Read);
}
void VulkanResourceManager::ApplyBarriers(vector<pair<ResourceId, ImageRegionState> > &states,
map<ResourceId, ImageLayouts> &layouts)
{
TRDBG("Applying %u barriers", (uint32_t)states.size());
for(size_t ti = 0; ti < states.size(); ti++)
{
ResourceId id = states[ti].first;
ImageRegionState &t = states[ti].second;
TRDBG("Applying barrier to %llu", GetOriginalID(id));
auto stit = layouts.find(id);
if(stit == layouts.end())
{
TRDBG("Didn't find ID in image layouts");
continue;
}
uint32_t nummips = t.subresourceRange.levelCount;
uint32_t numslices = t.subresourceRange.layerCount;
if(nummips == VK_REMAINING_MIP_LEVELS)
nummips = layouts[id].levelCount;
if(numslices == VK_REMAINING_ARRAY_LAYERS)
numslices = layouts[id].layerCount;
if(nummips == 0)
nummips = 1;
if(numslices == 0)
numslices = 1;
if(t.oldLayout == t.newLayout)
continue;
TRDBG("Barrier of %s (%u->%u, %u->%u) from %s to %s",
ToStr::Get(t.subresourceRange.aspect).c_str(), t.subresourceRange.baseMipLevel,
t.subresourceRange.levelCount, t.subresourceRange.baseArrayLayer,
t.subresourceRange.layerCount, ToStr::Get(t.oldLayout).c_str(),
ToStr::Get(t.newLayout).c_str());
bool done = false;
TRDBG("Matching image has %u subresource states", stit->second.subresourceStates.size());
auto it = stit->second.subresourceStates.begin();
for(; it != stit->second.subresourceStates.end(); ++it)
{
TRDBG(".. state %s (%u->%u, %u->%u) from %s to %s",
ToStr::Get(it->subresourceRange.aspect).c_str(), it->range.baseMipLevel,
it->range.levelCount, it->range.baseArrayLayer, it->range.layerCount,
ToStr::Get(it->oldLayout).c_str(), ToStr::Get(it->newLayout).c_str());
// image barriers are handled by initially inserting one subresource range for the whole
// object,
// and whenever we need more fine-grained detail we split it immediately.
// Thereafter if a barrier comes in that covers multiple subresources, we update all matching
// ranges.
// NOTE: Depth-stencil images must always be trasnsitioned together for both aspects, so we
// don't
// have to worry about different aspects being in different states and can in fact ignore the
// aspect
// for the purpose of this case.
{
// we've found a range that completely matches our region, doesn't matter if that's
// a whole image and the barrier is the whole image, or it's one subresource.
// note that for images with only one array/mip slice (e.g. render targets) we'll never
// really have to worry about the else{} branch
if(it->subresourceRange.baseMipLevel == t.subresourceRange.baseMipLevel &&
it->subresourceRange.levelCount == nummips &&
it->subresourceRange.baseArrayLayer == t.subresourceRange.baseArrayLayer &&
it->subresourceRange.layerCount == numslices)
{
/*
RDCASSERT(t.oldLayout == UNKNOWN_PREV_IMG_LAYOUT || it->newLayout ==
UNKNOWN_PREV_IMG_LAYOUT || // renderdoc untracked/ignored
it->newLayout == t.oldLayout || // valid barrier
t.oldLayout == VK_IMAGE_LAYOUT_UNDEFINED); // can barrier from UNDEFINED to any
state
*/
if(it->oldLayout == UNKNOWN_PREV_IMG_LAYOUT)
it->oldLayout = t.oldLayout;
t.oldLayout = it->newLayout;
it->newLayout = t.newLayout;
done = true;
break;
}
else
{
// this handles the case where the barrier covers a number of subresources and we need
// to update each matching subresource. If the barrier was only one mip & array slice
// it would have hit the case above. Find each subresource within the range, update it,
// and continue (marking as done so whenever we stop finding matching ranges, we are
// satisfied.
//
// note that regardless of how we lay out our subresources (slice-major or mip-major) the
// new
// range could be sparse, but that's OK as we only break out of the loop once we go past
// the whole
// aspect. Any subresources that don't match the range, after the split, will fail to meet
// any
// of the handled cases, so we'll just continue processing.
if(it->subresourceRange.levelCount == 1 && it->subresourceRange.layerCount == 1 &&
it->subresourceRange.baseMipLevel >= t.subresourceRange.baseMipLevel &&
it->subresourceRange.baseMipLevel < t.subresourceRange.baseMipLevel + nummips &&
it->subresourceRange.baseArrayLayer >= t.subresourceRange.baseArrayLayer &&
it->subresourceRange.baseArrayLayer < t.subresourceRange.baseArrayLayer + numslices)
{
// apply it (prevstate is from the start of all barriers accumulated, so only set once)
if(it->oldLayout == UNKNOWN_PREV_IMG_LAYOUT)
it->oldLayout = t.oldLayout;
it->newLayout = t.newLayout;
// continue as there might be more, but we're done
done = true;
continue;
}
// finally handle the case where we have a range that covers a whole image but we need to
// split it. If the barrier covered the whole image too it would have hit the very first
// case, so we know that the barrier doesn't cover the whole range.
// Also, if we've already done the split this case won't be hit and we'll either fall into
// the case above, or we'll finish as we've covered the whole barrier.
else if(it->subresourceRange.levelCount > 1 || it->subresourceRange.layerCount > 1)
{
ImageRegionState existing = *it;
// remember where we were in the array, as after this iterators will be
// invalidated.
size_t offs = it - stit->second.subresourceStates.begin();
size_t count = it->subresourceRange.levelCount * it->subresourceRange.layerCount;
// only insert count-1 as we want count entries total - one per subresource
stit->second.subresourceStates.insert(it, count - 1, existing);
// it now points at the first subresource, but we need to modify the ranges
// to be valid
it = stit->second.subresourceStates.begin() + offs;
for(size_t i = 0; i < count; i++)
{
it->subresourceRange.levelCount = 1;
it->subresourceRange.layerCount = 1;
// slice-major
it->subresourceRange.baseArrayLayer =
uint32_t(i / existing.subresourceRange.levelCount);
it->subresourceRange.baseMipLevel = uint32_t(i % existing.subresourceRange.levelCount);
it++;
}
// reset the iterator to point to the first subresource
it = stit->second.subresourceStates.begin() + offs;
// the loop will continue after this point and look at the next subresources
// so we need to check to see if the first subresource lies in the range here
if(it->subresourceRange.baseMipLevel >= t.subresourceRange.baseMipLevel &&
it->subresourceRange.baseMipLevel < t.subresourceRange.baseMipLevel + nummips &&
it->subresourceRange.baseArrayLayer >= t.subresourceRange.baseArrayLayer &&
it->subresourceRange.baseArrayLayer < t.subresourceRange.baseArrayLayer + numslices)
{
// apply it (prevstate is from the start of all barriers accumulated, so only set
// once)
if(it->oldLayout == UNKNOWN_PREV_IMG_LAYOUT)
it->oldLayout = t.oldLayout;
it->newLayout = t.newLayout;
// continue as there might be more, but we're done
done = true;
}
// continue processing from here
continue;
}
}
}
// otherwise continue to try and find the subresource range
}
if(!done)
RDCERR("Couldn't find subresource range to apply barrier to - invalid!");
}
}
bool VulkanResourceManager::Force_InitialState(WrappedVkRes *res, bool prepare)
{
return false;
}
bool VulkanResourceManager::Need_InitialStateChunk(WrappedVkRes *res)
{
return true;
}
bool VulkanResourceManager::Prepare_InitialState(WrappedVkRes *res)
{
return m_Core->Prepare_InitialState(res);
}
bool VulkanResourceManager::Serialise_InitialState(ResourceId resid, WrappedVkRes *res)
{
return m_Core->Serialise_InitialState(resid, res);
}
void VulkanResourceManager::Create_InitialState(ResourceId id, WrappedVkRes *live, bool hasData)
{
return m_Core->Create_InitialState(id, live, hasData);
}
void VulkanResourceManager::Apply_InitialState(WrappedVkRes *live, InitialContentData initial)
{
return m_Core->Apply_InitialState(live, initial);
}
bool VulkanResourceManager::ResourceTypeRelease(WrappedVkRes *res)
{
return m_Core->ReleaseResource(res);
}