Răsfoiți Sursa

Bump push/root constants size to 256

Panagiotis Christopoulos Charitos 3 luni în urmă
părinte
comite
238f8f57ed
2 a modificat fișierele cu 7 adăugiri și 1 ștergeri
  1. 1 1
      AnKi/Gr/Common.h
  2. 6 0
      AnKi/Gr/Vulkan/VkGrManager.cpp

+ 1 - 1
AnKi/Gr/Common.h

@@ -95,7 +95,7 @@ constexpr U32 kMaxRegisterSpaces = 3; ///< Groups that can be bound at the same
 constexpr U32 kMaxBindingsPerRegisterSpace = 32;
 constexpr U32 kMaxFramesInFlight = 3; ///< Triple buffering.
 constexpr U32 kMaxGrObjectNameLength = 61;
-constexpr U32 kMaxFastConstantsSize = 128; ///< Push/root constants size. Thanks AMD!!
+constexpr U32 kMaxFastConstantsSize = 256; ///< Push/root constants size.
 
 /// The number of commands in a command buffer that make it a small batch command buffer.
 constexpr U32 kCommandBufferSmallBatchMaxCommands = 100;

+ 6 - 0
AnKi/Gr/Vulkan/VkGrManager.cpp

@@ -604,6 +604,12 @@ Error GrManagerImpl::initInstance()
 		return Error::kFunctionFailed;
 	}
 
+	if(props2.properties.limits.maxPushConstantsSize < kMaxFastConstantsSize)
+	{
+		ANKI_VK_LOGE("GPU doesn't support at least %u push constants size", kMaxFastConstantsSize);
+		return Error::kFunctionFailed;
+	}
+
 	// Find vendor
 	switch(props2.properties.vendorID)
 	{