Skip to content

reset texrender->rendered flag when canvas switches#751

Merged
sandboxcoder merged 2 commits into
streamlabsfrom
rno/filter
Jul 9, 2026
Merged

reset texrender->rendered flag when canvas switches#751
sandboxcoder merged 2 commits into
streamlabsfrom
rno/filter

Conversation

@sandboxcoder

@sandboxcoder sandboxcoder commented Jul 9, 2026

Copy link
Copy Markdown

Description

  • Add filter_texrender_canvas tracking so we can detect when a different canvas is used and trigger gs_texrender_reset
  • Fix preexisting issue- when scene filter is active, scene items marked recording_active (Desktop selective recording feature) could still be rendered

Motivation and Context

Resolve issue that occurs when user applies a filter to the Scene which caused items to not render because Desktop uses multiple canvases.

How Has This Been Tested?

  • Tested adding a filter to a Scene in Desktop
  • Add scene filters with dual output off and on. Verify horizontal and vertical canvases both remain visible
  • Test main/streaming/recording visibility differences with a scene filter active
  • Test same-size horizontal/vertical canvases if possible. Horizontal 1920x1080 and vertical  1080x1920
  • Include crop, color correction, visual presets, and chained filters.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • My code has been run through clang-format.
  • I have read the contributing document.
  • My code is not on the streamlabs branch.
  • The code has been tested.
  • All commit messages are properly formatted and commits squashed where appropriate.
  • I have included updates to all appropriate documentation.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes a rendering issue when the same filter texrender is used across multiple canvases within a single frame by tracking the active render canvas and resetting the texrender’s internal “rendered” state when the canvas changes.

Changes:

  • Add filter_texrender_canvas to obs_source to remember the last canvas identity used for filter rendering.
  • Reset gs_texrender_t::rendered via gs_texrender_reset() when obs->video_rendering_mix->canvas_ovi changes.
  • Clear the tracked canvas when the filter texrender is destroyed/recreated due to size/format changes.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
libobs/obs-source.c Tracks current render canvas and resets filter texrender when switching canvases.
libobs/obs-internal.h Adds per-source state (filter_texrender_canvas) to store the last canvas identity.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@sandboxcoder
sandboxcoder merged commit 8979988 into streamlabs Jul 9, 2026
14 of 15 checks passed
sandboxcoder added a commit that referenced this pull request Jul 9, 2026
* reset texrender->rendered flag when canvas switches
* call gs_texrender_reset() when rendering_mode changes
sandboxcoder added a commit that referenced this pull request Jul 16, 2026
* Guard DirectShow filter activation (#740)

* libobs: append message/get_messages to obs_source_info (#735)

* libobs: bound volmeter plane index against MAX_AV_PLANES (#737)

* libobs: mix scene-item audio when item canvas is unset (#738)

* libobs: Fix use-after-free of canvas view in audio thread (#736)

* Add structured module load failures (#741)

* Fix macOS Xcode 26.4 build (#748)

* Fix macOS Xcode 26.4 build

* Windows build fix for spout2

* Fix NDI 6 runtime loading on macOS (#746)

* obs-browser: re-check validity under graphics lock in OnAcceleratedPaint

Bump plugins/obs-browser to 5b30996 to pull in the OnAcceleratedPaint
teardown-race guard (streamlabs/obs-browser#54), which fixes the libcef
crash on BrowserManagerThread seen in dual-output sessions with browser
sources. Branched from 31.1.2sl19.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* obs-browser: bump for GPU-process crash-limit flag

Bump plugins/obs-browser 5b30996 -> 9d18953 to add --disable-gpu-process-crash-limit
(streamlabs/obs-browser#54), so a transient GPU reset (TDR) no longer escalates to
Chromium's fatal 'GPU process isn't usable' abort. Combines with the OnAcceleratedPaint
teardown guard already in this bump.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* obs-browser: re-point submodule to merged #54 squash commit

Bump plugins/obs-browser 9d18953 -> 4002dac, the squash-merge of
streamlabs/obs-browser#54 on streamlabs (GPU-process crash-limit flag +
OnAcceleratedPaint teardown guard). Replaces the pre-merge PR-branch pointer.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* Fix NDI 6 runtime loading on macOS

---------

Co-authored-by: Vladimir Sumarov <summeroff@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

* update mediaconnector to streamlabs branch (#750)

* reset texrender->rendered flag when canvas switches (#751)

* reset texrender->rendered flag when canvas switches
* call gs_texrender_reset() when rendering_mode changes

* [MacOS] fix mediasoup-connector compile error on Clang 21

* free module after initialization fails

* fix merge mistake - call module->load() once

* set NULL to avoid heap alloc

* update mediasoup-connector (Clang 21 fix)

* update obs-browser

* set obs-ndi submodule

---------

Co-authored-by: Aleksandr Voitenko <aleksandr.voitenko1986@gmail.com>
Co-authored-by: Vladimir <summeroff@gmail.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants