Difference between revisions of "GSPGPU:SetBufferSwap"

From 3dbrew
Jump to navigation Jump to search
(Created page with "=Request= {| class="wikitable" border="1" |- ! Index Word ! Description |- | 0 | Header code [0x00050200] |- | 1 | Screen ID: 0=main, 1=sub |- | 2 | Active framebuffer: 0=first...")
 
Line 11: Line 11:
 
| Screen ID: 0=main, 1=sub
 
| Screen ID: 0=main, 1=sub
 
|-
 
|-
| 2
+
| 2-7
| Active framebuffer: 0=first, 1=second
+
| Framebuffer info structure
 +
|}
 +
 
 +
=Response=
 +
{| class="wikitable" border="1"
 
|-
 
|-
| 3
+
!  Index Word
| [[LCD#Framebuffers|Framebuffer]] virtual address, for the main screen this is the 3D left framebuffer
+
!  Description
 
|-
 
|-
| 4
+
| 0
| For the main screen: 3D right framebuffer address
+
| Header code
 
|-
 
|-
| 5
+
| 1
| Value for [[LCD|0x1EF00X90]], controls framebuffer width
+
| Result code
|-
 
| 6
 
| ?
 
|-
 
| 7
 
| Value for [[LCD|0x1EF00X78]], controls which framebuffer is displayed
 
 
|}
 
|}
  
=Response=
+
=Framebuffer info structure=
 
{| class="wikitable" border="1"
 
{| class="wikitable" border="1"
 
|-
 
|-
Line 37: Line 35:
 
|-
 
|-
 
| 0
 
| 0
| Header code
+
| Active framebuffer: 0=first, 1=second
 
|-
 
|-
 
| 1
 
| 1
| Result code
+
| [[LCD#Framebuffers|Framebuffer]] virtual address, for the main screen this is the 3D left framebuffer
 +
|-
 +
| 2
 +
| For the main screen: 3D right framebuffer address
 +
|-
 +
| 3
 +
| Value for [[LCD|0x1EF00X90]], controls framebuffer width
 +
|-
 +
| 4
 +
| ?
 +
|-
 +
| 5
 +
| Value for [[LCD|0x1EF00X78]], controls which framebuffer is displayed
 +
|-
 +
| 6
 +
| ?
 
|}
 
|}
  
 
=Description=
 
=Description=
This sets GSP state for the LCD framebuffers, and other state as well. When the value of [[LCD]] register 0x1EF00X54 is >0x54, the GSP state for the specified screenID is immediately written to the LCD registers.
+
This sets GSP state for the LCD framebuffers, and other state as well. When the value of [[LCD]] register 0x1EF00X54 is >0x54, the GSP state for the specified screenID is immediately written to the LCD registers. This command should only be used when directly writing to the framebuffers, otherwise when rendering to the framebuffers with the [[GPU]] the framebuffer info stored in [[GSP_Shared_Memory|GSP shared memory]] should be used instead.

Revision as of 18:40, 7 February 2013

Request

Index Word Description
0 Header code [0x00050200]
1 Screen ID: 0=main, 1=sub
2-7 Framebuffer info structure

Response

Index Word Description
0 Header code
1 Result code

Framebuffer info structure

Index Word Description
0 Active framebuffer: 0=first, 1=second
1 Framebuffer virtual address, for the main screen this is the 3D left framebuffer
2 For the main screen: 3D right framebuffer address
3 Value for 0x1EF00X90, controls framebuffer width
4 ?
5 Value for 0x1EF00X78, controls which framebuffer is displayed
6 ?

Description

This sets GSP state for the LCD framebuffers, and other state as well. When the value of LCD register 0x1EF00X54 is >0x54, the GSP state for the specified screenID is immediately written to the LCD registers. This command should only be used when directly writing to the framebuffers, otherwise when rendering to the framebuffers with the GPU the framebuffer info stored in GSP shared memory should be used instead.