summaryrefslogtreecommitdiff
path: root/include/user/gxm/sync_object.h
diff options
context:
space:
mode:
authorReiko Asakura2020-09-23 13:03:51 -0400
committerReiko Asakura2020-09-23 13:03:51 -0400
commitefc507147e0beb1ac5b2f046bf8e4d902bca652c (patch)
tree19d92ed113ce6ee627d5042953691c0baac14851 /include/user/gxm/sync_object.h
parentAdd SceFios2Kernel (diff)
downloadvds-libraries-efc507147e0beb1ac5b2f046bf8e4d902bca652c.tar.gz
Refactor SceGxmInternal headers
Diffstat (limited to '')
-rw-r--r--include/user/gxm/sync_object.h95
1 files changed, 95 insertions, 0 deletions
diff --git a/include/user/gxm/sync_object.h b/include/user/gxm/sync_object.h
new file mode 100644
index 0000000..811560c
--- /dev/null
+++ b/include/user/gxm/sync_object.h
@@ -0,0 +1,95 @@
+#ifndef _DOLCESDK_PSP2_GXM_SYNC_OBJECT_INTERNAL_H_
+#define _DOLCESDK_PSP2_GXM_SYNC_OBJECT_INTERNAL_H_
+
+/** @file
+*/
+
+#include <psp2/gxm/sync_object.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif // def __cplusplus
+
+/** Creates a shared sync object. Currently sync objects are used purely to
+ synchronize rendering with display operations in the display queue.
+
+ @param[in] key The key for the shared sync object.
+ @param[out] syncObject A pointer to storage for a sync object pointer.
+
+ @retval
+ SCE_OK The operation was completed successfully.
+ @retval
+ SCE_GXM_ERROR_UNINITIALIZED The operation failed as libgxm is not initialized, or not initialized to allow shared sync objects.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed as the <c><i>key</i></c> parameter was 0.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed as the sync object pointer was <c>NULL</c>.
+ @retval
+ SCE_GXM_ERROR_DRIVER The operation failed due to a driver error.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmSyncObjectCreateShared(uint32_t key, SceGxmSyncObject **syncObject);
+
+/** Deletes a shared sync object.
+
+ @param[in] key The key for the shared sync object.
+
+ @retval
+ SCE_OK The operation was completed successfully.
+ @retval
+ SCE_GXM_ERROR_UNINITIALIZED The operation failed as libgxm is not initialized.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed as the <c><i>key</i></c> parameter was 0.
+ @retval
+ SCE_GXM_ERROR_DRIVER The operation failed due to a driver error.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmSyncObjectDeleteShared(uint32_t key);
+
+/** Opens a shared sync object.
+
+ @param[in] key The key for the shared sync object.
+ @param[out] syncObject A pointer to storage for a sync object pointer.
+
+ @retval
+ SCE_OK The operation was completed successfully.
+ @retval
+ SCE_GXM_ERROR_UNINITIALIZED The operation failed as libgxm is not initialized, or not initialized to allow shared sync objects.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed as the <c><i>key</i></c> parameter was 0.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed as the sync object pointer was <c>NULL</c>, or the <c><i>key</i></c> parameter was invalid.
+ @retval
+ SCE_GXM_ERROR_DRIVER The operation failed due to a driver error.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmSyncObjectOpenShared(uint32_t key, SceGxmSyncObject **syncObject);
+
+/** Closes a shared sync object.
+
+ @param[in] key The key for the shared sync object.
+ @param[in,out] syncObject A sync object pointer.
+
+ @retval
+ SCE_OK The operation was completed successfully.
+ @retval
+ SCE_GXM_ERROR_UNINITIALIZED The operation failed as libgxm is not initialized.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed as the <c><i>key</i></c> parameter was 0.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed as the sync object pointer was <c>NULL</c>.
+ @retval
+ SCE_GXM_ERROR_DRIVER The operation failed due to a driver error.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmSyncObjectCloseShared(uint32_t key, SceGxmSyncObject *syncObject);
+
+#ifdef __cplusplus
+}
+#endif // def __cplusplus
+
+#endif /* _DOLCESDK_PSP2_GXM_SYNC_OBJECT_INTERNAL_H_ */