Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Mours <pmours@nvidia.com>2022-06-01 16:26:55 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-06-03 19:56:30 +0300
commit34f94a02f37005210f629f04635c457d98ff5f91 (patch)
tree4339231acf82070c1e8c6f1c71f52640eb069dd8 /intern/cycles/hydra/output_driver.cpp
parent7f7ed8e0989d3c6a3078404567e7da419d6f92f5 (diff)
Fix use of OpenGL interop breaking in Hydra viewports that do not support it
Rendering directly to a resource using OpenGL interop and Hgi doesn't work in Houdini, since it never uses the resulting resource (it does not call `HdRenderBuffer::GetResource`). But since doing that simultaneously disables mapping (`HdRenderBuffer::Map` is not implemented then), nothing was displayed. To fix this, keep track of whether a Hydra viewport does support displaying a Hgi resource directly, by checking whether `HdRenderBuffer::GetResource` is ever called and only enable use of OpenGL interop if that is the case. Differential Revision: https://developer.blender.org/D15090
Diffstat (limited to 'intern/cycles/hydra/output_driver.cpp')
-rw-r--r--intern/cycles/hydra/output_driver.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/intern/cycles/hydra/output_driver.cpp b/intern/cycles/hydra/output_driver.cpp
index c5f64ac1c18..f4ea853f243 100644
--- a/intern/cycles/hydra/output_driver.cpp
+++ b/intern/cycles/hydra/output_driver.cpp
@@ -30,11 +30,11 @@ bool HdCyclesOutputDriver::update_render_tile(const Tile &tile)
std::vector<float> pixels;
for (const HdRenderPassAovBinding &aovBinding : _renderParam->GetAovBindings()) {
- if (aovBinding == _renderParam->GetDisplayAovBinding()) {
- continue; // Display AOV binding is already updated by Cycles display driver
- }
-
if (const auto renderBuffer = static_cast<HdCyclesRenderBuffer *>(aovBinding.renderBuffer)) {
+ if (aovBinding == _renderParam->GetDisplayAovBinding() && renderBuffer->IsResourceUsed()) {
+ continue; // Display AOV binding is already updated by Cycles display driver
+ }
+
const HdFormat format = renderBuffer->GetFormat();
if (format == HdFormatInvalid) {
continue; // Skip invalid AOV bindings