Henrik Rydgard
76acd62e6e
Try to adjust texture size for fbo dimension
2013-02-02 12:37:41 +01:00
Henrik Rydgard
a0c0d6a977
Initial support for texturing from framebuffers.
2013-02-01 00:18:23 +01:00
Henrik Rydgard
02936d5090
Don't use palette addr to build the cache key if the texture doesn't use one.
2013-02-01 00:02:50 +01:00
raven02
d29245d007
Fix viewport resize
2013-01-31 19:19:45 +08:00
Unknown W. Brackets
e8519a8a9b
Walk a pointer in texture reading too.
2013-01-31 00:49:18 -08:00
Unknown W. Brackets
63ef98a994
Use pointer walking and sizeInRAM for texture hash.
2013-01-31 00:30:48 -08:00
Unknown W. Brackets
8bf5189324
Looks like these should be pos/nrm/col.
2013-01-31 00:02:52 -08:00
Unknown W. Brackets
39663a1409
Check RET isn't hit right away for safety.
2013-01-31 00:02:52 -08:00
Henrik Rydgard
64a376516e
Move all the framebuffer management out into its own file.
2013-01-30 21:09:53 +01:00
Henrik Rydgard
3b681d3854
Make GLES_GPU own texturecache
2013-01-30 20:40:26 +01:00
Unknown W. Brackets
c81d296534
Use memcpy also in Step_Color8888().
2013-01-29 08:45:04 -08:00
Unknown W. Brackets
661c7132c4
Don't check that the pc is valid every single op.
2013-01-29 08:19:07 -08:00
Henrik Rydgard
366583d34f
Align some vertex arrays to page size. It's said to possibly be beneficial.
2013-01-29 00:48:13 +01:00
Henrik Rydgard
4f8cdb8370
Delete now-unnecessary (hopefully) sanity check
2013-01-28 19:29:12 +01:00
Henrik Rydgard
4773f20fad
Fix spiky polygon glitches with vertex cache in Dissidia and maybe more.
2013-01-28 19:05:38 +01:00
Henrik Rydgard
d1b3fd0e49
Better window resize handling
2013-01-27 00:15:39 +01:00
Henrik Rydgard
8b180513cb
Assorted GPU cleanup/fixing (fbo, vbo draw type)
2013-01-26 21:39:36 +01:00
Unknown W. Brackets
6e403be006
Skip a double map lookup.
...
Profiler says this was taking extra time. Only saves 0.23%.
2013-01-26 11:36:45 -08:00
Henrik Rydgard
0930b5b587
Typo + warning fix
2013-01-25 19:08:28 +01:00
Henrik Rydgard
8a32779150
Misc GPU stats etc changes
2013-01-25 18:29:14 +01:00
Henrik Rydgard
7a5aa60b3a
Disasm GE_CMD_REVERSENORMAL
2013-01-25 18:29:13 +01:00
raven02
104dfcb6e4
Fix too dark issue in-game
2013-01-25 21:15:56 +08:00
Unknown W. Brackets
81225e0f09
Fix flicker caused by using the wrong fbo.
2013-01-24 21:36:28 -08:00
Henrik Rydgard
b1bbbc44fc
Add enable/disable dithering. Respect chosen framebuffer color depth.
2013-01-23 23:04:09 +01:00
Henrik Rydgard
a7bc2ea120
Clearing FBOs on bind was a bit too aggressive an optimization.
2013-01-23 08:31:29 +01:00
Henrik Rydgard
dbdd461a53
Fix issue with vertex shader IDs. Write the 4th component of packed vectors.
...
The latter makes sure we leave no holes in the CPU writebuffer.
2013-01-22 22:27:03 +01:00
Henrik Rydgard
e04f5156ee
Fix a few graphics issues, optimize shader ID generation (fewer shaders)
2013-01-22 22:03:41 +01:00
Henrik Rydgard
14d26141a5
TextureCache_Invalidate now does a range match instead of just checking if the texture address was in range.
2013-01-22 22:03:39 +01:00
Henrik Rydgard
b30ab91379
GCC fix
2013-01-21 19:19:41 +01:00
Henrik Rydgard
2f0cf82f72
Don't expand normals and positions to floats unless necessary.
...
Fix sign of Z component of position in through mode.
2013-01-21 19:12:46 +01:00
Xele02
77af8f4727
Change cast which break build on linux
2013-01-21 01:25:48 +01:00
Henrik Rydgard
784c191caf
Fix bugs with fog bit in shader IDs
2013-01-21 00:34:37 +01:00
Henrik Rydgard
3b8ea62b05
Cannot cache vertices when morph is enabled.
2013-01-20 22:48:29 +01:00
Henrik Rydgard
e15b580df6
Avoid using an element buffer in more cases.
2013-01-20 22:42:38 +01:00
Henrik Rydgard
d9c9a9102a
Tiled renderers are much faster if we clear FBOs before rendering.
...
Alternatively we could use glDiscardFramebufferEXT but I haven't figured out how to call it.
2013-01-20 22:05:11 +01:00
Henrik Rydgard
611fb3536f
Try to use glDrawArrays in more situations, saving us a buffer. Misc.
2013-01-20 21:52:54 +01:00
Henrik Rydgard
8b4deb93ce
Merge branch 'master' into vertexcache
2013-01-20 19:18:52 +01:00
Henrik Rydgård
b93f974ff1
Merge pull request #423 from raven02/hw
...
Fix alpha blending for HW transform
2013-01-20 08:22:31 -08:00
Henrik Rydgard
1b1a275dcc
GPU "dirty" optimization, wip vertexcache
2013-01-20 13:15:46 +01:00
Henrik Rydgard
04860322f4
Merge branch 'master' into vertexcache
2013-01-20 11:30:11 +01:00
raven02
139932f7a0
Revert color0 to be original
2013-01-20 12:41:47 +08:00
Unknown W. Brackets
140fd171ef
Fix some 64-bit type conversion warnings.
2013-01-19 13:48:20 -08:00
Henrik Rydgard
201e1ea0bc
Vertex caching now works for HW transform + VBO, not including RECTANGLE primitives yet.
2013-01-19 19:22:15 +01:00
Henrik Rydgard
8ff96bbcd8
Defer vertex decoding until flush. Track draw calls so that they can be cached later.
2013-01-19 17:05:50 +01:00
raven02
72286191a1
Fix alpha blending for HW transform
2013-01-15 08:24:04 +08:00
Henrik Rydgard
3931323f5b
Commented out the wrong half of the RotateUVs check...
2013-01-14 21:41:39 +01:00
Henrik Rydgard
7271e3fcd5
Fix fog and stencil buffer clearing. The latter fixes the sky in MotoGP.
2013-01-14 20:44:11 +01:00
Henrik Rydgard
85afa9c036
Always specify all buffers for clearing. Missing one hurst, one extra doesn't.
2013-01-14 20:44:10 +01:00
Henrik Rydgård
21b93d33cd
Merge pull request #405 from raven02/g3d-log
...
Add disable G3D log to option menu , make default false
2013-01-13 08:34:28 -08:00
Henrik Rydgard
590d94da9f
Add basic stencil test functionality, shadows work in Wipeout. update native.
...
This is not the whole story though, the PSP is being tricky by sharing the dest alpha and stencil.
2013-01-12 17:21:07 +01:00
Henrik Rydgard
cf1b5a6911
Try to fix color masking problems.
2013-01-12 14:20:38 +01:00
Henrik Rydgard
60f9da3926
Add support for color masking. Improves the look of Wipeout greatly.
2013-01-12 12:52:00 +01:00
Henrik Rydgard
6c9d28205d
Disable the LoggingDeadline. Uncomment if you want to use it.
2013-01-12 12:52:00 +01:00
raven02
908e4ecabf
Revert AB for HW transform until find a better fix
2013-01-12 08:24:05 +08:00
Henrik Rydgard
5a2fc722f6
VBO buffer rotation. Helps a little on my Nexus S but perf is still bad.
2013-01-11 19:03:16 +01:00
Henrik Rydgard
29e422cbf1
Avoid flicker by not throwing away the last 3 FBOs.
2013-01-11 17:55:26 +01:00
Henrik Rydgard
6ab6045baf
Throw away unused FBOs. This gets rid of extreme slowness of Star Soldier on Nexus S for whatever reason.
2013-01-11 02:00:51 +01:00
Henrik Rydgard
7390f2b5f6
Some realtime profiling stuff. Enable FZ (flush-to-zero) mode.
2013-01-11 00:13:39 +01:00
raven02
4e683911c7
Fix alpha blending for SW transform
2013-01-10 22:21:28 +08:00
raven02
79c9c29251
Fix alpha blending for HW transform
2013-01-10 22:19:06 +08:00
Henrik Rydgard
b6d7127734
VBO should be optional for SW transform too.
2013-01-10 13:08:04 +01:00
Henrik Rydgard
479d1f5111
Draw using VBO. Add option, make default true.
2013-01-10 12:54:36 +01:00
Lewis Robbins
64ee61a150
fixed compiling error
2013-01-10 08:02:55 +00:00
Lewis Robbins
4ae9ead2ce
clean up of GPUCommon
2013-01-09 21:13:09 +00:00
Henrik Rydgard
03eacd1af3
Save 16K.
2013-01-07 13:00:28 +01:00
Henrik Rydgard
2340b66b27
Fix envmapping on hw transform
2013-01-07 10:49:16 +01:00
Henrik Rydgard
62cc953bad
Specify an older GLSL version for compat, we don't use new features anyway because of ES 2.0.
2013-01-07 10:07:00 +01:00
Henrik Rydgard
0183a407dd
Fix RECTANGLE rotation in the other direction too.
2013-01-07 09:52:47 +01:00
KentuckyCompass
a1f35ebe7e
Fix crash from lastShader pointer = 0xcdcdcdcd
2013-01-07 00:21:07 -08:00
Henrik Rydgard
a1bf5a2a10
Save on gl[Enable/Disable]VertexAttribArray calls.
2013-01-06 23:50:05 +01:00
Henrik Rydgard
9363a867e2
Add glViewport to cached gl state. Add a couple of missing VFPU ops.
2013-01-06 23:23:36 +01:00
Henrik Rydgard
7a7c92edeb
Oops (forgot to remove a debug statement).
2013-01-06 18:17:01 +01:00
Henrik Rydgard
26a5bfcd5d
Avoid setting texture filter over and over again.
2013-01-06 17:44:14 +01:00
Henrik Rydgard
88e921b074
Use invalidatecachehint in dcachewritebackinvalidateall too. Count invalidations.
2013-01-06 12:27:01 +01:00
Henrik Rydgard
66a098c863
Some simple optimizations to texturecache
2013-01-06 12:11:47 +01:00
Unknown W. Brackets
adf8c71745
Recheck writebackall'd textures more frequently.
...
Since we're dealing with texture upload speed (time), basing this off
number of times invalidated (also time usually) seems to make sense.
This helps lazy games that just use writebackall and expect their
graphics to update.
2013-01-05 17:24:19 -08:00
Unknown W. Brackets
3861ce0376
Use sceKernelDcacheWritebackAll() as a hint only.
2013-01-05 17:07:19 -08:00
Henrik Rydgard
d8d2246236
Implement sceGeGetMtx and sceGeGetCmd
2013-01-05 19:26:37 +01:00
Henrik Rydgard
835ac23cc4
Flush before some more display list ops
2013-01-05 18:15:28 +01:00
Henrik Rydgard
3e51224d86
Re-enable viewport code. Let me know what it breaks by posting an issue.
2013-01-05 11:50:12 +01:00
Henrik Rydgard
f8ae18a130
"Fix" bezier the old way (puzzle bobble works again at least).
2013-01-04 09:54:19 +01:00
Henrik Rydgard
c3679166e5
Fix flicker in a bunch of games. Fix is a little hacky but okay for 0.5.
2013-01-03 10:19:18 +01:00
Henrik Rydgard
363f158a0a
Just warning fixes
2013-01-02 21:13:21 +01:00
Henrik Rydgard
972e4ea4e4
Warning fixes, prevent a possible (but unlikely) crash
2013-01-02 21:05:00 +01:00
Florent Castelli
0daa4b5881
Merge pull request #306 from raven02/ambient-fix
...
Fix ambient color in SW Transform
2013-01-01 11:25:48 -08:00
raven02
39d3b767d9
Fix ambient color in SW Transform
2013-01-01 23:15:27 +08:00
raven02
55f986428d
Use 2.0 alpha value to match real PSP
2013-01-01 22:00:20 +08:00
raven02
753e9b3b16
Fix SW lighting
2013-01-01 13:44:40 +08:00
Unknown W. Brackets
97bdaf5dd2
Add support for selecting the GE callback per list.
...
Not sure if interrupts are right, but this should be more right.
2012-12-29 15:55:05 -08:00
Unknown W. Brackets
589916fca2
Move GPU state to sceDisplay, reset GPU on load.
2012-12-29 12:49:49 -08:00
Unknown W. Brackets
ea9f0be28a
Save more of the GPU's state, fix a crash.
...
Well, ReapplyGfxState() seems kinda dangerous now...
2012-12-29 11:41:33 -08:00
Henrik Rydgård
e8f1f46962
Merge pull request #280 from Orphis/gpucommon
...
Refactor some NullGPU and GLES common parts into GPUCommon class
2012-12-28 23:15:49 -08:00
Florent Castelli
36a71eafd0
Move InterpretList and ProcessDLQueue to GPUCommon
2012-12-29 03:11:36 +01:00
Florent Castelli
6eec4f5d7f
Move display list management to common GPU class
2012-12-29 03:11:35 +01:00
raven02
b94bcad288
Fall back to original filter logic when filter option is off
2012-12-29 09:48:46 +08:00
Henrik Rydgård
75ce287213
Add more stuff to GeDisasm. Advance index pointer on indexed draws.
2012-12-28 20:54:00 +01:00
Henrik Rydgård
e2cc226d0d
Just some cleanup of GPU code
2012-12-28 20:54:00 +01:00
raven02
e407ec4314
User define linear filtering
2012-12-29 00:39:46 +08:00
Henrik Rydgård
3e8561ab5b
ge: fix bug with indexed primitives
2012-12-27 23:45:06 +01:00
Henrik Rydgård
57b4d658cc
Don't log display lists, instead dump them on demand.
...
Makes it fairly convenient to dump and look at display lists at run time
on non windows platforms. Adding a menu item on Windows should be
trivial.
2012-12-27 23:38:55 +01:00
Henrik Rydgård
750447793e
Clamp colors before fragment shader.
2012-12-27 23:38:54 +01:00
Henrik Rydgård
c1041cfff2
Apparently RECTANGLES shouldn't flip that way.
2012-12-26 09:23:15 +01:00
Henrik Rydgård
1b35964445
Add support for rotated UVs of flipped RECTANGLES. Avoid using indexed
...
draws when unnecessary.
2012-12-26 08:54:33 +01:00
Henrik Rydgård
d95dbca9be
Cleanup GPU init/shutdown a bit
2012-12-25 22:42:19 +01:00
Henrik Rydgård
7c64f9c61e
Tiny optimization - only init the vertex decoder on vertex type change
2012-12-25 22:39:37 +01:00
Henrik Rydgård
9dce8b09a4
Move vertex arrays from globals to heap.
2012-12-25 22:39:37 +01:00
Henrik Rydgård
d21647bbb9
Split code from GLES_GPU to TransformDrawEngine, cleanup
2012-12-25 22:39:37 +01:00
raven02
fb3649ea97
Remove flush()
2012-12-24 21:34:02 +08:00
raven02
6250348f06
Add GE_CMD_TEXBUFWIDTH0 to flush cmd list
2012-12-24 21:33:27 +08:00
Unknown W. Brackets
d378b1c324
Deallocate properly in shutdown, not in init.
2012-12-24 01:41:15 -08:00
Unknown W. Brackets
2dfbc0fec3
Oops, don't need this here after all.
2012-12-24 01:38:29 -08:00
Unknown W. Brackets
2736012719
Cleanup some state on reset in the GPU code.
2012-12-23 23:12:53 -08:00
TMaul
976537d314
3 foats, not 3 bytes....
2012-12-23 21:30:19 +00:00
TMaul
e8f240c1d4
Fix some more possible errors
...
Shadowed var n in MIPSIntVFPU
Possible buffer overflow in vertexdecoder.h
fix valid address checking in sceRtc function
2012-12-23 20:51:05 +00:00
raven02
9af2325be5
Fix massive corrupted graphic in FF Type-0
2012-12-23 22:52:00 +08:00
Henrik Rydgård
0d6cfab61b
Merge pull request #231 from raven02/sceAtrac
...
sceAtrac wrapped and change NOTICE to DEBUG for block transfer.
2012-12-23 02:52:01 -08:00
raven02
b6e865c694
sceAtrac wrapped and change NOTICE to DEBUG for block transfer.
2012-12-23 17:51:55 +08:00
Unknown W. Brackets
88f18b09e9
Revert incorrect warning fix.
2012-12-22 07:24:01 -08:00
Unknown W. Brackets
782d15ad1f
Remove DL flush optimization causing wonky gfx.
2012-12-22 01:50:55 -08:00
Unknown W. Brackets
47e558d9ce
Fix specular causing shader to fail to link.
2012-12-22 01:45:47 -08:00
Henrik Rydgård
b437ea8e9a
Merge pull request #221 from unknownbrackets/warnings
...
Misc. warnings
2012-12-22 00:12:27 -08:00
Unknown W. Brackets
15793fe532
More minor static analysis warning fixes.
2012-12-21 17:00:47 -08:00
Henrik Rydgard
aabbbe9be4
IndexGenerator: fix triangle fans
2012-12-22 00:57:42 +01:00
Henrik Rydgard
8c267b0105
Didn't mean to remove these calls
2012-12-22 00:38:17 +01:00
Henrik Rydgard
bb777f72ca
Merge branch 'multi-draw'
...
Conflicts:
GPU/GLES/DisplayListInterpreter.cpp
GPU/Null/NullGpu.h
2012-12-22 00:25:11 +01:00
Henrik Rydgard
baa640ea02
Two more commands that get to trigger flush
2012-12-22 00:24:04 +01:00
Henrik Rydgard
252845ecb6
Bugfix, remove hack
2012-12-21 23:55:19 +01:00
Henrik Rydgard
e42af096c8
Merge
2012-12-21 23:43:48 +01:00
Henrik Rydgård
069c700e9b
Merge pull request #219 from unknownbrackets/texcache
...
Darn, invalidate the dest not the src
2012-12-21 14:41:19 -08:00
Henrik Rydgard
0769eb4b64
Set gstate_c.textureChanged in a few more places.
2012-12-21 23:40:38 +01:00
Unknown W. Brackets
18fe1d4b19
Darn, invalidate the dest not the src.
2012-12-21 14:21:23 -08:00
Henrik Rydgård
8134a70531
Merge pull request #217 from Orphis/master
...
Fix some warnings (mostly printf errors)
2012-12-21 14:14:27 -08:00
Henrik Rydgård
a0cdf76fd1
Merge pull request #218 from unknownbrackets/texcache
...
Use sceKernelDcache*() to invalidate the texcache
2012-12-21 14:14:10 -08:00
Unknown W. Brackets
6a9a183dd3
Use sceKernelDcache*() to invalidate the texcache.
...
Also in the block transfer code.
2012-12-21 14:10:57 -08:00
Florent Castelli
c33eafd430
Warning fixes
2012-12-21 23:02:35 +01:00
Henrik Rydgard
e26083f702
Merge branch 'master' into multi-draw
...
Conflicts:
GPU/GLES/IndexGenerator.cpp
GPU/GLES/IndexGenerator.h
2012-12-21 22:58:39 +01:00
Henrik Rydgard
ea07c14c4c
Add IndexGenerator.cpp/h which will later be used to combine small draw calls into large indexed draw calls, for better performance.
2012-12-21 22:53:24 +01:00
Henrik Rydgard
6b3ac02dae
Now not flushing at every drawcall by mistake...
2012-12-21 22:52:09 +01:00
Henrik Rydgard
d663e28bde
More work and optimization. Still not quite there.
2012-12-21 21:49:09 +01:00
Henrik Rydgard
3b114eb24a
More work on indexed draws. Not combining yet.
2012-12-21 19:16:17 +01:00
Henrik Rydgard
2e9daa5f89
All drawing is now indexed lists, through IndexGenerator.
2012-12-21 18:46:15 +01:00
Henrik Rydgard
4eeab83389
Add IndexGenerator.cpp/h which will later be used to combine small draw calls into large indexed draw calls, for better performance.
2012-12-21 17:50:22 +01:00
Henrik Rydgard
4c23d668e1
Cleanup and reorganize gpu code a little
2012-12-21 16:50:14 +01:00
Henrik Rydgård
d42245482b
Merge pull request #213 from raven02/ge_cmd
...
Change BBOX JUMP/TEST to DEBUG . This fix massive slowdown when hit them .
2012-12-21 04:00:29 -08:00
Henrik Rydgard
4efb66fdb6
Fix hw transform and audio on android, misc
2012-12-21 12:57:43 +01:00
raven02
ab2f0b89e6
Change to DEBUG for BBOX JUMP/TEST .Fix massive slowdown when hit them .
2012-12-21 19:57:38 +08:00
Henrik Rydgard
9db065a979
add #version to the framebuffer drawing shader for compat
2012-12-21 11:24:38 +01:00
Henrik Rydgard
4bf2e52623
HW transform: Avoid 4x3 matrices for GLES 2.0 compat. Add option to turn hw transform on.
2012-12-21 11:08:54 +01:00
Henrik Rydgard
4d4370232c
Assorted minor cleanup and fixes.
2012-12-21 10:20:22 +01:00
Henrik Rydgard
52cf324e9e
Try to fix "W1" vertex error
2012-12-21 10:19:37 +01:00