summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReiko Asakura2020-09-23 13:03:51 -0400
committerReiko Asakura2020-09-23 13:03:51 -0400
commitefc507147e0beb1ac5b2f046bf8e4d902bca652c (patch)
tree19d92ed113ce6ee627d5042953691c0baac14851
parentAdd SceFios2Kernel (diff)
downloadvds-libraries-efc507147e0beb1ac5b2f046bf8e4d902bca652c.tar.gz
Refactor SceGxmInternal headers
Diffstat (limited to '')
-rw-r--r--include/user/gxm.h18
-rw-r--r--include/user/gxm/context.h82
-rw-r--r--include/user/gxm/init.h53
-rw-r--r--include/user/gxm/internal.h34
-rw-r--r--include/user/gxm/memory.h109
-rw-r--r--include/user/gxm/render_target.h68
-rw-r--r--include/user/gxm/shader_patcher.h81
-rw-r--r--include/user/gxm/sync_object.h95
-rw-r--r--nids/360/SceGxm.yml35
9 files changed, 533 insertions, 42 deletions
diff --git a/include/user/gxm.h b/include/user/gxm.h
new file mode 100644
index 0000000..60f3e11
--- /dev/null
+++ b/include/user/gxm.h
@@ -0,0 +1,18 @@
+#ifndef _DOLCESDK_PSP2_GXM_INTERNAL_H_
+#define _DOLCESDK_PSP2_GXM_INTERNAL_H_
+
+/** @file
+
+ Helper include file that includes all public headers.
+*/
+
+#include <psp2/gxm.h>
+
+#include <psp2/gxm/context_internal.h>
+#include <psp2/gxm/init_internal.h>
+#include <psp2/gxm/memory_internal.h>
+#include <psp2/gxm/render_target_internal.h>
+#include <psp2/gxm/shader_patcher_internal.h>
+#include <psp2/gxm/sync_object_internal.h>
+
+#endif /* _DOLCESDK_PSP2_GXM_INTERNAL_H_ */
diff --git a/include/user/gxm/context.h b/include/user/gxm/context.h
new file mode 100644
index 0000000..06a35fe
--- /dev/null
+++ b/include/user/gxm/context.h
@@ -0,0 +1,82 @@
+#ifndef _DOLCESDK_PSP2_GXM_CONTEXT_INTERNAL_H_
+#define _DOLCESDK_PSP2_GXM_CONTEXT_INTERNAL_H_
+
+/** @file
+*/
+
+#include <psp2/gxm/context.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif // def __cplusplus
+
+/** Updates a YUV color profile. The visibility buffers will be used for all fragment jobs
+ started after this function returns.
+
+ This function is only supported on the immediate context, and it will return the
+ #SCE_GXM_ERROR_INVALID_VALUE error code if called using a deferred context.
+
+ The <c><i>cscIndex</i></c> parameter defines whether the profile being set will be active for
+ textures that use YUV swizzles referencing CSC0 or CSC1.
+
+ The default profile for CSC0 is #SCE_GXM_YUV_PROFILE_BT601_STANDARD, and the default profile for
+ CSC1 is #SCE_GXM_YUV_PROFILE_BT709_STANDARD.
+
+ @param[in,out] immediateContext A pointer to the immediate context.
+ @param[in] cscIndex The CSC index (0 or 1).
+ @param[in] profile The YUV color profile.
+
+ @retval
+ SCE_OK The operation was successful.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed because a parameter was unexpectedly <c>NULL</c>.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed due to an invalid input parameter, or because
+ the context is not an immediate context.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmSetFragmentJobYuvProfile(
+ SceGxmContext *immediateContext,
+ uint32_t cscIndex,
+ SceGxmYuvProfile profile);
+
+/** Updates the visibility buffers. The visibility buffers will be used for all fragment jobs
+ started after this function returns.
+
+ This function is only supported on the immediate context, and it will return the
+ #SCE_GXM_ERROR_INVALID_VALUE error code if called using a deferred context.
+
+ The visibility buffer must be mapped with read/write access for the GPU, or page faults will
+ occur. The mapped region must extend from <c><i>bufferBase</i></c> for #SCE_GXM_GPU_CORE_COUNT times
+ <c><i>stridePerCore</i></c> bytes. In addition, the visibility slot index must be no more than
+ <c><i>stridePerCore</i></c>/4 to ensure that the per-core buffers do not overlap. Both the base
+ address and stride must be aligned to #SCE_GXM_VISIBILITY_ALIGNMENT bytes.
+
+ @param[in,out] immediateContext A pointer to the immediate context.
+ @param[in] bufferBase The base address of the visibility buffer. The address must
+ persist until fragment processing for the current scene has completed.
+ @param[in] stridePerCore The stride between cores through the visibility buffer.
+
+ @retval
+ SCE_OK The operation was successful.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed because a parameter was unexpectedly <c>NULL</c>.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed because the context is not an immediate context.
+ @retval
+ SCE_GXM_ERROR_INVALID_ALIGNMENT The operation failed due to either the base address or
+ stride per core not being aligned to #SCE_GXM_VISIBILITY_ALIGNMENT bytes.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmSetFragmentJobVisibilityBuffer(
+ SceGxmContext *immediateContext,
+ void *bufferBase,
+ uint32_t stridePerCore);
+
+#ifdef __cplusplus
+}
+#endif // def __cplusplus
+
+#endif /* _DOLCESDK_PSP2_GXM_CONTEXT_INTERNAL_H_ */
diff --git a/include/user/gxm/init.h b/include/user/gxm/init.h
new file mode 100644
index 0000000..6739e2a
--- /dev/null
+++ b/include/user/gxm/init.h
@@ -0,0 +1,53 @@
+#ifndef _DOLCESDK_PSP2_GXM_INIT_INTERNAL_H_
+#define _DOLCESDK_PSP2_GXM_INIT_INTERNAL_H_
+
+/** @file
+*/
+
+#include <psp2/gxm/init.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif // def __cplusplus
+
+/** Initializes the libgxm library for shared sync objects.
+
+ Internally this function will prepare this process for rendering, creating
+ the parameter buffer with the given size.
+
+ This function must be called before any other libgxm object is created, such
+ as a context, or sync object.
+
+ @param[in] params A pointer to a populated SceGxmInitializeParams structure.
+
+ @retval
+ SCE_OK The operation completed successfully.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The SceGxmInitializeParams pointer was <c>NULL</c>.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE One or more parameters were invalid.
+ @retval
+ SCE_GXM_ERROR_ALREADY_INITIALIZED The operation failed because libgxm is already initialized.
+ @retval
+ SCE_GXM_ERROR_OUT_OF_MEMORY There was no memory to perform the operation.
+ @retval
+ SCE_GXM_ERROR_DRIVER The operation failed due to a driver error.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmInitializeInternal(const SceGxmInitializeParams *params);
+
+/** Checks if the libgxm library was initialized for shared sync objects.
+
+ @return
+ Returns <c>true</c> if the libgxm library was initialized for shared sync objects; otherwise <c>false</c> is returned.
+
+ @ingroup render
+*/
+bool sceGxmIsInitializedInternal(void);
+
+#ifdef __cplusplus
+}
+#endif // def __cplusplus
+
+#endif /* _DOLCESDK_PSP2_GXM_INIT_INTERNAL_H_ */
diff --git a/include/user/gxm/internal.h b/include/user/gxm/internal.h
deleted file mode 100644
index 1be3fc9..0000000
--- a/include/user/gxm/internal.h
+++ /dev/null
@@ -1,34 +0,0 @@
-#ifndef _DOLCESDK_PSP2_GXM_INTERNAL_H_
-#define _DOLCESDK_PSP2_GXM_INTERNAL_H_
-
-#include <psp2/gxm/error.h>
-#include <psp2/gxm/render_target.h>
-#include <psp2/gxm/types.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-SceGxmErrorCode sceGxmInternalMapVertexUsseMemory(void *base, uint32_t size, uint32_t *offset);
-
-SceGxmErrorCode sceGxmInternalUnmapVertexUsseMemory(void *base);
-
-SceGxmErrorCode sceGxmInternalMapFragmentUsseMemory(void *base, uint32_t size, uint32_t *offset);
-
-SceGxmErrorCode sceGxmInternalUnmapFragmentUsseMemory(void *base);
-
-SceGxmErrorCode sceGxmInternalGetRenderTargetMemSize(
- const SceGxmRenderTargetParams *params,
- uint32_t* driverMemSize);
-
-SceGxmErrorCode sceGxmInternalCreateRenderTarget(
- const SceGxmRenderTargetParams *params,
- SceGxmRenderTarget **renderTarget);
-
-SceBool sceGxmInternalIsInitialized(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif /* _DOLCESDK_PSP2_GXM_INTERNAL_H_ */
diff --git a/include/user/gxm/memory.h b/include/user/gxm/memory.h
new file mode 100644
index 0000000..fb33636
--- /dev/null
+++ b/include/user/gxm/memory.h
@@ -0,0 +1,109 @@
+#ifndef _DOLCESDK_PSP2_GXM_MEMORY_INTERNAL_H_
+#define _DOLCESDK_PSP2_GXM_MEMORY_INTERNAL_H_
+
+/** @file
+
+ Memory mapping API for the GPU.
+*/
+
+#include <psp2/gxm/memory.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif // def __cplusplus
+
+/** Maps memory for vertex USSE code usage. If successful, this mapping
+ operation returns a USSE offset to address the memory as vertex USSE code.
+
+ @param[in] base A 4K-aligned base address of the region to map.
+ @param[in] size A 4K-aligned size in bytes of the region to map. This
+ cannot be greater than 8MB.
+ @param[in] offset A pointer to a 32-bit value to hold the USSE offset.
+
+ @retval
+ SCE_OK The operation was completed successfully.
+ @retval
+ SCE_GXM_ERROR_UNINITIALIZED The operation failed because the library was not initialized.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed because a pointer was invalid.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed because a parameter was invalid.
+ @retval
+ SCE_GXM_ERROR_DRIVER The operation failed due to a driver error.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmMapVertexUsseMemoryInternal(void *base, uint32_t size, uint32_t *offset);
+
+/** Unmaps memory that was previously mapped as vertex USSE code. It is the
+ responsibility of the caller to ensure that the GPU no longer needs this
+ memory for rendering. This could be accomplished by calling #sceGxmFinish()
+ before unmapping.
+
+ @param[in] base The base address of the region to unmap. This must match
+ the base address that was used when mapping the memory
+ using #sceGxmMapVertexUsseMemory().
+
+ @retval
+ SCE_OK The operation was completed successfully.
+ @retval
+ SCE_GXM_ERROR_UNINITIALIZED The operation failed because the library was not initialized.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed because a pointer was invalid.
+ @retval
+ SCE_GXM_ERROR_DRIVER The operation failed due to a driver error.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmUnmapVertexUsseMemoryInternal(void *base);
+
+/** Maps memory for fragment USSE code usage. If successful, this mapping
+ operation returns a USSE offset to address the memory as fragment USSE code.
+
+ @param[in] base A 4K-aligned base address of the region to map.
+ @param[in] size A 4K-aligned size in bytes of the region to map. This
+ cannot be greater than 8MB.
+ @param[in] offset A pointer to a 32-bit value to hold the USSE offset.
+
+ @retval
+ SCE_OK The operation was completed successfully.
+ @retval
+ SCE_GXM_ERROR_UNINITIALIZED The operation failed because the library was not initialized.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed because a pointer was invalid.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed because a parameter was invalid.
+ @retval
+ SCE_GXM_ERROR_DRIVER The operation failed due to a driver error.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmMapFragmentUsseMemoryInternal(void *base, uint32_t size, uint32_t *offset);
+
+/** Unmaps memory that was previously mapped as fragment USSE code. It is the
+ responsibility of the caller to ensure that the GPU no longer needs this
+ memory for rendering. This could be accomplished by calling #sceGxmFinish()
+ before unmapping.
+
+ @param[in] base The base address of the region to unmap. This must match
+ the base address that was used when mapping the memory
+ using #sceGxmMapFragmentUsseMemory().
+
+ @retval
+ SCE_OK The operation was completed successfully.
+ @retval
+ SCE_GXM_ERROR_UNINITIALIZED The operation failed because the library was not initialized.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed because a pointer was invalid.
+ @retval
+ SCE_GXM_ERROR_DRIVER The operation failed due to a driver error.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmUnmapFragmentUsseMemoryInternal(void *base);
+
+#ifdef __cplusplus
+}
+#endif // def __cplusplus
+
+#endif /* _DOLCESDK_PSP2_GXM_MEMORY_INTERNAL_H_ */
diff --git a/include/user/gxm/render_target.h b/include/user/gxm/render_target.h
new file mode 100644
index 0000000..44a38a3
--- /dev/null
+++ b/include/user/gxm/render_target.h
@@ -0,0 +1,68 @@
+#ifndef _DOLCESDK_PSP2_GXM_RENDER_TARGET_INTERNAL_H_
+#define _DOLCESDK_PSP2_GXM_RENDER_TARGET_INTERNAL_H_
+
+/** @file
+*/
+
+#include <psp2/gxm/render_target.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif // def __cplusplus
+
+/** Computes the driver memory size needed for the given set of render
+ target parameters. The memory will be used for render target GPU data structures should
+ be allocated as an uncached LPDDR memblock using <c>sceKernelAllocMemBlock()</c>.
+
+ @param[in] params A pointer to render target parameters.
+ @param[out] driverMemSize A pointer to storage for the driver memory size.
+
+ @retval
+ SCE_OK The operation was completed successfully.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed due to an invalid parameter value.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed due to a <c>NULL</c> pointer.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmGetRenderTargetMemSizeInternal(
+ const SceGxmRenderTargetParams *params,
+ uint32_t* driverMemSize);
+
+/** Creates a render target object. A render target defines the layout for tiled
+ rendering and is needed to start a scene and draw geometry. Render targets
+ should ideally be created at load time, since creating them requires resources
+ from the OS.
+
+ Once the render target is no longer needed, call #sceGxmDestroyRenderTarget()
+ to destroy it.
+
+ @param[in] params The creation parameters for the render target.
+ @param[out] renderTarget A pointer to storage for the render target pointer.
+
+ @retval
+ SCE_OK The operation was successful.
+ @retval
+ SCE_GXM_ERROR_UNINITIALIZED The operation failed as libgxm is not initialized.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed due to an invalid parameter value.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed due to a <c>NULL</c> pointer.
+ @retval
+ SCE_GXM_ERROR_OUT_OF_RENDER_TARGETS The operation failed because the maximum number
+ of render targets have already been created.
+ @retval
+ SCE_GXM_ERROR_DRIVER The operation failed due to a driver error.
+
+ @ingroup render
+*/
+SceGxmErrorCode sceGxmCreateRenderTargetInternal(
+ const SceGxmRenderTargetParams *params,
+ SceGxmRenderTarget **renderTarget);
+
+#ifdef __cplusplus
+}
+#endif // def __cplusplus
+
+#endif /* _DOLCESDK_PSP2_GXM_RENDER_TARGET_INTERNAL_H_ */
diff --git a/include/user/gxm/shader_patcher.h b/include/user/gxm/shader_patcher.h
new file mode 100644
index 0000000..7ae47dd
--- /dev/null
+++ b/include/user/gxm/shader_patcher.h
@@ -0,0 +1,81 @@
+#ifndef _DOLCESDK_PSP2_GXM_SHADER_PATCHER_INTERNAL_H_
+#define _DOLCESDK_PSP2_GXM_SHADER_PATCHER_INTERNAL_H_
+
+/** @file
+*/
+
+#include <psp2/gxm/shader_patcher.h>
+
+#ifdef __cplusplus
+extern "C" {
+#endif // def __cplusplus
+
+/** Finds or creates a final fragment program.
+
+ The fragment program is constructed by appending the shader compiler output
+ with output register conversion and blending code.
+
+ When this program is no longer needed, it should be released by calling
+ #sceGxmShaderPatcherReleaseFragmentProgram(). The caller is responsible for ensuring that
+ the GPU is no longer using this program before it is released.
+
+ Blending/masking is only supported for the output register formats
+ #SCE_GXM_OUTPUT_REGISTER_FORMAT_UCHAR4 or #SCE_GXM_OUTPUT_REGISTER_FORMAT_HALF4.
+ If the <c><i>blendInfo</i></c> structure has an active blend or non-trivial mask when using
+ unsupported output register format, the error code #SCE_GXM_ERROR_UNSUPPORTED
+ will be returned.
+
+ The parameter <c><i>vertexProgram</i></c> is only required to remap texture coordinates. If all
+ vertex programs that will be used with this fragment program write a contiguous range of
+ texture coordinates starting at <c>TEXCOORD0</c> (or do not write texture coordinates), then the
+ <c><i>vertexProgram</i></c> parameter may be <c>NULL</c>. Any vertex program that uses texture coordinates
+ that either start at a non-zero binding (such as <c>TEXCOORD1</c>) or form a non-contiguous range
+ must be explicitly linked by passing the program as the <c><i>vertexProgram</i></c> parameter.
+
+ The parameter <c><i>texcoordMap</i></c> can provide an explicit remapping of texture coordinates.
+
+ @param[in,out] shaderPatcher A pointer to the shader patcher.
+ @param[in] programId The ID for a program registered with this shader patcher.
+ @param[in] outputFormat The format for the fragment program <c>COLOR0</c> output.
+ @param[in] multisampleMode The multisample mode.
+ @param[in] blendInfo A pointer to the blend info structure or <c>NULL</c>. This
+ structure is copied by the function and therefore does not need to
+ persist after the call.
+ @param[in] vertexProgram A pointer to the vertex program or <c>NULL</c>. This
+ structure does not need to persist after the call.
+ @param[in] texcoordMap A pointer to explicit remapping of texture coordinates or <c>NULL</c>.
+ @param[out] fragmentProgram A pointer to storage for a fragment program pointer.
+
+ @retval
+ SCE_OK The operation was successful.
+ @retval
+ SCE_GXM_ERROR_UNSUPPORTED Blending or masking is enabled for an unsupported
+ output register format.
+ @retval
+ SCE_GXM_ERROR_INVALID_POINTER The operation failed because one or more of the pointers supplied was <c>NULL</c>.
+ @retval
+ SCE_GXM_ERROR_INVALID_VALUE The operation failed due to an invalid input parameter.
+ @retval
+ SCE_GXM_ERROR_INVALID_ALIGNMENT The operation failed because some allocated memory did not have the required alignment.
+ @retval
+ SCE_GXM_ERROR_OUT_OF_HOST_MEMORY The operation failed because a host memory allocation failed.
+ @retval
+ SCE_GXM_ERROR_OUT_OF_FRAGMENT_USSE_MEMORY The operation failed because a fragment USSE memory allocation failed.
+
+ @ingroup shaderpatcher
+*/
+SceGxmErrorCode sceGxmShaderPatcherCreateFragmentProgramInternal(
+ SceGxmShaderPatcher *shaderPatcher,
+ SceGxmShaderPatcherId programId,
+ SceGxmOutputRegisterFormat outputFormat,
+ SceGxmMultisampleMode multisampleMode,
+ const SceGxmBlendInfo *blendInfo,
+ const SceGxmProgram *vertexProgram,
+ const uint32_t *texcoordMap,
+ SceGxmFragmentProgram **fragmentProgram);
+
+#ifdef __cplusplus
+}
+#endif // def __cplusplus
+
+#endif /* _DOLCESDK_PSP2_GXM_SHADER_PATCHER_INTERNAL_H_ */
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_ */
diff --git a/nids/360/SceGxm.yml b/nids/360/SceGxm.yml
index 2a68bcc..cedfcf9 100644
--- a/nids/360/SceGxm.yml
+++ b/nids/360/SceGxm.yml
@@ -275,14 +275,33 @@ modules:
SceGxmInternal:
nid: 0x3FE654E6
functions:
- sceGxmInternalCreateRenderTarget: 0xC8A0F04E
- sceGxmInternalGetRenderTargetMemSize: 0x4DD98588
- sceGxmInternalIsInitialized: 0xEC82DB20
- sceGxmInternalMapFragmentUsseMemory: 0xB9391D22
- sceGxmInternalMapVertexUsseMemory: 0x5694B569
- sceGxmInternalUnmapFragmentUsseMemory: 0xC29B9B82
- sceGxmInternalUnmapVertexUsseMemory: 0xD7506735
+ sceGxmCheckMappedMemory: 0x88B424FB
+ sceGxmCreateRenderTargetInternal: 0xC8A0F04E
+ sceGxmGetRenderTargetMemSizeInternal: 0x4DD98588
+ sceGxmIsInitializedInternal: 0xEC82DB20
+ sceGxmMapFragmentUsseMemoryInternal: 0xB9391D22
+ sceGxmMapVertexUsseMemoryInternal: 0x5694B569
+ sceGxmUnmapFragmentUsseMemoryInternal: 0xC29B9B82
+ sceGxmUnmapVertexUsseMemoryInternal: 0xD7506735
+ SceGxmInternalForGles:
+ nid: 0xB5973AAA
+ functions:
+ sceGxmShaderPatcherCreateFragmentProgramInternal: 0x83149CAD
+ SceGxmInternalForTest:
+ nid: 0x171129AF
+ functions:
+ sceGxmAllocDeviceMemLinux: 0xD412F27B
+ sceGxmSetFragmentJobDepthBiasAdjust: 0x46D6C306
+ sceGxmSetFragmentJobSplitThreshold: 0xD352F90A
+ sceGxmSetFragmentJobVisibilityBuffer: 0x1D68FB73
+ sceGxmSetFragmentJobYuvProfile: 0x6E9565D5
+ sceGxmSetVertexJobNearClipMode: 0xC65CED80
+ sceGxmSetVertexJobSplitThreshold: 0x65FF05BC
SceGxmInternalForVsh:
nid: 0xC98AEB79
functions:
- sceGxmVshInitialize: 0xA04F5FAC
+ sceGxmInitializeInternal: 0xA04F5FAC
+ sceGxmSyncObjectCloseShared: 0xBEB4F93D
+ sceGxmSyncObjectCreateShared: 0x2A956594
+ sceGxmSyncObjectDeleteShared: 0x9B8FC52F
+ sceGxmSyncObjectOpenShared: 0xAD3FE572