Commit Graph
55 Commits
Author SHA1 Message Date
Henrik Rydgård 5dab9994b6 Bezier/Spline: Fix logical error (must flush buffered data before we modify submitType).
Should fix #14774
2021-09-07 23:52:06 +02:00
Unknown W. Brackets 579482320d GPU: Revert stencil discard workaround change.
This reverts commit 0640ebb22d.

Apparently caused more problems than it solved.
2021-02-23 19:39:01 -08:00
Unknown W. Brackets 0640ebb22d GPU: Use stencil discard workaround w/o depth test. 2021-02-22 21:40:01 -08:00
Unknown W. Brackets a73c15babc GPU: Correct shader gen with weights as floats.
For now, this supports the option.  We should probably just move to
everything being floats, but we already prefer software skinning.

Fixes #13903.
2021-01-10 08:52:28 -08:00
Henrik Rydgård f3ebd6553d Turn off vertex range culling in bezier/spline calls.
When we do lower res tess than the real PSP, we cant trust the game to not cause range culling to kick in.

Fixes #11692
2020-12-13 16:04:16 +01:00
Henrik Rydgård e14437cb3f OpenGL: Assorted shader-depal bugfixes and regression fixes.
Fixes #13517
2020-11-11 23:09:48 +01:00
Henrik Rydgård 6310af25fa Get shader color write masking going on all backends. 2020-11-08 23:45:47 +01:00
Henrik Rydgård 793e89d2e3 Fix some comments, rename a function. 2020-11-08 14:34:04 +01:00
Henrik Rydgård 3d289594f9 ShaderBlend and FramebufferRead are separate concepts. Reflect that in naming.
The former has forms that don't need to read the framebuffer.

This exposes that some logic is wrong...
2020-11-08 12:54:05 +01:00
Henrik Rydgård 0938d495d9 Remove a redundant bit from vertex shader IDs.
(complicates automated testing of shader generation)

Should have no noticeable effects.
2020-11-01 11:48:55 +01:00
Henrik Rydgård 0e3a84b4a8 Move most GPU things to Common.
It works after the move, on Windows and Android at least.

Deletes the D3DX9 shader compiler loader, which was not used.
2020-10-04 23:39:02 +02:00
Henrik Rydgård c5e0b799d9 Remove category from _assert_msg_ functions. We don't filter these by category anyway.
Fixes the inconsistency where we _assert_ didn't take a category but
_assert_msg_ did.
2020-07-19 20:33:25 +02:00
Unknown W. Brackets ac60e2ecd4 GPU: Track HW tess at start of frame too.
This also makes it so we don't force the setting off when you change
backends, and just ignore it if unsupported.
2020-04-04 11:52:32 -07:00
Unknown W. Brackets cba6a63058 GPU: Generate normals for curves with lighting.
Improves #12354.  This needs to happen even if the vertex has no normals.
2019-09-28 15:08:37 -07:00
Unknown W. Brackets af58577aff GPU: Better typesafety for shader bits.
See 128c0ad.
2019-02-16 06:54:56 -08:00
Unknown W. Brackets f8ce9b08ba Vulkan: Limit stencil workaround to Adreno 5xx. 2018-12-23 14:11:57 -08:00
Henrik RydgårdandGitHub ab7bd6fc67 Merge pull request #11624 from unknownbrackets/shaderid
GPU: Ignore light params for shade mapping in shader id
2018-12-03 09:35:10 +01:00
Unknown W. Brackets 482487dd8d GPU: Ignore light params for shade mapping.
They aren't part of the equation, so this simplifies and slightly reduces
number of shaders.
2018-12-02 14:11:19 -08:00
Unknown W. Brackets 9a7ee41191 Vulkan: Avoid OpKill workaround with no stencil.
It seems like depth gets messed up either way on discard, but behaves
sorta better without the write to depth.
2018-12-01 14:10:47 -08:00
xebra 453e274fbe [spline/bezier]Fix around vertex type flags. 2018-10-07 23:54:11 +09:00
Unknown W. Brackets 703181607e GPU: Apply color test after doubling. 2018-09-09 20:09:48 -07:00
Unknown W. Brackets 5ad948df73 Vulkan: Avoid discard when we can blend.
Where possible, replace alpha and color testing with a zero alpha value.

This allows early fragment tests more often, which may help #11227.  It
may also generally help performance on PowerVR devices.
2018-07-27 20:04:36 -07:00
Henrik Rydgård 29c41c6a35 Implement shader depal for Vulkan. See #10908. Bilinear filter not yet implemented. 2018-04-13 14:19:01 +02:00
Henrik Rydgård 36fd2711d6 Revert "Remove further remains of hardware skinning."
This reverts commit 40db61a680.
2018-04-10 12:22:41 +02:00
Henrik Rydgård 6a90b8fbb4 Revert "Further cleanup after the removal of hardware skinning."
This reverts commit f086a0915f.

Increment the shader cache version. Restore some more.
2018-04-10 11:38:02 +02:00
Henrik Rydgård f086a0915f Further cleanup after the removal of hardware skinning. 2018-03-05 00:03:47 +01:00
Henrik Rydgård 40db61a680 Remove further remains of hardware skinning. Fixes #10661 2018-03-05 00:03:47 +01:00
Henrik RydgårdandGitHub a67357db05 Merge pull request #10223 from unknownbrackets/minor
Reporting: Use a different link message on preload
2017-12-01 20:28:37 +01:00
Unknown W. Brackets be6343612f GPU: Add missing shader id to short desc. 2017-12-01 11:17:12 -08:00
Henrik Rydgård 8a58b768f1 Check for HW-transform and through when loading GL shader cache. 2017-12-01 11:32:16 +01:00
Henrik Rydgård be115822f7 Minor cleanup. Add a debug assert in shader ID calculation 2017-12-01 11:23:09 +01:00
Henrik Rydgård 3e011238c5 Fix minor discrepancy in shader ID calculation, I don't think this will fix anything though. Bumping shader cache version and doing minor cleanup too. 2017-11-30 22:44:39 +01:00
Henrik Rydgard 078e1151f9 Dirty-flag the fragment shader ID. 2017-08-14 11:36:07 +02:00
Henrik Rydgard 7230a8b427 Remove the "Disable alpha test" setting. It breaks too many things.
The  performance benefits in a few games on older hardware are not worth it.
We are able to automatically remove redundant alpha test in many cases now.
2017-04-01 11:36:35 +02:00
Henrik Rydgard 2a231b397b Unbreak environment mapping 2017-01-30 16:13:47 +01:00
Henrik Rydgard 0e4fb11a2d If we can predict that the texcoord.z will always be 1.0 after the matrix, skip texture projection. Should help #9189 2017-01-30 16:03:57 +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
xebraandHenrik Rydgård b436aef32a [spline/bezier]Avoid to set shader id bits if option of hardware tessellation is off. 2017-01-23 14:13:28 +01:00
xebraandHenrik Rydgård 71a44644a1 [spline/bezier]Add some flags in shader id for hardware tessellation. 2017-01-23 14:12:02 +01:00
Henrik Rydgard 49ce7178f5 Fix bug when showing shader IDs in the shader viewer 2016-12-21 15:50:20 +01:00
Henrik Rydgard 0fa2f2c7ae Remove more now-unused code 2016-12-20 13:50:07 +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
Henrik Rydgard 790210f6ef Minor fixes 2016-01-17 20:33:22 +01:00
Henrik Rydgard dfa7a252de Get rid of some redundant vertex shaders when using unlit ShadeMapping (wipeout, etc) 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
Unknown W. Brackets f982e777e5 Stop logging alphatested draws for debug stats.
Measured a small perf hit here, and we're not really using these stats
much anymore.
2015-12-30 10:24:54 -08:00
Unknown W. Brackets 2b832e7f6c Zero out dst blend factors in 565. 2015-11-04 00:35:55 -08:00
Henrik Rydgard f4248cb550 Remove a whole lot of flipping special cases 2015-11-02 20:07:30 +01:00
Unknown W. Brackets c41b981333 Oops, undelete shader bits for alpha test. 2015-10-24 23:05:18 -07:00
Unknown W. Brackets 97c568dca6 Tweak to shader desc. 2015-10-24 23:05:09 -07:00