Branimir Karadžić 7 years ago
parent
commit
873342df77
1 changed files with 14 additions and 14 deletions
  1. 14 14
      src/bgfx_p.h

+ 14 - 14
src/bgfx_p.h

@@ -25,23 +25,23 @@
 #include <inttypes.h>
 #include <inttypes.h>
 
 
 // Check handle, cannot be bgfx::kInvalidHandle and must be valid.
 // Check handle, cannot be bgfx::kInvalidHandle and must be valid.
-#define BGFX_CHECK_HANDLE(_desc, _handleAlloc, _handle) \
-			BX_CHECK(isValid(_handle) \
-				&& _handleAlloc.isValid(_handle.idx) \
+#define BGFX_CHECK_HANDLE(_desc, _handleAlloc, _handle)    \
+			BX_CHECK(isValid(_handle)                      \
+				&& _handleAlloc.isValid(_handle.idx)       \
 				, "Invalid handle. %s handle: %d (max %d)" \
 				, "Invalid handle. %s handle: %d (max %d)" \
-				, _desc \
-				, _handle.idx \
-				, _handleAlloc.getMaxHandles() \
+				, _desc                                    \
+				, _handle.idx                              \
+				, _handleAlloc.getMaxHandles()             \
 				)
 				)
 
 
 // Check handle, it's ok to be bgfx::kInvalidHandle or must be valid.
 // Check handle, it's ok to be bgfx::kInvalidHandle or must be valid.
 #define BGFX_CHECK_HANDLE_INVALID_OK(_desc, _handleAlloc, _handle) \
 #define BGFX_CHECK_HANDLE_INVALID_OK(_desc, _handleAlloc, _handle) \
-			BX_CHECK(!isValid(_handle) \
-				|| _handleAlloc.isValid(_handle.idx) \
-				, "Invalid handle. %s handle: %d (max %d)" \
-				, _desc \
-				, _handle.idx \
-				, _handleAlloc.getMaxHandles() \
+			BX_CHECK(!isValid(_handle)                             \
+				|| _handleAlloc.isValid(_handle.idx)               \
+				, "Invalid handle. %s handle: %d (max %d)"         \
+				, _desc                                            \
+				, _handle.idx                                      \
+				, _handleAlloc.getMaxHandles()                     \
 				)
 				)
 
 
 #if BGFX_CONFIG_MULTITHREADED
 #if BGFX_CONFIG_MULTITHREADED
@@ -178,7 +178,7 @@ namespace tinystl
 		void sort()
 		void sort()
 		{
 		{
 			bx::quickSort(
 			bx::quickSort(
-				this->begin()
+				  this->begin()
 				, uint32_t(this->end() - this->begin() )
 				, uint32_t(this->end() - this->begin() )
 				, sizeof(T)
 				, sizeof(T)
 				, [](const void* _a, const void* _b) -> int32_t {
 				, [](const void* _a, const void* _b) -> int32_t {
@@ -207,7 +207,7 @@ namespace stl = std;
 #	include <windows.h>
 #	include <windows.h>
 #endif // BX_PLATFORM_*
 #endif // BX_PLATFORM_*
 
 
-#define BGFX_MAX_COMPUTE_BINDINGS 8
+#define BGFX_MAX_COMPUTE_BINDINGS BGFX_CONFIG_MAX_TEXTURE_SAMPLERS
 
 
 #define BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER  UINT32_C(0x10000000)
 #define BGFX_TEXTURE_INTERNAL_DEFAULT_SAMPLER  UINT32_C(0x10000000)
 #define BGFX_TEXTURE_INTERNAL_SHARED           UINT32_C(0x20000000)
 #define BGFX_TEXTURE_INTERNAL_SHARED           UINT32_C(0x20000000)