Some fixes

This commit is contained in:
Jérôme Leclercq 2021-12-16 23:11:48 +01:00
parent 0f9060c45b
commit a8fefeb833
4 changed files with 9 additions and 5 deletions

View File

@ -829,7 +829,11 @@ namespace Nz
{ {
for (std::size_t passIndex : readIt->second) for (std::size_t passIndex : readIt->second)
{ {
std::size_t readPhysicalPassIndex = Retrieve(m_pending.passIdToPhysicalPassIndex, passIndex); auto it = m_pending.passIdToPhysicalPassIndex.find(passIndex);
if (it == m_pending.passIdToPhysicalPassIndex.end())
continue; //< pass may have been discarded
std::size_t readPhysicalPassIndex = it->second;
if (readPhysicalPassIndex > physicalPassIndex) //< Read in a future pass? if (readPhysicalPassIndex > physicalPassIndex) //< Read in a future pass?
{ {
// Yes, store it // Yes, store it

View File

@ -84,7 +84,7 @@ namespace Nz
m_commandBuffer.CopyBuffer(allocation, targetBuffer.GetBuffer().GetObjectId(), size, sourceOffset, target.GetOffset() + targetOffset); m_commandBuffer.CopyBuffer(allocation, targetBuffer.GetBuffer().GetObjectId(), size, sourceOffset, target.GetOffset() + targetOffset);
} }
void OpenGLCommandBufferBuilder::CopyTexture(const Texture& fromTexture, const Boxui& fromBox, TextureLayout fromLayout, const Texture& toTexture, const Vector3ui& toPos, TextureLayout toLayout) void OpenGLCommandBufferBuilder::CopyTexture(const Texture& fromTexture, const Boxui& fromBox, TextureLayout /*fromLayout*/, const Texture& toTexture, const Vector3ui& toPos, TextureLayout /*toLayout*/)
{ {
const OpenGLTexture& sourceTexture = static_cast<const OpenGLTexture&>(fromTexture); const OpenGLTexture& sourceTexture = static_cast<const OpenGLTexture&>(fromTexture);
const OpenGLTexture& targetTexture = static_cast<const OpenGLTexture&>(toTexture); const OpenGLTexture& targetTexture = static_cast<const OpenGLTexture&>(toTexture);

View File

@ -562,7 +562,7 @@ namespace Nz
UInt32 resultId = m_writer.AllocateResultId(); UInt32 resultId = m_writer.AllocateResultId();
m_currentBlock->Append(*castOp, m_writer.GetTypeId(targetType), resultId, fromId); m_currentBlock->Append(*castOp, m_writer.GetTypeId(targetType), resultId, fromId);
throw std::runtime_error("toudou"); PushResultId(resultId);
} }
else else
{ {

View File

@ -115,12 +115,12 @@ namespace Nz
} }
} }
void Visit(ShaderAst::ConditionalExpression& node) override void Visit(ShaderAst::ConditionalExpression& /*node*/) override
{ {
throw std::runtime_error("unexpected conditional expression, did you forget to sanitize the shader?"); throw std::runtime_error("unexpected conditional expression, did you forget to sanitize the shader?");
} }
void Visit(ShaderAst::ConditionalStatement& node) override void Visit(ShaderAst::ConditionalStatement& /*node*/) override
{ {
throw std::runtime_error("unexpected conditional expression, did you forget to sanitize the shader?"); throw std::runtime_error("unexpected conditional expression, did you forget to sanitize the shader?");
} }