aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/evas/src/modules/engines/psl1ght/rsxutil.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2012-01-04 18:41:13 +1000
committerDavid Walter Seikel2012-01-04 18:41:13 +1000
commitdd7595a3475407a7fa96a97393bae8c5220e8762 (patch)
treee341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/modules/engines/psl1ght/rsxutil.h
parentAdd the skeleton. (diff)
downloadSledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2
SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/evas/src/modules/engines/psl1ght/rsxutil.h')
-rw-r--r--libraries/evas/src/modules/engines/psl1ght/rsxutil.h43
1 files changed, 43 insertions, 0 deletions
diff --git a/libraries/evas/src/modules/engines/psl1ght/rsxutil.h b/libraries/evas/src/modules/engines/psl1ght/rsxutil.h
new file mode 100644
index 0000000..838a751
--- /dev/null
+++ b/libraries/evas/src/modules/engines/psl1ght/rsxutil.h
@@ -0,0 +1,43 @@
1/*
2 * This software is distributed under the terms of the MIT License
3 */
4
5#ifndef __RSXUTIL_H__
6#define __RSXUTIL_H__
7
8#include <rsx/rsx.h>
9#include <ppu-types.h>
10
11#define CB_SIZE 0x100000
12#define HOST_SIZE (32 * 1024 * 1024)
13
14typedef struct
15{
16 int height;
17 int width;
18 int id;
19 uint32_t *ptr;
20 // Internal stuff
21 uint32_t offset;
22} rsxBuffer;
23
24/* Initilize the RSX properly. Returns NULL on error */
25gcmContextData *initScreen(void *host_addr, u32 size);
26/* Block the PPU thread untill the previous flip operation has finished. */
27void waitFlip(void);
28/* Flip a buffer onto the screen. Returns TRUE on success */
29int flipBuffer(gcmContextData *context, s32 buffer);
30/* Create a buffer to draw into and assign it to @id. Returns NULL on error */
31int makeBuffer(rsxBuffer *buffer, u16 width, u16 height, int id);
32/* Copy the contents of a buffer to another buffer */
33int copyBuffer(gcmContextData *context, rsxBuffer *source, rsxBuffer *destination);
34/* Get current screen resolution. returns TRUE on success */
35int getResolution(u16 *width, u16 *height);
36/* Set screen resolution to closest matching and. returns TRUE on success */
37int setResolution(gcmContextData *context, u16 *width, u16 *height);
38/* Initilize the RSX properly. Returns NULL on error */
39void freeScreen(gcmContextData *context);
40/* Flush the RSX pipeline (any commands and wait for flip) */
41void flushRSX(gcmContextData *context);
42
43#endif /* __RSXUTIL_H__ */