Commit graph

1593 commits

Author SHA1 Message Date
Ryan Houdek
83a79c28ca Continuation of the previous commit. I missed a integer. 2013-07-21 11:27:26 +00:00
Ryan Houdek
6194234a54 Fix a issue in the texture conversion shaders that was multiplying an integer with a float. 2013-07-21 11:17:21 +00:00
Ryan Houdek
7d6b36bf73 Fix most ARM warnings 2013-07-05 19:56:15 -05:00
NeoBrainX
1f92ccc228 ShaderGen: Use u8 as uid storage base type. Fixes an off-by-one error introduced in revision bdc28106ee that caused some lighting issues. 2013-07-02 14:48:08 +02:00
NeoBrainX
c34c82e7ae VertexShaderGen: Fix a potential bug where vertex shader uids don't change when
pixel lighting is toggled.

Same as revision f524312fd1 but done properly (why is our shader gen code this dumb?).
2013-06-30 14:27:04 +02:00
NeoBrainX
b8b5427ba4 VertexShaderGen: Fix a dumb regression from revision f524312fd1. 2013-06-30 11:36:45 +00:00
NeoBrainX
eb153cfded PixelShaderGen: Fix a small early-ztest related bug. 2013-06-29 23:14:08 +02:00
NeoBrainX
99301bd158 PixelShaderGen: Store early_ztest as part of shader uid. 2013-06-29 23:01:42 +02:00
NeoBrainX
f524312fd1 VertexShaderGen: Fix a potential bug where vertex shader uids don't change when pixel lighting is toggled. 2013-06-29 23:01:42 +02:00
NeoBrainX
e3c0a39d5d Merge branch 'shader-uids-awesome-after-hours'. 2013-06-28 17:45:19 +02:00
NeoBrainX
166a9c5637 Finishing touches. 2013-06-28 17:43:53 +02:00
NeoBrainX
ba310ce096 PixelShaderManager: Revert code introduced mainly in revision 0fdeb81038.
The shader constant usage profile functionality is still buggy and the code using it wasn't ever meant to be merged to master.
2013-06-25 13:37:38 +02:00
NeoBrainX
597a6b34cb Compactify VertexShader uid struct. 2013-06-23 19:29:02 +02:00
degasus
a2e132dd4b small index generator optimiztions
- rewrite loops to not use divisions and multiplications
- remove warnings as the current implementations seems to be correct (ignore additional vertices)
2013-06-23 14:38:25 +02:00
NeoBrainX
bdc28106ee Optimize shader uid checks by checking the number of uid values which are actually used. 2013-06-22 21:47:22 +02:00
NeoBrainX
16ada5fa3d Compactify generated UID generator assembly and generally cleanup code by storing tev stage hash values in a struct. 2013-06-22 21:47:22 +02:00
Ryan Houdek
02cbcc8ec4 [Android] When running OpenGL ES 3 backend, we've got to switch the screen coordinates or bad things happen. Adds a Driver bug that causes swap every single flush. Hard requirement currently to see /anything/ on screen. 2013-06-18 12:44:06 -05:00
NeoBrainX
c4eb659fec BPMemory: Assign a more descriptive name to a field in the genmode register. 2013-06-18 17:25:16 +02:00
Ryan Houdek
6143594db6 [Android] Qualcomm glGetShaderInfoLog returns a max of 1024 bytes(tested) for the log, and glGetShaderiv with GL_INFO_LOG_LENGTH /always/ returns 0 on compile failure. 2013-06-18 10:24:36 -05:00
Ryan Houdek
7df8a9cae8 Partial revert of 0247b2a97a. I'll add a work around for Qualcomm in a bit. Qualcomm shader compiler failing was only due to floating suffixes not whole function defines. Qualcomm video driver devs seem to have a good response time when it comes to OpenGL ES 3 issues. 2013-06-18 07:52:36 -05:00
degasus
c57a90c5b5 don't define clipPos twice
fix issue 6378
2013-06-17 23:24:54 +02:00
NeoBrainX
8816369144 PixelShaderGen: Add some TODOs.
Totally the perfect commit message for a final commit before merging :p
2013-06-17 13:17:25 +02:00
NeoBrainX
f724b47f45 PixelShaderGen: Fix more critical issues, some of which are regressions of revision 32b78a85. 2013-06-17 13:08:38 +02:00
NeoBrainX
2b2ca5260f PixelShaderGen: Fixed some bugs, removed unused shader uid fields. 2013-06-17 13:03:38 +02:00
NeoBrainX
7a01ceba73 PixelShaderGen: Fix various merge conflicts and a critical regression from revision 32b78a85. 2013-06-17 12:51:57 +02:00
NeoBrainX
c505260ec1 Fix some merge conflicts. 2013-06-17 12:29:47 +02:00
NeoBrainX
ca22872dae Merge 'master' into shader-uids-awesome.
Conflicts:
	Source/Core/VideoCommon/Src/LightingShaderGen.cpp
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
	Source/Core/VideoCommon/Src/PixelShaderGen.h
	Source/Core/VideoCommon/Src/VertexShaderGen.cpp
2013-06-17 12:05:47 +02:00
NeoBrainX
f0ea525d3b PixelShaderGen: Change a comment slightly. 2013-06-17 11:39:50 +02:00
NeoBrainX
20719081df PixelShaderGen: Move RegisterStates from global storage to stack. 2013-06-17 11:37:41 +02:00
NeoBrainX
7e0db58b1e Fix stuff 2013-06-17 10:50:16 +02:00
NeoBrainX
32b78a8572 First steps of making the pixel shader uid struct more compact. 2013-06-17 10:50:12 +02:00
Armada
9594cac42c Build fix: Android NDK doesn't support any locale switching.
Also, Mac OS X doesn't support DX9.
2013-06-16 14:51:38 +02:00
Armada
fc7099a905 Set the locale per-thread instead of globally when generating shaders. Add cross-compatible versions of newlocale, uselocale and freelocale.
This commit fixes a rare race condition when generating shaders because setlocale is global.
2013-06-16 12:33:13 +02:00
Ryan Houdek
fa4ad82878 Fix Windows Compiling? 2013-06-12 03:14:13 -05:00
Ryan Houdek
9df3dbe13c Build Fix 2013-06-11 08:38:45 -05:00
Ryan Houdek
703a51e4c0 [Android] Start of *working* GLES3 support. Needs to be able to compile in Windows still. 2013-06-11 08:33:56 -05:00
skidau
196d152ad7 Invalidate the texture cache using the GPU thread when the CPU thread makes a request.
Fixes issue 6350.
2013-06-08 11:28:54 +10:00
degasus
a51d6a6ddd add new statistics for gpu buffer streaming 2013-05-23 21:07:01 +02:00
Rachel Bryk
10d1d19409 Set graphics settings while playing a movie in UpdateActiveConfig(), so settings can't be changed for a frame. 2013-05-21 19:20:22 -04:00
degasus
a905b18ef1 Merge branch 'ppd' - per pixel depth
use always ppd is a huge gpu performance drop: 20%-50%
and always disable it cause some rendering issues
so there is an option again
But this time it's called "Fast Depth Calculation"
2013-05-12 07:29:31 +02:00
Ryan Houdek
bf67378812 Fix the integer compare in our GLSL fmod function 2013-05-11 00:16:20 -05:00
NeoBrainX
f348712d3a BPMemory: Fix a small documentation mistake from revision 9365187f89. 2013-05-10 11:47:06 +00:00
degasus
f7c3cacb5c ppd: fix small issues in my last commit 2013-05-10 12:51:06 +02:00
degasus
89be1cbf51 recreate "per pixel depth" option and renamed it to fast depth calculation 2013-05-09 17:48:48 +02:00
degasus
c7486609fa fix underflow in IndexGenerator::AddFan
fix issue 6282

The Last Story seems to render a fan with two vertices. It is non-sense as it
shouldn't do anything, but the code underflows at (u32)numVerts-3
2013-05-09 10:17:12 +02:00
NeoBrainX
9365187f89 BPMemory: Add register documentation for texture source adress and EFB configuration. 2013-05-06 22:20:17 +02:00
Ryan Houdek
0247b2a97a [Android] More GLES3 things. Disable Framedumping and MSAA rendering. Remove the HLSL->GLSL shader defines since Qualcomm doesn't support this in their shader compiler. Now they get chosen in our shader generator instead. 2013-05-06 06:43:04 -05:00
NeoBrainX
2c7ed2a793 Apply color mask when alpha test parameters change. Required to make the changes in revision be706a3977 work properly.
Fixes issue 6080.
2013-05-01 11:50:37 +02:00
NeoBrainX
9cb263ad48 PixelShaderGen: Set some uid fields that I missed before. 2013-04-29 21:19:48 +02:00
NeoBrainX
02afec5076 Polish shader uid checking. 2013-04-29 21:00:39 +02:00
NeoBrainX
77dae3496a PixelShaderGen: Cleanups. 2013-04-29 19:52:12 +02:00
NeoBrainX
adab4e37f7 Fix some mistakes from the master merge; some cleanups. 2013-04-29 19:37:32 +02:00
NeoBrainX
5e6b712651 Merge 'master' into shader-uids-awesome.
Conflicts:
	Source/Core/VideoCommon/Src/BPMemory.h
	Source/Core/VideoCommon/Src/LightingShaderGen.cpp
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
	Source/Core/VideoCommon/Src/PixelShaderGen.h
	Source/Core/VideoCommon/Src/PixelShaderManager.cpp
	Source/Core/VideoCommon/Src/VertexShaderGen.cpp
	Source/Core/VideoCommon/Src/VertexShaderGen.h
2013-04-25 14:05:54 +02:00
NeoBrainX
eef95fa4c5 ShaderGenCommon: Adding documentation. 2013-04-25 13:30:41 +02:00
Lioncash
8da425b008 Formatting cleanup for VideoCommon.
Block braces on new lines.

Also killed off trailing whitespace and dangling elses.

Spaced some things out to make them more readable (only in places where it looked like a bit of a clusterfuck).
2013-04-24 09:21:54 -04:00
degasus
4a48485482 Revert "Revert "Fix performance issues on certain legacy graphics hardware that isn't capable of copying an integer.""
This reverts commit 8b7141d3de.

GLSL120 can't handle integer attributes :-(
2013-04-24 03:03:52 +02:00
lioncash
d244bca1f5 Fix a bunch of random typos in comments and logging.
Also update the comment headers for two functions in GCMemcard.cpp.
2013-04-19 09:21:45 -04:00
Lioncash
bab9963b00 New license header introduced for DiscIO, AudioCommon, InputCommon, VideoCommon, and Common projects. 2013-04-17 23:09:55 -04:00
Ryan Houdek
48927c17d2 Good job Windows. Stop choosing the same names as I do. 2013-04-13 00:54:11 -05:00
Ryan Houdek
39a7096711 Extend our OSD class to support callbacks on init, onframe, and shutdown. 2013-04-13 00:48:53 -05:00
degasus
7e630ba920 Merge branch 'primitive_restart' 2013-04-11 14:01:58 +02:00
NeoBrainX
7480f5dfd6 ShaderGenCommon: Clean up. 2013-04-10 14:55:46 +02:00
NeoBrainX
e7a5847c30 ShaderGen: Build fix. 2013-04-10 14:44:09 +02:00
NeoBrainX
abde070f63 LightingShaderGen: Use a float4 array for lights instead of a struct (uniform management in the non-UBO path is a mess otherwise).
Also fix a small bug (cf. revision  154c533e76).
2013-04-10 14:25:18 +02:00
NeoBrainX
154c533e76 VertexShaderGen: Fix a small GLSL regression in emboss mapping. 2013-04-10 11:44:49 +00:00
NeoBrainX
fab4f1d0a5 LightingShaderGen: Improve code flexibility. 2013-04-10 13:38:31 +02:00
NeoBrainX
31d2cab8d3 Add ShaderGenCommon to vcproj file list. 2013-04-10 12:55:42 +02:00
NeoBrainX
ec08914905 Move Shader UID mismatch checking to VideoCommon. 2013-04-10 12:54:22 +02:00
degasus
1aa10b579a fix triangle_fan size calculation
wasn't updated for the new primitive restart implementation
2013-04-10 12:45:44 +02:00
degasus
a6412f7bd4 render a triangle for a 3 vertice quad
fix issue 6214
2013-04-10 12:36:59 +02:00
NeoBrainX
ec5f596b31 VertexShaderGen: More per-pixel-lighting fixes. 2013-04-10 12:17:28 +02:00
Jordan Woyak
385d8e2b15 ChunkFile has allowed me to accidentally "Do" a non-POD for the last time! 2013-04-09 19:02:22 -05:00
degasus
b0108631f6 use templates for primitive restart 2013-04-08 19:39:43 +02:00
degasus
4dca133745 small cleanups 2013-04-08 17:58:23 +02:00
degasus
80b56ddd17 convert triangle_fan to triangle_strip 2013-04-08 17:22:16 +02:00
degasus
702198f39b Merge branch 'master' into primitive_restart
Conflicts:
	Source/Core/VideoCommon/Src/VideoConfig.h
	Source/Plugins/Plugin_VideoDX9/Src/main.cpp
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
2013-04-08 15:57:51 +02:00
degasus
4c40e70b8a ogl: support glsl120 2013-04-08 14:50:58 +02:00
Rachel Bryk
deece78e19 Seriously, someone kill me. 2013-04-08 03:11:45 -04:00
Rachel Bryk
48f3e962d6 Kill me now.
Fixes issue 6227.
2013-04-08 03:05:12 -04:00
Lioncash
195336021f Fix a few typos in the comments/logging in VideoDX9, VideoCommon, and VideoSoftware projects.
See Render.cpp, PixelShaderGen.cpp, and PixelShaderManager.cpp for most of the changes.

See VertexShaderManager.cpp for a logging typo fix.

See SWRenderer.cpp for a small typo fix for a message that gets swprintf'd in DrawDebugText.

See SWVertexLoader.cpp for a typo fix of an assert message.

Should slightly improve the readability of some of those files.
2013-04-07 17:11:29 -04:00
Pierre Bourdon
0ca7ea6c3f D3D11: Fix glitched polygon edges when MSAA is enabled (this time without breaking OpenGL) 2013-04-07 20:58:48 +02:00
Rachel Bryk
4d81e0739d Use an enum for efb scale values. 2013-04-06 01:49:13 -04:00
Rachel Bryk
ee163d1e49 Someone take my commit rights away. 2013-04-05 17:26:56 -04:00
Rachel Bryk
6a5a522bba Hastily committing untested code without making sure i didn't miss anything first? I would never! 2013-04-05 17:20:34 -04:00
Rachel Bryk
e531970052 Round IR scale down to whole number if using 1.5x/2.5x IR, if game ini specifies -1 for EFBScale.
Fixes issue 6210.
2013-04-05 17:13:48 -04:00
lioncash
a7c05dc922 Remove an unused variable in VideoConfig.cpp and SWVideoConfig.cpp 2013-04-04 09:32:28 -04:00
Grant Paul
9f8841e960 Revert "D3D11: Fix glitched polygon edges when MSAA is enabled."
This reverts commit 61c327ba8b.
2013-04-03 21:17:09 -07:00
NeoBrainX
61c327ba8b D3D11: Fix glitched polygon edges when MSAA is enabled. 2013-04-03 18:56:33 +02:00
Jordan Woyak
4ba12be669 We can use unordered_map without pain now! 2013-04-01 19:25:32 -05:00
Lioncash
58159a1693 Some more logging typos and clarifications. Missed these in my last commit.
This commit mainly elaborates on some messages a little more. Also fixes some typos that slipped through the last commit.

A large change in text can be seen in EXI_DeviceMemoryCard.cpp. I added more info as to why a write to a memory card may fail. (This actually was a reason I was unable to write to a memcard recently).

Elaborations can be seen in WGL.cpp

I did change some comments in some files that I was correcting logging messages in, however this is only if I spot a typo or if an abbreviation is lower-cased. Even in that case, the amount of changes done to comments is very minimal.
2013-04-01 00:10:54 -04:00
Lioncash
f432d6038e Fix some typos and correct some capitalizations in the log messages.
Makes the logging look more orderly and less spammy when spitting out things.
2013-03-31 19:13:30 -04:00
Rodolfo Bogado
45651098f6 Use a brute force approach to test for Dual source blend support.
Sorry for a direct commit to the main branch but i need fast feedback, and i don't want to leave problematic code in the main branch for a long time.
if this approach does not work for the drivers with problems will transform dual source blend to an option in the D3D9 backend.
I appreciate the help of the people that tested my last commit and thanks to neobrain for pointing this solution.
2013-03-31 20:02:13 -03:00
NeoBrainX
a60e1a3db8 ShaderGen: Remove some TODOs and fix an issue with per pixel lighting. 2013-03-31 23:57:39 +02:00
NeoBrainX
f57b902d33 PixelShaderGen: Cleanups. 2013-03-31 23:53:46 +02:00
NeoBrainX
f6d65a636e ShaderGen: Fix per pixel lighting. 2013-03-31 23:29:33 +02:00
NeoBrainX
248d56d930 ShaderGen: Small optimization. 2013-03-31 20:55:57 +02:00
NeoBrainX
cdddb26bba Apparently override is less fun than I thought. 2013-03-29 22:29:37 +01:00
NeoBrainX
2afd892e46 ShaderGen: More interface cleanups. Less wtfs :) 2013-03-29 22:24:49 +01:00
NeoBrainX
e31c2aa601 ShaderGen: Cleanup uid data writing. 2013-03-29 21:53:57 +01:00
NeoBrainX
9eccd56ef0 PixelShaderGen: Some cleanups. 2013-03-29 20:59:03 +01:00