Commit Graph
2841 Commits
Author SHA1 Message Date
Henrik Rydgård 7ffb4602e3 Merge pull request #6873 from hrydgard/d3d-shader-cleanup
D3D shader cleanup - remove LinkedShaders and use fixed constant slots
2014-09-11 19:59:55 +02:00
Henrik Rydgård 432bdef368 Merge pull request #6879 from unknownbrackets/gpu-minor
Bind the alphatest tex after we know vert alpha
2014-09-11 09:36:59 +02:00
Unknown W. Brackets f7b669a740 Fix infinite recursion in framebuf create upload.
Needs to be done *after* currentRenderVfb_ is set.

Fixes #6872.
2014-09-10 23:59:12 -07:00
Unknown W. Brackets 33ac30218a Bind the alphatest tex after we know vert alpha.
Before we sometimes thought alpha test was trivially true when it wasn't.
2014-09-10 23:43:48 -07:00
chinhodado 31fc179bc2 Fix a wrong condition 2014-09-10 19:50:31 -04:00
Henrik Rydgard 7b66059ae0 D3D: Assorted cleanup. Add a missing register specification. 2014-09-10 15:20:57 +02:00
Henrik Rydgard 163f81e5be DX9: "Linked" shaders are now pointless, so remove them. 2014-09-10 14:07:30 +02:00
Henrik Rydgard 0dc6150a2e DX9: Not much point in tracking dirtiness per shader now that all constants are shared. 2014-09-10 13:57:19 +02:00
Henrik Rydgard 8bca420c0a Some renaming 2014-09-10 13:48:55 +02:00
Henrik Rydgard bf7a4f9097 D3D: Use fixed constant registers for vertex shaders too. 2014-09-10 13:43:35 +02:00
Henrik Rydgard d2d563cd2c D3D: Use fixed constant registers for pixel shader constants 2014-09-10 12:59:33 +02:00
Henrik Rydgard 14c8733def Uniforms/constants aren't shared in D3D, let's not pretend they are. 2014-09-10 12:40:15 +02:00
Henrik Rydgard 6fa1872163 DX9: Disable an annoying warning in vertex shader generator to clean up our reports
warning X3571: pow(f, e) will not work for negative f, use abs(f) or conditionally handle negative values if you expect them
2014-09-10 11:04:37 +02:00
Unknown W. Brackets 417bfc74c3 d3d: Fix drawpixels texture. 2014-09-09 23:55:00 -07:00
Unknown W. Brackets e9b87104ef Move FBO_OLD_AGE to the common header.
Guess it's fine here.
2014-09-09 23:11:25 -07:00
Unknown W. Brackets e2a4a50511 d3d: Centralize framebuf creation/switch logic. 2014-09-09 22:58:43 -07:00
Unknown W. Brackets ae2e8c5c7c d3d: Migrate a few more things into common code. 2014-09-09 22:58:11 -07:00
Henrik Rydgard 8ef326e531 D3D: Remove now-redundant texture coord scaling now that we decode the 8-bit and 16-bit formats in the vertex decoder 2014-09-09 22:32:59 +02:00
Henrik Rydgard 422ae62b63 D3D9: Add support for D3D9Ex, which has faster flipping and an option for lower latency, and some other stuff.
MANAGED textures are not allowed though so compensate for that by making them dynamic for now.
2014-09-09 22:28:35 +02:00
Unknown W. Brackets 8c229e00b4 d3d: Begin centralizing framebuffer management. 2014-09-09 08:12:42 -07:00
Unknown W. Brackets d59aa06a3b d3d: Improve GE debugger with render-to-tex.
Also fix a crash in oddly sized framebuffers.
2014-09-09 01:42:21 -07:00
Unknown W. Brackets e3d0703bbb d3d: Fix texture scaling. 2014-09-09 01:22:11 -07:00
Unknown W. Brackets 02a3ebcb8a d3d: Add vertex full alpha detection. 2014-09-09 01:03:08 -07:00
Unknown W. Brackets 9af40cb14f d3d: Update the texture cache to mostly match.
Now we can reduce the differences down.
2014-09-09 00:53:01 -07:00
Unknown W. Brackets 1b12ad1b91 d3d: Fix a shader warning from sw transform. 2014-09-08 22:18:34 -07:00
Unknown W. Brackets f770b599d9 d3d: Reset scissor/viewport on fbo bind.
Maybe a better way, the state is forgotten on bind so if we try to set it
again, it'll be ignored.  Fixes map in Star Ocean 1.
2014-09-08 22:12:13 -07:00
Unknown W. Brackets 932a593576 d3d: Clamp depth viewport to [0, 1] also. 2014-09-08 21:55:28 -07:00
Unknown W. Brackets cfee8f81e8 d3d: Oops, typo in texcache. 2014-09-08 21:43:38 -07:00
Unknown W. Brackets 030a9d55e7 d3d: Use unnormalized values for alpha testing.
Fixes Tales of Eternia's world map, Popolocrois everwhere, etc.

If PowerVR is using this method on GLES, it may be broken for the same
reasons.
2014-09-08 21:37:25 -07:00
Unknown W. Brackets 52c1b37465 d3d: Handle texture swizzling in ge preview. 2014-09-08 21:25:37 -07:00
Unknown W. Brackets bc6a67babf d3d: Use unsigned Z in throughmode. 2014-09-08 21:06:26 -07:00
Unknown W. Brackets 8aac734547 d3d: Correct texcoord scale.
Very obvious in for example LittleBigPlanet.
2014-09-08 21:00:46 -07:00
Unknown W. Brackets b45711ba94 d3d: Centralize parts of the texture cache.
Should merge these.
2014-09-08 20:55:56 -07:00
Unknown W. Brackets 375e102647 d3d: Fix some shader issues with tex projection. 2014-09-08 19:33:12 -07:00
Unknown W. Brackets 04147827ee Account for texel offsets in the frag test lookup.
Darn, thought this wouldn't be necessary but it is is for 1/255 and other
values.

Without cache:
PowerVR: temp, add, mul, fract, mul, compare
Other: mul, add, floor, compare

With cache: mul, add, texture lookup, compare
2014-09-08 19:04:44 -07:00
Henrik Rydgard aaa0180114 D3D: Always decode U16 coords to floats as there's no good corresponding vertex format that works on all GPUs.
Fixes Burnout and probably many more games.
2014-09-09 00:42:12 +02:00
Henrik Rydgard ef0ae77e98 D3D: some cleanup and a crashfix on shutdown 2014-09-09 00:29:01 +02:00
Unknown W. Brackets 923c535deb Merge pull request #6861 from hrydgard/depth-d3d
Improve depth buffering in D3D by computing a depth-flipped proj matrix but only when needed.
2014-09-08 14:17:19 -07:00
Henrik Rydgard 0a74243b61 Remove lying comment 2014-09-08 23:14:33 +02:00
Henrik Rydgard 01a1438dce Improve depth buffering in D3D by computing a depth-flipped proj matrix but only when needed. 2014-09-08 23:10:23 +02:00
Unknown W. Brackets ac97f1ed96 Avoid a very unlikely fbo leak. 2014-09-08 07:41:23 -07:00
Unknown W. Brackets 7e248376f8 Track the last drawn width/height/format.
This way we can apply render-to-self effects more correctly.
2014-09-08 07:40:43 -07:00
Unknown W. Brackets 76d5f67796 Arg, fix color testing from frag test cache. 2014-09-07 23:21:22 -07:00
Unknown W. Brackets 2532639f70 Refactor fbo binding into DrawPixels(). 2014-09-07 21:53:22 -07:00
Henrik Rydgård 1985e6db9a Merge pull request #6853 from unknownbrackets/testcache
Cache fragment test results using a texture
2014-09-07 23:55:53 +02:00
Unknown W. Brackets 072e9c3a0d Use a more logical name for the test tex creator. 2014-09-07 14:52:22 -07:00
Henrik Rydgård d98480085a Merge pull request #6854 from unknownbrackets/d3d9
Report shader errors in Direct3D 9, plug some leaks
2014-09-07 23:38:35 +02:00
Unknown W. Brackets 858df90dff d3d: Release shaders and fbos on shutdown. 2014-09-07 13:15:39 -07:00
Unknown W. Brackets 34b1d13c29 d3d: Release vertex decls on shutdown. 2014-09-07 13:07:12 -07:00
Unknown W. Brackets 564ae9f184 d3d: Report shader compilation failures. 2014-09-07 11:01:19 -07:00