Commit graph

11765 commits

Author SHA1 Message Date
Lioncash
45964e4b46 [Android] Initial implementation of the extended info menu.
Most fragments are not implemented yet. This is just a working base framework for it.
2014-01-07 19:47:15 -05:00
Ryan Houdek
d2e62796fc Probe the GL_RENDERER string on Nvidia to grab the driver version. 2014-01-07 18:29:04 -06:00
Ryan Houdek
7acc64eb0a [Android] Reenable the bug for dynamic UBO array member accesses.
Some information on this bug since this isn't quite true.
Seemingly with the v53 driver, Qualcomm has actually fixed this bug. So we can dynamically access UBO array members.
The issue that is cropping up is actually converting our attribute 'fposmtx' to an integer.
int posmtx = int(fpostmtx);
This line causes some seemingly garbage values to enter in to the posmtx variable.
Not sure exactly why it is failing, probably them just not actually converting the float to an integer and just handling the float directly as a integer.
So the bug is going to stay active with Qualcomm devices until we convert this vertex attribute from a float to a integer.
2014-01-07 07:56:30 -06:00
NeoBrainX
55717ed216 D3D: Verbosify an error message. 2014-01-06 10:31:09 +00:00
degasus
e6676b4565 OpenGL: fix scaled efb2ram copys
This fix a regression in revision 687097d4bc because of the wrong order of moving the sampled rect and scaling.
2014-01-05 18:19:17 +01:00
kostamarino@hotmail.com
6319b1867b Gameini database update. Update for WarioWare, Inc. Mega Party Games (gc) and The Legend of Zelda Skyward Sword (wii). Also remove the emulation notes regarding games using EA VP6 playback library.
Fixes Issue 6830.
2014-01-05 17:02:45 +02:00
Pierre Bourdon
ed67d1ae2f Fix the Zelda: The Wind Waker heat effect glitch.
Let's talk a bit about this bug. 12nd oldest bug not fixed in Dolphin, it was a
lot of fun to debug and it kept me busy for a while :)

Shoutout to Nintendo for framework.map, without which this could have taken a
lot longer.

Basic debugging using apitrace shows that the heat effect is rendered in an
interesting way:
* An EFB copy texture is created, using the hardware scaler to divide the
  texture resolution by two and that way create the blur effect.
* This texture is then warped using indirect texturing: a deformation map is
  used to "move" the texture coordinates used to sample the framebuffer copy.

Pixel shader: http://pastie.org/private/25oe1pqn6s0h5yieks1jfw

Interestingly, when looking at apitrace, the deformation texture was only 4x4
pixels... weird. It also does not have any feature that you would expect from a
deformation map. Seeing how the heat effect glitches, this deformation texture
being wrong looks like a good candidate for the problem. Let's see how it's
loaded!

By NOPing random calls to GXSetTevIndirect, we find a call that when removed
breaks the effect completely. The parameters used for this call come from the
results of methods of JPAExTexShapeArc objects. 3 different objects go through
this code path, by breaking each one we can notice that the one "controlling"
the heat effect is the one at 0x81575b98.

Following the path of this object a bit more, we can see that it has a method
called "getIndTexId". When this is called, the returned texture ID is used to
index a map and get a JPATextureArc object stored at 0x81577bec.

Nice feature of JPATextureArc: they have a getName method. For this object, it
returns "AK_kagerouInd01". We can probably use that to see how this texture
should look like, by loading it "manually" from the Wind Waker DVD.
Unfortunately I don't know how to do that. Fortunately @Abahbob got me the
texture I wanted in less than 10min after I asked him on Twitter.
AK_kagerouInd01 is a 32x32 texture that really looks like a deformation map:
http://i.imgur.com/0TfZEVj.png . Fun fact: "kagerou" means "heat haze" in JP.

So apparently we're not using the right texture object when rendering! The
GXTexObj that maps to the JPATextureArc is at offset 0x81577bf0 and points to
data at 0x80ed0460, but we're loading texture data from 0x0039d860 instead.

I started to suspect the BP write that loads the texture parameters "did not
work" somehow. Logged that and yes: nothing gets loaded to texture stage 1! ...
but it turns out this is normal, the deformation map is loaded to texture stage
5 (hardcoded in the DOL). Wait, why is the TextureCache trying to load from
texture stage 1 then?!

Because someone sucked at hex.

Fixes issue 2338.
2014-01-05 11:33:15 +01:00
degasus
c42f274e22 OpenGL: use shader 420pack if available to staticly bind ubo location
Bindung locations after compiling a shader stalls the driver. So if we manage not to bind anything after compilation, the lag would be reduced much.
2014-01-05 10:38:45 +01:00
degasus
4fff5ac90d OpenGL: drop UBO-workaround usage for efb2ram shaders
It's just brainfuck to use this workaroung there. Just fetch the uniform location like all other util shaders.
2014-01-05 09:52:26 +01:00
degasus
01351795f0 TextureCache: Warn for invalid custom textures
At the moment, custom textures with:
- invalid mipmap size
- invalid aspect ratio
- non-fractional scaling factors
are allowed. But they can't be loaded fine by the backend, so generate a warning if someone trys to load them.
2014-01-03 14:30:12 +01:00
degasus
0f0a3cc509 ogl: clamp to edge for out of bound efb access
fixes issue 6898

OpenGL defaults are GL_REPEAT, which is even more unlikely than GL_CLAMP_TO_EDGE.
As I can't test the behavoir of the real hardware, I changed it to how it works before,
but I guess just clip the texture makes more sense.
2014-01-03 08:15:19 +01:00
Rachel Bryk
509ec9cc99 Bootmanager.cpp fixes and clean up.
Some settings that bootmanger reads from game ini can be changed while a game is running, so we don't have to revert these back to what they were when starting the game, unless they were actually changed by the game ini.

Fix signed/unsigned warnings that pauldacheez pointed out.
2014-01-02 16:36:06 -05:00
Rachel Bryk
450cacd092 Allow pad settings to be set via game ini. 2014-01-02 13:13:59 -05:00
Lioncash
e6497bca5a [Android] Simplify instantiations of OverlayConfigButton.java. Also simplified resizeDrawable even more. We just acquire the resource instance and then get the display metrics directly. 2014-01-02 12:23:17 -05:00
Lioncash
5635c94a30 [Android] Simplify resizeDrawable in OverlayConfigButton.java.
Also add a missing override to onRestart in DolphinEmulator.java.
2014-01-02 11:53:28 -05:00
Ryan Houdek
0faf696be7 Merge Fail. We don't disable BaseVertex on broken pinned memory. 2014-01-01 17:20:09 -06:00
Ryan Houdek
d36355e45c Merge branch 'buffer_storage' 2014-01-01 17:14:35 -06:00
Rachel Bryk
7a818e05ef I've never claimed to be a good coder. 2014-01-01 07:45:20 -05:00
Rachel Bryk
8f34085172 Really fix android build. 2014-01-01 07:39:50 -05:00
Rachel Bryk
777c62c67a Fix android build. 2014-01-01 07:04:30 -05:00
Rachel Bryk
8a765f8749 Allow wiimote source to be set via game ini. 2014-01-01 06:59:01 -05:00
Ryan Houdek
1118226f27 Merge branch 'master' into buffer_storage 2013-12-31 19:18:30 -06:00
Ryan Houdek
8d8b0fc884 Merge branch 'master' into buffer_storage
Conflicts:
	Source/Core/VideoBackends/OGL/Src/Render.cpp
	Source/Core/VideoCommon/Src/DriverDetails.cpp
	Source/Core/VideoCommon/Src/DriverDetails.h
2013-12-31 15:41:50 -06:00
Jasper St. Pierre
16824d5fd1 Merge branch 'fuck-you-src-i-hate-you' 2013-12-31 14:07:57 -05:00
Jasper St. Pierre
34692ab826 Remove unnecessary Src/ folders 2013-12-31 14:03:19 -05:00
Jasper St. Pierre
43e618682e Convert all vcxproj files to UNIX line endings 2013-12-31 14:03:18 -05:00
Jasper St. Pierre
b6ad8bd712 HW: Remove unnecessary "../HW/" in include paths 2013-12-31 14:03:17 -05:00
Jasper St. Pierre
70d4d973f9 TAP_Win32: Remove unnecessary Memmap.h include 2013-12-31 14:00:06 -05:00
Ryan Houdek
6d63db96e9 Disable primitive restart on buggy OS X Intel HD 3000 drivers. 2013-12-30 18:26:55 -06:00
Tony Wasserka
de16b7207c D3D/OGL: Add a TODO noting that we don't support GX_CULL_ALL, most notably required for accurate zfreeze emulation. 2013-12-30 20:37:59 +01:00
Tony Wasserka
3aa0a63fe6 VertexShaderGen: Remove Sonic Unleashed hack. Doesn't seem to be required anymore.
Either way, even if it's still needed for anything, this is not the correct way to fix the issue.
2013-12-30 20:28:07 +01:00
NeoBrainX
3cfa04b5cf VertexShaderManager: Remove a hardcoded projection hack. 2013-12-30 19:26:10 +00:00
Tony Wasserka
bbde075420 Software renderer: Add a zfreeze related TODO. 2013-12-30 20:18:53 +01:00
Ryan Houdek
a5bfdbf6cd Free performance for AMD+Linux. Instead of disabling BaseVertex due to pinned_memory. Just disable pinned_memory for the ELEMENT_ARRAY_BUFFER type which has issues with baseVertex(ELEMENT_ARRAY_BUFFER)+pinned_memory. In my two tests with this, I went from 5FPS to 11FPS in one test, and 2FPS to 6FPS in another. 2013-12-28 08:00:44 -06:00
Ryan Houdek
0b31fc8f52 [buffer_storage] Temporary fix for Android/GLES3 just like how everything else is. Cleanup for this will be in a new branch. 2013-12-28 05:16:39 -06:00
Ryan Houdek
8fdcba0c06 [buffer_storage] Code formatting changes suggested by Bh44L 2013-12-28 05:15:43 -06:00
Ryan Houdek
935e1fdf99 [Android] Enable shader cache. 2013-12-28 04:55:39 -06:00
Ryan Houdek
c8cdc81ce3 [ARM] Implement tw/twi 2013-12-28 04:43:07 -06:00
Ryan Houdek
d8b7f4d73f [Android] Support grabbing OpenGL extensions and a function for checking for support. 2013-12-28 01:08:52 -06:00
Ryan Houdek
e04edd89cc Support grabbing whichever OpenGL mode we are running under from GLInterface. GLES or GL 2013-12-28 00:58:08 -06:00
Ryan Houdek
77ba051361 [buffer_storage] Add the CLIENT_STORAGE_BIT since we access the buffer more frequently on the client side than the server side. That is exactly what the hint is for. 2013-12-27 22:58:36 -06:00
Jordan Woyak
8230da26fe Fixed issue 6245. (ISO Path's "Remove" button not being disabled when it should be) 2013-12-27 17:16:28 -06:00
Jordan Woyak
620bf0b304 Eliminate some Wiimote acceleration logic redundancy.
Yeah, I eliminated a total of 3 LSB of accel data in the process, but no one will notice.
2013-12-27 16:35:11 -06:00
Jordan Woyak
c5695c987b Revert "Reading shake force from calibration rather than a constant"
It didn't make sense. The math was nonsensical. Calibration data was somehow applied twice. I don't even.

This reverts commit 4dad640d5f.

Fixed issue 6702.
2013-12-27 16:00:59 -06:00
Ryan Houdek
d8ceb97a60 [buffer_storage] Require GLEW 1.10 which has the new OpenGL 4.4 methods. Fixes linux build. 2013-12-27 15:37:31 -06:00
Ryan Houdek
ce99921c20 [buffer_storage] Implement ARB_buffer_storage. Disable it for GL_ARRAY_BUFFER due to a bug in Nvidia's drivers that causes black screen with it. 2013-12-27 10:56:03 -06:00
Jordan Woyak
4d1f113ab1 Fix some emulated wiimote turntable stupidness (DJ Hero controller). Happy Christmas!
Fixed issue 6865.
2013-12-25 15:33:33 -06:00
Ryan Houdek
2ed24d5311 [Android] Fix the gradle build system to allow for building from terminal. It will now copy the library files correctly and sign the resulting apk. 2013-12-24 15:28:24 -06:00
Ryan Houdek
a87e0e7489 Remove our GLU dependency. Fix static zlib 2013-12-23 16:01:34 -07:00
Ryan Houdek
86b3719d14 [Android] Add a gradle build file for use with Android Studio 4.0 2013-12-23 12:26:55 -07:00