Repository navigation
shaders: use the non-const context from context::current() - #5
Merged
Merged
Conversation
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 Report❌ Patch coverage is
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. |
igagis
approved these changes
Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Companion to cppfw/ruis#196.
ruis::render::context::current()now returns a non-constcontext&, so:shader_common.cpp: theconst_castis gone; the downcast to the vulkan context is guarded by a debug-onlyutki::assert(dynamic_cast(...))(same idiom already used fortexture_2dinshader_pos_tex.cpp).shader_pos_tex.cpp: the blend-state block now usescurrent()directly — no cast at all.Depends on cppfw/ruis#196 (builds against the new ruis API).
Test plan