Closed GamerzHell9137 closed 9 years ago
Thanks, I knew that had to break something, I was surprised how little it broke for such a major change :)
I will take a look soon but might not have time until next week.
@hrydgard Major change? I guess its a good cnange. Mind if you explain what it changed? Im curious lol
@GamerzHell9137 It's a new way of keeping track of our generated shaders, which will enable some cool tricks like preloading shaders for games to avoid stutters, etc, in the future.
Anyway, that change should fix it.
Still flicker in the latest build v1.1.1-85-gb86394d
If you replace the shader gen function (but not the shader id) with the one before these changes, does the flicker go away, or is it still there?
-[Unknown]
Yes,it's working by reverting GenerateVertexShader(VSID, codeBuffer);
to GenerateVertexShader(prim, vertType, codeBuffer, useHWTransform);
Okay, if you want to try to narrow it down, I'd pass both VSID and prim/vertType/useHWTransform into the func. Then try switching parts to use the VSID (large chunks at a time.) I'd start with the bools at the top.
-[Unknown]
Reverting bool hasTexcoord = id.Bit(BIT_HAS_TEXCOORD) || !useHWTransform;
,then works fine.
or just revert hasTexcoord in this line https://github.com/hrydgard/ppsspp/commit/87f45ed307aab80a10ea91d12e311b4bd9051bdc#diff-c59d557b8f9c84ed4680bd5a1efa09b8R749
Hmm. Can you change this:
void ComputeVertexShaderID(ShaderID *id_out, u32 vertType, bool useHWTransform) {
To:
static u32 lastVertType = -1;
void ComputeVertexShaderID(ShaderID *id_out, u32 vertType, bool useHWTransform) {
lastVertType = vertType;
And then right before // In GLSL ES 3.0, you use "out" variables instead.
:
if (vertType != lastVertType) {
NOTICE_LOG(HLE, "Generating shader and vertType changed: %08x != %08x", vertType, lastVertType);
}
It sounds like hasTexcoord is changing in the first shader gen...
-[Unknown]
I don't see any NOTICE_LOG in games.
Hmm. What if you change:
if (doTextureProjection && gstate.getUVProjMode() == GE_PROJMAP_UV) {
id.SetBit(BIT_TEXCOORD_FMTSCALE, (vertType & GE_VTYPE_TC_MASK) >> GE_VTYPE_TC_SHIFT); // two bits
} else {
id.SetBit(BIT_HAS_TEXCOORD, hasTexcoord);
}
To:
id.SetBit(BIT_HAS_TEXCOORD, hasTexcoord);
if (doTextureProjection && gstate.getUVProjMode() == GE_PROJMAP_UV) {
id.SetBit(BIT_TEXCOORD_FMTSCALE, (vertType & GE_VTYPE_TC_MASK) >> GE_VTYPE_TC_SHIFT); // two bits
}
That looks like the problem.
-[Unknown]
Yes,it works fine.
Okay, 06f2c7f1fe69f1764d2e70e0e535275f4f474d09 should fix this then. Will reopen if not.
-[Unknown]
For some reason the lightning in the whole game is broken. The build that i'm using right now is v1.1.1-41-g9890460 and the behavior that it has is that the lights are represented as blocks and in some songs the reflection(?) flickers.
https://youtu.be/OHeBoEKhgDA