2022-05-27 11:57:55 +02:00
|
|
|
#ifndef __VHEX_DISPLAY_STACK__
|
|
|
|
# define __VHEX_DISPLAY_STACK__
|
|
|
|
|
|
|
|
#include <vhex/display/shader.h>
|
|
|
|
#include <vhex/display/types.h>
|
|
|
|
|
2022-06-20 16:29:28 +02:00
|
|
|
|
2022-05-27 11:57:55 +02:00
|
|
|
/* dstack_call - dstack indirect call (same as dshader) */
|
|
|
|
struct dstack_call {
|
2022-08-25 08:43:15 +02:00
|
|
|
void (*routine)(dsurface_t *surface, uintptr_t *draw_args);
|
|
|
|
uintptr_t args[12];
|
2022-05-27 11:57:55 +02:00
|
|
|
};
|
|
|
|
typedef struct dstack_call dstack_call_t;
|
|
|
|
|
|
|
|
/* dstack_action - dstack drawing action information */
|
|
|
|
struct dstack_action {
|
|
|
|
struct dstack_call call;
|
|
|
|
struct {
|
|
|
|
dshader_call_t *table;
|
|
|
|
int number;
|
|
|
|
int idx;
|
|
|
|
} shader;
|
2022-08-25 08:43:15 +02:00
|
|
|
void (*quit)(uintptr_t *arg);
|
2022-05-27 11:57:55 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
/* DSTACK_CALL - display indirect call */
|
VxKernel 0.6.0-13 : Add keyboard API + update timer API
@add
<> include/vhex/driver/mpu/sh/sh7305/keysc
| add internal driver primitives
<> include/vhex/driver/mpu/sh/sh7305/tmu
| add internal driver primitives
<> include/vhex/keyboard
| add getkey* (high-level) API
| add key event API
| add key status API
| add keycode information
| add keyboard driver interface
@update
<> include/vhex/driver
| add KEYBOARD driver flags
<> include/vhex/keyboard
| isolate each part of the keyboard module
| link the keycache part with the driver-provided keycache information
<> src/drivers/mpu/sh/sh7305/keysc
| use the new keycache API (high-level interrupt handler)
| update keycache API
| link the new API in the driver device
<> src/drivers/mpu/sh/sh7305/tmu
| add timer reservation (WIP)
| use a "reservation" cache to known which timer is free instead of hardware
| rename internal functions
<> src/module/display
| Now, by default, DSTACK_CALL() create a pointer on a dstack_call_t
| use dsubimage dstack primitive in dimage()
@fix
<> board/fxcg50/fxcg50.ld
| remove the IL-memory and allow only the X-memory area. This because the
bootloader uses the IL-memory for DMA transfer and other "low-level"
routine used by Gint.
Moreover, I originally try to move each "display-driver" in this place,
but after some profiling and tests, the dclear()/dupdate() combo went from
9155us up to 33250us (for many reason). So, I keep this area free, but I
moved-back from RAM display routines.
<> board/fxcg50/initialize
| remove "section" copy. This role has been delegated to the bootload (vxBoot)
because, in the final ELF file generated by GCC, many relocalization
information for the IL/X memory has been set and the bootloader cannot
performs general relocalization.
So, all "special section/memory" displacement has been moved in the
bootloader and we don't have to worrying about the section copy.
<> src/drivers/mpu/sh/sh7305/tmu
| fix delay calculation in timer reload primitive
| disable interruption for profiling timer
<> src/module/dislay/
| fix shader index used during the dstack_render()
| fix many errors in dimage() shadow render (WIP)
2022-06-24 15:33:36 +02:00
|
|
|
#define DSTACK_CALL(fct, ...) (dstack_call_t*)&(dstack_call_t){ \
|
2022-05-28 21:55:48 +02:00
|
|
|
.routine = fct, \
|
2022-05-27 11:57:55 +02:00
|
|
|
.args = { __VA_ARGS__ } \
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//---
|
|
|
|
// Display stack API
|
|
|
|
//---
|
|
|
|
|
|
|
|
/* dstack_init() : Initialise the draw stack (should not be involved) */
|
2022-06-20 16:29:28 +02:00
|
|
|
extern int dstack_init(void);
|
2022-05-27 11:57:55 +02:00
|
|
|
|
|
|
|
/* dstack_add_action() : add a new action in the draw stack */
|
2022-05-28 21:55:48 +02:00
|
|
|
extern did_t dstack_add_action(
|
|
|
|
dstack_call_t *call,
|
|
|
|
dshader_call_t *shaders,
|
2022-08-25 08:43:15 +02:00
|
|
|
void (*quit)(uintptr_t *args)
|
2022-05-28 21:55:48 +02:00
|
|
|
);
|
2022-05-27 11:57:55 +02:00
|
|
|
|
2022-06-21 18:43:11 +02:00
|
|
|
/* dstack_add_shader() : add shader on particular action */
|
|
|
|
extern int dstack_add_shader(did_t did, dshader_call_t *call);
|
2022-05-27 11:57:55 +02:00
|
|
|
|
|
|
|
/* dstack_render(): render a frame */
|
|
|
|
extern void dstack_render(void);
|
|
|
|
|
|
|
|
/* dstack_invalidate() : Invalidate the draw stack (reset) */
|
|
|
|
extern int dstack_invalidate(void);
|
|
|
|
|
2022-05-28 21:55:48 +02:00
|
|
|
/* dstack_display_width() : return the display width */
|
|
|
|
extern size_t dstack_display_width(void);
|
|
|
|
|
|
|
|
/* dstack_display_height() : return the display height */
|
|
|
|
extern size_t dstack_display_height(void);
|
|
|
|
|
2022-05-27 11:57:55 +02:00
|
|
|
/* dstack_quit() : Uninit the draw stack */
|
|
|
|
extern int dstack_quit(void);
|
|
|
|
|
|
|
|
|
|
|
|
#endif /* __VHEX_DISPLAY_STACK__ */
|