mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-09-07 13:13:24 +02:00
Remove the leftover geometry shader scaffolding
Nothing has generated or used a geometry shader since the GS paths were removed - GeometryShaderGenerator is gone, and ShaderWriter's BeginGSMain/EndGSMain had no callers at all. Removes ShaderStage::Geometry and everything hanging off it: the GS preambles and GSMain helpers in ShaderWriter, the stage mappings in all three thin3d backends, the D3D11 geometry shader plumbing (curGS_, the pipeline and module members, gs_4_0 compilation), CreateGeometryShaderD3D11, the unused PipelineFlags::USES_GEOMETRY_SHADER and PipelineManagerVulkan's UsesGeometryShader(). Also stop enabling the Vulkan geometryShader device feature, since we no longer have any use for it. Kept on purpose: the device feature is still listed in the feature dumps (like other capabilities we don't use), and the Vulkan shader cache header keeps its now-always-zero geometry shader count so the on-disk format stays compatible.
This commit is contained in:
@@ -73,7 +73,6 @@ static Promise<VkShaderModule> *CompileShaderModuleAsync(VulkanContext *vulkan,
|
||||
switch (stage) {
|
||||
case VK_SHADER_STAGE_VERTEX_BIT: createTag = "game_vertex"; break;
|
||||
case VK_SHADER_STAGE_FRAGMENT_BIT: createTag = "game_fragment"; break;
|
||||
case VK_SHADER_STAGE_GEOMETRY_BIT: createTag = "game_geometry"; break;
|
||||
case VK_SHADER_STAGE_COMPUTE_BIT: createTag = "game_compute"; break;
|
||||
default: break;
|
||||
}
|
||||
@@ -378,7 +377,7 @@ struct VulkanCacheHeader {
|
||||
uint32_t detectFlags;
|
||||
int numVertexShaders;
|
||||
int numFragmentShaders;
|
||||
int numGeometryShaders;
|
||||
int unused_numGeometryShaders; // Always 0, kept so the file format stays compatible.
|
||||
};
|
||||
|
||||
bool ShaderManagerVulkan::LoadCacheFlags(FILE *f, DrawEngineVulkan *drawEngine) {
|
||||
@@ -464,7 +463,7 @@ bool ShaderManagerVulkan::LoadCache(FILE *f) {
|
||||
}
|
||||
}
|
||||
|
||||
NOTICE_LOG(Log::G3D, "ShaderCache: Loaded %d vertex, %d fragment shaders and %d geometry shaders (failed %d)", header.numVertexShaders, header.numFragmentShaders, header.numGeometryShaders, failCount);
|
||||
NOTICE_LOG(Log::G3D, "ShaderCache: Loaded %d vertex and %d fragment shaders (failed %d)", header.numVertexShaders, header.numFragmentShaders, failCount);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -476,7 +475,7 @@ void ShaderManagerVulkan::SaveCache(FILE *f, DrawEngineVulkan *drawEngine) {
|
||||
header.detectFlags = 0;
|
||||
header.numVertexShaders = (int)vsCache_.size();
|
||||
header.numFragmentShaders = (int)fsCache_.size();
|
||||
header.numGeometryShaders = 0;
|
||||
header.unused_numGeometryShaders = 0;
|
||||
bool writeFailed = fwrite(&header, sizeof(header), 1, f) != 1;
|
||||
vsCache_.Iterate([&](const VShaderID &id, VulkanVertexShader *vs) {
|
||||
writeFailed = writeFailed || fwrite(&id, sizeof(id), 1, f) != 1;
|
||||
|
||||
Reference in New Issue
Block a user