message: Improved incorrect buffer parameters error reporting
diff: @@ -73,13 +73,8 @@ public:
  m_pDefaultUAV(nullptr, STDDeleter<BufferViewImplType, TBuffViewObjAllocator>(BuffViewObjAllocator) ),
  m_pDefaultSRV(nullptr, STDDeleter<BufferViewImplType, TBuffViewObjAllocator>(BuffViewObjAllocator) )
  {
  -#ifdef DEVELOPMENT
  -# define VERIFY_BUFFER(Expr, ...) if (!(Expr)) LOG_ERROR("Buffer '", this->m_Desc.Name ? this->m_Desc.Name : "", "': ", ##__VA_ARGS__)
  -#else
  -# define VERIFY_BUFFER(...)do{}while(false)
  -#endif
  +# define VERIFY_BUFFER(Expr, ...) if (!(Expr)) LOG_ERROR_AND_THROW("Buffer '", this->m_Desc.Name ? this->m_Desc.Name : "", "': ", ##__VA_ARGS__)
  -#ifdef DEVELOPMENT
  Uint32 AllowedBindFlags =
  BIND_VERTEX_BUFFER | BIND_INDEX_BUFFER | BIND_UNIFORM_BUFFER |
  BIND_SHADER_RESOURCE | BIND_STREAM_OUTPUT | BIND_UNORDERED_ACCESS |
  @@ -90,15 +85,14 @@ public:
  "BIND_INDIRECT_DRAW_ARGS (256)";
  VERIFY_BUFFER( (BuffDesc.BindFlags & ~AllowedBindFlags) == 0, "Incorrect bind flags specified (", BuffDesc.BindFlags & ~AllowedBindFlags, "). Only the following flags are allowed:\n", strAllowedBindFlags );
  -#endif
  if( (this->m_Desc.BindFlags & BIND_UNORDERED_ACCESS) ||
  (this->m_Desc.BindFlags & BIND_SHADER_RESOURCE) )
  {
  - VERIFY_BUFFER( this->m_Desc.Mode > BUFFER_MODE_UNDEFINED && this->m_Desc.Mode < BUFFER_MODE_NUM_MODES, "Buffer mode (", this->m_Desc.Mode, ") is not correct" );
  + VERIFY_BUFFER( this->m_Desc.Mode > BUFFER_MODE_UNDEFINED && this->m_Desc.Mode < BUFFER_MODE_NUM_MODES, GetBufferModeString(this->m_Desc.Mode), " is not a valid mode for a buffer created with BIND_SHADER_RESOURCE or BIND_UNORDERED_ACCESS flags" );
  if (this->m_Desc.Mode == BUFFER_MODE_STRUCTURED || this->m_Desc.Mode == BUFFER_MODE_FORMATTED)
  {
  - VERIFY_BUFFER( this->m_Desc.ElementByteStride != 0, "Element stride cannot be zero for structured and formatted buffers" );
  + VERIFY_BUFFER( this->m_Desc.ElementByteStride != 0, "Element stride must not be zero for structured and formatted buffers" );
  }
  else if (this->m_Desc.Mode == BUFFER_MODE_RAW)
  {
  @@ -106,6 +100,8 @@ public:
  }
  }
  +# undef VERIFY_BUFFER
  +
  Uint64 DeviceQueuesMask = pDevice->GetCommandQueueMask();
  DEV_CHECK_ERR( (this->m_Desc.CommandQueueMask & DeviceQueuesMask) != 0, "No bits in the command queue mask (0x", std::hex, this->m_Desc.CommandQueueMask, ") correspond to one of ", pDevice->GetCommandQueueCount(), " available device command queues");
  this->m_Desc.CommandQueueMask &= DeviceQueuesMask;
  