Skip to content

shaders: use the non-const context from context::current() - #5

Merged
igagis-bot merged 2 commits into
cppfw:mainfrom
igagis-bot:shaders/use-nonconst-current
Nov 24, 2026
Merged

igagis-bot merged 2 commits into
cppfw:mainfrom
igagis-bot:shaders/use-nonconst-current

Conversation

@igagis-bot

Copy link
Copy Markdown
Contributor

Summary

Companion to cppfw/ruis#196.

ruis::render::context::current() now returns a non-const context&, so:

  • shader_common.cpp: the const_cast is gone; the downcast to the vulkan context is guarded by a debug-only utki::assert(dynamic_cast(...)) (same idiom already used for texture_2d in shader_pos_tex.cpp).
  • shader_pos_tex.cpp: the blend-state block now uses current() directly — no cast at all.

Depends on cppfw/ruis#196 (builds against the new ruis API).

Test plan

  • Full monorepo rebuild: OK
  • Full test suite: all pass
  • check-format-ruis-render-vulkan: pass
  • Integration CI via the companion monorepo PR (pinning both heads)

context::current() now returns a non-const context& (ruis), so the
const_cast is gone; the downcast to the vulkan context is guarded by
a debug-only utki::assert(dynamic_cast).
@codecov

codecov Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 0.00%. Comparing base (e6b74bc) to head (ad3ed68).

Files with missing lines Patch % Lines
src/ruis/render/vulkan/shaders/shader_common.cpp 0.00% 2 Missing ⚠️
src/ruis/render/vulkan/shaders/shader_pos_tex.cpp 0.00% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##            main      #5   +/-   ##
=====================================
  Coverage   0.00%   0.00%           
=====================================
  Files         24      24           
  Lines       1387    1389    +2     
  Branches     498     499    +1     
=====================================
- Misses      1387    1389    +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

@igagis-bot
igagis-bot merged commit 9e79ab6 into cppfw:main Nov 24, 2026
23 checks passed
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.

2 participants