Skip to content

Commit

Permalink
Address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
hrydgard committed Oct 28, 2022
1 parent d9cfcf2 commit 8e0b82f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
12 changes: 2 additions & 10 deletions GPU/Common/PresentationCommon.cpp
Expand Up @@ -235,19 +235,11 @@ bool PresentationCommon::UpdatePostShader() {
const ShaderInfo *stereoShaderInfo = GetPostShaderInfo(g_Config.sStereoToMonoShader);
if (stereoShaderInfo) {
bool result = CompilePostShader(stereoShaderInfo, &stereoPipeline_);
if (!result) {
// We won't have a stereo shader. We have to check for this later.
delete stereoShaderInfo_;
stereoShaderInfo_ = nullptr;
stereoPipeline_ = nullptr;
} else {
if (result) {
stereoShaderInfo_ = new ShaderInfo(*stereoShaderInfo);
}
} else {
// We won't have a stereo shader. We have to check for this later.
delete stereoShaderInfo_;
stereoShaderInfo_ = nullptr;
stereoPipeline_ = nullptr;
WARN_LOG(G3D, "Failed to get info about stereo shader '%s'", g_Config.sStereoToMonoShader.c_str());
}
}

Expand Down
6 changes: 3 additions & 3 deletions GPU/Vulkan/VulkanUtil.cpp
Expand Up @@ -85,14 +85,14 @@ void VulkanComputeShaderManager::InitDeviceObjects(Draw::DrawContext *draw) {

std::vector<VkDescriptorPoolSize> dpTypes;
dpTypes.resize(2);
dpTypes[0].descriptorCount = 4096;
dpTypes[0].descriptorCount = 8192;
dpTypes[0].type = VK_DESCRIPTOR_TYPE_STORAGE_BUFFER;
dpTypes[1].descriptorCount = 2048;
dpTypes[1].descriptorCount = 4096;
dpTypes[1].type = VK_DESCRIPTOR_TYPE_STORAGE_IMAGE;

VkDescriptorPoolCreateInfo dp = { VK_STRUCTURE_TYPE_DESCRIPTOR_POOL_CREATE_INFO };
dp.flags = 0; // Don't want to mess around with individually freeing these, let's go fixed each frame and zap the whole array. Might try the dynamic approach later.
dp.maxSets = 2048; // GTA can end up creating more than 1000 textures in the first frame!
dp.maxSets = 4096; // GTA can end up creating more than 1000 textures in the first frame!

for (int i = 0; i < ARRAY_SIZE(frameData_); i++) {
frameData_[i].descPool.Create(vulkan_, dp, dpTypes);
Expand Down

0 comments on commit 8e0b82f

Please sign in to comment.