/home/buildbot/bin/send_build.py ** RUNNING ON BUILDMASTER ** in dir /home/buildbot/master argv: ['/bin/sh', '-c', '/home/buildbot/bin/send_build.py'] env: {'HASH': u'ed67d1ae2f9693ed42867a2e79b7cae4427574e3', 'DESCRIPTION': u'Fix the Zelda: The Wind Waker heat effect glitch.\n\nLet\'s talk a bit about this bug. 12nd oldest bug not fixed in Dolphin, it was a\nlot of fun to debug and it kept me busy for a while :)\n\nShoutout to Nintendo for framework.map, without which this could have taken a\nlot longer.\n\nBasic debugging using apitrace shows that the heat effect is rendered in an\ninteresting way:\n* An EFB copy texture is created, using the hardware scaler to divide the\n texture resolution by two and that way create the blur effect.\n* This texture is then warped using indirect texturing: a deformation map is\n used to "move" the texture coordinates used to sample the framebuffer copy.\n\nPixel shader: http://pastie.org/private/25oe1pqn6s0h5yieks1jfw\n\nInterestingly, when looking at apitrace, the deformation texture was only 4x4\npixels... weird. It also does not have any feature that you would expect from a\ndeformation map. Seeing how the heat effect glitches, this deformation texture\nbeing wrong looks like a good candidate for the problem. Let\'s see how it\'s\nloaded!\n\nBy NOPing random calls to GXSetTevIndirect, we find a call that when removed\nbreaks the effect completely. The parameters used for this call come from the\nresults of methods of JPAExTexShapeArc objects. 3 different objects go through\nthis code path, by breaking each one we can notice that the one "controlling"\nthe heat effect is the one at 0x81575b98.\n\nFollowing the path of this object a bit more, we can see that it has a method\ncalled "getIndTexId". When this is called, the returned texture ID is used to\nindex a map and get a JPATextureArc object stored at 0x81577bec.\n\nNice feature of JPATextureArc: they have a getName method. For this object, it\nreturns "AK_kagerouInd01". We can probably use that to see how this texture\nshould look like, by loading it "manually" from the Wind Waker DVD.\nUnfortunately I don\'t know how to do that. Fortunately @Abahbob got me the\ntexture I wanted in less than 10min after I asked him on Twitter.\nAK_kagerouInd01 is a 32x32 texture that really looks like a deformation map:\nhttp://i.imgur.com/0TfZEVj.png . Fun fact: "kagerou" means "heat haze" in JP.\n\nSo apparently we\'re not using the right texture object when rendering! The\nGXTexObj that maps to the JPATextureArc is at offset 0x81577bf0 and points to\ndata at 0x80ed0460, but we\'re loading texture data from 0x0039d860 instead.\n\nI started to suspect the BP write that loads the texture parameters "did not\nwork" somehow. Logged that and yes: nothing gets loaded to texture stage 1! ...\nbut it turns out this is normal, the deformation map is loaded to texture stage\n5 (hardcoded in the DOL). Wait, why is the TextureCache trying to load from\ntexture stage 1 then?!\n\nBecause someone sucked at hex.\n\nFixes issue 2338.', 'AUTHOR': u'Pierre Bourdon', 'BUILD_URL': u'http://dl.dolphin-emu.org/builds/dolphin-master-4.0-593_amd64.deb', 'SHORTREV': u'4.0-593', 'BRANCH': u'master', 'BUILD_TYPE': 'ubu'} OK exit status 0