1
0
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:
Raul Tambre 2015-02-20 12:59:31 +02:00
commit 948758f758
11 changed files with 525 additions and 460 deletions

View File

@ -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 */

View File

@ -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);

View File

@ -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)

View File

@ -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);
@ -59,7 +61,7 @@ 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)
@ -87,6 +89,7 @@ void GLProgram::UnUse()
void GLProgram::Use()
{
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();

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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)
{
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;
@ -2639,7 +2644,7 @@ s32 _cellSpursTaskAttribute2Initialize(vm::ptr<CellSpursTaskAttribute2> attribut
for (s32 c = 0; c < 4; c++)
{
attribute->lsPattern._u128 = u128::from64r(0);
attribute->lsPattern._u32[c] = 0;
}
attribute->name_addr = 0;

View File

@ -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

View File

@ -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++) {
@ -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;
}
}
@ -1414,7 +1415,7 @@ s32 spursTasketSaveTaskContext(SPUThread & spu) {
// 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);
}
@ -1498,7 +1499,8 @@ 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) {
@ -1512,7 +1514,7 @@ void spursTasksetDispatch(SPUThread & spu) {
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);
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);
}

View File

@ -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);