mirror of
https://github.com/mitch030504/Wiicompiled_VR_Frame.git
synced 2026-10-06 02:00:14 +02:00
Keep the position descriptor that GXClearVtxDesc leaves set
Nintendo's GXClearVtxDesc, and Aurora's, keep GX_VA_POS at GX_DIRECT. The HLE mirror cleared it to GX_NONE, so the next draw could publish no position attribute and abort shader generation while a scene loads. Keep the mirror in step, and give the shader a zero position if a stream still arrives without one. Ported from heurazy/Wiicompiled_VR-PLUS (c2b2500). Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Sabhzu6VgoWcHtpSk4C9KZ
This commit is contained in:
2 files changed
+12
No files matched your search
@@ -559,6 +559,12 @@ static AlphaCompareExpr alpha_compare(GXCompare comp, u8 ref) {
|
||||
static inline std::string vtx_attr(const ShaderConfig& config, GXAttr attr) {
|
||||
const auto type = config.attrs[attr].attrType;
|
||||
if (type == GX_NONE) {
|
||||
if (attr == GX_VA_POS) {
|
||||
// Some scene transitions submit a vertex stream with no position attribute.
|
||||
// The resulting primitive has no useful geometry, but shader generation
|
||||
// must not abort the entire game while the next scene is loading.
|
||||
return "vec3f(0.0)"s;
|
||||
}
|
||||
if (attr == GX_VA_PNMTXIDX) {
|
||||
return "ubuf.current_pnmtx";
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user