diff --git a/filament/backend/src/opengl/OpenGLDriver.cpp b/filament/backend/src/opengl/OpenGLDriver.cpp index 844835ce75..c50042a4a5 100644 --- a/filament/backend/src/opengl/OpenGLDriver.cpp +++ b/filament/backend/src/opengl/OpenGLDriver.cpp @@ -170,7 +170,7 @@ void OpenGLDriver::terminate() { executeGpuCommandsCompleteOps(); // because we called glFinish(), all callbacks should have been executed - assert(!mGpuCommandCompleteOps.size()); + assert(mGpuCommandCompleteOps.empty()); for (auto& item : mSamplerMap) { mContext.unbindSampler(item.second); @@ -1942,9 +1942,9 @@ void OpenGLDriver::beginRenderPass(Handle rth, // Use scissor test if not told to ignore, and if the viewport doesn't cover the whole target. const bool respectScissor = !ignoreScissor && (params.viewport.left != 0 || - params.viewport.bottom != 0 || - params.viewport.width != rt->width || - params.viewport.height != rt->height); + params.viewport.bottom != 0 || + params.viewport.width != rt->width || + params.viewport.height != rt->height); if (respectScissor) { gl.setScissor(params.viewport.left, params.viewport.bottom, params.viewport.width, params.viewport.height); diff --git a/filament/src/fg/FrameGraph.cpp b/filament/src/fg/FrameGraph.cpp index 53ba1ed49e..bf1ca428db 100644 --- a/filament/src/fg/FrameGraph.cpp +++ b/filament/src/fg/FrameGraph.cpp @@ -696,15 +696,22 @@ void FrameGraph::export_graphviz(utils::io::ostream& out) { out << "\n"; for (ResourceNode const& node : registry) { ResourceEntryBase const* subresource = node.resource; + + auto textureResource = dynamic_cast const*>(subresource); + out << "\"R" << node.resource->id << "_" << +node.version << "\"" - "[label=\"" << node.resource->name << "\\n(version: " << +node.version << ")" - "\\nid:" << node.resource->id << - "\\nrefs:" << node.resource->refs << ", texture: **FIXME**" << /*bool(node.resource->usage & TextureUsage::SAMPLEABLE) <<*/ - "\", style=filled, fillcolor=" - << ((subresource->imported) ? - (node.resource->refs ? "palegreen" : "palegreen4") : - (node.resource->refs ? "skyblue" : "skyblue4")) - << "]\n"; + "[label=\"" << node.resource->name << "\\n(version: " << +node.version << ")" "\\nid:" << node.resource->id << + "\\nrefs:" << node.resource->refs; + + if (textureResource) { + out << ", " << (bool(textureResource->descriptor.usage & TextureUsage::SAMPLEABLE) ? "texture" : "renderbuffer"); + } + + out << "\", style=filled, fillcolor=" + << ((subresource->imported) ? + (node.resource->refs ? "palegreen" : "palegreen4") : + (node.resource->refs ? "skyblue" : "skyblue4")) + << "]\n"; } // connect passes to resources diff --git a/filament/src/fg/FrameGraph.h b/filament/src/fg/FrameGraph.h index c77ae51e47..a8733643f0 100644 --- a/filament/src/fg/FrameGraph.h +++ b/filament/src/fg/FrameGraph.h @@ -93,7 +93,7 @@ public: // Write to a resource (i.e. add a reference to that pass) template - FrameGraphId write(FrameGraphId output) { + [[nodiscard]] FrameGraphId write(FrameGraphId output) { return FrameGraphId(write(FrameGraphHandle(output))); } @@ -137,7 +137,7 @@ public: Builder(FrameGraph& fg, fg::PassNode& pass) noexcept; ~Builder() noexcept; FrameGraphHandle read(FrameGraphHandle input); - FrameGraphHandle write(FrameGraphHandle output); + [[nodiscard]] FrameGraphHandle write(FrameGraphHandle output); FrameGraph& mFrameGraph; fg::PassNode& mPass; };