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
Lioncash
efe8c75424
Duplicate condition fix.
...
Thanks j4ck.fr0st
2013-01-25 21:30:29 -05: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
lioncash
2db0c4270e
Fix a potential memory leak on non-windows systems.
...
Also added a FIXME to BPStructs.cpp and BPMemLoader.cpp
2013-01-24 08:21:08 -05: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
Ryan Houdek
621204f3e8
Fix switching from the different rasterizers
2013-01-19 02:18:39 -06:00
Ryan Houdek
ff9ba67773
Remove the dependency on rectangle textures in the software rasterizer. Also make it the be used by default in the software renderer like it was before.
2013-01-19 00:51:14 -06: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
lioncash
8cf3ea3eea
GetTextureBGRA()'s 'width' and 'height' parameters should be unsigned.
2013-01-14 16:29:52 -05: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
degasus
5fe3def64c
videoConfig cleanup
2013-01-14 20:00:33 +01:00
degasus
adeac6f4a5
remove old deprecated calls and fixed functions parameters
2013-01-14 17:48:38 +01:00
degasus
c3aafc77b3
upload complete uniform buffer at once
...
this is the way of dx11. it would upload more per draw, but uses less calls.
will be faster if many uniforms are changed, but slower else
2013-01-14 13:58:11 +01:00
degasus
b18c0a5d1b
remove ubo for efb2ram
2013-01-14 12:37:31 +01:00
Jordan Woyak
5dbc3b3219
replace this->Bind with Bind
2013-01-13 03:33:11 -06:00
Jordan Woyak
eca93c4c19
Eliminate nearly all the _connect_macro_ ugliness by using wxw's newish Bind functions.
...
Unlike Connect, Bind is quite type-safe.
I also seem to have fixed some errors in the input config dialog.
2013-01-13 03:06:56 -06:00
degasus
f3d663c2f4
efb2tex without ubo
2013-01-12 16:29:16 +01:00
degasus
2838077313
fix warnings
2013-01-11 21:24:59 +01:00
degasus
8651b34e22
also add vertex shader for efb2tex
...
goodbye fixed-function shaders
2013-01-11 15:41:42 +01:00
degasus
7c01c2bf11
move efb2ram shaders to textureCache
2013-01-11 15:24:43 +01:00
degasus
60b8e4fb1c
vertex shader for texture converter
2013-01-11 11:59:42 +01:00
NeoBrainX
304814e7cc
Video_Software: Implement proper RGBA8 texture loading from tmem.
...
For RGBA8 textures, AR and GB tiles are stored in separate tmem banks. TextureDecoder did not support that previously.
2013-01-10 18:30:16 +01:00
degasus
092a99cbd2
glsl shaders for showEfbCopyRegions
2013-01-09 20:08:55 +01:00
degasus
bff02b3b73
Merge branch 'arb_framebuffer' into GLSL-master
...
Conflicts:
Source/Plugins/Plugin_VideoOGL/Src/FramebufferManager.cpp
Source/Plugins/Plugin_VideoOGL/Src/RasterFont.cpp
Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
2013-01-09 11:00:26 +01:00
degasus
84debc17d5
fix msaa
...
blitting between msaa fbos may not scale. So we need to resolve the efb before swapping.
2013-01-09 01:50:52 +01:00
NeoBrainX
e204a6e015
Add some TODOs.
2013-01-08 18:56:01 +01:00
NeoBrainX
be706a3977
Disable color writing when alpha test always fails.
2013-01-08 18:56:01 +01:00
NeoBrainX
d26bcb0847
Move alpha pretest to BPMemory.h and rename a bunch of alpha testing related stuff
2013-01-08 18:56:01 +01:00
NeoBrainX
876eee5e60
PixelShaderGen: Don't disable depth texture emulation if z writing is disabled (this is what VideoSoftware is doing).
2013-01-08 18:16:48 +01:00
NeoBrainX
e979b2d4a2
DX11: Fix a small mistake.
...
Remove some incorrect and/or confusing comments.
Fixes issue 5251. Thanks to limburgerite :)
2013-01-08 18:16:48 +01:00
Ryan Houdek
d0301ca89d
Revert 30dd9c2
e9d00bf
db5f4c8
and bff0fae
2013-01-07 13:47:34 -06:00
degasus
b7906b49c9
fix byte order in osd rasterfont
2013-01-07 20:11:26 +01:00
degasus
ef32231431
fix screenshots
2013-01-03 21:40:54 +01:00
degasus
fc02427d54
xfb draw by blit - disable postprocessing
...
blitting can't do postprocessing - so for postprocessing, we have to add a new stage
2013-01-03 20:44:47 +01:00
degasus
b67b1c376d
fix virtual xfb - remove glCopyTexImage2D
...
glCopyTexImage2D isn't in core (and so not supported everywhere) and it cannot store into GL_TEXTURE_RECTANGLE
2013-01-03 18:36:19 +01:00
degasus
363ffd3a5f
swap() by blitting
2013-01-03 12:33:18 +01:00
degasus
ecedf56eb4
uses the ARB_framebuffer_object syntax
...
also require this extention (OGL3.0), but it have one _realy_ big advantage:
- now it's possible to blit between different texture sizes, so all util draw calls can be implemented as blit
2013-01-03 12:06:47 +01:00
degasus
a1ca288555
fix some AMD issues
...
This is only a hack. The correct solution would be:
1. don't use GL_TEXTURE_RECT ever. GL_TEXTURE_2D should also be faster
2. use GL_TEXTURE8+ for util textures
3. both
2013-01-03 09:45:12 +01:00
degasus
b38b62afc6
remove glsl binding support. convert every shader to version 130
2013-01-02 16:56:08 +01:00
degasus
c2898748ac
bind locations _before_ link program, fix dest alpha
2012-12-31 02:34:27 +01:00
Ryan Houdek
64afbade33
Fix 4 warnings on OSX
2012-12-30 04:32:37 -06:00
Ryan Houdek
e5d5365bac
Fix the last few warnings in Dolphin on my system.
2012-12-30 02:34:14 -06:00
Ryan Houdek
49ed752126
This line in SWRenderer has been wrong ever since the beginning.
2012-12-30 02:12:31 -06:00
Ryan Houdek
b4f30e549e
Missed a precision qualifier in a HWRasterizer shader.
2012-12-29 21:50:07 -06:00
degasus
30dd9c2e17
always calls glBindBuffer(0) after disabling vao
2012-12-29 12:50:42 +01:00
degasus
e9d00bfeeb
revert RasterFont optimization
...
isn't needed and also not tested and buggy
2012-12-29 00:37:50 +01:00
degasus
d9f3fc4495
fix ubo for intel cards (also amd?)
2012-12-28 17:06: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
degasus
70c63ce6cf
fix dual pass alpha
2012-12-28 14:24:12 +01:00
degasus
82b33471ae
cleanup rasterfont
2012-12-28 11:46:00 +01:00
Ryan Houdek
7d93834cd8
Bit more cleanup from removing Nvidia CG
2012-12-27 22:53:07 -06:00
degasus
d7f43c7a68
remove cg from windows project files
2012-12-28 01:08:29 +01:00
degasus
193056493a
also use shaderCaches in rasterFont
2012-12-28 00:52:44 +01:00
degasus
316a33d1e6
Merge branch 'master' into GLSL-master
...
Conflicts:
Source/Core/DolphinWX/Src/VideoConfigDiag.h
Source/Plugins/Plugin_VideoOGL/Src/GLUtil.h
Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
Source/Plugins/Plugin_VideoOGL/Src/TextureCache.cpp
Source/Plugins/Plugin_VideoOGL/Src/TextureConverter.cpp
2012-12-27 10:36:54 +01:00
degasus
db5f4c8c20
fix byte order in osd rasterfont
2012-12-26 23:48:33 +01:00
Ryan Houdek
01cdcc83a3
Merge Fail: Make sure we are using the interface file to get backbuffer dimensions. GL helper function was duplicated.
2012-12-26 13:15:19 -06:00
Ryan Houdek
67c1c6b062
Merge branch 'GLES-software'
2012-12-26 12:54:58 -06:00
Ryan Houdek
2d4c3c7c91
Beautify some tabs.
2012-12-26 10:33:45 -06:00
Ryan Houdek
e2489196e4
Got overzealous. We aren't removing CG quite yet with this branch.
2012-12-26 00:41:25 -06:00
Ryan Houdek
9a58f9a3bb
Rename another function...
2012-12-26 00:34:09 -06:00
Ryan Houdek
f4e7a280a9
Remove cg.lib from some files for Windows and renaming a function.
2012-12-26 00:07:43 -06:00
Ryan Houdek
01953ff64a
Rename the interface files and hopefully fix OSX building.
2012-12-25 19:08:24 -06:00
degasus
bff0faea2d
Merge branch 'immediate-removal'
...
Conflicts:
Source/Plugins/Plugin_VideoOGL/Src/Render.cpp
2012-12-25 12:39:00 +01:00
degasus
399a6af66d
revert update the rasterfont shader to GLSL3.3 - OGL 2.0 should be enough
2012-12-25 12:22:02 +01:00
NeoBrainX
2fedab3bad
OGL: Make OSD messages fade out properly instead of having them disappear spontaneously.
2012-12-24 19:50:16 +01:00
Ryan Houdek
9209253e0d
Initial removal of Nvidia CG. Still some more cleanup to go
2012-12-24 11:09:52 -06:00
Ryan Houdek
296b9b1c16
Small bit of clean up in GLES-software.
2012-12-24 09:37:12 -06:00
degasus
78ff8a769c
Merge branch 'osx-savegame-fix'
2012-12-24 13:30:59 +01:00
degasus
bd0abb3d2f
revert last commit, add CheckInvalidState to VideoBackend
2012-12-23 13:32:23 +01:00
Matthew Parlane
e3eebdf591
Fixes swprintf_s issues hopefully.
...
Also fixed an include not using correct caps.
According to:
http://connect.microsoft.com/VisualStudio/feedback/details/646532
2012-12-23 20:25:11 +13:00
Matthew Parlane
089434b719
Apply same force to float fix as has already been done for DX11.
2012-12-23 20:01:58 +13:00
degasus
85ac76e8e2
fix gcc compilation
2012-12-19 23:42:22 +01:00
Ryan Houdek
b78f5debe6
Initial push of GLES and GLUtil file breakup.
2012-12-17 14:54:20 -06:00
degasus
1919a458e8
only use one buffer, orphaning should do the rest
2012-12-15 17:28:58 +01:00
degasus
ba8264c2ac
use VAO in VertexManager
...
to use VAO, we must use VBO, so some legency code was removed:
- ARB_map_buffer_range must be available (OGL 3.0), don't call glBufferSubData if not
- ARB_draw_elements_base_vertex also (OGL 3.2), else we have to set the pointers every time
- USE_JIT was removed, it was broken and it isn't needed any more
And the index and vertex buffers are now synchronized, so that there will be one VAO per
NativeVertexFormat and Buffer.
2012-12-15 14:43:01 +01:00
degasus
79a7ce4827
move glBindBuffer and glBindVertexArray out of VertexManager
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:52 -06:00
degasus
09274e2483
Check texture params before updateing them
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:48 -06:00
degasus
61836f8c51
helper for compiling glsl
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:44 -06:00
degasus
48812f7bf7
update the rasterfont shader to GLSL3.3 - so OGL 3.3 is needed
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:39 -06:00
degasus
1bd21f44b2
custom shader for RasterFont, fix color support
...
OpenGL2.0 compatible
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:36 -06:00
degasus
23a3336f9a
increase hash size to u64
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:32 -06:00
degasus
75dd48247f
initial release of new RasterFont without color support
...
this new design will once create a texture for all chars.
while rendering a string, a list of polygons (position on screen + texture)
for this string is generated on the fly and print at once by glDrawArrays.
atm, there is no support for colors, so everything will display white.
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:28 -06:00
degasus
c207422987
using of vao, warning: ARB_vertex_array_object is needed
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:25 -06:00
degasus
5c8800968a
also check for vbo updates in EncodeToRamUsingShader
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:22 -06:00
degasus
1f1b32b663
only update vbo on changes in XFBSource::Draw
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:19 -06:00
degasus
34b1451fbe
cache vbos in TextureCache::TCacheEntry::FromRenderTarget
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:15 -06:00
degasus
d0c4332d99
don't update vbo, if there are no changes in Renderer::Swap
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:13 -06:00
degasus
bbcb442983
in the end, also Renderer::Swap in vbo
...
two last draw-calls are missing:
VertexManager::Draw (see Graphic_Update branch)
RasterFont::printString (perhaps reimplement with an texture)
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:10 -06:00
degasus
b41c06a9ac
EncodeToRamUsingShader in vbo
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:28:05 -06:00
degasus
8ea2ddbc50
XFBSource::Draw in vbo
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:59 -06:00
degasus
d44228f1b7
TextureCache::TCacheEntry::FromRenderTarget as vbo
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:56 -06:00
degasus
6b3125728b
use vbo for ShowEFBCopyRegions
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:53 -06:00
degasus
8b62be2025
fix ShowEFBCopyRegions
...
those fancy colors were the result of the usage of non-allocated heap
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:49 -06:00
degasus
6864b40e26
reset glEnableClientState befor every draw
...
should be done with VAO, but atm, this is not possible :-(
this also partial revert the fix in fb92c338af
(activating texture0 globally).
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:46 -06:00
degasus
888b5fb061
remove usage of glMultiTexCoord2f
...
Signed-off-by: Ryan Houdek <Sonicadvance1@gmail.com>
2012-12-13 15:27:38 -06:00
Glenn Rice
e85438cba0
Clean up gcc/g++ compiler warnings that have accumulated.
2012-12-10 00:40:28 -06:00
rog
30718230b2
Fix some warnings.
2012-12-06 20:25:07 -05:00
rog
97f5b1665f
what is this even...
2012-11-26 02:11:52 -05:00
NeoBrainX
4ff9e03509
Merge branch 'efb_scaling_fixes'.
2012-11-19 13:18:57 +01:00
rog
3a8e8af2d5
Merge movie-fixes.
2012-11-16 12:07:22 -05:00
NeoBrainX
a38bb488d2
Remove Renderer::xScale and Renderer::yScale.
2012-11-16 14:29:09 +01:00
NeoBrainX
78031c2d54
Move ComputeDrawRectangle() to Renderer::UpdateDrawRectangle().
2012-11-16 14:25:49 +01:00
rog
14aa7150d9
Add option for author name for movies. Also, minor cleanup for previous options i've added.
2012-11-14 16:23:20 -05:00
rog
8fe5aa4ee8
movie cleanup
2012-11-12 20:40:11 -05:00
rodolfoosvaldobogado
0809ba79ae
fix for point rendering in dx9 backend, that will teach me to read the full documentation. if someone founs a games that use points a lot i will try to implement a faster path for point rendering.
...
now the map in twin snakes is functional in all the backends.
2012-11-12 19:37:08 -03:00
rodolfoosvaldobogado
3936c06ee8
more fixes for my last commit, player problem in twin snakes is fixed
2012-11-11 22:39:27 -03:00
rog
a5d210129d
Add an on screen lag counter.
2012-11-11 17:57:06 -05:00
rodolfoosvaldobogado
53b62ab169
This should fix the bugs introduced by my last commit please retest the games that where showing graphical glitches.
2012-11-10 11:37:08 -03:00
NeoBrainX
6f21f5eb34
Video_Software: Implement texture preloading
2012-11-03 15:41:41 +01:00
Ryan Houdek
fb92c338af
Bit of cleanup and fixing of one issue that was noticeable in SMS with Mario's shadow.
2012-10-27 22:50:06 -05:00
Ryan Houdek
dfb3c44d1a
Remove glMatrixMode and glLoadIdentity calls in Render.cpp which do absolutely nothing.
2012-10-27 18:27:16 -05:00
Ryan Houdek
8c1d104ca3
Change EFB copy location rectangles over to a Vertex array
2012-10-27 18:10:31 -05:00
Ryan Houdek
c1fd640964
Rebase immediate-removal on master
2012-10-27 17:22:48 -05:00
rodolfoosvaldobogado
ee72852491
implement some code to reduce the amounts of calls to setup vertex format, in d3d9 it gives no noticeable speedup, in opengl it still does not work right.
...
thanks to neobrain for the idea
2012-10-26 23:18:09 -03:00
rodolfoosvaldobogado
eaa1ea71c1
Implement the new buffer approach in opengl. sadly in my machine it gives my only 2 more fps and if your hardware does not support ARB_map_buffer_range is even slower than plain vertex arrays.
...
change naming in all the backends vertex managers to make more easy to continue with the merge an some future improvements.
please test this as i'm interested in knowing the performance in linux and windows with the different hardware platforms.
2012-10-26 11:34:02 -03:00
rodolfoosvaldobogado
72cb1734ee
Some code cleaning for my last commit.
...
the amount and size of the buffer is now changed to "new hardware" frienly values and will fall back to the right values if hardware does not support them.
my next commit will be to a branch, with my ogl work.
2012-10-22 19:37:26 -03:00
NeoBrainX
52963584f0
[bugfix] Make sure to specify the correct max lod level.
2012-10-20 21:07:03 +02:00
NeoBrainX
9d5fc3d7f0
[bugfix] Properly decode lod_bias.
2012-10-20 21:07:03 +02:00
NeoBrainX
6c8a22de24
[bugfix] DX9::TextureCache: Use max_lod instead of min_lod where necessary.
2012-10-20 21:07:03 +02:00
NeoBrainX
0706050b74
[cleanup] Vastly clean up backend-specific sampler state logic.
2012-10-20 21:07:02 +02:00
NeoBrainX
069d949a57
[cleanup] TextureCache: Kill the autogen_mipmap parameter
2012-10-20 21:07:02 +02:00
rodolfoosvaldobogado@gmail.com
5230146c73
Hey, long time no commits :).
...
So to compensate lets bring back some speed to the emulation.
change a little the way the vertex are send to the gpu,
This first implementation changes dx9 a lot and dx11 a little to increase the parallelism between the cpu and gpu.
ogl: is my next step in ogl is a little more trickier so i have to take a little more time.
the original concept is Marcos idea, with my little touch to make it even more faster.
what to look for: SPEEEEEDDD :).
please test it a lot and let me know if you see any problem.
in dx9 the code is prepared to fall back to the previous implementation if your card does not support the amount of buffers needed.
So if you did not experience any speed gains you know where is the problem :).
for the ones with more experience and compression of the code please test changing the amount and size of the buffers to tune this for your specific machine.
The current values are the sweet spot for my machine.
All must Thanks Marcos, I hate him for giving good ideas when I'm full of work.
2012-10-20 10:22:15 -03:00
Ryan Houdek
57426ee726
Forced commit
2012-10-13 13:00:04 -05:00
Shawn Hoffman
1a8005d948
set ProgramShaderCache program format correctly.
2012-10-09 23:56:00 -05:00
Ryan Houdek
eb7a0c485a
More "stuff" for SS, also a small fix in the program shader cache cache setup."
2012-10-09 23:56:00 -05:00
Shawn Hoffman
210ecad15f
let us try normal c++ static init instead...
2012-10-09 23:56:00 -05:00
Ryan Houdek
03b09bed5d
Get the program binary type correctly or else ATI makes massive (~400MB) shader caches. Also, don't need the line in the PixelShaderGen.
2012-10-09 23:56:00 -05:00
Ryan Houdek
2e15440896
Add support for Dual source blending to older ATI cards that don't support 420pack but do support GL_ARB_blend_func_extended. This is more proper as well anyways.
2012-10-09 23:56:00 -05:00
Ryan Houdek
5085cebaf3
These checks aren't needed when using CG.
2012-10-09 23:55:59 -05:00
Shawn Hoffman
108722bed0
oops, forgot to make sure the gl program is actually free'd.
2012-10-09 23:54:18 -05:00
Ryan Houdek
e3854ded73
Woops, better not forget the ing
2012-10-09 23:54:18 -05:00
Ryan Houdek
4cd748bbec
Remove some warnings in ProgramShadercache, Was using wrong variable for checking dual source blending.
2012-10-09 23:54:18 -05:00
Shawn Hoffman
4c1fef8f98
refactor ProgramShaderCache::PCacheEntry
2012-10-09 23:54:18 -05:00
Shawn Hoffman
aaa405c973
Checking GLEW_VERSION_4_0 is superfluous since we check GL_ARB_get_program_binary, and it's a runtime variable anyways.
2012-10-09 23:54:18 -05:00
Shawn Hoffman
31a8424bcc
fix formatting uglies introduced in glsl-master branch
2012-10-09 23:54:17 -05:00
Ryan Houdek
c4e7a288e5
Add in the Windows fix.
2012-10-09 23:43:22 -05:00
Ryan Houdek
ee529b7125
Only use explicit attribute locations when we are supporting GLSL > 1.2 since we need in/out instead of attribute variable types. This was brought to my attention from MESA. MESA supports GL_ARB_explicit_attrib_location, but yets to support GLSL 1.3, so basically useless extension to MESA right now?
2012-10-09 23:43:22 -05:00
Ryan Houdek
5c486587a6
Write all shaders to disk on emulator stop instead of constantly. Also change pair from u64 to u32.
2012-10-09 23:43:22 -05:00
Ryan Houdek
4eb227bd4c
If user doesn't compile with glew 1.6, cut out program binaries so everything still compiles.
2012-10-09 23:43:22 -05:00
Ryan Houdek
189d12b61c
If CG isn't available, still compile and fallback on GLSL
2012-10-09 23:43:22 -05:00
Sonicadvance1
7c91476650
Missed a if, don't want people crashing now do we?
2012-10-09 23:42:41 -05:00
Ryan Houdek
9996f27120
Give OSX users more of a chance of supporting Single pass DSB in the future.
2012-10-09 23:42:41 -05:00
Ryan Houdek
d012c75005
Implement Program shaders cache. Seems to reduce a small amount of stuttering when F-Zero starts. Did it because I can :|
2012-10-09 23:42:41 -05:00
Ryan Houdek
ef1e157786
Go back to using glGetString with GL_EXTENSIONS because glew 1.7 is required to check for newer 4.2 extensions that way.
2012-10-09 23:42:40 -05:00
Ryan Houdek
ac77bbd47b
Move the GLSL extension checks over here so it is nicer.
2012-10-09 23:42:40 -05:00
Ryan Houdek
7cb3d86e31
Add a define back so we work without GLEW 1.6, Also I missed a line when I was fixing binding sampler locations last night when I was tired.
2012-10-09 23:42:40 -05:00
Ryan Houdek
1aad2e9e56
There we go, actually found the issue.
2012-10-09 23:42:40 -05:00
Ryan Houdek
6759ee701d
This thing fails when we don't support binding. Not 100% sure why I need to set this multiple times.
2012-10-09 23:42:40 -05:00
Ryan Houdek
66a245dd68
Remove this silliness
2012-10-09 23:42:40 -05:00
Ryan Houdek
9c09e1973a
Some shader programs don't come with Vertex shaders attached, don't try to bind a Vertex Uniform block then.
2012-10-09 23:42:40 -05:00
Ryan Houdek
f8d0c28e53
Set Sampler values at program make time instead of every frame. Fix an issue when The user had UBO support but not Binding support.
2012-10-09 23:42:40 -05:00
Ryan Houdek
ddd4360d6d
Only delete this buffer if we support it.
2012-10-09 23:42:39 -05:00
Ryan Houdek
7aad45658e
Add a GUI option to use GLSL shaders. Also fix a small typo.
2012-10-09 23:42:39 -05:00
Ryan Houdek
076c1a5aa7
Make sure not to try and bind UBO locations when it isn't supported
2012-10-09 23:41:49 -05:00
Ryan Houdek
ba12c0b4f5
Instead of querying the vertex attribute location. Let's bind it to where CG expects it to be as well. Was causing problems when we were trying to activate the components below and they weren't available. This fixes cubivore with GLSL shader. Also any other game that uses 3 normal pointers.
2012-10-09 23:41:48 -05:00
Jordan Woyak
d70726b035
glMapBuffer was slow, go back to glBufferSubData, single combined ps/vs ubo now
2012-10-09 23:41:48 -05:00
Jordan Woyak
d9117ab6a1
try combining vs/ps ubo
2012-10-09 23:41:48 -05:00
Jordan Woyak
e641ede232
make use of glMapBuffer to set ubo data
2012-10-09 23:41:48 -05:00
Ryan Houdek
04836705b7
Show a bit of information when using GLSL shaders.
2012-10-09 23:41:48 -05:00
Jordan Woyak
8e80771670
fix stupid indentation
2012-10-09 23:41:48 -05:00
Jordan Woyak
73a29bf6a1
have separate variables/functions for VS/PS ubo stuff, array was confusing.
2012-10-09 23:41:48 -05:00
Ryan Houdek
a809feae1a
Disable UBO buffer generation if hardware doesn't support it.
2012-10-09 23:41:48 -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
a5257c1a0a
Actually have Dual Source blending work for people. Forgot about this change.
2012-10-09 23:41:06 -05:00
Ryan Houdek
a304af75fd
Make this pretty
2012-10-09 23:41:06 -05:00
Ryan Houdek
67687a7b6d
Make sure our UBO buffers are always aligned correctly.
2012-10-09 23:41:06 -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
5bcbf92f43
Make sure to support everything even if GPU doesn't.
2012-10-09 23:41:06 -05:00
Ryan Houdek
d4a80ca3ec
yay, UBOs work 100% now.
2012-10-09 23:41:05 -05:00
Ryan Houdek
1f75ee49bf
UBO works for Pixel Shaders if Binding for UBO is zero, otherwise fails. Probably why Vertex shader UBO is failing. Too tired to investigate right now.
2012-10-09 23:41:05 -05:00
Ryan Houdek
904adb9e3d
More for Billiard <3
2012-10-09 23:41:05 -05:00
Ryan Houdek
ce7a54f32a
Firin ma lazer
2012-10-09 23:41:05 -05:00
Ryan Houdek
b105d70339
Firin ma lazer
2012-10-09 23:41:05 -05:00
Ryan Houdek
c82b92bfc2
Fix one error.
2012-10-09 23:41:05 -05:00
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
LPFaint99
5f0f26ef35
add ProgramShaderCache.* to visual studio project files
2012-10-09 23:41:05 -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
081ad949ce
Welp, just fixed that problem.
2012-10-09 23:35:45 -05:00
Ryan Houdek
3c9c5de722
Missed a spot. Most games work now, Still have a problem with viewtiful joe. Destination Alpha pass doesn't work yet, going to use Dual source blending on that.
2012-10-09 23:35:45 -05:00
Ryan Houdek
3160da1289
This lets us see stuff with GLSL shaders. Just need to take care of some compile errors now.
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
7a4c080c70
mah
2012-10-09 23:29:30 -05:00
Ryan Houdek
411357b54a
Compile
2012-10-09 23:29:30 -05:00
Ryan Houdek
34c7b3fd73
meh
2012-10-09 23:29:30 -05:00
Ryan Houdek
3943840d5c
Now CG plays nice with this new stuff.
2012-10-09 23:27:59 -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
Pierre Bourdon
8cefcaa94c
Implement a simple benchmarking mode which logs FPS to a file
...
Very useful to compare performance between two builds, check the impact of
a configuration option, etc. FPS log is stored in User/Logs/fps.txt and is
reset each time you launch a game. Only enabled if you check the "Log FPS
to file" option in your graphics settings.
Could be improved a bit: currently logs only every 1s (so you can't really
see small variations), maybe output more infos to the fps.txt like
average/stddev (but Excel/Libreoffice/Google Docs can compute that easily
too).
2012-10-04 05:41:02 +02:00
NeoBrainX
035840e7b5
Move last XFB size from Render to FramebufferManager.
2012-10-03 13:44:35 +02:00
NeoBrainX
8f5223d0e6
More cleanups.
2012-10-03 13:44:13 +02:00
NeoBrainX
6e4a61a991
Minor cleanups.
2012-10-03 13:44:04 +02:00
NeoBrainX
ac2ce8b16e
Video_DX11: Remove some redundant code.
2012-09-27 18:15:45 +02:00
NeoBrainX
54947b1e22
Video_Software: Some more debugging logs.
2012-08-31 21:30:12 +02:00
NeoBrainX
3d56ce18fb
Video_Software: Fix moar stuff
2012-08-31 20:49:59 +02:00
plbl4ster
94e49c5044
Fix frame skipping on non-win32 systems missing libav
...
Fixes issue 4097.
2012-08-28 12:29:51 +02:00
NeoBrainX
49d1da5e7e
Video_Software: Fix stuff.
2012-08-27 23:51:35 +02:00
NeoBrainX
d734a5b486
More debugging logs for RDilux
2012-08-27 00:57:17 +02:00
NeoBrainX
87d8feb53d
Video_Software: Add some debugging logs for PE perf queries
2012-08-26 20:26:10 +02:00
NeoBrainX
4607ebea2a
Video_Software: Fix a small issue that prevented perf queries from working at all.
2012-08-26 20:26:10 +02:00
NeoBrainX
1c1ae63b69
Windows build fix.
2012-08-26 20:26:10 +02:00
NeoBrainX
26de63a8cd
Video_Software: Implement PE pixel metrics
2012-08-26 20:26:10 +02:00
NeoBrainX
cf8744cf2c
OGL: Implement pixel metrics (untested)
2012-08-26 20:26:10 +02:00
NeoBrainX
4d8d86bd6a
D3D11: Implement some PE pixel performance metrics.
...
Super Mario Sunshine is using a cool trick: To determine how much goop has been cleaned in ep. 6 of Sirena Beach, it counts the number of pixels that are input to the blending stage. For that it's using the PE performance registers ;)
Fixes issue 1498.
2012-08-26 20:26:10 +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
NeoBrainX
c143e08b9a
Recreate screenshot texture whenever the backbuffer resolution changes. Fixes crashes when taking screenshots after changing window size or switching to/from fullscreen mode.
2012-08-07 15:18:10 +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
Pierre Bourdon
d33e48319f
Fix accesses to the 16 lower pixels of the EFB with OpenGL
...
The GL EFB cache did not clamp correctly the coordinates when computing
the rectangle it needed to cache, leading to negative values being used
as indexes and often crashes.
Fixes issue 5510.
2012-07-23 22:35:51 +02:00
NeoBrainX
1c8cdebc22
Set g_texture_cache to NULL upon shutdown. Fixes a crash introduced in previous commits.
2012-06-21 14:21:16 +02:00
NeoBrainX
cc0523e55b
TextureCache: Properly assign texture hashes when EFB to RAM is used without caching.
...
Fixes issue 5472.
2012-06-20 18:18:21 +02:00
NeoBrainX
8bed27a3d1
Enable hires textures even when texture dumping is enabled.
...
Remove some deprecated code.
2012-06-20 18:18:17 +02:00
NeoBrainX
8d30ac462a
Instead of invalidating texcache whenever the graphics configuration dialog gets opened, clean up textures on configuration changes.
2012-06-20 18:18:05 +02:00
NeoBrainX
227580d1a5
Remove "Disable Textures".
2012-06-11 23:35:46 +02:00
NeoBrainX
1dd6b978c1
Remove "Disable Lighting".
2012-06-11 23:30:20 +02:00
NeoBrainX
b5ad382b07
Fast mipmaps deserves to die!!
2012-06-08 00:22:57 +02:00
NeoBrainX
372e00632d
Fix changing internal resolution via hotkeys (settings above 1.5x weren't accessible anymore before).
2012-05-29 13:11:28 +02:00
skidau
146b02615c
Merge rodolfoosvaldobogado's zcomploc code (Graphic_Fixes branch)
2012-05-26 13:47:07 +10:00
nitsuja
a81631b58e
made savestates synchronous and immediate. this allows saving or loading while the emulator is paused, fixes issues where savestate hotkeys would get ignored if pressed too close together, might speed up savestates in some cases, and hopefully makes savestates more stable too.
...
the intent is to replace the haphazard scheduling and finger-crossing associated with saving/loading with the correct and minimal necessary wait for each thread to reach a known safe location before commencing the savestate operation, and for any already-paused components to not need to be resumed to do so.
2012-05-26 13:09:38 +10:00
NeoBrainX
54aeec7a8f
Dump the redundant "save textures" function. Use TextureCache's dumping feature instead.
2012-05-13 17:48:23 +02:00
NeoBrainX
a5e68ab10e
TextureCacheBase: Support dumping individual mipmaps.
2012-05-13 17:41:04 +02:00
skidau
ec0ddb476e
Fixed texture encoding in DX11. Thanks to wordmanwords for the patch.
2012-05-06 10:51:38 +10: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
rodolfoosvaldobogado
a0d60210fd
First Stage:
...
Fix depth related errors in dstalpha pass.
best place to test: water splash effect in super mario galaxy
2012-04-02 14:26:12 -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
NeoBrainX
6ee6d0088a
Merge branch 'zfreeze-new'
2012-03-29 23:02:27 +02:00
Shawn Hoffman
2ee5e5cebc
Merge branch 'scons-removal'
2012-03-28 00:02:04 -07:00
rodolfoosvaldobogado
48d8d71391
Fix for my last commit, this must fix the problem in the algorithm pointed by neobrain. thanks
2012-03-27 23:14:59 -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
Shawn Hoffman
d15740daf1
Merge branch 'wxw3-update'
2012-03-25 12:27:38 -07:00
NeoBrainX
fee98b426b
Revert r41bcf657f89d, r3a9fed0ba285, r9adc119e3c2f and re58692653afd (all of them are wrong).
2012-03-24 15:58:44 +01:00
NeoBrainX
2afe605069
D3D11: Disable mipmapping when no mipmap filter is selected.
2012-03-24 06:04:00 +01:00
Shawn Hoffman
56b1373baf
Remove scons-related files
2012-03-25 12:55:02 -07:00
Shawn Hoffman
f7423a0a4f
Merge branch 'master' into wxw3-update
...
Conflicts:
Source/Core/DolphinWX/Src/LogWindow.cpp
2012-03-22 17:57:38 -07:00
skidau
a60a0825a3
Merged 'FifoBusy' branch. Thanks
...
to marcosvitali.
Added an external exception check when the CPU writes to the FIFO. This allows
the CPU time to service FIFO overflows. Fixes random hangs caused by FIFO
overflows and desyncs like in "The Last Story" and "Battalion Wars 2". Thanks
to marcosvitali for the research.
Added some code to unlink invalidated blocks so that the recompiled block can be
linked (speed-up).
This release still fixed the hangs produced by fifo overflow without sacrifice
performance. For example you can test Tutorial moves at the beginning of The last history now
is fluid 30/60.
Fixed possibles random hangs in DC mode.
Fixed hangs in DC mode in (Simpsons, Monkey Island, Pokemon XD, etc)
Implemented accurate management of Pixel Engine Interrupts. Now the GPU loop
is stopped when a PE Interrupt needs to be managed and resumed when Pixel Engine
finish.
Fixed Metroid Prime 3 and 2 desync. And other games with desync because of
FIFO Reset. That happens because FIFO_RW_DISTANCE_HI must be written first, for checking
fifo.CPReadWriteDistance == 0, so some fifo resets was not managed in the right
way.
Fixed Super Monkey Ball in some cases when the game write the
WriteReadDistance need to be safe like the SafeCPRead.
Improved the CheckException for the GatherPipe writes in JIT, now only the
External Exceptions are processed.
Fixed definitely Pokemon XD in dual core mode. This game is doing something
not allowed. It attach to CPU the same fifo attached to the GPU in multibuffer
mode. I added a check to prevent overwrite the GPU FIFO with the CPU FIFO. If
the game do that on breakpoint the solution can fail.
Fixed ReadWriteDistance calc when CPRead > CPWrite.
Added Token and Finish cause to GP Jit checking.
Additional cleanup in CommandProcessor.
Fixes issue 5209
Fixes issue 5055
Fixes issue 4889
Fixes issue 4061
Fixes issue 4010
Fixes issue 3902
2012-03-20 19:37:25 +11:00
Shawn Hoffman
c5d746f3d8
remove scons files from VS projects
2012-03-18 06:41:12 -07:00
Shawn Hoffman
c3d13b048c
build against wxWidgets3 from Externals on Windows.
...
use Externals version of libpng on Windows.
2012-03-18 02:31:19 -07:00
marcosvitali
b0f75f17ae
This release still fixed the hangs produced by fifo overflow without sacrifice performance.
...
For example you can test Tutorial moves at the beginning of The last history now is fluid 30/60.
Shuffle2: I've delete the hacky line, I think is not necessary anymore. Additional some clean in CommandProcessor.
Please test The Last Story and others games affected in the previous commits and give me a feedback.
2012-03-05 02:40:10 -03:00
Henrik Rydgard
f5d4fe0bfe
Fix some minor bugs pointed out by PVS Studio (thanks!)
2012-03-03 20:07:20 +01:00
NeoBrainX
9276b76fbc
VideoSoftware: Implement zfreeze (GXSetCoPlanar).
...
Fixes Mario Golf: Toadstool Tour's menus.
Reference:
The OpenGL extension SGIX_reference_plane seems to provide the same functionality:
http://www.opengl.org/registry/specs/SGIX/reference_plane.txt
2012-03-02 18:43:44 +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
d068686a7f
Revert revision f7d757b46e
.
2012-02-20 11:51:40 +01:00
Matthew Parlane
fc3eb7c6a7
Fixed a few warnings.
2012-02-09 17:18:46 +13:00
NeoBrainX
eb01a110c9
Implement texture preloading
2012-02-03 21:21:13 +01:00
NeoBrainX
dabb35afce
Prepare texture preloading support
2012-02-03 21:20:34 +01:00
NeoBrainX
1446fb33d5
TextureCacheBase: Replace the efbcopy_state member variable of texture cache entries with a more general "texture type"
2012-01-31 19:52:02 +01:00
NeoBrainX
cc54ee7d94
TextureCache: Move EFB copy cache code from TextureConverter to TextureCache
2012-01-31 19:51:32 +01:00
NeoBrainX
a02df43e6d
TextureConverter (OGL/D3D9): Kill EncodeToRam because it wasn't used anywhere and it basically does the same as EncodeToRamFromTexture anyway
2012-01-31 18:09:35 +01:00
NeoBrainX
3b38295cbd
TextureCacheBase: De-uglify hybrid EFB copies (documentation needs updating though)
...
TextureCacheBase: Fixed dynamic EFB copies being set to normal textures.
2012-01-31 18:09:35 +01:00
NeoBrainX
5239ba88c9
TextureCache: Remove unsafe texture cache
2012-01-31 18:09:35 +01:00
NeoBrainX
c5008fe9de
TextureCache: Renaming some variables
...
OGL: Fix a possible bug at texture dumping
OGL: Add a TODO about a possible bug
2012-01-31 18:09:34 +01:00
Shawn Hoffman
f57f654b59
set ProgramShaderCache program format correctly.
2012-01-18 10:22:03 -08:00
Ryan Houdek
0b74ead13f
More "stuff" for SS, also a small fix in the program shader cache cache setup."
2012-01-11 04:10:43 -06:00
NeoBrainX
b33be736cd
D3D9/11: Degrade a PanicAlert related to EFB format changes to an ERROR_LOG
2012-01-06 13:45:51 +01:00
nitsuja
39613a95a8
initialize the uninitialized
2012-01-04 01:36:09 -08:00
Shawn Hoffman
bd5cf88686
let us try normal c++ static init instead...
2011-12-29 16:25:03 +01:00
Ryan Houdek
6a5b56d25f
Get the program binary type correctly or else ATI makes massive (~400MB) shader caches. Also, don't need the line in the PixelShaderGen.
2011-12-29 01:35:50 -06:00
Ryan Houdek
8a48b42e4c
Add support for Dual source blending to older ATI cards that don't support 420pack but do support GL_ARB_blend_func_extended. This is more proper as well anyways.
2011-12-29 00:32:06 -06:00
Ryan Houdek
fbbea9bb9b
These checks aren't needed when using CG.
2011-12-29 00:01:50 -06:00
Shawn Hoffman
c8d0c8e217
oops, forgot to make sure the gl program is actually free'd.
2011-12-26 10:27:18 -05:00
Ryan Houdek
6f729f8cbf
Woops, better not forget the ing
2011-12-26 04:09:36 -06:00
Ryan Houdek
3773d29b6d
Remove some warnings in ProgramShadercache, Was using wrong variable for checking dual source blending.
2011-12-26 03:54:44 -06:00
Shawn Hoffman
5f296d0be7
refactor ProgramShaderCache::PCacheEntry
2011-12-26 02:58:52 -05:00
Shawn Hoffman
16f9d8e06d
Checking GLEW_VERSION_4_0 is superfluous since we check GL_ARB_get_program_binary, and it's a runtime variable anyways.
2011-12-26 00:43:47 -05:00
Shawn Hoffman
4bc14c3473
fix formatting uglies introduced in glsl-master branch
2011-12-26 00:15:54 -05:00
Ryan Houdek
b607695103
Add in the Windows fix.
2011-12-25 12:21:31 -06:00
Ryan Houdek
8349cc2551
Only use explicit attribute locations when we are supporting GLSL > 1.2 since we need in/out instead of attribute variable types. This was brought to my attention from MESA. MESA supports GL_ARB_explicit_attrib_location, but yets to support GLSL 1.3, so basically useless extension to MESA right now?
2011-12-24 08:58:51 -06:00
Ryan Houdek
aa2032af2c
Write all shaders to disk on emulator stop instead of constantly. Also change pair from u64 to u32.
2011-12-24 02:19:30 -06:00
Ryan Houdek
b90fa37c60
If user doesn't compile with glew 1.6, cut out program binaries so everything still compiles.
2011-12-24 00:37:13 -06:00
Ryan Houdek
9bc6b83fd0
If CG isn't available, still compile and fallback on GLSL
2011-12-24 00:24:13 -06:00
Sonicadvance1
7c558df283
Missed a if, don't want people crashing now do we?
2011-12-21 22:33:33 +00:00
Ryan Houdek
8e0172374c
Give OSX users more of a chance of supporting Single pass DSB in the future.
2011-12-21 01:29:29 -06:00
Ryan Houdek
a10656b1b2
Implement Program shaders cache. Seems to reduce a small amount of stuttering when F-Zero starts. Did it because I can :|
2011-12-21 00:15:48 -06:00
Ryan Houdek
31a9b6c322
Go back to using glGetString with GL_EXTENSIONS because glew 1.7 is required to check for newer 4.2 extensions that way.
2011-12-20 23:07:42 -06:00
Ryan Houdek
dc134b9bac
Move the GLSL extension checks over here so it is nicer.
2011-12-20 21:55:11 -06:00
Ryan Houdek
f6b33cf0be
Add a define back so we work without GLEW 1.6, Also I missed a line when I was fixing binding sampler locations last night when I was tired.
2011-12-19 19:10:05 -06:00
nitsuja
3e773f093d
fixed a freeze on emu shutdown in windows build
2011-12-19 15:13:26 -08:00
Ryan Houdek
9ce17a43ec
There we go, actually found the issue.
2011-12-19 00:15:07 -06:00
Ryan Houdek
768a683f04
This thing fails when we don't support binding. Not 100% sure why I need to set this multiple times.
2011-12-18 23:31:00 -06:00
Ryan Houdek
636d6a915d
Remove this silliness
2011-12-18 01:51:15 -06:00
Maarten ter Huurne
ed1bfdf293
Merge branch 'cmake-osx2'
2011-12-17 16:30:02 +01:00
Ryan Houdek
4342efe712
Some shader programs don't come with Vertex shaders attached, don't try to bind a Vertex Uniform block then.
2011-12-17 01:17:11 -06:00
Ryan Houdek
b837ae25fc
Set Sampler values at program make time instead of every frame. Fix an issue when The user had UBO support but not Binding support.
2011-12-17 01:06:55 -06:00
Ryan Houdek
73c3f198f4
Only delete this buffer if we support it.
2011-12-16 23:37:22 -06:00
Ryan Houdek
fe6fb55389
Add a GUI option to use GLSL shaders. Also fix a small typo.
2011-12-16 23:18:24 -06:00
Ryan Houdek
800e1c9e09
Let compiling work on OSX.
2011-12-16 00:00:08 -06:00
Ryan Houdek
9ff48ac6eb
Make sure not to try and bind UBO locations when it isn't supported
2011-12-15 15:48:21 -06:00
Ryan Houdek
ad13f2d23d
Instead of querying the vertex attribute location. Let's bind it to where CG expects it to be as well. Was causing problems when we were trying to activate the components below and they weren't available. This fixes cubivore with GLSL shader. Also any other game that uses 3 normal pointers.
2011-12-11 06:18:01 -06:00
Jordan Woyak
c908e1173d
glMapBuffer was slow, go back to glBufferSubData, single combined ps/vs ubo now
2011-12-11 06:11:38 -06:00
Jordan Woyak
a613012d08
try combining vs/ps ubo
2011-12-11 06:02:47 -06:00
Jordan Woyak
5ae1f674f5
make use of glMapBuffer to set ubo data
2011-12-11 05:29:15 -06:00
Ryan Houdek
16b58a8825
Show a bit of information when using GLSL shaders.
2011-12-11 05:15:08 -06:00
Jordan Woyak
bcb2abbcf1
fix stupid indentation
2011-12-11 04:32:57 -06:00
Jordan Woyak
031c523fba
have separate variables/functions for VS/PS ubo stuff, array was confusing.
2011-12-11 04:28:02 -06:00
Ryan Houdek
fbef258dab
Disable UBO buffer generation if hardware doesn't support it.
2011-12-11 04:19:11 -06:00
Pierre Bourdon
df283a56a0
More coding style fixes because I suck at sed
2011-12-11 11:14:02 +01:00
Pierre Bourdon
014c474024
8 spaces indentation -> tabs
2011-12-11 11:08:18 +01:00
Ryan Houdek
1724385c8c
Actually have Dual Source blending work for people. Forgot about this change.
2011-12-11 03:10:03 -06:00
Ryan Houdek
2907ffd72c
Make this pretty
2011-12-10 15:58:44 -06:00
Ryan Houdek
c678172f32
Make sure our UBO buffers are always aligned correctly.
2011-12-10 15:52:20 -06:00
Ryan Houdek
97c3c156e6
Use UBOs in every shader. I had missed a few. Only cache Uniform locations if we aren't using UBOs.
2011-12-10 15:40:10 -06:00
Ryan Houdek
c72a244809
Make sure to support everything even if GPU doesn't.
2011-12-10 14:35:37 -06:00
Ryan Houdek
5925feb6e0
yay, UBOs work 100% now.
2011-12-10 08:07:13 -06:00
Ryan Houdek
7ab38cff68
UBO works for Pixel Shaders if Binding for UBO is zero, otherwise fails. Probably why Vertex shader UBO is failing. Too tired to investigate right now.
2011-12-10 07:38:30 -06:00
Ryan Houdek
49664bff61
More for Billiard <3
2011-12-10 02:02:22 -06:00
Ryan Houdek
24336171f1
Firin ma lazer
2011-12-10 01:57:27 -06:00
Ryan Houdek
126dfa073b
Firin ma lazer
2011-12-10 01:56:37 -06:00
Ryan Houdek
54a90d08ce
Fix one error.
2011-12-09 21:15:15 -06:00
Ryan Houdek
e8087aa1a9
Remove bSupportsGLSLLocation since it won't work how I expect it.
2011-12-09 19:14:02 -06:00
Ryan Houdek
4fe9792760
Merge branch 'GLSL-master' of https://code.google.com/p/dolphin-emu into GLSL-master
2011-12-09 17:30:50 -06:00
Ryan Houdek
8e5bb59cb6
Add in UBOs, doesn't work yet. Still debugging here.
2011-12-09 17:30:05 -06:00
LPFaint99
87c3c37ba7
add ProgramShaderCache.* to visual studio project files
2011-12-09 14:28:59 -08:00
Ryan Houdek
0ccba2b581
Support Dual Source Blending in OGL plugin with GLSL.
2011-12-08 05:09:48 -06:00
Ryan Houdek
cecc3c3873
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.
2011-12-08 03:20:31 -06:00
Ryan Houdek
1201988fe4
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.
2011-12-08 01:51:08 -06:00