Henrik Rydgård
b10b24feea
GLES device lost/store fixes
2017-12-10 02:05:25 +01:00
Henrik Rydgård
6e3cb0cd48
Add missing IF statement for instance rendering check..
2017-12-08 15:53:33 +01:00
Henrik Rydgård
3eda310009
Merge pull request #10366 from hrydgard/gl-lost-device-rework
...
Rework GL lost-device to work more like Vulkan. Gets rid of gl_lost manager etc.
2017-12-07 22:48:43 +01:00
Henrik Rydgård
fb74c9dfeb
Clean up a small inconsistency
2017-12-07 21:09:09 +01:00
Henrik Rydgård
7d0fc9ce65
Rework GL lost-device to work more like Vulkan. Gets rid of gl_lost manager etc.
2017-12-07 15:05:59 +01:00
Unknown W. Brackets
9f000ddf35
GLES: Avoid hanging while precompiling shaders.
...
We want to continue updating the screen so it doesn't seem frozen.
2017-12-03 11:30:00 -08:00
Henrik Rydgård
d4df0181db
More duplicate code removal
2017-11-14 09:20:36 +01:00
Henrik Rydgård
04e313ecba
Unify Execute_Bezier and Execute_Spline
2017-11-13 10:45:27 +01:00
Unknown W. Brackets
7041341d1a
SaveState: Avoid clearing shaders in all backends.
2017-11-11 08:17:04 -08:00
Henrik Rydgård
d618b3673b
Count readbacks in a frame and show in GPU debug stats.
2017-11-08 11:57:53 +01:00
Henrik Rydgård
8c69be9bfa
Get rid of GPUCommon's "Internal" functions.
2017-11-05 23:21:52 +01:00
Henrik Rydgård
26e52ca5e8
Get rid of a bunch of sync stuff that's no longer needed.
2017-11-05 23:21:49 +01:00
Henrik Rydgård
b886efe8f5
Another minor cleanup (DescribeCodePtr)
2017-10-20 11:06:12 +02:00
Henrik Rydgård
4a30aedc53
Unify and move around code to cleanup some debug accessors
2017-10-18 13:10:05 +02:00
Henrik Rydgård
d53c88456a
Unify GetFramebufferList() (trivial)
2017-10-18 12:49:15 +02:00
Unknown W. Brackets
5784b51428
GLES: Allow hwtess for GL 3.1 w/o shader4.
...
gl_InstanceID was added to core in 3.1, so we don't need gpu_shader4.
2017-09-21 20:20:17 -07:00
Henrik Rydgård
2f85e6516e
Minor optimizations (use the new hashmap in a few more places)
2017-08-20 19:18:46 +02:00
Henrik Rydgård
5680332343
Minor cleanups
2017-08-17 15:20:21 +02:00
Henrik Rydgård
2c4e5e2303
Fastpath in fastrunloop when diff=0. Remove need for Execute for UV scale/offset.
2017-08-17 15:20:16 +02:00
Henrik Rydgård
71baecabd6
Make FLAG_FLUSHBEFORE a no-op, move flushes into the execution functions.
...
It would only be necessary if we needed the previous value, which we
don't do in any of these.
2017-08-17 15:20:10 +02:00
Henrik Rydgård
983bb3bd0f
Can't dirty VERTEXSHADER_STATE before the flush in Execute_VertexTypeSkinning, causes obscure bugs when software skinning is enabled
2017-08-15 14:27:54 +02:00
Unknown W. Brackets
96ed8564ab
Add some missing fragment shader state changes.
2017-08-14 11:36:07 +02:00
Unknown W. Brackets
c84efcfc97
Dirty vertexshader state on hw bezier/spline.
2017-08-14 11:36:06 +02:00
Henrik Rydgard
56cd991833
All: Only recompute the vertex shader ID when dirty
2017-08-14 11:36:06 +02:00
Henrik Rydgard
1098bf7342
All: Only convert viewportscissor state if dirty
2017-08-14 11:14:26 +02:00
Henrik Rydgard
e439055a32
All: Only convert raster state if dirty
2017-08-14 11:14:26 +02:00
Henrik Rydgard
e2b179d6e2
All: Only convert depth stencil state if dirty
2017-08-14 11:14:26 +02:00
Henrik Rydgard
e4567c694c
All: Only convert blend state if "dirty"
2017-08-14 11:14:26 +02:00
Unknown W. Brackets
c711b00d4c
GPU: Clean up some GLES3 defaults.
...
It should default both of them the same way. And we already set subimage
on desktop.
2017-07-01 16:16:59 -07:00
Unknown W. Brackets
4a56e6ff83
GE Debugger: Fix recording in softgpu.
2017-06-04 10:38:58 -07:00
Unknown W. Brackets
41b485aa0a
Core: Refactor repeating disc id homebrew code.
2017-06-03 15:29:08 -07:00
Unknown W. Brackets
dca75437c3
GPU: Refactor common frame dumping code.
2017-06-03 15:29:07 -07:00
LunaMoo
939b26475d
Fix a bunch of emu features for Homebrew by better identification.
2017-05-30 12:20:29 +02:00
Henrik Rydgård
137b79c708
Fix more review comments.
2017-05-30 09:38:05 +02:00
Henrik Rydgård
c173da49d3
Fix a number of bugs and stuff affecting Vulkan on Mali
2017-05-30 09:36:17 +02:00
Unknown W. Brackets
fd4399e108
GPU: Centralize fb resize, move to begin of frame.
...
It makes more sense here, because otherwise when you change it from the UI
settings, it takes a frame to "kick in".
2017-04-24 12:02:52 -07:00
Unknown W. Brackets
030f803002
Remove unused parameter to DestroyAllFBOs().
2017-04-13 23:07:21 -07:00
Henrik Rydgard
22d5acb40e
Depal: Use the full CLUT mode setting as the depal shader key. Fixes #9550 for both D3D11 and D3D9.
2017-04-04 11:09:29 +02:00
Henrik Rydgård
1faae8b6d6
Port some other minor changes over from #9255
2017-04-03 16:47:30 +02:00
Henrik Rydgard
d581a96d79
All backends: Reorganize blend state mapping to make dirty-tracking easier
2017-04-03 16:37:08 +02:00
xebra
73a898df2a
GLES:Fix again compatibility for instanced rendering.
2017-03-28 19:49:37 +09:00
xebra
04e1e1a460
GLES:Fix compatibility checks for instanced rendering.
2017-03-26 19:00:20 +09:00
Unknown W. Brackets
d4ff7cc928
Spline: Simplify uniforms/dirty to one check.
...
This makes backends more consistent in which values they use, and reduces
the (relatively uncommon compared to other drawcalls) dirty checks for
splines.
2017-03-19 20:05:56 -07:00
Henrik Rydgård
94f16e3b7c
GPU: Move "if (resized_)" to BeginHostFrame to avoid desynchronized settings.
...
Also wipe the input layout cache on D3D11 on resize.
Fixes #9438 .
2017-03-17 11:26:11 +01:00
Henrik Rydgård
20f9ae3114
Make sure UpdateCmdInfo is called "in sync" with settings changes. Fixes #9438 .
...
(well, at least the software skinning part. not sure if there are more).
2017-03-17 10:48:43 +01:00
Henrik Rydgard
5a946d985b
Unify most of the rest of the command table entries
2017-03-14 13:47:34 +01:00
Henrik Rydgard
c74d6fcde7
Unify some vertex shader related settings in the command tables
2017-03-14 13:44:18 +01:00
Henrik Rydgard
cd6d5a0d7f
Unify fragment shader settings in the command table
2017-03-14 13:42:48 +01:00
Henrik Rydgard
bc641e6c56
Unify minz/maxz in command tables
2017-03-14 13:41:13 +01:00
Henrik Rydgard
903ac2fc42
Unify texture settings in the command tables
2017-03-14 13:39:32 +01:00
Henrik Rydgard
934b3db800
Unify logicop, antialias in the command table
2017-03-14 13:37:12 +01:00
Henrik Rydgard
8e6d546921
Unify the control commands in the tables
2017-03-14 13:35:25 +01:00
Henrik Rydgard
7302aca7b3
Some reordering, fixing in the command tables
2017-03-14 13:32:56 +01:00
Henrik Rydgard
ff57cacfe6
Unify morph weight, patch parameter command table entries
2017-03-14 13:30:03 +01:00
Henrik Rydgard
f767615ef8
Unify viewport/region/scissor command table entries
2017-03-14 13:28:28 +01:00
Henrik Rydgard
3de4d67fdc
Unify the light parameter table entries
2017-03-14 13:26:53 +01:00
Henrik Rydgard
99711815b5
Unify some ignored command table entries
2017-03-14 13:25:52 +01:00
Henrik Rydgard
d9c19cc9ee
Unify matrix, dither and signal table entries
2017-03-14 13:24:35 +01:00
Henrik Rydgard
3f795799c9
Setup a global GPU command table, and start moving stuff into it.
2017-03-14 13:21:24 +01:00
xebra
b9a9a509ae
GLES:Remove texture_half_float extension.
2017-03-13 01:02:05 +09:00
Henrik Rydgard
21d97a7947
Dirty UVSCALEOFFSET on every draw call.
...
This is needed since we no longer dirty it on normal changes since we
prescale, but it's still necessary for spline/bezier which generate texture coords.
2017-03-11 13:10:38 +01:00
Henrik Rydgard
e33428414f
Restore flushing the GPU pipeline on changes to CLIPENABLE, as per @unknownbrackets' comments. Also remove a redundant dirtying of textures.
2017-03-11 13:10:38 +01:00
Henrik Rydgard
f95459ab0d
Fix bug where we tried to set aniso even if unsupported. Fixes #9377
2017-03-03 14:16:15 +01:00
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
Henrik Rydgard
68ba3070bc
D3D11: Add enough debug readback support to support savestate thumbnails
2017-02-18 00:27:32 +01:00
Henrik Rydgard
0e8aeaea3a
D3D11: Implement basic framebuffer readback.
...
Also make debug interfaces more consistent.
2017-02-18 00:07:49 +01:00
xebra
ef536ae54d
Move wasted checks in FastRunLoop() to Execute_TexLevel()
2017-02-15 01:02:50 +09:00
xebra
945e603072
Fix fake mipmap issue related #5350
2017-02-15 01:02:50 +09:00
Henrik Rydgård
f7717063a8
Assorted fixes for memory leaks etc
2017-02-10 14:41:32 +01:00
Henrik Rydgard
ba95e0f4d9
Initial stab at porting the DX9 backend to D3D11. Not working yet.
2017-02-09 13:28:40 +01:00
Henrik Rydgard
06addecb3d
Unify cardboard settings calculation
2017-02-07 00:19:31 +01:00
Henrik Rydgard
be557fc323
Remove fbo_preferred_z_bitdepth
2017-02-06 11:40:16 +01:00
Henrik Rydgard
f1c96c056d
Move all the GL/D3D9 FBO code into thin3d.
2017-02-06 11:40:16 +01:00
Henrik Rydgard
d05ef4a859
Pass through the DrawContext to texturecaches and fb managers.
...
This is preparation for sharing more framebuffer code between the
backends.
2017-02-05 19:51:50 +01:00
Henrik Rydgard
daee5c24e5
Work towards unifying the GL and DX FBO APIs
2017-02-04 22:25:34 +01:00
Henrik Rydgard
3ceb0a8540
Some simple renaming
2017-02-04 11:47:19 +01:00
xebra
82bb6cbaad
Fix #9275
2017-02-03 16:37:10 +09:00
xebra
37a0907598
Fix supporting gl_InstanceID.
2017-02-01 21:21:57 +09:00
xebra
918bee8801
Add support OES_texture_half_float.
2017-02-01 14:37:03 +09:00
xebra
4fbc92d3f0
Revert gpu features flags to 32-bit.
2017-02-01 00:14:38 +09:00
xebra
6adddbbd38
[spline/bezier]Turn off Hardware Tessellation if device is unsupported.
2017-01-31 23:37:07 +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
0d1d6f98e4
Pass in the DrawContext to all backends
2017-01-30 20:26:47 +01:00
Henrik Rydgard
182d87cc15
Minor cleanup in GPU dispatch tables
2017-01-28 12:11:56 +01:00
Henrik Rydgard
ab6bc4cb16
Restores a lost optimization from uv prescale - avoiding flushing. Should fix #9219 .
...
Also #ifdef away some invalid-address checks in hot paths in the GPU.
2017-01-28 11:39:34 +01: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
d85888dc2b
Table-driven dirty-flags for Vulkan and D3D9. Minor Vulkan optimization.
2017-01-24 18:12:20 +01:00
Henrik Rydgard
1fe32d380b
Update lots of dirty-flag table entries
2017-01-24 18:12:20 +01:00
Henrik Rydgard
c70265d7f2
Use table-driven dirtying instead of callbacks in GPU_GLES
2017-01-24 18:12:20 +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
f111767315
Workaround the lack of support for software skinning in Vulkan
2017-01-23 22:06:30 +01:00
Henrik Rydgard
69267d4cd6
Minor optimizations
2017-01-23 21:14:27 +01:00
Henrik Rydgard
ae37df0a8c
Further centralization of EstimatePerVertexCost, now moved to GPUCommon
2017-01-23 21:11:39 +01:00
Henrik Rydgard
daf02f1de6
Centralize the matrix load functions, no need to duplicate them for each backend.
2017-01-23 21:11:39 +01:00
Henrik Rydgard
3c221a7ebd
Extract the dirty flag from the shader managers so code that dirties uniform flags can be shared.
2017-01-23 21:11:39 +01:00
Henrik Rydgard
097638f4fd
Fix crash bug
2017-01-23 21:09:20 +01:00
Henrik Rydgard
bd4436c6eb
Centralize EstimatePerVertexCost and Execute_BlockTransferStart
2017-01-23 17:22:17 +01:00
Henrik Rydgard
d9acd27126
Rename GLES files to match the convention the other backends use.
2017-01-23 17:08:58 +01:00
xebra
de253a6aef
[spline/bezier]Revert #ab9c1d4 about spline/bezier.
2017-01-23 14:12:46 +01:00
xebra
5aeaa95f2c
[spline/bezier]Implement hardware tessellation on OpenGL.
2017-01-23 14:12:02 +01:00
Henrik Rydgard
ab9c1d4dc0
Centralize the spline/bezier/bbox execute functions into GPUCommon
2017-01-21 20:43:05 +01:00
Henrik Rydgard
dc5c0c0d2d
Centralize ProcessEvent
2016-12-21 20:02:05 +01:00
Henrik Rydgard
7634ff7f09
Centralize a few more functions, fix DX9
2016-12-21 18:51:19 +01:00
Henrik Rydgard
98ebf9ed6f
Centralize PerformStencil* and Invalidate* functions
2016-12-21 18:33:08 +01:00
Henrik Rydgard
866d4a645f
Centralize "PerformMemory*" functions
2016-12-21 18:26:06 +01:00
Henrik Rydgard
e15cba0e1b
Centralize "Resized()"
2016-12-21 18:13:58 +01:00
Henrik Rydgard
7e46a153c0
Centralize DoBlockTransfer between the GPUs.
...
Required adding a pointer to the framebuffer manager and texture cache in
GPUCommon, which took a little bit of refactoring.
2016-12-21 18:07:17 +01:00
Henrik Rydgard
9d7983eee8
Remove the ability to turn off prescaleUV entirely. It's simply better to do it in the vertex decoder.
2016-12-20 13:27:44 +01:00
Florent Castelli
70593d1004
android: Change preprocessor define to standard __ANDROID__
...
ANDROID is only standard to the old Makefile buildsystem, not the platform.
2016-10-12 11:14:09 +02:00
Unknown W. Brackets
4d0c457ddc
Cleanup display vs. output screenshot terminology.
2016-09-25 16:35:43 -07:00
Unknown W. Brackets
fa0e88f1b7
Add a flag to use the display vfb for screenshots.
...
This fixes proportions of reporting, savestate screenshots, and TAS
recording for PS1 ports, mainly.
2016-09-25 16:32:18 -07:00
Unknown W. Brackets
92d930887f
Android: Add both a lost and restore phase.
...
Lost = delete, restore = create. Let's stick to never overlapping.
May help #8912 .
2016-09-10 21:58:42 -07:00
Unknown W. Brackets
6151f8ef9f
Allow taking screenshots with a clamped size.
...
Sometimes 10x is a little on the big side.
2016-06-12 07:09:01 -07:00
Henrik Rydgard
8294a54a70
Disable dual source blending on nvidia Android. See #8243
2016-06-05 09:15:10 +02:00
Unknown W. Brackets
f08c873a4b
Save FBOs on decimate when they have a safe size.
...
Fixes #7695 .
2016-05-19 21:23:22 -07:00
Unknown W. Brackets
99d29356d7
Track video addresses in texture cache.
2016-05-01 08:39:18 -07:00
Unknown W. Brackets
b1f0d4869c
Advance pointers after drawing splines.
...
Tests show this is just like beziers.
2016-04-10 17:12:48 -07:00
Unknown W. Brackets
d920ffdcad
Ignore upper bits of prim type.
...
This matches tests on what hardware does.
2016-04-10 13:11:55 -07:00
Unknown W. Brackets
e95b2cf0d5
Reduce some repetitive code.
2016-04-10 13:07:08 -07:00
Unknown W. Brackets
868bbb8ebe
Advance vertex/index pointers on bezier submit.
...
Just like other primitives.
2016-04-10 12:59:06 -07:00
Unknown W. Brackets
277b76e2ae
Treat GE_PATCHPRIM_UNKNOWN as points.
...
Confirmed by tests on hardware - although it's doubtful any games use
this type.
2016-04-10 11:58:15 -07:00
Unknown W. Brackets
1e0051a792
Add support for 32-bit indices.
...
Not clear how often these are used by games. Let's find out.
2016-04-10 02:24:58 -07:00
Henrik Rydgard
7cb6192005
Rename the TransformPipeline files to DrawEngine, and GLES_GPU to GPU_GLES
2016-04-10 10:31:42 +02:00