Fix multiview limit;

When multiview is not supported (although technically lovr requires it),
the renderSize limit for array layers was zero, which meant no render
passes would work.  Instead, make sure it's at least 1, which is more
correct.
This commit is contained in:
bjorn 2022-10-12 10:37:43 -07:00
parent f8ad6e58ba
commit 82dc3cc920
1 changed files with 1 additions and 1 deletions

View File

@ -1885,7 +1885,7 @@ bool gpu_init(gpu_config* config) {
config->limits->textureLayers = limits->maxImageArrayLayers;
config->limits->renderSize[0] = limits->maxFramebufferWidth;
config->limits->renderSize[1] = limits->maxFramebufferHeight;
config->limits->renderSize[2] = multiviewProperties.maxMultiviewViewCount;
config->limits->renderSize[2] = MAX(multiviewProperties.maxMultiviewViewCount, 1);
config->limits->uniformBuffersPerStage = limits->maxPerStageDescriptorUniformBuffers;
config->limits->storageBuffersPerStage = limits->maxPerStageDescriptorStorageBuffers;
config->limits->sampledTexturesPerStage = limits->maxPerStageDescriptorSampledImages;