Commit graph

1816 commits

Author SHA1 Message Date
degasus
2312a8d9d5 GLSL: don't apply unsupported msaa settings 2013-03-17 10:44:57 +01:00
degasus
4a8ab0fafa disable pinned memory for fglrx 2013-03-17 10:06:16 +01:00
Jordan Woyak
98fa5006fd Fix some warnings. 2013-03-16 18:53:34 -05:00
degasus
4a929f85b6 GLSL: fix transparency issues on dual source blend. fix issue 6104 2013-03-17 00:36:13 +01:00
degasus
c7d75ee437 GLSL: explicitly check for gl errors for pinned memory 2013-03-16 10:08:46 +01:00
Ryan Houdek
db1fc9019b Add a OSX version check to GLSL so if anyone running < OSX 10.7 gets a message instead of crashing when running the game. Turn off DEBUG_GLSL. 2013-03-14 15:25:41 -05:00
degasus
2c9c4d0f01 remove syncing on hacked buffer
nvidia does wait for their gpu on syncing, so removing it.
But now, we have to recheck it on every plattform
2013-03-08 10:23:27 +01:00
degasus
708b7d57cd fix wrapping in postprocessing 2013-03-08 09:36:28 +01:00
degasus
f673e33a7d fix hotkey osd position 2013-03-07 21:42:40 +01:00
degasus
a6719abab7 mesa doesn't like 0x0 fbo 2013-03-07 21:30:11 +01:00
degasus
7af0838e98 disable ubo for intel/mesa
our ubo workaround isn't much better, but not corrupted and much faster (on hd4000) than the ubo one
2013-03-07 21:07:57 +01:00
degasus
a6844d6b9e move shader error files in dolphin user directory 2013-03-07 20:37:28 +01:00
degasus
2bd7ba76b9 only report errors without debug_glsl 2013-03-07 20:26:56 +01:00
degasus
8b232c7a4d fix "some" pp shaders ... 2013-03-07 19:51:57 +01:00
degasus
ebb34ced91 postprocessing: only add *.txt shader and sort them 2013-03-07 19:11:50 +01:00
degasus
1c125f0fb4 add resolution uniform for pp, 16bit uses this for reducing screen resolution (wtf?) 2013-03-07 17:35:27 +01:00
degasus
800a58f01c reimplement postprocessing and fix one shader as example 2013-03-07 17:00:11 +01:00
degasus
a1c5e90083 Merge branch 'master' into GLSL-master
Conflicts:
	CMakeLists.txt
	Source/Core/DolphinWX/CMakeLists.txt
	Source/Core/DolphinWX/Src/GLInterface.h
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
	Source/Core/VideoCommon/Src/TextureCacheBase.cpp
	Source/Core/VideoCommon/Src/VertexManagerBase.cpp
	Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoDX9/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj
	Source/Plugins/Plugin_VideoOGL/Plugin_VideoOGL.vcxproj.filters
	Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h
	Source/Plugins/Plugin_VideoOGL/Src/PixelShaderCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoOGL/Src/VertexShaderCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/main.cpp
2013-03-06 15:59:29 +01:00
degasus
a2bb7d5766 initialize bSupportsDualSourceBlend only in renderer 2013-03-05 18:35:30 +01:00
degasus
5534d7e8c3 Revert "remove flag GL_SYNC_FLUSH_COMMANDS_BIT on syncing"
This reverts commit 025f8d342f.
OSX may wait forever, so fix osx freeze
2013-03-05 16:51:09 +01:00
degasus
d19bc15d26 fix glsl140 workaround 2013-03-05 15:24:10 +01:00
Jordan Woyak
f3f89e1d00 Merge branch 'master' into vertex-loader-cleanup
Conflicts:
	Source/Core/Common/Src/CommonFuncs.h
	Source/Core/VideoCommon/Src/VertexLoader.cpp
2013-03-04 15:47:56 -06:00
degasus
efcfc5c014 workaround for GLEW_AMD_pinned_memory and older glew versions 2013-03-04 12:40:23 +01:00
degasus
e4f8d7b4c8 fix debug build 2013-03-04 10:20:55 +01:00
Jordan Woyak
b1a2915304 Merge branch 'master' into windows-unicode 2013-03-03 15:05:10 -06:00
Ryan Houdek
a01f793f59 Fix ARM build. 2013-03-03 07:37:22 +00:00
Jordan Woyak
ed90feb2b4 Kill warning. 2013-03-02 23:00:14 -06:00
Jordan Woyak
2b1af36900 Merge branch 'master' into windows-unicode 2013-03-02 15:33:32 -06:00
NeoBrainX
cb1d21c032 PerfQueries: Fix an integer overflow. 2013-03-01 23:57:56 +01:00
NeoBrainX
d1acb0a937 OGL: Fix perf metrics being overcounted when using a non-native internal resolution. 2013-03-01 23:12:41 +01:00
NeoBrainX
5a7bb2abfa D3D11: Port perf queries code to the PerfQueryBase interface.
Remove deprecated PerfQuery methods from RenderBase.
Windows build fix.
2013-03-01 19:30:37 +01:00
Jordan Woyak
dea1e2827d Open std::fstream in a unicode-safe manner. 2013-02-28 19:33:39 -06:00
NeoBrainX
cbf5efe191 Some cleanups.
PE perf metrics officially declared unsupported for the D3D9 project (out of pure laziness, anyone who cares can implement them :P).
2013-03-01 01:31:57 +01:00
NeoBrainX
1c9860246c Build fixes for everyone! 2013-03-01 01:14:10 +01:00
NeoBrainX
7682ed22c6 Merge branch 'master' into perfqueries.
Conflicts:
	Source/Core/VideoCommon/Src/VideoConfig.h
	Source/Core/VideoCommon/VideoCommon.vcxproj.filters
	Source/Plugins/Plugin_VideoDX11/Src/VertexManager.cpp
	Source/Plugins/Plugin_VideoSoftware/Src/Rasterizer.cpp
	Source/Plugins/Plugin_VideoSoftware/Src/Tev.cpp
2013-03-01 01:07:34 +01:00
Jordan Woyak
03ec9a2e08 Kill some unnecessary c_str and use StrToWxStr in a few places that I missed. 2013-02-28 02:40:03 -06:00
Jordan Woyak
56f09d3b91 Attempt to be consistent with conversions between std::string and wxString. 2013-02-28 02:30:05 -06:00
degasus
1b8d044543 clear cg from project files 2013-02-27 10:55:25 +01:00
Jordan Woyak
6b80e6f83c Tweak Vertex/Index buffer handling a bit. 2013-02-27 01:57:02 -06:00
Ryan Houdek
692e39d1bb Merge branch 'arm-noglsl' 2013-02-27 02:22:08 +00:00
Jordan Woyak
a680d17eef Buildfix. 2013-02-26 19:59:33 -06:00
Jordan Woyak
f1c990069c Yell at the user if they change window size while dumping frames, and some other avi dumping stuff. 2013-02-26 20:47:48 -05:00
degasus
ae481068cd cleanup ogl extension osd 2013-02-26 23:36:22 +01:00
degasus
a650ae8c7b workaround for base vertex. damn old nvidia driver 2013-02-26 23:15:55 +01:00
degasus
025f8d342f remove flag GL_SYNC_FLUSH_COMMANDS_BIT on syncing 2013-02-26 21:48:35 +01:00
Ryan Houdek
717b976875 ARM Support without GLSL 2013-02-26 13:49:00 -06:00
degasus
9bc8d6e02b make samplercache global and call constructor/destructor 2013-02-26 18:30:13 +01:00
degasus
4883fa268f Split VideoBackend::Cleanup from Shutdown.
First is called from ogl/d3d thread, second is called from emulation thread (x11...)
2013-02-26 16:42:32 +01:00
degasus
8b7141d3de Revert "Fix performance issues on certain legacy graphics hardware that isn't capable of copying an integer."
This reverts commit 380f22ca0e.

Yeah, reverting a revert.
2013-02-26 08:57:35 +01:00
Jordan Woyak
380f22ca0e Fix performance issues on certain legacy graphics hardware that isn't capable of copying an integer.
This reverts commit 52dacaa3e3.
2013-02-25 20:52:30 -06:00
Jordan Woyak
52dacaa3e3 Make the posmtx vertex attribute an int instead of converting to and from a float. 2013-02-23 20:54:30 -06:00
degasus
242d960781 increase buffer size
32M UBO, 16M Vertex, 2M Index
2013-02-22 10:25:38 +01:00
Jordan Woyak
db1be085c2 VertexManager cleanup 2013-02-22 01:41:52 -06:00
degasus
9332775b68 default upload method for nvidia is buffersubdata 2013-02-21 21:59:40 +01:00
degasus
40e17b4cb8 add option for hacked upload and disable it by default 2013-02-21 18:18:44 +01:00
degasus
76e6085e31 consistently usage of buffer pointers 2013-02-21 12:36:29 +01:00
Jordan Woyak
e7c93b8ac3 Minor sampler cache cleanup. 2013-02-20 17:15:10 -06:00
Jordan Woyak
6e6d8af6dd Revert "Don't load level 0 twice for 1-level textures in DX11." and fix it properly.
All backend TextureCaches now load level 0 in CreateTexture.

This reverts commit 294cb165ba.
2013-02-20 05:42:22 -06:00
Jordan Woyak
55c2a01744 Check for sampler object support, just to be nice. 2013-02-19 21:24:08 -06:00
Jordan Woyak
f2647a1216 Implement OGL sampler cache. Allows binding a texture multiple times with different parameters. Also possibly gives a very small speed improvement. 2013-02-19 21:18:53 -06:00
degasus
d93e57ff22 revert b5fe39b8c7 "fix texture parameters"
these parameters are really floats. I was just wrong
2013-02-19 22:20:39 +01:00
degasus
b5fe39b8c7 fix texture parameters 2013-02-19 17:28:46 +01:00
degasus
50f4bf114e Revert "map_orphan_and_risk - next try for upload method"
This reverts commit 17747fcfb8.

On orphaning, some gl drivers do heurisitics where to store the buffer.
As the hack may only work on pinned memory, it would be much less deteministic.
2013-02-19 15:51:48 +01:00
degasus
0f2ee45d96 remove ati workaroung for mipmap creation
isn't needed any more by merging mapmap_fixes
2013-02-19 15:40:34 +01:00
degasus
17747fcfb8 map_orphan_and_risk - next try for upload method
should work around nvidia600 driver issue which will flush gpu on syncing
also increase buffer size by orphaning
2013-02-19 13:18:48 +01:00
degasus
a629dea4dc Merge branch 'master' into GLSL-master
Conflicts:
	CMakeLists.txt
	Source/Core/DolphinWX/Dolphin.vcxproj
	Source/Core/DolphinWX/Src/GLInterface/WX.cpp
	Source/Core/DolphinWX/Src/GLInterface/WX.h
	Source/Core/VideoCommon/Src/TextureCacheBase.cpp
	Source/Core/VideoCommon/Src/TextureCacheBase.h
	Source/Plugins/Plugin_VideoDX11/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoDX11/Src/TextureCache.h
	Source/Plugins/Plugin_VideoDX9/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoDX9/Src/TextureCache.h
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
	Source/Plugins/Plugin_VideoOGL/Src/TextureCache.h
	Source/Plugins/Plugin_VideoSoftware/Src/SWmain.cpp

damn mipmap_fixes ...
2013-02-18 18:49:20 +01:00
NeoBrainX
19ab5bf50d TextureCache: Fix D3D backends crashing when a game uses multiple 1x1-sized LODs. 2013-02-18 17:14:56 +01:00
NeoBrainX
0f617183a8 Add a possible TODO.
Dunno if the hardware behaves like this, but it likely does.
2013-02-18 14:54:24 +00:00
degasus
bef24b5c6b new format for gl extensions 2013-02-17 21:41:00 +01:00
Jordan Woyak
53aec6c476 Fix OGL perf queries and make them not slow! 2013-02-16 19:30:24 -06:00
Jordan Woyak
d994e56b60 Changes/cleanup to TextureCache::Load and other mipmap related code.
The significant change is what is now line 520 of TextureCacheBase.cpp:
((std::max(mipWidth, bsw) * std::max(mipHeight, bsh) * bsdepth) >> 1)
to
TexDecoder_GetTextureSizeInBytes(expanded_mip_width, expanded_mip_height, texformat);

Fixes issue 5328.
Fixes issue 5461.
2013-02-15 22:56:29 -06:00
degasus
e259343275 fix efb copy shaders 2013-02-15 13:13:45 +01:00
degasus
9f4a616f2e build fix 2013-02-14 19:04:52 +01:00
degasus
a0ef58418b workaround for buggy intel windows driver. revert this as soon as there are newer driver 2013-02-14 18:59:45 +01:00
degasus
0325e37bfb merge glsl headers into one place 2013-02-13 21:34:48 +01:00
degasus
3392562501 rewrite efb copy shader, copied from dx11 2013-02-13 18:01:06 +01:00
degasus
21b83b436c create shader cache directoy 2013-02-13 16:50:56 +01:00
degasus
b3675d15dc enable shader cache again 2013-02-13 16:30:15 +01:00
degasus
398b37f371 fix ValidateShaderIDs 2013-02-13 15:16:32 +01:00
degasus
bbc292c210 merge Vertex and PixelShaderCache into ProgramShaderCache
this is the first step, uniform handling is still missing
2013-02-13 13:12:19 +01:00
NeoBrainX
ed0abc9dc5 Merge branch 'mipmap_fixes'. 2013-02-07 20:40:33 +01:00
NeoBrainX
6870c1fdd5 Fix some potential issues when blending on EFB formats without alpha.
Clean up state transition tables.
2013-02-07 18:01:24 +01:00
degasus
f079b04a5d also check for glsl errors on linking, activation GLSL_DEBUG again (slowdown on shader compilation) 2013-02-07 12:47:41 +01:00
degasus
9987765b1f build fix 2013-02-07 10:48:42 +01:00
degasus
376a807dea first try of osx fix, mostly by pauldachz 2013-02-07 10:34:29 +01:00
degasus
e7a8d3f854 check for GL_ARB_sync, it's in ogl 3.2 2013-02-06 01:05:19 +01:00
degasus
ef602fd643 workaround for glGetUniformLocation in efb2ram 2013-02-05 18:22:23 +01:00
degasus
76adc77fa6 bigger buffers 2013-02-05 18:01:27 +01:00
degasus
1d86dafbe2 evil hack: map the buffer once and use this pointer after unmaping
This isn't allowed by gl and may _only_ work, if the driver uses cpu bound buffer.
But it may speed up :-)
2013-02-05 00:53:14 +01:00
degasus
f677b8cba3 update to glew1.9, win binaries also from official release 2013-02-04 21:11:12 +01:00
degasus
2108529120 also align the size of buffers for pinned memory 2013-02-04 20:48:28 +01:00
degasus
6e0b0192a8 correct spelling of align 2013-02-02 19:39:26 +01:00
degasus
0c7aa4ff4f build fix 2013-02-02 19:32:40 +01:00
degasus
6e20af9ee9 align memory, use pinned memory if available 2013-02-02 19:26:29 +01:00
degasus
f0795bad12 fix glew fix 2013-02-01 17:12:05 +01:00
degasus
cb4cb1713d workaround older glew versions 2013-02-01 17:09:50 +01:00
degasus
2a1f592d82 first try for pinned memory, complete untested 2013-02-01 17:04:27 +01:00
degasus
3bf4ffe7fa usable sync of ringbuffer 2013-02-01 16:43:08 +01:00
degasus
3af9840a4c stream by map and sync
but not working perfectly, so disabled
2013-02-01 15:15:25 +01:00
degasus
878bd7f26c implement streaming by bufferSubData, split upload and allocation in ringbuffer 2013-02-01 12:30:08 +01:00
degasus
30170575c8 create StreamBuffer class for ogl upload 2013-01-31 23:11:53 +01:00
degasus
011e326698 remove glIsEnabled(GL_BLEND), we do restore state after it, so it doesn't matter 2013-01-31 13:49:20 +01:00
degasus
4a463f4588 also add glBufferSubData for ubo upload
so osx start game, but everything is black
2013-01-31 13:00:15 +01:00
degasus
c05f66bdd0 first try for osx core profile
now it doesn't crash, but it still hangs on startup
2013-01-31 12:20:17 +01:00
degasus
01d8c21e1d don't stream in rasterfont
mapping blocks on nvidia workstation, so use glBufferData
2013-01-31 11:30:44 +01:00
Jordan Woyak
0e04e0c305 Fix some shadowing warnings. 2013-01-29 16:43:22 -06:00
Ryan Houdek
afb5be10d9 OSX likes to put unordered_map in the weirdest of places... 2013-01-28 15:36:55 -06:00
Ryan Houdek
fa45403557 Got to love that my server's cmake is half retarded. 2013-01-28 15:32:38 -06:00
Ryan Houdek
d94f3c4155 Stop using std::pair and std::map. Switch over to u64 and std::unordered_map. Provides a very small speed boost. 2013-01-28 15:18:54 -06:00
NeoBrainX
0fdeb81038 Add some code for generating a shader constant usage profile. 2013-01-28 22:15:23 +01:00
NeoBrainX
67be1e939a PixelShaderGen: Some more work... 2013-01-28 21:59:49 +01:00
NeoBrainX
dc0f470215 Added new shader cache uids for pixel shader gen. 2013-01-28 21:44:39 +01:00
NeoBrainX
3c8df842bb Moved some of the new shader uid stuff to a common header file. 2013-01-28 21:05:29 +01:00
NeoBrainX
ca0e292dd4 Replace the shader uid system with a new one which quasi-automatically generates uids for shaders.
Currently used in the vertex shader only (had to fork lighting shaders for now).
2013-01-28 21:05:29 +01:00
degasus
c5fa3e0f3d move RestoreAPIState and ResetAPIState into backends
it's a backend specific hack, so it should be here
should give a small speedup in dx11 efb2tex
2013-01-28 18:16:03 +01:00
degasus
fd06342a97 set hint GL_STREAM_READ
it's wrong, but so we are guaranteed to get pinned memory.
it's slower for rendering, but faster for mapping.
2013-01-28 13:03:31 +01:00
Ryan Houdek
4fadb65259 Only check shader compilation status in debug or with DEBUG_GLSL defined. invalidate range on bindbufferrange since we don't care about what is in the range. Both give a performance boost for me. 2013-01-26 11:24:24 -06:00
degasus
3a52b37c3b only create shaders after shadercaches are initialized 2013-01-26 16:33:54 +01:00
degasus
13e9bb56f8 fix bug when rasterfont disappears sometimes 2013-01-25 20:39:19 +01:00
degasus
41b1128fdd orphan vbo also with glBufferData 2013-01-25 13:28:05 +01:00
degasus
a526fc5f92 ubo streaming 2013-01-25 13:20:42 +01:00
Ryan Houdek
73eb98ed8e Move swap control to the host specific GLInterface files. 2013-01-24 10:31:08 -06:00
degasus
e0ffdda26e Merge branch 'immediate-removal' into GLSL-master
Conflicts:
	Source/Core/VideoCommon/Src/PixelShaderGen.cpp
	Source/Plugins/Plugin_VideoSoftware/Src/SWRenderer.cpp

immediate-removal is a new created branch seperated from master but reverted the revert of immediate-removal
so we get less conflicts by merging
2013-01-24 16:58:28 +01:00
degasus
d60cc373d1 Revert "Revert 30dd9c2 e9d00bf db5f4c8 and bff0fae"
This reverts commit d0301ca89d.

Conflicts:
	.gitignore
2013-01-24 16:11:07 +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
da0ec6618f always init ogl configs 2013-01-21 18:44:33 +01:00
degasus
cf11f0ea72 clear uniform cache on startup 2013-01-21 15:43:04 +01:00
degasus
ebaaf6d468 glShadeModel is also obsolete 2013-01-21 10:37:16 +01:00
degasus
8a6f747408 glsl: remove usage of old texture2D* function 2013-01-19 11:07:06 +01:00
degasus
d73c950623 cache texture bindings 2013-01-19 01:06:34 +01:00
degasus
e7d5b274c0 add stage parameter for texture load, so ogl can bind to the correct sampler 2013-01-19 00:47:48 +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
6401a18143 remove texture sampler from uniform list 2013-01-19 00:12:02 +01:00
degasus
2c010f530e report glsl shader warings as errors 2013-01-18 12:49:48 +01:00
degasus
714ff50fdf set blending if dual source might be triggered 2013-01-18 00:44:35 +01:00
degasus
a87fd89fce disable ogl shader cache
it doesn't check the shader itself only the id of the shaders.
So there are cache mismatch atm
2013-01-17 12:36:20 +01:00
degasus
3054d36534 use glBindFragDataLocation instead of glDrawBuffer 2013-01-17 11:16:12 +01:00
lioncash
0ef3bd9c77 Revert "Made several variables/parameters unsigned in the DX9, DX11 and OGL plugins. They make more sense like this (given their names)."
Turns out I was wrong in my previous commit. My bad.

This reverts commit 8743166663.
2013-01-16 15:46:11 -05:00
degasus
b778b86e26 improve texture mipmap count
GL_TEXTURE_MAX_LEVEL set how many mipmaps should be allocated, but all of them must be created.
GL_TEXTURE_MAX_LOD set how many mipmaps may be used.
2013-01-16 21:15:07 +01:00
degasus
8a7f1e9264 workaround for older ati drivers 2013-01-16 19:37:57 +01:00
lioncash
8743166663 Made several variables/parameters unsigned in the DX9, DX11 and OGL plugins. They make more sense like this (given their names).
This also gets rid of some more typecasts in some cases.
2013-01-16 09:42:51 -05:00
degasus
b401131af2 small texcache cleanup 2013-01-16 15:12:39 +01:00
degasus
681272d65d use renderbuf fo xfb 2013-01-16 01:37:00 +01:00
degasus
bb200acdd8 also don't search in the shader cache if the shader isn't changed 2013-01-15 23:42:24 +01:00
degasus
687d74e6c2 only change shader if needed 2013-01-15 14:22:40 +01:00
degasus
85200db6a2 Revert "fix byte order in osd rasterfont"
This reverts commit db5f4c8c20.

Conflicts:
	Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp
2013-01-15 12:25:06 +01:00
degasus
1cfb5a21fa only use rgba for opengl 2013-01-14 23:43:51 +01:00
degasus
ff889c0e65 use attrib pointers in nativeVertexFormat 2013-01-14 22:59:08 +01:00
degasus
2f78986e2c Merge branch 'Graphic_Update' into GLSL-master
Conflicts:
	Source/Core/VideoCommon/Src/VertexManagerBase.cpp
	Source/Plugins/Plugin_VideoOGL/Src/NativeVertexFormat.cpp
	Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
	Source/Plugins/Plugin_VideoOGL/Src/VertexManager.cpp
2013-01-14 21:36:31 +01:00
degasus
ff5ac8c505 fix win compiler errors 2013-01-14 20:08:53 +01:00