Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
name: Bug report
about: Report a bug or crash
title: "[BUG] "
labels: bug
assignees: ''
---

## Describe the bug

<!-- A clear description of what the bug is. -->

## To reproduce

1.
2.
3.

## Expected behavior

<!-- What you expected to happen. -->

## Actual behavior

<!-- What actually happened. -->

## Device info

- **Device model:**
- **Android version:**
- **GPU** (run `adb logcat -s GPUInformation` if unsure):
- **RAM:**
- **WinNative version** (Settings → About):
- **Game:**
- **Game source:** Steam / Epic / GOG / manual
- **Custom Wine/DXVK/Box64 version?** (if yes, which):

## Logs

```
Paste logcat output here. Filter by:
adb logcat -s AuroraDeviceTier AuroraTierPresets AuroraNTSync AuroraMemBudget AuroraSanitizer AuroraMaliSanitizer WinNative

If the bug is a crash, also include:
adb logcat -s AndroidRuntime DEBUG
```

## Aurora tier detected

<!-- Check logcat for "AuroraDeviceTier: Device classified as X" and fill in: -->

- Tier: HIGH / MID / LOW
- Mali sanitizer active: yes / no / fallback

## Additional context

<!-- Screenshots, save files, or anything else relevant. -->
35 changes: 35 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
name: Feature request
about: Suggest a new feature or improvement
title: "[FEAT] "
labels: enhancement
assignees: ''
---

## Problem

<!-- What problem does this feature solve? (e.g. "Game X crashes on launch because...") -->

## Proposed solution

<!-- Describe the feature you'd like. Be specific about the expected behavior. -->

## Alternatives considered

<!-- What other ways could this be solved? Why is your proposal better? -->

## Tier impact

<!-- Does this affect HIGH / MID / LOW tier devices differently? -->

## Verification

<!-- If this is a perf claim, how would you verify it works? If it's a correctness fix, what's the test case? -->

## Will you work on this?

<!-- Yes / No / Maybe. We welcome PRs! -->

## Additional context

<!-- Links to upstream PRs, related issues, etc. -->
51 changes: 51 additions & 0 deletions .github/ISSUE_TEMPLATE/performance_issue.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
name: Performance issue
about: Report poor performance on a specific device/game
title: "[PERF] "
labels: performance
assignees: ''
---

## Device

- **Device model:**
- **SoC:**
- **Android version:**
- **GPU:**
- **RAM:**
- **Tier detected** (check logcat `AuroraDeviceTier`):

## Game

- **Title:**
- **Source:** Steam / Epic / GOG / manual
- **In-game settings:** (resolution, quality preset, etc.)

## Performance

- **Average FPS:**
- **1% low FPS:**
- **Frame time stability** (smooth / stuttery / micro-stutters):
- **Comparison to expectation** (e.g. "expected 30 FPS, getting 15"):

## Current env vars

<!-- Run `adb logcat -s AuroraTierPresets GuestProgramLauncherComponent` and paste the env excerpt here, OR list the env vars from the container config. -->

```
Paste env vars here
```

## What I've tried

<!-- Did you try changing any settings? Override any env vars? Which ones helped/hurt? -->

## Logs

```
adb logcat -s AuroraDeviceTier AuroraTierPresets AuroraNTSync AuroraMemBudget AuroraSanitizer PerformanceRecorder
```

## Benchmark data (optional)

<!-- If you have FPS numbers with/without a specific setting, share them. This helps calibrate the tier presets. -->
48 changes: 48 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
## Summary

<!-- One paragraph: what does this PR do and why? -->

## Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] Documentation update
- [ ] Tier preset calibration (requires benchmark data — see below)

## Changes

<!-- List the specific changes. Reference issue numbers if applicable. -->

-
-
-

## Tier preset changes (if applicable)

<!-- If you changed TierPresets.kt, you MUST include benchmark data: -->

| Device | Game | Setting changed | FPS before | FPS after |
|---|---|---|---|---|
| | | | | |

## Verification

- [ ] `./gradlew spotlessApply` passes locally
- [ ] `./gradlew assembleStandardDebug` passes locally
- [ ] CI passes (will run automatically on push)
- [ ] Tested on real device (specify which):
- [ ] Logcat output attached (if bug/perf fix):

## Checklist

- [ ] Code follows the project style (see CONTRIBUTING.md)
- [ ] No new TODOs left without explicit naming in the summary
- [ ] No stubs presented as finished features (every function has a real producer and consumer)
- [ ] JNI boundaries null-check and validate lengths
- [ ] Commit messages follow Conventional Commits
- [ ] Documentation updated (README.md, docs/, CHANGELOG.md as appropriate)

## Notes for reviewer

<!-- Anything specific you want the reviewer to focus on? -->
11 changes: 11 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,3 +53,14 @@ signing.properties
References/
*.hprof
android_sysvshm/build64/

# Secrets — never commit tokens, passwords, or keys
.env
.env.*
*.pem
*.key
*token*
ghp_*
github_token*
askpass*
.git-askpass*
55 changes: 55 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Changelog

All notable changes to this WinNative fork are documented here.
Format based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Forked from WinNative upstream at commit `eaa4640` (2026-06-23).
- Ported Aurora Mali Vulkan Sanitizer (5 rules) from Aurora `bbe084d`, with two
additional correctness fixes on top:
- **B4**: dynamic offsets now sliced correctly per chunk in
`vkCmdBindDescriptorSets`. New tracking hooks: `vkCreateDescriptorSetLayout`,
`vkAllocateDescriptorSets`, `vkFreeDescriptorSets`. Original Aurora code
dumped all offsets on chunk 1 and zero on chunks 2+, causing silent wrong
rendering for draws using sets 4+ with dynamic UBO bindings.
- **B6**: device resolved per command buffer via
`VkCommandBuffer → VkDevice` map. New tracking hooks:
`vkAllocateCommandBuffers`, `vkFreeCommandBuffers`. Original Aurora
hard-coded `g_device_dispatch[0]`, breaking multi-device scenarios.
- Inherits Aurora's audit fixes: B1 (layer name match), B2 (env var ordering),
B3 (glibc compile via `#ifdef __BIONIC__`), B5 (thread-safe dispatch via
`std::shared_mutex`), B9 (Immortalis detection).
- Added `DeviceTier` — classifies device as HIGH/MID/LOW by SoC + RAM + GPU.
- Added `TierPresets` — per-tier Box64/DXVK/Wine env-var defaults, applied via
`putIfAbsent` so user overrides win.
- Added `NTSyncHelper` — auto-detects `/dev/ntsync` (Linux 6.14+) and switches
from esync to NTSync for ~10-20% sync overhead reduction.
- Added `MemoryBudgetHelper` — caps DXVK pipeline cache by RAM, disables
PulseAudio on <4 GB devices.
- Added `EnvVars.putIfAbsent()` for tier presets.
- Added CMake target for `libaurora_mali_sanitizer.so`.
- Added `ImageFsInstaller.deployAuroraMaliSanitizer()` — deploys .so + JSON
manifest to `imagefs/usr/lib/` at install time.
- Wired Aurora helpers into `GuestProgramLauncherComponent.execGuestProgram()`
after `envVars.putAll(this.envVars)` (B2-correct ordering).

### Dropped (vs original Aurora)
- Phase 1 AOT texture engine (no PC game ships `.ktx2`).
- Phase 2 mesh LOD engine (no PC game ships `.obj`).
- Phase 3 Markov prefetcher (no `libaurora_prefetch.so` exists).
- Phase 4 cloud shader sync (no backend).

### Documentation
- Added `docs/AUDIT.md` — deep audit of original Aurora (16 bugs found).
- Added `docs/TIER_TUNING.md` — rationale for each tier preset.
- Added `docs/MALI_SANITIZER.md` — how the Vulkan layer works.
- Added `CONTRIBUTING.md`.
- Added issue/PR templates.
- Rewrote `README.md` for this fork.

## [0.1.0] — 2026-06-24

Initial fork release. Based on WinNative `eaa4640` + Aurora `bbe084d`.
28 changes: 28 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Code of Conduct

## Our pledge

We are committed to making participation in this project a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.

## Standards

**Positive behavior:**
- Using welcoming and inclusive language
- Being respectful of differing viewpoints and experiences
- Gracefully accepting constructive criticism
- Focusing on what is best for the community
- Showing empathy towards other community members

**Unacceptable behavior:**
- Trolling, insulting/derogatory comments, and personal or political attacks
- Public or private harassment
- Publishing others' private information without explicit permission
- Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the maintainer via GitHub. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances.

## Attribution

Adapted from the [Contributor Covenant](https://www.contributor-covenant.org/), version 2.1.
103 changes: 103 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
# Contributing to WinNative × Aurora

Thanks for your interest in contributing! This is a community fork of [WinNative](https://github.com/WinNative-Emu/WinNative) that adds Aurora's Mali GPU support and device-tier performance tuning.

## Quick start

```bash
git clone --recurse-submodules https://github.com/boiniArun2006/WinNative.git
cd WinNative
rustup target add aarch64-linux-android
./gradlew assembleStandardDebug
```

PRs require CI to pass before merge. The CI matrix builds three flavors (Standard, Ludashi, PUBG) and runs on `ubuntu-latest` with JDK 17 + NDK 27.3.

## What to contribute

**Welcome:**
- Bug fixes (especially Mali driver edge cases, Box64/DXVK env var tuning)
- New game fixes in `runtime/compat/gamefixes/`
- Device-tier calibration (real-world benchmark data from mid-end hardware)
- Translations (see `app/src/main/res/values-*/`)
- Documentation improvements

**Needs maintainer discussion first:**
- New Aurora engines (the audit dropped 4 of 6 as dead code — don't reintroduce without a real producer+consumer)
- Changes to the Vulkan sanitizer's rule set
- Bumping Box64/Wine/DXVK/Proton versions (these need testing across multiple games)
- Architecture changes to the `runtime/aurora/` module

**Will not accept:**
- DRM circumvention
- Bundled copyrighted game files
- Telemetry that isn't opt-in
- Reintroduction of the dropped Aurora phases (texture/mesh/prefetch/cloud-sync) without a working end-to-end implementation

## Code style

- Kotlin: follow existing style. Run `./gradlew spotlessApply` before committing.
- Java: 4-space indent, no tabs. Match the style of the file you're editing.
- C/C++: 2-space indent for new Aurora code (matches WinNative's `winlator/` style). Existing vendored code (meshoptimizer, basisu) keeps its own style.
- JNI: null-check every `Get*ArrayElements`/`GetStringUTFChars` result. Free every allocation on every return path. Validate array lengths against claimed counts.

## Commit messages

Follow [Conventional Commits](https://www.conventionalcommits.org/):

```
feat(aurora): add B4 dynamic-offset split fix
fix(sanitizer): handle null pDynamicOffsets in split path
docs: update tier tuning rationale
chore(deps): bump orgJson to 20240303 (CVE-2024-57699)
```

## Pull request process

1. Fork the repo and create a branch from `main`:
```bash
git checkout -b fix/my-bugfix
```
2. Make your changes. Keep commits focused — one logical change per commit.
3. Run `./gradlew spotlessApply assembleStandardDebug` locally.
4. Push and open a PR against `main`. Fill in the PR template.
5. CI runs automatically. Address any failures.
6. A maintainer will review. Be responsive to feedback.

## Adding a new game fix

Game fixes live in `runtime/compat/gamefixes/GameFixes.java`. Each fix is a `Fix` subclass (`RegistryKeyFix`, `EnvVarFix`, `GogDependencyFix`, etc.) keyed by the game's store-specific ID:

```java
steamFixes.put("123456",
new EnvVarFix(Collections.singletonMap("WINEDLLOVERRIDES", "d3d11=n;bypass=n")));
```

For complex fixes, add a helper class in `runtime/compat/gamefixes/helpers/`. Include a comment explaining what the fix does and why — these get referenced years later.

## Adding a new device tier preset

If you have benchmark data showing a tier preset should change:

1. Edit `runtime/aurora/TierPresets.kt`.
2. Add a comment citing the benchmark (device, game, FPS before/after).
3. Update `docs/TIER_TUNING.md` with the rationale.
4. Open a PR with the benchmark data in the description.

## Reporting bugs

Use the issue templates. Include:
- Device model and Android version
- GPU (run `adb logcat -s GPUInformation` if unsure)
- WinNative version (from Settings → About)
- The game and how you launched it (Steam/Epic/GOG/manual)
- Logcat output (filter by `AuroraDeviceTier`, `AuroraTierPresets`, `AuroraSanitizer`, `WinNative`)
- Whether you're using a custom Wine/DXVK/Box64 version

## Security

Found a security issue? Don't open a public issue. Email the maintainer directly.

## License

By contributing, you agree your contributions are licensed under GPL-3.0, same as the rest of the project.
Loading