[pull] master from beyond-all-reason:master - #51
Merged
Conversation
Ghost drawing in GLSL was inline in DrawAlphaUnit. Ghost drawing in GL4 was further inlined into DrawAlphaObjects. Both needed flags to pass around which makes the whole thing kinda awkward. This was ok in current world but the follow up PRs add more params so it's best to split them ahead of time. We pull the ghost drawing impl out into its own DrawGhostedBuildings function in both paths, then call them from DrawAlphaObjects. Simplifies the code and also makes the GLSL/GL4 paths more symmetric. Pure refactor, no behavior change. Co-authored-by: Bruno Da Silva <Bruno-DaSilva@users.noreply.github.com>
…een under (#3108) This fixes two bugs: 1. recently we added custom color palette functionality, but that was not extended to ghosts (so they are currently using just the team color). 2. Live ghosts read the color from the live CUnit at draw time, so if a unit changes team while in fog of war (eg. unit gifts), that information would be leaked. So, to fix, we now a) use paletteIndex for ghost color and b) snapshot the last seen paletteIndex for that unit. Co-authored-by: Bruno Da Silva <Bruno-DaSilva@users.noreply.github.com>
Extract the build + queue impl out of AddToSubmissionImpl into a private EmplaceInstance(), so in the next PR we can add another caller to EmplaceInstance(). Results in cleaner code without passing around a bunch of flags in the follow ups. Behavior should be unchanged. Co-authored-by: Bruno Da Silva <Bruno-DaSilva@users.noreply.github.com>
* refactor(GL4): replace matrix modes magic number with an enum
Add SetFlag("MATMODE_XXX", ...) alongside the existing GBUFFER_*_IDX flags so
the GL4 model shaders can reference the matrix-mode enum value by name instead
of hardcoding a literal.
Intended as a precursor for the ghost draw perf fixes, which add a third mode in the shader.
* refactor(GL4): add ARRAY_MATMODE static-instanced model draw path
* perf(GL4): batch ghost-building rendering via ARRAY_MATMODE
Ghost buildings are static (no animation, never move), so each gets a single
world-transform slot in the transforms SSBO, and is drawn batched through
ARRAY_MATMODE. One multidraw per (color bucket x texture type) instead of one
immediate draw per ghost.
---------
Co-authored-by: Bruno Da Silva <Bruno-DaSilva@users.noreply.github.com>
- Removed `lcstr` and `lcsub` arrays to save 64KB of BSS data per translation. - Removed unsafe inline implementation of `StrCaseStr` to eliminate multi-threaded race conditions.
…ownership (#2613) When bound through uikeys, Mouse4/5 (aka XButtons) try to assign ownership to gameInputReceiver. This causes either the mouse input or the X-button bind to be misrouted when pressed in combination. To prevent this, Mouse4/5 are routed like keybinds instead of sharing mouse ownership. This allows them to be pressed/released without stealing or confusing the activeReceiver.
) smmalloc.h defines `#define INLINE inline`, a very generic token that collides with unrelated code (e.g. simdjson's layout_mode::INLINE enumerator) whenever both land in the same translation unit. Instead of undef-ing INLINE at each affected site, add System/recoil-smmalloc.h which includes smmalloc and drops the macro, and route the engine's single smmalloc include (MemPoolTypes.h) through it. The macro can no longer escape into engine code, so a future file mixing smmalloc with json/etc. won't reintroduce the collision. Surfaced by the macOS port (#2991, commit 16622a9). The upstream smmalloc leak is worth fixing there too. Co-authored-by: Mark Kropf <markkropf@gmail.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )