g3d: Implement ResMaterial and ResShaderParam - #3
Open
arayaphong wants to merge 1 commit into
Open
arayaphong wants to merge 1 commit into
arayaphong wants to merge 1 commit into
Conversation
ResMaterial\ and \ResShaderParam\
Member
|
That is unfortunate and I think we might have to change the setup to cross build for arm64 |
Author
|
I found SIMDe (https://github.com/simd-everywhere/simde), which could let the NEON intrinsics compile on x86_64. I haven't tried it yet, so I'm not sure how stable it is. |
Member
|
I don't think it's worth to add more hacks on top of |
Member
|
Hi there! The aarch64 toolchain is set up. If you rebase and revert the CMakeLists.txt changes (it's automatically globbed now), it should build (hopefully) |
arayaphong
force-pushed
the
implement/g3d-res-material
branch
from
September 28, 2026 07:48
509a7c5 to
fc6eb42
Compare
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.
Implements
nn::g3d::ResMaterialandnn::g3d::ResShaderParam(lib/g3d/src/g3d/g3d_ResMaterial.cpp), ported from the closed open-ead/nnheaders#88 as requested.ResMaterial.omatch.ResShaderParam::ConvertSrt3dCallbackis non-matching (SIMD scheduling and register allocation), markedNON_MATCHINGwith a decomp.me link: https://decomp.me/scratch/lkHXplib/g3d/include/nn/g3d/g3d_ResMaterial.h, adds the source tolib/g3d/CMakeLists.txt, and forward-declaresstruct TextureRefing3d_ResFile.h,g3d_ResModel.handg3d_ResMaterialAnim.h(they previously hadtypedef void* TextureRef, which conflicts with the real struct definition).nn/util/util_Arithmetic.handnn/gfx/gfx_Sampler.halready provide everything used here.One thing to decide:
ConvertSrt3dCallbackuses NEON intrinsics (<arm_neon.h>), which only compile for ARM targets. The PR workflow builds for the x86_64 host, so this file does not compile there. I verified the port itself is correct by compiling it for an aarch64 target, and clang-format/clang-tidy are clean. How would you like architecture-specific code handled here - an aarch64 build path, a guard, or something else?Formatted with this repo clang-format config; clang-tidy is clean.
This change is