Commit Graph

1576 Commits

Author SHA1 Message Date
Henrik Rydgard
e2080f6c65 Revert "STENCIL_VALUE_UNKNOWN for DECR/INCR/INVERT"
This reverts commit 59d3b92e71.

Revert "zero alpha if stencil op consistently says to zero for format 5551 as well"

This reverts commit ed07a7f411.
2013-12-08 17:48:22 +01:00
raven02
59d3b92e71 STENCIL_VALUE_UNKNOWN for DECR/INCR/INVERT 2013-12-08 22:19:13 +08:00
raven02
ed07a7f411 zero alpha if stencil op consistently says to zero for format 5551 as well 2013-12-08 22:05:31 +08:00
Henrik Rydgard
7b4759384f Only zero alpha if stencil op consistently says to zero.
Otherwise we may be better off keeping the alpha.
2013-12-08 13:04:54 +01:00
Henrik Rydgard
628bf497dd Hopefully fix UV scaling properly this time.
Check the faces in Hexyz Force please.
2013-12-08 11:52:20 +01:00
Henrik Rydgård
08a0709091 Merge pull request #4751 from unknownbrackets/reporting
Cut down on reporting of FBO misuse
2013-12-08 01:18:39 -08:00
Unknown W. Brackets
0e4ca7f9a8 Stop reporting logic ops.
We support them on desktop and they're not really often used.
2013-12-08 00:48:23 -08:00
Unknown W. Brackets
9de7b34d1c Cut down on reporting of FBO misuse.
These cases are likely to be okay.
2013-12-08 00:38:10 -08:00
Unknown W. Brackets
2df1db4c7e Avoid optimizing out both constant colors. 2013-12-07 23:24:25 -08:00
Unknown W. Brackets
a4780f5199 Don't forget the alpha in non-fixed blending. 2013-12-07 23:21:45 -08:00
Unknown W. Brackets
808eeb3a25 Attempt to pick a better blend for stencil replace. 2013-12-07 10:02:46 -08:00
raven02
60def7baf9 Set src/dst alpha to non GL_ZERO in case STENCIL_VALUE_UNIFORM 2013-12-07 21:11:47 +08:00
Unknown W. Brackets
054501c100 Replace alpha when blend mode allows it.
Some games are using fixed/fixed blending modes which work in our favor.
2013-12-07 02:54:33 -08:00
Unknown W. Brackets
113f9795f3 Try to more correctly handle stencil when blending.
Although, not accurate, this will attempt to KEEP and etc.
2013-12-07 01:58:33 -08:00
Henrik Rydgard
c738364f67 Make sure to disable scissor when doing the initial clear of a new FBO.
Minor cleanups.
2013-12-06 23:08:37 +01:00
Henrik Rydgård
3fb973af90 GL_NV_draw_texture requires more testing, turn off temporarily.
Fix the V coordinates sent in while at it.
2013-12-06 13:01:34 +01:00
Henrik Rydgård
13cdbd5284 Mask away alpha when the stencil operation is KEEP 2013-12-06 11:15:13 +01:00
Henrik Rydgard
41209eb936 Stencil-to-alpha fragment tweak: Set alpha to 0 if we can't deduce the stencil value.
This fixes the weird glowing shadows in Wipeout.
2013-12-04 19:55:09 +01:00
Henrik Rydgard
1a3e7a17fb Workaround for spline UV scale problem with texcoord speedhack 2013-12-04 14:33:45 +01:00
Henrik Rydgard
95d5c28720 Fix bug where we scaled UV coordinates twice when a tex matrix was used. 2013-12-04 14:20:42 +01:00
Henrik Rydgard
3983144c42 Make sure that blending is disabled when doing DrawPixels.
Add a comment about a potential texture scaling problem with splines.
2013-12-04 14:02:40 +01:00
Henrik Rydgard
d1f054e033 Wait, we're not in clear mode there so no need to check. 2013-12-04 13:17:41 +01:00
Henrik Rydgard
10b9e83353 Dest alpha mask: Try some rules that seem to make sense from what we know now. 2013-12-04 13:16:22 +01:00
Henrik Rydgard
127864b679 Prevent post shaders from getting applied twice in some circumstances when playing video. 2013-12-04 11:46:42 +01:00
Henrik Rydgard
ca1d4172ca Tiny optimization in block copies 2013-12-04 11:34:54 +01:00
Henrik Rydgard
e1657fec96 Get rid of WipeFramebufferAlpha ini-only option. 2013-12-04 09:41:25 +01:00
Henrik Rydgard
33efffe759 When blending (and we thus can't use stencil-to-alpha in frag shader), always write zero to alpha.
It seems the PSP doesn't blend in the alpha channel.

Reduces glow problems in Gods Eater Burst and Wipeout - although Wipeout loses some glow
that should be there.
2013-12-03 11:27:31 +01:00
Henrik Rydgard
a6150db8d5 Disable frag shader stenciltoalpha in clearmode. 2013-12-03 11:10:27 +01:00
Unknown W. Brackets
4418aacbaf When writing stencil to alpha, consider fb format. 2013-12-03 00:15:08 -08:00
Unknown W. Brackets
034de0e992 Do not wrap stencil values on INCR/DECR. 2013-12-03 00:02:07 -08:00
Henrik Rydgard
30028439b6 Must set the EXECUTEONCHANGE since we dirty. 2013-12-03 00:55:09 +01:00
Henrik Rydgard
44beebf6b0 Realized it's ok to combine the stencil-to-alpha with alpha testing as it's done within the shader, before we replace alpha. 2013-12-03 00:51:25 +01:00
Henrik Rydgard
39b632b279 Copy the stencil value in REPLACE mode to fragment alpha (but only when it's safe)
This is cheap but incomplete.
To do it more "right", we need multipass when blending or alpha test is enabled, ugh. That's for later.

Anyway, this improves the glow situation in Wipeout somewhat. Still lots of stuff that glows that shouldn't, but a little less overwhelmingly bright.
2013-12-03 00:13:21 +01:00
Henrik Rydgard
198e230cdc Re-add uniform location checks even though they aren't needed
Spec says that setting uniform -1 does nothing.
2013-12-02 23:35:49 +01:00
Henrik Rydgård
7c7c4aaadc Add "u_time" uniform to postprocessing shaders. 2013-12-02 17:24:55 +01:00
Unknown W. Brackets
5f2d5d9c55 Fix an uninitialized value warning. 2013-12-01 11:21:17 -08:00
Henrik Rydgård
c1b43e1b2d Merge pull request #4692 from unknownbrackets/verysleepy
Add support for profiling jit via VerySleepy
2013-12-01 02:44:20 -08:00
raven02
b00495f1e5 Not using factor in texture coords mapping mode 2013-12-01 16:04:29 +08:00
Unknown W. Brackets
d35717f5a8 Also report the vertex decoder jit to verysleepy.
Can use the same methods to support other platforms.
2013-11-30 19:20:22 -08:00
Henrik Rydgard
c42ee6d12e oops 2013-11-30 19:09:27 +01:00
Henrik Rydgard
9c6e7e2958 Fix bug in vtxdec jit when hardware skinning 2013-11-30 16:26:50 +01:00
Henrik Rydgard
e3e9408b87 Resurrect the vtx decoder jit option for debugging 2013-11-30 16:11:54 +01:00
Henrik Rydgard
eea8413a82 Make the texcoord speedhack a bit less aggressive at eliminating uvscaleoffset uniform updates.
Should fix #4688 and the new problem in #2919 while keeping Frontier Gate Boost working.
2013-11-30 15:54:20 +01:00
Henrik Rydgård
562582320a In LINEARFMV mode, let the presence of a video override the alpha and color test checks. 2013-11-29 18:08:29 +01:00
Unknown W. Brackets
41a7157aa6 Eat some cycles when changing thread priority.
Some games call this a lot.
2013-11-28 01:01:22 -08:00
Sacha
c71186b35a Partial Stretch: This setting is needed on other devices too. 2013-11-28 14:59:17 +10:00
Henrik Rydgård
9aa0c9a489 Minor x86 optimizations 2013-11-26 18:23:08 +01:00
Henrik Rydgard
17c9e0d172 x86 vtxjit: Use MOVZX to avoid loading too many bits when loading 16-bit colors.
Probably doesn't fix anything but more correct.
2013-11-26 14:30:32 +01:00
raven02
4d14f88455 Alternative consistent fix 2013-11-26 11:34:33 +08:00
raven02
a8d9796010 Fix texture cord in HW T&L 2013-11-25 21:07:30 +08:00
Henrik Rydgard
866ed28f64 Use VFMA in the one place where it's convenient. Some more optimization. 2013-11-24 19:50:56 +01:00
Henrik Rydgard
e5e23f3ce1 ARM: Fix vsgn. Some vertex decoder tweaks. 2013-11-24 18:21:47 +01:00
Henrik Rydgard
030e6460cc ARM: NEON-optimize software skinning 2013-11-24 18:03:42 +01:00
Henrik Rydgard
acb3994172 Split VertexDecoder into files for ARM and x86, got too large. 2013-11-24 15:58:15 +01:00
Henrik Rydgard
dfea160491 ARM: Use PLD (cache preload) in vertex decoder loop. 2013-11-24 15:08:47 +01:00
Henrik Rydgard
f650b23c90 ARM: Add NEON widening and narrowing moves, and float/int convert.
Experiment a little in the vertex decoder.
2013-11-24 13:30:28 +01:00
Sacha
756f651eb2 Buildfix for older compilers, such as GCC 4.6.3 2013-11-22 16:22:41 +10:00
Unknown W. Brackets
70b6a4a796 Small optimization to vertex preview. 2013-11-20 22:36:48 -08:00
Henrik Rydgard
e3d471f590 Fix issues with texturing from render targets with prescaled UV (texcoord speed hack) 2013-11-19 23:38:36 +01:00
Unknown W. Brackets
d2bccfeba5 Omit a few commands from "DL Unknown" in debug. 2013-11-18 07:51:10 -08:00
Unknown W. Brackets
ed16e42ca8 Cleanup, don't even need z here. 2013-11-17 14:49:51 -08:00
Unknown W. Brackets
018d95180a Fix 3d vertex preview. 2013-11-17 14:31:21 -08:00
Unknown W. Brackets
a3bd2f1365 Fix Vec3ByMatrix44() and use it for matrix math. 2013-11-17 14:10:57 -08:00
Unknown W. Brackets
b541c81ba3 Clean up Mat3x3 etc. constness. 2013-11-17 13:27:51 -08:00
Unknown W. Brackets
fcc77f525f Implement some basic vertex previews on prim.
3D doesn't work correctly (sometimes it does...)  2D should be working.
2013-11-17 13:27:50 -08:00
Unknown W. Brackets
ac8edb4282 Support reversed buffer formats in the ge debugger.
So that it doesn't show garbage under the softgpu.
2013-11-17 02:14:34 -08:00
Henrik Rydgård
4cf2b99316 Merge pull request #4529 from raven02/patch-19
Fix Summon Night 5 shadow breaking
2013-11-17 02:09:22 -08:00
Henrik Rydgård
cd511cc43c In Freeze-Frame mode, don't wipe GPU resources when loading save states. 2013-11-15 16:30:55 +01:00
Henrik Rydgård
f1ed1a9a17 Flush the lit pool before flushing the icache. 2013-11-15 11:14:24 +01:00
Henrik Rydgård
bd23f91e0c Flush the lit pool in the vtx dec 2013-11-15 10:34:27 +01:00
raven02
312f290bde Fix typo 2013-11-15 10:24:32 +08:00
Henrik Rydgard
adde016338 vtxdec sw skin arm: Simplify code, try a slightly different approach. 2013-11-14 23:07:23 +01:00
Henrik Rydgard
b0ccf5981c Don't bother with glDrawRangeElements, seems to not improve perf. 2013-11-14 17:33:43 +01:00
Henrik Rydgard
d6d54c8bb4 Fix a couple of bugs in vtxdec 2013-11-14 15:06:51 +01:00
Henrik Rydgard
9521d0e0a6 NormalizeVertices should not try to skin if we've already software-skinned. 2013-11-14 14:34:47 +01:00
Henrik Rydgard
3b63ef7005 Remove the SubmitPrim param forceIndexType, optimize BBOX more. 2013-11-14 14:03:03 +01:00
raven02
8af2e66bd5 This seems to be better 2013-11-14 19:33:20 +08:00
Henrik Rydgard
35ae239eb9 Optimize bbox some more 2013-11-14 12:25:53 +01:00
Henrik Rydgard
4f93654a88 Oops, accidentally enabled some bbox debugging code 2013-11-14 11:49:06 +01:00
Henrik Rydgard
8a69543ec4 BBOX: Transform the planes by the matrix so we don't need to transform the box 2013-11-14 11:44:13 +01:00
Henrik Rydgard
871d8b28ab Assorted vtxdec x86 optimizations 2013-11-14 11:44:13 +01:00
Sacha
eaa52c4a61 VertexDecoder: Aligned code seems to help Symbian (armv6) performance. It is also used for CPU JIT so there's likely a reason. 2013-11-14 15:30:07 +10:00
Henrik Rydgard
ff1d53c9c7 vtxdec x86: Don't load bones unless software skinning is enabled 2013-11-14 00:56:24 +01:00
Henrik Rydgard
a9b365aa71 Fix for possible misalignment crash on x86 2013-11-14 00:37:04 +01:00
Henrik Rydgård
a6ee2648d0 Merge pull request #4531 from hrydgard/software-skinning
Software skinning
2013-11-13 12:54:41 -08:00
Henrik Rydgård
9bbdd1907d Kind-of optimized ARM software skinning (non-NEON) 2013-11-13 18:11:35 +01:00
Henrik Rydgård
821a2f10f8 Delete obsolete code 2013-11-13 18:10:58 +01:00
Henrik Rydgard
6221dbaf5d Optimize software skinning for x86.
Can't seem to get a win on Windows vs hardware skinning though, even though
draw calls drop by 2/3rd...
2013-11-13 18:10:58 +01:00
Henrik Rydgard
9333d3ea76 Vtx dec jit: Combine the scale and offset registers to save 1 more xmm register. 2013-11-13 18:10:58 +01:00
Henrik Rydgard
f0cacf46d0 No reason to involve the FPU when loading matrices 2013-11-13 18:10:58 +01:00
Henrik Rydgard
6976d6a3a0 Enable the softskinning optimizations that let us merge drawcalls 2013-11-13 18:10:57 +01:00
Henrik Rydgard
179934ec9f Decode step by step when sw skinning 2013-11-13 18:10:57 +01:00
Henrik Rydgard
46313ced55 Prepare transform pipeline for step by step decoding 2013-11-13 18:10:57 +01:00
Henrik Rydgard
4f78eda23b Save a couple of registers in the x86 vertex decoder jit by SIMD-ing prescale UV 2013-11-13 18:10:57 +01:00
Henrik Rydgard
7e67476b00 Simple unoptimized software skinning.
Does not take advantage of the possible reduction in state changes yet.
2013-11-13 18:10:57 +01:00
Aapo Rantalainen
c2586523fe Maemo5: added !defined(MAEMO) as !defined(MEEGO_EDITION_HARMATTAN) 2013-11-13 18:23:18 +02:00
raven02
fe15d88cd8 Fix Summon Night 5 shadow breaking 2013-11-13 22:42:16 +08:00
Henrik Rydgård
ab3fe9ba86 Extract the software transform code into its own file. 2013-11-13 14:56:34 +01:00
Henrik Rydgård
67ca4419fe Fix minor bug where we didn't clear dirtyUniforms if early-outing from UpdateUniform. 2013-11-13 10:02:58 +01:00
Sacha
04b338f39e Buildfix for sse2 builds. 2013-11-13 12:08:46 +10:00
Henrik Rydgard
cf15ec8a53 Add BBOX support (very conservative test) 2013-11-12 17:06:03 +01:00
Henrik Rydgard
54217deb16 Speed up UpdateUniforms a little 2013-11-12 17:06:03 +01:00
Henrik Rydgard
4b98e0d6d6 Optimize LoadClut a little 2013-11-12 17:06:03 +01:00
Henrik Rydgard
84f20a1cad Small optimizations 2013-11-12 14:05:50 +01:00
raven02
2bca62b26e Don't reset texture width/height unless the size is different 2013-11-11 21:12:43 +08:00
raven02
d2546bed5b Regression fix c69ac64 2013-11-11 08:53:47 +08:00
Henrik Rydgard
c69ac64d83 Don't reconvert light colors if they don't change.
Also prepare for a possible further optimization in GLES_GPU::FastRunLoop
2013-11-10 11:18:58 +01:00
Henrik Rydgard
f4ad7c64e5 Fix issue with texcoord speed hack (bPrescaleUV) in software transform
(and also thus rectangles of course even when hw transform is enabled)
2013-11-10 11:18:26 +01:00
Henrik Rydgård
179068823c Merge pull request #4491 from raven02/patch-15
Attempt for another matching framebuffer logic
2013-11-10 01:58:29 -08:00
Unknown W. Brackets
1633aa689c Remove the extra process queues hack.
It seems like it's not helping anymore so it could be hurting.
2013-11-09 23:08:44 -08:00
raven02
7c6a4cf87e Attempt for another matching framebuffer logic 2013-11-10 10:38:33 +08:00
Unknown W. Brackets
3f57f1f447 Disable the secondary texcache on mobile.
It helps in games like Final Fantasy 2 and Popolocrois, but it seems to
cause out of memory errors despite the checks.
2013-11-09 12:52:58 -08:00
Henrik Rydgard
63334698e1 Add temporary setting to disable the vertex decoder jit while we debug it 2013-11-09 18:16:26 +01:00
Henrik Rydgård
d04415ac5d Merge pull request #4479 from unknownbrackets/perf
Small optimizations (armjit) for imms
2013-11-08 11:45:16 -08:00
Unknown W. Brackets
385f9a457e Use GetPointerUnchecked in how, pre-checked areas. 2013-11-08 11:39:24 -08:00
Henrik Rydgard
0e542b6ecc vtxdec: small omission 2013-11-08 20:38:49 +01:00
Henrik Rydgard
22d6b36005 Vertexdecoder "double": fix for x86 and very minor optimization for arm. 2013-11-08 20:03:28 +01:00
Henrik Rydgard
6b45c321b6 vtxdecjit: turn off excessive logging 2013-11-08 18:49:17 +01:00
Henrik Rydgard
381b6d0f05 VertexDecoder JIT: Add the last missing ones except morph, I think. 2013-11-08 12:43:46 +01:00
Henrik Rydgard
502cbc170a Revert "Another attempt to sizing framebuffer based on fmt"
This reverts commit c0e8893560.
2013-11-07 15:29:11 +01:00
Henrik Rydgård
c213c44050 Merge pull request #4468 from hrydgard/vtxdec-prescale
Add support for prescaled UV in vertex decoder JIT
2013-11-07 02:51:14 -08:00
Henrik Rydgard
c4e3dd14fd Add commented-out code to save XMM4/XMM5.
According to all calling convention manuals I can find, we don't really
need to preserve them. If they become problematic as mentioned, we can
activate this.
2013-11-07 09:54:58 +01:00
raven02
c0e8893560 Another attempt to sizing framebuffer based on fmt 2013-11-07 10:56:41 +08:00
Henrik Rydgard
64bdb5e21d Tiny optimization (32-bit) in GLES_GPU::FastRunLoop 2013-11-07 01:34:43 +01:00
Henrik Rydgard
b203da05e9 Prescale UV in vtx-dec-jit: Fix bugs, add ARM support 2013-11-07 01:24:53 +01:00
Henrik Rydgård
367bcf6d4f Prescale in the vertex dec jit. Needs debugging. 2013-11-07 01:24:53 +01:00
Unknown W. Brackets
34398b7d0c Avoid literal loads in the arm vertexjit. 2013-11-06 08:45:00 -08:00
Unknown W. Brackets
78400fd460 Avoid some dereferencing in gpu FastRunLoop. 2013-11-06 07:50:16 -08:00
Henrik Rydgård
51995a3d43 Vtx dec: After generating ARM, remember to flush the icache.
Will hopefully fix the random crashes in #4461.
2013-11-06 16:14:40 +01:00
Henrik Rydgård
e3f6f25390 Buildfix for non-Windows non-ARM 2013-11-06 13:54:26 +01:00
Henrik Rydgård
ea9da85bdb Missed one possible unaligned access 2013-11-06 13:14:49 +01:00
Henrik Rydgård
b3fdfc01c8 ARM vtx dec: Avoid all unaligned accesses entirely.
Seeing so much contradictory information on the support and performance
of these.
2013-11-06 12:17:41 +01:00
Henrik Rydgård
1e158fa652 ARM vtx dec: Preserving our FP scratch register appears to improve
stability.

Also added some logging.
2013-11-06 11:47:26 +01:00
Henrik Rydgård
b19d41f9a8 Now that LDRH works, use it where appropriate 2013-11-06 10:51:21 +01:00
Henrik Rydgard
0eb3d79de9 x86 VertexDecoder jit: Fix typo in 16-bit weight decoder. May fix crashes. 2013-11-05 21:06:43 +01:00
Henrik Rydgård
a03e5c6de0 Merge pull request #4460 from hrydgard/vertex-decoder-jit
Vertex decoder JIT
2013-11-05 07:30:58 -08:00
Henrik Rydgård
7bf8a4dc5e We need to use a signed VCVT to float in PosS*Through 2013-11-05 12:17:18 +01:00
Unknown W. Brackets
c7edf73cdb Small optimizations to the vertexjit. 2013-11-05 00:32:08 -08:00
Unknown W. Brackets
f6662054bd Fix arm emitter bug in LDRH and friends. 2013-11-05 00:32:08 -08:00
Henrik Rydgård
9113c584f1 Merge pull request #4399 from raven02/patch-11
Attempt to go back to the earliest logic of finding a matching framebuffer
2013-11-04 04:43:34 -08:00
Henrik Rydgård
5886ccffdc Merge pull request #4441 from unknownbrackets/vertex-decoder-jit
Force 5 byte jumps to avoid jump target issues (vertex jit, x86)
2013-11-04 01:25:40 -08:00
Unknown W. Brackets
06194ac261 Add 5551 conversion to the arm vertexjit. 2013-11-04 00:47:05 -08:00
Unknown W. Brackets
16dcf807a8 Add 565 conversion to arm vertexjit. 2013-11-03 21:58:26 -08:00
Unknown W. Brackets
ab17d659cf Implement 4444 conversion in arm vertexjit.
Seems to help Dissidia a bit.
2013-11-03 21:58:26 -08:00
Unknown W. Brackets
bfda36efff Don't subtract nrmoff in arm vertexjit. 2013-11-03 21:57:55 -08:00
Unknown W. Brackets
a1fa65f631 Stupid typos, broke 4444 and 565. 2013-11-03 18:43:24 -08:00
Unknown W. Brackets
d5337edf1f Force 5 byte jumps to avoid jump target issues.
Some with 16-bit colors were too far.
2013-11-03 17:17:04 -08:00
Unknown W. Brackets
aece4fd580 16-bit colors in vertex jit for x86. 2013-11-03 15:04:47 -08:00
Henrik Rydgard
f0fd7679ce Preliminary ARM vertex decoder JIT. Has a weird issue in PosS16.
Other minor changes and fixes.
2013-11-03 20:15:42 +01:00
Henrik Rydgard
810b1a061f Vertex decoder JIT for x86 and x64. Handles the most common vertex formats. 2013-11-03 15:27:12 +01:00
Unknown W. Brackets
e33b7fa1a4 iOS buildfix. 2013-11-03 01:08:48 -08:00
Henrik Rydgård
e12894a420 Merge pull request #4407 from unknownbrackets/texcache
Add a NEON version of the tex hash.
2013-11-02 07:41:39 -07:00
Henrik Rydgard
58860158df Turn off the UNPACK optimization when texture scaling is on. Fixes #4408 2013-11-02 15:23:35 +01:00
Henrik Rydgård
4d3e57d6eb Move normal reversion into the vertex shader instead of the decoder. 2013-11-02 11:05:31 +01:00
Unknown W. Brackets
4d47ccd5df Add a NEON version of the tex hash.
Should be used only for NEON devices.  Currently only compiled on Android.
2013-11-02 02:09:54 -07:00
Henrik Rydgård
1347c3b019 Merge pull request #4387 from hrydgard/unpack_subimage
Use GL_EXT_unpack_subimage to speed up non-pow-2 texture loads when available
2013-11-01 12:02:50 -07:00
Henrik Rydgard
a3a1395fc0 No need to set PACK parameters when we UNPACK 2013-11-01 19:56:06 +01:00
Henrik Rydgard
1fb7cdfcd2 Remove redundant call to ConvertColors, skip a copy when possible 2013-11-01 19:38:53 +01:00
Henrik Rydgard
5de7bb2e2d Use GL_EXT_unpack_subimage to speed up non-pow-2 texture loads when available 2013-11-01 19:38:52 +01:00
raven02
5b228d5fe4 Attempt to go back to thevery original finding a matching framebuffer logic 2013-11-01 22:00:34 +08:00
Unknown W. Brackets
1ee83935cb Correct texcache alignment check.
Oops.
2013-10-31 23:37:05 -07:00
Unknown W. Brackets
dc8902dbff Cut down on color conversion instructions (x86.) 2013-10-31 23:29:18 -07:00
Unknown W. Brackets
96256f43e9 Make sure clut memory is aligned.
For SSE color conversion, etc.
2013-10-31 23:29:17 -07:00
Unknown W. Brackets
f42cd11ddb Speed up color conversion using SSE.
Probably not the very most optimal implementation, but faster and SSE2.
2013-10-31 23:29:17 -07:00
Unknown W. Brackets
82761de992 Improve the texture cache hash on x86.
It's a bit less weak now, but still not strong.  Still fairly fast, it
seems like.
2013-10-31 23:29:16 -07:00
Henrik Rydgard
b9c908ba3f Update post-processing shaders to work again after removing u_viewproj.
Initialize some uninitialized variables.
2013-10-31 00:07:55 +01:00
Henrik Rydgård
70e4214e2e Add comment with a link to an important github thread 2013-10-30 23:08:03 +01:00
Henrik Rydgård
07a868910e Add a temporary hack option that may help debugging the wipeout glow.
It reduces the glow problem by a lot but is obviously incorrect.
2013-10-30 22:47:36 +01:00
Henrik Rydgård
357b133ff6 No need to dirty the PROJ_THROUGH when only the proj matrix is being
changed.
2013-10-30 22:47:36 +01:00
Henrik Rydgård
7e27bd9dc9 Framebuffer draws: Get rid of the u_viewproj uniform matrix. 2013-10-30 22:47:36 +01:00
danyalzia
950c961dbc Shader Improvements and cleanup
Added sharpen shader

Added support for bloom and sharpen shader

cleanup

cleanup
2013-10-30 00:33:21 +05:00
Henrik Rydgard
78aa64500e Fix bug when combining draw calls for hashing 2013-10-29 16:18:15 +01:00
Henrik Rydgård
60b1cb0008 Combine draw calls when hashing when possible, should help the same games as #4312 2013-10-29 12:14:09 +01:00
Henrik Rydgård
4352d720d8 Let's not use #define in GLSL ES shaders.
There are rumours that Vivante chips hate these.
2013-10-29 11:37:16 +01:00
Henrik Rydgård
0471a8c886 Only set fogdepth to highp on PowerVR. May fix #4333 2013-10-28 15:38:25 +01:00
Unknown W. Brackets
1e65a691f4 Cap the number of vertexes per flush.
Might not be realistic, but we crash if we go over.  Pretty unlikely to
happen in real games, but I suppose not impossible.  Happens in the vertex
speed demo (#3106.)
2013-10-27 14:43:58 -07:00
Sacha
ecfe43c149 CityHash is not used anymore, so we won't compile it. 2013-10-28 03:26:00 +10:00
Sacha
2c74693f6c VSync codepath only works on _WIN32 so only show it and check it there. 2013-10-27 23:09:46 +10:00
Henrik Rydgård
5408a06e6c Merge pull request #4274 from unknownbrackets/fb-minor
Detach framebuffers when texcache match fails, properly
2013-10-27 00:53:44 -07:00
Unknown W. Brackets
30bf067787 Generate a texture name even for fbo textures.
Otherwise, when it stops being a render-to-texture, we won't have a
texture name and we'll get confused.  A texture name shouldn't be
expensive to generate in this case anyway.
2013-10-26 08:37:52 -07:00
Unknown W. Brackets
453be5530e Make sure we recheck a fb tex that didn't match. 2013-10-26 08:35:53 -07:00
Unknown W. Brackets
42f7b42af4 Avoid getting stuck with a bad tex framebuffer. 2013-10-26 08:35:52 -07:00
Unknown W. Brackets
8b64a2c70c Fix unlikely case in DrawPixels().
If linesize doesn't match, also use convBuf.
2013-10-26 08:35:52 -07:00
Henrik Rydgård
1507358b45 Merge pull request #4322 from unknownbrackets/gpu-minor
Make sure frag shader ID matches generated code
2013-10-26 08:28:41 -07:00
Unknown W. Brackets
2c56ccef18 Make sure frag shader ID matches generated code.
Before, we would use an id with alphatest on, but not actually compile in
alphatest.  Or, we would use a shader with alphatest, when we actually
could compile it out.
2013-10-26 02:19:02 -07:00
Unknown W. Brackets
f9352ad0b8 Update fbos even if they're not the display.
But only when coming from a video or other safe source, to ensure we don't
hurt speed.  Although, might be interesting to do it always?

With the previous commit, fixes #4273.
2013-10-26 00:36:37 -07:00
Unknown W. Brackets
7aa70b473b Set the viewport properly on video frame draw.
Fixes #3771, video frames being drawn at the wrong size at non-1x.
2013-10-26 00:32:03 -07:00
Henrik Rydgård
b896a29ec0 New attempt at solving #4272 by not using alpha in the backbuffer.
If some effect ends up requiring destination alpha, just use buffered
rendering.
2013-10-25 12:44:21 +02:00
Unknown W. Brackets
deaaa99763 Exclude 0xFF from logging, happens a lot. 2013-10-24 22:03:10 -07:00
Unknown W. Brackets
ac027fac81 Fix missing uniform for GE_TEXMAP_TEXTURE_MATRIX. 2013-10-24 21:59:44 -07:00
Henrik Rydgård
5705acba04 Cleanup 2013-10-23 16:10:58 +02:00
Sacha
b0d7f758be Remove QCOM binning control detection. Qualcomm suggests not to use it and it causes crashes on my Adrenos anyway. 2013-10-23 15:02:48 +10:00
Sacha
78d6ad6f80 Clean up GLES3init. Pass Blackberry version through to defines. Update QCOM binning comment. 2013-10-23 15:02:48 +10:00
Henrik Rydgard
5d47aabb08 Seems we need high precision for fog on PowerVR. #4287 might be fixed by this. 2013-10-22 19:56:06 +02:00
Henrik Rydgard
726de7086d Fix postprocessing shaders on Tegra 2013-10-22 15:56:07 +02:00
Henrik Rydgard
2292531dd6 Small optimization for Disable Alpha Test - makes sure we don't generate the same shader twice. 2013-10-22 15:15:13 +02:00
Henrik Rydgard
a88ab80477 Only clear the shader cache when toggling "Disable alpha test" 2013-10-22 14:34:16 +02:00
Henrik Rydgard
cae2934c70 Buildfix 2013-10-22 13:40:51 +02:00
Henrik Rydgard
bf59f3db73 Add ugly hack setting for PowerVR to disable alpha test
Causes glitches but the speedup is truly massive in some games so I relent :/

Please do not report graphics bugs when this is enabled...

Future: Maybe remove this setting except on PowerVR?
2013-10-22 13:00:19 +02:00
Henrik Rydgard
7d8aed096a Add proper support for upscaling shaders, add Spline36 upscaling
Spline36 isn't as amazing as I had hoped heh. And it will need work to
work in GLSL ES. Anyway...

This also renames u_texcoordDelta to u_texelDelta to fit in with u_pixelDelta.
2013-10-22 12:18:49 +02:00