Henrik Rydgard
700e533622
Minor D3D9 cleanups
2017-03-02 12:29:23 +01:00
Henrik Rydgård
d84f579928
Merge pull request #9356 from xebra/hw_tess_vulkan
...
Hardware Tessellation on Vulkan
2017-02-26 09:12:11 +01:00
Henrik Rydgard
5ba53addb5
D3D11: Fix problems with scaling 16-bit textures, fixes issue with #9345 , thanks @ufdada
2017-02-26 00:05:08 +01:00
xebra
7b72f87308
[spline/bezier]Add support for unsupported device about HW tess.
2017-02-25 19:28:13 +09:00
Henrik Rydgard
f5fa238e22
More minor changes to make GPU and native build on UWP later
2017-02-24 20:26:38 +01:00
Henrik Rydgard
8eb668ea59
D3D11: Enable pixel depth rounding. GL: Fix a crash bug
2017-02-23 20:40:53 +01:00
Henrik Rydgard
95aec3ac76
Fix D3D9 crash (made a mistake with locking)
2017-02-22 18:27:46 +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
b94ad12aea
D3D9: Use D3DLOCK_DISCARD when updating whole textures, may be a small speedup
2017-02-21 11:35:06 +01:00
Henrik Rydgard
f772066c54
Remove some unnecessary error handling paths
2017-02-21 11:29:51 +01:00
Henrik Rydgard
06cf449719
Delete some broken DX9 code.
2017-02-21 11:11:38 +01:00
Henrik Rydgard
ca9050af12
These should be deleted too.
2017-02-20 00:36:37 +01:00
Henrik Rydgard
4c897ff853
Forgot to delete CheckFullHash duplicates
2017-02-20 00:21:54 +01:00
Henrik Rydgard
4652c6af28
Some member variable renaming to match the convention
2017-02-20 00:19:58 +01:00
Henrik Rydgard
f753573332
Unify HandleTextureChange
2017-02-20 00:13:21 +01:00
Henrik Rydgard
f15e25c4b5
Centralize SetTexture
2017-02-20 00:05:23 +01:00
Henrik Rydgard
e24e652b0d
Prepare to unify SetTexture
2017-02-19 23:50:04 +01:00
Henrik Rydgard
aae2030a14
Unify Decimate()
2017-02-19 23:39:35 +01:00
Henrik Rydgard
d9c20fbaff
Unify ApplyTexture
2017-02-19 23:25:09 +01:00
Henrik Rydgard
7890b61cc5
More work towards unifying ApplyTexture
2017-02-19 23:19:55 +01:00
Henrik Rydgard
f839f1944e
Work towards unifying ApplyTexture
2017-02-19 23:07:00 +01:00
Henrik Rydgard
665ffe34ab
Centralize DeleteTexture
2017-02-19 22:50:04 +01:00
Henrik Rydgard
dbafc6ef95
Centralize Texcache::Clear
2017-02-19 22:31:07 +01:00
Henrik Rydgard
4364569cf4
Move TexCacheEntry outside the TextureCacheCommon class. Nested structs are annoying.
2017-02-19 18:53:30 +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
Henrik Rydgard
e83dd2b524
Minor cleanup, elimintate some bind ordering hazards that D3D11 warns about
2017-02-17 14:31:02 +01:00
Henrik Rydgard
08d173ceee
Unify ApplyShaderBlending
2017-02-17 12:21:27 +01:00
Henrik Rydgard
4538edad14
Work towards enabling shader blending on D3D11
2017-02-17 12:21:18 +01:00
Henrik Rydgard
68c5a6c517
Unify CopyDisplayToOutput
2017-02-15 23:24:25 +01:00
Henrik Rydgard
23762ef89f
Unify DrawFramebufferToOutput
2017-02-15 23:11:46 +01:00
Henrik Rydgard
26f208a212
Unify "DrawPixels"
2017-02-15 23:06:22 +01:00
Henrik Rydgard
84e6054b23
More work towards unifying CopyDisplayToOutput
2017-02-15 22:48:23 +01:00
Henrik Rydgard
cba37e54d0
Preparations for unifying CopyDisplayToOutput
2017-02-15 22:47:50 +01:00
Henrik Rydgard
7652bc2d8b
Declare DrawActiveTexture in FramebufferCommon
2017-02-15 22:47:49 +01:00
xebra
e2f9dc8f28
Add support compat to fake mipmap hacks.
2017-02-15 01:02:51 +09: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 Rydgard
6e940dfeda
D3D11, Vulkan: Switch to 4x3 matrixes where possible.
...
Lets us unify more shader code between D3D11 and D3D9, and fixes HW
skinning on D3D11.
2017-02-14 11:59:13 +01:00
Henrik Rydgard
56b3a823ba
D3D11: Improved alpha/color test, like in GL/Vulkan
2017-02-14 10:34:55 +01:00
Henrik Rydgard
373c6ba12f
More D3D11 fixes, hopefully without breaking DX9
2017-02-13 02:07:27 +01:00
Henrik Rydgard
94860b6636
Additional D3D11 fixes
2017-02-13 01:38:52 +01:00
Henrik Rydgård
6033b1ee05
D3D11: Some cleanup. Fix backface culling. Wipeout still looks weird...
2017-02-12 18:29:58 +01:00
Henrik Rydgård
142b30836a
DX9 typo fix in PackDepthBuffer
2017-02-12 17:50:37 +01:00
Henrik Rydgård
328201978f
D3D11: Prepare for dual src blending support
2017-02-12 17:10:04 +01:00
Henrik Rydgård
4f2fb10347
Further D3D11 fixes
2017-02-12 16:14:14 +01:00
Henrik Rydgård
f7717063a8
Assorted fixes for memory leaks etc
2017-02-10 14:41:32 +01:00
Henrik Rydgard
7750ee9f7b
D3D11: Fix reversed colors, stencil improvements
2017-02-10 11:36:09 +01:00
Henrik Rydgard
3f4e14f504
D3D11: Lumines is now playable in non-buffered, with reverse colors.
2017-02-10 11:25:24 +01:00
Henrik Rydgard
aba669c3e6
D3D11: Cube now visible
2017-02-10 00:30:42 +01:00
Henrik Rydgard
f9b840dbfd
More D3D11 progress
2017-02-10 00:01:56 +01:00
Henrik Rydgard
01f46e7a5d
Make the first generated D3D11 shaders compile, fix various warnings
2017-02-09 15:04:21 +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
175b97ef34
Start stubbing out a new D3D11 backend
2017-02-08 17:35:41 +01:00
Henrik Rydgard
9f00b355ca
Unify DownloadFramebufferForClut
2017-02-08 15:58:46 +01:00
Henrik Rydgard
454f2cf4bf
Unify "SetOffsetTexture"
2017-02-08 15:48:36 +01:00
Henrik Rydgard
346b9d0c51
Texcache: Unify SetTextureFramebuffer
2017-02-08 15:44:01 +01:00
Henrik Rydgard
096018a163
Texcache: Unify AttachFramebuffer, misc
2017-02-08 15:37:40 +01:00
Henrik Rydgard
3b18f4452f
TexCache: Unify Invalidate, InvalidateAll, ClearNextFrame
2017-02-08 15:24:33 +01:00
Henrik Rydgard
29b30c197b
Unify CheckFullHash
2017-02-08 15:24:27 +01:00
Henrik Rydgard
391f7be8f9
Unify DecimateFBOs
2017-02-07 00:46:14 +01:00
Henrik Rydgard
5c69878ccb
Unify ResizeFramebufFBO
2017-02-07 00:38:12 +01:00
Henrik Rydgard
27d5c5a2d4
Unify NotifyRenderFramebufferSwitched
2017-02-07 00:29:02 +01:00
Henrik Rydgard
19868b5df7
Unify GetTempFBO
2017-02-07 00:24:38 +01:00
Henrik Rydgard
5b181e8244
Further work on DrawActiveTexture
2017-02-07 00:13:54 +01:00
Henrik Rydgard
275f9248a1
Preparing to unify the DrawActiveTexture API
2017-02-07 00:08:45 +01:00
Henrik Rydgard
89763efe57
Unify SetNumExtraFBOs
2017-02-07 00:08:45 +01:00
Henrik Rydgard
9e644aa815
Unify NotifyRenderFramebufferUpdated
2017-02-07 00:08:45 +01:00
Henrik Rydgard
85ec96ecf1
Unify NotifyRenderFramebufferCreated
2017-02-07 00:08:45 +01:00
Henrik Rydgard
a0992cce75
Unify DestroyFramebuf()
2017-02-07 00:08:45 +01:00
Henrik Rydgard
e42f5e6f46
Rename the fbo_ functions to match the rest of DrawContext.
2017-02-06 11:40:16 +01:00
Henrik Rydgard
ad29974a56
Change when drawcontexts are allocated. Hook up backbuffer events to fix d3d9 resizing.
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
abf7a7abe0
Windows buildfix
2017-02-06 10:28:58 +01:00
Henrik Rydgard
41f770d815
Move dx_state into gfx/d3d9_state
2017-02-05 20:54:24 +01:00
Henrik Rydgard
ba52ba8714
Move global.cpp to native/gfx/d3d9_shader.cpp
2017-02-05 20:50:17 +01:00
Henrik Rydgard
9c275730c5
Move pD3DDevice into dx_state.h.
2017-02-05 20:46:26 +01:00
Henrik Rydgard
f00f7d2fb8
Remove some dependencies on the pD3DDevice globals
2017-02-05 20:36:00 +01:00
Henrik Rydgard
4dd96d6993
Remove dx_fbo dependency on global.h
2017-02-05 20:19:43 +01:00
Henrik Rydgard
5b49c2f840
DX9 cleanup: Remove more stuff from global.cpp
2017-02-05 20:13:48 +01:00
Henrik Rydgard
a8f69e7d64
More DX cleanup
2017-02-05 20:06:56 +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
1c5ad71f60
Further minor DX9 code cleanups
2017-02-05 19:42:54 +01:00
Henrik Rydgard
0b3ebbddf4
Minor DX9 code cleanup
2017-02-05 19:38:52 +01:00
Henrik Rydgard
1a149ba02d
Final tweak to the cleaned up FBO api before moving it to thin3d. Buildfixes.
2017-02-04 22:25:34 +01:00
Henrik Rydgard
bec2921aca
Add escape route for some more esoteric FBO functionality
2017-02-04 22:25:34 +01:00
Henrik Rydgard
f4c3f884e9
DX: Remove further fbo functions to get the interfaces closer
2017-02-04 22:25:34 +01:00
Henrik Rydgard
0b7f3720ae
More FBO api cleanup
2017-02-04 22:25:34 +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
Henrik Rydgard
c3c6a6a2f3
Apply the Split/Second fix to DX9 as well.
2017-02-04 11:37:24 +01:00
Henrik Rydgard
0d1d6f98e4
Pass in the DrawContext to all backends
2017-01-30 20:26:47 +01:00
Henrik Rydgard
2a231b397b
Unbreak environment mapping
2017-01-30 16:13:47 +01:00
Henrik Rydgard
24cc3dbc70
Always pass vec3 texcoord between vertex and fragment shader, to allow for some simplification.
2017-01-30 16:03:57 +01:00
Henrik Rydgard
20d9e60a67
Just some renaming. Start moving away from the "thin3d" name
2017-01-30 14:38:31 +01:00
Henrik Rydgard
d7da981a62
Make the Dangan Ronpa hack use the compat system instead of hacky code
2017-01-29 00:12:20 +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
5df4bac6d2
Delete some left behind unused code
2017-01-25 10:05:39 +01:00
Henrik Rydgard
62a171c616
Minor DX9 optimization
2017-01-24 18:12:20 +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
443d735a28
Activate table-driven dirty-flags in DX9 and Vulkan backends
2017-01-24 18:12:20 +01:00
Henrik Rydgard
068f2d3c71
Remove Execute_Generic in both D3D9 and Vulkan backends
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
0a3bb4a720
Vulkan: Increase size of per-frame descriptor pool, move uniform to right place
2017-01-24 18:11:48 +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
59d80a3785
Share the set of dirty flags between the backend, to let use share more code.
2017-01-23 20:39:17 +01:00
Henrik Rydgard
f139246a78
Switch D3D and Vulkan to 64-bit dirty flags
2017-01-23 17:32:18 +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
deea258383
[spline/bezier]Fix to avoid crashing when activated hardware tessellation with dx9 and vulkan.
2017-01-23 14:12:03 +01:00
Henrik Rydgard
b0697b62d7
Fix bug in setting certain uniforms in DX9. Fixes #9224
2017-01-21 21:54:42 +01:00
Henrik Rydgard
ab9c1d4dc0
Centralize the spline/bezier/bbox execute functions into GPUCommon
2017-01-21 20:43:05 +01:00
Henrik Rydgard
47283db18f
DX9: When optimizing rectangles to clears, don't forget to convert the color to a D3DCOLOR properly. Fixes part of #9224
2017-01-21 17:45:53 +01:00
Henrik Rydgård
674937a520
Extend some enums with potentially useful values
2016-12-27 11:59:12 +01:00
Henrik Rydgård
f86b9f7900
Guess what? More renaming
2016-12-27 11:59:06 +01:00
Henrik Rydgård
463251908b
Rename things to closer match another project which I plan to share some code with
2016-12-27 11:59:02 +01:00
Henrik Rydgård
10393f5d4e
Move Thin3D into the Draw namespace.
2016-12-27 11:58:03 +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
1dbeca0618
Only support decoding UV to float in vertex formats. Supporting u8 and 16 was more complexity than it's worth.
2016-12-20 13:42:54 +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
Julian
c92ec20811
Fixed Inconsistent texture filtering in Disgaea 2 #4235
2016-12-16 22:53:55 +02:00
Florent Castelli
e0ff68b3f6
c++11: Remove compat header base/functional.h
...
We want a proper C++11, not tr1. We don't target those compilers anyway.
2016-10-12 11:32:45 +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
f5f9b5227d
Tweak 565 buffer clearing.
2016-09-18 20:38:19 -07:00
Unknown W. Brackets
ee0bc6c04d
Clear memory when clearing drawing.
...
This should help synchronize block transfers better.
Should improve #8973 .
2016-09-18 20:38:19 -07:00
Unknown W. Brackets
26809c1d7a
Determine alpha test texture after texture.
...
Because, of course, this reads texture alpha parameters for blending
optimizations.
Fixes #8970 .
2016-09-11 11:05:04 -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
Henrik Rydgard
5005e83254
Consistency improvements to the memory protect/alloc APIs
2016-08-28 12:28:17 +02:00
Unknown W. Brackets
c9a9fc5e44
Allow block transfers to resize framebuffers.
...
Helps the ending video in Valkyrie Profile. See #6008 .
2016-07-24 15:58:06 -07:00
Unknown W. Brackets
b30d0e8cec
d3d9: Correct replaced texture format.
...
This was causing the row width to be wrong for many textures too, which
was generating errors.
2016-07-17 09:03:08 -07:00
Unknown W. Brackets
79101736b8
d3d9: Decode directly into texture buffer.
2016-06-25 09:13:14 -07:00
Unknown W. Brackets
5962093ef5
Centralize the majority of texture decode.
2016-06-19 08:05:54 -07:00
Unknown W. Brackets
339f065a5c
Centralize texture deindexing more.
2016-06-19 07:14:31 -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
Unknown W. Brackets
65ae92c78b
Also avoid updating images with replacements.
2016-06-06 23:02:56 -07:00
Unknown W. Brackets
fc77e2f8fc
Flag replaced/scaled textures so we don't reuse.
...
Otherwise, we may try to use the replaceImages path, and end up with a
small updated texture in the top left of a large replaced texture.
2016-06-06 19:35:58 -07:00
Unknown W. Brackets
c12f835364
Download single-use renders right away.
...
Should prevent issues with the memory being reused soon after, hopefully.
See also #8781 and #7695 .
2016-06-04 19:36:30 -07:00
Unknown W. Brackets
a1fbcc3d93
Avoid directly calling osm from Core/GPU code.
...
This allows UI to handle the message however it wants to, and reduces
cross linkage issues.
2016-05-27 22:05:30 -07:00
Unknown W. Brackets
f168978d3e
Properly set w/h on first use of a render-to-tex.
...
We were getting the wrong w/h when it wasn't in the texture cache already.
2016-05-21 17:53:42 -07:00
Unknown W. Brackets
f16f163edf
Remove duplicate override.
...
This is the same function, it was meant to be refactored.
2016-05-21 15:45:03 -07:00
Unknown W. Brackets
2d53eb5456
Ensure we don't try to hash framebuffers.
...
Let's keep when we do things consistent: measure alpha on apply always.
2016-05-21 15:40:58 -07:00
Unknown W. Brackets
b09c2b1f75
Add some missing override definitions.
2016-05-21 09:29:03 -07: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
68717411b1
Track when we see a clear indicate a size of a vfb.
2016-05-19 21:17:09 -07:00
Henrik Rydgård
2c84411426
Merge pull request #8720 from unknownbrackets/tex-range
...
Move texture decode/hash to after vertex decode
2016-05-07 22:15:19 +02:00
Unknown W. Brackets
4b89f44d1c
Avoid scheduling a rescale when scaling is off.
...
This happens for PPGe and kernel textures, and replacements. Before, we
would continually reload, trying to scale, but each time decide not to
scale.
2016-05-06 19:58:01 -07:00
Unknown W. Brackets
f1dda6a53d
d3d9: Move texture hashing after vertex decode.
2016-05-01 16:20:05 -07:00
Unknown W. Brackets
1a26699607
Refactor texture loading to move things around.
2016-05-01 11:17:55 -07:00
Unknown W. Brackets
c20075b0e0
Pass video info to texture replacements.
2016-05-01 08:54:43 -07:00
Unknown W. Brackets
f5b93bc6f0
Remove global num videos hack.
2016-05-01 08:53:48 -07:00
Unknown W. Brackets
99d29356d7
Track video addresses in texture cache.
2016-05-01 08:39:18 -07:00
Unknown W. Brackets
f26c0328da
Check alpha when loading replaced textures.
2016-05-01 00:30:53 -07:00
Unknown W. Brackets
e1fd6b6f21
Account for scaleFactor when saving clipped PNG.
2016-05-01 00:30:50 -07:00
Unknown W. Brackets
0c357c0ea3
Pass w/h in for replacement lookup.
...
So we can scale the w/h properly.
2016-05-01 00:30:44 -07:00
Unknown W. Brackets
d6e5df6f21
Save individual mip levels.
2016-05-01 00:30:41 -07:00
Unknown W. Brackets
565653c77b
Save and load textures using full key.
...
Of course, need this, not just the hash.
2016-05-01 00:30:40 -07:00
Unknown W. Brackets
5dbc2b9267
Initial support for saving textures to PNGs.
2016-04-30 15:03:39 -07:00
Unknown W. Brackets
bf39e61458
Setup initial structure for texture replacements.
2016-04-30 13:44:31 -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
3d5dd24528
Remove an unnecessary func define.
...
Was already moved to FramebufferCommon.
2016-04-10 02:31:56 -07:00
Unknown W. Brackets
02995ff083
Tiny cleanup to indexgen.
2016-04-10 02:30:33 -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
d85dce0c21
Add limited support for newly discovered 32-bit index buffer format (by unknownbrackets)
...
See https://github.com/hrydgard/pspautotests/pull/184
Will truncate indices past 65536.
2016-04-10 11:03:07 +02:00
Henrik Rydgard
58f77e8f5f
Buildfix
2016-04-10 10:55:13 +02:00
Henrik Rydgard
7cb6192005
Rename the TransformPipeline files to DrawEngine, and GLES_GPU to GPU_GLES
2016-04-10 10:31:42 +02:00
Henrik Rydgard
e611915a52
Rename some GPU classes and enums to fix some consistency issues between the backends.
2016-04-10 10:21:48 +02:00
Henrik Rydgard
727058fc27
Remove an entry from GPUStats that didn't really belong.
2016-04-02 11:06:05 +02:00
Henrik Rydgard
c1e9df0777
Adjust the displayed debug stats for each backend. Cleanup.
2016-03-31 10:23:40 +02:00
Henrik Rydgard
5ef608fa50
GPU stats: Have each backend format its own string.
2016-03-31 10:17:02 +02:00
Henrik Rydgard
40d05e292c
Cleanup in FramebufferVulkan to reduce the size of future diffs
2016-03-28 20:23:29 +02:00
Unknown W. Brackets
1300631e9a
Allow unswizzling with a dest pitch.
2016-03-26 23:38:50 -07:00
Henrik Rydgård
a49cba7d0d
Merge pull request #8665 from unknownbrackets/d3d9-depth
...
d3d9: Check actual FBO format for INTZ support
2016-03-26 21:15:44 +01:00
Unknown W. Brackets
f31fbb9417
Cleanup fbTexInfo_ when detaching framebuffers.
2016-03-26 12:30:34 -07:00
Unknown W. Brackets
aad04f2941
Centralize the texcache key format.
2016-03-26 12:30:33 -07:00
Unknown W. Brackets
e8c8f19aec
Move framebuf attachment into central code.
...
It doesn't look like this will be different, and there's a bug in it.
2016-03-26 12:30:32 -07:00
Unknown W. Brackets
49c353f40c
d3d9: Check actual FBO format for INTZ support.
2016-03-24 19:04:25 -07:00
Henrik Rydgard
bd17351ef9
Texcache: Minor refactor/cleanup
2016-03-22 23:56:55 +01:00
Henrik Rydgard
8a39794c47
Revert "Enable the Unpack Subimage path on DX9 (maybe should just remove the check)"
...
This causes some breakage that need investigation.
This reverts commit 1970d38650
.
2016-03-22 23:56:55 +01:00
Unknown W. Brackets
add506a0d3
Cleanup differences in aniso handling.
...
Some places were not handling it as a power of two.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
1970d38650
Enable the Unpack Subimage path on DX9 (maybe should just remove the check)
2016-03-20 19:31:02 +01:00
Henrik Rydgard
5cee8856ea
Fix UV scale for some vertex formats (like GL). Separate updates of PROJ and PROJTHROUGH matrices.
2016-03-20 19:31:02 +01:00
Unknown W. Brackets
8efbcf8d42
Use draws for alpha/stencil only clear in Vulkan.
2016-03-20 19:31:02 +01:00
Henrik Rydgard
dced84c9fc
Work on texture support, cube.elf works correctly. Delete unused code.
2016-03-20 19:30:11 +01:00
Henrik Rydgård
54a37f9bb8
Merge pull request #8591 from unknownbrackets/thin3d
...
Use thin3d for softgpu drawing (+thin3d improvements)
2016-03-20 18:06:53 +01:00
Henrik Rydgard
d67b148712
Add math dataconv funcs for packed values.
2016-03-06 11:33:53 -08:00
Unknown W. Brackets
b33e39788f
d3d9: Use thin3d for reporting info.
2016-02-13 10:53:28 -08:00
Unknown W. Brackets
095624867a
d3d9: Enable GPU info in D3D9 reporting.
2016-02-13 09:51:09 -08:00
Unknown W. Brackets
271829c991
Consider depth blitting a slow framebuffer effect.
2016-02-10 21:02:19 -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
4ff78d3c55
d3d9: Use SSE at least for depth copies.
2016-01-31 09:00:00 -08:00
Unknown W. Brackets
623448f852
d3d9: Support blitting depth on frame switch.
...
Can be optimized more, but this makes Jeanne d'Arc work in D3D9 now. Not
sure why it didn't work before.
2016-01-30 23:47:51 -08:00
Unknown W. Brackets
e30ab95179
d3d9: Fix maxSeenV when not known.
...
And just make the code reused between both. Fixes #8478 .
2016-01-22 18:48:54 -08:00
Unknown W. Brackets
79792a3c38
d3d9: Account for half-pixel z offset.
2016-01-20 22:53:47 -08:00
Unknown W. Brackets
0443fbebd0
Add methods to download depth to PSP RAM.
2016-01-20 22:11:03 -08:00
Unknown W. Brackets
2916298695
gedbg: Add scaled 16-bit z support.
2016-01-20 22:11:02 -08:00
Unknown W. Brackets
f9970dba94
d3d9: Respect per-pixel depth rounding.
...
Using the 16-bit depth range.
2016-01-20 22:11:01 -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
Unknown W. Brackets
0920f6c6eb
Use minz/maxz as the depth range.
...
This allows values that fall outside the viewport, but still within the
depth range, to be drawn.
2016-01-19 07:12:57 -08:00
Unknown W. Brackets
d1b3768e49
Use a common func everywhere for float depth vals.
2016-01-18 19:29:45 -08:00
Unknown W. Brackets
b40c3fd839
Use video format when uploading to framebuffers.
...
Expected to help Bounty Hound, #8392 .
2016-01-17 12:57:27 -08:00
Unknown W. Brackets
f60aef2e16
Add a more specific interface for video frames.
...
Since we know more about them. No functional change yet.
2016-01-17 12:57:26 -08:00
Unknown W. Brackets
73bcf16612
Flush before loading the CLUT.
...
In case it's what was being rendered to.
2016-01-17 12:55:48 -08:00
Henrik Rydgard
332310c2d6
Remove redundant parameters
2016-01-17 20:33:21 +01:00
Henrik Rydgard
c8b1064d20
GL Cleanup: No longer redundantly store the shader ID inside the shader objects
2016-01-17 20:33:14 +01:00
Henrik Rydgard
7e24801fc1
Specify which games need vertex depth rounding instead of which ones don't.
...
Vertex depth rounding is a not-fully-accurate hack, and most games are better off with the extra depth precision
of 24-bit Z than reducing it to a not-fully-accurate 16-bit. So let's only use it where necessary, like in Phantasy Star.
See issue #8187 .
2016-01-16 11:31:27 +01:00
Unknown W. Brackets
00b57f6a16
Correct clamped depth offset.
...
Oops, forgot to fix this when I fixed the scale. It's already for a
[-1, 1] range, and needs to be corrected for accordingly.
Fixes #8425 , other depth issues in Phantasy Star Portable 2.
2016-01-16 00:18:25 -08:00
Henrik Rydgård
d479990595
Merge pull request #8413 from hrydgard/framebuffer-remove-unused
...
Remove some unused functionality from the framebuffer managers
2016-01-10 23:47:29 +01:00
Unknown W. Brackets
c6ffed6484
gedbg: Add mechanics to grab CLUT buffer.
2016-01-10 09:25:19 -08:00
Henrik Rydgard
88ed44189d
Remove some unused functionality from the framebuffer managers
2016-01-10 14:59:27 +01:00
Unknown W. Brackets
2fc296a1fb
gedbg: Format a few more cmds.
2016-01-07 22:42:20 -08:00
Unknown W. Brackets
909d477719
Support CLUTs at an x offset.
...
Used by Kurohyo 2. Highly unlikely to be a mis-estimate within stride.
2016-01-05 00:02:58 -08:00
Unknown W. Brackets
19877144ba
Avoid redownloading CLUT when reloaded.
...
In Brave Story, the game reloads the CLUT frequently, but doesn't actually
render to the CLUT that often. It also switches between a few different
rendered CLUTs - so caching that we've downloaded is a HUGE win.
In case someone reading this message is interested, it actually renders
these CLUT tables from what appears to be a color wheel. Crazy huh?
2016-01-04 22:21:33 -08:00
Unknown W. Brackets
28a07c70c6
Explicitly download rendered cluts.
...
This avoids triggering logic that tries to get the sizing right, or
optimize frequent copies. CLUTs often get estimated wrong, so it's better
to copy just the correct range, always.
2016-01-04 21:29:03 -08:00
Unknown W. Brackets
a6c64f74d1
Cleanup download process a bit more.
2016-01-04 20:51:43 -08:00
Unknown W. Brackets
4176ee241f
Reuse more code between GPUs for download.
2016-01-04 20:40:07 -08:00
Unknown W. Brackets
36c8b043f3
d3d9: Fix CLUT4 optimization color creation.
...
Fixes #8385 .
2016-01-04 07:36:47 -08:00
Henrik Rydgård
f0812297a6
Merge pull request #8376 from unknownbrackets/gpu-depth
...
Correct universally for clamped depth range
2016-01-04 09:55:02 +01:00
Unknown W. Brackets
6cc69ed25f
Factor out texture shader application.
...
This allows it to be reused between depal and indexed textures (second not
implemented yet.)
2016-01-03 23:50:49 -08:00
Unknown W. Brackets
14b350a5fe
d3d9: Fix render-to-texture not working.
...
Broken by a copy/paste mistake in #7870 form OpenGL.
2016-01-03 23:44:43 -08:00
Unknown W. Brackets
e427d09628
Determine scaleFactor once per frame.
...
This way, for auto, we can properly treat it like scaleFactor = 1 when the
resolution is small.
2016-01-03 23:06:15 -08:00
Unknown W. Brackets
7e54368998
Correct depth offset when clamped.
...
Of course, the scale is already half, so we just need to double for d3d9,
and not double for OpenGL of course.
Our offset is already in [0, 1] so we keep it.
2016-01-03 19:59:35 -08: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
2494176919
Remove incorrect CLUT4 optimization.
2016-01-02 13:20:30 -08:00
gmvbif
f8f7dadba4
Delete fields from FrameBufferDX9 with the same names as in the FrameBufferCommon
2016-01-02 09:40:47 +03:00
Henrik Rydgård
8be22f47cd
Merge pull request #8348 from unknownbrackets/texcache
...
Centralize code in the texture cache, minor cleanups
2016-01-01 17:55:41 +01:00