CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

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