Minor fixes

This commit is contained in:
SirLynix 2022-05-05 20:20:44 +02:00
parent 973b589b08
commit 81085508ec
5 changed files with 7 additions and 6 deletions

View File

@ -23,7 +23,7 @@ namespace Nz
IndexBuffer(IndexBuffer&&) noexcept = default;
~IndexBuffer() = default;
unsigned int ComputeCacheMissCount();
UInt64 ComputeCacheMissCount();
bool Fill(const void* data, UInt64 startIndex, UInt64 length);
bool FillRaw(const void* data, UInt64 offset, UInt64 size);
@ -52,7 +52,7 @@ namespace Nz
private:
std::shared_ptr<Buffer> m_buffer;
IndexType m_indexType;
UInt32 m_indexCount;
UInt64 m_indexCount;
UInt64 m_endOffset;
UInt64 m_startOffset;
};

View File

@ -159,7 +159,7 @@ namespace Nz
std::size_t processedBufferIndex = 0;
for (; processedBufferIndex < m_queuedBuffers.size(); ++processedBufferIndex)
{
UInt32 bufferFrameCount = m_queuedBuffers[processedBufferIndex]->GetSampleCount() / GetChannelCount(m_queuedBuffers[processedBufferIndex]->GetAudioFormat());
UInt32 bufferFrameCount = SafeCast<UInt32>(m_queuedBuffers[processedBufferIndex]->GetSampleCount() / GetChannelCount(m_queuedBuffers[processedBufferIndex]->GetAudioFormat()));
if (offset < bufferFrameCount)
break;

View File

@ -78,7 +78,7 @@ namespace Nz::ShaderLang
if (!m_context->module)
{
const Token& nextToken = Peek();
throw ParserUnexpectedTokenError{ nextToken.location };
throw ParserUnexpectedTokenError{ nextToken.location, nextToken.type };
}
if (!statement)
@ -1110,7 +1110,7 @@ namespace Nz::ShaderLang
case TokenType::PlusAssign: assignType = ShaderAst::AssignType::CompoundAdd; break;
default:
throw ParserUnexpectedTokenError{ token.location };
throw ParserUnexpectedTokenError{ token.location, token.type };
}
Consume();

View File

@ -50,7 +50,7 @@ namespace Nz
m_buffer = bufferFactory(BufferType::Index, m_endOffset, usage, initialData);
}
unsigned int IndexBuffer::ComputeCacheMissCount()
UInt64 IndexBuffer::ComputeCacheMissCount()
{
IndexMapper mapper(*this);

View File

@ -73,6 +73,7 @@ namespace Nz
{
switch (type)
{
case ComponentType::Color:
case ComponentType::Double1:
case ComponentType::Double2:
case ComponentType::Double3: