1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[dxvk] Throw error in case a pipeline layout uses too many bindings

This commit is contained in:
Philip Rebohle 2020-10-07 16:28:47 +02:00
parent d153d5c19a
commit 0b011ea361
No known key found for this signature in database
GPG Key ID: C8CC613427A31C99

View File

@ -1,6 +1,7 @@
#include <cstring>
#include "dxvk_descriptor.h"
#include "dxvk_limits.h"
#include "dxvk_pipelayout.h"
namespace dxvk {
@ -92,6 +93,9 @@ namespace dxvk {
auto bindingCount = slotMapping.bindingCount();
auto bindingInfos = slotMapping.bindingInfos();
if (bindingCount > MaxNumActiveBindings)
throw DxvkError(str::format("Too many active bindings in pipeline layout (", bindingCount, ")"));
for (uint32_t i = 0; i < bindingCount; i++)
m_bindingSlots[i] = bindingInfos[i];