Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/GPU/Vulkan/GPU_Vulkan.cpp
3186 views
1
2
// Copyright (c) 2015- PPSSPP Project.
3
4
// This program is free software: you can redistribute it and/or modify
5
// it under the terms of the GNU General Public License as published by
6
// the Free Software Foundation, version 2.0 or later versions.
7
8
// This program is distributed in the hope that it will be useful,
9
// but WITHOUT ANY WARRANTY; without even the implied warranty of
10
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
// GNU General Public License 2.0 for more details.
12
13
// A copy of the GPL 2.0 should have been included with the program.
14
// If not, see http://www.gnu.org/licenses/
15
16
// Official git repository and contact information can be found at
17
// https://github.com/hrydgard/ppsspp and http://www.ppsspp.org/.
18
19
#include <thread>
20
21
#include "Common/Profiler/Profiler.h"
22
23
#include "Common/Log.h"
24
#include "Common/TimeUtil.h"
25
#include "Common/File/FileUtil.h"
26
#include "Common/GraphicsContext.h"
27
28
#include "Core/Config.h"
29
#include "Core/Reporting.h"
30
#include "Core/System.h"
31
#include "Core/ELF/ParamSFO.h"
32
33
#include "GPU/GPUState.h"
34
#include "GPU/Common/FramebufferManagerCommon.h"
35
#include "GPU/Vulkan/ShaderManagerVulkan.h"
36
#include "GPU/Vulkan/GPU_Vulkan.h"
37
#include "GPU/Vulkan/FramebufferManagerVulkan.h"
38
#include "GPU/Vulkan/DrawEngineVulkan.h"
39
#include "GPU/Vulkan/TextureCacheVulkan.h"
40
#include "Common/GPU/Vulkan/VulkanRenderManager.h"
41
#include "Common/GPU/Vulkan/VulkanQueueRunner.h"
42
43
GPU_Vulkan::GPU_Vulkan(GraphicsContext *gfxCtx, Draw::DrawContext *draw)
44
: GPUCommonHW(gfxCtx, draw), drawEngine_(draw) {
45
_assert_(draw);
46
47
gstate_c.SetUseFlags(CheckGPUFeatures());
48
49
VulkanContext *vulkan = (VulkanContext *)gfxCtx->GetAPIContext();
50
51
vulkan->SetProfilerEnabledPtr(&g_Config.bGpuLogProfiler);
52
53
shaderManagerVulkan_ = new ShaderManagerVulkan(draw);
54
pipelineManager_ = new PipelineManagerVulkan(vulkan);
55
framebufferManagerVulkan_ = new FramebufferManagerVulkan(draw);
56
framebufferManager_ = framebufferManagerVulkan_;
57
textureCacheVulkan_ = new TextureCacheVulkan(draw, framebufferManager_->GetDraw2D(), vulkan);
58
textureCache_ = textureCacheVulkan_;
59
drawEngineCommon_ = &drawEngine_;
60
shaderManager_ = shaderManagerVulkan_;
61
62
drawEngine_.SetGPUCommon(this);
63
drawEngine_.SetTextureCache(textureCacheVulkan_);
64
drawEngine_.SetFramebufferManager(framebufferManagerVulkan_);
65
drawEngine_.SetShaderManager(shaderManagerVulkan_);
66
drawEngine_.SetPipelineManager(pipelineManager_);
67
drawEngine_.Init();
68
framebufferManagerVulkan_->SetTextureCache(textureCacheVulkan_);
69
framebufferManagerVulkan_->SetDrawEngine(&drawEngine_);
70
framebufferManagerVulkan_->SetShaderManager(shaderManagerVulkan_);
71
textureCacheVulkan_->SetFramebufferManager(framebufferManagerVulkan_);
72
textureCacheVulkan_->SetShaderManager(shaderManagerVulkan_);
73
textureCacheVulkan_->SetDrawEngine(&drawEngine_);
74
75
// Sanity check gstate
76
if ((int *)&gstate.transferstart - (int *)&gstate != 0xEA) {
77
ERROR_LOG(Log::G3D, "gstate has drifted out of sync!");
78
}
79
80
BuildReportingInfo();
81
82
textureCache_->NotifyConfigChanged();
83
84
drawEngine_.InitDeviceObjects(); // Creates important things like the pipeline layout. Required for loading the disk cache.
85
86
// Load shader cache.
87
std::string discID = g_paramSFO.GetDiscID();
88
if (discID.size()) {
89
File::CreateFullPath(GetSysDirectory(DIRECTORY_APP_CACHE));
90
shaderCachePath_ = GetSysDirectory(DIRECTORY_APP_CACHE) / (discID + ".vkshadercache");
91
LoadCache(shaderCachePath_);
92
}
93
94
InitDeviceObjects();
95
}
96
97
void GPU_Vulkan::FinishInitOnMainThread() {
98
// This can end up stopping/starting the vulkan render manager.
99
framebufferManagerVulkan_->Init(msaaLevel_);
100
}
101
102
void GPU_Vulkan::LoadCache(const Path &filename) {
103
if (!g_Config.bShaderCache) {
104
WARN_LOG(Log::G3D, "Shader cache disabled. Not loading.");
105
return;
106
}
107
108
// Actually precompiled by IsReady() since we're single-threaded.
109
FILE *f = File::OpenCFile(filename, "rb");
110
if (!f)
111
return;
112
113
// First compile shaders to SPIR-V, then load the pipeline cache and recreate the pipelines.
114
// It's when recreating the pipelines that the pipeline cache is useful - in the ideal case,
115
// it can just memcpy the finished shader binaries out of the pipeline cache file.
116
bool result = ShaderManagerVulkan::LoadCacheFlags(f, &drawEngine_);
117
if (!result) {
118
WARN_LOG(Log::G3D, "ShaderManagerVulkan failed to load cache header.");
119
}
120
if (result) {
121
// Reload use flags in case LoadCacheFlags() changed them.
122
if (drawEngineCommon_->EverUsedExactEqualDepth()) {
123
sawExactEqualDepth_ = true;
124
}
125
gstate_c.SetUseFlags(CheckGPUFeatures());
126
result = shaderManagerVulkan_->LoadCache(f);
127
if (!result) {
128
WARN_LOG(Log::G3D, "ShaderManagerVulkan failed to load cache.");
129
}
130
}
131
if (result) {
132
// WARNING: See comment in LoadPipelineCache if you are tempted to flip the second parameter to true.
133
result = pipelineManager_->LoadPipelineCache(f, false, shaderManagerVulkan_, draw_, drawEngine_.GetPipelineLayout(), msaaLevel_);
134
}
135
fclose(f);
136
137
// Now, since we're on the loader thread, we can just block here until all pipelines are actually created.
138
// This makes it so that the on-screen spinner keeps spinning until we are done.
139
double start = time_now_d();
140
VulkanRenderManager *rm = (VulkanRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
141
int maxTasksSeen = rm->WaitForPipelines();
142
double seconds = time_now_d() - start;
143
INFO_LOG(Log::G3D, "Waited %0.1fms for at least %d pipeline tasks to finish compiling.", seconds * 1000.0, maxTasksSeen);
144
145
if (!result) {
146
WARN_LOG(Log::G3D, "Incompatible Vulkan pipeline cache - rebuilding.");
147
// Bad cache file for this GPU/Driver/etc. Delete it.
148
File::Delete(filename);
149
} else {
150
INFO_LOG(Log::G3D, "Loaded Vulkan pipeline cache.");
151
}
152
}
153
154
void GPU_Vulkan::SaveCache(const Path &filename) {
155
if (!g_Config.bShaderCache) {
156
INFO_LOG(Log::G3D, "Shader cache disabled. Not saving.");
157
return;
158
}
159
160
if (!draw_) {
161
// Already got the lost message, we're in shutdown.
162
WARN_LOG(Log::G3D, "Not saving shaders - shutting down from in-game.");
163
return;
164
}
165
166
FILE *f = File::OpenCFile(filename, "wb");
167
if (!f)
168
return;
169
shaderManagerVulkan_->SaveCache(f, &drawEngine_);
170
// WARNING: See comment in LoadCache if you are tempted to flip the second parameter to true.
171
pipelineManager_->SavePipelineCache(f, false, shaderManagerVulkan_, draw_);
172
INFO_LOG(Log::G3D, "Saved Vulkan pipeline cache");
173
fclose(f);
174
}
175
176
GPU_Vulkan::~GPU_Vulkan() {
177
if (draw_) {
178
VulkanRenderManager *rm = (VulkanRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
179
// This now also does a hard sync with the render thread, so that we can safely delete our pipeline layout below.
180
rm->StopThreads();
181
rm->CheckNothingPending();
182
}
183
184
SaveCache(shaderCachePath_);
185
186
// StopThreads should have ensured that no pipelines are queued to compile at this point. So we can tear it down.
187
delete pipelineManager_;
188
pipelineManager_ = nullptr;
189
190
// Note: We save the cache in DeviceLost
191
DestroyDeviceObjects();
192
drawEngine_.DeviceLost();
193
shaderManager_->ClearShaders();
194
195
// other managers are deleted in ~GPUCommonHW.
196
if (draw_) {
197
VulkanRenderManager *rm = (VulkanRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
198
rm->StartThreads();
199
}
200
}
201
202
u32 GPU_Vulkan::CheckGPUFeatures() const {
203
uint32_t features = GPUCommonHW::CheckGPUFeatures();
204
205
VulkanContext *vulkan = (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT);
206
207
// Could simplify this, but it's good as documentation.
208
switch (vulkan->GetPhysicalDeviceProperties().properties.vendorID) {
209
case VULKAN_VENDOR_AMD:
210
// Accurate depth is required on AMD (due to reverse-Z driver bug) so we ignore the compat flag to disable it on those. See #9545
211
features |= GPU_USE_ACCURATE_DEPTH;
212
break;
213
case VULKAN_VENDOR_QUALCOMM:
214
// Accurate depth is required on Adreno too (seems to also have a reverse-Z driver bug).
215
features |= GPU_USE_ACCURATE_DEPTH;
216
break;
217
case VULKAN_VENDOR_ARM:
218
{
219
// This check is probably not exactly accurate. But old drivers had problems with reverse-Z, just like AMD and Qualcomm.
220
221
// NOTE: Galaxy S8 has version 16 but still seems to have some problems with accurate depth.
222
223
// TODO: Move this check to thin3d_vulkan.
224
225
bool driverTooOld = IsHashMaliDriverVersion(vulkan->GetPhysicalDeviceProperties().properties)
226
|| VK_VERSION_MAJOR(vulkan->GetPhysicalDeviceProperties().properties.driverVersion) < 14;
227
228
if (!PSP_CoreParameter().compat.flags().DisableAccurateDepth || driverTooOld) {
229
features |= GPU_USE_ACCURATE_DEPTH;
230
} else {
231
features &= ~GPU_USE_ACCURATE_DEPTH;
232
}
233
break;
234
}
235
case VULKAN_VENDOR_IMGTEC:
236
// We ignore the disable flag on IMGTec. Another reverse-Z bug (plus, not really any reason to bother). See #17044
237
features |= GPU_USE_ACCURATE_DEPTH;
238
break;
239
default:
240
// On other GPUs we'll just assume we don't need inaccurate depth, leaving ARM Mali as the odd one out.
241
features |= GPU_USE_ACCURATE_DEPTH;
242
break;
243
}
244
245
// Might enable this later - in the first round we are mostly looking at depth/stencil/discard.
246
// if (!g_Config.bEnableVendorBugChecks)
247
// features |= GPU_USE_ACCURATE_DEPTH;
248
249
// Mandatory features on Vulkan, which may be checked in "centralized" code
250
features |= GPU_USE_TEXTURE_LOD_CONTROL;
251
features |= GPU_USE_INSTANCE_RENDERING;
252
features |= GPU_USE_VERTEX_TEXTURE_FETCH;
253
features |= GPU_USE_TEXTURE_FLOAT;
254
255
// Fall back to geometry shader culling if we can't do vertex range culling.
256
// Checking accurate depth here because the old depth path is uncommon and not well tested for this.
257
if (draw_->GetDeviceCaps().geometryShaderSupported && (features & GPU_USE_ACCURATE_DEPTH) != 0) {
258
const bool useGeometry = g_Config.bUseGeometryShader && !draw_->GetBugs().Has(Draw::Bugs::GEOMETRY_SHADERS_SLOW_OR_BROKEN);
259
const bool vertexSupported = draw_->GetDeviceCaps().clipDistanceSupported && draw_->GetDeviceCaps().cullDistanceSupported;
260
if (useGeometry && (!vertexSupported || (features & GPU_USE_VS_RANGE_CULLING) == 0)) {
261
// Switch to culling via the geometry shader if not fully supported in vertex.
262
features |= GPU_USE_GS_CULLING;
263
features &= ~GPU_USE_VS_RANGE_CULLING;
264
}
265
}
266
267
if (!draw_->GetBugs().Has(Draw::Bugs::PVR_BAD_16BIT_TEXFORMATS)) {
268
// These are VULKAN_4444_FORMAT and friends.
269
// Note that we are now using the correct set of formats - the only cases where some may be missing
270
// are non-conformant implementations like MoltenVK.
271
uint32_t fmt4444 = draw_->GetDataFormatSupport(Draw::DataFormat::B4G4R4A4_UNORM_PACK16);
272
uint32_t fmt1555 = draw_->GetDataFormatSupport(Draw::DataFormat::A1R5G5B5_UNORM_PACK16);
273
uint32_t fmt565 = draw_->GetDataFormatSupport(Draw::DataFormat::R5G6B5_UNORM_PACK16);
274
if ((fmt4444 & Draw::FMT_TEXTURE) && (fmt565 & Draw::FMT_TEXTURE) && (fmt1555 & Draw::FMT_TEXTURE)) {
275
features |= GPU_USE_16BIT_FORMATS;
276
} else {
277
INFO_LOG(Log::G3D, "Deficient texture format support: 4444: %d 1555: %d 565: %d", fmt4444, fmt1555, fmt565);
278
}
279
}
280
281
if (g_Config.bStereoRendering && draw_->GetDeviceCaps().multiViewSupported) {
282
features |= GPU_USE_SINGLE_PASS_STEREO;
283
features |= GPU_USE_SIMPLE_STEREO_PERSPECTIVE;
284
285
if (features & GPU_USE_GS_CULLING) {
286
// Many devices that support stereo and GS don't support GS during stereo.
287
features &= ~GPU_USE_GS_CULLING;
288
features |= GPU_USE_VS_RANGE_CULLING;
289
}
290
}
291
292
// Attempt to workaround #17386
293
if (draw_->GetBugs().Has(Draw::Bugs::UNIFORM_INDEXING_BROKEN)) {
294
features &= ~GPU_USE_LIGHT_UBERSHADER;
295
}
296
297
features |= GPU_USE_FRAMEBUFFER_ARRAYS;
298
return CheckGPUFeaturesLate(features);
299
}
300
301
void GPU_Vulkan::BeginHostFrame() {
302
GPUCommonHW::BeginHostFrame();
303
304
drawEngine_.BeginFrame();
305
textureCache_->StartFrame();
306
307
VulkanContext *vulkan = (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT);
308
int curFrame = vulkan->GetCurFrame();
309
310
framebufferManager_->BeginFrame();
311
312
shaderManagerVulkan_->DirtyLastShader();
313
gstate_c.Dirty(DIRTY_ALL);
314
315
if (gstate_c.useFlagsChanged) {
316
// TODO: It'd be better to recompile them in the background, probably?
317
// This most likely means that saw equal depth changed.
318
WARN_LOG(Log::G3D, "Shader use flags changed, clearing all shaders and depth buffers");
319
// TODO: Not all shaders need to be recompiled. In fact, quite few? Of course, depends on
320
// the use flag change.. This is a major frame rate hitch in the start of a race in Outrun.
321
shaderManager_->ClearShaders();
322
pipelineManager_->Clear();
323
framebufferManager_->ClearAllDepthBuffers();
324
gstate_c.useFlagsChanged = false;
325
}
326
327
if (dumpNextFrame_) {
328
NOTICE_LOG(Log::G3D, "DUMPING THIS FRAME");
329
dumpThisFrame_ = true;
330
dumpNextFrame_ = false;
331
} else if (dumpThisFrame_) {
332
dumpThisFrame_ = false;
333
}
334
}
335
336
void GPU_Vulkan::EndHostFrame() {
337
VulkanContext *vulkan = (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT);
338
339
drawEngine_.EndFrame();
340
341
GPUCommonHW::EndHostFrame();
342
}
343
344
// Needs to be called on GPU thread, not reporting thread.
345
void GPU_Vulkan::BuildReportingInfo() {
346
VulkanContext *vulkan = (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT);
347
const auto &props = vulkan->GetPhysicalDeviceProperties().properties;
348
const auto &available = vulkan->GetDeviceFeatures().available;
349
350
#define CHECK_BOOL_FEATURE(n) do { if (available.standard.n) { featureNames += ", " #n; } } while (false)
351
#define CHECK_BOOL_FEATURE_MULTIVIEW(n) do { if (available.multiview.n) { featureNames += ", " #n; } } while (false)
352
353
std::string featureNames = "";
354
CHECK_BOOL_FEATURE(fullDrawIndexUint32);
355
CHECK_BOOL_FEATURE(geometryShader);
356
CHECK_BOOL_FEATURE(sampleRateShading);
357
CHECK_BOOL_FEATURE(dualSrcBlend);
358
CHECK_BOOL_FEATURE(logicOp);
359
CHECK_BOOL_FEATURE(multiDrawIndirect);
360
CHECK_BOOL_FEATURE(drawIndirectFirstInstance);
361
CHECK_BOOL_FEATURE(depthClamp);
362
CHECK_BOOL_FEATURE(depthBiasClamp);
363
CHECK_BOOL_FEATURE(depthBounds);
364
CHECK_BOOL_FEATURE(samplerAnisotropy);
365
CHECK_BOOL_FEATURE(textureCompressionETC2);
366
CHECK_BOOL_FEATURE(textureCompressionASTC_LDR);
367
CHECK_BOOL_FEATURE(textureCompressionBC);
368
CHECK_BOOL_FEATURE(occlusionQueryPrecise);
369
CHECK_BOOL_FEATURE(pipelineStatisticsQuery);
370
CHECK_BOOL_FEATURE(fragmentStoresAndAtomics);
371
CHECK_BOOL_FEATURE(shaderTessellationAndGeometryPointSize);
372
CHECK_BOOL_FEATURE(shaderStorageImageMultisample);
373
CHECK_BOOL_FEATURE(shaderSampledImageArrayDynamicIndexing);
374
CHECK_BOOL_FEATURE(shaderClipDistance);
375
CHECK_BOOL_FEATURE(shaderCullDistance);
376
CHECK_BOOL_FEATURE(shaderInt64);
377
CHECK_BOOL_FEATURE(shaderInt16);
378
CHECK_BOOL_FEATURE_MULTIVIEW(multiview);
379
CHECK_BOOL_FEATURE_MULTIVIEW(multiviewGeometryShader);
380
381
#undef CHECK_BOOL_FEATURE
382
383
if (!featureNames.empty()) {
384
featureNames = featureNames.substr(2);
385
}
386
387
char temp[16384];
388
snprintf(temp, sizeof(temp), "v%08x driver v%08x (%s), vendorID=%d, deviceID=%d (features: %s)", props.apiVersion, props.driverVersion, props.deviceName, props.vendorID, props.deviceID, featureNames.c_str());
389
reportingPrimaryInfo_ = props.deviceName;
390
reportingFullInfo_ = temp;
391
392
Reporting::UpdateConfig();
393
}
394
395
void GPU_Vulkan::FinishDeferred() {
396
drawEngine_.FinishDeferred();
397
}
398
399
void GPU_Vulkan::InitDeviceObjects() {
400
INFO_LOG(Log::G3D, "GPU_Vulkan::InitDeviceObjects");
401
402
uint32_t hacks = 0;
403
if (PSP_CoreParameter().compat.flags().MGS2AcidHack)
404
hacks |= QUEUE_HACK_MGS2_ACID;
405
if (PSP_CoreParameter().compat.flags().SonicRivalsHack)
406
hacks |= QUEUE_HACK_SONIC;
407
408
// Always on.
409
hacks |= QUEUE_HACK_RENDERPASS_MERGE;
410
411
if (hacks) {
412
VulkanRenderManager *rm = (VulkanRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
413
rm->GetQueueRunner()->EnableHacks(hacks);
414
}
415
}
416
417
void GPU_Vulkan::DestroyDeviceObjects() {
418
INFO_LOG(Log::G3D, "GPU_Vulkan::DestroyDeviceObjects");
419
// Need to turn off hacks when shutting down the GPU. Don't want them running in the menu.
420
if (draw_) {
421
VulkanRenderManager *rm = (VulkanRenderManager *)draw_->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
422
if (rm)
423
rm->GetQueueRunner()->EnableHacks(0);
424
}
425
}
426
427
void GPU_Vulkan::CheckRenderResized() {
428
if (renderResized_) {
429
GPUCommonHW::CheckRenderResized();
430
pipelineManager_->InvalidateMSAAPipelines();
431
framebufferManager_->ReleasePipelines();
432
}
433
}
434
435
void GPU_Vulkan::DeviceLost() {
436
// draw_ is normally actually still valid here in Vulkan. But we null it out in GPUCommonHW::DeviceLost so we don't try to use it again.
437
// So, we have to save it here to be able to call ReleaseCompileQueue().
438
Draw::DrawContext *draw = draw_;
439
if (draw) {
440
VulkanRenderManager *rm = (VulkanRenderManager *)draw->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
441
rm->StopThreads();
442
}
443
444
if (shaderCachePath_.Valid()) {
445
SaveCache(shaderCachePath_);
446
}
447
DestroyDeviceObjects();
448
pipelineManager_->DeviceLost();
449
450
GPUCommonHW::DeviceLost();
451
452
if (draw) {
453
VulkanRenderManager *rm = (VulkanRenderManager *)draw->GetNativeObject(Draw::NativeObject::RENDER_MANAGER);
454
rm->StartThreads();
455
}
456
}
457
458
void GPU_Vulkan::DeviceRestore(Draw::DrawContext *draw) {
459
GPUCommonHW::DeviceRestore(draw); // this updates draw_.
460
461
VulkanContext *vulkan = (VulkanContext *)draw_->GetNativeObject(Draw::NativeObject::CONTEXT);
462
pipelineManager_->DeviceRestore(vulkan);
463
464
InitDeviceObjects();
465
}
466
467
void GPU_Vulkan::GetStats(char *buffer, size_t bufsize) {
468
size_t offset = FormatGPUStatsCommon(buffer, bufsize);
469
buffer += offset;
470
bufsize -= offset;
471
if ((int)bufsize < 0)
472
return;
473
const DrawEngineVulkanStats &drawStats = drawEngine_.GetStats();
474
char texStats[256];
475
textureCacheVulkan_->GetStats(texStats, sizeof(texStats));
476
snprintf(buffer, bufsize,
477
"Vertex, Fragment, Pipelines loaded: %i, %i, %i\n"
478
"Pushbuffer space used: Vtx %d, Idx %d\n"
479
"%s\n",
480
shaderManagerVulkan_->GetNumVertexShaders(),
481
shaderManagerVulkan_->GetNumFragmentShaders(),
482
pipelineManager_->GetNumPipelines(),
483
drawStats.pushVertexSpaceUsed,
484
drawStats.pushIndexSpaceUsed,
485
texStats
486
);
487
}
488
489
std::vector<std::string> GPU_Vulkan::DebugGetShaderIDs(DebugShaderType type) {
490
switch (type) {
491
case SHADER_TYPE_PIPELINE:
492
return pipelineManager_->DebugGetObjectIDs(type);
493
case SHADER_TYPE_SAMPLER:
494
return textureCacheVulkan_->DebugGetSamplerIDs();
495
default:
496
return GPUCommonHW::DebugGetShaderIDs(type);
497
}
498
}
499
500
std::string GPU_Vulkan::DebugGetShaderString(std::string id, DebugShaderType type, DebugShaderStringType stringType) {
501
switch (type) {
502
case SHADER_TYPE_PIPELINE:
503
return pipelineManager_->DebugGetObjectString(id, type, stringType, shaderManagerVulkan_);
504
case SHADER_TYPE_SAMPLER:
505
return textureCacheVulkan_->DebugGetSamplerString(id, stringType);
506
default:
507
return GPUCommonHW::DebugGetShaderString(id, type, stringType);
508
}
509
}
510
511