Commit Graph
9567 Commits
Author SHA1 Message Date
sum2012 3549705195 Use better solution from @Bigpet 2015-03-23 20:29:51 +08:00
Unknown W. Brackets 5fa3bf0eb9 Move the viewport transform to the proj matrix.
The viewport has an implementation defined maximum size.  On some devices,
it's as low as 2048 or 4096.

Tales of Destiny 2, for example, uses a large viewport, which may be
outside this range at 1x or 2x on such devices.  This makes it work much
better.  It may also have better subpixel precision.
2015-03-22 23:35:24 -07:00
sum2012 433347e3b6 GPU:Do not "decimate" the usageFlags.
Fix #7625
2015-03-23 07:25:44 +08:00
Henrik Rydgård cf7115aa17 Merge pull request #7599 from unknownbrackets/texscaling
Avoid constant reload of frequently changed textures
2015-03-18 18:11:30 +01:00
Unknown W. Brackets 0dda098b2b Oops, forgot to actually reset vertex shader. 2015-03-15 17:05:23 -07:00
Unknown W. Brackets d00f6adf11 Avoid querying attrib locations in depal runtime. 2015-03-15 14:44:13 -07:00
Unknown W. Brackets 8f8aeaef77 Improve depal shader failure cases.
Primarily, this handles lost (e.g. Android sleep) better, in that it
recreates the vertex shader.  Previously, this would simply cause all
future depal operations to fail, and to constantly retry compiling and
linking the failed program.
2015-03-15 13:15:16 -07:00
Unknown W. Brackets 7ee9112425 Avoid constant reload of frequently changed tex.
If we detect that it's frequently changing, this will cause it to spiral
into an infinite loop of staying frequently changing and reloading to try
to scale.
2015-03-15 09:10:09 -07:00
Henrik Rydgård 085ecc0a64 Merge pull request #7591 from unknownbrackets/gpu-framebuf
Better glInvalidateFramebuffer usage, track usage flags better
2015-03-15 11:18:30 +01:00
Unknown W. Brackets 6b26e1a591 Read pending vertex data before exiting gpu loop.
Fixes save pictures in Crimson Gem Saga.
2015-03-14 18:11:24 -07:00
Unknown W. Brackets 0f38a1f459 Invalidate buffers after using for post shaders. 2015-03-14 16:16:32 -07:00
Unknown W. Brackets e7b830ff61 Invalidate buffers used for download. 2015-03-14 16:11:20 -07:00
Unknown W. Brackets d8478255d4 Invalidate temp FBOs each frame.
These are used for depal and render-to-self, as well as shader blending.
2015-03-14 16:02:04 -07:00
Unknown W. Brackets 7e0489c83e Keep better track of framebuf usage flags. 2015-03-14 15:21:58 -07:00
Unknown W. Brackets e45daac41c Fix a dumb mistake for shader framebuf fetch. 2015-03-14 00:14:59 -07:00
Henrik Rydgård 33b291a36e Merge pull request #7567 from unknownbrackets/gpu-blend
Use framebuffer fetch more and on more devices
2015-03-09 22:24:23 +01:00
Henrik Rydgård 9db4c5f34d Merge pull request #7573 from unknownbrackets/gpu-minor
Small optimizations to software transform
2015-03-09 09:59:45 +01:00
Unknown W. Brackets f0676b0c85 Optimize color tests against zero.
They seem to be somewhat common.  Speeds up Tales of Phantasia X a bit.
2015-03-08 19:08:21 -07:00
Unknown W. Brackets 534b06d3ff Correct clearing of texture cache on oom. 2015-03-08 18:38:28 -07:00
Unknown W. Brackets a82bb31c6f Decimate the fragtest cache less often. 2015-03-08 18:35:53 -07:00
Unknown W. Brackets cf7a4ab2cf Avoid shader id data that doesn't change shader.
This may reduce shader switches, or more likely at least total # of
shaders, when alpha test settings are changed but alpha test is not
enabled.
2015-03-08 18:28:59 -07:00
Unknown W. Brackets 04eb83002c Assume lmode does nothing in throughmode. 2015-03-08 18:03:17 -07:00
Unknown W. Brackets fb071a066d d3d9: Change vertex attribute logic to match gles. 2015-03-08 18:01:00 -07:00
Unknown W. Brackets 83e4edbc7c Oops, don't affect hardware transform. 2015-03-08 14:19:44 -07:00
Unknown W. Brackets c7984dd93e Use texture stage 3 for the palette, always.
It's better to keep a stage dedicated to each thing.  This also makes it
easier to potentially process depal in the shader, if we do that.
2015-03-08 13:13:04 -07:00
Unknown W. Brackets 39cb74a8d3 Simplify transform in throughmode/sw (rectangles.)
This should make it a bit faster, a bit less work.
2015-03-08 13:12:13 -07:00
Unknown W. Brackets 39347efda4 Fix shader blending on ARM devices, oops. 2015-03-08 00:12:29 -08:00
Unknown W. Brackets eb349a1978 Make sure not to try multiple shader fetch exts. 2015-03-07 22:31:55 -08:00
Unknown W. Brackets a04af187ea Fix 16-bit indexed rectangles.
This was causing us to draw double the rectangles.  8-bit indexed
rectangles are already correct.
2015-03-07 19:52:09 -08:00
Unknown W. Brackets 08a1bb8796 Add support for ARM_shader_framebuffer_fetch. 2015-03-07 16:11:43 -08:00
Unknown W. Brackets 2344760018 Use framebuffer fetch for more accurate blending.
On devices which support it, framebuffer fetch should give us more correct
blending than copying fbos or using a fallback (such as doubling which may
clamp.)

Not actually tested on any supported device.
2015-03-07 12:09:27 -08:00
Unknown W. Brackets 9c3ccc97a2 Support EXT_shader_framebuffer_fetch.
We only supported NV_ before.  Not tested on any supporting device, but
this is primarily found on PowerVR devices.  This may allow them to
perform effects (like min/max/etc.) more accurately and quicker.
2015-03-07 12:07:53 -08:00
Henrik Rydgård 077eae6255 Merge pull request #7566 from Bigpet/vs2015
Make compilable under VS2015
2015-03-07 00:16:50 +01:00
Peter Tissen 3ada988740 capture by value, since the dispatch seems asynchronous 2015-03-06 22:10:10 +01:00
Peter Tissen f5795a68a7 Make compilable under VS2015 2015-03-06 21:09:45 +01:00
Unknown W. Brackets 98d7afae89 Switch to #pragma once in a few places.
Doesn't really affect git history much to change these.
2015-03-02 22:34:51 -08:00
Unknown W. Brackets 818627801d Fix newlines in old merge, oops.
This is now showing up in git because I touched it, and it's got the wrong
newlines.  Just making it go away.
2015-03-01 18:35:28 -08:00
Henrik Rydgård c0450f7f9e Merge pull request #6920 from hrydgard/dx9-depal
Dx9 depal - needs debugging before merge
2015-03-01 21:04:36 +01:00
Unknown W. Brackets d4e74e6998 d3d9: Clarify a comment. 2015-03-01 11:47:39 -08:00
Unknown W. Brackets 105087d367 dx9: Swap depal bgra in shader.
We don't swap palettes anymore, except in the shader.
2015-03-01 11:28:06 -08:00
Unknown W. Brackets 3bc954778c dx9: Explicitly restore viewport after depal.
Otherwise, it doesn't get restored.
2015-03-01 11:28:06 -08:00
Unknown W. Brackets bda6f0a4b8 dx9: Reset more state before depal draw.
Was alpha blending before.
2015-03-01 11:28:05 -08:00
Henrik RydgardandUnknown W. Brackets 869f74d1b0 Depal: Apply the half-pixel offset that looked the least wrong. Still not right. 2015-03-01 11:28:04 -08:00
Unknown W. Brackets 7b76f7ae60 d3d: Fix depal flipping and negative z. 2015-03-01 11:28:04 -08:00
Unknown W. Brackets 1dfecbf2b8 d3d: Actually upload the clut texture. 2015-03-01 11:27:28 -08:00
Henrik RydgardandUnknown W. Brackets 78190f3e8c DX9: Hook up the depalettize code. Doesn't work yet though. 2015-03-01 11:24:45 -08:00
Henrik RydgardandUnknown W. Brackets 13bf0acd28 DX9: Add DepalettizeShader manager (not hooked up, so untested) 2015-03-01 11:16:56 -08:00
Henrik RydgardandUnknown W. Brackets 0c9f541a43 Move depalettize-shader generator to Common 2015-03-01 11:15:27 -08:00
Unknown W. Brackets 383f894db7 d3d9: Make blending more like GL's recent changes. 2015-03-01 10:31:43 -08:00
ChinandHenrik Rydgard 37f50a3792 Change to pass some arguments by reference 2015-03-01 16:49:00 +01:00