Merge branch 'topic/metal-sep21' into main (#1695)
Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: Tim Sylvester <tim@wetdogweather.com> Co-authored-by: Bart Louwers <bart@emeel.net> Co-authored-by: Alex Cristici <alex.cristici@gmail.com> Co-authored-by: Stefan Karschti <stefan.karschti@gmail.com> Co-authored-by: Alex Cristici <alex@skoon.energy> Co-authored-by: Bart Louwers <bart.louwers@gmail.com> Co-authored-by: Wei Chen <alanchenboy@gmail.com> Co-authored-by: Siarhei Fedartsou <siarhei.fedartsou@gmail.com> Co-authored-by: tdcosta100 <tdcosta100@gmail.com>
This commit is contained in:
@@ -377,9 +377,11 @@ void Drawable::bindUniformBuffers(const RenderPass& renderPass) const {
|
||||
const auto& uniformBuffer = getUniformBuffers().get(element.first);
|
||||
if (!uniformBuffer) {
|
||||
using namespace std::string_literals;
|
||||
const auto tileID = getTileID() ? util::toString(*getTileID()) : "<no tile>";
|
||||
const auto tileLabel = util::toString(getID()) + "/" + getName() + "/" + tileID;
|
||||
Log::Error(Event::General,
|
||||
"Drawable::bindUniformBuffers: UBO "s + StringIndexer::get(element.first) +
|
||||
" not found. skipping.");
|
||||
"bindUniformBuffers: UBO "s + StringIndexer::get(element.first) + " not found on " +
|
||||
tileLabel + ". skipping.");
|
||||
assert(false);
|
||||
continue;
|
||||
}
|
||||
@@ -518,7 +520,9 @@ void Drawable::upload(gfx::UploadPass& uploadPass_) {
|
||||
auto& context = static_cast<Context&>(contextBase);
|
||||
constexpr auto usage = gfx::BufferUsageType::StaticDraw;
|
||||
|
||||
if (!impl->indexes || !impl->indexes->bytes()) {
|
||||
// We need either raw index data or a buffer already created from them.
|
||||
// We can have a buffer and no indexes, but only if it's not marked dirty.
|
||||
if (!impl->indexes || (impl->indexes->empty() && (!impl->indexes->getBuffer() || impl->indexes->getDirty()))) {
|
||||
assert(!"Missing index data");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user