9751 Commits
Author SHA1 Message Date
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
Unknown W. Brackets 4d54cad9bd d3d: Reduce D3DX leaks. 2014-09-07 10:38:49 -07:00
Unknown W. Brackets c0908421ba Skip binding when the test won't be used. 2014-09-07 10:06:57 -07:00
Unknown W. Brackets 95a620695b Actually cache the last bound test texture. 2014-09-07 10:06:23 -07:00
Unknown W. Brackets 94c1271761 Add an experiment with using a texture for tests.
Using an option for now so it's easy to test, if it works well we can
maybe remove the option.
2014-09-07 10:04:57 -07:00
Unknown W. Brackets b20cd3cba2 Clear stencil on switch from 565 buffer.
Fixes #2094, shadows in Kingdom Hearts in some scenes.

Not a complete solution, but should be a relatively safe one.
2014-09-07 08:47:46 -07:00
Unknown W. Brackets 47e98f972d Try to simplify alpha replace for poor compilers. 2014-09-07 08:25:39 -07:00
Henrik Rydgard 780ed765c7 Update dx9sdk (got rid of redundant headers) 2014-09-07 10:45:38 +02:00
Unknown W. Brackets ebe71e3ec4 d3d: Properly initialize cullmode. 2014-09-06 23:01:04 -07:00
Unknown W. Brackets 5639b056b3 d3d: Use 0 texcoord when not specified. 2014-09-06 23:01:04 -07:00
Unknown W. Brackets a29c2f4f2f d3d: Use 2.0 vertex and pixel shaders. 2014-09-06 23:01:03 -07:00
Unknown W. Brackets 07ccc37689 d3d: Use drawPixelsTex as a non-dynamic texture. 2014-09-06 23:01:03 -07:00
Unknown W. Brackets de2c951665 Detect EXT_gpu_shader4 to use bitwise ops pre-3.3.
This may allow it to work on more cards, and should fix a (probably driver
bug) error we've had reported in GL 3.0 / GLSL 1.3.
2014-09-04 00:39:54 -07:00
Henrik Rydgård 94ee0c5a01 Merge pull request #6815 from unknownbrackets/gpu-minor
Eat cycles during GE block transfers
2014-08-31 09:29:09 +02:00
Unknown W. Brackets e1d2e72480 Add block transfer to null gpu.
For tests, better to have it here.
2014-08-30 22:14:58 -07:00
Unknown W. Brackets 514772e18e Avoid some magic numbers. 2014-08-30 22:06:25 -07:00
Unknown W. Brackets 337b34ef6a Eat cycles during block transfers.
Tests show this takes a number very close to 1.9 times the number of bytes
in cycles @222.

Using that value caused a tiny fps drop in one area of the God of War
demo, which may be correct but might also cause complaints.  A lot of our
other timing is not accurate, so using a lower value (1.6) to be on the
safer side.

This may cause things to reschedule more accurately when games drawsync,
and improves the gpu/commands/blocktransfer test.
2014-08-30 22:02:28 -07:00
Unknown W. Brackets 9ce5c49978 d3d: Add basic stencil mask handling.
Mostly so we have it in dxstate, will probably reorganize stuff later.
2014-08-30 11:18:18 -07:00
Unknown W. Brackets 5e07a40a83 Oops, buildfix Android/etc.
This is not declared there.
2014-08-30 07:13:36 -07:00
Unknown W. Brackets 361b9a2572 Use 8888, always, for Danganronpa's FBOs.
This should fix dithering on draw causing problems for Adreno 3xx devices.
2014-08-30 02:05:51 -07:00
Henrik Rydgård c5e80d0999 Merge pull request #6801 from unknownbrackets/d3d
d3d: Avoid rewriting textures to BGRA from RGBA, just swizzle
2014-08-28 11:21:19 +02:00
Unknown W. Brackets 4e5778d714 d3d: Correctly disable stencil testing. 2014-08-28 01:21:29 -07:00
Unknown W. Brackets 1f51fe7843 d3d: Avoid rewriting textures, just swizzle.
Luckily A is in the same place and the same width, so we can do this for
all but framebuffers easily.

Technically we could do it in OpenGL as well.

Small (1-2%) performance improvement in FF2.
2014-08-28 01:20:21 -07:00
Unknown W. Brackets 5a3a972d95 Perform intra-buffer blits directly.
As far as I can tell, this doesn't need a temp fbo.
2014-08-27 23:13:08 -07:00
Unknown W. Brackets 9cab344026 Rebind the fbo after inter-buffer copy.
Might be needed if the list is stalled, a copy is done, list unstalled,
and then something happens to flush a pending prim.
2014-08-27 23:10:07 -07:00
Unknown W. Brackets fc5d62804e Avoid unbinding the draw fbo where possible.
If we're just going to bind another one, no need to trade around.
2014-08-27 23:08:17 -07:00
Unknown W. Brackets 77e050d044 Only unbind the read fbo id draw can be skipped. 2014-08-27 23:07:11 -07:00
Unknown W. Brackets a8b78a46bd Forget the bound texture on fbo_create().
Just in case, since it overrides the texture.
2014-08-27 23:05:21 -07:00
Unknown W. Brackets 140eb82821 d3d: Don't flip render-to-tex.
Fixes flipped screens and objects in a bunch of games.
2014-08-27 07:19:41 -07:00
Unknown W. Brackets 2191382a7a d3d: Scale positions by 128/32768. 2014-08-26 08:18:24 -07:00
Unknown W. Brackets d987cfea37 d3d: Cache sampler/render state like in GL.
Small 3% performance improvement.  Also, would prefer to have the bugs
from this now rather than later.
2014-08-26 08:08:02 -07:00
Unknown W. Brackets 5e528f673d d3d: Set the lod bias for textures.
Why aren't these caching?
2014-08-26 07:58:09 -07:00
Unknown W. Brackets b8e768066f d3d: Remove another use of D3DCOLOR.
Fixes more colors.
2014-08-26 07:46:22 -07:00
Unknown W. Brackets b4b81744ee Use dst factor w/ dst in reverse sub blending. 2014-08-26 00:39:14 -07:00
Unknown W. Brackets 2448386e8a d3d: Specify clamping incr/decr of stencil. 2014-08-26 00:23:34 -07:00
Henrik Rydgård 44df3cee06 Merge pull request #6784 from unknownbrackets/d3d
Clean up some normal handling and a shader error in D3D
2014-08-25 18:32:08 +02:00
Unknown W. Brackets a34bf158e3 d3d: Clean up some normal handling.
So hardware and software transform match gles.
2014-08-25 07:43:19 -07:00
Unknown W. Brackets 170036e171 d3d: Fix another shader compile error. 2014-08-25 07:31:10 -07:00
Henrik Rydgård caa34c4db8 Merge pull request #6777 from unknownbrackets/gpu-blend
Use blending to approximate incr/decr/invert
2014-08-25 11:38:08 +02:00
Unknown W. Brackets 78c342889e d3d: Prevent crash on Release() of render-to-tex.
Might be safer to do as we do in GLES and always have a texture...
2014-08-25 02:15:02 -07:00
Unknown W. Brackets a533d76c8e d3d: Convert DXT texture colors.
Doesn't seem like this is 100% correct though, not sure.
2014-08-25 02:00:55 -07:00