Commit graph

48 commits

Author SHA1 Message Date
degasus
4377618438 VideoCommon: keep a copy of the const buffer in VideoCommon
The upload in the backend isn't done, it's just pushed by the mostly removed SetMulti*SConstant4fv.
Also no optimizations was done on VideoCommon side, but I can start now :-)

Sorry for the hacky way, but I think this is a nice (working) snapshot for a much bigger change.
2013-10-12 20:29:56 +02:00
Tony Wasserka
61ed40749f Shader generators: Remove any references to D3D9 and cleanup the affected code. 2013-10-06 13:30:56 +02:00
Ryan Houdek
6bdcde9dd6 [Android] Tegra 4 'support.' This brings up the OpenGL backend to support Tegra 4 to the point where it will run games but it doesn't have any video output for some reason. This is a large change that doesn't actually change much functionally. Walking through the changes.
It changes the string in the Android backend select to just OpenGL ES.
Adds a check in the Android code to check for Tegra 4 and to enable the option to select the OpenGL ES backend.
Adds a DriverDetails bug under BUG_ISTEGRA as a blanket case of Tegra 4 support.
The changes that effects most lines in this change. Removing all float suffixes in the pixel/vertex/util shaders since OpenGL ES 2 doesn't support float suffixes.
Disables the shaders for reinterpreting the EFB format since Tegra 4 doesn't support integers.
Changes GLFunctions.cpp to grab the correct Tegra extension functions.
Readds the GLSL 1.2 'hacks' as GLSLES2 'hacks' since they are required for GLSL ES 2
Adds a GLSLES2 to the GLSL_VERSION enum.
Disable the SamplerCache on Tegra since Tegra doesn't support samplers...
Enable glBufferSubData on Tegra since it is the only mobile GPU to correctly work with it.
Disable glDrawRangeElements on Tegra since it doesn't support it, This uses glDrawElements instead.
2013-10-06 03:12:29 -05:00
degasus
573dbfd494 ogl: drop glsl120 support 2013-09-22 23:45:14 +02:00
Ryan Houdek
82f7b20b91 There. Fix all the issues where we are using integers when we should be using floats in the texture conversion shaders. 2013-07-21 12:00:20 +00:00
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
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
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
Lioncash
bab9963b00 New license header introduced for DiscIO, AudioCommon, InputCommon, VideoCommon, and Common projects. 2013-04-17 23:09:55 -04:00
degasus
4c40e70b8a ogl: support glsl120 2013-04-08 14:50:58 +02:00
lioncash
edd9d0e0ef Clean up more space/tab mismatches in AudioCommon, Common, and VideoCommon.
Not planning to touch Core since it's the most actively changed part of the project.
2013-03-19 21:51:12 -04:00
degasus
0325e37bfb merge glsl headers into one place 2013-02-13 21:34:48 +01:00
degasus
6afc30240a partial revert of 8a6f747408
texture_rect isn't in core 3.0, so the long texture function must be used
2013-01-22 00:18:42 +01:00
degasus
8a6f747408 glsl: remove usage of old texture2D* function 2013-01-19 11:07:06 +01:00
degasus
074f73c641 move utils texture to sampler 8+9
rasterfont tex will aways bound to samp8.
efb copy utils will be done in samp9.
2013-01-19 00:39:31 +01:00
degasus
b18c0a5d1b remove ubo for efb2ram 2013-01-14 12:37:31 +01:00
degasus
60b8e4fb1c vertex shader for texture converter 2013-01-11 11:59:42 +01:00
degasus
b38b62afc6 remove glsl binding support. convert every shader to version 130 2013-01-02 16:56:08 +01:00
degasus
48ede4dd30 switch to glsl 130, more than OpenGL 3.1 isn't needed 2012-12-28 16:05:14 +01:00
Ryan Houdek
7d93834cd8 Bit more cleanup from removing Nvidia CG 2012-12-27 22:53:07 -06:00
degasus
cf8f936abb fix efb2ram decoder 2012-12-19 23:43:05 +01:00
degasus
85ac76e8e2 fix gcc compilation 2012-12-19 23:42:22 +01:00
Shawn Hoffman
31a8424bcc fix formatting uglies introduced in glsl-master branch 2012-10-09 23:54:17 -05:00
Pierre Bourdon
3bcec51334 More coding style fixes because I suck at sed 2012-10-09 23:41:48 -05:00
Pierre Bourdon
3c6d0fc710 8 spaces indentation -> tabs 2012-10-09 23:41:48 -05:00
Ryan Houdek
5b06bbf87d Use UBOs in every shader. I had missed a few. Only cache Uniform locations if we aren't using UBOs. 2012-10-09 23:41:06 -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
8058f2f32f Missed one 2012-10-09 23:33:02 -05:00
Ryan Houdek
9064b76deb Shader Compile fixes. Played SMS for two shines. 2012-10-09 23:33:02 -05:00
Ryan Houdek
66a5334158 moe 2012-10-09 23:30:48 -05:00
skidau
1587cb3738 Fixed texture encoding. Fixes the interaction with objects in Another Code R. Thanks to wordmanwords for the patch.
Fixes issue 5405.
2012-05-05 11:21:05 +10:00
Rodolfo Osvaldo Bogado
e5210de9d5 just a little cleanup to maintain minimal interfaces
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7591 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-06-10 19:16:09 +00:00
Jordan Woyak
fbaf965995 Eliminated the plugin interface. Merged DX9/DX11/OGL video plugins into Dolphin. It could still use a lot of cleanup. Lots of things are still named "plugin". Software renderer is temporarily disabled until it gets some namespaces. I only updated vs08/10, Linux/OSX builds are broken.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6996 8ced0084-cf51-0410-be5f-012b33b47a6e
2011-01-31 01:28:32 +00:00
nitsuja-
60d2d42525 made texture conversion shaders use less instructions
this is mainly so they fit within ps_2_0 limits, but I made this separate from my last checkin to make it easier to test separately in case it somehow causes problems

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6619 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-12-19 21:05:41 +00:00
Rodolfo Osvaldo Bogado
9cb41e7c70 hopefully fixed zww issue with new efb to ram.
implemented new efb to ram in opengl
modified TextureConversionShader preparing the implementation of new efb to ram in dx11
please test for regressions

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5874 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-07-12 19:30:25 +00:00
Rodolfo Osvaldo Bogado
c98f8a96d2 HUGE commit :)
in general cleanup and bugfix disable pierre  patch for the moment as it causes problem in some games and hopefully fix the remaining missing textures for nvidia users in opengl.
make the code in pixelshadergen looks nice and readable.
D3D: this is a ultra experimental commit please check for regressions or error.
make the efb Scale / super sampling level customizable to improve the output quality and let the user configure quality according to his hardware.
is everyone likes this change will translate it to opengl
please test


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5612 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-06-05 00:01:18 +00:00
Rodolfo Osvaldo Bogado
782d9111e5 let's keep experimenting:
almost fixed real xfb in d3d, i say almost because there are some minor scalling problems. hope will fix them soon.
implemented a more intelligent index generator to emulate more accurately the behavior of the gc.
please give me feedback on this changes.
enjoy :)

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@5465 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-05-22 21:58:43 +00:00
Rodolfo Osvaldo Bogado
c4c809f6b1 Small fixes:
in opengl correct an error introduced by mi in efb to ram alignment, it's seems to fix SMS but it missalign a lot of other games, so revert to the default. must solve truncated coins in NSMB.
revert alpha testing values to the values in rev 4812 as they fix some games.
in d3d dynamized the Render target size so it will change at runtime when viewport exceed it size, in the worse case it will cause a missing frame when resizing but in the games I tested is not noticeable at all
This must solve all the remaining viewports problems in nvidia cards, in ati this is not needed.


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4888 8ced0084-cf51-0410-be5f-012b33b47a6e
2010-01-19 15:00:45 +00:00
Rodolfo Osvaldo Bogado
d02426a8e9 mixed commit:
in D3D and Opengl:
fixed one nasty bug in texture loading where if a dynamic texture keeps his format but the tlut format is changed, the try or reloading the texture in the same texture could cause a hang if the size of the resulting texture is different than the original (size in bytes)
Applied a ugly temporal hack to the texture conversor to solve efb to ram misalignments and effect distortions.
in D3D:
Pseudo implementation of logic ops using basic blending: the first 8 operations are "good approximations", the remaining 8 are bullshit :) if someone have a better approximation to emulate this logic please let me know.
please test if i don't break anything in the process and test Mario kart wee you will get a nice surprise.:)
 

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4656 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-07 18:48:31 +00:00
donkopunchstania
e6d51e8ff4 Fixed 24 bit depth copies to RAM. 24 and 16 bit depth copies are now more accurate. Added an offset to DX copies to RAM and made half sized copies to a texture linearly filtered.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4635 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-12-02 04:17:18 +00:00
Rodolfo Osvaldo Bogado
802c112ad9 Well this commit has 2 parts:
first part if fixing, fixed, i thing, the flickering that everyone has reported, at least in my case i only have flickering in the one texture in one game and now is fixed. The other fix is not for an reported issue, is more a correctness fix, running dolphin with pix to review debug errors, result in a ton of warnings and error, now with this commit, at least for ati, there no more error or warnings, this means, correct management and state change, no accurate emulation, for this still a lot of work to do.
for this part of the commit please give me feedback and let me know of remaining issues

Te second part is the partial implementation of efb to ram copy in d3d, this won't brake anything because is commented but i commit this to ask for help from ector and donko in some errors remaining in the implementation related to differences between opengl an d3d.
if you want to test this you have to uncomment line 150 to 155 of bpstruct.cpp

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4594 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-11-20 18:46:30 +00:00
Rodolfo Osvaldo Bogado
227d363881 small code clean up:
d3d: remove the depth texture path it will not work so for now only lockable textures were available. i thing the only way will be a use a secondary render target and do a depth pass to mimic depth textures.
opengl: minor cleanup here and there and a possible fix to issue 1509, but not tested because in my system the errors remarked in the issue don't show.
commond: code reorganization an optimization in the pixel shader  generator, trying to understand the tev stages, make some changes to make the generator faster (not much only started for the alpha test and fog).
this changes try start solving the diferences bethen the hardware plugins and the soft plugin.
i hope with i don't brake nothing but please test this a lot.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4465 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-25 02:35:21 +00:00
nakeee
9f8a2986a2 Videocommon: setlocale for shader compilation, should fix problem with runaway , in certain locales.
Please test issues 1533 and 1496


git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4418 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-10-14 01:58:39 +00:00
Shawn Hoffman
a08c801256 psyjoe's patch to shader compilation. ector/some "shader person" check this please :) looks reasonable to me though.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4267 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-14 06:25:00 +00:00
hrydgard
562a4e25ac Some housecleaning around the D3D plugin, start of preparations to share even more code with the GL plugin.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4183 8ced0084-cf51-0410-be5f-012b33b47a6e
2009-09-03 19:24:16 +00:00
Renamed from Source/Plugins/Plugin_VideoOGL/Src/TextureConversionShader.cpp (Browse further)