Commit graph

157 commits

Author SHA1 Message Date
Ryan Houdek
2fbca145cb Remove bSupportsGLSLLocation since it won't work how I expect it. 2012-10-09 23:41:05 -05:00
Ryan Houdek
4a84c6f742 Add in UBOs, doesn't work yet. Still debugging here. 2012-10-09 23:41:05 -05:00
Ryan Houdek
d897491f94 Few compiler errors that got exposed once I got Dual Source Blending working. Seems it isn't working quite 100% either. Good chance I missed something anyway. 2012-10-09 23:41:04 -05:00
Ryan Houdek
d83ead5914 Support Dual Source Blending in OGL plugin with GLSL. 2012-10-09 23:39:16 -05:00
Ryan Houdek
b24990ca28 Bit of cleanup. Clean up my massive hack in the ShaderManagerFiles. Almost feature parity with Nvidia CG now I think. Just need to do Alpha test with Dual source blending now. 2012-10-09 23:37:52 -05:00
Ryan Houdek
cf68cc0c61 Add support for GL_ARB_shading_language_420pack so we don't have to binding sampler locations. Also add support for GL_ARB_separate_shader_objects which doesn't currently work for some reason....investigating. 2012-10-09 23:37:52 -05:00
Ryan Houdek
9064b76deb Shader Compile fixes. Played SMS for two shines. 2012-10-09 23:33:02 -05:00
Ryan Houdek
7cec31dbf3 Almost there. 2012-10-09 23:33:02 -05:00
Ryan Houdek
0fc755c4df More stuff 2012-10-09 23:31:31 -05:00
Ryan Houdek
a357c77257 Add in GLSL setting again.
PS and VS making. Untested and won't work for now.

Add in program shader cache files.

Readd NativeVertexFormat stuffs.

Add in PS and VS cache things.

SetShaders in places.

Fixed EFB cache index computations in OpenGL renderer.

The previous computation was very likely to go out of array bounds,
which could result in crashes on EFB access.

Also, the cache size was rounded down instead of up. This is a problem
since EFB_HEIGHT (528) is not a multiple of EFB_CACHE_RECT_SIZE (64).
2012-10-09 23:23:37 -05:00
NeoBrainX
bb8b5936c0 Revert "Partially revert revision d511b506120c."
This reverts commit 08e06b2293.
2012-09-27 18:15:44 +02:00
NeoBrainX
08a9c66037 Revert the recent zcomploc changes including the Graphic_Fixes merge.
Reason:
- It's wrong, zcomploc can't be emulated perfectly in HW backends without severely impacting performance.
- It provides virtually no advantages over the previous hack while introducing lots of code.
- There is a better alternative: If people insist on having some sort of valid zcomploc emulation, I suggest rendering each primitive separately while using a _clean_ dual-pass approach to emulate zcomploc.

This reverts commit 0efd4e5c29.
This reverts commit b4ec836aca.
This reverts commit bb4c9e2205.
This reverts commit 146b02615c.
2012-08-10 20:12:02 +02:00
skidau
0efd4e5c29 Skipped the ZCompLoc pass if the result can be determined at compile time. Brings back the speed lost by r146b02615c07. 2012-08-06 09:29:01 +10:00
skidau
b4ec836aca Removed the offset if the ZCompLoc GREATER or LESS function is used. Fixes the invisible player in THPS3. 2012-06-29 18:47:49 +10:00
skidau
bb4c9e2205 Fixed "Failed to compile pixel shader" error when Per-Pixel Lighting is enabled. Thanks to slmpika for the fix. 2012-06-02 11:25:44 +10:00
Pierre Bourdon
1efabea9b4 Fix compilation errors with g++4.7 2012-05-26 08:09:50 +02:00
skidau
146b02615c Merge rodolfoosvaldobogado's zcomploc code (Graphic_Fixes branch) 2012-05-26 13:47:07 +10:00
Jordan Woyak
722480cb2e Fix compilation with g++ 4.7 and some warnings. Fixes issue 5347. 2012-04-07 15:45:32 -05:00
rodolfoosvaldobogado
5650b3b5f6 more fixes. take in account when depth textures are used and alpha test fails :)( i really forgot that). 2012-04-03 15:08:58 -03:00
rodolfoosvaldobogado
4fafbd0700 Fix for my last commit thanks to Lolaker for pointing the error 2012-04-03 09:56:11 -03:00
rodolfoosvaldobogado
6a446efd5f Second Stage: re implement zcomplock and correct all the logic error in PixelShaderGen.cpp. i disable fastzcomlock for the moment to avoid confusions.
please test for regressions
2012-04-03 00:08:36 -03:00
NeoBrainX
460610ea0e Revert Rodolfo's recent zcomploc commits until they actually work correctly.
This reverts commit 402006a83a.
This reverts commit 48d8d71391.
This reverts commit 450dcc9d2c.
2012-03-30 01:57:53 +02:00
rodolfoosvaldobogado
402006a83a more fixes to zcomplock and opengl implementation 2012-03-29 18:26:58 -03:00
rodolfoosvaldobogado
450dcc9d2c As requested, this is my implementation of zcomploc using a multi-pass algorithm. My apologize to the others devs for committing in the main branch but is the only way to get this tested as soon as possible.
please test for regressions, speed and for other issues fixed, as a example, the black color in water splash in super mario galaxy are fixed with this rev.
please as soon as yo find a bug let me know.
2012-03-27 15:44:58 -03:00
rodolfoosvaldobogado
9ed83765e6 long time no commits :)
a little code cleaning to avoid duplicated execution of AlphaPreTest and a little correction to some comments from the previous commits.
this change must behave exactly like last revision, if something is broken please let me know
2012-03-25 00:01:47 -03:00
Pierre Bourdon
b5ba2eb030 Merge branch 'master' into zcomploc-support 2012-03-24 18:41:51 +01:00
NeoBrainX
fee98b426b Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of them are wrong). 2012-03-24 15:58:44 +01:00
skidau
41bcf657f8 Adjusted the DX9 offset of the Sampling address to more closely match what we are seeing in games.
Fixes issue 5305.
2012-03-23 23:20:19 +11:00
Pierre Bourdon
339ee98e62 Add a comment before the zcomploc test explaining the implementation/hack 2012-03-22 22:10:23 +01:00
Pierre Bourdon
0ffc12bbfd Merge branch 'master' into zcomploc-support
Conflicts:
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
2012-03-22 15:21:52 +01:00
skidau
006923e871 Disabled zcomploc while update_enable has been set in zmode. Fixes zcomploc in F-Zero GX. 2012-03-22 20:36:41 +11:00
Henrik Rydgard
f5d4fe0bfe Fix some minor bugs pointed out by PVS Studio (thanks!) 2012-03-03 20:07:20 +01:00
NeoBrainX
3a9fed0ba2 PixelShaderGen: Fix a bug introduced in revision 9adc119e3c.
D3D11: Fix shader constant mapping.
2012-02-21 12:51:41 +01:00
NeoBrainX
9adc119e3c PixelShaderGen: For custom textures and scaled EFB copies, use correct texel to pixel mapping when sampling textures
(D3D9 only)

This is basically the same as revision e58692653a, just for scaled textures and with a LOT more work...
2012-02-20 20:32:08 +01:00
NeoBrainX
e58692653a PixelShaderGen: Use correct texel to pixel mapping when sampling textures
(D3D9 only)

Fixes issue 2068.
Fixes issue 5158.
2012-02-17 17:09:17 +01:00
Pierre Bourdon
8f31968466 Revert "Merge branch 'zcomploc-support'"
This reverts commit 9dad9ebe89, reversing
changes made to e76bc71efe.
2011-11-01 01:37:54 +01:00
Pierre Bourdon
9dad9ebe89 Merge branch 'zcomploc-support'
zcomploc is a feature of the BP which switch depth test from before the alpha
test to after the alpha test. This way, transparent fragments are written to
the depth buffer too.

The current implementation is quite hacky and does not cover all cases but is
enough to fix problems in a lot of game. A complete implementation would
require a multipass rendering method and is attempted in the
zcomploc-experimental branch.

According to testers feedback, fixes bugs in the following games:
- Baten Kaitos
- Baten Kaitos Origins
- 007: Everything or Nothing
- Ty the Tasmanian Tiger
- Tony Hawk's Pro Skater 3

And probably other games too.

Conflicts (because of new-shadercache-uids):
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
2011-10-04 07:56:13 +02:00
NeoBrainX
81c614fa07 Clean up various things. 2011-09-29 23:32:39 +02:00
NeoBrainX
ddfe219293 Fixup line endings. 2011-09-29 23:32:39 +02:00
NeoBrainX
ca7e8a9e88 Fix pixel lighting. 2011-09-29 23:32:39 +02:00
NeoBrainX
5d075ce507 - D3D9: pass the correct API type to ValidatePixelShaderIDs
- don't load shader cache from disk in d3d9/11 if shader debugging is enabled (we won't have any info about the source shader code otherwise, etc)
- dump shader source codes on safe UIDs mismatch

Thanks to LordMark and [SS] for reporting those to me ;)
2011-09-10 03:10:28 +02:00
NeoBrainX
a021dd7b79 Small fix to the previous commit. 2011-09-09 21:45:11 +02:00
NeoBrainX
b28348066e Improve the shader UID debugging stuff and merge it to VideoCommon, effectively enabling it in D3D9 and D3D11 as well. 2011-09-09 00:32:04 +02:00
NeoBrainX
349a3ae91d Merge remote-tracking branch 'remotes/origin/master' into new-shadercache-uids 2011-09-08 02:14:18 +02:00
NeoBrainX
6c7bda6851 Various fixes and cleanups. 2011-09-08 02:09:44 +02:00
NeoBrainX
98b62d8362 Track alpha blending paramaters in the pixel shader UID. 2011-09-07 21:15:14 +02:00
NeoBrainX
3939f9595a Add runtime checks to make sure we aren't overoptimizing the pixel shader cache. 2011-09-07 21:15:09 +02:00
NeoBrainX
4702de591e Added safe pixel shader UIDs for debugging purposes. 2011-09-07 21:10:06 +02:00
NeoBrainX
df4e337ac9 Fix various pixel shader compilation errors caused by the Direct3D shader compiler going nuts due to uninitialized (and unused) shader variables.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7693 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-09-06 18:37:01 +02:00
Pierre Bourdon
d3ecf98213 Include the zcomploc bit in the shader UID
Fixes issues with switching zcomploc on/off during execution.
2011-09-04 05:38:32 +02:00