Commit Graph

47 Commits

Author SHA1 Message Date
fincs
bbbadebeae
Pause the VBlank counters while the application is suspended 2020-07-06 20:21:03 +02:00
fincs
dcb3aac861
base/renderqueue: Clean up initialization code 2020-05-05 16:57:18 +02:00
fincs
3d566ac8da
Delete long-since obsolete flush functions 2020-05-05 01:06:36 +02:00
fincs
9d51a9445d Gas changes:
- Separate gas reg writes according to stages
- Related: Properly support C3D_GasAccMax
- Add C3D_GasBeginAcc
- Set correct gas depth function matching depth test in C3Di_EffectBind
2018-05-23 13:54:49 +02:00
fincs
ebf41b6436 Make sure framebuffer is flushed/reinitialized before changing program 2018-05-22 21:23:17 +02:00
fincs
81ca5d3575 Begin adding Gas rendering support {incomplete/not fully RE'd} 2018-05-22 16:25:40 +02:00
fincs
10e929d4bb Refactor texenv code in order to allow for stronger type checking 2017-12-01 17:46:14 +01:00
fincs
35d82d95be Add Fog rendering support 2017-04-08 12:46:25 +02:00
fincs
a41dac3e3a Add C3D_EarlyDepthTest() {currently unusable due to glitchy rendering} 2017-04-02 17:14:49 +02:00
fincs
ce1aa48a12 Better detection of the need to reupload vsh/gsh code 2017-04-01 19:25:16 +02:00
fincs
2fc57e99b9 Replace most of the renderqueue logic with GX command queues, details:
- Removed double buffered gpu cmdbuffer (might be added back later)
- Added a global gxCmdQueue which by default is configured to run
  commands as they arrive (in the future it might be double buffered)
- Added C3D_FrameSync for explicitly waiting for "vblank"
- Repurposed C3D_FRAME_SYNCDRAW to perform C3D_FrameSync
- Added C3D_FrameSplit for splitting/submitting the gpu cmdlist in the
  middle of a renderqueue frame
- C3D_RenderTargetSetClear is still supported, however it's unofficially
  deprecated (it's performed after drawing/transferring instead of before
  drawing, which is pretty counter-intuitive)
- C3D_RenderTargetSetOutput is explicitly NOT deprecated since it's
  necessary to avoid screen tearing when transferring to the screen
  framebuffers (this stems from a Nintendo design flaw where screen swap
  processing is done immediately after GX transfers finish)
2017-03-26 20:24:23 +02:00
fincs
1739f88e40 Add support for procedural textures (Texture Unit 3) 2017-03-15 16:49:06 +01:00
fincs
c030f3e70a Use weak symbols instead of function pointers for optional features 2017-03-05 23:28:30 +01:00
fincs
46117ec90a Fix some cases of GPU freezing when changing programs 2017-02-15 00:31:27 +01:00
fincs
ac755aa3ec Add some shadow-related texture functions:
- C3D_TexShadowParams: configure GPUREG_TEXUNIT0_SHADOW
- C3D_TexInitShadow: create shadow map texture
- C3D_TexInitShadowCube: as above, but for shadow cubemaps
2017-02-14 19:40:07 +01:00
fincs
82b9eea410 Refactor GPUREG_TEXUNIT_CONFIG state (in preparation of future changes) 2017-02-14 18:40:58 +01:00
fincs
5c1d037fa2 Introduce framebuffer (light renderbuffer) infrastructure 2017-02-14 18:24:57 +01:00
fincs
15de0e300e Add support for cube textures, see below:
- Added C3D_TexCube structure for holding pointers to all 6 faces
- C3D_TexLoadImage accepts face number and mipmap level
- C3D_TexGenerateMipmap accepts face number
- Added functions (C3D_Tex*GetImagePtr) for accessing image data
- Now using GX to copy texture data to VRAM instead of failing
- Moved texunit setup code to texture.c
2017-02-12 00:14:04 +01:00
fincs
0fd245b171 Begin overhauling texture API, see details:
- Now supports multilevel data (LOD) used for mipmapping
- Basic mipmap generation (currently only for RGBA8 and RGB8 textures)
- Texture type can now be specified (TODO: support cube textures)
- Border color can also be specified now
- More flexibility in texture initialization parameters
2017-02-09 20:07:37 +01:00
fincs
73aea35120 Add bIsZBuffer parameter to C3D_DepthMap 2017-02-09 19:59:31 +01:00
fincs
7a55e4554a Reset attribute configuration on shader program change 2017-02-09 19:58:05 +01:00
Michael Theall
3ae31adab4 Add doxygen support 2017-02-09 19:45:33 +01:00
fincs
b276d8cec2 Fix APT suspend with renderqueues 2016-01-22 00:06:15 +01:00
fincs
184fad0623 Add C3D_GetCmdBufUsage 2016-01-19 22:32:55 +01:00
fincs
39a71a5fbf Implement render queue system 2016-01-05 17:30:05 +01:00
fincs
2692ea5e7d Let libctru manage output attribute clock enable 2015-12-01 13:31:42 +01:00
fincs
43bdd7e339 Adapt to latest GPU register name changes 2015-12-01 13:01:16 +01:00
fincs
1fec391865 Correct C3D_SetScissor 2015-11-26 23:54:06 +01:00
fincs
497a4ff9b7 Add C3D_ColorLogicOp and C3D_FragOpMode 2015-11-25 22:02:16 +01:00
fincs
8992e6fd18 Actually implement fixed vertex attribute support 2015-11-22 17:47:33 +01:00
fincs
dfad81b53c Implement proper shader program DVLE constant management 2015-11-21 01:02:25 +01:00
fincs
ca410a80ac Adapt to latest changes in great-refactor 2015-11-20 17:25:50 +01:00
fincs
bd913bb93e Adapt to latest changes in great-refactor 2015-11-11 21:50:43 +01:00
fincs
6c4836397b Some tweaks in renderbuffer handling 2015-09-20 14:04:50 +02:00
fincs
a0345263df Fragment lighting fixed (!) 2015-09-15 17:50:11 +02:00
fincs
53cf76feac Begin implementing fragment lighting functionality 2015-09-13 23:27:38 +02:00
fincs
b2584cb71a Add some missing TexEnv functionality 2015-09-10 13:47:16 +02:00
fincs
a36f5c49d2 Update GPU register names 2015-09-07 19:31:48 +02:00
fincs
f640360108 Decouple attribute and buffer management 2015-09-07 14:47:20 +02:00
fincs
3e42b1a9a4 Adapt to the great-refactor libctru branch 2015-09-06 22:08:28 +02:00
fincs
a8ce19c3b5 Updates for latest libctru and picasso 2015-08-23 18:54:44 +02:00
fincs
d4971ddca5 Use APT hooks to restore GPU state when returning from homemenu 2015-06-27 19:17:50 +02:00
fincs
153f01e741 Add Render Buffer API + Viewport/Scissor + Update Example 2015-03-07 23:41:32 +01:00
fincs
87d4751a87 C3D_DepthRange() -> C3D_DepthMap() 2015-03-07 17:02:38 +01:00
fincs
a53124d98c Add support for geoshader uniforms 2015-03-05 23:05:14 +01:00
fincs
009afa6ef5 Adapt to new GPU register write style 2015-03-05 17:56:33 +01:00
fincs
e7d0632224 Initial commit 2014-12-20 21:34:19 +01:00