Minor fixes
This commit is contained in:
parent
973b589b08
commit
81085508ec
|
|
@ -23,7 +23,7 @@ namespace Nz
|
||||||
IndexBuffer(IndexBuffer&&) noexcept = default;
|
IndexBuffer(IndexBuffer&&) noexcept = default;
|
||||||
~IndexBuffer() = default;
|
~IndexBuffer() = default;
|
||||||
|
|
||||||
unsigned int ComputeCacheMissCount();
|
UInt64 ComputeCacheMissCount();
|
||||||
|
|
||||||
bool Fill(const void* data, UInt64 startIndex, UInt64 length);
|
bool Fill(const void* data, UInt64 startIndex, UInt64 length);
|
||||||
bool FillRaw(const void* data, UInt64 offset, UInt64 size);
|
bool FillRaw(const void* data, UInt64 offset, UInt64 size);
|
||||||
|
|
@ -52,7 +52,7 @@ namespace Nz
|
||||||
private:
|
private:
|
||||||
std::shared_ptr<Buffer> m_buffer;
|
std::shared_ptr<Buffer> m_buffer;
|
||||||
IndexType m_indexType;
|
IndexType m_indexType;
|
||||||
UInt32 m_indexCount;
|
UInt64 m_indexCount;
|
||||||
UInt64 m_endOffset;
|
UInt64 m_endOffset;
|
||||||
UInt64 m_startOffset;
|
UInt64 m_startOffset;
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -159,7 +159,7 @@ namespace Nz
|
||||||
std::size_t processedBufferIndex = 0;
|
std::size_t processedBufferIndex = 0;
|
||||||
for (; processedBufferIndex < m_queuedBuffers.size(); ++processedBufferIndex)
|
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)
|
if (offset < bufferFrameCount)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -78,7 +78,7 @@ namespace Nz::ShaderLang
|
||||||
if (!m_context->module)
|
if (!m_context->module)
|
||||||
{
|
{
|
||||||
const Token& nextToken = Peek();
|
const Token& nextToken = Peek();
|
||||||
throw ParserUnexpectedTokenError{ nextToken.location };
|
throw ParserUnexpectedTokenError{ nextToken.location, nextToken.type };
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!statement)
|
if (!statement)
|
||||||
|
|
@ -1110,7 +1110,7 @@ namespace Nz::ShaderLang
|
||||||
case TokenType::PlusAssign: assignType = ShaderAst::AssignType::CompoundAdd; break;
|
case TokenType::PlusAssign: assignType = ShaderAst::AssignType::CompoundAdd; break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
throw ParserUnexpectedTokenError{ token.location };
|
throw ParserUnexpectedTokenError{ token.location, token.type };
|
||||||
}
|
}
|
||||||
|
|
||||||
Consume();
|
Consume();
|
||||||
|
|
|
||||||
|
|
@ -50,7 +50,7 @@ namespace Nz
|
||||||
m_buffer = bufferFactory(BufferType::Index, m_endOffset, usage, initialData);
|
m_buffer = bufferFactory(BufferType::Index, m_endOffset, usage, initialData);
|
||||||
}
|
}
|
||||||
|
|
||||||
unsigned int IndexBuffer::ComputeCacheMissCount()
|
UInt64 IndexBuffer::ComputeCacheMissCount()
|
||||||
{
|
{
|
||||||
IndexMapper mapper(*this);
|
IndexMapper mapper(*this);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,7 @@ namespace Nz
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
case ComponentType::Color:
|
||||||
case ComponentType::Double1:
|
case ComponentType::Double1:
|
||||||
case ComponentType::Double2:
|
case ComponentType::Double2:
|
||||||
case ComponentType::Double3:
|
case ComponentType::Double3:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue