Commit Graph

48 Commits

Author SHA1 Message Date
Henrik Rydgård 48a1348352 Move a var for clarity 2023-11-01 21:30:04 -06:00
Henrik Rydgård ee6ffac28e Ignore triangle strips with less than 3 vertices.
Should fix the new issue reported in #18273
2023-11-01 21:28:37 -06:00
Henrik Rydgård c7a3e7bc32 Remove a redundant variable 2023-10-06 16:32:59 +02:00
Henrik Rydgård 92ffef2626 Remove some state from IndexGenerator, fix bugs. Mostly works except vertex cache. 2023-10-03 11:01:37 +02:00
Henrik Rydgård df7bd89b7d Division->shift. since it's a signed integer, gets rid of a cdq instruction. 2023-06-13 11:57:28 +02:00
Henrik Rydgård 0eb3702ecb Then add the early-outs for NEON too. 2023-06-13 11:48:04 +02:00
Henrik Rydgård 9647872a09 Same for NEON, first the refactor... 2023-06-13 11:48:04 +02:00
Henrik Rydgård 77da36c03f SSE addstrip: Add the early-outs. 2023-06-13 11:47:53 +02:00
Henrik Rydgård 39034586a4 SSE: Refactor AddStrip to prepare for early out 2023-06-13 11:45:59 +02:00
Henrik Rydgård 2a2a4a21d9 More cleanup 2020-09-24 10:03:07 +02:00
Henrik Rydgård deedc7a1fe Cleanup 2020-09-24 09:49:28 +02:00
Henrik Rydgård d8ddef150f IndexGenerator::AddStrip: Avoid the fallback by writing a few extra indices if necessary.
Actually a decent boost.
2020-09-24 09:36:39 +02:00
Henrik Rydgård be54050521 Also optimize IndexGenerator::AddStrip for ARM NEON. 2020-09-24 09:24:03 +02:00
Henrik Rydgård df9a5cc0f2 Buildfix 2020-09-24 02:09:39 +02:00
Henrik Rydgård 1a2597a513 SSE-optimize IndexGenerator::AddStrip. Shaves about half a percent from GoW. 2020-09-24 02:03:15 +02:00
Henrik Rydgård ccea07ab94 Merge pull request #13438 from hrydgard/header-cleanup
Some header include cleanup
2020-09-16 13:46:50 +02:00
Henrik Rydgård c1194dcb52 Help the compiler out a little bit in IndexGenerator::AddStrip.
The generated code wasn't good - this helps break long register
dependency chains.

Speed boost is measurable but small on x86, but might be bigger on simpler CPUs.
2020-09-16 09:23:12 +02:00
Henrik Rydgård 1b3413945b Some header include cleanup 2020-09-16 09:20:41 +02:00
Unknown W. Brackets 7b815af331 GPU: Force use of indexes on cull mode flip.
Since we flip in the index, it can't be pure in this case.
2018-11-30 07:22:28 -08:00
Unknown W. Brackets 1517d66d4e GPU: Properly flip cull on simple triangle lists.
Fixes #11601.
2018-11-29 19:03:38 -08:00
zhang wei f2e3476741 triangles 2018-06-05 10:39:40 +08:00
weihuoya 9f6922221d fx 2018-06-03 22:50:35 +08:00
weihuoya d029bbacc7 triangle fan 2018-06-03 22:29:50 +08:00
zhang wei 3419197ee9 flush back cull mode 2018-04-27 21:49:43 +08:00
zhang wei cfc353ee81 handle cull mode by indices, improve performance for GVGNP, refer to #10172 2018-04-27 16:33:35 +08:00
Henrik Rydgård 240e058b3b Some unification in DrawEngine 2017-06-03 18:03:56 +02:00
Henrik Rydgard efa8cfc736 IndexGenerator microoptimization 2017-01-28 12:11:56 +01:00
Unknown W. Brackets 02995ff083 Tiny cleanup to indexgen. 2016-04-10 02:30:33 -07:00
Unknown W. Brackets 1e0051a792 Add support for 32-bit indices.
Not clear how often these are used by games.  Let's find out.
2016-04-10 02:24:58 -07:00
Henrik Rydgard d85dce0c21 Add limited support for newly discovered 32-bit index buffer format (by unknownbrackets)
See https://github.com/hrydgard/pspautotests/pull/184

Will truncate indices past 65536.
2016-04-10 11:03:07 +02: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
Henrik Rydgard 2290a6165e Try to fix glitch reported in #7457 in PHOTOKANO 2015-02-12 11:44:06 +01:00
Henrik Rydgard 96ecb9a160 IndexGenerator: Add back a line that got lost in af46d17b 2015-02-11 21:55:05 +01:00
Peter Tissen 6f2962e0c3 make sure all the counters are increased by the correct value 2015-02-02 22:30:47 +01:00
Peter Tissen 4a150bead7 don't try to access past the number of vertices when drawing rectangles 2015-02-02 22:08:33 +01:00
Unknown W. Brackets 340029f333 Avoid a bad buffer access on GE_PRIM_KEEP_PREVIOUS. 2015-01-17 18:43:01 -08:00
Henrik Rydgard 2cc1bd327a Make the reporting option more prominent. Also move a few options around.
Very minor change in indexgenerator.
2015-01-11 00:12:32 +01:00
Lioncash a962bc5a6c Mark some functions as const 2014-12-07 17:08:13 -05:00
Unknown W. Brackets e0b4aa68d0 Typos. 2014-06-21 12:04:27 -07:00
sum2012 e4b68099e0 Attempt to fix Colin Mcrae Dirt 2 Crash correctly
#4482
2013-11-10 08:23:31 +08:00
Henrik Rydgard 497915141b Revert to normal for loop in the index generator, the < 3 case gets taken care of properly. Just existing caused some issues. 2013-11-09 19:33:40 +01:00
sum2012 886fcdd0b1 Fix Colin Mcrae Dirt 2 Crash
#4482
2013-11-10 02:23:22 +08:00
Henrik Rydgard 9a51d25279 Minor optimization in IndexGenerator::AddStrip. 2013-11-08 12:43:47 +01:00
Unknown W. Brackets e435b81281 Optimize IndexGenerator::AddPrim() funcs for MSVC.
Reduces profile from ~5.4% to ~1.6% (with vertex cache off) in
Senjou no Valkyria 3.  Similar to the TranslatePrim() funcs.
2013-11-04 22:49:28 -08:00
Henrik Rydgard cd57e8a09d Forgot that you should never walk arrays with member variables, throws off the MSVC optimizer (probably a pointer aliasing issue) 2013-10-07 21:35:22 +02:00
Henrik Rydgard 4751dd631c Some more IndexGenerator optimization just for kicks 2013-10-07 21:13:52 +02:00
Henrik Rydgard af46d17b94 Optimize index generator 2013-10-07 20:15:00 +02:00
Henrik Rydgard cc6681cd0b Compile Ced's DX9 GPU on Windows. Not hooked up yet.
This needs work, has several problems that must be fixed to run on Windows.

Ced, you'll have to fix up your xb project file a bit, sorry.
2013-09-15 12:52:44 +02:00