mirror of
https://github.com/devkitPro/wut.git
synced 2026-03-21 17:34:47 -05:00
gx2: Add GX2AllocateTilingApertureEx and GX2FreeTilingAperture
This commit is contained in:
parent
e47a996a3b
commit
09f04f6162
62
include/gx2/aperture.h
Normal file
62
include/gx2/aperture.h
Normal file
|
|
@ -0,0 +1,62 @@
|
|||
#pragma once
|
||||
#include <wut.h>
|
||||
#include "enum.h"
|
||||
#include "surface.h"
|
||||
|
||||
/**
|
||||
* \defgroup gx2_aperture Aperture
|
||||
* \ingroup gx2
|
||||
* @{
|
||||
*/
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef uint32_t GX2ApertureHandle;
|
||||
|
||||
/**
|
||||
* Allocates a tiling aperture.
|
||||
* This function creates a linear and untiled buffer to read from and write to the surface.
|
||||
* The total size of the buffer will be width * height * bpp.
|
||||
*
|
||||
* \param surface
|
||||
* A pointer to the surface to create the tiling aperture for.
|
||||
*
|
||||
* \param level
|
||||
* The level of the surface to create the tiling aperture for.
|
||||
*
|
||||
* \param depth
|
||||
* The depth of the surface to create the tiling aperture for.
|
||||
*
|
||||
* \param endian
|
||||
* The endian swap mode.
|
||||
*
|
||||
* \param outHandle
|
||||
* A pointer to store the handle for the aperture.
|
||||
*
|
||||
* \param outAddress
|
||||
* A pointer to store the address for the aperture.
|
||||
*/
|
||||
void
|
||||
GX2AllocateTilingApertureEx(GX2Surface *surface,
|
||||
uint32_t level,
|
||||
uint32_t depth,
|
||||
GX2EndianSwapMode endian,
|
||||
GX2ApertureHandle *outHandle,
|
||||
void **outAddress);
|
||||
|
||||
/**
|
||||
* Frees an allocated tiling aperture.
|
||||
*
|
||||
* \param handle
|
||||
* The handle of the tiling aperture which should be freed.
|
||||
*/
|
||||
void
|
||||
GX2FreeTilingAperture(GX2ApertureHandle handle);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
/** @} */
|
||||
|
|
@ -63,6 +63,7 @@
|
|||
#include <coreinit/userconfig.h>
|
||||
#include <dmae/mem.h>
|
||||
#include <dmae/sync.h>
|
||||
#include <gx2/aperture.h>
|
||||
#include <gx2/clear.h>
|
||||
#include <gx2/context.h>
|
||||
#include <gx2/debug.h>
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user