Skip to content

Translate remaining functions from winasm.asm - #111

Merged
ZivDero merged 14 commits into
OpenTS-Developers:mainfrom
tinix0:translate-voxel-drawing-colour
Sep 3, 2026
Merged

Translate remaining functions from winasm.asm#111
ZivDero merged 14 commits into
OpenTS-Developers:mainfrom
tinix0:translate-voxel-drawing-colour

Conversation

@tinix0

@tinix0 tinix0 commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Translates Adjust_Color and Brighten_Color from ASM to C++. Only MMX variant is kept since we target SSE2. Drops ASM functions from VoxelDrawFunctions and fixes up the C++ implementation to match ASM. Validated with generated tests that compare C++ outputs against original assembly outputs.

@github-actions

github-actions Bot commented Sep 2, 2026

Copy link
Copy Markdown

Development builds of 63f778a:

The links work without a GitHub account. Artifacts expire after 90 days, and this comment follows the latest successful build.

@tinix0
tinix0 force-pushed the translate-voxel-drawing-colour branch 2 times, most recently from 499a2a2 to 32b9a53 Compare September 2, 2026 17:19

@ZivDero ZivDero left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few notes.

  • There is some confusion going on here with MMX/non-MMX. Probably just better to drop any MMX references.
  • The test is wrong because VoxelNormalTranslateTable is not initialized in it.
  • colorgolden.h still carries 32 non-MMX brighten cases that coloropstest.cpp skips with if (test.Mmx == 0) continue; drop them from the generator now that the path is gone. The two separate if (format.Mask == ALTERNATE_MARKER) blocks in Brighten_Color want to be one if/else. And UseMMX/UseCMOV in getcpu.cpp become dead once winasm.asm goes (unvq_asm.asm doesn't reference them).

Comment thread code/voxlib.cpp Outdated
@tinix0
tinix0 force-pushed the translate-voxel-drawing-colour branch from 32b9a53 to 63f778a Compare September 3, 2026 19:07
@tinix0
tinix0 requested a review from ZivDero September 3, 2026 19:07
@ZivDero
ZivDero merged commit c79fbe3 into OpenTS-Developers:main Sep 3, 2026
5 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