Commit Graph

88 Commits

Author SHA1 Message Date
sudonim1@gmail.com e8257df98d GSDX: made the paletted texture handling in the cache a bit more sensible to my eyes and implemented interpolation of palette entries for pixels in paletted textures when using the 8 bit textures option. Regressions in some games I think, such as Virtual On (which is very broken anyway), need to investigate what made them work (to some degree) before. Seems to change some performance characteristics favourably to my surprise, but I might just be bad at remembering framerates.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5287 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 03:27:16 +00:00
sudonim1@gmail.com 17f28b24b3 GSDX: Prodded some offensive code, this isn't meant to affect emulation of any games and it probably won't.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5283 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-11 00:00:18 +00:00
sudonim1@gmail.com 1711a26bbb GSDX: put all paletted texture samples through the same transformation from the UNORM 0-1 256 step mapping to a 0.5/256-255.5/256 mapping after seeing potential bugs with FMT_4HL and changed FMT_4HH because it seemed to be completely wrong. Nothing but 8 bit textures tested because I can't find a single game which uses 4 bit textures.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5281 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-10 16:04:47 +00:00
sudonim1@gmail.com 4f79c4d1cb GSDX: Fixed my inability to remember or look up (I swear that page was hiding) coordinate systems in r5279 and assumed that it was a rounding error instead. The symptom was that palette indices above around 250 were being rounded up to the next palette entry causing visible glitches (only in D3D10 for some reason). Changed the code to keep the fractional part after multiplication by 256 around 0.5 and the steps around 1.0. Should be very safe against small errors.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5280 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-09 08:03:27 +00:00
sudonim1@gmail.com 1df5b7ef7a GSDX: Probably fix D3D10 and maybe D3D9 (might be working anyway but I think I have it addressing texel centres now) palette lookups. I noticed that this was broken in D3D10 while fixing the Realta Nua issue in r5273.
Explanation, because this gives me a headache and this might save someone else one (or I might be wrong and they might see why): in D3D10, 0.0 points to the centre of the leftmost texel and 1.0 points one texel to the right of the rightmost texel, so to map a UNORM uniformly across a texel we need to multiply the input by (w-1)/w.  In D3D9 0.0 points to the left edge of the leftmost texel and 1.0 to the right edge of the rightmost texel so after the multiplication we add 1/2w.

Actual texture sampling is probably not right for at least one of D3D9 and D3D10, but this headache is killing me.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5279 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-06-08 21:36:44 +00:00
gregory.hainaut c6d8af0c7f gsdx-ogl: only enable AMD hack when linking ps2 related shader. Otherwise SV_Target1 in convert is wrongly remapped
zzogl: check harder that the previous primitive exist.


git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5232 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-26 09:58:37 +00:00
gregory.hainaut a7dbaed3b1 gsdx ogl: find a way to workaround the buggy amd driver to support dual blending
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5203 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-05-11 19:39:32 +00:00
gregory.hainaut f8d573770e gsdx-ogl: forgot to add the glsl file...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5182 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-27 06:30:09 +00:00
gregory.hainaut 6fd47b2907 gsdx-ogl: * implement shadeboost (only test the compilation)
Note: gui must be updated with new user hack


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5181 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-26 21:42:16 +00:00
gregory.hainaut 300ea42977 gsdx-ogl: sync from trunk 5179:5091
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5180 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-26 19:51:07 +00:00
sudonim1@gmail.com a27142f1a6 Set some svn:eol-style properties.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5173 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-04-23 18:56:22 +00:00
ramapcsx2 1b7bbcdb3d GSdx: Sprite hack update.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5125 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-03-08 17:43:21 +00:00
ramapcsx2 1595136a9d GSdx:
Another refinement to the Wild Arms hack by KrossX.
The hack now only applies to one kind of geometry (sent using  the unpacked UV handler).
This works nicer in Wild Arms as it fixes "jumpy" characters.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5124 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-03-08 17:18:22 +00:00
ramapcsx2 144a7a13fb GSdx: Better DX9 implementation of the Wild Arms Hack. Thanks, KrossX :p
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5122 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-03-07 09:31:10 +00:00
ramapcsx2 ac97331388 GSdx: Fix for DX9 mode with the Wild Arms hack enabled.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5121 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-03-06 22:36:24 +00:00
ramapcsx2 b25aec19c1 GSdx:
Adding KrossX's Wild Arms text alignment hack to the new dialog box. This hack is actually very interesting for a number of games. It should work well in cases where game designers adjusted everything pixel perfect for the GS, that usually breaks with upscaling. 
It should be generalized and renamed later.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5120 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-03-06 21:36:59 +00:00
ramapcsx2 886c23a4ee GSdx:
Better working shader for the new color settings. Taken from "TGM's shader pack" on 
http://irrlicht.sourceforge.net/phpBB2/viewtopic.php?t=21057

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5113 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-02-29 15:49:01 +00:00
ramapcsx2 954e7906ed GSdx: Added the color control functionality known as "ShadeBoost". Thanks to KrossX for initial converting / GUI work and Pseudonym for normalizing / fixing the maths.
Note: Not sure if it should be shader #7 or smth else :p

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5110 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-02-29 00:29:29 +00:00
ramapcsx2 7e435329ca GSdx:
Committing a hack KrossX prepared (thanks) ;)
It can be used to fix bad character sprites in Gust games.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5101 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-02-22 19:53:59 +00:00
gregory.hainaut 92f2ab38ae GSdx-ogl: LINUX only
* Use the new map interface/separate texture coordinate inside shader
* support new format on texture

Note: it is quite instable with various crashes and GL error but at least it compiles now :p 


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5094 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-02-11 10:22:02 +00:00
gregory.hainaut 4a00648d9f GSdx-ogl: LINUX only. sync from trunk (5068:5090)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5091 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-02-09 21:40:39 +00:00
gregory.hainaut 6680d285ea gsdx-ogl: linux only
* implement some missing shader for DATE, invert coordinate like strech rectangle
* Use glCopyImageSubDataNV nvidia extension to copy image (you need latest AMD drivers)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5086 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-31 17:08:05 +00:00
gabest11 bd12a8b7b3 GSdx: silent hill shattered memories purple street light fix, not block aligned filled rects were not correctly masked, may also fix games which store texture data in the alpha channel but use 24-bit target buffers (or just mask it in every time) and draw a lot of those unaligned rects. (tested many .gs dumps, very rare combination)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5084 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-28 10:07:17 +00:00
gabest11 915a57d9f3 GSdx: more fun with shaders but nothing works yet.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5083 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-27 11:56:49 +00:00
gabest11 9ec7f14fa8 GSdx: Simplified vertex formats and the related code, everything works with the basic GSVertex until it gets uploaded to the vertex buffer.
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5074 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-19 04:53:36 +00:00
gabest11 9aabcc1701 GSdx: added a shortcut in GSState::Transfer for the most frequent vertex format I found (helps quite a lot), less thread-syncing for the sw renderer, and the bios boot logo was fixed (just had to clear the memory on reset).
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5072 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-18 11:47:31 +00:00
gregory.hainaut e0004b5027 gsdx-ogl: linux only
* Was easy, I forgot to set the type of the buffer.
* align shader change too


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5071 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-15 18:11:48 +00:00
gregory.hainaut 0ad5982364 gsdx-ogl: linux only (merge from trunk 5022:5068)
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5069 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-15 14:51:49 +00:00
gabest11 da4ea83134 GSdx: nothing really new, just testing the compute shader, if you are an expert take a look and tell me your opinion :P
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5068 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-13 18:10:05 +00:00
gregory.hainaut cfedf41441 gsdx-ogl: linux only
* Fix some issue on wnd management, mix between sdl/ogl render
* create new gsdx option for ogl debug
  + debug_ogl_dump: start frame to dump when not 0
  + debug_ogl_dump_length: length of the dump
  + debug_ogl_shader: print shader debug
  Note current dump option must be fixed to use linux path.


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5067 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-12 07:29:31 +00:00
gabest11 2eec75c2ae GSdx: sps fixed, some code clean up and optimization, ps2 logo still broken in hw mode, I'll check it later
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5062 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-08 17:10:00 +00:00
arcum42 8bb44cfcac gsdx-ogl: All the Windows versions get a fancy logo on top, so...
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5059 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-08 04:59:29 +00:00
arcum42 4c5d1e11a8 gsdx-ogl: Fix a few glsl errors I missed last commit.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5043 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-04 11:14:57 +00:00
arcum42 0116402620 gsdx-ogl: Fix a few glsl errors. Comment out line 218 of GSDevice.cpp. Mess with the fifo hack a bit.
git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5042 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-04 10:42:53 +00:00
gregory.hainaut cc6e486742 gsdx-ogl:
* add a new define (DISABLE_DUAL_BLEND) to easily test blend mode


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5040 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-03 16:12:34 +00:00
gregory.hainaut c1d7b81a55 gsdx-ogl:
* Use a geometry shader pass-through to replace previous AMD workaround
* various cosmetic change


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5038 96395faa-99c1-11dd-bbfe-3dabce05a288
2012-01-02 20:08:11 +00:00
gregory.hainaut 9ca65c9cc6 gsdx-ogl: LINUX-ONLY
* invert the index of fragment output. Seem to work better on Nvidia (strangely no impact for AMD)
* opengl support pitch too, so remove useless copy to an fbo


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5034 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-30 22:25:17 +00:00
gregory.hainaut ea33beb360 gsdx-ogl: LINUX-ONLY
* Fix the Geomtry shader to output 2 triangles for quad primitive (ie 2R rendering)
- There is an AMD  driver bug on geomtry shader input interface (well could be the spec too). Tell me if it still working on nvidia
* Add a workaroung to a previous AMD bug. It is impossible to unattach a shader so destroy the full shader pipeline...
* Be more strict on FBO management. Would optimize it later
* use a texture insted of a render buffer for depth-stencil management.
* add more dumping capabilities (in particular depth buffer)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5033 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-30 13:55:33 +00:00
gregory.hainaut 000220f93f gsdx-ogl: LINUX-ONLY
* It works with the HW renderer !!!
* Not sure this fix will work with dual blending but we will see later
* screen is vertically flipped again...


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5031 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-29 14:39:53 +00:00
gregory.hainaut aa499f4bfd gsdx-ogl: LINUX-ONLY
* fix vertex shader for HW renderer :) Remains the fragment part...
* add some dumping infrastucture (DUMP_START and DUMP_LENGTH)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5030 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-29 14:24:26 +00:00
gregory.hainaut 6f5ac7b788 gsdx-ogl: LINUX-ONLY
* go back to opengl 4.1 (nvidia driver is buggy with 4.1).
* fix the backbuffer allocation. bad order of parameter
* fix remaining glsl error


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5006 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-22 14:12:12 +00:00
gregory.hainaut a9927a6e33 gsdx-ogl: LINUX-ONLY
* rework a little the shader to be hopefully compatible with nvidia
* request a pure 4.2 context (all gpu 4.1 capable support 4.2 anyway)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@5003 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-21 23:09:36 +00:00
gregory.hainaut e4c70ad229 gsdx-ogl: LINUX-ONLY
Forgot the shader file...


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@4997 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-19 21:04:16 +00:00
gregory.hainaut 83ad63a8a7 gsdx-ogl: LINUX-ONLY
* lay the foundation for the HW renderer on OGL


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@4996 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-19 21:03:23 +00:00
gregory.hainaut fbb224837d gsdx-ogl: LINUX-ONLY
* Enable interlace feature. (note I'm well aware that interlace crashes with SDL)
* remove useless callback debug function
* handle the y axis differently. Move vertex to follow right-hand system (render everything in reverse) then flip the y-axis for the screen rendering


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@4987 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-11 19:09:08 +00:00
gregory.hainaut afdb2dadc3 gsdx-ogl: LINUX-ONLY
* add a callback for GLERROR.  Allow to breakpoint on GSDeviceOGL::DebugCallback (gdb is completely lost on amd driver, hope it is better on nvidia)
* Add some empty glsl convert to shutup some useless debugging error
* request an advance opengl context without pre 3.0 feature.


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@4983 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-08 16:39:14 +00:00
gregory.hainaut 2be037d78f gsdx-ogl: LINUX-ONLY
* flip y-axis in merge stage
* default to xlib window managment (the dynamic switch between sdl and xlib crashi but SDL will probably dropped later)
* improve management of FBO, draw buffer
* try to fix some issue with glClearBuffer but spec is not clear.


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@4982 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-08 11:17:59 +00:00
gregory.hainaut a835de0af7 gsdx-ogl: LINUX-ONLY
* implement the saving of texture (take bmp SW code)
* fix the missing "enable attribute code" and the typo in glsl. It works now !!!
* rework a little texture to pack texture into a temporay buffer when src pitch != dst pitch
* try to replace sdl with pure xlib (not yet enabled by default but it seems to work)

Note there still a minor issue, coordinate are different between DX and OGL (upper-left vs lower-left) so the image is inversed.


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@4981 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-12-07 22:05:46 +00:00
gregory.hainaut eb3eafa090 gsdx-ogl:
* implement shader code (subset that seem to be used in SW mode)
* some hack to fix some alignment issue with GSVertexPT1 structure
* Lots of various opengl fixes. Remaining unsupported GL feature are inside SDL.


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@4974 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-11-30 21:42:41 +00:00
gregory.hainaut 6125baa578 gsdx-ogl:
* make a rough implementation of most of the opengl device interface. Only a savestate nothing to expect yet.
* depend of libglew 1.6 (normally 1.7 but I manually defined the only missing function)


git-svn-id: http://pcsx2.googlecode.com/svn/branches/gsdx-ogl@4971 96395faa-99c1-11dd-bbfe-3dabce05a288
2011-11-21 22:36:03 +00:00