Skip to content

chore: sync with dev#106

Merged
doodlum merged 9 commits into
static-branchingfrom
dev
Sep 24, 2023
Merged

chore: sync with dev#106
doodlum merged 9 commits into
static-branchingfrom
dev

Conversation

@doodlum

@doodlum doodlum commented Sep 24, 2023

Copy link
Copy Markdown
Collaborator

No description provided.

alandtse and others added 9 commits September 24, 2023 01:36
* feat: allow adjustment of compiler threads

Compiler threads may be changed in the `Advanced->Compiler Threads`
menu. Defaults to the available cores - 1, but may be adjusted from 1 to
maximum cores. Compiler threads also have been changed to `background`
priority to prevent lock ups on start.

* fix: fix ctd when terminating compiler threads

Switch to BS:thread_pool to abstract thread management and avoid
overhead of killing and starting threads. Instead, only add jobs to
pool when the number of active and queued threads is less than the
limit. The reason it's total and not just active is to avoid the case
where all tasks are dumped into the thread pool since the thread pool is
at the hardware maximum.

During compilation, one manager job is spawned to handle task
allocation and the remaining threads do the compilation work.
revert: "feat: allow adjustment of compiler threads (#99)"
* feat: allow adjustment of compiler threads

Compiler threads may be changed in the `Advanced->Compiler Threads`
menu. Defaults to the available cores - 1, but may be adjusted from 1 to
maximum cores. Compiler threads also have been changed to `background`
priority to prevent lock ups on start.

* fix: fix ctd when terminating compiler threads

Switch to BS:thread_pool to abstract thread management and avoid
overhead of killing and starting threads. Instead, only add jobs to
pool when the number of active and queued threads is less than the
limit. The reason it's total and not just active is to avoid the case
where all tasks are dumped into the thread pool since the thread pool is
at the hardware maximum.

During compilation, one manager job is spawned to handle task
allocation and the remaining threads do the compilation work.

* feat: enable skipping startup shader compilation

Users can now skip shader compilation before it is finished. Shader
compilation will continue using backgroundCompilationThread setting.
Users are also warned that this can result in visual errors or
stuttering while shaders are compiling.
@doodlum doodlum merged commit 714392b into static-branching Sep 24, 2023
ParticleTroned pushed a commit to ParticleTroned/skyrim-community-shaders that referenced this pull request Jun 11, 2026
…nity-shaders#106)

Adds a diagnostic-only Tracy GPU zone around the engine SSR raymarch
pass (`ISReflectionsRayTracing`), so the pass is visible on the Tracy
GPU timeline. Split out of community-shaders#82 (foveated SSR) since it's independent
profiling infrastructure, not part of the feature.

## What it does

Wraps the SSR raymarch DRAW with a `tracy::D3D11ZoneScope`, opened on
the shader's `PreRender` (vfunc `0x0A`) and closed on `PostRender`
(`0x0B`).

## Why these hook points

RenderDoc callstacks proved the effect renders as a pixel-shader DRAW
issued by the deferred batch renderer through the **non-virtual**
`BSImagespaceShader::Render` — not the `ImageSpaceManager` vtable Render
slot and not `DispatchComputeShader` (both of which were tried first and
never fired). `Render` brackets the draw with the per-shader
`PreRender`/`PostRender` vfuncs, which CommonLib keeps at stable indices
across SE/AE/VR (the VR-only `FakeDispatchComputeShader` inserts at
`0x0D`, after them), so hooking `0x0A`/`0x0B` on the cross-versioned
`ReflectionsRayTracing` vtable wraps exactly the SSR draw on all three
runtimes with no per-version addresses.

## Safety

- `TRACY_ENABLE`-gated — zero impact on shipping builds.
- Behaviour-preserving: each thunk only chains the original vfunc.
- Single raw zone holder is safe: render-thread only, non-nested for
this shader; the `PreRender` thunk defensively closes any prior zone if
`PostRender` were ever skipped.

Verified live (ALL-TRACY build): zone fires ~525/530 frames, ~88us
baseline.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

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.

2 participants