Commit Graph

198 Commits

Author SHA1 Message Date
Henrik Rydgard
f24b1495ba Assorted texture format cleanup, prep for supporting D3D11 on Win7 2017-02-22 16:23:04 +01:00
Henrik Rydgard
6a09d45aee D3D11: Add proper checks for B4G4R4A4 format support. Not yet using the checks. 2017-02-18 01:41:08 +01:00
xebra
82bb6cbaad Fix #9275 2017-02-03 16:37:10 +09:00
xebra
1c1139870c Modify gpu features flags checker to allow multi flags. 2017-02-01 22:36:27 +09:00
xebra
4fbc92d3f0 Revert gpu features flags to 32-bit. 2017-02-01 00:14:38 +09:00
xebra
159aa1415d [spline/bezier]Add some gpu features flags for Instanced Tessellation. 2017-01-31 23:37:06 +09:00
xebra
ce27f7b0b5 Expand gpu features flags to 64-bit. 2017-01-31 23:37:06 +09:00
Henrik Rydgard
9c55e1e0de Only enable RAM Clears for the SOCOM games that require it.
Should remove the performance impact of #8994 which is bigger than
expected, it seems (cache pollution?)
2017-01-28 10:11:43 +01:00
Henrik Rydgard
e4cb44c243 Merge the texture flags into the dirty flags 2017-01-24 18:12:20 +01:00
Henrik Rydgard
c289a2c7bf Split TextureChanged into two bools, so we can later convert to dirtyflags 2017-01-24 18:12:20 +01:00
Henrik Rydgard
7d60ec73be Move framebufChanged into the dirty flag field 2017-01-24 18:12:20 +01:00
Henrik Rydgard
b423998c36 Move uniform dirty-flag to gstate_c, opening up for other uses. 2017-01-24 18:12:20 +01:00
Henrik Rydgard
bd4436c6eb Centralize EstimatePerVertexCost and Execute_BlockTransferStart 2017-01-23 17:22:17 +01:00
xebra
b78e184c51 [spline/bezier]Add some variables in gpu state cache for hardware tessellation. 2017-01-23 14:12:02 +01:00
Unknown W. Brackets
82f3df1e06 Vulkan: Initial support for aniso filtering. 2016-03-20 19:31:02 +01:00
Henrik Rydgard
a995dd2ff4 Get rid of strange offset in Vulkan matrix converter 2016-03-20 19:31:02 +01:00
Henrik Rydgard
4063f7e0db Fill out GPU_Vulkan.cpp with what's mostly a copy of GLES_GPU.cpp 2016-03-20 19:30:11 +01:00
Unknown W. Brackets
0e85225e29 Bring back the depth range hack. 2016-02-06 20:28:45 -08:00
Unknown W. Brackets
f1c06d25ea Switch to old-style depth in OpenGL.
Some devices really aren't handling the new method well.  There seem to be
accuracy problems when specifying the values to OpenGL.
2016-02-06 20:21:14 -08:00
Unknown W. Brackets
79750ed1ad Add a config setting to control depth quality.
For those who want 1x PSP like behavior.
2016-01-20 22:11:00 -08:00
Unknown W. Brackets
b80c02c272 Simulate depth clamping.
We'll allow extra space in both directions.  It's not exactly right, but
it's a fast approximation.
2016-01-19 07:12:58 -08:00
Henrik Rydgard
e11d0a7e1c Minor GPU interface cleanup 2016-01-06 23:49:02 +01:00
Unknown W. Brackets
529abd7db4 Correct clamped depth range from [0, 65535].
This changes a few things:
 * All backends clamp the depth range and keep it positive.
 * The depth rounding uniform is now properly dirtied.
 * Projection is updated to translate and scale appropriately.
 * Depth rounding is halved on OpenGL to account for [-1, 1] range.

Fixes Phantasy Star Portable 2 without the need for a game-specific hack.
2016-01-03 12:29:43 -08:00
Unknown W. Brackets
18cdf9f352 Remove the depth range hack.
Ths removes the game-specific hack to workaround depth issues.
2016-01-03 12:05:59 -08:00
Unknown W. Brackets
164594b044 Use a VAO for all drawing, and VBOs throughout. 2015-12-19 09:18:34 -08:00
Unknown W. Brackets
fbc4b4e7a1 Use glCopyImageSubData() when it's available.
There's 4 different extensions providing this functionality.  NV is
supported on desktop and mobile, EXT/OES on mobile, and ARB on desktop.

Mostly these are only supported by desktop cards and NVIDIA mobile.

Good improvement in performance on NVIDIA when blit is called a lot, since
it doesn't need to rebind anything or change state.  Example is in desert
city in Tales of Phantasia.
2015-12-06 10:39:21 -08:00
Henrik Rydgard
4b360a571c Remove the depth range hack option, turning it into an ugly game specific compatibility hack.
I hate doing this, but it's not really better off as an option.

See #8171
2015-11-15 23:00:25 +01:00
Henrik Rydgard
067431b35b Region is not used in the viewport calculations - remove wrong commented out code 2015-11-04 11:04:47 +01:00
Henrik Rydgard
f4248cb550 Remove a whole lot of flipping special cases 2015-11-02 20:07:30 +01:00
Henrik Rydgard
65b78b18ea Only enable fragment shader depth rounding for Heroes Phantasia, should reduce flicker.
Doens't fix but helps #6485
2015-10-11 20:52:00 +02:00
Henrik Rydgard
b07b002040 Introduce "Compatibility Flags".
These should be used very restrictively, see comment in Compatibility.h.

Should help #8004, by disabling depth rounding in Fight Night round 3.
2015-09-27 01:23:20 +02:00
Unknown W. Brackets
dff4aeb30f Correct uv bound pointers in arm vertexjit. 2015-09-13 14:55:10 -07:00
Unknown W. Brackets
5c233fa545 Add initial decoding check for uv bounds. 2015-09-13 10:00:33 -07:00
Henrik Rydgard
0237b84efd Reduce use of #ifdef USING_GLES2 some more 2015-09-05 23:09:06 +02:00
Henrik Rydgard
186d624ef3 Cleanup of FBO+blit flags. Requires the change in native to stop lying. 2015-09-05 22:40:45 +02:00
Henrik Rydgard
5b2ffd1434 Fix some naming, remove NV_draw_texture, move decisions out 2015-09-05 22:11:28 +02:00
Henrik Rydgard
f524049277 Move more GPU feature checks upfront. Re-check when exiting settings menu. 2015-09-05 21:23:58 +02:00
Henrik Rydgard
a71be3f75f Start moving GPU feature compatibility decisions to startup
(and a single, cache-friendly flag field)
2015-09-05 19:58:47 +02:00
Henrik Rydgard
1e8a1b801f Rename viewportX1/X2 etc to scale + center, which is what they actually are. 2015-08-26 15:24:35 +02:00
Henrik Rydgard
d7f4c47c22 Refactor: Even more getting rid of gstate access in the framebuffer manager. 2015-08-05 12:13:14 +02:00
Henrik Rydgard
2430c283a5 More GPU cleaning, removing uses of GPUState.h where not needed.
Want to get rid of direct accesses to GPUState in modules that may be reused in
my future next-gen backends, that will reformat display lists into command lists that will
then be optimized and executed, out of sync with the real GPUState.

Candidate modules that may be reused in full are Framebuffer and Depal, possibly TextureCache to some degree.
2015-07-29 12:37:49 +02:00
Henrik Rydgard
aae254254b Fix bad cleanup change, thanks to tapcio for pointing it out in 07b17560f 2015-07-28 01:09:48 +02:00
Henrik Rydgård
07b17560f4 Add some useful accessors to GPUState (backported from a work-in-progress branch) 2015-07-26 12:24:16 +02:00
Henrik Rydgård
0726912f09 sceDisplay, GPUState cleanup and comments 2015-07-25 09:46:11 +02:00
Unknown W. Brackets
425ff3d78f Track bone matrix updates for future morph usage.
This makes them upload later, if/when they're needed.

Fixes #7746, Shadow of Destiny artifacts when software skinning is
enabled.
2015-05-16 21:49:25 -07:00
Unknown W. Brackets
5822faabf9 Make sure to wrap clut indexes at 1024 bytes.
So that's 256 for 32-bit and 512 for 16-bit.
2015-04-26 00:42:58 -07:00
Unknown W. Brackets
5b61c03b7f Avoid accidental sign ext for > 24 bit clut shift. 2015-04-26 00:26:24 -07:00
Unknown W. Brackets
67662ee23f Force clut address to align to 16.
Hardware seems to ignore the lower bits when loading.
2015-04-12 22:39:49 -07:00
Unknown W. Brackets
0fc311a319 dx9: Compensate for viewport w/h adjustments.
Fixes text in Final Fantasy 4, world map in Star Ocean, etc.
2014-12-18 22:24:47 -08:00
Lioncash
a962bc5a6c Mark some functions as const 2014-12-07 17:08:13 -05:00