Commit Graph
105 Commits
Author SHA1 Message Date
Henrik Rydgård 37b57d925c D3D9: Fix a sign mistake generating the projection matrix. Fixes #13063 2020-06-28 18:25:08 +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 30ede8240c GPU: Move hw transform decision to draw engine. 2020-04-04 11:14:32 -07:00
Henrik Rydgård 974095ac10 Log shader contents to VERBOSE instead of DEBUG. 2020-02-29 10:46:04 +01:00
Unknown W. Brackets 5009698cc0 Core: Use a shared_ptr for i18n categories.
This does not make them thread safe, but it reduces the chances of a crash
a bit (see #12594.)
2020-02-09 07:35:16 -08:00
Henrik Rydgård 41a6b97023 DX9: Simplify some expressions 2020-01-26 16:34:46 +01:00
Henrik Rydgård 767b1e45b2 Fix the build - there's a Vec3 name collision, fixed it using a namespace. 2019-10-22 22:58:10 +02:00
Unknown W. Brackets f8ce9b08ba Vulkan: Limit stencil workaround to Adreno 5xx. 2018-12-23 14:11:57 -08:00
Unknown W. Brackets 1f594f3fb5 GPU: Track draw in shader manager.
With device restore etc. everywhere.
2018-12-23 12:55:37 -08:00
Unknown W. Brackets 52baec21a8 GPU: Refactor cull range calculation together. 2018-09-17 22:27:25 -07:00
Unknown W. Brackets 639a3f406d D3D9: Implement vertex range culling. 2018-09-17 07:27:26 -07:00
Unknown W. Brackets 797327eecd GPU: Handle bad fog params as large signed vals.
From tests, it seems they're just treated as valid exponents.

Using 65535 since that's the range of depth, can't think of a game using a
larger value for a fog parameter, probably never even this large.
2018-09-10 00:28:02 -07:00
Unknown W. Brackets b05f75f667 D3D9: Set alpha mask reference in uniforms.
Just so we don't have surprises later if we implement masking.
2018-09-08 20:05:19 -07:00
Unknown W. Brackets 4dafb163a3 D3D11: Split color test out by component.
Not working correctly together.  See #10629.
2018-09-08 20:03:26 -07:00
Unknown W. Brackets 9bac603976 GPU: Use HW transform for flat spline/bezier.
We can control the provoking vertex here, but it's less likely to matter.
2018-06-28 19:30:20 -07:00
Unknown W. Brackets 2606365ba4 GPU: Use software transform for flat shading.
Except on GLES where it works fine with the default provoking index.

This fixes #10969 so that it works everywhere.
2018-06-06 05:53:50 -07: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 d8651fd85b Combine the lightAngle and spotCoef float uniforms into one float2. Saves 64 bytes from the light uniform buffer, making it an even 512.
Probably a very small perf optimization.
2018-03-12 11:17:45 +01:00
Henrik Rydgård 40db61a680 Remove further remains of hardware skinning. Fixes #10661 2018-03-05 00:03:47 +01:00
Unknown W. Brackets 4731a2918c GPU: Use more typesafe shader IDs.
Since they really are fairly distinct, let's make sure we can't mix them
accidentally.
2017-12-02 09:07:27 -08:00
Henrik Rydgård d884eeda99 DX9: Revert a bad optimization, hopefully fixing #10205. Vulkan: Add a missing check. 2017-11-30 15:28:15 +01:00
Unknown W. Brackets 72e0a24724 GPU: Reset shader state on shader reset.
Was ending up with lastFSID being -1, but being used.

Seen in gpu/commands/blend test.
2017-09-20 08:37:54 -07:00
Henrik Rydgård c2bd739b49 Optimize uniform uploads for D3D9 and GL as well. 2017-08-20 13:53:39 +02:00
Henrik Rydgard 078e1151f9 Dirty-flag the fragment shader ID. 2017-08-14 11:36:07 +02:00
Henrik Rydgard 56cd991833 All: Only recompute the vertex shader ID when dirty 2017-08-14 11:36:06 +02:00
Unknown W. Brackets c19faf8ac8 D3D9: Correct half-pixel offset. 2017-05-23 23:45:55 -07:00
Unknown W. Brackets ad8a0e6cc0 Add an ini setting to hide performance warnings. 2017-03-11 19:31:00 -08:00
Henrik Rydgård 440e72d250 Clean up among the logs. Remove MASTER_LOG. 2017-03-06 13:10:23 +01: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 ba95e0f4d9 Initial stab at porting the DX9 backend to D3D11. Not working yet. 2017-02-09 13:28:40 +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 62a171c616 Minor DX9 optimization 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 b423998c36 Move uniform dirty-flag to gstate_c, opening up for other uses. 2017-01-24 18:12:20 +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 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 b0697b62d7 Fix bug in setting certain uniforms in DX9. Fixes #9224 2017-01-21 21:54:42 +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
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
Henrik Rydgard 58f77e8f5f Buildfix 2016-04-10 10:55:13 +02:00
Henrik RydgardandUnknown W. Brackets d67b148712 Add math dataconv funcs for packed values. 2016-03-06 11:33:53 -08:00
Unknown W. Brackets 79792a3c38 d3d9: Account for half-pixel z offset. 2016-01-20 22:53:47 -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
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
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