mirror of
https://github.com/RPCS3/rpcs3.git
synced 2024-11-23 19:22:48 +01:00
Merge remote-tracking branch 'upstream/master' into Things
This commit is contained in:
commit
948758f758
93
GL/glext.h
93
GL/glext.h
@ -33,7 +33,7 @@ extern "C" {
|
||||
** used to make the header, and the header can be found at
|
||||
** http://www.opengl.org/registry/
|
||||
**
|
||||
** Khronos $Revision: 28798 $ on $Date: 2014-10-30 03:27:48 -0700 (Thu, 30 Oct 2014) $
|
||||
** Khronos $Revision: 29735 $ on $Date: 2015-02-02 19:00:01 -0800 (Mon, 02 Feb 2015) $
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
@ -53,7 +53,7 @@ extern "C" {
|
||||
#define GLAPI extern
|
||||
#endif
|
||||
|
||||
#define GL_GLEXT_VERSION 20141030
|
||||
#define GL_GLEXT_VERSION 20150202
|
||||
|
||||
/* Generated C header for:
|
||||
* API: gl
|
||||
@ -2594,7 +2594,6 @@ GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLui
|
||||
#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA
|
||||
#define GL_TEXTURE_TARGET 0x1006
|
||||
#define GL_QUERY_TARGET 0x82EA
|
||||
#define GL_TEXTURE_BINDING 0x82EB
|
||||
#define GL_GUILTY_CONTEXT_RESET 0x8253
|
||||
#define GL_INNOCENT_CONTEXT_RESET 0x8254
|
||||
#define GL_UNKNOWN_CONTEXT_RESET 0x8255
|
||||
@ -2607,25 +2606,25 @@ GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLui
|
||||
typedef void (APIENTRYP PFNGLCLIPCONTROLPROC) (GLenum origin, GLenum depth);
|
||||
typedef void (APIENTRYP PFNGLCREATETRANSFORMFEEDBACKSPROC) (GLsizei n, GLuint *ids);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERBASEPROC) (GLuint xfb, GLuint index, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size);
|
||||
typedef void (APIENTRYP PFNGLTRANSFORMFEEDBACKBUFFERRANGEPROC) (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKIVPROC) (GLuint xfb, GLenum pname, GLint *param);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint *param);
|
||||
typedef void (APIENTRYP PFNGLGETTRANSFORMFEEDBACKI64_VPROC) (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
|
||||
typedef void (APIENTRYP PFNGLCREATEBUFFERSPROC) (GLsizei n, GLuint *buffers);
|
||||
typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizei size, const void *data, GLbitfield flags);
|
||||
typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizei size, const void *data, GLenum usage);
|
||||
typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizei size, const void *data);
|
||||
typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size);
|
||||
typedef void (APIENTRYP PFNGLNAMEDBUFFERSTORAGEPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
|
||||
typedef void (APIENTRYP PFNGLNAMEDBUFFERDATAPROC) (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
|
||||
typedef void (APIENTRYP PFNGLNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
typedef void (APIENTRYP PFNGLCOPYNAMEDBUFFERSUBDATAPROC) (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERDATAPROC) (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
|
||||
typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data);
|
||||
typedef void (APIENTRYP PFNGLCLEARNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
|
||||
typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERPROC) (GLuint buffer, GLenum access);
|
||||
typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access);
|
||||
typedef void *(APIENTRYP PFNGLMAPNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer);
|
||||
typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizei length);
|
||||
typedef void (APIENTRYP PFNGLFLUSHMAPPEDNAMEDBUFFERRANGEPROC) (GLuint buffer, GLintptr offset, GLsizeiptr length);
|
||||
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERIVPROC) (GLuint buffer, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPARAMETERI64VPROC) (GLuint buffer, GLenum pname, GLint64 *params);
|
||||
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERPOINTERVPROC) (GLuint buffer, GLenum pname, void **params);
|
||||
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizei size, void *data);
|
||||
typedef void (APIENTRYP PFNGLGETNAMEDBUFFERSUBDATAPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
|
||||
typedef void (APIENTRYP PFNGLCREATEFRAMEBUFFERSPROC) (GLsizei n, GLuint *framebuffers);
|
||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERRENDERBUFFERPROC) (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERPARAMETERIPROC) (GLuint framebuffer, GLenum pname, GLint param);
|
||||
@ -2650,7 +2649,7 @@ typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint re
|
||||
typedef void (APIENTRYP PFNGLGETNAMEDRENDERBUFFERPARAMETERIVPROC) (GLuint renderbuffer, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLCREATETEXTURESPROC) (GLenum target, GLsizei n, GLuint *textures);
|
||||
typedef void (APIENTRYP PFNGLTEXTUREBUFFERPROC) (GLuint texture, GLenum internalformat, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size);
|
||||
typedef void (APIENTRYP PFNGLTEXTUREBUFFERRANGEPROC) (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
typedef void (APIENTRYP PFNGLTEXTURESTORAGE1DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DPROC) (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
@ -2730,25 +2729,25 @@ typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void);
|
||||
GLAPI void APIENTRY glClipControl (GLenum origin, GLenum depth);
|
||||
GLAPI void APIENTRY glCreateTransformFeedbacks (GLsizei n, GLuint *ids);
|
||||
GLAPI void APIENTRY glTransformFeedbackBufferBase (GLuint xfb, GLuint index, GLuint buffer);
|
||||
GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizei size);
|
||||
GLAPI void APIENTRY glTransformFeedbackBufferRange (GLuint xfb, GLuint index, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
GLAPI void APIENTRY glGetTransformFeedbackiv (GLuint xfb, GLenum pname, GLint *param);
|
||||
GLAPI void APIENTRY glGetTransformFeedbacki_v (GLuint xfb, GLenum pname, GLuint index, GLint *param);
|
||||
GLAPI void APIENTRY glGetTransformFeedbacki64_v (GLuint xfb, GLenum pname, GLuint index, GLint64 *param);
|
||||
GLAPI void APIENTRY glCreateBuffers (GLsizei n, GLuint *buffers);
|
||||
GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizei size, const void *data, GLbitfield flags);
|
||||
GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizei size, const void *data, GLenum usage);
|
||||
GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizei size, const void *data);
|
||||
GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizei size);
|
||||
GLAPI void APIENTRY glNamedBufferStorage (GLuint buffer, GLsizeiptr size, const void *data, GLbitfield flags);
|
||||
GLAPI void APIENTRY glNamedBufferData (GLuint buffer, GLsizeiptr size, const void *data, GLenum usage);
|
||||
GLAPI void APIENTRY glNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, const void *data);
|
||||
GLAPI void APIENTRY glCopyNamedBufferSubData (GLuint readBuffer, GLuint writeBuffer, GLintptr readOffset, GLintptr writeOffset, GLsizeiptr size);
|
||||
GLAPI void APIENTRY glClearNamedBufferData (GLuint buffer, GLenum internalformat, GLenum format, GLenum type, const void *data);
|
||||
GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizei size, GLenum format, GLenum type, const void *data);
|
||||
GLAPI void APIENTRY glClearNamedBufferSubData (GLuint buffer, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
|
||||
GLAPI void *APIENTRY glMapNamedBuffer (GLuint buffer, GLenum access);
|
||||
GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizei length, GLbitfield access);
|
||||
GLAPI void *APIENTRY glMapNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length, GLbitfield access);
|
||||
GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer);
|
||||
GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizei length);
|
||||
GLAPI void APIENTRY glFlushMappedNamedBufferRange (GLuint buffer, GLintptr offset, GLsizeiptr length);
|
||||
GLAPI void APIENTRY glGetNamedBufferParameteriv (GLuint buffer, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetNamedBufferParameteri64v (GLuint buffer, GLenum pname, GLint64 *params);
|
||||
GLAPI void APIENTRY glGetNamedBufferPointerv (GLuint buffer, GLenum pname, void **params);
|
||||
GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizei size, void *data);
|
||||
GLAPI void APIENTRY glGetNamedBufferSubData (GLuint buffer, GLintptr offset, GLsizeiptr size, void *data);
|
||||
GLAPI void APIENTRY glCreateFramebuffers (GLsizei n, GLuint *framebuffers);
|
||||
GLAPI void APIENTRY glNamedFramebufferRenderbuffer (GLuint framebuffer, GLenum attachment, GLenum renderbuffertarget, GLuint renderbuffer);
|
||||
GLAPI void APIENTRY glNamedFramebufferParameteri (GLuint framebuffer, GLenum pname, GLint param);
|
||||
@ -2773,7 +2772,7 @@ GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer,
|
||||
GLAPI void APIENTRY glGetNamedRenderbufferParameteriv (GLuint renderbuffer, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glCreateTextures (GLenum target, GLsizei n, GLuint *textures);
|
||||
GLAPI void APIENTRY glTextureBuffer (GLuint texture, GLenum internalformat, GLuint buffer);
|
||||
GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizei size);
|
||||
GLAPI void APIENTRY glTextureBufferRange (GLuint texture, GLenum internalformat, GLuint buffer, GLintptr offset, GLsizeiptr size);
|
||||
GLAPI void APIENTRY glTextureStorage1D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width);
|
||||
GLAPI void APIENTRY glTextureStorage2D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glTextureStorage3D (GLuint texture, GLsizei levels, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth);
|
||||
@ -9554,13 +9553,11 @@ GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindi
|
||||
#define GL_SKIP_MISSING_GLYPH_NV 0x90A9
|
||||
#define GL_USE_MISSING_GLYPH_NV 0x90AA
|
||||
#define GL_PATH_ERROR_POSITION_NV 0x90AB
|
||||
#define GL_PATH_FOG_GEN_MODE_NV 0x90AC
|
||||
#define GL_ACCUM_ADJACENT_PAIRS_NV 0x90AD
|
||||
#define GL_ADJACENT_PAIRS_NV 0x90AE
|
||||
#define GL_FIRST_TO_REST_NV 0x90AF
|
||||
#define GL_PATH_GEN_MODE_NV 0x90B0
|
||||
#define GL_PATH_GEN_COEFF_NV 0x90B1
|
||||
#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
|
||||
#define GL_PATH_GEN_COMPONENTS_NV 0x90B3
|
||||
#define GL_PATH_STENCIL_FUNC_NV 0x90B7
|
||||
#define GL_PATH_STENCIL_REF_NV 0x90B8
|
||||
@ -9629,8 +9626,6 @@ GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindi
|
||||
#define GL_FONT_UNDERLINE_POSITION_BIT_NV 0x04000000
|
||||
#define GL_FONT_UNDERLINE_THICKNESS_BIT_NV 0x08000000
|
||||
#define GL_FONT_HAS_KERNING_BIT_NV 0x10000000
|
||||
#define GL_PRIMARY_COLOR_NV 0x852C
|
||||
#define GL_SECONDARY_COLOR_NV 0x852D
|
||||
#define GL_ROUNDED_RECT_NV 0xE8
|
||||
#define GL_RELATIVE_ROUNDED_RECT_NV 0xE9
|
||||
#define GL_ROUNDED_RECT2_NV 0xEA
|
||||
@ -9654,6 +9649,10 @@ GLAPI void APIENTRY glProgramBufferParametersIuivNV (GLenum target, GLuint bindi
|
||||
#define GL_EYE_LINEAR_NV 0x2400
|
||||
#define GL_OBJECT_LINEAR_NV 0x2401
|
||||
#define GL_CONSTANT_NV 0x8576
|
||||
#define GL_PATH_FOG_GEN_MODE_NV 0x90AC
|
||||
#define GL_PRIMARY_COLOR_NV 0x852C
|
||||
#define GL_SECONDARY_COLOR_NV 0x852D
|
||||
#define GL_PATH_GEN_COLOR_FORMAT_NV 0x90B2
|
||||
#define GL_PATH_PROJECTION_NV 0x1701
|
||||
#define GL_PATH_MODELVIEW_NV 0x1700
|
||||
#define GL_PATH_MODELVIEW_STACK_DEPTH_NV 0x0BA3
|
||||
@ -9691,9 +9690,6 @@ typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHNVPROC) (GLuint path, GLint refere
|
||||
typedef void (APIENTRYP PFNGLSTENCILFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
|
||||
typedef void (APIENTRYP PFNGLSTENCILSTROKEPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
|
||||
typedef void (APIENTRYP PFNGLPATHCOVERDEPTHFUNCNVPROC) (GLenum func);
|
||||
typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
|
||||
typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
|
||||
typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);
|
||||
typedef void (APIENTRYP PFNGLCOVERFILLPATHNVPROC) (GLuint path, GLenum coverMode);
|
||||
typedef void (APIENTRYP PFNGLCOVERSTROKEPATHNVPROC) (GLuint path, GLenum coverMode);
|
||||
typedef void (APIENTRYP PFNGLCOVERFILLPATHINSTANCEDNVPROC) (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
|
||||
@ -9706,10 +9702,6 @@ typedef void (APIENTRYP PFNGLGETPATHDASHARRAYNVPROC) (GLuint path, GLfloat *dash
|
||||
typedef void (APIENTRYP PFNGLGETPATHMETRICSNVPROC) (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
|
||||
typedef void (APIENTRYP PFNGLGETPATHMETRICRANGENVPROC) (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
|
||||
typedef void (APIENTRYP PFNGLGETPATHSPACINGNVPROC) (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
|
||||
typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);
|
||||
typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);
|
||||
typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);
|
||||
typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);
|
||||
typedef GLboolean (APIENTRYP PFNGLISPOINTINFILLPATHNVPROC) (GLuint path, GLuint mask, GLfloat x, GLfloat y);
|
||||
typedef GLboolean (APIENTRYP PFNGLISPOINTINSTROKEPATHNVPROC) (GLuint path, GLfloat x, GLfloat y);
|
||||
typedef GLfloat (APIENTRYP PFNGLGETPATHLENGTHNVPROC) (GLuint path, GLsizei startSegment, GLsizei numSegments);
|
||||
@ -9729,6 +9721,13 @@ typedef GLenum (APIENTRYP PFNGLPATHGLYPHINDEXARRAYNVPROC) (GLuint firstPathName,
|
||||
typedef GLenum (APIENTRYP PFNGLPATHMEMORYGLYPHINDEXARRAYNVPROC) (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
|
||||
typedef void (APIENTRYP PFNGLPROGRAMPATHFRAGMENTINPUTGENNVPROC) (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
|
||||
typedef void (APIENTRYP PFNGLGETPROGRAMRESOURCEFVNVPROC) (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||
typedef void (APIENTRYP PFNGLPATHCOLORGENNVPROC) (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
|
||||
typedef void (APIENTRYP PFNGLPATHTEXGENNVPROC) (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
|
||||
typedef void (APIENTRYP PFNGLPATHFOGGENNVPROC) (GLenum genMode);
|
||||
typedef void (APIENTRYP PFNGLGETPATHCOLORGENIVNVPROC) (GLenum color, GLenum pname, GLint *value);
|
||||
typedef void (APIENTRYP PFNGLGETPATHCOLORGENFVNVPROC) (GLenum color, GLenum pname, GLfloat *value);
|
||||
typedef void (APIENTRYP PFNGLGETPATHTEXGENIVNVPROC) (GLenum texCoordSet, GLenum pname, GLint *value);
|
||||
typedef void (APIENTRYP PFNGLGETPATHTEXGENFVNVPROC) (GLenum texCoordSet, GLenum pname, GLfloat *value);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI GLuint APIENTRY glGenPathsNV (GLsizei range);
|
||||
GLAPI void APIENTRY glDeletePathsNV (GLuint path, GLsizei range);
|
||||
@ -9756,9 +9755,6 @@ GLAPI void APIENTRY glStencilStrokePathNV (GLuint path, GLint reference, GLuint
|
||||
GLAPI void APIENTRY glStencilFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum fillMode, GLuint mask, GLenum transformType, const GLfloat *transformValues);
|
||||
GLAPI void APIENTRY glStencilStrokePathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLint reference, GLuint mask, GLenum transformType, const GLfloat *transformValues);
|
||||
GLAPI void APIENTRY glPathCoverDepthFuncNV (GLenum func);
|
||||
GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
|
||||
GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
|
||||
GLAPI void APIENTRY glPathFogGenNV (GLenum genMode);
|
||||
GLAPI void APIENTRY glCoverFillPathNV (GLuint path, GLenum coverMode);
|
||||
GLAPI void APIENTRY glCoverStrokePathNV (GLuint path, GLenum coverMode);
|
||||
GLAPI void APIENTRY glCoverFillPathInstancedNV (GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLenum coverMode, GLenum transformType, const GLfloat *transformValues);
|
||||
@ -9771,10 +9767,6 @@ GLAPI void APIENTRY glGetPathDashArrayNV (GLuint path, GLfloat *dashArray);
|
||||
GLAPI void APIENTRY glGetPathMetricsNV (GLbitfield metricQueryMask, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLsizei stride, GLfloat *metrics);
|
||||
GLAPI void APIENTRY glGetPathMetricRangeNV (GLbitfield metricQueryMask, GLuint firstPathName, GLsizei numPaths, GLsizei stride, GLfloat *metrics);
|
||||
GLAPI void APIENTRY glGetPathSpacingNV (GLenum pathListMode, GLsizei numPaths, GLenum pathNameType, const void *paths, GLuint pathBase, GLfloat advanceScale, GLfloat kerningScale, GLenum transformType, GLfloat *returnedSpacing);
|
||||
GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);
|
||||
GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);
|
||||
GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);
|
||||
GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);
|
||||
GLAPI GLboolean APIENTRY glIsPointInFillPathNV (GLuint path, GLuint mask, GLfloat x, GLfloat y);
|
||||
GLAPI GLboolean APIENTRY glIsPointInStrokePathNV (GLuint path, GLfloat x, GLfloat y);
|
||||
GLAPI GLfloat APIENTRY glGetPathLengthNV (GLuint path, GLsizei startSegment, GLsizei numSegments);
|
||||
@ -9794,6 +9786,13 @@ GLAPI GLenum APIENTRY glPathGlyphIndexArrayNV (GLuint firstPathName, GLenum font
|
||||
GLAPI GLenum APIENTRY glPathMemoryGlyphIndexArrayNV (GLuint firstPathName, GLenum fontTarget, GLsizeiptr fontSize, const void *fontData, GLsizei faceIndex, GLuint firstGlyphIndex, GLsizei numGlyphs, GLuint pathParameterTemplate, GLfloat emScale);
|
||||
GLAPI void APIENTRY glProgramPathFragmentInputGenNV (GLuint program, GLint location, GLenum genMode, GLint components, const GLfloat *coeffs);
|
||||
GLAPI void APIENTRY glGetProgramResourcefvNV (GLuint program, GLenum programInterface, GLuint index, GLsizei propCount, const GLenum *props, GLsizei bufSize, GLsizei *length, GLfloat *params);
|
||||
GLAPI void APIENTRY glPathColorGenNV (GLenum color, GLenum genMode, GLenum colorFormat, const GLfloat *coeffs);
|
||||
GLAPI void APIENTRY glPathTexGenNV (GLenum texCoordSet, GLenum genMode, GLint components, const GLfloat *coeffs);
|
||||
GLAPI void APIENTRY glPathFogGenNV (GLenum genMode);
|
||||
GLAPI void APIENTRY glGetPathColorGenivNV (GLenum color, GLenum pname, GLint *value);
|
||||
GLAPI void APIENTRY glGetPathColorGenfvNV (GLenum color, GLenum pname, GLfloat *value);
|
||||
GLAPI void APIENTRY glGetPathTexGenivNV (GLenum texCoordSet, GLenum pname, GLint *value);
|
||||
GLAPI void APIENTRY glGetPathTexGenfvNV (GLenum texCoordSet, GLenum pname, GLfloat *value);
|
||||
#endif
|
||||
#endif /* GL_NV_path_rendering */
|
||||
|
||||
@ -10820,6 +10819,10 @@ GLAPI void APIENTRY glVideoCaptureStreamParameterdvNV (GLuint video_capture_slot
|
||||
#endif
|
||||
#endif /* GL_NV_video_capture */
|
||||
|
||||
#ifndef GL_NV_viewport_array2
|
||||
#define GL_NV_viewport_array2 1
|
||||
#endif /* GL_NV_viewport_array2 */
|
||||
|
||||
#ifndef GL_OML_interlace
|
||||
#define GL_OML_interlace 1
|
||||
#define GL_INTERLACE_OML 0x8980
|
||||
@ -11398,10 +11401,10 @@ GLAPI void APIENTRY glReferencePlaneSGIX (const GLdouble *equation);
|
||||
|
||||
#ifndef GL_SGIX_resample
|
||||
#define GL_SGIX_resample 1
|
||||
#define GL_PACK_RESAMPLE_SGIX 0x842C
|
||||
#define GL_UNPACK_RESAMPLE_SGIX 0x842D
|
||||
#define GL_RESAMPLE_REPLICATE_SGIX 0x842E
|
||||
#define GL_RESAMPLE_ZERO_FILL_SGIX 0x842F
|
||||
#define GL_PACK_RESAMPLE_SGIX 0x842E
|
||||
#define GL_UNPACK_RESAMPLE_SGIX 0x842F
|
||||
#define GL_RESAMPLE_REPLICATE_SGIX 0x8433
|
||||
#define GL_RESAMPLE_ZERO_FILL_SGIX 0x8434
|
||||
#define GL_RESAMPLE_DECIMATE_SGIX 0x8430
|
||||
#endif /* GL_SGIX_resample */
|
||||
|
||||
|
@ -573,6 +573,18 @@ bool get_x64_reg_value(x64_context* context, x64_reg_t reg, size_t d_size, size_
|
||||
case 8: out_value = (u64)imm_value; return true; // sign-extended
|
||||
}
|
||||
}
|
||||
else if (reg == X64_IMM16)
|
||||
{
|
||||
// load the immediate value (assuming it's at the end of the instruction)
|
||||
out_value = *(s16*)(RIP(context) + i_size - 2);
|
||||
return true;
|
||||
}
|
||||
else if (reg == X64_IMM8)
|
||||
{
|
||||
// load the immediate value (assuming it's at the end of the instruction)
|
||||
out_value = *(s8*)(RIP(context) + i_size - 1);
|
||||
return true;
|
||||
}
|
||||
else if (reg == X64R_ECX)
|
||||
{
|
||||
out_value = (u32)RCX(context);
|
||||
|
@ -42,6 +42,17 @@ if (APPLE)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -I/opt/X11/include")
|
||||
endif()
|
||||
|
||||
if(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
|
||||
#on some Linux distros shm_unlink and similar functions are in librt only
|
||||
set(ADDITIONAL_LIBS "rt")
|
||||
elseif(UNIX)
|
||||
#it seems like glibc includes the iconv functions we use but other libc
|
||||
#implementations like the one on OSX don't seem implement them
|
||||
set(ADDITIONAL_LIBS "iconv")
|
||||
else()
|
||||
set(ADDITIONAL_LIBS "")
|
||||
endif()
|
||||
|
||||
If( NOT RPCS3_SRC_DIR)
|
||||
SET(RPCS3_SRC_DIR ${CMAKE_CURRENT_LIST_DIR})
|
||||
Message("-- Initializing RPCS3_SRC_DIR=${RPCS3_SRC_DIR}")
|
||||
@ -120,7 +131,7 @@ set_source_files_properties(${RPCS3_SRC_DIR}/Emu/Cell/PPULLVMRecompiler.cpp PROP
|
||||
add_executable(rpcs3 ${RPCS3_SRC})
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -L${CMAKE_CURRENT_BINARY_DIR}/../asmjit/") #hack because the asmjit cmake file force fno exceptions
|
||||
target_link_libraries(rpcs3 asmjit.a ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES} libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a ${ZLIB_LIBRARIES} ${LLVM_LIBS} rt)
|
||||
target_link_libraries(rpcs3 asmjit.a ${wxWidgets_LIBRARIES} ${OPENAL_LIBRARY} ${GLEW_LIBRARY} ${OPENGL_LIBRARIES} libavformat.a libavcodec.a libavutil.a libswresample.a libswscale.a ${ZLIB_LIBRARIES} ${LLVM_LIBS} ${ADDITIONAL_LIBS} )
|
||||
|
||||
set_target_properties(rpcs3 PROPERTIES COTIRE_CXX_PREFIX_HEADER_INIT "${RPCS3_SRC_DIR}/stdafx.h")
|
||||
cotire(rpcs3)
|
||||
|
@ -10,9 +10,9 @@ GLProgram::GLProgram() : id(0)
|
||||
|
||||
int GLProgram::GetLocation(const std::string& name)
|
||||
{
|
||||
for(u32 i=0; i<m_locations.size(); ++i)
|
||||
for (u32 i=0; i < m_locations.size(); ++i)
|
||||
{
|
||||
if(!m_locations[i].name.compare(name))
|
||||
if (!m_locations[i].name.compare(name))
|
||||
{
|
||||
return m_locations[i].loc;
|
||||
}
|
||||
@ -34,7 +34,9 @@ bool GLProgram::IsCreated() const
|
||||
|
||||
void GLProgram::Create(const u32 vp, const u32 fp)
|
||||
{
|
||||
if(IsCreated()) Delete();
|
||||
if (IsCreated())
|
||||
Delete();
|
||||
|
||||
id = glCreateProgram();
|
||||
|
||||
glAttachShader(id, vp);
|
||||
@ -44,14 +46,14 @@ void GLProgram::Create(const u32 vp, const u32 fp)
|
||||
|
||||
GLint linkStatus = GL_FALSE;
|
||||
glGetProgramiv(id, GL_LINK_STATUS, &linkStatus);
|
||||
if(linkStatus != GL_TRUE)
|
||||
if (linkStatus != GL_TRUE)
|
||||
{
|
||||
GLint bufLength = 0;
|
||||
glGetProgramiv(id, GL_INFO_LOG_LENGTH, &bufLength);
|
||||
|
||||
if (bufLength)
|
||||
{
|
||||
char* buf = new char[bufLength+1]();
|
||||
char* buf = new char[bufLength + 1]();
|
||||
glGetProgramInfoLog(id, bufLength, NULL, buf);
|
||||
LOG_ERROR(RSX, "Could not link program: %s", buf);
|
||||
delete[] buf;
|
||||
@ -59,10 +61,10 @@ void GLProgram::Create(const u32 vp, const u32 fp)
|
||||
return;
|
||||
}
|
||||
}
|
||||
//else LOG_NOTICE(HLE, "program linked!");
|
||||
//else LOG_NOTICE(HLE, "Program linked!");
|
||||
|
||||
glGetProgramiv(id, GL_VALIDATE_STATUS, &linkStatus);
|
||||
if(linkStatus != GL_TRUE)
|
||||
if (linkStatus != GL_TRUE)
|
||||
{
|
||||
GLint bufLength = 0;
|
||||
glGetProgramiv(id, GL_INFO_LOG_LENGTH, &bufLength);
|
||||
@ -87,7 +89,8 @@ void GLProgram::UnUse()
|
||||
|
||||
void GLProgram::Use()
|
||||
{
|
||||
glUseProgram(id);
|
||||
if (id != 0)
|
||||
glUseProgram(id);
|
||||
checkForGlError("glUseProgram");
|
||||
}
|
||||
|
||||
@ -107,7 +110,9 @@ void GLProgram::SetVTex(u32 index)
|
||||
|
||||
void GLProgram::Delete()
|
||||
{
|
||||
if(!IsCreated()) return;
|
||||
if (!IsCreated())
|
||||
return;
|
||||
|
||||
glDeleteProgram(id);
|
||||
id = 0;
|
||||
m_locations.clear();
|
||||
|
@ -179,109 +179,115 @@ int cellCameraGetAttribute(s32 dev_num, CellCameraAttribute attrib, vm::ptr<u32>
|
||||
if (!cellCameraInstance.m_bInitialized)
|
||||
return CELL_CAMERA_ERROR_NOT_INIT;
|
||||
|
||||
if (attrib == 0)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.GAIN;
|
||||
else if (attrib == 1)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.REDBLUEGAIN;
|
||||
else if (attrib == 2)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.SATURATION;
|
||||
else if (attrib == 3)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.EXPOSURE;
|
||||
else if (attrib == 4)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.BRIGHTNESS;
|
||||
else if (attrib == 5)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AEC;
|
||||
else if (attrib == 6)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AGC;
|
||||
else if (attrib == 7)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AWB;
|
||||
else if (attrib == 8)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.ABC;
|
||||
else if (attrib == 9)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.LED;
|
||||
else if (attrib == 10)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AUDIOGAIN;
|
||||
else if (attrib == 11)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.QS;
|
||||
else if (attrib == 12)
|
||||
switch (attrib)
|
||||
{
|
||||
case 0:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.GAIN; break;
|
||||
case 1:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.REDBLUEGAIN; break;
|
||||
case 2:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.SATURATION; break;
|
||||
case 3:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.EXPOSURE; break;
|
||||
case 4:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.BRIGHTNESS; break;
|
||||
case 5:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AEC; break;
|
||||
case 6:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AGC; break;
|
||||
case 7:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AWB; break;
|
||||
case 8:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.ABC; break;
|
||||
case 9:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.LED; break;
|
||||
case 10:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AUDIOGAIN; break;
|
||||
case 11:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.QS; break;
|
||||
case 12:
|
||||
{
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.NONZEROCOEFFS[0];
|
||||
*arg2 = cellCameraInstance.m_camera.attributes.NONZEROCOEFFS[1];
|
||||
break;
|
||||
}
|
||||
case 13:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.YUVFLAG; break;
|
||||
case 14:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.JPEGFLAG; break;
|
||||
case 15:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.BACKLIGHTCOMP; break;
|
||||
case 16:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.MIRRORFLAG; break;
|
||||
case 17:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.MEASUREDQS; break;
|
||||
case 18:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes._422FLAG; break;
|
||||
case 19:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.USBLOAD; break;
|
||||
case 20:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.GAMMA; break;
|
||||
case 21:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.GREENGAIN; break;
|
||||
case 22:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AGCLIMIT; break;
|
||||
case 23:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DENOISE; break;
|
||||
case 24:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.FRAMERATEADJUST; break;
|
||||
case 25:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.PIXELOUTLIERFILTER; break;
|
||||
case 26:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AGCLOW; break;
|
||||
case 27:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AGCHIGH; break;
|
||||
case 28:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DEVICELOCATION; break;
|
||||
case 29:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.FORMATCAP; break;
|
||||
case 30:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.FORMATINDEX; break;
|
||||
case 31:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.NUMFRAME; break;
|
||||
case 32:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.FRAMEINDEX; break;
|
||||
case 33:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.FRAMESIZE; break;
|
||||
case 34:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALTYPE; break;
|
||||
case 35:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALINDEX; break;
|
||||
case 36:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALVALUE; break;
|
||||
case 37:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.COLORMATCHING; break;
|
||||
case 38:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.PLFREQ; break;
|
||||
case 39:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DEVICEID; break;
|
||||
case 40:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DEVICECAP; break;
|
||||
case 41:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DEVICESPEED; break;
|
||||
case 42:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.UVCREQCODE; break;
|
||||
case 43:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.UVCREQDATA; break;
|
||||
case 44:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DEVICEID2; break;
|
||||
case 45:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.READMODE; break;
|
||||
case 46:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.GAMEPID; break;
|
||||
case 47:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.PBUFFER; break;
|
||||
case 48:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.READFINISH; break;
|
||||
case 49:
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.ATTRIBUTE_UNKNOWN; break;
|
||||
default:
|
||||
cellCamera.Error("Unexpected cellCameraGetAttribute attribute: %d", attrib); break;
|
||||
}
|
||||
else if (attrib == 13)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.YUVFLAG;
|
||||
else if (attrib == 14)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.JPEGFLAG;
|
||||
else if (attrib == 15)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.BACKLIGHTCOMP;
|
||||
else if (attrib == 16)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.MIRRORFLAG;
|
||||
else if (attrib == 17)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.MEASUREDQS;
|
||||
else if (attrib == 18)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes._422FLAG;
|
||||
else if (attrib == 19)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.USBLOAD;
|
||||
else if (attrib == 20)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.GAMMA;
|
||||
else if (attrib == 21)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.GREENGAIN;
|
||||
else if (attrib == 22)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AGCLIMIT;
|
||||
else if (attrib == 23)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DENOISE;
|
||||
else if (attrib == 24)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.FRAMERATEADJUST;
|
||||
else if (attrib == 25)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.PIXELOUTLIERFILTER;
|
||||
else if (attrib == 26)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AGCLOW;
|
||||
else if (attrib == 27)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.AGCHIGH;
|
||||
else if (attrib == 28)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DEVICELOCATION;
|
||||
else if (attrib == 29)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.FORMATCAP;
|
||||
else if (attrib == 30)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.FORMATINDEX;
|
||||
else if (attrib == 31)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.NUMFRAME;
|
||||
else if (attrib == 32)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.FRAMEINDEX;
|
||||
else if (attrib == 33)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.FRAMESIZE;
|
||||
else if (attrib == 34)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALTYPE;
|
||||
else if (attrib == 35)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALINDEX;
|
||||
else if (attrib == 36)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.INTERVALVALUE;
|
||||
else if (attrib == 37)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.COLORMATCHING;
|
||||
else if (attrib == 38)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.PLFREQ;
|
||||
else if (attrib == 39)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DEVICEID;
|
||||
else if (attrib == 40)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DEVICECAP;
|
||||
else if (attrib == 41)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DEVICESPEED;
|
||||
else if (attrib == 42)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.UVCREQCODE;
|
||||
else if (attrib == 43)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.UVCREQDATA;
|
||||
else if (attrib == 44)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.DEVICEID2;
|
||||
else if (attrib == 45)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.READMODE;
|
||||
else if (attrib == 46)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.GAMEPID;
|
||||
else if (attrib == 47)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.PBUFFER;
|
||||
else if (attrib == 48)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.READFINISH;
|
||||
else if (attrib == 49)
|
||||
*arg1 = cellCameraInstance.m_camera.attributes.ATTRIBUTE_UNKNOWN;
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
@ -293,109 +299,115 @@ int cellCameraSetAttribute(s32 dev_num, CellCameraAttribute attrib, u32 arg1, u3
|
||||
if (!cellCameraInstance.m_bInitialized)
|
||||
return CELL_CAMERA_ERROR_NOT_INIT;
|
||||
|
||||
if (attrib == 0)
|
||||
cellCameraInstance.m_camera.attributes.GAIN = arg1;
|
||||
else if (attrib == 1)
|
||||
cellCameraInstance.m_camera.attributes.REDBLUEGAIN = arg1;
|
||||
else if (attrib == 2)
|
||||
cellCameraInstance.m_camera.attributes.SATURATION = arg1;
|
||||
else if (attrib == 3)
|
||||
cellCameraInstance.m_camera.attributes.EXPOSURE = arg1;
|
||||
else if (attrib == 4)
|
||||
cellCameraInstance.m_camera.attributes.BRIGHTNESS = arg1;
|
||||
else if (attrib == 5)
|
||||
cellCameraInstance.m_camera.attributes.AEC = arg1;
|
||||
else if (attrib == 6)
|
||||
cellCameraInstance.m_camera.attributes.AGC = arg1;
|
||||
else if (attrib == 7)
|
||||
cellCameraInstance.m_camera.attributes.AWB = arg1;
|
||||
else if (attrib == 8)
|
||||
cellCameraInstance.m_camera.attributes.ABC = arg1;
|
||||
else if (attrib == 9)
|
||||
cellCameraInstance.m_camera.attributes.LED = arg1;
|
||||
else if (attrib == 10)
|
||||
cellCameraInstance.m_camera.attributes.AUDIOGAIN = arg1;
|
||||
else if (attrib == 11)
|
||||
cellCameraInstance.m_camera.attributes.QS = arg1;
|
||||
else if (attrib == 12)
|
||||
switch (attrib)
|
||||
{
|
||||
case 0:
|
||||
cellCameraInstance.m_camera.attributes.GAIN = arg1; break;
|
||||
case 1:
|
||||
cellCameraInstance.m_camera.attributes.REDBLUEGAIN = arg1; break;
|
||||
case 2:
|
||||
cellCameraInstance.m_camera.attributes.SATURATION = arg1; break;
|
||||
case 3:
|
||||
cellCameraInstance.m_camera.attributes.EXPOSURE = arg1; break;
|
||||
case 4:
|
||||
cellCameraInstance.m_camera.attributes.BRIGHTNESS = arg1; break;
|
||||
case 5:
|
||||
cellCameraInstance.m_camera.attributes.AEC = arg1; break;
|
||||
case 6:
|
||||
cellCameraInstance.m_camera.attributes.AGC = arg1; break;
|
||||
case 7:
|
||||
cellCameraInstance.m_camera.attributes.AWB = arg1; break;
|
||||
case 8:
|
||||
cellCameraInstance.m_camera.attributes.ABC = arg1; break;
|
||||
case 9:
|
||||
cellCameraInstance.m_camera.attributes.LED = arg1; break;
|
||||
case 10:
|
||||
cellCameraInstance.m_camera.attributes.AUDIOGAIN = arg1; break;
|
||||
case 11:
|
||||
cellCameraInstance.m_camera.attributes.QS = arg1; break;
|
||||
case 12:
|
||||
{
|
||||
cellCameraInstance.m_camera.attributes.NONZEROCOEFFS[0] = arg1;
|
||||
cellCameraInstance.m_camera.attributes.NONZEROCOEFFS[1] = arg2;
|
||||
break;
|
||||
}
|
||||
case 13:
|
||||
cellCameraInstance.m_camera.attributes.YUVFLAG = arg1; break;
|
||||
case 14:
|
||||
cellCameraInstance.m_camera.attributes.JPEGFLAG = arg1; break;
|
||||
case 15:
|
||||
cellCameraInstance.m_camera.attributes.BACKLIGHTCOMP = arg1; break;
|
||||
case 16:
|
||||
cellCameraInstance.m_camera.attributes.MIRRORFLAG = arg1; break;
|
||||
case 17:
|
||||
return CELL_CAMERA_ERROR_PARAM; break;
|
||||
case 18:
|
||||
cellCameraInstance.m_camera.attributes._422FLAG = arg1; break;
|
||||
case 19:
|
||||
cellCameraInstance.m_camera.attributes.USBLOAD = arg1; break;
|
||||
case 20:
|
||||
cellCameraInstance.m_camera.attributes.GAMMA = arg1; break;
|
||||
case 21:
|
||||
cellCameraInstance.m_camera.attributes.GREENGAIN = arg1; break;
|
||||
case 22:
|
||||
cellCameraInstance.m_camera.attributes.AGCLIMIT = arg1; break;
|
||||
case 23:
|
||||
cellCameraInstance.m_camera.attributes.DENOISE = arg1; break;
|
||||
case 24:
|
||||
cellCameraInstance.m_camera.attributes.FRAMERATEADJUST = arg1; break;
|
||||
case 25:
|
||||
cellCameraInstance.m_camera.attributes.PIXELOUTLIERFILTER = arg1; break;
|
||||
case 26:
|
||||
cellCameraInstance.m_camera.attributes.AGCLOW = arg1; break;
|
||||
case 27:
|
||||
cellCameraInstance.m_camera.attributes.AGCHIGH = arg1; break;
|
||||
case 28:
|
||||
cellCameraInstance.m_camera.attributes.DEVICELOCATION = arg1; break;
|
||||
case 29:
|
||||
cellCamera.Error("Tried to write to read-only (?) value: FORMATCAP"); break;
|
||||
case 30:
|
||||
cellCameraInstance.m_camera.attributes.FORMATINDEX = arg1; break;
|
||||
case 31:
|
||||
cellCameraInstance.m_camera.attributes.NUMFRAME = arg1; break;
|
||||
case 32:
|
||||
cellCameraInstance.m_camera.attributes.FRAMEINDEX = arg1; break;
|
||||
case 33:
|
||||
cellCameraInstance.m_camera.attributes.FRAMESIZE = arg1; break;
|
||||
case 34:
|
||||
cellCameraInstance.m_camera.attributes.INTERVALTYPE = arg1; break;
|
||||
case 35:
|
||||
cellCameraInstance.m_camera.attributes.INTERVALINDEX = arg1; break;
|
||||
case 36:
|
||||
cellCameraInstance.m_camera.attributes.INTERVALVALUE = arg1; break;
|
||||
case 37:
|
||||
cellCameraInstance.m_camera.attributes.COLORMATCHING = arg1; break;
|
||||
case 38:
|
||||
cellCameraInstance.m_camera.attributes.PLFREQ = arg1; break;
|
||||
case 39:
|
||||
return CELL_CAMERA_ERROR_PARAM; break;
|
||||
case 40:
|
||||
cellCameraInstance.m_camera.attributes.DEVICECAP = arg1; break;
|
||||
case 41:
|
||||
cellCameraInstance.m_camera.attributes.DEVICESPEED = arg1; break;
|
||||
case 42:
|
||||
cellCameraInstance.m_camera.attributes.UVCREQCODE = arg1; break;
|
||||
case 43:
|
||||
cellCameraInstance.m_camera.attributes.UVCREQDATA = arg1; break;
|
||||
case 44:
|
||||
return CELL_CAMERA_ERROR_PARAM; break;
|
||||
case 45:
|
||||
cellCamera.Error("Tried to write to read-only (?) value: READMODE"); break;
|
||||
case 46:
|
||||
cellCameraInstance.m_camera.attributes.GAMEPID = arg1; break;
|
||||
case 47:
|
||||
cellCameraInstance.m_camera.attributes.PBUFFER = arg1; break;
|
||||
case 48:
|
||||
cellCameraInstance.m_camera.attributes.READFINISH = arg1; break;
|
||||
case 49:
|
||||
cellCamera.Error("Tried to write to read-only (?) value: ATTRIBUTE_UNKNOWN"); break;
|
||||
default:
|
||||
cellCamera.Error("Unexpected cellCameraGetAttribute attribute: %d", attrib); break;
|
||||
}
|
||||
else if (attrib == 13)
|
||||
cellCameraInstance.m_camera.attributes.YUVFLAG = arg1;
|
||||
else if (attrib == 14)
|
||||
cellCameraInstance.m_camera.attributes.JPEGFLAG = arg1;
|
||||
else if (attrib == 15)
|
||||
cellCameraInstance.m_camera.attributes.BACKLIGHTCOMP = arg1;
|
||||
else if (attrib == 16)
|
||||
cellCameraInstance.m_camera.attributes.MIRRORFLAG = arg1;
|
||||
else if (attrib == 17)
|
||||
return CELL_CAMERA_ERROR_PARAM;
|
||||
else if (attrib == 18)
|
||||
cellCameraInstance.m_camera.attributes._422FLAG = arg1;
|
||||
else if (attrib == 19)
|
||||
cellCameraInstance.m_camera.attributes.USBLOAD = arg1;
|
||||
else if (attrib == 20)
|
||||
cellCameraInstance.m_camera.attributes.GAMMA = arg1;
|
||||
else if (attrib == 21)
|
||||
cellCameraInstance.m_camera.attributes.GREENGAIN = arg1;
|
||||
else if (attrib == 22)
|
||||
cellCameraInstance.m_camera.attributes.AGCLIMIT = arg1;
|
||||
else if (attrib == 23)
|
||||
cellCameraInstance.m_camera.attributes.DENOISE = arg1;
|
||||
else if (attrib == 24)
|
||||
cellCameraInstance.m_camera.attributes.FRAMERATEADJUST = arg1;
|
||||
else if (attrib == 25)
|
||||
cellCameraInstance.m_camera.attributes.PIXELOUTLIERFILTER = arg1;
|
||||
else if (attrib == 26)
|
||||
cellCameraInstance.m_camera.attributes.AGCLOW = arg1;
|
||||
else if (attrib == 27)
|
||||
cellCameraInstance.m_camera.attributes.AGCHIGH = arg1;
|
||||
else if (attrib == 28)
|
||||
cellCameraInstance.m_camera.attributes.DEVICELOCATION = arg1;
|
||||
else if (attrib == 29)
|
||||
cellCamera.Error("Tried to write to read-only (?) value: FORMATCAP");
|
||||
else if (attrib == 30)
|
||||
cellCameraInstance.m_camera.attributes.FORMATINDEX = arg1;
|
||||
else if (attrib == 31)
|
||||
cellCameraInstance.m_camera.attributes.NUMFRAME = arg1;
|
||||
else if (attrib == 32)
|
||||
cellCameraInstance.m_camera.attributes.FRAMEINDEX = arg1;
|
||||
else if (attrib == 33)
|
||||
cellCameraInstance.m_camera.attributes.FRAMESIZE = arg1;
|
||||
else if (attrib == 34)
|
||||
cellCameraInstance.m_camera.attributes.INTERVALTYPE = arg1;
|
||||
else if (attrib == 35)
|
||||
cellCameraInstance.m_camera.attributes.INTERVALINDEX = arg1;
|
||||
else if (attrib == 36)
|
||||
cellCameraInstance.m_camera.attributes.INTERVALVALUE = arg1;
|
||||
else if (attrib == 37)
|
||||
cellCameraInstance.m_camera.attributes.COLORMATCHING = arg1;
|
||||
else if (attrib == 38)
|
||||
cellCameraInstance.m_camera.attributes.PLFREQ = arg1;
|
||||
else if (attrib == 39)
|
||||
return CELL_CAMERA_ERROR_PARAM;
|
||||
else if (attrib == 40)
|
||||
cellCameraInstance.m_camera.attributes.DEVICECAP = arg1;
|
||||
else if (attrib == 41)
|
||||
cellCameraInstance.m_camera.attributes.DEVICESPEED = arg1;
|
||||
else if (attrib == 42)
|
||||
cellCameraInstance.m_camera.attributes.UVCREQCODE = arg1;
|
||||
else if (attrib == 43)
|
||||
cellCameraInstance.m_camera.attributes.UVCREQDATA = arg1;
|
||||
else if (attrib == 44)
|
||||
return CELL_CAMERA_ERROR_PARAM;
|
||||
else if (attrib == 45)
|
||||
cellCamera.Error("Tried to write to read-only (?) value: READMODE");
|
||||
else if (attrib == 46)
|
||||
cellCameraInstance.m_camera.attributes.GAMEPID = arg1;
|
||||
else if (attrib == 47)
|
||||
cellCameraInstance.m_camera.attributes.PBUFFER = arg1;
|
||||
else if (attrib == 48)
|
||||
cellCameraInstance.m_camera.attributes.READFINISH = arg1;
|
||||
else if (attrib == 49)
|
||||
cellCamera.Error("Tried to write to read-only (?) value: ATTRIBUTE_UNKNOWN");
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
@ -85,6 +85,7 @@ int cellNetCtlNetStartDialogLoadAsync(vm::ptr<CellNetCtlNetStartDialogParam> par
|
||||
|
||||
// TODO: Actually sign into PSN
|
||||
sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED, 0);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
@ -100,6 +101,7 @@ int cellNetCtlNetStartDialogUnloadAsync(vm::ptr<CellNetCtlNetStartDialogResult>
|
||||
cellNetCtl.Warning("cellNetCtlNetStartDialogUnloadAsync(result_addr=0x%x)", result.addr());
|
||||
|
||||
sysutilSendSystemCommand(CELL_SYSUTIL_NET_CTL_NETSTART_UNLOADED, 0);
|
||||
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
|
@ -3,79 +3,79 @@
|
||||
// Error Codes
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_ERROR_NOT_INITIALIZED = 0x80130101,
|
||||
CELL_NET_CTL_ERROR_NOT_TERMINATED = 0x80130102,
|
||||
CELL_NET_CTL_ERROR_HANDLER_MAX = 0x80130103,
|
||||
CELL_NET_CTL_ERROR_ID_NOT_FOUND = 0x80130104,
|
||||
CELL_NET_CTL_ERROR_INVALID_ID = 0x80130105,
|
||||
CELL_NET_CTL_ERROR_INVALID_CODE = 0x80130106,
|
||||
CELL_NET_CTL_ERROR_INVALID_ADDR = 0x80130107,
|
||||
CELL_NET_CTL_ERROR_NOT_CONNECTED = 0x80130108,
|
||||
CELL_NET_CTL_ERROR_NOT_AVAIL = 0x80130109,
|
||||
CELL_NET_CTL_ERROR_INVALID_TYPE = 0x8013010a,
|
||||
CELL_NET_CTL_ERROR_INVALID_SIZE = 0x8013010b,
|
||||
CELL_NET_CTL_ERROR_NET_DISABLED = 0x80130181,
|
||||
CELL_NET_CTL_ERROR_NET_NOT_CONNECTED = 0x80130182,
|
||||
CELL_NET_CTL_ERROR_NP_NO_ACCOUNT = 0x80130183,
|
||||
CELL_NET_CTL_ERROR_NP_RESERVED1 = 0x80130184,
|
||||
CELL_NET_CTL_ERROR_NP_RESERVED2 = 0x80130185,
|
||||
CELL_NET_CTL_ERROR_NOT_INITIALIZED = 0x80130101,
|
||||
CELL_NET_CTL_ERROR_NOT_TERMINATED = 0x80130102,
|
||||
CELL_NET_CTL_ERROR_HANDLER_MAX = 0x80130103,
|
||||
CELL_NET_CTL_ERROR_ID_NOT_FOUND = 0x80130104,
|
||||
CELL_NET_CTL_ERROR_INVALID_ID = 0x80130105,
|
||||
CELL_NET_CTL_ERROR_INVALID_CODE = 0x80130106,
|
||||
CELL_NET_CTL_ERROR_INVALID_ADDR = 0x80130107,
|
||||
CELL_NET_CTL_ERROR_NOT_CONNECTED = 0x80130108,
|
||||
CELL_NET_CTL_ERROR_NOT_AVAIL = 0x80130109,
|
||||
CELL_NET_CTL_ERROR_INVALID_TYPE = 0x8013010a,
|
||||
CELL_NET_CTL_ERROR_INVALID_SIZE = 0x8013010b,
|
||||
CELL_NET_CTL_ERROR_NET_DISABLED = 0x80130181,
|
||||
CELL_NET_CTL_ERROR_NET_NOT_CONNECTED = 0x80130182,
|
||||
CELL_NET_CTL_ERROR_NP_NO_ACCOUNT = 0x80130183,
|
||||
CELL_NET_CTL_ERROR_NP_RESERVED1 = 0x80130184,
|
||||
CELL_NET_CTL_ERROR_NP_RESERVED2 = 0x80130185,
|
||||
CELL_NET_CTL_ERROR_NET_CABLE_NOT_CONNECTED = 0x80130186,
|
||||
CELL_NET_CTL_ERROR_DIALOG_CANCELED = 0x80130190,
|
||||
CELL_NET_CTL_ERROR_DIALOG_ABORTED = 0x80130191,
|
||||
CELL_NET_CTL_ERROR_DIALOG_CANCELED = 0x80130190,
|
||||
CELL_NET_CTL_ERROR_DIALOG_ABORTED = 0x80130191,
|
||||
|
||||
CELL_NET_CTL_ERROR_WLAN_DEAUTHED = 0x80130137,
|
||||
CELL_NET_CTL_ERROR_WLAN_DEAUTHED = 0x80130137,
|
||||
CELL_NET_CTL_ERROR_WLAN_KEYINFO_EXCHNAGE_TIMEOUT = 0x8013013d,
|
||||
CELL_NET_CTL_ERROR_WLAN_ASSOC_FAILED = 0x8013013e,
|
||||
CELL_NET_CTL_ERROR_WLAN_AP_DISAPPEARED = 0x8013013f,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_INIT = 0x80130409,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_NO_PADO = 0x8013040a,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_NO_PADS = 0x8013040b,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_GET_PADT = 0x8013040d,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_SERVICE_NAME = 0x8013040f,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_AC_SYSTEM = 0x80130410,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_GENERIC = 0x80130411,
|
||||
CELL_NET_CTL_ERROR_PPPOE_STATUS_AUTH = 0x80130412,
|
||||
CELL_NET_CTL_ERROR_PPPOE_STATUS_NETWORK = 0x80130413,
|
||||
CELL_NET_CTL_ERROR_PPPOE_STATUS_TERMINATE = 0x80130414,
|
||||
CELL_NET_CTL_ERROR_DHCP_LEASE_TIME = 0x80130504,
|
||||
CELL_NET_CTL_ERROR_WLAN_ASSOC_FAILED = 0x8013013e,
|
||||
CELL_NET_CTL_ERROR_WLAN_AP_DISAPPEARED = 0x8013013f,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_INIT = 0x80130409,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_NO_PADO = 0x8013040a,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_NO_PADS = 0x8013040b,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_GET_PADT = 0x8013040d,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_SERVICE_NAME = 0x8013040f,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_AC_SYSTEM = 0x80130410,
|
||||
CELL_NET_CTL_ERROR_PPPOE_SESSION_GENERIC = 0x80130411,
|
||||
CELL_NET_CTL_ERROR_PPPOE_STATUS_AUTH = 0x80130412,
|
||||
CELL_NET_CTL_ERROR_PPPOE_STATUS_NETWORK = 0x80130413,
|
||||
CELL_NET_CTL_ERROR_PPPOE_STATUS_TERMINATE = 0x80130414,
|
||||
CELL_NET_CTL_ERROR_DHCP_LEASE_TIME = 0x80130504,
|
||||
};
|
||||
|
||||
// Network connection states
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_STATE_Disconnected = 0,
|
||||
CELL_NET_CTL_STATE_Connecting = 1,
|
||||
CELL_NET_CTL_STATE_IPObtaining = 2,
|
||||
CELL_NET_CTL_STATE_IPObtained = 3,
|
||||
CELL_NET_CTL_STATE_Connecting = 1,
|
||||
CELL_NET_CTL_STATE_IPObtaining = 2,
|
||||
CELL_NET_CTL_STATE_IPObtained = 3,
|
||||
};
|
||||
|
||||
// Transition connection states
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_EVENT_CONNECT_REQ = 0,
|
||||
CELL_NET_CTL_EVENT_ESTABLISH = 1,
|
||||
CELL_NET_CTL_EVENT_GET_IP = 2,
|
||||
CELL_NET_CTL_EVENT_DISCONNECT_REQ = 3,
|
||||
CELL_NET_CTL_EVENT_ERROR = 4,
|
||||
CELL_NET_CTL_EVENT_CONNECT_REQ = 0,
|
||||
CELL_NET_CTL_EVENT_ESTABLISH = 1,
|
||||
CELL_NET_CTL_EVENT_GET_IP = 2,
|
||||
CELL_NET_CTL_EVENT_DISCONNECT_REQ = 3,
|
||||
CELL_NET_CTL_EVENT_ERROR = 4,
|
||||
CELL_NET_CTL_EVENT_LINK_DISCONNECTED = 5,
|
||||
CELL_NET_CTL_EVENT_AUTO_RETRY = 6,
|
||||
CELL_NET_CTL_EVENT_AUTO_RETRY = 6,
|
||||
};
|
||||
|
||||
// Network connection devices
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_DEVICE_WIRED = 0,
|
||||
CELL_NET_CTL_DEVICE_WIRED = 0,
|
||||
CELL_NET_CTL_DEVICE_WIRELESS = 1,
|
||||
};
|
||||
|
||||
// Cable connection types
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_LINK_TYPE_AUTO = 0,
|
||||
CELL_NET_CTL_LINK_TYPE_10BASE_HALF = 1,
|
||||
CELL_NET_CTL_LINK_TYPE_10BASE_FULL = 2,
|
||||
CELL_NET_CTL_LINK_TYPE_100BASE_HALF = 3,
|
||||
CELL_NET_CTL_LINK_TYPE_100BASE_FULL = 4,
|
||||
CELL_NET_CTL_LINK_TYPE_AUTO = 0,
|
||||
CELL_NET_CTL_LINK_TYPE_10BASE_HALF = 1,
|
||||
CELL_NET_CTL_LINK_TYPE_10BASE_FULL = 2,
|
||||
CELL_NET_CTL_LINK_TYPE_100BASE_HALF = 3,
|
||||
CELL_NET_CTL_LINK_TYPE_100BASE_FULL = 4,
|
||||
CELL_NET_CTL_LINK_TYPE_1000BASE_HALF = 5,
|
||||
CELL_NET_CTL_LINK_TYPE_1000BASE_FULL = 6,
|
||||
};
|
||||
@ -84,88 +84,88 @@ enum
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_LINK_DISCONNECTED = 0,
|
||||
CELL_NET_CTL_LINK_CONNECTED = 1,
|
||||
CELL_NET_CTL_LINK_CONNECTED = 1,
|
||||
};
|
||||
|
||||
// Wireless connection security measures
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_WLAN_SECURITY_NOAUTH = 0,
|
||||
CELL_NET_CTL_WLAN_SECURITY_WEP = 1,
|
||||
CELL_NET_CTL_WLAN_SECURITY_NOAUTH = 0,
|
||||
CELL_NET_CTL_WLAN_SECURITY_WEP = 1,
|
||||
CELL_NET_CTL_WLAN_SECURITY_WPAPSK_TKIP = 2,
|
||||
CELL_NET_CTL_WLAN_SECURITY_WPAPSK_AES = 3,
|
||||
CELL_NET_CTL_WLAN_SECURITY_WPAPSK_AES = 3,
|
||||
CELL_NET_CTL_WLAN_SECURITY_UNSUPPORTED = 4,
|
||||
};
|
||||
|
||||
// 802.1X settings
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_8021X_NONE = 0,
|
||||
CELL_NET_CTL_8021X_NONE = 0,
|
||||
CELL_NET_CTL_8021X_EAP_MD5 = 1,
|
||||
};
|
||||
|
||||
// IP settings
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_IP_DHCP = 0,
|
||||
CELL_NET_CTL_IP_DHCP = 0,
|
||||
CELL_NET_CTL_IP_STATIC = 1,
|
||||
CELL_NET_CTL_IP_PPPOE = 2,
|
||||
CELL_NET_CTL_IP_PPPOE = 2,
|
||||
};
|
||||
|
||||
// HTTP proxy settings
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_HTTP_PROXY_OFF = 0,
|
||||
CELL_NET_CTL_HTTP_PROXY_ON = 1,
|
||||
CELL_NET_CTL_HTTP_PROXY_ON = 1,
|
||||
};
|
||||
|
||||
// UPnP settings
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_UPNP_ON = 0,
|
||||
CELL_NET_CTL_UPNP_ON = 0,
|
||||
CELL_NET_CTL_UPNP_OFF = 1,
|
||||
};
|
||||
|
||||
// Codes for information
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_INFO_DEVICE = 1,
|
||||
CELL_NET_CTL_INFO_ETHER_ADDR = 2,
|
||||
CELL_NET_CTL_INFO_MTU = 3,
|
||||
CELL_NET_CTL_INFO_LINK = 4,
|
||||
CELL_NET_CTL_INFO_LINK_TYPE = 5,
|
||||
CELL_NET_CTL_INFO_BSSID = 6,
|
||||
CELL_NET_CTL_INFO_SSID = 7,
|
||||
CELL_NET_CTL_INFO_WLAN_SECURITY = 8,
|
||||
CELL_NET_CTL_INFO_8021X_TYPE = 9,
|
||||
CELL_NET_CTL_INFO_8021X_AUTH_NAME = 10,
|
||||
CELL_NET_CTL_INFO_RSSI = 11,
|
||||
CELL_NET_CTL_INFO_CHANNEL = 12,
|
||||
CELL_NET_CTL_INFO_IP_CONFIG = 13,
|
||||
CELL_NET_CTL_INFO_DHCP_HOSTNAME = 14,
|
||||
CELL_NET_CTL_INFO_PPPOE_AUTH_NAME = 15,
|
||||
CELL_NET_CTL_INFO_IP_ADDRESS = 16,
|
||||
CELL_NET_CTL_INFO_NETMASK = 17,
|
||||
CELL_NET_CTL_INFO_DEFAULT_ROUTE = 18,
|
||||
CELL_NET_CTL_INFO_PRIMARY_DNS = 19,
|
||||
CELL_NET_CTL_INFO_SECONDARY_DNS = 20,
|
||||
CELL_NET_CTL_INFO_DEVICE = 1,
|
||||
CELL_NET_CTL_INFO_ETHER_ADDR = 2,
|
||||
CELL_NET_CTL_INFO_MTU = 3,
|
||||
CELL_NET_CTL_INFO_LINK = 4,
|
||||
CELL_NET_CTL_INFO_LINK_TYPE = 5,
|
||||
CELL_NET_CTL_INFO_BSSID = 6,
|
||||
CELL_NET_CTL_INFO_SSID = 7,
|
||||
CELL_NET_CTL_INFO_WLAN_SECURITY = 8,
|
||||
CELL_NET_CTL_INFO_8021X_TYPE = 9,
|
||||
CELL_NET_CTL_INFO_8021X_AUTH_NAME = 10,
|
||||
CELL_NET_CTL_INFO_RSSI = 11,
|
||||
CELL_NET_CTL_INFO_CHANNEL = 12,
|
||||
CELL_NET_CTL_INFO_IP_CONFIG = 13,
|
||||
CELL_NET_CTL_INFO_DHCP_HOSTNAME = 14,
|
||||
CELL_NET_CTL_INFO_PPPOE_AUTH_NAME = 15,
|
||||
CELL_NET_CTL_INFO_IP_ADDRESS = 16,
|
||||
CELL_NET_CTL_INFO_NETMASK = 17,
|
||||
CELL_NET_CTL_INFO_DEFAULT_ROUTE = 18,
|
||||
CELL_NET_CTL_INFO_PRIMARY_DNS = 19,
|
||||
CELL_NET_CTL_INFO_SECONDARY_DNS = 20,
|
||||
CELL_NET_CTL_INFO_HTTP_PROXY_CONFIG = 21,
|
||||
CELL_NET_CTL_INFO_HTTP_PROXY_SERVER = 22,
|
||||
CELL_NET_CTL_INFO_HTTP_PROXY_PORT = 23,
|
||||
CELL_NET_CTL_INFO_UPNP_CONFIG = 24,
|
||||
CELL_NET_CTL_INFO_HTTP_PROXY_PORT = 23,
|
||||
CELL_NET_CTL_INFO_UPNP_CONFIG = 24,
|
||||
};
|
||||
|
||||
// Network start dialogs
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_NETSTART_TYPE_NET = 0,
|
||||
CELL_NET_CTL_NETSTART_TYPE_NP = 1,
|
||||
CELL_NET_CTL_NETSTART_TYPE_NP = 1,
|
||||
};
|
||||
|
||||
// Network start dialog statuses
|
||||
enum
|
||||
{
|
||||
CELL_SYSUTIL_NET_CTL_NETSTART_LOADED = 0x0801,
|
||||
CELL_SYSUTIL_NET_CTL_NETSTART_LOADED = 0x0801,
|
||||
CELL_SYSUTIL_NET_CTL_NETSTART_FINISHED = 0x0802,
|
||||
CELL_SYSUTIL_NET_CTL_NETSTART_UNLOADED = 0x0803,
|
||||
};
|
||||
@ -174,16 +174,16 @@ enum
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_NATINFO_UPNP_UNCHECKED = 0,
|
||||
CELL_NET_CTL_NATINFO_UPNP_NO = 1,
|
||||
CELL_NET_CTL_NATINFO_UPNP_USED = 2,
|
||||
CELL_NET_CTL_NATINFO_UPNP_NO = 1,
|
||||
CELL_NET_CTL_NATINFO_UPNP_USED = 2,
|
||||
};
|
||||
|
||||
// STUN NAT statuses
|
||||
enum
|
||||
{
|
||||
CELL_NET_CTL_NATINFO_STUN_UNCHECKED = 0,
|
||||
CELL_NET_CTL_NATINFO_STUN_FAILED = 1,
|
||||
CELL_NET_CTL_NATINFO_STUN_OK = 2,
|
||||
CELL_NET_CTL_NATINFO_STUN_FAILED = 1,
|
||||
CELL_NET_CTL_NATINFO_STUN_OK = 2,
|
||||
};
|
||||
|
||||
// NAT types
|
||||
|
@ -2284,14 +2284,18 @@ s32 cellSpursShutdownTaskset(vm::ptr<CellSpursTaskset> taskset)
|
||||
|
||||
u32 _cellSpursGetSdkVersion()
|
||||
{
|
||||
s32 sdk_version;
|
||||
// Commenting this out for now since process_get_sdk_version does not return
|
||||
// the correct SDK version and instead returns a version too high for the game
|
||||
// and causes SPURS to fail.
|
||||
//s32 sdk_version;
|
||||
|
||||
if (process_get_sdk_version(process_getpid(), sdk_version) != CELL_OK)
|
||||
{
|
||||
throw __FUNCTION__;
|
||||
}
|
||||
//if (process_get_sdk_version(process_getpid(), sdk_version) != CELL_OK)
|
||||
//{
|
||||
// throw __FUNCTION__;
|
||||
//}
|
||||
|
||||
return sdk_version;
|
||||
//return sdk_version;
|
||||
return 1;
|
||||
}
|
||||
|
||||
s32 spursCreateTask(vm::ptr<CellSpursTaskset> taskset, vm::ptr<u32> task_id, vm::ptr<u32> elf_addr, vm::ptr<u32> context_addr, u32 context_size, vm::ptr<CellSpursTaskLsPattern> ls_pattern, vm::ptr<CellSpursTaskArgument> arg)
|
||||
@ -2333,10 +2337,11 @@ s32 spursCreateTask(vm::ptr<CellSpursTaskset> taskset, vm::ptr<u32> task_id, vm:
|
||||
alloc_ls_blocks = context_size > 0x3D400 ? 0x7A : ((context_size - 0x400) >> 11);
|
||||
if (ls_pattern.addr() != 0)
|
||||
{
|
||||
u32 ls_blocks = 0;
|
||||
u128 ls_pattern_128 = u128::from64r(ls_pattern->_u64[0], ls_pattern->_u64[1]);
|
||||
u32 ls_blocks = 0;
|
||||
for (auto i = 0; i < 128; i++)
|
||||
{
|
||||
if (ls_pattern->_u128.value()._bit[i])
|
||||
if (ls_pattern_128._bit[i])
|
||||
{
|
||||
ls_blocks++;
|
||||
}
|
||||
@ -2348,7 +2353,7 @@ s32 spursCreateTask(vm::ptr<CellSpursTaskset> taskset, vm::ptr<u32> task_id, vm:
|
||||
}
|
||||
|
||||
u128 _0 = u128::from32(0);
|
||||
if ((ls_pattern->_u128.value() & u128::from32r(0xFC000000)) != _0)
|
||||
if ((ls_pattern_128 & u128::from32r(0xFC000000)) != _0)
|
||||
{
|
||||
// Prevent save/restore to SPURS management area
|
||||
return CELL_SPURS_TASK_ERROR_INVAL;
|
||||
@ -2432,19 +2437,19 @@ s32 cellSpursCreateTask(vm::ptr<CellSpursTaskset> taskset, vm::ptr<u32> taskId,
|
||||
|
||||
vm::var<u32> tmpTaskId;
|
||||
auto rc = spursCreateTask(taskset, tmpTaskId, vm::ptr<u32>::make(elf_addr), vm::ptr<u32>::make(context_addr), context_size, lsPattern, argument);
|
||||
if (rc != CELL_OK)
|
||||
{
|
||||
return rc;
|
||||
}
|
||||
if (rc != CELL_OK)
|
||||
{
|
||||
return rc;
|
||||
}
|
||||
|
||||
rc = spursTaskStart(taskset, tmpTaskId);
|
||||
if (rc != CELL_OK)
|
||||
{
|
||||
return rc;
|
||||
}
|
||||
rc = spursTaskStart(taskset, tmpTaskId);
|
||||
if (rc != CELL_OK)
|
||||
{
|
||||
return rc;
|
||||
}
|
||||
|
||||
*taskId = tmpTaskId;
|
||||
return CELL_OK;
|
||||
*taskId = tmpTaskId;
|
||||
return CELL_OK;
|
||||
}
|
||||
|
||||
s32 _cellSpursSendSignal(vm::ptr<CellSpursTaskset> taskset, u32 taskId)
|
||||
@ -2636,10 +2641,10 @@ s32 _cellSpursTaskAttribute2Initialize(vm::ptr<CellSpursTaskAttribute2> attribut
|
||||
attribute->revision = revision;
|
||||
attribute->sizeContext = 0;
|
||||
attribute->eaContext = 0;
|
||||
|
||||
|
||||
for (s32 c = 0; c < 4; c++)
|
||||
{
|
||||
attribute->lsPattern._u128 = u128::from64r(0);
|
||||
attribute->lsPattern._u32[c] = 0;
|
||||
}
|
||||
|
||||
attribute->name_addr = 0;
|
||||
|
@ -623,12 +623,14 @@ static_assert(sizeof(CellSpursEventFlag) == CellSpursEventFlag::size, "Wrong Cel
|
||||
|
||||
union CellSpursTaskArgument
|
||||
{
|
||||
be_t<u128> _u128;
|
||||
be_t<u32> _u32[4];
|
||||
be_t<u64> _u64[2];
|
||||
};
|
||||
|
||||
union CellSpursTaskLsPattern
|
||||
{
|
||||
be_t<u128> _u128;
|
||||
be_t<u32> _u32[4];
|
||||
be_t<u64> _u64[2];
|
||||
};
|
||||
|
||||
struct CellSpursTaskset
|
||||
@ -927,32 +929,32 @@ static_assert(sizeof(SpursKernelContext) == 0x190, "Incorrect size for SpursKern
|
||||
// The SPURS taskset policy module context. This resides at 0x2700 of the LS.
|
||||
struct SpursTasksetContext
|
||||
{
|
||||
u8 tempAreaTaskset[0x80]; // 0x2700
|
||||
u8 tempAreaTaskInfo[0x30]; // 0x2780
|
||||
be_t<u64> x27B0; // 0x27B0
|
||||
vm::bptr<CellSpursTaskset, 1, u64> taskset; // 0x27B8
|
||||
be_t<u32> kernelMgmtAddr; // 0x27C0
|
||||
be_t<u32> syscallAddr; // 0x27C4
|
||||
be_t<u32> x27C8; // 0x27C8
|
||||
be_t<u32> spuNum; // 0x27CC
|
||||
be_t<u32> dmaTagId; // 0x27D0
|
||||
be_t<u32> taskId; // 0x27D4
|
||||
u8 x27D8[0x2840 - 0x27D8]; // 0x27D8
|
||||
u8 moduleId[16]; // 0x2840
|
||||
u8 stackArea[0x2C80 - 0x2850]; // 0x2850
|
||||
be_t<u128> savedContextLr; // 0x2C80
|
||||
be_t<u128> savedContextSp; // 0x2C90
|
||||
be_t<u128> savedContextR80ToR127[48]; // 0x2CA0
|
||||
be_t<u128> savedContextFpscr; // 0x2FA0
|
||||
be_t<u32> savedWriteTagGroupQueryMask; // 0x2FB0
|
||||
be_t<u32> savedSpuWriteEventMask; // 0x2FB4
|
||||
be_t<u32> tasksetMgmtAddr; // 0x2FB8
|
||||
be_t<u32> guidAddr; // 0x2FBC
|
||||
be_t<u64> x2FC0; // 0x2FC0
|
||||
be_t<u64> x2FC8; // 0x2FC8
|
||||
be_t<u32> taskExitCode; // 0x2FD0
|
||||
be_t<u32> x2FD4; // 0x2FD4
|
||||
u8 x2FD8[0x3000 - 0x2FD8]; // 0x2FD8
|
||||
u8 tempAreaTaskset[0x80]; // 0x2700
|
||||
u8 tempAreaTaskInfo[0x30]; // 0x2780
|
||||
be_t<u64> x27B0; // 0x27B0
|
||||
vm::bptr<CellSpursTaskset, 1, u64> taskset; // 0x27B8
|
||||
be_t<u32> kernelMgmtAddr; // 0x27C0
|
||||
be_t<u32> syscallAddr; // 0x27C4
|
||||
be_t<u32> x27C8; // 0x27C8
|
||||
be_t<u32> spuNum; // 0x27CC
|
||||
be_t<u32> dmaTagId; // 0x27D0
|
||||
be_t<u32> taskId; // 0x27D4
|
||||
u8 x27D8[0x2840 - 0x27D8]; // 0x27D8
|
||||
u8 moduleId[16]; // 0x2840
|
||||
u8 stackArea[0x2C80 - 0x2850]; // 0x2850
|
||||
be_t<u128> savedContextLr; // 0x2C80
|
||||
be_t<u128> savedContextSp; // 0x2C90
|
||||
be_t<u128> savedContextR80ToR127[48]; // 0x2CA0
|
||||
be_t<u128> savedContextFpscr; // 0x2FA0
|
||||
be_t<u32> savedWriteTagGroupQueryMask; // 0x2FB0
|
||||
be_t<u32> savedSpuWriteEventMask; // 0x2FB4
|
||||
be_t<u32> tasksetMgmtAddr; // 0x2FB8
|
||||
be_t<u32> guidAddr; // 0x2FBC
|
||||
be_t<u64> x2FC0; // 0x2FC0
|
||||
be_t<u64> x2FC8; // 0x2FC8
|
||||
be_t<u32> taskExitCode; // 0x2FD0
|
||||
be_t<u32> x2FD4; // 0x2FD4
|
||||
u8 x2FD8[0x3000 - 0x2FD8]; // 0x2FD8
|
||||
};
|
||||
|
||||
static_assert(sizeof(SpursTasksetContext) == 0x900, "Incorrect size for SpursTasksetContext");
|
||||
|
@ -156,19 +156,19 @@ void spursHalt(SPUThread & spu) {
|
||||
|
||||
/// Select a workload to run
|
||||
bool spursKernel1SelectWorkload(SPUThread & spu) {
|
||||
auto ctxt = vm::get_ptr<SpursKernelContext>(spu.ls_offset + 0x100);
|
||||
auto ctxt = vm::get_ptr<SpursKernelContext>(spu.ls_offset + 0x100);
|
||||
|
||||
// The first and only argument to this function is a boolean that is set to false if the function
|
||||
// is called by the SPURS kernel and set to true if called by cellSpursModulePollStatus.
|
||||
// If the first argument is true then the shared data is not updated with the result.
|
||||
const auto isPoll = spu.GPR[3]._u32[3];
|
||||
const auto isPoll = spu.GPR[3]._u32[3];
|
||||
|
||||
u32 wklSelectedId;
|
||||
u32 pollStatus;
|
||||
u32 wklSelectedId;
|
||||
u32 pollStatus;
|
||||
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr()), 128, [&]() {
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr()), 128, [&]() {
|
||||
// lock the first 0x80 bytes of spurs
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
|
||||
// Calculate the contention (number of SPUs used) for each workload
|
||||
u8 contention[CELL_SPURS_MAX_WORKLOAD];
|
||||
@ -302,7 +302,7 @@ bool spursKernel1SelectWorkload(SPUThread & spu) {
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x100), spurs, 128);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x100), spurs, 128);
|
||||
});
|
||||
|
||||
u64 result = (u64)wklSelectedId << 32;
|
||||
@ -323,9 +323,9 @@ bool spursKernel2SelectWorkload(SPUThread & spu) {
|
||||
u32 wklSelectedId;
|
||||
u32 pollStatus;
|
||||
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr()), 128, [&]() {
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr()), 128, [&]() {
|
||||
// lock the first 0x80 bytes of spurs
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
|
||||
// Calculate the contention (number of SPUs used) for each workload
|
||||
u8 contention[CELL_SPURS_MAX_WORKLOAD2];
|
||||
@ -449,7 +449,7 @@ bool spursKernel2SelectWorkload(SPUThread & spu) {
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x100), spurs, 128);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x100), spurs, 128);
|
||||
});
|
||||
|
||||
u64 result = (u64)wklSelectedId << 32;
|
||||
@ -471,7 +471,7 @@ void spursKernelDispatchWorkload(SPUThread & spu, u64 widAndPollStatus) {
|
||||
wid < CELL_SPURS_MAX_WORKLOAD2 && isKernel2 ? &ctxt->spurs->m.wklInfo2[wid & 0xf] :
|
||||
&ctxt->spurs->m.wklInfoSysSrv;
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x3FFE0), wklInfoOffset, 0x20);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x3FFE0), wklInfoOffset, 0x20);
|
||||
|
||||
// Load the workload to LS
|
||||
auto wklInfo = vm::get_ptr<CellSpurs::WorkloadInfo>(spu.ls_offset + 0x3FFE0);
|
||||
@ -484,7 +484,7 @@ void spursKernelDispatchWorkload(SPUThread & spu, u64 widAndPollStatus) {
|
||||
spu.RegisterHleFunction(0xA00, spursTasksetEntry);
|
||||
break;
|
||||
default:
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0xA00), wklInfo->addr.get_ptr(), wklInfo->size);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0xA00), wklInfo->addr.get_ptr(), wklInfo->size);
|
||||
break;
|
||||
}
|
||||
|
||||
@ -598,7 +598,7 @@ void spursSysServiceIdleHandler(SPUThread & spu, SpursKernelContext * ctxt) {
|
||||
bool shouldExit;
|
||||
|
||||
while (true) {
|
||||
vm::reservation_acquire(vm::get_ptr(spu.ls_offset + 0x100), vm::cast(ctxt->spurs.addr()), 128, [&spu](){ spu.Notify(); });
|
||||
vm::reservation_acquire(vm::get_ptr(spu.ls_offset + 0x100), vm::cast(ctxt->spurs.addr()), 128, [&spu](){ spu.Notify(); });
|
||||
auto spurs = vm::get_ptr<CellSpurs>(spu.ls_offset + 0x100);
|
||||
|
||||
// Find the number of SPUs that are idling in this SPURS instance
|
||||
@ -665,11 +665,11 @@ void spursSysServiceIdleHandler(SPUThread & spu, SpursKernelContext * ctxt) {
|
||||
// If all SPUs are idling and the exit_if_no_work flag is set then the SPU thread group must exit. Otherwise wait for external events.
|
||||
if (spuIdling && shouldExit == false && foundReadyWorkload == false) {
|
||||
// The system service blocks by making a reservation and waiting on the lock line reservation lost event.
|
||||
spu.WaitForAnySignal(1);
|
||||
if (Emu.IsStopped()) return;
|
||||
spu.WaitForAnySignal(1);
|
||||
if (Emu.IsStopped()) return;
|
||||
}
|
||||
|
||||
if (vm::reservation_update(vm::cast(ctxt->spurs.addr()), vm::get_ptr(spu.ls_offset + 0x100), 128) && (shouldExit || foundReadyWorkload)) {
|
||||
if (vm::reservation_update(vm::cast(ctxt->spurs.addr()), vm::get_ptr(spu.ls_offset + 0x100), 128) && (shouldExit || foundReadyWorkload)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -684,7 +684,7 @@ void spursSysServiceMain(SPUThread & spu, u32 pollStatus) {
|
||||
auto ctxt = vm::get_ptr<SpursKernelContext>(spu.ls_offset + 0x100);
|
||||
|
||||
if (ctxt->spurs.addr() % CellSpurs::align) {
|
||||
assert(!"spursSysServiceMain(): invalid spurs alignment");
|
||||
assert(!"spursSysServiceMain(): invalid spurs alignment");
|
||||
//spursHalt(spu);
|
||||
//return;
|
||||
}
|
||||
@ -693,22 +693,22 @@ void spursSysServiceMain(SPUThread & spu, u32 pollStatus) {
|
||||
if (ctxt->sysSrvInitialised == 0) {
|
||||
ctxt->sysSrvInitialised = 1;
|
||||
|
||||
vm::reservation_acquire(vm::get_ptr(spu.ls_offset + 0x100), vm::cast(ctxt->spurs.addr()), 128);
|
||||
vm::reservation_acquire(vm::get_ptr(spu.ls_offset + 0x100), vm::cast(ctxt->spurs.addr()), 128);
|
||||
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
|
||||
// Halt if already initialised
|
||||
if (spurs->m.sysSrvOnSpu & (1 << ctxt->spuNum)) {
|
||||
assert(!"spursSysServiceMain(): already initialized");
|
||||
assert(!"spursSysServiceMain(): already initialized");
|
||||
//spursHalt(spu);
|
||||
//return;
|
||||
}
|
||||
|
||||
spurs->m.sysSrvOnSpu |= 1 << ctxt->spuNum;
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
});
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
});
|
||||
|
||||
ctxt->traceBuffer = 0;
|
||||
ctxt->traceMsgCount = -1;
|
||||
@ -773,7 +773,7 @@ poll:
|
||||
cellSpursModulePutTrace(&pkt, ctxt->dmaTagId);
|
||||
|
||||
spursSysServiceIdleHandler(spu, ctxt);
|
||||
if (Emu.IsStopped()) return;
|
||||
if (Emu.IsStopped()) return;
|
||||
|
||||
goto poll;
|
||||
}
|
||||
@ -785,8 +785,8 @@ void spursSysServiceProcessRequests(SPUThread & spu, SpursKernelContext * ctxt)
|
||||
bool updateWorkload = false;
|
||||
bool terminate = false;
|
||||
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
|
||||
// Terminate request
|
||||
if (spurs->m.sysSrvMsgTerminate & (1 << ctxt->spuNum)) {
|
||||
@ -805,7 +805,7 @@ void spursSysServiceProcessRequests(SPUThread & spu, SpursKernelContext * ctxt)
|
||||
updateTrace = true;
|
||||
}
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
});
|
||||
|
||||
// Process update workload message
|
||||
@ -827,9 +827,9 @@ void spursSysServiceProcessRequests(SPUThread & spu, SpursKernelContext * ctxt)
|
||||
/// Activate a workload
|
||||
void spursSysServiceActivateWorkload(SPUThread & spu, SpursKernelContext * ctxt) {
|
||||
auto spurs = vm::get_ptr<CellSpurs>(spu.ls_offset + 0x100);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x30000), vm::get_ptr(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklInfo1))), 0x200);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x30000), vm::get_ptr(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklInfo1))), 0x200);
|
||||
if (spurs->m.flags1 & SF1_32_WORKLOADS) {
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x30200), vm::get_ptr(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklInfo2))), 0x200);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x30200), vm::get_ptr(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklInfo2))), 0x200);
|
||||
}
|
||||
|
||||
u32 wklShutdownBitSet = 0;
|
||||
@ -852,8 +852,8 @@ void spursSysServiceActivateWorkload(SPUThread & spu, SpursKernelContext * ctxt)
|
||||
}
|
||||
}
|
||||
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
|
||||
for (u32 i = 0; i < CELL_SPURS_MAX_WORKLOAD; i++) {
|
||||
// Update workload status and runnable flag based on the workload state
|
||||
@ -895,7 +895,7 @@ void spursSysServiceActivateWorkload(SPUThread & spu, SpursKernelContext * ctxt)
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
});
|
||||
|
||||
if (wklShutdownBitSet) {
|
||||
@ -909,8 +909,8 @@ void spursSysServiceUpdateShutdownCompletionEvents(SPUThread & spu, SpursKernelC
|
||||
// workloads that have a shutdown completion hook registered
|
||||
u32 wklNotifyBitSet;
|
||||
u8 spuPort;
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
|
||||
wklNotifyBitSet = 0;
|
||||
spuPort = spurs->m.spuPort;;
|
||||
@ -930,7 +930,7 @@ void spursSysServiceUpdateShutdownCompletionEvents(SPUThread & spu, SpursKernelC
|
||||
}
|
||||
}
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
});
|
||||
|
||||
if (wklNotifyBitSet) {
|
||||
@ -951,8 +951,8 @@ void spursSysServiceTraceUpdate(SPUThread & spu, SpursKernelContext * ctxt, u32
|
||||
bool notify;
|
||||
|
||||
u8 sysSrvMsgUpdateTrace;
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
|
||||
sysSrvMsgUpdateTrace = spurs->m.sysSrvMsgUpdateTrace;
|
||||
spurs->m.sysSrvMsgUpdateTrace &= ~(1 << ctxt->spuNum);
|
||||
@ -970,18 +970,18 @@ void spursSysServiceTraceUpdate(SPUThread & spu, SpursKernelContext * ctxt, u32
|
||||
notify = true;
|
||||
}
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
});
|
||||
|
||||
// Get trace parameters from CellSpurs and store them in the LS
|
||||
if (((sysSrvMsgUpdateTrace & (1 << ctxt->spuNum)) != 0) || (arg3 != 0)) {
|
||||
vm::reservation_acquire(vm::get_ptr(spu.ls_offset + 0x80), vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.traceBuffer)), 128);
|
||||
vm::reservation_acquire(vm::get_ptr(spu.ls_offset + 0x80), vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.traceBuffer)), 128);
|
||||
auto spurs = vm::get_ptr<CellSpurs>(spu.ls_offset + 0x80 - offsetof(CellSpurs, m.traceBuffer));
|
||||
|
||||
if (ctxt->traceMsgCount != 0xFF || spurs->m.traceBuffer.addr() == 0) {
|
||||
spursSysServiceTraceSaveCount(spu, ctxt);
|
||||
} else {
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2C00), vm::get_ptr(spurs->m.traceBuffer.addr() & -0x4), 0x80);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2C00), vm::get_ptr(spurs->m.traceBuffer.addr() & -0x4), 0x80);
|
||||
auto traceBuffer = vm::get_ptr<CellSpursTraceInfo>(spu.ls_offset + 0x2C00);
|
||||
ctxt->traceMsgCount = traceBuffer->count[ctxt->spuNum];
|
||||
}
|
||||
@ -1003,28 +1003,28 @@ void spursSysServiceTraceUpdate(SPUThread & spu, SpursKernelContext * ctxt, u32
|
||||
void spursSysServiceCleanupAfterSystemWorkload(SPUThread & spu, SpursKernelContext * ctxt) {
|
||||
u8 wklId;
|
||||
|
||||
bool do_return = false;
|
||||
bool do_return = false;
|
||||
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr() + offsetof(CellSpurs, m.wklState1)), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
|
||||
if (spurs->m.sysSrvWorkload[ctxt->spuNum] == 0xFF) {
|
||||
do_return = true;
|
||||
do_return = true;
|
||||
return;
|
||||
}
|
||||
|
||||
wklId = spurs->m.sysSrvWorkload[ctxt->spuNum];
|
||||
spurs->m.sysSrvWorkload[ctxt->spuNum] = 0xFF;
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2D80), spurs->m.wklState1, 128);
|
||||
});
|
||||
|
||||
if (do_return) return;
|
||||
if (do_return) return;
|
||||
|
||||
spursSysServiceActivateWorkload(spu, ctxt);
|
||||
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr()), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
vm::reservation_op(vm::cast(ctxt->spurs.addr()), 128, [&]() {
|
||||
auto spurs = ctxt->spurs.get_priv_ptr();
|
||||
|
||||
if (wklId >= CELL_SPURS_MAX_WORKLOAD) {
|
||||
spurs->m.wklCurrentContention[wklId & 0x0F] -= 0x10;
|
||||
@ -1034,7 +1034,7 @@ void spursSysServiceCleanupAfterSystemWorkload(SPUThread & spu, SpursKernelConte
|
||||
spurs->m.wklIdleSpuCountOrReadyCount2[wklId & 0x0F].write_relaxed(spurs->m.wklIdleSpuCountOrReadyCount2[wklId & 0x0F].read_relaxed() - 1);
|
||||
}
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x100), spurs, 128);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x100), spurs, 128);
|
||||
});
|
||||
|
||||
// Set the current workload id to the id of the pre-empted workload since cellSpursModulePutTrace
|
||||
@ -1140,7 +1140,7 @@ void spursTasksetStartTask(SPUThread & spu, CellSpursTaskArgument & taskArgs) {
|
||||
auto taskset = vm::get_ptr<CellSpursTaskset>(spu.ls_offset + 0x2700);
|
||||
|
||||
spu.GPR[2].clear();
|
||||
spu.GPR[3] = taskArgs._u128;
|
||||
spu.GPR[3] = u128::from64r(taskArgs._u64[0], taskArgs._u64[1]);
|
||||
spu.GPR[4]._u64[1] = taskset->m.args;
|
||||
spu.GPR[4]._u64[0] = taskset->m.spurs.addr();
|
||||
for (auto i = 5; i < 128; i++) {
|
||||
@ -1157,14 +1157,14 @@ s32 spursTasksetProcessRequest(SPUThread & spu, s32 request, u32 * taskId, u32 *
|
||||
|
||||
s32 rc = CELL_OK;
|
||||
s32 numNewlyReadyTasks;
|
||||
vm::reservation_op(vm::cast(ctxt->taskset.addr()), 128, [&]() {
|
||||
auto taskset = ctxt->taskset.get_priv_ptr();
|
||||
vm::reservation_op(vm::cast(ctxt->taskset.addr()), 128, [&]() {
|
||||
auto taskset = ctxt->taskset.get_priv_ptr();
|
||||
|
||||
// Verify taskset state is valid
|
||||
auto _0 = be_t<u128>::make(u128::from32(0));
|
||||
if ((taskset->m.waiting & taskset->m.running) != _0 || (taskset->m.ready & taskset->m.pending_ready) != _0 ||
|
||||
((taskset->m.running | taskset->m.ready | taskset->m.pending_ready | taskset->m.signalled | taskset->m.waiting) & be_t<u128>::make(~taskset->m.enabled.value())) != _0) {
|
||||
assert(!"Invalid taskset state");
|
||||
assert(!"Invalid taskset state");
|
||||
//spursHalt(spu);
|
||||
//return CELL_OK;
|
||||
}
|
||||
@ -1282,7 +1282,7 @@ s32 spursTasksetProcessRequest(SPUThread & spu, s32 request, u32 * taskId, u32 *
|
||||
}
|
||||
break;
|
||||
default:
|
||||
assert(!"Unknown taskset request");
|
||||
assert(!"Unknown taskset request");
|
||||
//spursHalt(spu);
|
||||
//return CELL_OK;
|
||||
}
|
||||
@ -1294,12 +1294,12 @@ s32 spursTasksetProcessRequest(SPUThread & spu, s32 request, u32 * taskId, u32 *
|
||||
taskset->m.signalled = signalled;
|
||||
taskset->m.ready = ready;
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2700), taskset, 128);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2700), taskset, 128);
|
||||
});
|
||||
|
||||
// Increment the ready count of the workload by the number of tasks that have become ready
|
||||
vm::reservation_op(vm::cast(kernelCtxt->spurs.addr()), 128, [&]() {
|
||||
auto spurs = kernelCtxt->spurs.get_priv_ptr();
|
||||
vm::reservation_op(vm::cast(kernelCtxt->spurs.addr()), 128, [&]() {
|
||||
auto spurs = kernelCtxt->spurs.get_priv_ptr();
|
||||
|
||||
s32 readyCount = kernelCtxt->wklCurrentId < CELL_SPURS_MAX_WORKLOAD ? spurs->m.wklReadyCount1[kernelCtxt->wklCurrentId].read_relaxed() : spurs->m.wklIdleSpuCountOrReadyCount2[kernelCtxt->wklCurrentId & 0x0F].read_relaxed();
|
||||
readyCount += numNewlyReadyTasks;
|
||||
@ -1311,7 +1311,7 @@ s32 spursTasksetProcessRequest(SPUThread & spu, s32 request, u32 * taskId, u32 *
|
||||
spurs->m.wklIdleSpuCountOrReadyCount2[kernelCtxt->wklCurrentId & 0x0F].write_relaxed(readyCount);
|
||||
}
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x100), spurs, 128);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x100), spurs, 128);
|
||||
});
|
||||
|
||||
return rc;
|
||||
@ -1350,7 +1350,7 @@ void spursTasksetExit(SPUThread & spu) {
|
||||
// Not sure why this check exists. Perhaps to check for memory corruption.
|
||||
if (memcmp(ctxt->moduleId, "SPURSTASK MODULE", 16) != 0) {
|
||||
//spursHalt(spu);
|
||||
assert(!"spursTasksetExit(): memory corruption");
|
||||
assert(!"spursTasksetExit(): memory corruption");
|
||||
}
|
||||
|
||||
cellSpursModuleExit(spu);
|
||||
@ -1360,7 +1360,7 @@ void spursTasksetExit(SPUThread & spu) {
|
||||
void spursTasksetOnTaskExit(SPUThread & spu, u64 addr, u32 taskId, s32 exitCode, u64 args) {
|
||||
auto ctxt = vm::get_ptr<SpursTasksetContext>(spu.ls_offset + 0x2700);
|
||||
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x10000), vm::get_ptr(addr & -0x80), (addr & 0x7F) << 11);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x10000), vm::get_ptr(addr & -0x80), (addr & 0x7F) << 11);
|
||||
|
||||
spu.GPR[3]._u64[1] = ctxt->taskset.addr();
|
||||
spu.GPR[4]._u32[3] = taskId;
|
||||
@ -1382,8 +1382,9 @@ s32 spursTasketSaveTaskContext(SPUThread & spu) {
|
||||
|
||||
u32 allocLsBlocks = taskInfo->context_save_storage_and_alloc_ls_blocks & 0x7F;
|
||||
u32 lsBlocks = 0;
|
||||
u128 ls_pattern = u128::from64r(taskInfo->ls_pattern._u64[0], taskInfo->ls_pattern._u64[1]);
|
||||
for (auto i = 0; i < 128; i++) {
|
||||
if (taskInfo->ls_pattern._u128.value()._bit[i]) {
|
||||
if (ls_pattern._bit[i]) {
|
||||
lsBlocks++;
|
||||
}
|
||||
}
|
||||
@ -1394,7 +1395,7 @@ s32 spursTasketSaveTaskContext(SPUThread & spu) {
|
||||
|
||||
// Make sure the stack is area is specified in the ls pattern
|
||||
for (auto i = (ctxt->savedContextSp.value()._u32[3]) >> 11; i < 128; i++) {
|
||||
if (taskInfo->ls_pattern._u128.value()._bit[i] == false) {
|
||||
if (ls_pattern._bit[i] == false) {
|
||||
return CELL_SPURS_TASK_ERROR_STAT;
|
||||
}
|
||||
}
|
||||
@ -1410,13 +1411,13 @@ s32 spursTasketSaveTaskContext(SPUThread & spu) {
|
||||
|
||||
// Store the processor context
|
||||
const u32 contextSaveStorage = vm::cast(taskInfo->context_save_storage_and_alloc_ls_blocks & -0x80);
|
||||
memcpy(vm::get_ptr(contextSaveStorage), vm::get_ptr(spu.ls_offset + 0x2C80), 0x380);
|
||||
memcpy(vm::get_ptr(contextSaveStorage), vm::get_ptr(spu.ls_offset + 0x2C80), 0x380);
|
||||
|
||||
// Save LS context
|
||||
for (auto i = 6; i < 128; i++) {
|
||||
if (taskInfo->ls_pattern._u128.value()._bit[i]) {
|
||||
if (ls_pattern._bit[i]) {
|
||||
// TODO: Combine DMA requests for consecutive blocks into a single request
|
||||
memcpy(vm::get_ptr(contextSaveStorage + 0x400 + ((i - 6) << 11)), vm::get_ptr(spu.ls_offset + CELL_SPURS_TASK_TOP + ((i - 6) << 11)), 0x800);
|
||||
memcpy(vm::get_ptr(contextSaveStorage + 0x400 + ((i - 6) << 11)), vm::get_ptr(spu.ls_offset + CELL_SPURS_TASK_TOP + ((i - 6) << 11)), 0x800);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1440,7 +1441,7 @@ void spursTasksetDispatch(SPUThread & spu) {
|
||||
ctxt->taskId = taskId;
|
||||
|
||||
// DMA in the task info for the selected task
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2780), &ctxt->taskset->m.task_info[taskId], sizeof(CellSpursTaskset::TaskInfo));
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2780), &ctxt->taskset->m.task_info[taskId], sizeof(CellSpursTaskset::TaskInfo));
|
||||
auto taskInfo = vm::get_ptr<CellSpursTaskset::TaskInfo>(spu.ls_offset + 0x2780);
|
||||
auto elfAddr = taskInfo->elf_addr.addr().value();
|
||||
taskInfo->elf_addr.set(taskInfo->elf_addr.addr() & 0xFFFFFFFFFFFFFFF8ull);
|
||||
@ -1461,7 +1462,7 @@ void spursTasksetDispatch(SPUThread & spu) {
|
||||
u32 entryPoint;
|
||||
u32 lowestLoadAddr;
|
||||
if (spursTasksetLoadElf(spu, &entryPoint, &lowestLoadAddr, taskInfo->elf_addr.addr(), false) != CELL_OK) {
|
||||
assert(!"spursTaskLoadElf() failed");
|
||||
assert(!"spursTaskLoadElf() failed");
|
||||
//spursHalt(spu);
|
||||
//return;
|
||||
}
|
||||
@ -1476,7 +1477,7 @@ void spursTasksetDispatch(SPUThread & spu) {
|
||||
ctxt->x2FD4 = elfAddr & 5; // TODO: Figure this out
|
||||
|
||||
if ((elfAddr & 5) == 1) {
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2FC0), &((CellSpursTaskset2*)(ctxt->taskset.get_ptr()))->m.task_exit_code[taskId], 0x10);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2FC0), &((CellSpursTaskset2*)(ctxt->taskset.get_ptr()))->m.task_exit_code[taskId], 0x10);
|
||||
}
|
||||
|
||||
// Trace - GUID
|
||||
@ -1498,11 +1499,12 @@ void spursTasksetDispatch(SPUThread & spu) {
|
||||
}
|
||||
|
||||
// If the entire LS is saved then there is no need to load the ELF as it will be be saved in the context save area as well
|
||||
if (taskInfo->ls_pattern._u128.value() != u128::from64r(0x03FFFFFFFFFFFFFFull, 0xFFFFFFFFFFFFFFFFull)) {
|
||||
u128 ls_pattern = u128::from64r(taskInfo->ls_pattern._u64[0], taskInfo->ls_pattern._u64[1]);
|
||||
if (ls_pattern != u128::from64r(0x03FFFFFFFFFFFFFFull, 0xFFFFFFFFFFFFFFFFull)) {
|
||||
// Load the ELF
|
||||
u32 entryPoint;
|
||||
if (spursTasksetLoadElf(spu, &entryPoint, nullptr, taskInfo->elf_addr.addr(), true) != CELL_OK) {
|
||||
assert(!"spursTasksetLoadElf() failed");
|
||||
assert(!"spursTasksetLoadElf() failed");
|
||||
//spursHalt(spu);
|
||||
//return;
|
||||
}
|
||||
@ -1510,11 +1512,11 @@ void spursTasksetDispatch(SPUThread & spu) {
|
||||
|
||||
// Load saved context from main memory to LS
|
||||
const u32 contextSaveStorage = vm::cast(taskInfo->context_save_storage_and_alloc_ls_blocks & -0x80);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2C80), vm::get_ptr(contextSaveStorage), 0x380);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + 0x2C80), vm::get_ptr(contextSaveStorage), 0x380);
|
||||
for (auto i = 6; i < 128; i++) {
|
||||
if (taskInfo->ls_pattern._u128.value()._bit[i]) {
|
||||
if (ls_pattern._bit[i]) {
|
||||
// TODO: Combine DMA requests for consecutive blocks into a single request
|
||||
memcpy(vm::get_ptr(spu.ls_offset + CELL_SPURS_TASK_TOP + ((i - 6) << 11)), vm::get_ptr(contextSaveStorage + 0x400 + ((i - 6) << 11)), 0x800);
|
||||
memcpy(vm::get_ptr(spu.ls_offset + CELL_SPURS_TASK_TOP + ((i - 6) << 11)), vm::get_ptr(contextSaveStorage + 0x400 + ((i - 6) << 11)), 0x800);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1597,7 +1599,7 @@ s32 spursTasksetProcessSyscall(SPUThread & spu, u32 syscallNum, u32 args) {
|
||||
break;
|
||||
case CELL_SPURS_TASK_SYSCALL_RECV_WKL_FLAG:
|
||||
if (args == 0) { // TODO: Figure this out
|
||||
assert(!"args == 0");
|
||||
assert(!"args == 0");
|
||||
//spursHalt(spu);
|
||||
}
|
||||
|
||||
|
@ -162,6 +162,17 @@ PPUThread* ppu_thread_create(u32 entry, u64 arg, s32 prio, u32 stacksize, bool i
|
||||
{
|
||||
PPUThread& new_thread = *(PPUThread*)&Emu.GetCPU().AddThread(CPU_THREAD_PPU);
|
||||
|
||||
// Note: (Syphurith) I haven't figured out the minimum stack size of PPU Thread.
|
||||
// Maybe it can be done with pthread_attr_getstacksize function.
|
||||
// And i toke 4096 (PTHREAD_STACK_MIN, and the smallest allocation unit) for this.
|
||||
if ((stacksize % 4096) || (stacksize == 0)) {
|
||||
// If not times of smallest allocation unit, round it up to the nearest one.
|
||||
// And regard zero as a same condition.
|
||||
sys_ppu_thread.Warning("sys_ppu_thread_create: stacksize increased from 0x%x to 0x%x.",
|
||||
stacksize, 4096 * ((u32)(stacksize / 4096) + 1));
|
||||
stacksize = 4096 * ((u32)(stacksize / 4096) + 1);
|
||||
}
|
||||
|
||||
u32 id = new_thread.GetId();
|
||||
new_thread.SetEntry(entry);
|
||||
new_thread.SetPrio(prio);
|
||||
|
Loading…
Reference in New Issue
Block a user