mirror of
https://github.com/holub/mame
synced 2025-07-06 02:18:09 +03:00
Merge remote-tracking branch 'refs/remotes/mamedev/master' into integer_scaling_v2
This commit is contained in:
commit
57b1c6ab77
1
.gitignore
vendored
1
.gitignore
vendored
@ -31,6 +31,7 @@
|
||||
!/makefile
|
||||
!/mame.doxygen
|
||||
!/*.md
|
||||
!/*.bdc
|
||||
!/LICENSE
|
||||
/.idea
|
||||
regtests/chdman/temp
|
||||
|
@ -73,6 +73,7 @@
|
||||
#define _Out_writes_bytes_opt_(size)
|
||||
#define _Out_writes_bytes_to_(size,count)
|
||||
#define _Outptr_
|
||||
#define _Outptr_opt_
|
||||
#define _Outptr_opt_result_maybenull_
|
||||
#define _Outptr_opt_result_bytebuffer_(size)
|
||||
#define _Outptr_result_maybenull_
|
||||
|
399
3rdparty/bgfx/3rdparty/khronos/gl/glcorearb.h
vendored
399
3rdparty/bgfx/3rdparty/khronos/gl/glcorearb.h
vendored
@ -6,7 +6,7 @@ extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
** Copyright (c) 2013 The Khronos Group Inc.
|
||||
** Copyright (c) 2013-2016 The Khronos Group Inc.
|
||||
**
|
||||
** Permission is hereby granted, free of charge, to any person obtaining a
|
||||
** copy of this software and/or associated documentation files (the
|
||||
@ -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: 23728 $ on $Date: 2013-10-28 14:53:57 -0700 (Mon, 28 Oct 2013) $
|
||||
** Khronos $Revision: 32433 $ on $Date: 2016-02-09 23:02:08 -0800 (Tue, 09 Feb 2016) $
|
||||
*/
|
||||
|
||||
#if defined(_WIN32) && !defined(APIENTRY) && !defined(__CYGWIN__) && !defined(__SCITECH_SNAP__)
|
||||
@ -102,7 +102,7 @@ typedef void (APIENTRYP PFNGLTEXPARAMETERIPROC) (GLenum target, GLenum pname, GL
|
||||
typedef void (APIENTRYP PFNGLTEXPARAMETERIVPROC) (GLenum target, GLenum pname, const GLint *params);
|
||||
typedef void (APIENTRYP PFNGLTEXIMAGE1DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (APIENTRYP PFNGLTEXIMAGE2DPROC) (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (APIENTRYP PFNGLDRAWBUFFERPROC) (GLenum mode);
|
||||
typedef void (APIENTRYP PFNGLDRAWBUFFERPROC) (GLenum buf);
|
||||
typedef void (APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
|
||||
typedef void (APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
typedef void (APIENTRYP PFNGLCLEARSTENCILPROC) (GLint s);
|
||||
@ -121,7 +121,7 @@ typedef void (APIENTRYP PFNGLSTENCILOPPROC) (GLenum fail, GLenum zfail, GLenum z
|
||||
typedef void (APIENTRYP PFNGLDEPTHFUNCPROC) (GLenum func);
|
||||
typedef void (APIENTRYP PFNGLPIXELSTOREFPROC) (GLenum pname, GLfloat param);
|
||||
typedef void (APIENTRYP PFNGLPIXELSTOREIPROC) (GLenum pname, GLint param);
|
||||
typedef void (APIENTRYP PFNGLREADBUFFERPROC) (GLenum mode);
|
||||
typedef void (APIENTRYP PFNGLREADBUFFERPROC) (GLenum src);
|
||||
typedef void (APIENTRYP PFNGLREADPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
typedef void (APIENTRYP PFNGLGETBOOLEANVPROC) (GLenum pname, GLboolean *data);
|
||||
typedef void (APIENTRYP PFNGLGETDOUBLEVPROC) (GLenum pname, GLdouble *data);
|
||||
@ -151,7 +151,7 @@ GLAPI void APIENTRY glTexParameteri (GLenum target, GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glTexParameteriv (GLenum target, GLenum pname, const GLint *params);
|
||||
GLAPI void APIENTRY glTexImage1D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
GLAPI void APIENTRY glTexImage2D (GLenum target, GLint level, GLint internalformat, GLsizei width, GLsizei height, GLint border, GLenum format, GLenum type, const void *pixels);
|
||||
GLAPI void APIENTRY glDrawBuffer (GLenum mode);
|
||||
GLAPI void APIENTRY glDrawBuffer (GLenum buf);
|
||||
GLAPI void APIENTRY glClear (GLbitfield mask);
|
||||
GLAPI void APIENTRY glClearColor (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
|
||||
GLAPI void APIENTRY glClearStencil (GLint s);
|
||||
@ -170,7 +170,7 @@ GLAPI void APIENTRY glStencilOp (GLenum fail, GLenum zfail, GLenum zpass);
|
||||
GLAPI void APIENTRY glDepthFunc (GLenum func);
|
||||
GLAPI void APIENTRY glPixelStoref (GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glPixelStorei (GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glReadBuffer (GLenum mode);
|
||||
GLAPI void APIENTRY glReadBuffer (GLenum src);
|
||||
GLAPI void APIENTRY glReadPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, void *pixels);
|
||||
GLAPI void APIENTRY glGetBooleanv (GLenum pname, GLboolean *data);
|
||||
GLAPI void APIENTRY glGetDoublev (GLenum pname, GLdouble *data);
|
||||
@ -1160,6 +1160,22 @@ typedef unsigned short GLhalf;
|
||||
#define GL_COLOR_ATTACHMENT13 0x8CED
|
||||
#define GL_COLOR_ATTACHMENT14 0x8CEE
|
||||
#define GL_COLOR_ATTACHMENT15 0x8CEF
|
||||
#define GL_COLOR_ATTACHMENT16 0x8CF0
|
||||
#define GL_COLOR_ATTACHMENT17 0x8CF1
|
||||
#define GL_COLOR_ATTACHMENT18 0x8CF2
|
||||
#define GL_COLOR_ATTACHMENT19 0x8CF3
|
||||
#define GL_COLOR_ATTACHMENT20 0x8CF4
|
||||
#define GL_COLOR_ATTACHMENT21 0x8CF5
|
||||
#define GL_COLOR_ATTACHMENT22 0x8CF6
|
||||
#define GL_COLOR_ATTACHMENT23 0x8CF7
|
||||
#define GL_COLOR_ATTACHMENT24 0x8CF8
|
||||
#define GL_COLOR_ATTACHMENT25 0x8CF9
|
||||
#define GL_COLOR_ATTACHMENT26 0x8CFA
|
||||
#define GL_COLOR_ATTACHMENT27 0x8CFB
|
||||
#define GL_COLOR_ATTACHMENT28 0x8CFC
|
||||
#define GL_COLOR_ATTACHMENT29 0x8CFD
|
||||
#define GL_COLOR_ATTACHMENT30 0x8CFE
|
||||
#define GL_COLOR_ATTACHMENT31 0x8CFF
|
||||
#define GL_DEPTH_ATTACHMENT 0x8D00
|
||||
#define GL_STENCIL_ATTACHMENT 0x8D20
|
||||
#define GL_FRAMEBUFFER 0x8D40
|
||||
@ -1421,11 +1437,13 @@ GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
|
||||
#define GL_UNIFORM_BUFFER_START 0x8A29
|
||||
#define GL_UNIFORM_BUFFER_SIZE 0x8A2A
|
||||
#define GL_MAX_VERTEX_UNIFORM_BLOCKS 0x8A2B
|
||||
#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
|
||||
#define GL_MAX_FRAGMENT_UNIFORM_BLOCKS 0x8A2D
|
||||
#define GL_MAX_COMBINED_UNIFORM_BLOCKS 0x8A2E
|
||||
#define GL_MAX_UNIFORM_BUFFER_BINDINGS 0x8A2F
|
||||
#define GL_MAX_UNIFORM_BLOCK_SIZE 0x8A30
|
||||
#define GL_MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS 0x8A31
|
||||
#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
|
||||
#define GL_MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS 0x8A33
|
||||
#define GL_UNIFORM_BUFFER_OFFSET_ALIGNMENT 0x8A34
|
||||
#define GL_ACTIVE_UNIFORM_BLOCK_MAX_NAME_LENGTH 0x8A35
|
||||
@ -1444,6 +1462,7 @@ GLAPI GLboolean APIENTRY glIsVertexArray (GLuint array);
|
||||
#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORMS 0x8A42
|
||||
#define GL_UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES 0x8A43
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER 0x8A44
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER 0x8A46
|
||||
#define GL_INVALID_INDEX 0xFFFFFFFFu
|
||||
typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount);
|
||||
@ -1598,7 +1617,7 @@ typedef void (APIENTRYP PFNGLFRAMEBUFFERTEXTUREPROC) (GLenum target, GLenum atta
|
||||
typedef void (APIENTRYP PFNGLTEXIMAGE2DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||
typedef void (APIENTRYP PFNGLTEXIMAGE3DMULTISAMPLEPROC) (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
typedef void (APIENTRYP PFNGLGETMULTISAMPLEFVPROC) (GLenum pname, GLuint index, GLfloat *val);
|
||||
typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint index, GLbitfield mask);
|
||||
typedef void (APIENTRYP PFNGLSAMPLEMASKIPROC) (GLuint maskNumber, GLbitfield mask);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glDrawElementsBaseVertex (GLenum mode, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
GLAPI void APIENTRY glDrawRangeElementsBaseVertex (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const void *indices, GLint basevertex);
|
||||
@ -1618,7 +1637,7 @@ GLAPI void APIENTRY glFramebufferTexture (GLenum target, GLenum attachment, GLui
|
||||
GLAPI void APIENTRY glTexImage2DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||
GLAPI void APIENTRY glTexImage3DMultisample (GLenum target, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
GLAPI void APIENTRY glGetMultisamplefv (GLenum pname, GLuint index, GLfloat *val);
|
||||
GLAPI void APIENTRY glSampleMaski (GLuint index, GLbitfield mask);
|
||||
GLAPI void APIENTRY glSampleMaski (GLuint maskNumber, GLbitfield mask);
|
||||
#endif
|
||||
#endif /* GL_VERSION_3_2 */
|
||||
|
||||
@ -2094,6 +2113,10 @@ GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data)
|
||||
|
||||
#ifndef GL_VERSION_4_2
|
||||
#define GL_VERSION_4_2 1
|
||||
#define GL_COPY_READ_BUFFER_BINDING 0x8F36
|
||||
#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
|
||||
#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
|
||||
#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
|
||||
#define GL_UNPACK_COMPRESSED_BLOCK_WIDTH 0x9127
|
||||
#define GL_UNPACK_COMPRESSED_BLOCK_HEIGHT 0x9128
|
||||
#define GL_UNPACK_COMPRESSED_BLOCK_DEPTH 0x9129
|
||||
@ -2197,6 +2220,10 @@ GLAPI void APIENTRY glGetDoublei_v (GLenum target, GLuint index, GLdouble *data)
|
||||
#define GL_MAX_GEOMETRY_IMAGE_UNIFORMS 0x90CD
|
||||
#define GL_MAX_FRAGMENT_IMAGE_UNIFORMS 0x90CE
|
||||
#define GL_MAX_COMBINED_IMAGE_UNIFORMS 0x90CF
|
||||
#define GL_COMPRESSED_RGBA_BPTC_UNORM 0x8E8C
|
||||
#define GL_COMPRESSED_SRGB_ALPHA_BPTC_UNORM 0x8E8D
|
||||
#define GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT 0x8E8E
|
||||
#define GL_COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT 0x8E8F
|
||||
#define GL_TEXTURE_IMMUTABLE_FORMAT 0x912F
|
||||
typedef void (APIENTRYP PFNGLDRAWARRAYSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLint first, GLsizei count, GLsizei instancecount, GLuint baseinstance);
|
||||
typedef void (APIENTRYP PFNGLDRAWELEMENTSINSTANCEDBASEINSTANCEPROC) (GLenum mode, GLsizei count, GLenum type, const void *indices, GLsizei instancecount, GLuint baseinstance);
|
||||
@ -2261,6 +2288,7 @@ typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum
|
||||
#define GL_ATOMIC_COUNTER_BUFFER_REFERENCED_BY_COMPUTE_SHADER 0x90ED
|
||||
#define GL_DISPATCH_INDIRECT_BUFFER 0x90EE
|
||||
#define GL_DISPATCH_INDIRECT_BUFFER_BINDING 0x90EF
|
||||
#define GL_COMPUTE_SHADER_BIT 0x00000020
|
||||
#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
|
||||
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
|
||||
#define GL_DEBUG_CALLBACK_FUNCTION 0x8244
|
||||
@ -2485,6 +2513,7 @@ typedef void (APIENTRY *GLDEBUGPROC)(GLenum source,GLenum type,GLuint id,GLenum
|
||||
#define GL_VERTEX_BINDING_STRIDE 0x82D8
|
||||
#define GL_MAX_VERTEX_ATTRIB_RELATIVE_OFFSET 0x82D9
|
||||
#define GL_MAX_VERTEX_ATTRIB_BINDINGS 0x82DA
|
||||
#define GL_VERTEX_BINDING_BUFFER 0x8F4F
|
||||
typedef void (APIENTRYP PFNGLCLEARBUFFERDATAPROC) (GLenum target, GLenum internalformat, GLenum format, GLenum type, const void *data);
|
||||
typedef void (APIENTRYP PFNGLCLEARBUFFERSUBDATAPROC) (GLenum target, GLenum internalformat, GLintptr offset, GLsizeiptr size, GLenum format, GLenum type, const void *data);
|
||||
typedef void (APIENTRYP PFNGLDISPATCHCOMPUTEPROC) (GLuint num_groups_x, GLuint num_groups_y, GLuint num_groups_z);
|
||||
@ -2618,10 +2647,262 @@ GLAPI void APIENTRY glBindVertexBuffers (GLuint first, GLsizei count, const GLui
|
||||
#endif
|
||||
#endif /* GL_VERSION_4_4 */
|
||||
|
||||
#ifndef GL_VERSION_4_5
|
||||
#define GL_VERSION_4_5 1
|
||||
#define GL_CONTEXT_LOST 0x0507
|
||||
#define GL_NEGATIVE_ONE_TO_ONE 0x935E
|
||||
#define GL_ZERO_TO_ONE 0x935F
|
||||
#define GL_CLIP_ORIGIN 0x935C
|
||||
#define GL_CLIP_DEPTH_MODE 0x935D
|
||||
#define GL_QUERY_WAIT_INVERTED 0x8E17
|
||||
#define GL_QUERY_NO_WAIT_INVERTED 0x8E18
|
||||
#define GL_QUERY_BY_REGION_WAIT_INVERTED 0x8E19
|
||||
#define GL_QUERY_BY_REGION_NO_WAIT_INVERTED 0x8E1A
|
||||
#define GL_MAX_CULL_DISTANCES 0x82F9
|
||||
#define GL_MAX_COMBINED_CLIP_AND_CULL_DISTANCES 0x82FA
|
||||
#define GL_TEXTURE_TARGET 0x1006
|
||||
#define GL_QUERY_TARGET 0x82EA
|
||||
#define GL_GUILTY_CONTEXT_RESET 0x8253
|
||||
#define GL_INNOCENT_CONTEXT_RESET 0x8254
|
||||
#define GL_UNKNOWN_CONTEXT_RESET 0x8255
|
||||
#define GL_RESET_NOTIFICATION_STRATEGY 0x8256
|
||||
#define GL_LOSE_CONTEXT_ON_RESET 0x8252
|
||||
#define GL_NO_RESET_NOTIFICATION 0x8261
|
||||
#define GL_CONTEXT_FLAG_ROBUST_ACCESS_BIT 0x00000004
|
||||
#define GL_CONTEXT_RELEASE_BEHAVIOR 0x82FB
|
||||
#define GL_CONTEXT_RELEASE_BEHAVIOR_FLUSH 0x82FC
|
||||
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, 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, 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, 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, GLsizeiptr length, GLbitfield access);
|
||||
typedef GLboolean (APIENTRYP PFNGLUNMAPNAMEDBUFFERPROC) (GLuint buffer);
|
||||
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, 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);
|
||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTUREPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
|
||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERTEXTURELAYERPROC) (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERPROC) (GLuint framebuffer, GLenum buf);
|
||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERDRAWBUFFERSPROC) (GLuint framebuffer, GLsizei n, const GLenum *bufs);
|
||||
typedef void (APIENTRYP PFNGLNAMEDFRAMEBUFFERREADBUFFERPROC) (GLuint framebuffer, GLenum src);
|
||||
typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
|
||||
typedef void (APIENTRYP PFNGLINVALIDATENAMEDFRAMEBUFFERSUBDATAPROC) (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
|
||||
typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERUIVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
|
||||
typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFVPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
|
||||
typedef void (APIENTRYP PFNGLCLEARNAMEDFRAMEBUFFERFIPROC) (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
|
||||
typedef void (APIENTRYP PFNGLBLITNAMEDFRAMEBUFFERPROC) (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
typedef GLenum (APIENTRYP PFNGLCHECKNAMEDFRAMEBUFFERSTATUSPROC) (GLuint framebuffer, GLenum target);
|
||||
typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERPARAMETERIVPROC) (GLuint framebuffer, GLenum pname, GLint *param);
|
||||
typedef void (APIENTRYP PFNGLGETNAMEDFRAMEBUFFERATTACHMENTPARAMETERIVPROC) (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLCREATERENDERBUFFERSPROC) (GLsizei n, GLuint *renderbuffers);
|
||||
typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEPROC) (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNGLNAMEDRENDERBUFFERSTORAGEMULTISAMPLEPROC) (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
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, 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);
|
||||
typedef void (APIENTRYP PFNGLTEXTURESTORAGE2DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||
typedef void (APIENTRYP PFNGLTEXTURESTORAGE3DMULTISAMPLEPROC) (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (APIENTRYP PFNGLTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
typedef void (APIENTRYP PFNGLCOMPRESSEDTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
|
||||
typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE1DPROC) (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
|
||||
typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE2DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNGLCOPYTEXTURESUBIMAGE3DPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFPROC) (GLuint texture, GLenum pname, GLfloat param);
|
||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, const GLfloat *param);
|
||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIPROC) (GLuint texture, GLenum pname, GLint param);
|
||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, const GLint *params);
|
||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, const GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, const GLint *param);
|
||||
typedef void (APIENTRYP PFNGLGENERATETEXTUREMIPMAPPROC) (GLuint texture);
|
||||
typedef void (APIENTRYP PFNGLBINDTEXTUREUNITPROC) (GLuint unit, GLuint texture);
|
||||
typedef void (APIENTRYP PFNGLGETTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
||||
typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTUREIMAGEPROC) (GLuint texture, GLint level, GLsizei bufSize, void *pixels);
|
||||
typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERFVPROC) (GLuint texture, GLint level, GLenum pname, GLfloat *params);
|
||||
typedef void (APIENTRYP PFNGLGETTEXTURELEVELPARAMETERIVPROC) (GLuint texture, GLint level, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERFVPROC) (GLuint texture, GLenum pname, GLfloat *params);
|
||||
typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIIVPROC) (GLuint texture, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIUIVPROC) (GLuint texture, GLenum pname, GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLGETTEXTUREPARAMETERIVPROC) (GLuint texture, GLenum pname, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLCREATEVERTEXARRAYSPROC) (GLsizei n, GLuint *arrays);
|
||||
typedef void (APIENTRYP PFNGLDISABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
|
||||
typedef void (APIENTRYP PFNGLENABLEVERTEXARRAYATTRIBPROC) (GLuint vaobj, GLuint index);
|
||||
typedef void (APIENTRYP PFNGLVERTEXARRAYELEMENTBUFFERPROC) (GLuint vaobj, GLuint buffer);
|
||||
typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERPROC) (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
|
||||
typedef void (APIENTRYP PFNGLVERTEXARRAYVERTEXBUFFERSPROC) (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
|
||||
typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBBINDINGPROC) (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
|
||||
typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
|
||||
typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBIFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
|
||||
typedef void (APIENTRYP PFNGLVERTEXARRAYATTRIBLFORMATPROC) (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
|
||||
typedef void (APIENTRYP PFNGLVERTEXARRAYBINDINGDIVISORPROC) (GLuint vaobj, GLuint bindingindex, GLuint divisor);
|
||||
typedef void (APIENTRYP PFNGLGETVERTEXARRAYIVPROC) (GLuint vaobj, GLenum pname, GLint *param);
|
||||
typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXEDIVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
|
||||
typedef void (APIENTRYP PFNGLGETVERTEXARRAYINDEXED64IVPROC) (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
|
||||
typedef void (APIENTRYP PFNGLCREATESAMPLERSPROC) (GLsizei n, GLuint *samplers);
|
||||
typedef void (APIENTRYP PFNGLCREATEPROGRAMPIPELINESPROC) (GLsizei n, GLuint *pipelines);
|
||||
typedef void (APIENTRYP PFNGLCREATEQUERIESPROC) (GLenum target, GLsizei n, GLuint *ids);
|
||||
typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUI64VPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
typedef void (APIENTRYP PFNGLGETQUERYBUFFEROBJECTUIVPROC) (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
typedef void (APIENTRYP PFNGLMEMORYBARRIERBYREGIONPROC) (GLbitfield barriers);
|
||||
typedef void (APIENTRYP PFNGLGETTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
||||
typedef void (APIENTRYP PFNGLGETCOMPRESSEDTEXTURESUBIMAGEPROC) (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
|
||||
typedef GLenum (APIENTRYP PFNGLGETGRAPHICSRESETSTATUSPROC) (void);
|
||||
typedef void (APIENTRYP PFNGLGETNCOMPRESSEDTEXIMAGEPROC) (GLenum target, GLint lod, GLsizei bufSize, void *pixels);
|
||||
typedef void (APIENTRYP PFNGLGETNTEXIMAGEPROC) (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
||||
typedef void (APIENTRYP PFNGLGETNUNIFORMDVPROC) (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
|
||||
typedef void (APIENTRYP PFNGLGETNUNIFORMFVPROC) (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
typedef void (APIENTRYP PFNGLGETNUNIFORMIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
typedef void (APIENTRYP PFNGLGETNUNIFORMUIVPROC) (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
|
||||
typedef void (APIENTRYP PFNGLREADNPIXELSPROC) (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
typedef void (APIENTRYP PFNGLTEXTUREBARRIERPROC) (void);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
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, 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, 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, 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, GLsizeiptr length, GLbitfield access);
|
||||
GLAPI GLboolean APIENTRY glUnmapNamedBuffer (GLuint buffer);
|
||||
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, 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);
|
||||
GLAPI void APIENTRY glNamedFramebufferTexture (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level);
|
||||
GLAPI void APIENTRY glNamedFramebufferTextureLayer (GLuint framebuffer, GLenum attachment, GLuint texture, GLint level, GLint layer);
|
||||
GLAPI void APIENTRY glNamedFramebufferDrawBuffer (GLuint framebuffer, GLenum buf);
|
||||
GLAPI void APIENTRY glNamedFramebufferDrawBuffers (GLuint framebuffer, GLsizei n, const GLenum *bufs);
|
||||
GLAPI void APIENTRY glNamedFramebufferReadBuffer (GLuint framebuffer, GLenum src);
|
||||
GLAPI void APIENTRY glInvalidateNamedFramebufferData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments);
|
||||
GLAPI void APIENTRY glInvalidateNamedFramebufferSubData (GLuint framebuffer, GLsizei numAttachments, const GLenum *attachments, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glClearNamedFramebufferiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLint *value);
|
||||
GLAPI void APIENTRY glClearNamedFramebufferuiv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLuint *value);
|
||||
GLAPI void APIENTRY glClearNamedFramebufferfv (GLuint framebuffer, GLenum buffer, GLint drawbuffer, const GLfloat *value);
|
||||
GLAPI void APIENTRY glClearNamedFramebufferfi (GLuint framebuffer, GLenum buffer, GLint drawbuffer, GLfloat depth, GLint stencil);
|
||||
GLAPI void APIENTRY glBlitNamedFramebuffer (GLuint readFramebuffer, GLuint drawFramebuffer, GLint srcX0, GLint srcY0, GLint srcX1, GLint srcY1, GLint dstX0, GLint dstY0, GLint dstX1, GLint dstY1, GLbitfield mask, GLenum filter);
|
||||
GLAPI GLenum APIENTRY glCheckNamedFramebufferStatus (GLuint framebuffer, GLenum target);
|
||||
GLAPI void APIENTRY glGetNamedFramebufferParameteriv (GLuint framebuffer, GLenum pname, GLint *param);
|
||||
GLAPI void APIENTRY glGetNamedFramebufferAttachmentParameteriv (GLuint framebuffer, GLenum attachment, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glCreateRenderbuffers (GLsizei n, GLuint *renderbuffers);
|
||||
GLAPI void APIENTRY glNamedRenderbufferStorage (GLuint renderbuffer, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glNamedRenderbufferStorageMultisample (GLuint renderbuffer, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height);
|
||||
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, 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);
|
||||
GLAPI void APIENTRY glTextureStorage2DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLboolean fixedsamplelocations);
|
||||
GLAPI void APIENTRY glTextureStorage3DMultisample (GLuint texture, GLsizei samples, GLenum internalformat, GLsizei width, GLsizei height, GLsizei depth, GLboolean fixedsamplelocations);
|
||||
GLAPI void APIENTRY glTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLenum type, const void *pixels);
|
||||
GLAPI void APIENTRY glTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLenum type, const void *pixels);
|
||||
GLAPI void APIENTRY glTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, const void *pixels);
|
||||
GLAPI void APIENTRY glCompressedTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLsizei width, GLenum format, GLsizei imageSize, const void *data);
|
||||
GLAPI void APIENTRY glCompressedTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLsizei width, GLsizei height, GLenum format, GLsizei imageSize, const void *data);
|
||||
GLAPI void APIENTRY glCompressedTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLsizei imageSize, const void *data);
|
||||
GLAPI void APIENTRY glCopyTextureSubImage1D (GLuint texture, GLint level, GLint xoffset, GLint x, GLint y, GLsizei width);
|
||||
GLAPI void APIENTRY glCopyTextureSubImage2D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glCopyTextureSubImage3D (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLint x, GLint y, GLsizei width, GLsizei height);
|
||||
GLAPI void APIENTRY glTextureParameterf (GLuint texture, GLenum pname, GLfloat param);
|
||||
GLAPI void APIENTRY glTextureParameterfv (GLuint texture, GLenum pname, const GLfloat *param);
|
||||
GLAPI void APIENTRY glTextureParameteri (GLuint texture, GLenum pname, GLint param);
|
||||
GLAPI void APIENTRY glTextureParameterIiv (GLuint texture, GLenum pname, const GLint *params);
|
||||
GLAPI void APIENTRY glTextureParameterIuiv (GLuint texture, GLenum pname, const GLuint *params);
|
||||
GLAPI void APIENTRY glTextureParameteriv (GLuint texture, GLenum pname, const GLint *param);
|
||||
GLAPI void APIENTRY glGenerateTextureMipmap (GLuint texture);
|
||||
GLAPI void APIENTRY glBindTextureUnit (GLuint unit, GLuint texture);
|
||||
GLAPI void APIENTRY glGetTextureImage (GLuint texture, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
||||
GLAPI void APIENTRY glGetCompressedTextureImage (GLuint texture, GLint level, GLsizei bufSize, void *pixels);
|
||||
GLAPI void APIENTRY glGetTextureLevelParameterfv (GLuint texture, GLint level, GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetTextureLevelParameteriv (GLuint texture, GLint level, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetTextureParameterfv (GLuint texture, GLenum pname, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetTextureParameterIiv (GLuint texture, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glGetTextureParameterIuiv (GLuint texture, GLenum pname, GLuint *params);
|
||||
GLAPI void APIENTRY glGetTextureParameteriv (GLuint texture, GLenum pname, GLint *params);
|
||||
GLAPI void APIENTRY glCreateVertexArrays (GLsizei n, GLuint *arrays);
|
||||
GLAPI void APIENTRY glDisableVertexArrayAttrib (GLuint vaobj, GLuint index);
|
||||
GLAPI void APIENTRY glEnableVertexArrayAttrib (GLuint vaobj, GLuint index);
|
||||
GLAPI void APIENTRY glVertexArrayElementBuffer (GLuint vaobj, GLuint buffer);
|
||||
GLAPI void APIENTRY glVertexArrayVertexBuffer (GLuint vaobj, GLuint bindingindex, GLuint buffer, GLintptr offset, GLsizei stride);
|
||||
GLAPI void APIENTRY glVertexArrayVertexBuffers (GLuint vaobj, GLuint first, GLsizei count, const GLuint *buffers, const GLintptr *offsets, const GLsizei *strides);
|
||||
GLAPI void APIENTRY glVertexArrayAttribBinding (GLuint vaobj, GLuint attribindex, GLuint bindingindex);
|
||||
GLAPI void APIENTRY glVertexArrayAttribFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLboolean normalized, GLuint relativeoffset);
|
||||
GLAPI void APIENTRY glVertexArrayAttribIFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
|
||||
GLAPI void APIENTRY glVertexArrayAttribLFormat (GLuint vaobj, GLuint attribindex, GLint size, GLenum type, GLuint relativeoffset);
|
||||
GLAPI void APIENTRY glVertexArrayBindingDivisor (GLuint vaobj, GLuint bindingindex, GLuint divisor);
|
||||
GLAPI void APIENTRY glGetVertexArrayiv (GLuint vaobj, GLenum pname, GLint *param);
|
||||
GLAPI void APIENTRY glGetVertexArrayIndexediv (GLuint vaobj, GLuint index, GLenum pname, GLint *param);
|
||||
GLAPI void APIENTRY glGetVertexArrayIndexed64iv (GLuint vaobj, GLuint index, GLenum pname, GLint64 *param);
|
||||
GLAPI void APIENTRY glCreateSamplers (GLsizei n, GLuint *samplers);
|
||||
GLAPI void APIENTRY glCreateProgramPipelines (GLsizei n, GLuint *pipelines);
|
||||
GLAPI void APIENTRY glCreateQueries (GLenum target, GLsizei n, GLuint *ids);
|
||||
GLAPI void APIENTRY glGetQueryBufferObjecti64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
GLAPI void APIENTRY glGetQueryBufferObjectiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
GLAPI void APIENTRY glGetQueryBufferObjectui64v (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
GLAPI void APIENTRY glGetQueryBufferObjectuiv (GLuint id, GLuint buffer, GLenum pname, GLintptr offset);
|
||||
GLAPI void APIENTRY glMemoryBarrierByRegion (GLbitfield barriers);
|
||||
GLAPI void APIENTRY glGetTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
||||
GLAPI void APIENTRY glGetCompressedTextureSubImage (GLuint texture, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLsizei bufSize, void *pixels);
|
||||
GLAPI GLenum APIENTRY glGetGraphicsResetStatus (void);
|
||||
GLAPI void APIENTRY glGetnCompressedTexImage (GLenum target, GLint lod, GLsizei bufSize, void *pixels);
|
||||
GLAPI void APIENTRY glGetnTexImage (GLenum target, GLint level, GLenum format, GLenum type, GLsizei bufSize, void *pixels);
|
||||
GLAPI void APIENTRY glGetnUniformdv (GLuint program, GLint location, GLsizei bufSize, GLdouble *params);
|
||||
GLAPI void APIENTRY glGetnUniformfv (GLuint program, GLint location, GLsizei bufSize, GLfloat *params);
|
||||
GLAPI void APIENTRY glGetnUniformiv (GLuint program, GLint location, GLsizei bufSize, GLint *params);
|
||||
GLAPI void APIENTRY glGetnUniformuiv (GLuint program, GLint location, GLsizei bufSize, GLuint *params);
|
||||
GLAPI void APIENTRY glReadnPixels (GLint x, GLint y, GLsizei width, GLsizei height, GLenum format, GLenum type, GLsizei bufSize, void *data);
|
||||
GLAPI void APIENTRY glTextureBarrier (void);
|
||||
#endif
|
||||
#endif /* GL_VERSION_4_5 */
|
||||
|
||||
#ifndef GL_ARB_ES2_compatibility
|
||||
#define GL_ARB_ES2_compatibility 1
|
||||
#endif /* GL_ARB_ES2_compatibility */
|
||||
|
||||
#ifndef GL_ARB_ES3_1_compatibility
|
||||
#define GL_ARB_ES3_1_compatibility 1
|
||||
#endif /* GL_ARB_ES3_1_compatibility */
|
||||
|
||||
#ifndef GL_ARB_ES3_compatibility
|
||||
#define GL_ARB_ES3_compatibility 1
|
||||
#endif /* GL_ARB_ES3_compatibility */
|
||||
@ -2702,13 +2983,16 @@ GLAPI GLsync APIENTRY glCreateSyncFromCLeventARB (struct _cl_context *context, s
|
||||
#define GL_ARB_clear_texture 1
|
||||
#endif /* GL_ARB_clear_texture */
|
||||
|
||||
#ifndef GL_ARB_clip_control
|
||||
#define GL_ARB_clip_control 1
|
||||
#endif /* GL_ARB_clip_control */
|
||||
|
||||
#ifndef GL_ARB_compressed_texture_pixel_storage
|
||||
#define GL_ARB_compressed_texture_pixel_storage 1
|
||||
#endif /* GL_ARB_compressed_texture_pixel_storage */
|
||||
|
||||
#ifndef GL_ARB_compute_shader
|
||||
#define GL_ARB_compute_shader 1
|
||||
#define GL_COMPUTE_SHADER_BIT 0x00000020
|
||||
#endif /* GL_ARB_compute_shader */
|
||||
|
||||
#ifndef GL_ARB_compute_variable_group_size
|
||||
@ -2723,20 +3007,26 @@ GLAPI void APIENTRY glDispatchComputeGroupSizeARB (GLuint num_groups_x, GLuint n
|
||||
#endif
|
||||
#endif /* GL_ARB_compute_variable_group_size */
|
||||
|
||||
#ifndef GL_ARB_conditional_render_inverted
|
||||
#define GL_ARB_conditional_render_inverted 1
|
||||
#endif /* GL_ARB_conditional_render_inverted */
|
||||
|
||||
#ifndef GL_ARB_conservative_depth
|
||||
#define GL_ARB_conservative_depth 1
|
||||
#endif /* GL_ARB_conservative_depth */
|
||||
|
||||
#ifndef GL_ARB_copy_buffer
|
||||
#define GL_ARB_copy_buffer 1
|
||||
#define GL_COPY_READ_BUFFER_BINDING 0x8F36
|
||||
#define GL_COPY_WRITE_BUFFER_BINDING 0x8F37
|
||||
#endif /* GL_ARB_copy_buffer */
|
||||
|
||||
#ifndef GL_ARB_copy_image
|
||||
#define GL_ARB_copy_image 1
|
||||
#endif /* GL_ARB_copy_image */
|
||||
|
||||
#ifndef GL_ARB_cull_distance
|
||||
#define GL_ARB_cull_distance 1
|
||||
#endif /* GL_ARB_cull_distance */
|
||||
|
||||
#ifndef GL_ARB_debug_output
|
||||
#define GL_ARB_debug_output 1
|
||||
typedef void (APIENTRY *GLDEBUGPROCARB)(GLenum source,GLenum type,GLuint id,GLenum severity,GLsizei length,const GLchar *message,const void *userParam);
|
||||
@ -2782,6 +3072,14 @@ GLAPI GLuint APIENTRY glGetDebugMessageLogARB (GLuint count, GLsizei bufSize, GL
|
||||
#define GL_ARB_depth_clamp 1
|
||||
#endif /* GL_ARB_depth_clamp */
|
||||
|
||||
#ifndef GL_ARB_derivative_control
|
||||
#define GL_ARB_derivative_control 1
|
||||
#endif /* GL_ARB_derivative_control */
|
||||
|
||||
#ifndef GL_ARB_direct_state_access
|
||||
#define GL_ARB_direct_state_access 1
|
||||
#endif /* GL_ARB_direct_state_access */
|
||||
|
||||
#ifndef GL_ARB_draw_buffers_blend
|
||||
#define GL_ARB_draw_buffers_blend 1
|
||||
typedef void (APIENTRYP PFNGLBLENDEQUATIONIARBPROC) (GLuint buf, GLenum mode);
|
||||
@ -2840,6 +3138,10 @@ GLAPI void APIENTRY glBlendFuncSeparateiARB (GLuint buf, GLenum srcRGB, GLenum d
|
||||
#define GL_ARB_get_program_binary 1
|
||||
#endif /* GL_ARB_get_program_binary */
|
||||
|
||||
#ifndef GL_ARB_get_texture_sub_image
|
||||
#define GL_ARB_get_texture_sub_image 1
|
||||
#endif /* GL_ARB_get_texture_sub_image */
|
||||
|
||||
#ifndef GL_ARB_gpu_shader5
|
||||
#define GL_ARB_gpu_shader5 1
|
||||
#endif /* GL_ARB_gpu_shader5 */
|
||||
@ -2903,6 +3205,20 @@ GLAPI void APIENTRY glMultiDrawElementsIndirectCountARB (GLenum mode, GLenum typ
|
||||
#define GL_ARB_occlusion_query2 1
|
||||
#endif /* GL_ARB_occlusion_query2 */
|
||||
|
||||
#ifndef GL_ARB_pipeline_statistics_query
|
||||
#define GL_ARB_pipeline_statistics_query 1
|
||||
#define GL_VERTICES_SUBMITTED_ARB 0x82EE
|
||||
#define GL_PRIMITIVES_SUBMITTED_ARB 0x82EF
|
||||
#define GL_VERTEX_SHADER_INVOCATIONS_ARB 0x82F0
|
||||
#define GL_TESS_CONTROL_SHADER_PATCHES_ARB 0x82F1
|
||||
#define GL_TESS_EVALUATION_SHADER_INVOCATIONS_ARB 0x82F2
|
||||
#define GL_GEOMETRY_SHADER_PRIMITIVES_EMITTED_ARB 0x82F3
|
||||
#define GL_FRAGMENT_SHADER_INVOCATIONS_ARB 0x82F4
|
||||
#define GL_COMPUTE_SHADER_INVOCATIONS_ARB 0x82F5
|
||||
#define GL_CLIPPING_INPUT_PRIMITIVES_ARB 0x82F6
|
||||
#define GL_CLIPPING_OUTPUT_PRIMITIVES_ARB 0x82F7
|
||||
#endif /* GL_ARB_pipeline_statistics_query */
|
||||
|
||||
#ifndef GL_ARB_program_interface_query
|
||||
#define GL_ARB_program_interface_query 1
|
||||
#endif /* GL_ARB_program_interface_query */
|
||||
@ -3018,6 +3334,10 @@ GLAPI void APIENTRY glMinSampleShadingARB (GLfloat value);
|
||||
#define GL_ARB_shader_subroutine 1
|
||||
#endif /* GL_ARB_shader_subroutine */
|
||||
|
||||
#ifndef GL_ARB_shader_texture_image_samples
|
||||
#define GL_ARB_shader_texture_image_samples 1
|
||||
#endif /* GL_ARB_shader_texture_image_samples */
|
||||
|
||||
#ifndef GL_ARB_shading_language_420pack
|
||||
#define GL_ARB_shading_language_420pack 1
|
||||
#endif /* GL_ARB_shading_language_420pack */
|
||||
@ -3047,11 +3367,25 @@ GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GL
|
||||
#define GL_ARB_shading_language_packing 1
|
||||
#endif /* GL_ARB_shading_language_packing */
|
||||
|
||||
#ifndef GL_ARB_sparse_buffer
|
||||
#define GL_ARB_sparse_buffer 1
|
||||
#define GL_SPARSE_STORAGE_BIT_ARB 0x0400
|
||||
#define GL_SPARSE_BUFFER_PAGE_SIZE_ARB 0x82F8
|
||||
typedef void (APIENTRYP PFNGLBUFFERPAGECOMMITMENTARBPROC) (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit);
|
||||
typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTEXTPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
|
||||
typedef void (APIENTRYP PFNGLNAMEDBUFFERPAGECOMMITMENTARBPROC) (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glBufferPageCommitmentARB (GLenum target, GLintptr offset, GLsizeiptr size, GLboolean commit);
|
||||
GLAPI void APIENTRY glNamedBufferPageCommitmentEXT (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
|
||||
GLAPI void APIENTRY glNamedBufferPageCommitmentARB (GLuint buffer, GLintptr offset, GLsizeiptr size, GLboolean commit);
|
||||
#endif
|
||||
#endif /* GL_ARB_sparse_buffer */
|
||||
|
||||
#ifndef GL_ARB_sparse_texture
|
||||
#define GL_ARB_sparse_texture 1
|
||||
#define GL_TEXTURE_SPARSE_ARB 0x91A6
|
||||
#define GL_VIRTUAL_PAGE_SIZE_INDEX_ARB 0x91A7
|
||||
#define GL_MIN_SPARSE_LEVEL_ARB 0x919B
|
||||
#define GL_NUM_SPARSE_LEVELS_ARB 0x91AA
|
||||
#define GL_NUM_VIRTUAL_PAGE_SIZES_ARB 0x91A8
|
||||
#define GL_VIRTUAL_PAGE_SIZE_X_ARB 0x9195
|
||||
#define GL_VIRTUAL_PAGE_SIZE_Y_ARB 0x9196
|
||||
@ -3060,9 +3394,9 @@ GLAPI void APIENTRY glGetNamedStringivARB (GLint namelen, const GLchar *name, GL
|
||||
#define GL_MAX_SPARSE_3D_TEXTURE_SIZE_ARB 0x9199
|
||||
#define GL_MAX_SPARSE_ARRAY_TEXTURE_LAYERS_ARB 0x919A
|
||||
#define GL_SPARSE_TEXTURE_FULL_ARRAY_CUBE_MIPMAPS_ARB 0x91A9
|
||||
typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
|
||||
typedef void (APIENTRYP PFNGLTEXPAGECOMMITMENTARBPROC) (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
|
||||
#ifdef GL_GLEXT_PROTOTYPES
|
||||
GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean resident);
|
||||
GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xoffset, GLint yoffset, GLint zoffset, GLsizei width, GLsizei height, GLsizei depth, GLboolean commit);
|
||||
#endif
|
||||
#endif /* GL_ARB_sparse_texture */
|
||||
|
||||
@ -3078,6 +3412,10 @@ GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xo
|
||||
#define GL_ARB_tessellation_shader 1
|
||||
#endif /* GL_ARB_tessellation_shader */
|
||||
|
||||
#ifndef GL_ARB_texture_barrier
|
||||
#define GL_ARB_texture_barrier 1
|
||||
#endif /* GL_ARB_texture_barrier */
|
||||
|
||||
#ifndef GL_ARB_texture_buffer_object_rgb32
|
||||
#define GL_ARB_texture_buffer_object_rgb32 1
|
||||
#endif /* GL_ARB_texture_buffer_object_rgb32 */
|
||||
@ -3166,8 +3504,6 @@ GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xo
|
||||
|
||||
#ifndef GL_ARB_transform_feedback2
|
||||
#define GL_ARB_transform_feedback2 1
|
||||
#define GL_TRANSFORM_FEEDBACK_PAUSED 0x8E23
|
||||
#define GL_TRANSFORM_FEEDBACK_ACTIVE 0x8E24
|
||||
#endif /* GL_ARB_transform_feedback2 */
|
||||
|
||||
#ifndef GL_ARB_transform_feedback3
|
||||
@ -3178,11 +3514,14 @@ GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xo
|
||||
#define GL_ARB_transform_feedback_instanced 1
|
||||
#endif /* GL_ARB_transform_feedback_instanced */
|
||||
|
||||
#ifndef GL_ARB_transform_feedback_overflow_query
|
||||
#define GL_ARB_transform_feedback_overflow_query 1
|
||||
#define GL_TRANSFORM_FEEDBACK_OVERFLOW_ARB 0x82EC
|
||||
#define GL_TRANSFORM_FEEDBACK_STREAM_OVERFLOW_ARB 0x82ED
|
||||
#endif /* GL_ARB_transform_feedback_overflow_query */
|
||||
|
||||
#ifndef GL_ARB_uniform_buffer_object
|
||||
#define GL_ARB_uniform_buffer_object 1
|
||||
#define GL_MAX_GEOMETRY_UNIFORM_BLOCKS 0x8A2C
|
||||
#define GL_MAX_COMBINED_GEOMETRY_UNIFORM_COMPONENTS 0x8A32
|
||||
#define GL_UNIFORM_BLOCK_REFERENCED_BY_GEOMETRY_SHADER 0x8A45
|
||||
#endif /* GL_ARB_uniform_buffer_object */
|
||||
|
||||
#ifndef GL_ARB_vertex_array_bgra
|
||||
@ -3213,10 +3552,28 @@ GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xo
|
||||
#define GL_ARB_viewport_array 1
|
||||
#endif /* GL_ARB_viewport_array */
|
||||
|
||||
#ifndef GL_KHR_context_flush_control
|
||||
#define GL_KHR_context_flush_control 1
|
||||
#endif /* GL_KHR_context_flush_control */
|
||||
|
||||
#ifndef GL_KHR_debug
|
||||
#define GL_KHR_debug 1
|
||||
#endif /* GL_KHR_debug */
|
||||
|
||||
#ifndef GL_KHR_no_error
|
||||
#define GL_KHR_no_error 1
|
||||
#define GL_CONTEXT_FLAG_NO_ERROR_BIT_KHR 0x00000008
|
||||
#endif /* GL_KHR_no_error */
|
||||
|
||||
#ifndef GL_KHR_robust_buffer_access_behavior
|
||||
#define GL_KHR_robust_buffer_access_behavior 1
|
||||
#endif /* GL_KHR_robust_buffer_access_behavior */
|
||||
|
||||
#ifndef GL_KHR_robustness
|
||||
#define GL_KHR_robustness 1
|
||||
#define GL_CONTEXT_ROBUST_ACCESS 0x90F3
|
||||
#endif /* GL_KHR_robustness */
|
||||
|
||||
#ifndef GL_KHR_texture_compression_astc_hdr
|
||||
#define GL_KHR_texture_compression_astc_hdr 1
|
||||
#define GL_COMPRESSED_RGBA_ASTC_4x4_KHR 0x93B0
|
||||
@ -3253,6 +3610,10 @@ GLAPI void APIENTRY glTexPageCommitmentARB (GLenum target, GLint level, GLint xo
|
||||
#define GL_KHR_texture_compression_astc_ldr 1
|
||||
#endif /* GL_KHR_texture_compression_astc_ldr */
|
||||
|
||||
#ifndef GL_KHR_texture_compression_astc_sliced_3d
|
||||
#define GL_KHR_texture_compression_astc_sliced_3d 1
|
||||
#endif /* GL_KHR_texture_compression_astc_sliced_3d */
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
1302
3rdparty/bgfx/3rdparty/khronos/gl/glext.h
vendored
1302
3rdparty/bgfx/3rdparty/khronos/gl/glext.h
vendored
File diff suppressed because it is too large
Load Diff
@ -25,8 +25,8 @@
|
||||
*/
|
||||
|
||||
|
||||
#ifndef __VK_PLATFORM_H__
|
||||
#define __VK_PLATFORM_H__
|
||||
#ifndef VK_PLATFORM_H_
|
||||
#define VK_PLATFORM_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C"
|
||||
@ -124,4 +124,4 @@ extern "C"
|
||||
#include <xcb/xcb.h>
|
||||
#endif
|
||||
|
||||
#endif // __VK_PLATFORM_H__
|
||||
#endif
|
||||
|
22
3rdparty/bgfx/3rdparty/khronos/vulkan/vulkan.h
vendored
22
3rdparty/bgfx/3rdparty/khronos/vulkan/vulkan.h
vendored
@ -1,5 +1,5 @@
|
||||
#ifndef __vulkan_h_
|
||||
#define __vulkan_h_ 1
|
||||
#ifndef VULKAN_H_
|
||||
#define VULKAN_H_ 1
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
@ -41,7 +41,7 @@ extern "C" {
|
||||
(((major) << 22) | ((minor) << 12) | (patch))
|
||||
|
||||
// Vulkan API version supported by this file
|
||||
#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 3)
|
||||
#define VK_API_VERSION VK_MAKE_VERSION(1, 0, 4)
|
||||
|
||||
#define VK_VERSION_MAJOR(version) ((uint32_t)(version) >> 22)
|
||||
#define VK_VERSION_MINOR(version) (((uint32_t)(version) >> 12) & 0x3ff)
|
||||
@ -209,7 +209,7 @@ typedef enum VkStructureType {
|
||||
VK_STRUCTURE_TYPE_MIR_SURFACE_CREATE_INFO_KHR = 1000007000,
|
||||
VK_STRUCTURE_TYPE_ANDROID_SURFACE_CREATE_INFO_KHR = 1000008000,
|
||||
VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR = 1000009000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT = 1000011000,
|
||||
VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT = 1000011000,
|
||||
VK_STRUCTURE_TYPE_BEGIN_RANGE = VK_STRUCTURE_TYPE_APPLICATION_INFO,
|
||||
VK_STRUCTURE_TYPE_END_RANGE = VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO,
|
||||
VK_STRUCTURE_TYPE_RANGE_SIZE = (VK_STRUCTURE_TYPE_LOADER_DEVICE_CREATE_INFO - VK_STRUCTURE_TYPE_APPLICATION_INFO + 1),
|
||||
@ -701,8 +701,8 @@ typedef enum VkSamplerAddressMode {
|
||||
VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER = 3,
|
||||
VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE = 4,
|
||||
VK_SAMPLER_ADDRESS_MODE_BEGIN_RANGE = VK_SAMPLER_ADDRESS_MODE_REPEAT,
|
||||
VK_SAMPLER_ADDRESS_MODE_END_RANGE = VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE,
|
||||
VK_SAMPLER_ADDRESS_MODE_RANGE_SIZE = (VK_SAMPLER_ADDRESS_MODE_MIRROR_CLAMP_TO_EDGE - VK_SAMPLER_ADDRESS_MODE_REPEAT + 1),
|
||||
VK_SAMPLER_ADDRESS_MODE_END_RANGE = VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER,
|
||||
VK_SAMPLER_ADDRESS_MODE_RANGE_SIZE = (VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER - VK_SAMPLER_ADDRESS_MODE_REPEAT + 1),
|
||||
VK_SAMPLER_ADDRESS_MODE_MAX_ENUM = 0x7FFFFFFF
|
||||
} VkSamplerAddressMode;
|
||||
|
||||
@ -3326,8 +3326,8 @@ typedef enum VkDisplayPlaneAlphaFlagBitsKHR {
|
||||
VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_BIT_KHR = 0x00000004,
|
||||
VK_DISPLAY_PLANE_ALPHA_PER_PIXEL_PREMULTIPLIED_BIT_KHR = 0x00000008,
|
||||
} VkDisplayPlaneAlphaFlagBitsKHR;
|
||||
typedef VkFlags VkDisplayModeCreateFlagsKHR;
|
||||
typedef VkFlags VkDisplayPlaneAlphaFlagsKHR;
|
||||
typedef VkFlags VkDisplayModeCreateFlagsKHR;
|
||||
typedef VkFlags VkDisplaySurfaceCreateFlagsKHR;
|
||||
|
||||
typedef struct VkDisplayPropertiesKHR {
|
||||
@ -3667,11 +3667,17 @@ VKAPI_ATTR VkBool32 VKAPI_CALL vkGetPhysicalDeviceWin32PresentationSupportKHR(
|
||||
#endif
|
||||
#endif /* VK_USE_PLATFORM_WIN32_KHR */
|
||||
|
||||
#define VK_KHR_sampler_mirror_clamp_to_edge 1
|
||||
#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_SPEC_VERSION 1
|
||||
#define VK_KHR_SAMPLER_MIRROR_CLAMP_TO_EDGE_EXTENSION_NAME "VK_KHR_sampler_mirror_clamp_to_edge"
|
||||
|
||||
|
||||
#define VK_EXT_debug_report 1
|
||||
VK_DEFINE_NON_DISPATCHABLE_HANDLE(VkDebugReportCallbackEXT)
|
||||
|
||||
#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 1
|
||||
#define VK_EXT_DEBUG_REPORT_SPEC_VERSION 2
|
||||
#define VK_EXT_DEBUG_REPORT_EXTENSION_NAME "VK_EXT_debug_report"
|
||||
#define VK_STRUCTURE_TYPE_DEBUG_REPORT_CREATE_INFO_EXT VK_STRUCTURE_TYPE_DEBUG_REPORT_CALLBACK_CREATE_INFO_EXT
|
||||
|
||||
|
||||
typedef enum VkDebugReportObjectTypeEXT {
|
||||
|
101
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
vendored
101
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
vendored
@ -19,7 +19,7 @@
|
||||
- FREQUENTLY ASKED QUESTIONS (FAQ), TIPS
|
||||
- How can I help?
|
||||
- How do I update to a newer version of ImGui?
|
||||
- Can I have multiple widgets with the same label? Can I have widget without a label? (Yes)
|
||||
- Can I have multiple widgets with the same label? Can I have widget without a label? (Yes) / A primer on the use of labels/IDs in ImGui.
|
||||
- I integrated ImGui in my engine and the text or lines are blurry..
|
||||
- I integrated ImGui in my engine and some elements are disappearing when I move windows around..
|
||||
- How can I load a different font than the default?
|
||||
@ -149,6 +149,7 @@
|
||||
Here is a change-log of API breaking changes, if you are using one of the functions listed, expect to have to fix some code.
|
||||
Also read releases logs https://github.com/ocornut/imgui/releases for more details.
|
||||
|
||||
- 2016/03/02 (1.48) - InputText() completion/history/always callbacks: if you modify the text buffer manually (without using DeleteChars()/InsertChars() helper) you need to maintain the BufTextLen field. added an assert.
|
||||
- 2016/01/23 (1.48) - fixed not honoring exact width passed to PushItemWidth(), previously it would add extra FramePadding.x*2 over that width. if you had manual pixel-perfect alignment in place it might affect you.
|
||||
- 2015/12/27 (1.48) - fixed ImDrawList::AddRect() which used to render a rectangle 1 px too large on each axis.
|
||||
- 2015/12/04 (1.47) - renamed Color() helpers to ValueColor() - dangerously named, rarely used and probably to be made obsolete.
|
||||
@ -425,6 +426,7 @@
|
||||
- window: detect extra End() call that pop the "Debug" window out and assert at call site instead of later.
|
||||
- window: consider renaming "GetWindowFont" which conflict with old Windows #define (#340)
|
||||
- window/tooltip: allow to set the width of a tooltip to allow TextWrapped() etc. while keeping the height automatic.
|
||||
- window: increase minimum size of a window with menus or fix the menu rendering so that it doesn't look odd.
|
||||
- draw-list: maintaining bounding box per command would allow to merge draw command when clipping isn't relied on (typical non-scrolling window or non-overflowing column would merge with previous command).
|
||||
!- scrolling: allow immediately effective change of scroll if we haven't appended items yet
|
||||
- splitter/separator: formalize the splitter idiom into an official api (we want to handle n-way split) (#319)
|
||||
@ -436,6 +438,7 @@
|
||||
- main: IsItemHovered() make it more consistent for various type of widgets, widgets with multiple components, etc. also effectively IsHovered() region sometimes differs from hot region, e.g tree nodes
|
||||
- main: IsItemHovered() info stored in a stack? so that 'if TreeNode() { Text; TreePop; } if IsHovered' return the hover state of the TreeNode?
|
||||
- input text: add ImGuiInputTextFlags_EnterToApply? (off #218)
|
||||
- input text: reorganize event handling, allow CharFilter to modify buffers, allow multiple events? (#541)
|
||||
- input text multi-line: don't directly call AddText() which does an unnecessary vertex reserve for character count prior to clipping. and/or more line-based clipping to AddText(). and/or reorganize TextUnformatted/RenderText for more efficiency for large text (e.g TextUnformatted could clip and log separately, etc).
|
||||
- input text multi-line: way to dynamically grow the buffer without forcing the user to initially allocate for worse case (follow up on #200)
|
||||
- input text multi-line: line numbers? status bar? (follow up on #200)
|
||||
@ -443,6 +446,7 @@
|
||||
- input number: holding [-]/[+] buttons could increase the step speed non-linearly (or user-controlled)
|
||||
- input number: use mouse wheel to step up/down
|
||||
- input number: applying arithmetics ops (+,-,*,/) messes up with text edit undo stack.
|
||||
- button: provide a button that looks framed.
|
||||
- text: proper alignment options
|
||||
- image/image button: misalignment on padded/bordered button?
|
||||
- image/image button: parameters are confusing, image() has tint_col,border_col whereas imagebutton() has bg_col/tint_col. Even thou they are different parameters ordering could be more consistent. can we fix that?
|
||||
@ -450,6 +454,7 @@
|
||||
- layout: horizontal flow until no space left (#404)
|
||||
- layout: more generic alignment state (left/right/centered) for single items?
|
||||
- layout: clean up the InputFloatN/SliderFloatN/ColorEdit4 layout code. item width should include frame padding.
|
||||
- layout: BeginGroup() needs a border option.
|
||||
- columns: declare column set (each column: fixed size, %, fill, distribute default size among fills) (#513, #125)
|
||||
- columns: add a conditional parameter to SetColumnOffset() (#513, #125)
|
||||
- columns: separator function or parameter that works within the column (currently Separator() bypass all columns) (#125)
|
||||
@ -467,9 +472,11 @@
|
||||
!- popups/menus: clarify usage of popups id, how MenuItem/Selectable closing parent popups affects the ID, etc. this is quite fishy needs improvement! (#331, #402)
|
||||
- popups: add variant using global identifier similar to Begin/End (#402)
|
||||
- popups: border options. richer api like BeginChild() perhaps? (#197)
|
||||
- tooltip: tooltip that doesn't fit in entire screen seems to lose their "last prefered button" and may teleport when moving mouse
|
||||
- menus: local shortcuts, global shortcuts (#456, #126)
|
||||
- menus: icons
|
||||
- menus: menubars: some sort of priority / effect of main menu-bar on desktop size?
|
||||
- menus: calling BeginMenu() twice with a same name doesn't seem to append nicely
|
||||
- statusbar: add a per-window status bar helper similar to what menubar does.
|
||||
- tabs (#261, #351)
|
||||
- separator: separator on the initial position of a window is not visible (cursorpos.y <= clippos.y)
|
||||
@ -493,6 +500,7 @@
|
||||
- text edit: flag to disable live update of the user buffer.
|
||||
- text edit: field resize behavior - field could stretch when being edited? hover tooltip shows more text?
|
||||
- tree node / optimization: avoid formatting when clipped.
|
||||
- tree node: clarify spacing, perhaps provide API to query exact spacing. provide API to draw the primitive. same with Bullet().
|
||||
- tree node: tree-node/header right-most side doesn't take account of horizontal scrolling.
|
||||
- tree node: add treenode/treepush int variants? because (void*) cast from int warns on some platforms/settings
|
||||
- tree node / selectable render mismatch which is visible if you use them both next to each other (e.g. cf. property viewer)
|
||||
@ -523,6 +531,7 @@
|
||||
- input: support track pad style scrolling & slider edit.
|
||||
- misc: provide a way to compile out the entire implementation while providing a dummy API (e.g. #define IMGUI_DUMMY_IMPL)
|
||||
- misc: double-clicking on title bar to minimize isn't consistent, perhaps move to single-click on left-most collapse icon?
|
||||
- misc: provide HoveredTime and ActivatedTime to ease the creation of animations.
|
||||
- style editor: have a more global HSV setter (e.g. alter hue on all elements). consider replacing active/hovered by offset in HSV space? (#438)
|
||||
- style editor: color child window height expressed in multiple of line height.
|
||||
- remote: make a system like RemoteImGui first-class citizen/project (#75)
|
||||
@ -1990,7 +1999,7 @@ void ImGui::NewFrame()
|
||||
}
|
||||
|
||||
// Are we using inputs? Tell user so they can capture/discard the inputs away from the rest of their application.
|
||||
// When clicking outside of a window we assume the click is owned by the application and won't request capture.
|
||||
// When clicking outside of a window we assume the click is owned by the application and won't request capture. We need to track click ownership.
|
||||
int mouse_earliest_button_down = -1;
|
||||
bool mouse_any_down = false;
|
||||
for (int i = 0; i < IM_ARRAYSIZE(g.IO.MouseDown); i++)
|
||||
@ -2002,16 +2011,19 @@ void ImGui::NewFrame()
|
||||
if (mouse_earliest_button_down == -1 || g.IO.MouseClickedTime[mouse_earliest_button_down] > g.IO.MouseClickedTime[i])
|
||||
mouse_earliest_button_down = i;
|
||||
}
|
||||
bool mouse_owned_by_application = mouse_earliest_button_down != -1 && !g.IO.MouseDownOwned[mouse_earliest_button_down];
|
||||
g.IO.WantCaptureMouse = (!mouse_owned_by_application && g.HoveredWindow != NULL) || (!mouse_owned_by_application && mouse_any_down) || (g.ActiveId != 0) || (!g.OpenedPopupStack.empty()) || (g.CaptureMouseNextFrame);
|
||||
g.IO.WantCaptureKeyboard = (g.ActiveId != 0) || (g.CaptureKeyboardNextFrame);
|
||||
bool mouse_avail_to_imgui = (mouse_earliest_button_down == -1) || g.IO.MouseDownOwned[mouse_earliest_button_down];
|
||||
if (g.CaptureMouseNextFrame != -1)
|
||||
g.IO.WantCaptureMouse = (g.CaptureMouseNextFrame != 0);
|
||||
else
|
||||
g.IO.WantCaptureMouse = (mouse_avail_to_imgui && (g.HoveredWindow != NULL || mouse_any_down)) || (g.ActiveId != 0) || (!g.OpenedPopupStack.empty());
|
||||
g.IO.WantCaptureKeyboard = (g.CaptureKeyboardNextFrame != -1) ? (g.CaptureKeyboardNextFrame != 0) : (g.ActiveId != 0);
|
||||
g.IO.WantTextInput = (g.ActiveId != 0 && g.InputTextState.Id == g.ActiveId);
|
||||
g.MouseCursor = ImGuiMouseCursor_Arrow;
|
||||
g.CaptureMouseNextFrame = g.CaptureKeyboardNextFrame = false;
|
||||
g.CaptureMouseNextFrame = g.CaptureKeyboardNextFrame = -1;
|
||||
g.OsImePosRequest = ImVec2(1.0f, 1.0f); // OS Input Method Editor showing on top-left of our window by default
|
||||
|
||||
// If mouse was first clicked outside of ImGui bounds we also cancel out hovering.
|
||||
if (mouse_owned_by_application)
|
||||
if (!mouse_avail_to_imgui)
|
||||
g.HoveredWindow = g.HoveredRootWindow = NULL;
|
||||
|
||||
// Scale & Scrolling
|
||||
@ -2990,14 +3002,14 @@ void ImGui::SetMouseCursor(ImGuiMouseCursor cursor_type)
|
||||
GImGui->MouseCursor = cursor_type;
|
||||
}
|
||||
|
||||
void ImGui::CaptureKeyboardFromApp()
|
||||
void ImGui::CaptureKeyboardFromApp(bool capture)
|
||||
{
|
||||
GImGui->CaptureKeyboardNextFrame = true;
|
||||
GImGui->CaptureKeyboardNextFrame = capture ? 1 : 0;
|
||||
}
|
||||
|
||||
void ImGui::CaptureMouseFromApp()
|
||||
void ImGui::CaptureMouseFromApp(bool capture)
|
||||
{
|
||||
GImGui->CaptureMouseNextFrame = true;
|
||||
GImGui->CaptureMouseNextFrame = capture ? 1 : 0;
|
||||
}
|
||||
|
||||
bool ImGui::IsItemHovered()
|
||||
@ -3383,12 +3395,11 @@ void ImGui::EndChild()
|
||||
else
|
||||
{
|
||||
// When using auto-filling child window, we don't provide full width/height to ItemSize so that it doesn't feed back into automatic size-fitting.
|
||||
ImGuiState& g = *GImGui;
|
||||
ImVec2 sz = ImGui::GetWindowSize();
|
||||
if (window->Flags & ImGuiWindowFlags_ChildWindowAutoFitX) // Arbitrary minimum zeroish child size of 4.0f
|
||||
sz.x = ImMax(4.0f, sz.x - g.Style.WindowPadding.x);
|
||||
if (window->Flags & ImGuiWindowFlags_ChildWindowAutoFitX) // Arbitrary minimum zero-ish child size of 4.0f causes less trouble than a 0.0f
|
||||
sz.x = ImMax(4.0f, sz.x);
|
||||
if (window->Flags & ImGuiWindowFlags_ChildWindowAutoFitY)
|
||||
sz.y = ImMax(4.0f, sz.y - g.Style.WindowPadding.y);
|
||||
sz.y = ImMax(4.0f, sz.y);
|
||||
|
||||
ImGui::End();
|
||||
|
||||
@ -5078,6 +5089,8 @@ void ImGui::TextUnformatted(const char* text, const char* text_end)
|
||||
while (line < text_end && lines_skipped < lines_skippable)
|
||||
{
|
||||
const char* line_end = strchr(line, '\n');
|
||||
if (!line_end)
|
||||
line_end = text_end;
|
||||
line = line_end + 1;
|
||||
lines_skipped++;
|
||||
}
|
||||
@ -5223,7 +5236,11 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
||||
SetHoveredID(id);
|
||||
if (!(flags & ImGuiButtonFlags_NoKeyModifiers) || (!g.IO.KeyCtrl && !g.IO.KeyShift && !g.IO.KeyAlt))
|
||||
{
|
||||
if (g.IO.MouseClicked[0])
|
||||
if (g.IO.MouseDoubleClicked[0] && (flags & ImGuiButtonFlags_PressedOnDoubleClick))
|
||||
{
|
||||
pressed = true;
|
||||
}
|
||||
else if (g.IO.MouseClicked[0])
|
||||
{
|
||||
if (flags & ImGuiButtonFlags_PressedOnClick)
|
||||
{
|
||||
@ -6405,6 +6422,7 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
|
||||
g.DragLastMouseDelta = ImVec2(0.f, 0.f);
|
||||
}
|
||||
|
||||
float v_cur = g.DragCurrentValue;
|
||||
const ImVec2 mouse_drag_delta = ImGui::GetMouseDragDelta(0, 1.0f);
|
||||
if (fabsf(mouse_drag_delta.x - g.DragLastMouseDelta.x) > 0.0f)
|
||||
{
|
||||
@ -6416,7 +6434,6 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
|
||||
if (g.IO.KeyAlt && g.DragSpeedScaleSlow >= 0.0f)
|
||||
speed = speed * g.DragSpeedScaleSlow;
|
||||
|
||||
float v_cur = g.DragCurrentValue;
|
||||
float delta = (mouse_drag_delta.x - g.DragLastMouseDelta.x) * speed;
|
||||
if (fabsf(power - 1.0f) > 0.001f)
|
||||
{
|
||||
@ -6438,14 +6455,14 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
|
||||
if (v_min < v_max)
|
||||
v_cur = ImClamp(v_cur, v_min, v_max);
|
||||
g.DragCurrentValue = v_cur;
|
||||
}
|
||||
|
||||
// Round to user desired precision, then apply
|
||||
v_cur = RoundScalar(v_cur, decimal_precision);
|
||||
if (*v != v_cur)
|
||||
{
|
||||
*v = v_cur;
|
||||
value_changed = true;
|
||||
}
|
||||
// Round to user desired precision, then apply
|
||||
v_cur = RoundScalar(v_cur, decimal_precision);
|
||||
if (*v != v_cur)
|
||||
{
|
||||
*v = v_cur;
|
||||
value_changed = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -7118,41 +7135,41 @@ void ImGuiTextEditState::OnKeyPressed(int key)
|
||||
|
||||
// Public API to manipulate UTF-8 text
|
||||
// We expose UTF-8 to the user (unlike the STB_TEXTEDIT_* functions which are manipulating wchar)
|
||||
// FIXME: The existence of this rarely exercised code path is a bit of a nuisance.
|
||||
void ImGuiTextEditCallbackData::DeleteChars(int pos, int bytes_count)
|
||||
{
|
||||
IM_ASSERT(pos + bytes_count <= BufTextLen);
|
||||
char* dst = Buf + pos;
|
||||
const char* src = Buf + pos + bytes_count;
|
||||
while (char c = *src++)
|
||||
*dst++ = c;
|
||||
*dst = '\0';
|
||||
|
||||
BufDirty = true;
|
||||
if (CursorPos + bytes_count >= pos)
|
||||
CursorPos -= bytes_count;
|
||||
else if (CursorPos >= pos)
|
||||
CursorPos = pos;
|
||||
SelectionStart = SelectionEnd = CursorPos;
|
||||
BufDirty = true;
|
||||
BufTextLen -= bytes_count;
|
||||
}
|
||||
|
||||
void ImGuiTextEditCallbackData::InsertChars(int pos, const char* new_text, const char* new_text_end)
|
||||
{
|
||||
const int text_len = (int)strlen(Buf);
|
||||
if (!new_text_end)
|
||||
new_text_end = new_text + strlen(new_text);
|
||||
const int new_text_len = (int)(new_text_end - new_text);
|
||||
|
||||
if (new_text_len + text_len + 1 >= BufSize)
|
||||
const int new_text_len = new_text_end ? (int)(new_text_end - new_text) : (int)strlen(new_text);
|
||||
if (new_text_len + BufTextLen + 1 >= BufSize)
|
||||
return;
|
||||
|
||||
if (text_len != pos)
|
||||
memmove(Buf + pos + new_text_len, Buf + pos, (size_t)(text_len - pos));
|
||||
if (BufTextLen != pos)
|
||||
memmove(Buf + pos + new_text_len, Buf + pos, (size_t)(BufTextLen - pos));
|
||||
memcpy(Buf + pos, new_text, (size_t)new_text_len * sizeof(char));
|
||||
Buf[text_len + new_text_len] = '\0';
|
||||
Buf[BufTextLen + new_text_len] = '\0';
|
||||
|
||||
BufDirty = true;
|
||||
if (CursorPos >= pos)
|
||||
CursorPos += new_text_len;
|
||||
SelectionStart = SelectionEnd = CursorPos;
|
||||
BufDirty = true;
|
||||
BufTextLen += new_text_len;
|
||||
}
|
||||
|
||||
// Return false to discard a character.
|
||||
@ -7540,10 +7557,13 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
||||
event_flag = ImGuiInputTextFlags_CallbackHistory;
|
||||
event_key = ImGuiKey_DownArrow;
|
||||
}
|
||||
else if (flags & ImGuiInputTextFlags_CallbackAlways)
|
||||
event_flag = ImGuiInputTextFlags_CallbackAlways;
|
||||
|
||||
if (event_key != ImGuiKey_COUNT || (flags & ImGuiInputTextFlags_CallbackAlways) != 0)
|
||||
if (event_flag)
|
||||
{
|
||||
ImGuiTextEditCallbackData callback_data;
|
||||
memset(&callback_data, 0, sizeof(ImGuiTextEditCallbackData));
|
||||
callback_data.EventFlag = event_flag;
|
||||
callback_data.Flags = flags;
|
||||
callback_data.UserData = user_data;
|
||||
@ -7551,10 +7571,11 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
||||
|
||||
callback_data.EventKey = event_key;
|
||||
callback_data.Buf = edit_state.TempTextBuffer.Data;
|
||||
callback_data.BufTextLen = edit_state.CurLenA;
|
||||
callback_data.BufSize = edit_state.BufSizeA;
|
||||
callback_data.BufDirty = false;
|
||||
|
||||
// We have to convert from position from wchar to UTF-8 positions
|
||||
// We have to convert from wchar-positions to UTF-8-positions, which can be pretty slow (an incentive to ditch the ImWchar buffer, see https://github.com/nothings/stb/issues/188)
|
||||
ImWchar* text = edit_state.Text.Data;
|
||||
const int utf8_cursor_pos = callback_data.CursorPos = ImTextCountUtf8BytesFromStr(text, text + edit_state.StbState.cursor);
|
||||
const int utf8_selection_start = callback_data.SelectionStart = ImTextCountUtf8BytesFromStr(text, text + edit_state.StbState.select_start);
|
||||
@ -7572,8 +7593,9 @@ bool ImGui::InputTextEx(const char* label, char* buf, int buf_size, const ImVec2
|
||||
if (callback_data.SelectionEnd != utf8_selection_end) edit_state.StbState.select_end = ImTextCountCharsFromUtf8(callback_data.Buf, callback_data.Buf + callback_data.SelectionEnd);
|
||||
if (callback_data.BufDirty)
|
||||
{
|
||||
edit_state.CurLenW = ImTextStrFromUtf8(text, edit_state.Text.Size, edit_state.TempTextBuffer.Data, NULL);
|
||||
edit_state.CurLenA = (int)strlen(edit_state.TempTextBuffer.Data);
|
||||
IM_ASSERT(callback_data.BufTextLen == (int)strlen(callback_data.Buf)); // You need to maintain BufTextLen if you change the text!
|
||||
edit_state.CurLenW = ImTextStrFromUtf8(edit_state.Text.Data, edit_state.Text.Size, callback_data.Buf, NULL);
|
||||
edit_state.CurLenA = callback_data.BufTextLen; // Assume correct length and valid UTF-8 from user, saves us an extra strlen()
|
||||
edit_state.CursorAnimReset();
|
||||
}
|
||||
}
|
||||
@ -8137,6 +8159,7 @@ bool ImGui::Selectable(const char* label, bool selected, ImGuiSelectableFlags fl
|
||||
if (flags & ImGuiSelectableFlags_Menu) button_flags |= ImGuiButtonFlags_PressedOnClick;
|
||||
if (flags & ImGuiSelectableFlags_MenuItem) button_flags |= ImGuiButtonFlags_PressedOnClick|ImGuiButtonFlags_PressedOnRelease;
|
||||
if (flags & ImGuiSelectableFlags_Disabled) button_flags |= ImGuiButtonFlags_Disabled;
|
||||
if (flags & ImGuiSelectableFlags_AllowDoubleClick) button_flags |= ImGuiButtonFlags_PressedOnDoubleClick;
|
||||
bool hovered, held;
|
||||
bool pressed = ButtonBehavior(bb_with_spacing, id, &hovered, &held, button_flags);
|
||||
if (flags & ImGuiSelectableFlags_Disabled)
|
||||
|
29
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h
vendored
29
3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.h
vendored
@ -239,7 +239,7 @@ namespace ImGui
|
||||
IMGUI_API void TextUnformatted(const char* text, const char* text_end = NULL); // doesn't require null terminated string if 'text_end' is specified. no copy done to any bounded stack buffer, recommended for long chunks of text
|
||||
IMGUI_API void LabelText(const char* label, const char* fmt, ...) IM_PRINTFARGS(2); // display text+label aligned the same way as value+label widgets
|
||||
IMGUI_API void LabelTextV(const char* label, const char* fmt, va_list args);
|
||||
IMGUI_API void Bullet();
|
||||
IMGUI_API void Bullet(); // draw a small circle and keep the cursor on the same line. advance you by the same distance as an empty TreeNode() call.
|
||||
IMGUI_API void BulletText(const char* fmt, ...) IM_PRINTFARGS(1);
|
||||
IMGUI_API void BulletTextV(const char* fmt, va_list args);
|
||||
IMGUI_API bool Button(const char* label, const ImVec2& size = ImVec2(0,0));
|
||||
@ -303,8 +303,8 @@ namespace ImGui
|
||||
IMGUI_API bool VSliderInt(const char* label, const ImVec2& size, int* v, int v_min, int v_max, const char* display_format = "%.0f");
|
||||
|
||||
// Widgets: Trees
|
||||
IMGUI_API bool TreeNode(const char* str_label_id); // if returning 'true' the node is open and the user is responsible for calling TreePop()
|
||||
IMGUI_API bool TreeNode(const char* str_id, const char* fmt, ...) IM_PRINTFARGS(2); // "
|
||||
IMGUI_API bool TreeNode(const char* str_label_id); // if returning 'true' the node is open and the user is responsible for calling TreePop().
|
||||
IMGUI_API bool TreeNode(const char* str_id, const char* fmt, ...) IM_PRINTFARGS(2); // read the FAQ about why and how to use ID. to align arbitrary text at the same level as a TreeNode() you can use Bullet().
|
||||
IMGUI_API bool TreeNode(const void* ptr_id, const char* fmt, ...) IM_PRINTFARGS(2); // "
|
||||
IMGUI_API bool TreeNodeV(const char* str_id, const char* fmt, va_list args); // "
|
||||
IMGUI_API bool TreeNodeV(const void* ptr_id, const char* fmt, va_list args); // "
|
||||
@ -415,8 +415,8 @@ namespace ImGui
|
||||
IMGUI_API void ResetMouseDragDelta(int button = 0); //
|
||||
IMGUI_API ImGuiMouseCursor GetMouseCursor(); // get desired cursor type, reset in ImGui::NewFrame(), this updated during the frame. valid before Render(). If you use software rendering by setting io.MouseDrawCursor ImGui will render those for you
|
||||
IMGUI_API void SetMouseCursor(ImGuiMouseCursor type); // set desired cursor type
|
||||
IMGUI_API void CaptureKeyboardFromApp(); // manually enforce imgui setting the io.WantCaptureKeyboard flag next frame (your application needs to handle it). e.g. capture keyboard when your widget is being hovered.
|
||||
IMGUI_API void CaptureMouseFromApp(); // manually enforce imgui setting the io.WantCaptureMouse flag next frame (your application needs to handle it).
|
||||
IMGUI_API void CaptureKeyboardFromApp(bool capture = true); // manually override io.WantCaptureKeyboard flag next frame (said flag is entirely left for your application handle). e.g. force capture keyboard when your widget is being hovered.
|
||||
IMGUI_API void CaptureMouseFromApp(bool capture = true); // manually override io.WantCaptureMouse flag next frame (said flag is entirely left for your application handle).
|
||||
|
||||
// Helpers functions to access functions pointers in ImGui::GetIO()
|
||||
IMGUI_API void* MemAlloc(size_t sz);
|
||||
@ -488,7 +488,7 @@ enum ImGuiInputTextFlags_
|
||||
ImGuiInputTextFlags_EnterReturnsTrue = 1 << 5, // Return 'true' when Enter is pressed (as opposed to when the value was modified)
|
||||
ImGuiInputTextFlags_CallbackCompletion = 1 << 6, // Call user function on pressing TAB (for completion handling)
|
||||
ImGuiInputTextFlags_CallbackHistory = 1 << 7, // Call user function on pressing Up/Down arrows (for history handling)
|
||||
ImGuiInputTextFlags_CallbackAlways = 1 << 8, // Call user function every time
|
||||
ImGuiInputTextFlags_CallbackAlways = 1 << 8, // Call user function every time. User code may query cursor position, modify text buffer.
|
||||
ImGuiInputTextFlags_CallbackCharFilter = 1 << 9, // Call user function to filter character. Modify data->EventChar to replace/filter input, or return 1 to discard character.
|
||||
ImGuiInputTextFlags_AllowTabInput = 1 << 10, // Pressing TAB input a '\t' character into the text field
|
||||
ImGuiInputTextFlags_CtrlEnterForNewLine = 1 << 11, // In multi-line mode, allow exiting edition by pressing Enter. Ctrl+Enter to add new line (by default adds new lines with Enter).
|
||||
@ -505,7 +505,8 @@ enum ImGuiSelectableFlags_
|
||||
{
|
||||
// Default: 0
|
||||
ImGuiSelectableFlags_DontClosePopups = 1 << 0, // Clicking this don't close parent popup window
|
||||
ImGuiSelectableFlags_SpanAllColumns = 1 << 1 // Selectable frame can span all columns (text will still fit in current column)
|
||||
ImGuiSelectableFlags_SpanAllColumns = 1 << 1, // Selectable frame can span all columns (text will still fit in current column)
|
||||
ImGuiSelectableFlags_AllowDoubleClick = 1 << 2 // Generate press events on double clicks too
|
||||
};
|
||||
|
||||
// User fill ImGuiIO.KeyMap[] array with indices into the ImGuiIO.KeysDown[512] array
|
||||
@ -946,7 +947,7 @@ struct ImGuiStorage
|
||||
IMGUI_API void SetAllInt(int val);
|
||||
};
|
||||
|
||||
// Shared state of InputText(), passed to callback when a ImGuiInputTextFlags_Callback* flag is used.
|
||||
// Shared state of InputText(), passed to callback when a ImGuiInputTextFlags_Callback* flag is used and the corresponding callback is triggered.
|
||||
struct ImGuiTextEditCallbackData
|
||||
{
|
||||
ImGuiInputTextFlags EventFlag; // One of ImGuiInputTextFlags_Callback* // Read-only
|
||||
@ -958,15 +959,17 @@ struct ImGuiTextEditCallbackData
|
||||
ImWchar EventChar; // Character input // Read-write (replace character or set to zero)
|
||||
|
||||
// Completion,History,Always events:
|
||||
// If you modify the buffer contents make sure you update 'BufTextLen' and set 'BufDirty' to true.
|
||||
ImGuiKey EventKey; // Key pressed (Up/Down/TAB) // Read-only
|
||||
char* Buf; // Current text // Read-write (pointed data only)
|
||||
int BufSize; // // Read-only
|
||||
bool BufDirty; // Must set if you modify Buf directly // Write
|
||||
char* Buf; // Current text buffer // Read-write (pointed data only, can't replace the actual pointer)
|
||||
int BufTextLen; // Current text length in bytes // Read-write
|
||||
int BufSize; // Maximum text length in bytes // Read-only
|
||||
bool BufDirty; // Set if you modify Buf/BufTextLen!! // Write
|
||||
int CursorPos; // // Read-write
|
||||
int SelectionStart; // // Read-write (== to SelectionEnd when no selection)
|
||||
int SelectionEnd; // // Read-write
|
||||
|
||||
// NB: calling those function loses selection.
|
||||
// NB: Helper functions for text manipulation. Calling those function loses selection.
|
||||
void DeleteChars(int pos, int bytes_count);
|
||||
void InsertChars(int pos, const char* text, const char* text_end = NULL);
|
||||
bool HasSelection() const { return SelectionStart != SelectionEnd; }
|
||||
@ -1256,7 +1259,7 @@ struct ImFontAtlas
|
||||
int TexHeight; // Texture height calculated during Build().
|
||||
int TexDesiredWidth; // Texture width desired by user before Build(). Must be a power-of-two. If have many glyphs your graphics API have texture size restrictions you may want to increase texture width to decrease height.
|
||||
ImVec2 TexUvWhitePixel; // Texture coordinates to a white pixel (part of the TexExtraData block)
|
||||
ImVector<ImFont*> Fonts;
|
||||
ImVector<ImFont*> Fonts; // Hold all the fonts returned by AddFont*. Fonts[0] is the default font upon calling ImGui::NewFrame(), use ImGui::PushFont()/PopFont() to change the current font.
|
||||
|
||||
// Private
|
||||
ImVector<ImFontConfig> ConfigData; // Internal data
|
||||
|
@ -392,11 +392,14 @@ void ImGui::ShowTestWindow(bool* p_opened)
|
||||
{
|
||||
if (ImGui::TreeNode("Basic"))
|
||||
{
|
||||
static bool selected[3] = { false, true, false };
|
||||
static bool selected[4] = { false, true, false, false };
|
||||
ImGui::Selectable("1. I am selectable", &selected[0]);
|
||||
ImGui::Selectable("2. I am selectable", &selected[1]);
|
||||
ImGui::Text("3. I am not selectable");
|
||||
ImGui::Selectable("4. I am selectable", &selected[2]);
|
||||
if (ImGui::Selectable("5. I am double clickable", selected[3], ImGuiSelectableFlags_AllowDoubleClick))
|
||||
if (ImGui::IsMouseDoubleClicked(0))
|
||||
selected[3] = !selected[3];
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("Rendering more text into the same block"))
|
||||
@ -713,7 +716,9 @@ void ImGui::ShowTestWindow(bool* p_opened)
|
||||
static float arr[] = { 0.6f, 0.1f, 1.0f, 0.5f, 0.92f, 0.1f, 0.2f };
|
||||
ImGui::PlotLines("Frame Times", arr, IM_ARRAYSIZE(arr));
|
||||
|
||||
static ImVector<float> values; if (values.empty()) { values.resize(90); memset(values.Data, 0, values.Size*sizeof(float)); }
|
||||
// Create a dummy array of contiguous float values to plot
|
||||
// Tip: If your float aren't contiguous but part of a structure, you can pass a pointer to your first float and the sizeof() of your structure in the Stride parameter.
|
||||
static float values[90] = { 0 };
|
||||
static int values_offset = 0;
|
||||
if (animate)
|
||||
{
|
||||
@ -722,11 +727,11 @@ void ImGui::ShowTestWindow(bool* p_opened)
|
||||
{
|
||||
static float phase = 0.0f;
|
||||
values[values_offset] = cosf(phase);
|
||||
values_offset = (values_offset+1)%values.Size;
|
||||
values_offset = (values_offset+1) % IM_ARRAYSIZE(values);
|
||||
phase += 0.10f*values_offset;
|
||||
}
|
||||
}
|
||||
ImGui::PlotLines("Lines", values.Data, values.Size, values_offset, "avg 0.0", -1.0f, 1.0f, ImVec2(0,80));
|
||||
ImGui::PlotLines("Lines", values, IM_ARRAYSIZE(values), values_offset, "avg 0.0", -1.0f, 1.0f, ImVec2(0,80));
|
||||
ImGui::PlotHistogram("Histogram", arr, IM_ARRAYSIZE(arr), 0, NULL, 0.0f, 1.0f, ImVec2(0,80));
|
||||
|
||||
// Use functions to generate output
|
||||
@ -1501,10 +1506,14 @@ void ImGui::ShowTestWindow(bool* p_opened)
|
||||
ImGui::Text("WantCaptureKeyboard: %s", io.WantCaptureKeyboard ? "true" : "false");
|
||||
ImGui::Text("WantTextInput: %s", io.WantTextInput ? "true" : "false");
|
||||
|
||||
ImGui::Button("Hover me\nto enforce\ninputs capture");
|
||||
ImGui::Button("Hovering me sets the\nkeyboard capture flag");
|
||||
if (ImGui::IsItemHovered())
|
||||
ImGui::CaptureKeyboardFromApp();
|
||||
|
||||
ImGui::CaptureKeyboardFromApp(true);
|
||||
ImGui::SameLine();
|
||||
ImGui::Button("Holding me clears the\nthe keyboard capture flag");
|
||||
if (ImGui::IsItemActive())
|
||||
ImGui::CaptureKeyboardFromApp(false);
|
||||
|
||||
ImGui::TreePop();
|
||||
}
|
||||
|
||||
@ -1886,18 +1895,19 @@ struct ExampleAppConsole
|
||||
Commands.push_back("HISTORY");
|
||||
Commands.push_back("CLEAR");
|
||||
Commands.push_back("CLASSIFY"); // "classify" is here to provide an example of "C"+[tab] completing to "CL" and displaying matches.
|
||||
AddLog("Welcome to ImGui!");
|
||||
}
|
||||
~ExampleAppConsole()
|
||||
{
|
||||
ClearLog();
|
||||
for (int i = 0; i < Items.Size; i++)
|
||||
for (int i = 0; i < History.Size; i++)
|
||||
free(History[i]);
|
||||
}
|
||||
|
||||
// Portable helpers
|
||||
static int Stricmp(const char* str1, const char* str2) { int d; while ((d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; } return d; }
|
||||
static int Strnicmp(const char* str1, const char* str2, int n) { int d = 0; while (n > 0 && (d = toupper(*str2) - toupper(*str1)) == 0 && *str1) { str1++; str2++; n--; } return d; }
|
||||
static char* Strdup(const char *str) { size_t len = strlen(str) + 1; void* buff = ImGui::MemAlloc(len); return (char*)memcpy(buff, (const void*)str, len); }
|
||||
static char* Strdup(const char *str) { size_t len = strlen(str) + 1; void* buff = malloc(len); return (char*)memcpy(buff, (const void*)str, len); }
|
||||
|
||||
void ClearLog()
|
||||
{
|
||||
@ -2126,9 +2136,8 @@ struct ExampleAppConsole
|
||||
// A better implementation would preserve the data on the current input line along with cursor position.
|
||||
if (prev_history_pos != HistoryPos)
|
||||
{
|
||||
snprintf(data->Buf, data->BufSize, "%s", (HistoryPos >= 0) ? History[HistoryPos] : "");
|
||||
data->CursorPos = data->SelectionStart = data->SelectionEnd = data->BufTextLen = (int)snprintf(data->Buf, data->BufSize, "%s", (HistoryPos >= 0) ? History[HistoryPos] : "");
|
||||
data->BufDirty = true;
|
||||
data->CursorPos = data->SelectionStart = data->SelectionEnd = (int)strlen(data->Buf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -152,14 +152,15 @@ inline void operator delete(void*, ImPlacementNewDummy, void*) {}
|
||||
|
||||
enum ImGuiButtonFlags_
|
||||
{
|
||||
ImGuiButtonFlags_Repeat = 1 << 0,
|
||||
ImGuiButtonFlags_PressedOnClick = 1 << 1, // return pressed on click only (default requires click+release)
|
||||
ImGuiButtonFlags_PressedOnRelease = 1 << 2, // return pressed on release only (default requires click+release)
|
||||
ImGuiButtonFlags_FlattenChilds = 1 << 3,
|
||||
ImGuiButtonFlags_DontClosePopups = 1 << 4,
|
||||
ImGuiButtonFlags_Disabled = 1 << 5,
|
||||
ImGuiButtonFlags_AlignTextBaseLine = 1 << 6,
|
||||
ImGuiButtonFlags_NoKeyModifiers = 1 << 7
|
||||
ImGuiButtonFlags_Repeat = 1 << 0, // hold to repeat
|
||||
ImGuiButtonFlags_PressedOnClick = 1 << 1, // return pressed on click (default requires click+release)
|
||||
ImGuiButtonFlags_PressedOnRelease = 1 << 2, // return pressed on release (default requires click+release)
|
||||
ImGuiButtonFlags_PressedOnDoubleClick = 1 << 3, // return pressed on double-click (default requires click+release)
|
||||
ImGuiButtonFlags_FlattenChilds = 1 << 4, // allow interaction even if a child window is overlapping
|
||||
ImGuiButtonFlags_DontClosePopups = 1 << 5, // disable automatically closing parent popup on press
|
||||
ImGuiButtonFlags_Disabled = 1 << 6, // disable interaction
|
||||
ImGuiButtonFlags_AlignTextBaseLine = 1 << 7, // vertically align button to match text baseline - ButtonEx() only
|
||||
ImGuiButtonFlags_NoKeyModifiers = 1 << 8 // disable interaction if a key modifier is held
|
||||
};
|
||||
|
||||
enum ImGuiTreeNodeFlags_
|
||||
@ -176,10 +177,10 @@ enum ImGuiSliderFlags_
|
||||
enum ImGuiSelectableFlagsPrivate_
|
||||
{
|
||||
// NB: need to be in sync with last value of ImGuiSelectableFlags_
|
||||
ImGuiSelectableFlags_Menu = 1 << 2,
|
||||
ImGuiSelectableFlags_MenuItem = 1 << 3,
|
||||
ImGuiSelectableFlags_Disabled = 1 << 4,
|
||||
ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 5
|
||||
ImGuiSelectableFlags_Menu = 1 << 3,
|
||||
ImGuiSelectableFlags_MenuItem = 1 << 4,
|
||||
ImGuiSelectableFlags_Disabled = 1 << 5,
|
||||
ImGuiSelectableFlags_DrawFillAvailWidth = 1 << 6
|
||||
};
|
||||
|
||||
// FIXME: this is in development, not exposed/functional as a generic feature yet.
|
||||
@ -434,8 +435,8 @@ struct ImGuiState
|
||||
float FramerateSecPerFrame[120]; // calculate estimate of framerate for user
|
||||
int FramerateSecPerFrameIdx;
|
||||
float FramerateSecPerFrameAccum;
|
||||
bool CaptureMouseNextFrame; // explicit capture via CaptureInputs() sets those flags
|
||||
bool CaptureKeyboardNextFrame;
|
||||
int CaptureMouseNextFrame; // explicit capture via CaptureInputs() sets those flags
|
||||
int CaptureKeyboardNextFrame;
|
||||
char TempBuffer[1024*3+1]; // temporary text buffer
|
||||
|
||||
ImGuiState()
|
||||
@ -501,7 +502,7 @@ struct ImGuiState
|
||||
memset(FramerateSecPerFrame, 0, sizeof(FramerateSecPerFrame));
|
||||
FramerateSecPerFrameIdx = 0;
|
||||
FramerateSecPerFrameAccum = 0.0f;
|
||||
CaptureMouseNextFrame = CaptureKeyboardNextFrame = false;
|
||||
CaptureMouseNextFrame = CaptureKeyboardNextFrame = -1;
|
||||
memset(TempBuffer, 0, sizeof(TempBuffer));
|
||||
}
|
||||
};
|
||||
|
18
3rdparty/bgfx/CONTRUBUTING.md
vendored
Normal file
18
3rdparty/bgfx/CONTRUBUTING.md
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
## How to contribute?
|
||||
|
||||
Everyone is welcome to contribute to bgfx by submitting bug reports, testing on
|
||||
different platforms, writing examples, improving documentation, profiling and
|
||||
optimizing, helping newcomers, telling others about bgfx, etc.
|
||||
|
||||
## Contributing code
|
||||
|
||||
**When contributing to the bgfx project you must agree to the BSD 2-clause
|
||||
licensing terms.**
|
||||
|
||||
Pull request checklist:
|
||||
|
||||
- Make sure you test your code with provided examples before creating PR.
|
||||
- Create focused PR with minimal number of changes relevant to feature added
|
||||
or bug fixed.
|
||||
- Use [EditorConfig](http://editorconfig.org/) in your editor of choice to
|
||||
apply the same editor settings used by bgfx project.
|
3
3rdparty/bgfx/README.md
vendored
3
3rdparty/bgfx/README.md
vendored
@ -77,7 +77,8 @@ Who is using it?
|
||||
----------------
|
||||
|
||||
http://airmech.com/ AirMech is a free-to-play futuristic action real-time
|
||||
strategy video game developed and published by Carbon Games.
|
||||
strategy video game developed and published by Carbon Games.
|
||||

|
||||
|
||||
https://github.com/dariomanesku/cmftStudio cmftStudio - cubemap filtering tool.
|
||||

|
||||
|
114
3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
vendored
114
3rdparty/bgfx/examples/00-helloworld/helloworld.cpp
vendored
@ -3,60 +3,82 @@
|
||||
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include <bgfx/bgfx.h>
|
||||
#include <bx/uint32_t.h>
|
||||
#include "common.h"
|
||||
#include "bgfx_utils.h"
|
||||
#include "logo.h"
|
||||
|
||||
int _main_(int /*_argc*/, char** /*_argv*/)
|
||||
class ExampleHelloWorld : public entry::AppI
|
||||
{
|
||||
uint32_t width = 1280;
|
||||
uint32_t height = 720;
|
||||
uint32_t debug = BGFX_DEBUG_TEXT;
|
||||
uint32_t reset = BGFX_RESET_VSYNC;
|
||||
|
||||
bgfx::init();
|
||||
bgfx::reset(width, height, reset);
|
||||
|
||||
// Enable debug text.
|
||||
bgfx::setDebug(debug);
|
||||
|
||||
// Set view 0 clear state.
|
||||
bgfx::setViewClear(0
|
||||
, BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH
|
||||
, 0x303030ff
|
||||
, 1.0f
|
||||
, 0
|
||||
);
|
||||
|
||||
while (!entry::processEvents(width, height, debug, reset) )
|
||||
void init(int _argc, char** _argv) BX_OVERRIDE
|
||||
{
|
||||
// Set view 0 default viewport.
|
||||
bgfx::setViewRect(0, 0, 0, width, height);
|
||||
Args args(_argc, _argv);
|
||||
|
||||
// This dummy draw call is here to make sure that view 0 is cleared
|
||||
// if no other draw calls are submitted to view 0.
|
||||
bgfx::touch(0);
|
||||
m_width = 1280;
|
||||
m_height = 720;
|
||||
m_debug = BGFX_DEBUG_TEXT;
|
||||
m_reset = BGFX_RESET_VSYNC;
|
||||
|
||||
// Use debug font to print information about this example.
|
||||
bgfx::dbgTextClear();
|
||||
bgfx::dbgTextImage(bx::uint16_max(width/2/8, 20)-20
|
||||
, bx::uint16_max(height/2/16, 6)-6
|
||||
, 40
|
||||
, 12
|
||||
, s_logo
|
||||
, 160
|
||||
);
|
||||
bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/00-helloworld");
|
||||
bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Initialization and debug text.");
|
||||
bgfx::init(args.m_type, args.m_pciId);
|
||||
bgfx::reset(m_width, m_height, m_reset);
|
||||
|
||||
// Advance to next frame. Rendering thread will be kicked to
|
||||
// process submitted rendering primitives.
|
||||
bgfx::frame();
|
||||
// Enable debug text.
|
||||
bgfx::setDebug(m_debug);
|
||||
|
||||
// Set view 0 clear state.
|
||||
bgfx::setViewClear(0
|
||||
, BGFX_CLEAR_COLOR|BGFX_CLEAR_DEPTH
|
||||
, 0x303030ff
|
||||
, 1.0f
|
||||
, 0
|
||||
);
|
||||
}
|
||||
|
||||
// Shutdown bgfx.
|
||||
bgfx::shutdown();
|
||||
virtual int shutdown() BX_OVERRIDE
|
||||
{
|
||||
// Shutdown bgfx.
|
||||
bgfx::shutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
bool update() BX_OVERRIDE
|
||||
{
|
||||
if (!entry::processEvents(m_width, m_height, m_debug, m_reset) )
|
||||
{
|
||||
// Set view 0 default viewport.
|
||||
bgfx::setViewRect(0, 0, 0, m_width, m_height);
|
||||
|
||||
// This dummy draw call is here to make sure that view 0 is cleared
|
||||
// if no other draw calls are submitted to view 0.
|
||||
bgfx::touch(0);
|
||||
|
||||
// Use debug font to print information about this example.
|
||||
bgfx::dbgTextClear();
|
||||
bgfx::dbgTextImage(bx::uint16_max(m_width /2/8, 20)-20
|
||||
, bx::uint16_max(m_height/2/16, 6)-6
|
||||
, 40
|
||||
, 12
|
||||
, s_logo
|
||||
, 160
|
||||
);
|
||||
bgfx::dbgTextPrintf(0, 1, 0x4f, "bgfx/examples/00-helloworld");
|
||||
bgfx::dbgTextPrintf(0, 2, 0x6f, "Description: Initialization and debug text.");
|
||||
|
||||
// Advance to next frame. Rendering thread will be kicked to
|
||||
// process submitted rendering primitives.
|
||||
bgfx::frame();
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t m_width;
|
||||
uint32_t m_height;
|
||||
uint32_t m_debug;
|
||||
uint32_t m_reset;
|
||||
};
|
||||
|
||||
ENTRY_IMPLEMENT_MAIN(ExampleHelloWorld);
|
||||
|
@ -1234,7 +1234,7 @@ private:
|
||||
bgfx::setVertexBuffer(m_vbh, mesh.m_startVertex, mesh.m_numVertices);
|
||||
bgfx::setState(0
|
||||
| attrib.m_state
|
||||
| (_wireframe ? BGFX_STATE_PT_LINES : 0)
|
||||
| (_wireframe ? BGFX_STATE_PT_LINES|BGFX_STATE_LINEAA|BGFX_STATE_BLEND_ALPHA : 0)
|
||||
);
|
||||
bgfx::submit(m_viewId, m_program[_wireframe ? Program::Fill : Program::FillLit]);
|
||||
}
|
||||
@ -1268,7 +1268,8 @@ private:
|
||||
| BGFX_STATE_PT_LINES
|
||||
| BGFX_STATE_DEPTH_TEST_LEQUAL
|
||||
| BGFX_STATE_DEPTH_WRITE
|
||||
// | BGFX_STATE_BLEND_ALPHA
|
||||
| BGFX_STATE_LINEAA
|
||||
| BGFX_STATE_BLEND_ALPHA
|
||||
);
|
||||
bgfx::setTransform(m_mtx);
|
||||
bgfx::ProgramHandle program = m_program[m_attrib[m_stack].m_stipple ? 1 : 0];
|
||||
|
532
3rdparty/bgfx/include/bgfx/bgfx.h
vendored
532
3rdparty/bgfx/include/bgfx/bgfx.h
vendored
@ -368,7 +368,12 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_callback_vtbl.trace_vargs`.
|
||||
///
|
||||
virtual void traceVargs(const char* _filePath, uint16_t _line, const char* _format, va_list _argList) = 0;
|
||||
virtual void traceVargs(
|
||||
const char* _filePath
|
||||
, uint16_t _line
|
||||
, const char* _format
|
||||
, va_list _argList
|
||||
) = 0;
|
||||
|
||||
/// Return size of for cached item. Return 0 if no cached item was
|
||||
/// found.
|
||||
@ -414,13 +419,27 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_callback_vtbl.screen_shot`.
|
||||
///
|
||||
virtual void screenShot(const char* _filePath, uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _data, uint32_t _size, bool _yflip) = 0;
|
||||
virtual void screenShot(
|
||||
const char* _filePath
|
||||
, uint32_t _width
|
||||
, uint32_t _height
|
||||
, uint32_t _pitch
|
||||
, const void* _data
|
||||
, uint32_t _size
|
||||
, bool _yflip
|
||||
) = 0;
|
||||
|
||||
/// Called when capture begins.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_callback_vtbl.capture_begin`.
|
||||
///
|
||||
virtual void captureBegin(uint32_t _width, uint32_t _height, uint32_t _pitch, TextureFormat::Enum _format, bool _yflip) = 0;
|
||||
virtual void captureBegin(
|
||||
uint32_t _width
|
||||
, uint32_t _height
|
||||
, uint32_t _pitch
|
||||
, TextureFormat::Enum _format
|
||||
, bool _yflip
|
||||
) = 0;
|
||||
|
||||
/// Called when capture ends.
|
||||
///
|
||||
@ -658,7 +677,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_vertex_decl_add`.
|
||||
///
|
||||
VertexDecl& add(Attrib::Enum _attrib, uint8_t _num, AttribType::Enum _type, bool _normalized = false, bool _asInt = false);
|
||||
VertexDecl& add(
|
||||
Attrib::Enum _attrib
|
||||
, uint8_t _num
|
||||
, AttribType::Enum _type
|
||||
, bool _normalized = false
|
||||
, bool _asInt = false
|
||||
);
|
||||
|
||||
/// Skip _num bytes in vertex stream.
|
||||
///
|
||||
@ -670,7 +695,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is ``.
|
||||
///
|
||||
void decode(Attrib::Enum _attrib, uint8_t& _num, AttribType::Enum& _type, bool& _normalized, bool& _asInt) const;
|
||||
void decode(
|
||||
Attrib::Enum _attrib
|
||||
, uint8_t& _num
|
||||
, AttribType::Enum& _type
|
||||
, bool& _normalized
|
||||
, bool& _asInt
|
||||
) const;
|
||||
|
||||
/// Returns true if VertexDecl contains attribute.
|
||||
bool has(Attrib::Enum _attrib) const { return UINT16_MAX != m_attributes[_attrib]; }
|
||||
@ -694,13 +725,26 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_vertex_pack`.
|
||||
///
|
||||
void vertexPack(const float _input[4], bool _inputNormalized, Attrib::Enum _attr, const VertexDecl& _decl, void* _data, uint32_t _index = 0);
|
||||
void vertexPack(
|
||||
const float _input[4]
|
||||
, bool _inputNormalized
|
||||
, Attrib::Enum _attr
|
||||
, const VertexDecl& _decl
|
||||
, void* _data
|
||||
, uint32_t _index = 0
|
||||
);
|
||||
|
||||
/// Unpack vec4 from vertex stream format.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_vertex_unpack`.
|
||||
///
|
||||
void vertexUnpack(float _output[4], Attrib::Enum _attr, const VertexDecl& _decl, const void* _data, uint32_t _index = 0);
|
||||
void vertexUnpack(
|
||||
float _output[4]
|
||||
, Attrib::Enum _attr
|
||||
, const VertexDecl& _decl
|
||||
, const void* _data
|
||||
, uint32_t _index = 0
|
||||
);
|
||||
|
||||
/// Converts vertex stream data from one vertex stream format to another.
|
||||
///
|
||||
@ -712,7 +756,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_vertex_convert`.
|
||||
///
|
||||
void vertexConvert(const VertexDecl& _destDecl, void* _destData, const VertexDecl& _srcDecl, const void* _srcData, uint32_t _num = 1);
|
||||
void vertexConvert(
|
||||
const VertexDecl& _destDecl
|
||||
, void* _destData
|
||||
, const VertexDecl& _srcDecl
|
||||
, const void* _srcData
|
||||
, uint32_t _num = 1
|
||||
);
|
||||
|
||||
/// Weld vertices.
|
||||
///
|
||||
@ -726,7 +776,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_weld_vertices`.
|
||||
///
|
||||
uint16_t weldVertices(uint16_t* _output, const VertexDecl& _decl, const void* _data, uint16_t _num, float _epsilon = 0.001f);
|
||||
uint16_t weldVertices(
|
||||
uint16_t* _output
|
||||
, const VertexDecl& _decl
|
||||
, const void* _data
|
||||
, uint16_t _num
|
||||
, float _epsilon = 0.001f
|
||||
);
|
||||
|
||||
/// Convert index buffer for use with different primitive topologies.
|
||||
///
|
||||
@ -744,7 +800,14 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_topology_convert`.
|
||||
///
|
||||
uint32_t topologyConvert(TopologyConvert::Enum _conversion, void* _dst, uint32_t _dstSize, const void* _indices, uint32_t _numIndices, bool _index32);
|
||||
uint32_t topologyConvert(
|
||||
TopologyConvert::Enum _conversion
|
||||
, void* _dst
|
||||
, uint32_t _dstSize
|
||||
, const void* _indices
|
||||
, uint32_t _numIndices
|
||||
, bool _index32
|
||||
);
|
||||
|
||||
/// Swizzle RGBA8 image to BGRA8.
|
||||
///
|
||||
@ -757,7 +820,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_image_swizzle_bgra8`.
|
||||
///
|
||||
void imageSwizzleBgra8(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst);
|
||||
void imageSwizzleBgra8(
|
||||
uint32_t _width
|
||||
, uint32_t _height
|
||||
, uint32_t _pitch
|
||||
, const void* _src
|
||||
, void* _dst
|
||||
);
|
||||
|
||||
/// Downsample RGBA8 image with 2x2 pixel average filter.
|
||||
///
|
||||
@ -770,7 +839,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_image_rgba8_downsample_2x2`.
|
||||
///
|
||||
void imageRgba8Downsample2x2(uint32_t _width, uint32_t _height, uint32_t _pitch, const void* _src, void* _dst);
|
||||
void imageRgba8Downsample2x2(
|
||||
uint32_t _width
|
||||
, uint32_t _height
|
||||
, uint32_t _pitch
|
||||
, const void* _src
|
||||
, void* _dst
|
||||
);
|
||||
|
||||
/// Returns supported backend API renderers.
|
||||
///
|
||||
@ -792,10 +867,11 @@ namespace bgfx
|
||||
///
|
||||
/// @param[in] _vendorId Vendor PCI id. If set to `BGFX_PCI_ID_NONE` it will select the first
|
||||
/// device.
|
||||
/// - `BGFX_PCI_ID_NONE` - auto-select.
|
||||
/// - `BGFX_PCI_ID_AMD` - AMD.
|
||||
/// - `BGFX_PCI_ID_INTEL` - Intel.
|
||||
/// - `BGFX_PCI_ID_NVIDIA` - nVidia.
|
||||
/// - `BGFX_PCI_ID_NONE` - Autoselect adapter.
|
||||
/// - `BGFX_PCI_ID_SOFTWARE_RASTERIZER` - Software rasterizer.
|
||||
/// - `BGFX_PCI_ID_AMD` - AMD adapter.
|
||||
/// - `BGFX_PCI_ID_INTEL` - Intel adapter.
|
||||
/// - `BGFX_PCI_ID_NVIDIA` - nVidia adapter.
|
||||
///
|
||||
/// @param[in] _deviceId Device id. If set to 0 it will select first device, or device with
|
||||
/// matching id.
|
||||
@ -807,11 +883,17 @@ namespace bgfx
|
||||
/// specified, library uses default CRT allocator. The library assumes
|
||||
/// custom allocator is thread safe.
|
||||
///
|
||||
/// @returns `true` if initialization is successful.
|
||||
/// @returns `true` if initialization was successful.
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_init`.
|
||||
///
|
||||
bool init(RendererType::Enum _type = RendererType::Count, uint16_t _vendorId = BGFX_PCI_ID_NONE, uint16_t _deviceId = 0, CallbackI* _callback = NULL, bx::AllocatorI* _reallocator = NULL);
|
||||
bool init(
|
||||
RendererType::Enum _type = RendererType::Count
|
||||
, uint16_t _vendorId = BGFX_PCI_ID_NONE
|
||||
, uint16_t _deviceId = 0
|
||||
, CallbackI* _callback = NULL
|
||||
, bx::AllocatorI* _reallocator = NULL
|
||||
);
|
||||
|
||||
/// Shutdown bgfx library.
|
||||
///
|
||||
@ -909,7 +991,12 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent are `bgfx_make_ref`, `bgfx_make_ref_release`.
|
||||
///
|
||||
const Memory* makeRef(const void* _data, uint32_t _size, ReleaseFn _releaseFn = NULL, void* _userData = NULL);
|
||||
const Memory* makeRef(
|
||||
const void* _data
|
||||
, uint32_t _size
|
||||
, ReleaseFn _releaseFn = NULL
|
||||
, void* _userData = NULL
|
||||
);
|
||||
|
||||
/// Set debug flags.
|
||||
///
|
||||
@ -949,7 +1036,14 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_dbg_text_image`.
|
||||
///
|
||||
void dbgTextImage(uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const void* _data, uint16_t _pitch);
|
||||
void dbgTextImage(
|
||||
uint16_t _x
|
||||
, uint16_t _y
|
||||
, uint16_t _width
|
||||
, uint16_t _height
|
||||
, const void* _data
|
||||
, uint16_t _pitch
|
||||
);
|
||||
|
||||
/// Create static index buffer.
|
||||
///
|
||||
@ -997,7 +1091,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_vertex_buffer`.
|
||||
///
|
||||
VertexBufferHandle createVertexBuffer(const Memory* _mem, const VertexDecl& _decl, uint16_t _flags = BGFX_BUFFER_NONE);
|
||||
VertexBufferHandle createVertexBuffer(
|
||||
const Memory* _mem
|
||||
, const VertexDecl& _decl
|
||||
, uint16_t _flags = BGFX_BUFFER_NONE
|
||||
);
|
||||
|
||||
/// Destroy static vertex buffer.
|
||||
///
|
||||
@ -1025,7 +1123,10 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_dynamic_index_buffer`.
|
||||
///
|
||||
DynamicIndexBufferHandle createDynamicIndexBuffer(uint32_t _num, uint16_t _flags = BGFX_BUFFER_NONE);
|
||||
DynamicIndexBufferHandle createDynamicIndexBuffer(
|
||||
uint32_t _num
|
||||
, uint16_t _flags = BGFX_BUFFER_NONE
|
||||
);
|
||||
|
||||
/// Create dynamic index buffer and initialized it.
|
||||
///
|
||||
@ -1045,7 +1146,10 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_dynamic_index_buffer_mem`.
|
||||
///
|
||||
DynamicIndexBufferHandle createDynamicIndexBuffer(const Memory* _mem, uint16_t _flags = BGFX_BUFFER_NONE);
|
||||
DynamicIndexBufferHandle createDynamicIndexBuffer(
|
||||
const Memory* _mem
|
||||
, uint16_t _flags = BGFX_BUFFER_NONE
|
||||
);
|
||||
|
||||
/// Update dynamic index buffer.
|
||||
///
|
||||
@ -1055,7 +1159,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_update_dynamic_index_buffer`.
|
||||
///
|
||||
void updateDynamicIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _startIndex, const Memory* _mem);
|
||||
void updateDynamicIndexBuffer(
|
||||
DynamicIndexBufferHandle _handle
|
||||
, uint32_t _startIndex
|
||||
, const Memory* _mem
|
||||
);
|
||||
|
||||
/// Destroy dynamic index buffer.
|
||||
///
|
||||
@ -1084,7 +1192,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_dynamic_vertex_buffer`.
|
||||
///
|
||||
DynamicVertexBufferHandle createDynamicVertexBuffer(uint32_t _num, const VertexDecl& _decl, uint16_t _flags = BGFX_BUFFER_NONE);
|
||||
DynamicVertexBufferHandle createDynamicVertexBuffer(
|
||||
uint32_t _num
|
||||
, const VertexDecl& _decl
|
||||
, uint16_t _flags = BGFX_BUFFER_NONE
|
||||
);
|
||||
|
||||
/// Create dynamic vertex buffer and initialize it.
|
||||
///
|
||||
@ -1105,7 +1217,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_dynamic_vertex_buffer_mem`.
|
||||
///
|
||||
DynamicVertexBufferHandle createDynamicVertexBuffer(const Memory* _mem, const VertexDecl& _decl, uint16_t _flags = BGFX_BUFFER_NONE);
|
||||
DynamicVertexBufferHandle createDynamicVertexBuffer(
|
||||
const Memory* _mem
|
||||
, const VertexDecl& _decl
|
||||
, uint16_t _flags = BGFX_BUFFER_NONE
|
||||
);
|
||||
|
||||
/// Update dynamic vertex buffer.
|
||||
///
|
||||
@ -1115,7 +1231,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_update_dynamic_vertex_buffer`.
|
||||
///
|
||||
void updateDynamicVertexBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, const Memory* _mem);
|
||||
void updateDynamicVertexBuffer(
|
||||
DynamicVertexBufferHandle _handle
|
||||
, uint32_t _startVertex
|
||||
, const Memory* _mem
|
||||
);
|
||||
|
||||
/// Destroy dynamic vertex buffer.
|
||||
///
|
||||
@ -1158,7 +1278,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_check_avail_transient_buffers`.
|
||||
///
|
||||
bool checkAvailTransientBuffers(uint32_t _numVertices, const VertexDecl& _decl, uint32_t _numIndices);
|
||||
bool checkAvailTransientBuffers(
|
||||
uint32_t _numVertices
|
||||
, const VertexDecl& _decl
|
||||
, uint32_t _numIndices
|
||||
);
|
||||
|
||||
/// Allocate transient index buffer.
|
||||
///
|
||||
@ -1190,7 +1314,10 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_alloc_transient_vertex_buffer`.
|
||||
///
|
||||
void allocTransientVertexBuffer(TransientVertexBuffer* _tvb, uint32_t _num, const VertexDecl& _decl);
|
||||
void allocTransientVertexBuffer(TransientVertexBuffer* _tvb
|
||||
, uint32_t _num
|
||||
, const VertexDecl& _decl
|
||||
);
|
||||
|
||||
/// Check for required space and allocate transient vertex and index
|
||||
/// buffers. If both space requirements are satisfied function returns
|
||||
@ -1201,7 +1328,12 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_alloc_transient_buffers`.
|
||||
///
|
||||
bool allocTransientBuffers(TransientVertexBuffer* _tvb, const VertexDecl& _decl, uint32_t _numVertices, TransientIndexBuffer* _tib, uint32_t _numIndices);
|
||||
bool allocTransientBuffers(TransientVertexBuffer* _tvb
|
||||
, const VertexDecl& _decl
|
||||
, uint32_t _numVertices
|
||||
, TransientIndexBuffer* _tib
|
||||
, uint32_t _numIndices
|
||||
);
|
||||
|
||||
/// Allocate instance data buffer.
|
||||
///
|
||||
@ -1243,7 +1375,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_get_shader_uniforms`.
|
||||
///
|
||||
uint16_t getShaderUniforms(ShaderHandle _handle, UniformHandle* _uniforms = NULL, uint16_t _max = 0);
|
||||
uint16_t getShaderUniforms(
|
||||
ShaderHandle _handle
|
||||
, UniformHandle* _uniforms = NULL
|
||||
, uint16_t _max = 0
|
||||
);
|
||||
|
||||
/// Destroy shader. Once program is created with shader it is safe to
|
||||
/// destroy shader.
|
||||
@ -1263,7 +1399,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_program`.
|
||||
///
|
||||
ProgramHandle createProgram(ShaderHandle _vsh, ShaderHandle _fsh, bool _destroyShaders = false);
|
||||
ProgramHandle createProgram(
|
||||
ShaderHandle _vsh
|
||||
, ShaderHandle _fsh
|
||||
, bool _destroyShaders = false
|
||||
);
|
||||
|
||||
/// Create program with compute shader.
|
||||
///
|
||||
@ -1274,7 +1414,10 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_compute_program`.
|
||||
///
|
||||
ProgramHandle createProgram(ShaderHandle _csh, bool _destroyShader = false);
|
||||
ProgramHandle createProgram(
|
||||
ShaderHandle _csh
|
||||
, bool _destroyShader = false
|
||||
);
|
||||
|
||||
/// Destroy program.
|
||||
///
|
||||
@ -1286,7 +1429,15 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_calc_texture_size`.
|
||||
///
|
||||
void calcTextureSize(TextureInfo& _info, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, uint8_t _numMips, TextureFormat::Enum _format);
|
||||
void calcTextureSize(
|
||||
TextureInfo& _info
|
||||
, uint16_t _width
|
||||
, uint16_t _height
|
||||
, uint16_t _depth
|
||||
, bool _cubeMap
|
||||
, uint8_t _numMips
|
||||
, TextureFormat::Enum _format
|
||||
);
|
||||
|
||||
/// Create texture from memory buffer.
|
||||
///
|
||||
@ -1304,7 +1455,12 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_texture`.
|
||||
///
|
||||
TextureHandle createTexture(const Memory* _mem, uint32_t _flags = BGFX_TEXTURE_NONE, uint8_t _skip = 0, TextureInfo* _info = NULL);
|
||||
TextureHandle createTexture(
|
||||
const Memory* _mem
|
||||
, uint32_t _flags = BGFX_TEXTURE_NONE
|
||||
, uint8_t _skip = 0
|
||||
, TextureInfo* _info = NULL
|
||||
);
|
||||
|
||||
/// Create 2D texture.
|
||||
///
|
||||
@ -1323,7 +1479,14 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_texture_2d`.
|
||||
///
|
||||
TextureHandle createTexture2D(uint16_t _width, uint16_t _height, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags = BGFX_TEXTURE_NONE, const Memory* _mem = NULL);
|
||||
TextureHandle createTexture2D(
|
||||
uint16_t _width
|
||||
, uint16_t _height
|
||||
, uint8_t _numMips
|
||||
, TextureFormat::Enum _format
|
||||
, uint32_t _flags = BGFX_TEXTURE_NONE
|
||||
, const Memory* _mem = NULL
|
||||
);
|
||||
|
||||
/// Create frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio
|
||||
/// if back buffer resolution changes.
|
||||
@ -1341,7 +1504,12 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_texture_2d_scaled`.
|
||||
///
|
||||
TextureHandle createTexture2D(BackbufferRatio::Enum _ratio, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags = BGFX_TEXTURE_NONE);
|
||||
TextureHandle createTexture2D(
|
||||
BackbufferRatio::Enum _ratio
|
||||
, uint8_t _numMips
|
||||
, TextureFormat::Enum _format
|
||||
, uint32_t _flags = BGFX_TEXTURE_NONE
|
||||
);
|
||||
|
||||
/// Create 3D texture.
|
||||
///
|
||||
@ -1361,7 +1529,15 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_texture_3d`.
|
||||
///
|
||||
TextureHandle createTexture3D(uint16_t _width, uint16_t _height, uint16_t _depth, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags = BGFX_TEXTURE_NONE, const Memory* _mem = NULL);
|
||||
TextureHandle createTexture3D(
|
||||
uint16_t _width
|
||||
, uint16_t _height
|
||||
, uint16_t _depth
|
||||
, uint8_t _numMips
|
||||
, TextureFormat::Enum _format
|
||||
, uint32_t _flags = BGFX_TEXTURE_NONE
|
||||
, const Memory* _mem = NULL
|
||||
);
|
||||
|
||||
/// Create Cube texture.
|
||||
///
|
||||
@ -1379,7 +1555,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_texture_cube`.
|
||||
///
|
||||
TextureHandle createTextureCube(uint16_t _size, uint8_t _numMips, TextureFormat::Enum _format, uint32_t _flags = BGFX_TEXTURE_NONE, const Memory* _mem = NULL);
|
||||
TextureHandle createTextureCube(
|
||||
uint16_t _size
|
||||
, uint8_t _numMips
|
||||
, TextureFormat::Enum _format
|
||||
, uint32_t _flags = BGFX_TEXTURE_NONE
|
||||
, const Memory* _mem = NULL
|
||||
);
|
||||
|
||||
/// Update 2D texture.
|
||||
///
|
||||
@ -1395,7 +1577,16 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_update_texture_2d`.
|
||||
///
|
||||
void updateTexture2D(TextureHandle _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const Memory* _mem, uint16_t _pitch = UINT16_MAX);
|
||||
void updateTexture2D(
|
||||
TextureHandle _handle
|
||||
, uint8_t _mip
|
||||
, uint16_t _x
|
||||
, uint16_t _y
|
||||
, uint16_t _width
|
||||
, uint16_t _height
|
||||
, const Memory* _mem
|
||||
, uint16_t _pitch = UINT16_MAX
|
||||
);
|
||||
|
||||
/// Update 3D texture.
|
||||
///
|
||||
@ -1411,7 +1602,17 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_update_texture_3d`.
|
||||
///
|
||||
void updateTexture3D(TextureHandle _handle, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _z, uint16_t _width, uint16_t _height, uint16_t _depth, const Memory* _mem);
|
||||
void updateTexture3D(
|
||||
TextureHandle _handle
|
||||
, uint8_t _mip
|
||||
, uint16_t _x
|
||||
, uint16_t _y
|
||||
, uint16_t _z
|
||||
, uint16_t _width
|
||||
, uint16_t _height
|
||||
, uint16_t _depth
|
||||
, const Memory* _mem
|
||||
);
|
||||
|
||||
/// Update Cube texture.
|
||||
///
|
||||
@ -1447,7 +1648,17 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_update_texture_cube`.
|
||||
///
|
||||
void updateTextureCube(TextureHandle _handle, uint8_t _side, uint8_t _mip, uint16_t _x, uint16_t _y, uint16_t _width, uint16_t _height, const Memory* _mem, uint16_t _pitch = UINT16_MAX);
|
||||
void updateTextureCube(
|
||||
TextureHandle _handle
|
||||
, uint8_t _side
|
||||
, uint8_t _mip
|
||||
, uint16_t _x
|
||||
, uint16_t _y
|
||||
, uint16_t _width
|
||||
, uint16_t _height
|
||||
, const Memory* _mem
|
||||
, uint16_t _pitch = UINT16_MAX
|
||||
);
|
||||
|
||||
/// Read back texture content.
|
||||
///
|
||||
@ -1494,7 +1705,12 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_frame_buffer`.
|
||||
///
|
||||
FrameBufferHandle createFrameBuffer(uint16_t _width, uint16_t _height, TextureFormat::Enum _format, uint32_t _textureFlags = BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP);
|
||||
FrameBufferHandle createFrameBuffer(
|
||||
uint16_t _width
|
||||
, uint16_t _height
|
||||
, TextureFormat::Enum _format
|
||||
, uint32_t _textureFlags = BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP
|
||||
);
|
||||
|
||||
/// Create frame buffer with size based on backbuffer ratio. Frame buffer will maintain ratio
|
||||
/// if back buffer resolution changes.
|
||||
@ -1511,7 +1727,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_frame_buffer_scaled`.
|
||||
///
|
||||
FrameBufferHandle createFrameBuffer(BackbufferRatio::Enum _ratio, TextureFormat::Enum _format, uint32_t _textureFlags = BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP);
|
||||
FrameBufferHandle createFrameBuffer(
|
||||
BackbufferRatio::Enum _ratio
|
||||
, TextureFormat::Enum _format
|
||||
, uint32_t _textureFlags = BGFX_TEXTURE_U_CLAMP|BGFX_TEXTURE_V_CLAMP
|
||||
);
|
||||
|
||||
/// Create frame buffer.
|
||||
///
|
||||
@ -1522,7 +1742,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_frame_buffer_from_handles`.
|
||||
///
|
||||
FrameBufferHandle createFrameBuffer(uint8_t _num, const TextureHandle* _handles, bool _destroyTextures = false);
|
||||
FrameBufferHandle createFrameBuffer(
|
||||
uint8_t _num
|
||||
, const TextureHandle* _handles
|
||||
, bool _destroyTextures = false
|
||||
);
|
||||
|
||||
/// Create frame buffer.
|
||||
///
|
||||
@ -1533,7 +1757,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_frame_buffer_from_handles`.
|
||||
///
|
||||
FrameBufferHandle createFrameBuffer(uint8_t _num, const Attachment* _attachment, bool _destroyTextures = false);
|
||||
FrameBufferHandle createFrameBuffer(
|
||||
uint8_t _num
|
||||
, const Attachment* _attachment
|
||||
, bool _destroyTextures = false
|
||||
);
|
||||
|
||||
/// Create frame buffer for multiple window rendering.
|
||||
///
|
||||
@ -1549,7 +1777,12 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_create_frame_buffer_from_nwh`.
|
||||
///
|
||||
FrameBufferHandle createFrameBuffer(void* _nwh, uint16_t _width, uint16_t _height, TextureFormat::Enum _depthFormat = TextureFormat::UnknownDepth);
|
||||
FrameBufferHandle createFrameBuffer(
|
||||
void* _nwh
|
||||
, uint16_t _width
|
||||
, uint16_t _height
|
||||
, TextureFormat::Enum _depthFormat = TextureFormat::UnknownDepth
|
||||
);
|
||||
|
||||
/// Destroy frame buffer.
|
||||
///
|
||||
@ -1694,7 +1927,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_view_scissor`.
|
||||
///
|
||||
void setViewScissor(uint8_t _id, uint16_t _x = 0, uint16_t _y = 0, uint16_t _width = 0, uint16_t _height = 0);
|
||||
void setViewScissor(
|
||||
uint8_t _id
|
||||
, uint16_t _x = 0
|
||||
, uint16_t _y = 0
|
||||
, uint16_t _width = 0
|
||||
, uint16_t _height = 0
|
||||
);
|
||||
|
||||
/// Set view clear flags.
|
||||
///
|
||||
@ -1707,7 +1946,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_view_clear`.
|
||||
///
|
||||
void setViewClear(uint8_t _id, uint16_t _flags, uint32_t _rgba = 0x000000ff, float _depth = 1.0f, uint8_t _stencil = 0);
|
||||
void setViewClear(
|
||||
uint8_t _id
|
||||
, uint16_t _flags
|
||||
, uint32_t _rgba = 0x000000ff
|
||||
, float _depth = 1.0f
|
||||
, uint8_t _stencil = 0
|
||||
);
|
||||
|
||||
/// Set view clear flags with different clear color for each
|
||||
/// frame buffer texture. Must use setClearColor to setup clear color
|
||||
@ -1729,7 +1974,20 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_view_clear_mrt`.
|
||||
///
|
||||
void setViewClear(uint8_t _id, uint16_t _flags, float _depth, uint8_t _stencil, uint8_t _0 = UINT8_MAX, uint8_t _1 = UINT8_MAX, uint8_t _2 = UINT8_MAX, uint8_t _3 = UINT8_MAX, uint8_t _4 = UINT8_MAX, uint8_t _5 = UINT8_MAX, uint8_t _6 = UINT8_MAX, uint8_t _7 = UINT8_MAX);
|
||||
void setViewClear(
|
||||
uint8_t _id
|
||||
, uint16_t _flags
|
||||
, float _depth
|
||||
, uint8_t _stencil
|
||||
, uint8_t _0 = UINT8_MAX
|
||||
, uint8_t _1 = UINT8_MAX
|
||||
, uint8_t _2 = UINT8_MAX
|
||||
, uint8_t _3 = UINT8_MAX
|
||||
, uint8_t _4 = UINT8_MAX
|
||||
, uint8_t _5 = UINT8_MAX
|
||||
, uint8_t _6 = UINT8_MAX
|
||||
, uint8_t _7 = UINT8_MAX
|
||||
);
|
||||
|
||||
/// Set view into sequential mode. Draw calls will be sorted in the same
|
||||
/// order in which submit calls were called.
|
||||
@ -1767,7 +2025,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent are `bgfx_set_view_transform`, `bgfx_set_view_transform_stereo`.
|
||||
///
|
||||
void setViewTransform(uint8_t _id, const void* _view, const void* _projL, uint8_t _flags = BGFX_VIEW_STEREO, const void* _projR = NULL);
|
||||
void setViewTransform(
|
||||
uint8_t _id
|
||||
, const void* _view
|
||||
, const void* _projL
|
||||
, uint8_t _flags = BGFX_VIEW_STEREO
|
||||
, const void* _projR = NULL
|
||||
);
|
||||
|
||||
/// Post submit view reordering.
|
||||
///
|
||||
@ -1938,7 +2202,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_dynamic_index_buffer`.
|
||||
///
|
||||
void setIndexBuffer(DynamicIndexBufferHandle _handle, uint32_t _firstIndex, uint32_t _numIndices);
|
||||
void setIndexBuffer(
|
||||
DynamicIndexBufferHandle _handle
|
||||
, uint32_t _firstIndex
|
||||
, uint32_t _numIndices
|
||||
);
|
||||
|
||||
/// Set index buffer for draw primitive.
|
||||
///
|
||||
@ -1956,7 +2224,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_transient_index_buffer`.
|
||||
///
|
||||
void setIndexBuffer(const TransientIndexBuffer* _tib, uint32_t _firstIndex, uint32_t _numIndices);
|
||||
void setIndexBuffer(
|
||||
const TransientIndexBuffer* _tib
|
||||
, uint32_t _firstIndex
|
||||
, uint32_t _numIndices
|
||||
);
|
||||
|
||||
/// Set vertex buffer for draw primitive.
|
||||
///
|
||||
@ -1992,7 +2264,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_dynamic_vertex_buffer`.
|
||||
///
|
||||
void setVertexBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _numVertices);
|
||||
void setVertexBuffer(
|
||||
DynamicVertexBufferHandle _handle
|
||||
, uint32_t _startVertex
|
||||
, uint32_t _numVertices
|
||||
);
|
||||
|
||||
/// Set vertex buffer for draw primitive.
|
||||
///
|
||||
@ -2010,7 +2286,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_transient_vertex_buffer`.
|
||||
///
|
||||
void setVertexBuffer(const TransientVertexBuffer* _tvb, uint32_t _startVertex, uint32_t _numVertices);
|
||||
void setVertexBuffer(
|
||||
const TransientVertexBuffer* _tvb
|
||||
, uint32_t _startVertex
|
||||
, uint32_t _numVertices
|
||||
);
|
||||
|
||||
/// Set instance data buffer for draw primitive.
|
||||
///
|
||||
@ -2028,7 +2308,11 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_instance_data_from_dynamic_vertex_buffer`.
|
||||
///
|
||||
void setInstanceDataBuffer(DynamicVertexBufferHandle _handle, uint32_t _startVertex, uint32_t _num);
|
||||
void setInstanceDataBuffer(
|
||||
DynamicVertexBufferHandle _handle
|
||||
, uint32_t _startVertex
|
||||
, uint32_t _num
|
||||
);
|
||||
|
||||
/// Set texture stage for draw primitive.
|
||||
///
|
||||
@ -2047,7 +2331,12 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_texture`.
|
||||
///
|
||||
void setTexture(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint32_t _flags = UINT32_MAX);
|
||||
void setTexture(
|
||||
uint8_t _stage
|
||||
, UniformHandle _sampler
|
||||
, TextureHandle _handle
|
||||
, uint32_t _flags = UINT32_MAX
|
||||
);
|
||||
|
||||
/// Set texture stage for draw primitive.
|
||||
///
|
||||
@ -2064,7 +2353,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_texture_from_frame_buffer`.
|
||||
///
|
||||
void setTexture(uint8_t _stage, UniformHandle _sampler, FrameBufferHandle _handle, uint8_t _attachment = 0, uint32_t _flags = UINT32_MAX);
|
||||
void setTexture(
|
||||
uint8_t _stage
|
||||
, UniformHandle _sampler
|
||||
, FrameBufferHandle _handle
|
||||
, uint8_t _attachment = 0
|
||||
, uint32_t _flags = UINT32_MAX
|
||||
);
|
||||
|
||||
/// Touch view.
|
||||
uint32_t touch(uint8_t _id);
|
||||
@ -2080,7 +2375,12 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_submit`.
|
||||
///
|
||||
uint32_t submit(uint8_t _id, ProgramHandle _program, int32_t _depth = 0, bool _preserveState = false);
|
||||
uint32_t submit(
|
||||
uint8_t _id
|
||||
, ProgramHandle _program
|
||||
, int32_t _depth = 0
|
||||
, bool _preserveState = false
|
||||
);
|
||||
|
||||
/// Submit primitive with occlusion query for rendering.
|
||||
///
|
||||
@ -2094,7 +2394,13 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_submit_occlusion_query.
|
||||
///
|
||||
uint32_t submit(uint8_t _id, ProgramHandle _program, OcclusionQueryHandle _occlusionQuery, int32_t _depth = 0, bool _preserveState = false);
|
||||
uint32_t submit(
|
||||
uint8_t _id
|
||||
, ProgramHandle _program
|
||||
, OcclusionQueryHandle _occlusionQuery
|
||||
, int32_t _depth = 0
|
||||
, bool _preserveState = false
|
||||
);
|
||||
|
||||
/// Submit primitive for rendering with index and instance data info from
|
||||
/// indirect buffer.
|
||||
@ -2111,7 +2417,15 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_submit_indirect`.
|
||||
///
|
||||
uint32_t submit(uint8_t _id, ProgramHandle _program, IndirectBufferHandle _indirectHandle, uint16_t _start = 0, uint16_t _num = 1, int32_t _depth = 0, bool _preserveState = false);
|
||||
uint32_t submit(
|
||||
uint8_t _id
|
||||
, ProgramHandle _program
|
||||
, IndirectBufferHandle _indirectHandle
|
||||
, uint16_t _start = 0
|
||||
, uint16_t _num = 1
|
||||
, int32_t _depth = 0
|
||||
, bool _preserveState = false
|
||||
);
|
||||
|
||||
/// Set compute index buffer.
|
||||
///
|
||||
@ -2174,7 +2488,14 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_image`.
|
||||
///
|
||||
void setImage(uint8_t _stage, UniformHandle _sampler, TextureHandle _handle, uint8_t _mip, Access::Enum _access, TextureFormat::Enum _format = TextureFormat::Count);
|
||||
void setImage(
|
||||
uint8_t _stage
|
||||
, UniformHandle _sampler
|
||||
, TextureHandle _handle
|
||||
, uint8_t _mip
|
||||
, Access::Enum _access
|
||||
, TextureFormat::Enum _format = TextureFormat::Count
|
||||
);
|
||||
|
||||
/// Set compute image from frame buffer texture.
|
||||
///
|
||||
@ -2187,7 +2508,14 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_set_image_from_frame_buffer`.
|
||||
///
|
||||
void setImage(uint8_t _stage, UniformHandle _sampler, FrameBufferHandle _handle, uint8_t _attachment, Access::Enum _access, TextureFormat::Enum _format = TextureFormat::Count);
|
||||
void setImage(
|
||||
uint8_t _stage
|
||||
, UniformHandle _sampler
|
||||
, FrameBufferHandle _handle
|
||||
, uint8_t _attachment
|
||||
, Access::Enum _access
|
||||
, TextureFormat::Enum _format = TextureFormat::Count
|
||||
);
|
||||
|
||||
/// Dispatch compute.
|
||||
///
|
||||
@ -2203,7 +2531,14 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_dispatch`.
|
||||
///
|
||||
uint32_t dispatch(uint8_t _id, ProgramHandle _handle, uint16_t _numX = 1, uint16_t _numY = 1, uint16_t _numZ = 1, uint8_t _flags = BGFX_SUBMIT_EYE_FIRST);
|
||||
uint32_t dispatch(
|
||||
uint8_t _id
|
||||
, ProgramHandle _handle
|
||||
, uint16_t _numX = 1
|
||||
, uint16_t _numY = 1
|
||||
, uint16_t _numZ = 1
|
||||
, uint8_t _flags = BGFX_SUBMIT_EYE_FIRST
|
||||
);
|
||||
|
||||
/// Dispatch compute indirect.
|
||||
///
|
||||
@ -2219,7 +2554,14 @@ namespace bgfx
|
||||
///
|
||||
/// @attention C99 equivalent is `bgfx_dispatch_indirect`.
|
||||
///
|
||||
uint32_t dispatch(uint8_t _id, ProgramHandle _handle, IndirectBufferHandle _indirectHandle, uint16_t _start = 0, uint16_t _num = 1, uint8_t _flags = BGFX_SUBMIT_EYE_FIRST);
|
||||
uint32_t dispatch(
|
||||
uint8_t _id
|
||||
, ProgramHandle _handle
|
||||
, IndirectBufferHandle _indirectHandle
|
||||
, uint16_t _start = 0
|
||||
, uint16_t _num = 1
|
||||
, uint8_t _flags = BGFX_SUBMIT_EYE_FIRST
|
||||
);
|
||||
|
||||
/// Discard all previously set state for draw or compute call.
|
||||
///
|
||||
@ -2243,7 +2585,17 @@ namespace bgfx
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
|
||||
/// @attention C99 equivalent is `bgfx_blit`.
|
||||
///
|
||||
void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, TextureHandle _src, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX);
|
||||
void blit(
|
||||
uint8_t _id
|
||||
, TextureHandle _dst
|
||||
, uint16_t _dstX
|
||||
, uint16_t _dstY
|
||||
, TextureHandle _src
|
||||
, uint16_t _srcX = 0
|
||||
, uint16_t _srcY = 0
|
||||
, uint16_t _width = UINT16_MAX
|
||||
, uint16_t _height = UINT16_MAX
|
||||
);
|
||||
|
||||
/// Blit texture 2D region between 2D frame buffer and 2D texture.
|
||||
///
|
||||
@ -2262,7 +2614,18 @@ namespace bgfx
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
|
||||
/// @attention C99 equivalent is `bgfx_blit`.
|
||||
///
|
||||
void blit(uint8_t _id, TextureHandle _dst, uint16_t _dstX, uint16_t _dstY, FrameBufferHandle _src, uint8_t _attachment = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX);
|
||||
void blit(
|
||||
uint8_t _id
|
||||
, TextureHandle _dst
|
||||
, uint16_t _dstX
|
||||
, uint16_t _dstY
|
||||
, FrameBufferHandle _src
|
||||
, uint8_t _attachment = 0
|
||||
, uint16_t _srcX = 0
|
||||
, uint16_t _srcY = 0
|
||||
, uint16_t _width = UINT16_MAX
|
||||
, uint16_t _height = UINT16_MAX
|
||||
);
|
||||
|
||||
/// Blit texture region between two textures.
|
||||
///
|
||||
@ -2290,7 +2653,22 @@ namespace bgfx
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
|
||||
/// @attention C99 equivalent is `bgfx_blit`.
|
||||
///
|
||||
void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, TextureHandle _src, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX);
|
||||
void blit(
|
||||
uint8_t _id
|
||||
, TextureHandle _dst
|
||||
, uint8_t _dstMip
|
||||
, uint16_t _dstX
|
||||
, uint16_t _dstY
|
||||
, uint16_t _dstZ
|
||||
, TextureHandle _src
|
||||
, uint8_t _srcMip = 0
|
||||
, uint16_t _srcX = 0
|
||||
, uint16_t _srcY = 0
|
||||
, uint16_t _srcZ = 0
|
||||
, uint16_t _width = UINT16_MAX
|
||||
, uint16_t _height = UINT16_MAX
|
||||
, uint16_t _depth = UINT16_MAX
|
||||
);
|
||||
|
||||
/// Blit texture region between frame buffer and texture.
|
||||
///
|
||||
@ -2319,7 +2697,23 @@ namespace bgfx
|
||||
/// @attention Availability depends on: `BGFX_CAPS_TEXTURE_BLIT`.
|
||||
/// @attention C99 equivalent is `bgfx_blit`.
|
||||
///
|
||||
void blit(uint8_t _id, TextureHandle _dst, uint8_t _dstMip, uint16_t _dstX, uint16_t _dstY, uint16_t _dstZ, FrameBufferHandle _src, uint8_t _attachment = 0, uint8_t _srcMip = 0, uint16_t _srcX = 0, uint16_t _srcY = 0, uint16_t _srcZ = 0, uint16_t _width = UINT16_MAX, uint16_t _height = UINT16_MAX, uint16_t _depth = UINT16_MAX);
|
||||
void blit(
|
||||
uint8_t _id
|
||||
, TextureHandle _dst
|
||||
, uint8_t _dstMip
|
||||
, uint16_t _dstX
|
||||
, uint16_t _dstY
|
||||
, uint16_t _dstZ
|
||||
, FrameBufferHandle _src
|
||||
, uint8_t _attachment = 0
|
||||
, uint8_t _srcMip = 0
|
||||
, uint16_t _srcX = 0
|
||||
, uint16_t _srcY = 0
|
||||
, uint16_t _srcZ = 0
|
||||
, uint16_t _width = UINT16_MAX
|
||||
, uint16_t _height = UINT16_MAX
|
||||
, uint16_t _depth = UINT16_MAX
|
||||
);
|
||||
|
||||
/// Request screen shot.
|
||||
///
|
||||
|
118
3rdparty/bgfx/include/bgfx/bgfxdefines.h
vendored
118
3rdparty/bgfx/include/bgfx/bgfxdefines.h
vendored
@ -6,80 +6,83 @@
|
||||
#ifndef BGFX_DEFINES_H_HEADER_GUARD
|
||||
#define BGFX_DEFINES_H_HEADER_GUARD
|
||||
|
||||
#define BGFX_API_VERSION UINT32_C(11)
|
||||
#define BGFX_API_VERSION UINT32_C(13)
|
||||
|
||||
///
|
||||
#define BGFX_STATE_RGB_WRITE UINT64_C(0x0000000000000001) //!< Enable RGB write.
|
||||
#define BGFX_STATE_ALPHA_WRITE UINT64_C(0x0000000000000002) //!< Enable alpha write.
|
||||
#define BGFX_STATE_DEPTH_WRITE UINT64_C(0x0000000000000004) //!< Enable depth write.
|
||||
#define BGFX_STATE_RGB_WRITE UINT64_C(0x0000000000000001) //!< Enable RGB write.
|
||||
#define BGFX_STATE_ALPHA_WRITE UINT64_C(0x0000000000000002) //!< Enable alpha write.
|
||||
#define BGFX_STATE_DEPTH_WRITE UINT64_C(0x0000000000000004) //!< Enable depth write.
|
||||
|
||||
#define BGFX_STATE_DEPTH_TEST_LESS UINT64_C(0x0000000000000010) //!< Enable depth test, less.
|
||||
#define BGFX_STATE_DEPTH_TEST_LEQUAL UINT64_C(0x0000000000000020) //!< Enable depth test, less equal.
|
||||
#define BGFX_STATE_DEPTH_TEST_EQUAL UINT64_C(0x0000000000000030) //!< Enable depth test, equal.
|
||||
#define BGFX_STATE_DEPTH_TEST_GEQUAL UINT64_C(0x0000000000000040) //!< Enable depth test, greater equal.
|
||||
#define BGFX_STATE_DEPTH_TEST_GREATER UINT64_C(0x0000000000000050) //!< Enable depth test, greater.
|
||||
#define BGFX_STATE_DEPTH_TEST_NOTEQUAL UINT64_C(0x0000000000000060) //!< Enable depth test, not equal.
|
||||
#define BGFX_STATE_DEPTH_TEST_NEVER UINT64_C(0x0000000000000070) //!< Enable depth test, never.
|
||||
#define BGFX_STATE_DEPTH_TEST_ALWAYS UINT64_C(0x0000000000000080) //!< Enable depth test, always.
|
||||
#define BGFX_STATE_DEPTH_TEST_SHIFT 4 //!< Depth test state bit shift.
|
||||
#define BGFX_STATE_DEPTH_TEST_MASK UINT64_C(0x00000000000000f0) //!< Depth test state bit mask.
|
||||
#define BGFX_STATE_DEPTH_TEST_LESS UINT64_C(0x0000000000000010) //!< Enable depth test, less.
|
||||
#define BGFX_STATE_DEPTH_TEST_LEQUAL UINT64_C(0x0000000000000020) //!< Enable depth test, less equal.
|
||||
#define BGFX_STATE_DEPTH_TEST_EQUAL UINT64_C(0x0000000000000030) //!< Enable depth test, equal.
|
||||
#define BGFX_STATE_DEPTH_TEST_GEQUAL UINT64_C(0x0000000000000040) //!< Enable depth test, greater equal.
|
||||
#define BGFX_STATE_DEPTH_TEST_GREATER UINT64_C(0x0000000000000050) //!< Enable depth test, greater.
|
||||
#define BGFX_STATE_DEPTH_TEST_NOTEQUAL UINT64_C(0x0000000000000060) //!< Enable depth test, not equal.
|
||||
#define BGFX_STATE_DEPTH_TEST_NEVER UINT64_C(0x0000000000000070) //!< Enable depth test, never.
|
||||
#define BGFX_STATE_DEPTH_TEST_ALWAYS UINT64_C(0x0000000000000080) //!< Enable depth test, always.
|
||||
#define BGFX_STATE_DEPTH_TEST_SHIFT 4 //!< Depth test state bit shift.
|
||||
#define BGFX_STATE_DEPTH_TEST_MASK UINT64_C(0x00000000000000f0) //!< Depth test state bit mask.
|
||||
|
||||
#define BGFX_STATE_BLEND_ZERO UINT64_C(0x0000000000001000) //!<
|
||||
#define BGFX_STATE_BLEND_ONE UINT64_C(0x0000000000002000) //!<
|
||||
#define BGFX_STATE_BLEND_SRC_COLOR UINT64_C(0x0000000000003000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_SRC_COLOR UINT64_C(0x0000000000004000) //!<
|
||||
#define BGFX_STATE_BLEND_SRC_ALPHA UINT64_C(0x0000000000005000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_SRC_ALPHA UINT64_C(0x0000000000006000) //!<
|
||||
#define BGFX_STATE_BLEND_DST_ALPHA UINT64_C(0x0000000000007000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_DST_ALPHA UINT64_C(0x0000000000008000) //!<
|
||||
#define BGFX_STATE_BLEND_DST_COLOR UINT64_C(0x0000000000009000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_DST_COLOR UINT64_C(0x000000000000a000) //!<
|
||||
#define BGFX_STATE_BLEND_SRC_ALPHA_SAT UINT64_C(0x000000000000b000) //!<
|
||||
#define BGFX_STATE_BLEND_FACTOR UINT64_C(0x000000000000c000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_FACTOR UINT64_C(0x000000000000d000) //!<
|
||||
#define BGFX_STATE_BLEND_SHIFT 12 //!< Blend state bit shift.
|
||||
#define BGFX_STATE_BLEND_MASK UINT64_C(0x000000000ffff000) //!< Blend state bit mask.
|
||||
#define BGFX_STATE_BLEND_ZERO UINT64_C(0x0000000000001000) //!<
|
||||
#define BGFX_STATE_BLEND_ONE UINT64_C(0x0000000000002000) //!<
|
||||
#define BGFX_STATE_BLEND_SRC_COLOR UINT64_C(0x0000000000003000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_SRC_COLOR UINT64_C(0x0000000000004000) //!<
|
||||
#define BGFX_STATE_BLEND_SRC_ALPHA UINT64_C(0x0000000000005000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_SRC_ALPHA UINT64_C(0x0000000000006000) //!<
|
||||
#define BGFX_STATE_BLEND_DST_ALPHA UINT64_C(0x0000000000007000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_DST_ALPHA UINT64_C(0x0000000000008000) //!<
|
||||
#define BGFX_STATE_BLEND_DST_COLOR UINT64_C(0x0000000000009000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_DST_COLOR UINT64_C(0x000000000000a000) //!<
|
||||
#define BGFX_STATE_BLEND_SRC_ALPHA_SAT UINT64_C(0x000000000000b000) //!<
|
||||
#define BGFX_STATE_BLEND_FACTOR UINT64_C(0x000000000000c000) //!<
|
||||
#define BGFX_STATE_BLEND_INV_FACTOR UINT64_C(0x000000000000d000) //!<
|
||||
#define BGFX_STATE_BLEND_SHIFT 12 //!< Blend state bit shift.
|
||||
#define BGFX_STATE_BLEND_MASK UINT64_C(0x000000000ffff000) //!< Blend state bit mask.
|
||||
|
||||
#define BGFX_STATE_BLEND_EQUATION_ADD UINT64_C(0x0000000000000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_SUB UINT64_C(0x0000000010000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_REVSUB UINT64_C(0x0000000020000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_MIN UINT64_C(0x0000000030000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_MAX UINT64_C(0x0000000040000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_SHIFT 28 //!< Blend equation bit shift.
|
||||
#define BGFX_STATE_BLEND_EQUATION_MASK UINT64_C(0x00000003f0000000) //!< Blend equation bit mask.
|
||||
#define BGFX_STATE_BLEND_EQUATION_ADD UINT64_C(0x0000000000000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_SUB UINT64_C(0x0000000010000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_REVSUB UINT64_C(0x0000000020000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_MIN UINT64_C(0x0000000030000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_MAX UINT64_C(0x0000000040000000) //!<
|
||||
#define BGFX_STATE_BLEND_EQUATION_SHIFT 28 //!< Blend equation bit shift.
|
||||
#define BGFX_STATE_BLEND_EQUATION_MASK UINT64_C(0x00000003f0000000) //!< Blend equation bit mask.
|
||||
|
||||
#define BGFX_STATE_BLEND_INDEPENDENT UINT64_C(0x0000000400000000) //!< Enable blend independent.
|
||||
#define BGFX_STATE_BLEND_INDEPENDENT UINT64_C(0x0000000400000000) //!< Enable blend independent.
|
||||
#define BGFX_STATE_BLEND_ALPHA_TO_COVERAGE UINT64_C(0x0000000800000000) //!< Enable alpha to coverage.
|
||||
|
||||
#define BGFX_STATE_CULL_CW UINT64_C(0x0000001000000000) //!< Cull clockwise triangles.
|
||||
#define BGFX_STATE_CULL_CCW UINT64_C(0x0000002000000000) //!< Cull counter-clockwise triangles.
|
||||
#define BGFX_STATE_CULL_SHIFT 36 //!< Culling mode bit shift.
|
||||
#define BGFX_STATE_CULL_MASK UINT64_C(0x0000003000000000) //!< Culling mode bit mask.
|
||||
#define BGFX_STATE_CULL_CW UINT64_C(0x0000001000000000) //!< Cull clockwise triangles.
|
||||
#define BGFX_STATE_CULL_CCW UINT64_C(0x0000002000000000) //!< Cull counter-clockwise triangles.
|
||||
#define BGFX_STATE_CULL_SHIFT 36 //!< Culling mode bit shift.
|
||||
#define BGFX_STATE_CULL_MASK UINT64_C(0x0000003000000000) //!< Culling mode bit mask.
|
||||
|
||||
/// See BGFX_STATE_ALPHA_REF(_ref) helper macro.
|
||||
#define BGFX_STATE_ALPHA_REF_SHIFT 40 //!< Alpha reference bit shift.
|
||||
#define BGFX_STATE_ALPHA_REF_MASK UINT64_C(0x0000ff0000000000) //!< Alpha reference bit mask.
|
||||
#define BGFX_STATE_ALPHA_REF_SHIFT 40 //!< Alpha reference bit shift.
|
||||
#define BGFX_STATE_ALPHA_REF_MASK UINT64_C(0x0000ff0000000000) //!< Alpha reference bit mask.
|
||||
|
||||
#define BGFX_STATE_PT_TRISTRIP UINT64_C(0x0001000000000000) //!< Tristrip.
|
||||
#define BGFX_STATE_PT_LINES UINT64_C(0x0002000000000000) //!< Lines.
|
||||
#define BGFX_STATE_PT_LINESTRIP UINT64_C(0x0003000000000000) //!< Line strip.
|
||||
#define BGFX_STATE_PT_POINTS UINT64_C(0x0004000000000000) //!< Points.
|
||||
#define BGFX_STATE_PT_SHIFT 48 //!< Primitive type bit shift.
|
||||
#define BGFX_STATE_PT_MASK UINT64_C(0x0007000000000000) //!< Primitive type bit mask.
|
||||
#define BGFX_STATE_PT_TRISTRIP UINT64_C(0x0001000000000000) //!< Tristrip.
|
||||
#define BGFX_STATE_PT_LINES UINT64_C(0x0002000000000000) //!< Lines.
|
||||
#define BGFX_STATE_PT_LINESTRIP UINT64_C(0x0003000000000000) //!< Line strip.
|
||||
#define BGFX_STATE_PT_POINTS UINT64_C(0x0004000000000000) //!< Points.
|
||||
#define BGFX_STATE_PT_SHIFT 48 //!< Primitive type bit shift.
|
||||
#define BGFX_STATE_PT_MASK UINT64_C(0x0007000000000000) //!< Primitive type bit mask.
|
||||
|
||||
#define BGFX_STATE_POINT_SIZE_SHIFT 52 //!< Point size bit shift.
|
||||
#define BGFX_STATE_POINT_SIZE_MASK UINT64_C(0x0ff0000000000000) //!< Point size bit mask.
|
||||
#define BGFX_STATE_POINT_SIZE_SHIFT 52 //!< Point size bit shift.
|
||||
#define BGFX_STATE_POINT_SIZE_MASK UINT64_C(0x00f0000000000000) //!< Point size bit mask.
|
||||
|
||||
/// Enable MSAA write when writing into MSAA frame buffer. This flag is ignored when not writing into
|
||||
/// MSAA frame buffer.
|
||||
#define BGFX_STATE_MSAA UINT64_C(0x1000000000000000) //!< Enable MSAA rasterization.
|
||||
#define BGFX_STATE_MSAA UINT64_C(0x0100000000000000) //!< Enable MSAA rasterization.
|
||||
#define BGFX_STATE_LINEAA UINT64_C(0x0200000000000000) //!< Enable line AA rasterization.
|
||||
#define BGFX_STATE_CONSERVATIVE_RASTER UINT64_C(0x0400000000000000) //!< Enable conservative rasterization.
|
||||
|
||||
/// Do not use!
|
||||
#define BGFX_STATE_RESERVED_SHIFT 61 //!< Internal bits shift.
|
||||
#define BGFX_STATE_RESERVED_MASK UINT64_C(0xe000000000000000) //!< Internal bits mask.
|
||||
#define BGFX_STATE_RESERVED_SHIFT 61 //!< Internal bits shift.
|
||||
#define BGFX_STATE_RESERVED_MASK UINT64_C(0xe000000000000000) //!< Internal bits mask.
|
||||
|
||||
/// See BGFX_STATE_POINT_SIZE(_size) helper macro.
|
||||
#define BGFX_STATE_NONE UINT64_C(0x0000000000000000) //!< No state.
|
||||
#define BGFX_STATE_MASK UINT64_C(0xffffffffffffffff) //!< State mask.
|
||||
#define BGFX_STATE_NONE UINT64_C(0x0000000000000000) //!< No state.
|
||||
#define BGFX_STATE_MASK UINT64_C(0xffffffffffffffff) //!< State mask.
|
||||
|
||||
/// Default state is write to RGB, alpha, and depth with depth test less enabled, with clockwise
|
||||
/// culling and MSAA (when writing into MSAA frame buffer, otherwise this flag is ignored).
|
||||
@ -355,6 +358,7 @@
|
||||
#define BGFX_RESET_SRGB_BACKBUFFER UINT32_C(0x00008000) //!< Enable sRGB backbuffer.
|
||||
#define BGFX_RESET_HIDPI UINT32_C(0x00010000) //!< Enable HiDPI rendering.
|
||||
#define BGFX_RESET_DEPTH_CLAMP UINT32_C(0x00020000) //!< Enable depth clamp.
|
||||
#define BGFX_RESET_SUSPEND UINT32_C(0x00040000) //!< Suspend rendering.
|
||||
|
||||
#define BGFX_RESET_RESERVED_SHIFT 31 //!< Internal bits shift.
|
||||
#define BGFX_RESET_RESERVED_MASK UINT32_C(0x80000000) //!< Internal bits mask.
|
||||
@ -379,6 +383,8 @@
|
||||
#define BGFX_CAPS_TEXTURE_BLIT UINT64_C(0x0000000000010000) //!< Texture blit is supported.
|
||||
#define BGFX_CAPS_TEXTURE_READ_BACK UINT64_C(0x0000000000020000) //!< Read-back texture is supported.
|
||||
#define BGFX_CAPS_OCCLUSION_QUERY UINT64_C(0x0000000000040000) //!< Occlusion query is supported.
|
||||
#define BGFX_CAPS_ALPHA_TO_COVERAGE UINT64_C(0x0000000000080000) //!< Alpha to coverage is supported.
|
||||
#define BGFX_CAPS_CONSERVATIVE_RASTER UINT64_C(0x0000000000100000) //!< Conservative rasterization is supported.
|
||||
|
||||
///
|
||||
#define BGFX_CAPS_FORMAT_TEXTURE_NONE UINT16_C(0x0000) //!< Texture format is not supported.
|
||||
|
@ -13,7 +13,7 @@
|
||||
// necessary to use this header in conjunction with creating windows.
|
||||
|
||||
#include <bx/platform.h>
|
||||
#include <bgfx/c99/bgfxplatform.h>
|
||||
#include <bgfx/c99/bgfx.h>
|
||||
|
||||
typedef enum bgfx_render_frame
|
||||
{
|
||||
|
1
3rdparty/bgfx/scripts/genie.lua
vendored
1
3rdparty/bgfx/scripts/genie.lua
vendored
@ -248,6 +248,7 @@ function exampleProject(_name)
|
||||
configuration { "durango" }
|
||||
links {
|
||||
"d3d11_x",
|
||||
"d3d12_x",
|
||||
"combase",
|
||||
"kernelx",
|
||||
}
|
||||
|
2
3rdparty/bgfx/scripts/shader-embeded.mk
vendored
2
3rdparty/bgfx/scripts/shader-embeded.mk
vendored
@ -46,7 +46,7 @@ fs_%.bin.h : fs_%.sc
|
||||
|
||||
cs_%.bin.h : cs_%.sc
|
||||
@echo [$(<)]
|
||||
$(SILENT) $(SHADERC) $(CS_FLAGS) --platform linux -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_glsl
|
||||
$(SILENT) $(SHADERC) $(CS_FLAGS) --platform linux -p 430 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_glsl
|
||||
@cat $(SHADER_TMP) > $(@)
|
||||
-$(SILENT) $(SHADERC) $(CS_FLAGS) --platform windows -p cs_5_0 -O 1 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_dx11
|
||||
-@cat $(SHADER_TMP) >> $(@)
|
||||
|
184
3rdparty/bgfx/src/bgfx.cpp
vendored
184
3rdparty/bgfx/src/bgfx.cpp
vendored
@ -348,7 +348,6 @@ namespace bgfx
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_flags = _flags;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
@ -1085,6 +1084,8 @@ namespace bgfx
|
||||
CAPS_FLAGS(BGFX_CAPS_TEXTURE_BLIT),
|
||||
CAPS_FLAGS(BGFX_CAPS_TEXTURE_READ_BACK),
|
||||
CAPS_FLAGS(BGFX_CAPS_OCCLUSION_QUERY),
|
||||
CAPS_FLAGS(BGFX_CAPS_ALPHA_TO_COVERAGE),
|
||||
CAPS_FLAGS(BGFX_CAPS_CONSERVATIVE_RASTER),
|
||||
#undef CAPS_FLAGS
|
||||
};
|
||||
|
||||
@ -1350,6 +1351,12 @@ namespace bgfx
|
||||
m_dynVertexBufferAllocator.compact();
|
||||
m_dynIndexBufferAllocator.compact();
|
||||
|
||||
BX_CHECK(m_vertexDeclHandle.getNumHandles() == uint16_t(m_declRef.m_vertexDeclMap.size() )
|
||||
, "VertexDeclRef mismatch, num handles %d, handles in hash map %d."
|
||||
, m_vertexDeclHandle.getNumHandles()
|
||||
, m_declRef.m_vertexDeclMap.size()
|
||||
);
|
||||
|
||||
m_declRef.shutdown(m_vertexDeclHandle);
|
||||
|
||||
#if BGFX_CONFIG_MULTITHREADED
|
||||
@ -1755,122 +1762,83 @@ namespace bgfx
|
||||
#endif // BX_PLATFORM_WINDOWS
|
||||
}
|
||||
|
||||
static int32_t compareDescending(const void* _lhs, const void* _rhs)
|
||||
{
|
||||
return *(const int32_t*)_rhs - *(const int32_t*)_lhs;
|
||||
}
|
||||
|
||||
RendererContextI* rendererCreate(RendererType::Enum _type)
|
||||
{
|
||||
RendererType::Enum last = RendererType::Count;
|
||||
int32_t scores[RendererType::Count];
|
||||
uint32_t numScores = 0;
|
||||
|
||||
if (RendererType::Count == _type)
|
||||
for (uint32_t ii = 0; ii < RendererType::Count; ++ii)
|
||||
{
|
||||
again:
|
||||
if (BX_ENABLED(BX_PLATFORM_WINDOWS) )
|
||||
RendererType::Enum renderer = RendererType::Enum(ii);
|
||||
if (s_rendererCreator[ii].supported)
|
||||
{
|
||||
RendererType::Enum first = RendererType::Direct3D9;
|
||||
RendererType::Enum second = RendererType::Direct3D11;
|
||||
|
||||
if (windowsVersionIs(Condition::GreaterEqual, 0x0602) )
|
||||
int32_t score = 0;
|
||||
if (_type == renderer)
|
||||
{
|
||||
first = RendererType::Direct3D11;
|
||||
second = RendererType::Direct3D12;
|
||||
if (!s_rendererCreator[second].supported)
|
||||
score += 1000;
|
||||
}
|
||||
|
||||
score += RendererType::Null != renderer ? 1 : 0;
|
||||
|
||||
if (BX_ENABLED(BX_PLATFORM_WINDOWS) )
|
||||
{
|
||||
if (windowsVersionIs(Condition::GreaterEqual, 0x0602) )
|
||||
{
|
||||
second = RendererType::Direct3D9;
|
||||
score += RendererType::Direct3D11 == renderer ? 20 : 0;
|
||||
score += RendererType::Direct3D12 == renderer ? 10 : 0;
|
||||
}
|
||||
else if (windowsVersionIs(Condition::GreaterEqual, 0x0601) )
|
||||
{
|
||||
score += RendererType::Direct3D11 == renderer ? 20 : 0;
|
||||
score += RendererType::Direct3D9 == renderer ? 10 : 0;
|
||||
score += RendererType::Direct3D12 == renderer ? -100 : 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
score += RendererType::Direct3D12 == renderer ? -100 : 0;
|
||||
}
|
||||
}
|
||||
else if (windowsVersionIs(Condition::GreaterEqual, 0x0601) )
|
||||
else if (BX_ENABLED(0
|
||||
|| BX_PLATFORM_ANDROID
|
||||
|| BX_PLATFORM_EMSCRIPTEN
|
||||
|| BX_PLATFORM_IOS
|
||||
|| BX_PLATFORM_NACL
|
||||
|| BX_PLATFORM_RPI
|
||||
) )
|
||||
{
|
||||
first = RendererType::Direct3D11;
|
||||
second = RendererType::Direct3D9;
|
||||
score += RendererType::OpenGLES == renderer ? 20 : 0;
|
||||
}
|
||||
else if (BX_ENABLED(0
|
||||
|| BX_PLATFORM_XBOXONE
|
||||
|| BX_PLATFORM_WINRT
|
||||
) )
|
||||
{
|
||||
score += RendererType::Direct3D11 == renderer ? 20 : 0;
|
||||
}
|
||||
|
||||
if (s_rendererCreator[first].supported)
|
||||
{
|
||||
_type = first;
|
||||
}
|
||||
else if (s_rendererCreator[second].supported)
|
||||
{
|
||||
_type = second;
|
||||
}
|
||||
else if (s_rendererCreator[RendererType::OpenGL].supported)
|
||||
{
|
||||
_type = RendererType::OpenGL;
|
||||
}
|
||||
else if (s_rendererCreator[RendererType::OpenGLES].supported)
|
||||
{
|
||||
_type = RendererType::OpenGLES;
|
||||
}
|
||||
else if (s_rendererCreator[RendererType::Direct3D12].supported)
|
||||
{
|
||||
_type = RendererType::Direct3D12;
|
||||
}
|
||||
else if (s_rendererCreator[RendererType::Vulkan].supported)
|
||||
{
|
||||
_type = RendererType::Vulkan;
|
||||
}
|
||||
else
|
||||
{
|
||||
_type = RendererType::Null;
|
||||
}
|
||||
}
|
||||
else if (BX_ENABLED(BX_PLATFORM_IOS) )
|
||||
{
|
||||
if (s_rendererCreator[RendererType::Metal].supported)
|
||||
{
|
||||
_type = RendererType::Metal;
|
||||
}
|
||||
else if (s_rendererCreator[RendererType::OpenGLES].supported)
|
||||
{
|
||||
_type = RendererType::OpenGLES;
|
||||
}
|
||||
}
|
||||
else if (BX_ENABLED(0
|
||||
|| BX_PLATFORM_ANDROID
|
||||
|| BX_PLATFORM_EMSCRIPTEN
|
||||
|| BX_PLATFORM_NACL
|
||||
|| BX_PLATFORM_RPI
|
||||
) )
|
||||
{
|
||||
_type = RendererType::OpenGLES;
|
||||
}
|
||||
else if (BX_ENABLED(BX_PLATFORM_XBOXONE || BX_PLATFORM_WINRT) )
|
||||
{
|
||||
_type = RendererType::Direct3D11;
|
||||
}
|
||||
else
|
||||
{
|
||||
#if 0
|
||||
if (s_rendererCreator[RendererType::Metal].supported)
|
||||
{
|
||||
_type = RendererType::Metal;
|
||||
}
|
||||
else
|
||||
#endif // 0
|
||||
if (s_rendererCreator[RendererType::OpenGL].supported)
|
||||
{
|
||||
_type = RendererType::OpenGL;
|
||||
}
|
||||
else if (s_rendererCreator[RendererType::OpenGLES].supported)
|
||||
{
|
||||
_type = RendererType::OpenGLES;
|
||||
}
|
||||
}
|
||||
|
||||
if (!s_rendererCreator[_type].supported)
|
||||
{
|
||||
_type = RendererType::Null;
|
||||
scores[numScores++] = (score<<8) | uint8_t(renderer);
|
||||
}
|
||||
}
|
||||
|
||||
RendererContextI* renderCtx = s_rendererCreator[_type].createFn();
|
||||
if (last != _type)
|
||||
qsort(scores, numScores, sizeof(int32_t), compareDescending);
|
||||
|
||||
RendererContextI* renderCtx = NULL;
|
||||
for (uint32_t ii = 0; ii < numScores; ++ii)
|
||||
{
|
||||
if (NULL == renderCtx)
|
||||
RendererType::Enum renderer = RendererType::Enum(scores[ii] & 0xff);
|
||||
renderCtx = s_rendererCreator[renderer].createFn();
|
||||
if (NULL != renderCtx)
|
||||
{
|
||||
s_rendererCreator[_type].supported = false;
|
||||
last = _type;
|
||||
goto again;
|
||||
s_rendererDestroyFn = s_rendererCreator[renderer].destroyFn;
|
||||
break;
|
||||
}
|
||||
|
||||
s_rendererDestroyFn = s_rendererCreator[_type].destroyFn;
|
||||
s_rendererCreator[renderer].supported = false;
|
||||
}
|
||||
|
||||
return renderCtx;
|
||||
@ -2413,7 +2381,22 @@ again:
|
||||
|
||||
bool init(RendererType::Enum _type, uint16_t _vendorId, uint16_t _deviceId, CallbackI* _callback, bx::AllocatorI* _allocator)
|
||||
{
|
||||
BX_CHECK(NULL == s_ctx, "bgfx is already initialized.");
|
||||
if (NULL != s_ctx)
|
||||
{
|
||||
BX_CHECK(false, "bgfx is already initialized.");
|
||||
return false;
|
||||
}
|
||||
|
||||
if (!BX_ENABLED(BX_PLATFORM_EMSCRIPTEN || BX_PLATFORM_NACL)
|
||||
&& NULL == g_platformData.ndt
|
||||
&& NULL == g_platformData.nwh
|
||||
&& NULL == g_platformData.context
|
||||
&& NULL == g_platformData.backBuffer
|
||||
&& NULL == g_platformData.backBufferDS)
|
||||
{
|
||||
BX_CHECK(false, "bgfx platform data like window handle or backbuffer must be set.");
|
||||
return false;
|
||||
}
|
||||
|
||||
memset(&g_caps, 0, sizeof(g_caps) );
|
||||
g_caps.maxViews = BGFX_CONFIG_MAX_VIEWS;
|
||||
@ -2952,7 +2935,6 @@ again:
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_flags = _flags;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
@ -3009,7 +2991,6 @@ again:
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_flags = _flags;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
@ -3053,7 +3034,6 @@ again:
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_flags = _flags;
|
||||
tc.m_width = _size;
|
||||
tc.m_height = _size;
|
||||
tc.m_sides = 6;
|
||||
|
30
3rdparty/bgfx/src/bgfx_compute.sh
vendored
30
3rdparty/bgfx/src/bgfx_compute.sh
vendored
@ -12,36 +12,6 @@
|
||||
|
||||
#if BGFX_SHADER_LANGUAGE_HLSL
|
||||
|
||||
float uintBitsToFloat(uint _x) { return asfloat(_x); }
|
||||
vec2 uintBitsToFloat(uint2 _x) { return asfloat(_x); }
|
||||
vec3 uintBitsToFloat(uint3 _x) { return asfloat(_x); }
|
||||
vec4 uintBitsToFloat(uint4 _x) { return asfloat(_x); }
|
||||
|
||||
uint floatBitsToUint(float _x) { return asuint(_x); }
|
||||
uvec2 floatBitsToUint(vec2 _x) { return asuint(_x); }
|
||||
uvec3 floatBitsToUint(vec3 _x) { return asuint(_x); }
|
||||
uvec4 floatBitsToUint(vec4 _x) { return asuint(_x); }
|
||||
|
||||
int floatBitsToInt(float _x) { return asint(_x); }
|
||||
ivec2 floatBitsToInt(vec2 _x) { return asint(_x); }
|
||||
ivec3 floatBitsToInt(vec3 _x) { return asint(_x); }
|
||||
ivec4 floatBitsToInt(vec4 _x) { return asint(_x); }
|
||||
|
||||
uint bitfieldReverse(uint _x) { return reversebits(_x); }
|
||||
uint2 bitfieldReverse(uint2 _x) { return reversebits(_x); }
|
||||
uint3 bitfieldReverse(uint3 _x) { return reversebits(_x); }
|
||||
uint4 bitfieldReverse(uint4 _x) { return reversebits(_x); }
|
||||
|
||||
uint packHalf2x16(vec2 _x)
|
||||
{
|
||||
return (f32tof16(_x.x)<<16) | f32tof16(_x.y);
|
||||
}
|
||||
|
||||
vec2 unpackHalf2x16(uint _x)
|
||||
{
|
||||
return vec2(f16tof32(_x >> 16), f16tof32(_x) );
|
||||
}
|
||||
|
||||
#define SHARED groupshared
|
||||
|
||||
#define r32ui uint
|
||||
|
23
3rdparty/bgfx/src/bgfx_p.h
vendored
23
3rdparty/bgfx/src/bgfx_p.h
vendored
@ -88,6 +88,9 @@ namespace bgfx
|
||||
|
||||
void dbgPrintfVargs(const char* _format, va_list _argList);
|
||||
void dbgPrintf(const char* _format, ...);
|
||||
|
||||
inline bool operator==(const VertexDeclHandle& _lhs, const VertexDeclHandle& _rhs) { return _lhs.idx == _rhs.idx; }
|
||||
inline bool operator==(const UniformHandle& _lhs, const UniformHandle& _rhs) { return _lhs.idx == _rhs.idx; }
|
||||
}
|
||||
|
||||
#define _BX_TRACE(_format, ...) \
|
||||
@ -134,9 +137,11 @@ namespace bgfx
|
||||
#include <bx/allocator.h>
|
||||
#include <bx/string.h>
|
||||
#include <bx/os.h>
|
||||
#include <bx/maputil.h>
|
||||
|
||||
#include <bgfx/bgfxplatform.h>
|
||||
#include "image.h"
|
||||
#include "shader.h"
|
||||
|
||||
#define BGFX_CHUNK_MAGIC_CSH BX_MAKEFOURCC('C', 'S', 'H', 0x2)
|
||||
#define BGFX_CHUNK_MAGIC_FSH BX_MAKEFOURCC('F', 'S', 'H', 0x4)
|
||||
@ -312,7 +317,6 @@ namespace bgfx
|
||||
struct TextureCreate
|
||||
{
|
||||
TextureFormat::Enum m_format;
|
||||
uint32_t m_flags;
|
||||
uint16_t m_width;
|
||||
uint16_t m_height;
|
||||
uint16_t m_sides;
|
||||
@ -1890,6 +1894,8 @@ namespace bgfx
|
||||
}
|
||||
}
|
||||
|
||||
bx::mapRemove(m_vertexDeclMap, declHandle);
|
||||
|
||||
return declHandle;
|
||||
}
|
||||
|
||||
@ -2265,6 +2271,7 @@ namespace bgfx
|
||||
{
|
||||
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::DestroyVertexDecl);
|
||||
cmdbuf.write(declHandle);
|
||||
m_render->free(declHandle);
|
||||
}
|
||||
|
||||
m_vertexBufferHandle.free(_handle.idx);
|
||||
@ -2553,10 +2560,11 @@ namespace bgfx
|
||||
DynamicVertexBuffer& dvb = m_dynamicVertexBuffers[_handle.idx];
|
||||
|
||||
VertexDeclHandle declHandle = m_declRef.release(dvb.m_handle);
|
||||
if (invalidHandle != declHandle.idx)
|
||||
if (isValid(declHandle) )
|
||||
{
|
||||
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::DestroyVertexDecl);
|
||||
cmdbuf.write(declHandle);
|
||||
m_render->free(declHandle);
|
||||
}
|
||||
|
||||
if (0 != (dvb.m_flags & BGFX_BUFFER_COMPUTE_WRITE) )
|
||||
@ -3037,7 +3045,7 @@ namespace bgfx
|
||||
hash |= pr.m_fsh.idx << 16;
|
||||
}
|
||||
|
||||
m_programHashMap.erase(m_programHashMap.find(hash) );
|
||||
bx::mapRemove(m_programHashMap, hash);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3376,14 +3384,7 @@ namespace bgfx
|
||||
|
||||
if (0 == refs)
|
||||
{
|
||||
for (UniformHashMap::iterator it = m_uniformHashMap.begin(), itEnd = m_uniformHashMap.end(); it != itEnd; ++it)
|
||||
{
|
||||
if (it->second.idx == _handle.idx)
|
||||
{
|
||||
m_uniformHashMap.erase(it);
|
||||
break;
|
||||
}
|
||||
}
|
||||
bx::mapRemove(m_uniformHashMap, _handle);
|
||||
|
||||
CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::DestroyUniform);
|
||||
cmdbuf.write(_handle);
|
||||
|
35
3rdparty/bgfx/src/bgfx_shader.sh
vendored
35
3rdparty/bgfx/src/bgfx_shader.sh
vendored
@ -46,6 +46,41 @@
|
||||
# define dFdyFine(_y) ddy_fine(-_y)
|
||||
# endif // BGFX_SHADER_LANGUAGE_HLSL > 4
|
||||
|
||||
float intBitsToFloat(int _x) { return asfloat(_x); }
|
||||
vec2 intBitsToFloat(uint2 _x) { return asfloat(_x); }
|
||||
vec3 intBitsToFloat(uint3 _x) { return asfloat(_x); }
|
||||
vec4 intBitsToFloat(uint4 _x) { return asfloat(_x); }
|
||||
|
||||
float uintBitsToFloat(uint _x) { return asfloat(_x); }
|
||||
vec2 uintBitsToFloat(uint2 _x) { return asfloat(_x); }
|
||||
vec3 uintBitsToFloat(uint3 _x) { return asfloat(_x); }
|
||||
vec4 uintBitsToFloat(uint4 _x) { return asfloat(_x); }
|
||||
|
||||
uint floatBitsToUint(float _x) { return asuint(_x); }
|
||||
uvec2 floatBitsToUint(vec2 _x) { return asuint(_x); }
|
||||
uvec3 floatBitsToUint(vec3 _x) { return asuint(_x); }
|
||||
uvec4 floatBitsToUint(vec4 _x) { return asuint(_x); }
|
||||
|
||||
int floatBitsToInt(float _x) { return asint(_x); }
|
||||
ivec2 floatBitsToInt(vec2 _x) { return asint(_x); }
|
||||
ivec3 floatBitsToInt(vec3 _x) { return asint(_x); }
|
||||
ivec4 floatBitsToInt(vec4 _x) { return asint(_x); }
|
||||
|
||||
uint bitfieldReverse(uint _x) { return reversebits(_x); }
|
||||
uint2 bitfieldReverse(uint2 _x) { return reversebits(_x); }
|
||||
uint3 bitfieldReverse(uint3 _x) { return reversebits(_x); }
|
||||
uint4 bitfieldReverse(uint4 _x) { return reversebits(_x); }
|
||||
|
||||
uint packHalf2x16(vec2 _x)
|
||||
{
|
||||
return (f32tof16(_x.x)<<16) | f32tof16(_x.y);
|
||||
}
|
||||
|
||||
vec2 unpackHalf2x16(uint _x)
|
||||
{
|
||||
return vec2(f16tof32(_x >> 16), f16tof32(_x) );
|
||||
}
|
||||
|
||||
struct BgfxSampler2D
|
||||
{
|
||||
SamplerState m_sampler;
|
||||
|
2
3rdparty/bgfx/src/config.h
vendored
2
3rdparty/bgfx/src/config.h
vendored
@ -45,7 +45,7 @@
|
||||
|
||||
# ifndef BGFX_CONFIG_RENDERER_METAL
|
||||
# define BGFX_CONFIG_RENDERER_METAL (0 \
|
||||
|| BX_PLATFORM_IOS \
|
||||
|| (BX_PLATFORM_IOS && BX_CPU_ARM) \
|
||||
|| (BX_PLATFORM_OSX >= 101100) \
|
||||
? 1 : 0)
|
||||
# endif // BGFX_CONFIG_RENDERER_METAL
|
||||
|
82
3rdparty/bgfx/src/fs_clear0.bin.h
vendored
82
3rdparty/bgfx/src/fs_clear0.bin.h
vendored
@ -25,54 +25,58 @@ static const uint8_t fs_clear0_dx9[204] =
|
||||
0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, // 9.952.3111......
|
||||
0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ............
|
||||
};
|
||||
static const uint8_t fs_clear0_dx11[259] =
|
||||
static const uint8_t fs_clear0_dx11[339] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
|
||||
0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color.....
|
||||
0x00, 0xdc, 0x00, 0x44, 0x58, 0x42, 0x43, 0x97, 0x89, 0xd6, 0x18, 0xd7, 0x24, 0x4d, 0xea, 0xd1, // ...DXBC.....$M..
|
||||
0xcc, 0xac, 0xc3, 0xb2, 0xf1, 0x52, 0x06, 0x01, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x03, // .....R..........
|
||||
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x49, // ...,...`.......I
|
||||
0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
|
||||
0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
|
||||
0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, // ON.OSGN,........
|
||||
0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ... ............
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA
|
||||
0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x40, 0x00, 0x00, 0x00, 0x40, // RGET...SHDR@...@
|
||||
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // .......Y...F. ..
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ...
|
||||
0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
|
||||
0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, // . .........>....
|
||||
0x00, 0x2c, 0x01, 0x44, 0x58, 0x42, 0x43, 0x01, 0xdc, 0xf8, 0x1e, 0x7d, 0x89, 0xaa, 0x45, 0x4f, // .,.DXBC....}..EO
|
||||
0x0c, 0x79, 0x61, 0x5e, 0xe4, 0x72, 0x8d, 0x01, 0x00, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, 0x04, // .ya^.r.....,....
|
||||
0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0xf8, // ...0...|........
|
||||
0x00, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x44, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, // ...Aon9D...D....
|
||||
0x02, 0xff, 0xff, 0x14, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, // .......0.....$..
|
||||
0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .0...0...$...0..
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0x01, // ................
|
||||
0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, // ...............S
|
||||
0x48, 0x44, 0x52, 0x40, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x59, // HDR@...@.......Y
|
||||
0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...F. .........e
|
||||
0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // .... ......6....
|
||||
0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......F. ......
|
||||
0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ...>...ISGN,....
|
||||
0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ....... ........
|
||||
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S
|
||||
0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x2c, // V_POSITION.OSGN,
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, // ........... ....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................
|
||||
0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x00, // ...SV_TARGET....
|
||||
0x00, 0x80, 0x00, // ...
|
||||
};
|
||||
static const uint8_t fs_clear0_mtl[432] =
|
||||
static const uint8_t fs_clear0_mtl[426] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa1, 0x01, 0x00, 0x00, 0x75, 0x73, // FSH...........us
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x9b, 0x01, 0x00, 0x00, 0x75, 0x73, // FSH...........us
|
||||
0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me
|
||||
0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput {
|
||||
0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput {
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, // Color;.};.struct
|
||||
0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, // xlatMtlShaderUn
|
||||
0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, // iform {. float4
|
||||
0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // bgfx_clear_colo
|
||||
0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, // r[8];.};.fragmen
|
||||
0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // t xlatMtlShaderO
|
||||
0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, // utput xlatMtlMai
|
||||
0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // n (xlatMtlShader
|
||||
0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, // Input _mtl_i [[s
|
||||
0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, // tage_in]], const
|
||||
0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // ant xlatMtlShade
|
||||
0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // rUniform& _mtl_u
|
||||
0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, // [[buffer(0)]]).
|
||||
0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // {. xlatMtlShade
|
||||
0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // rOutput _mtl_o;.
|
||||
0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // _mtl_o.gl_Frag
|
||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, // Color = half4(_m
|
||||
0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // tl_u.bgfx_clear_
|
||||
0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, // color[0]);. ret
|
||||
0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // urn _mtl_o;.}...
|
||||
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra
|
||||
0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, // gColor;.};.struc
|
||||
0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, // t xlatMtlShaderU
|
||||
0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // niform {. float
|
||||
0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col
|
||||
0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, // or[8];.};.fragme
|
||||
0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // nt xlatMtlShader
|
||||
0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, // Output xlatMtlMa
|
||||
0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // in (xlatMtlShade
|
||||
0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, // rInput _mtl_i [[
|
||||
0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, // stage_in]], cons
|
||||
0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // tant xlatMtlShad
|
||||
0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // erUniform& _mtl_
|
||||
0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, // u [[buffer(0)]])
|
||||
0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // .{. xlatMtlShad
|
||||
0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // erOutput _mtl_o;
|
||||
0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . _mtl_o.gl_Fra
|
||||
0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // gColor = _mtl_u.
|
||||
0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color
|
||||
0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, // [0];. return _m
|
||||
0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tl_o;.}...
|
||||
};
|
||||
|
||||
|
102
3rdparty/bgfx/src/fs_clear1.bin.h
vendored
102
3rdparty/bgfx/src/fs_clear1.bin.h
vendored
@ -29,63 +29,69 @@ static const uint8_t fs_clear1_dx9[216] =
|
||||
0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, // ................
|
||||
0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ........
|
||||
};
|
||||
static const uint8_t fs_clear1_dx11[319] =
|
||||
static const uint8_t fs_clear1_dx11[411] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
|
||||
0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color.....
|
||||
0x00, 0x18, 0x01, 0x44, 0x58, 0x42, 0x43, 0xe1, 0xf9, 0x8b, 0x7f, 0x06, 0xb6, 0xc7, 0x96, 0x4e, // ...DXBC........N
|
||||
0x0b, 0xee, 0xe9, 0x51, 0x29, 0xfb, 0x5a, 0x01, 0x00, 0x00, 0x00, 0x18, 0x01, 0x00, 0x00, 0x03, // ...Q).Z.........
|
||||
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xac, 0x00, 0x00, 0x00, 0x49, // ...,...`.......I
|
||||
0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
|
||||
0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
|
||||
0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, // ON.OSGND........
|
||||
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...8............
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x01, // ...........8....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
|
||||
0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S
|
||||
0x48, 0x44, 0x52, 0x64, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x59, // HDRd...@.......Y
|
||||
0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, // ...F. .........e
|
||||
0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
|
||||
0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, // ......6.... ...
|
||||
0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
|
||||
0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // .......>.......
|
||||
0x00, 0x74, 0x01, 0x44, 0x58, 0x42, 0x43, 0x82, 0xff, 0x8b, 0x5f, 0x53, 0xa0, 0x1f, 0x3b, 0x53, // .t.DXBC..._S..;S
|
||||
0xc6, 0x2a, 0x12, 0xcf, 0xc8, 0x7f, 0xb8, 0x01, 0x00, 0x00, 0x00, 0x74, 0x01, 0x00, 0x00, 0x04, // .*.........t....
|
||||
0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x28, // ...0...........(
|
||||
0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x50, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...Aon9P...P....
|
||||
0x02, 0xff, 0xff, 0x20, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, // ... ...0.....$..
|
||||
0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .0...0...$...0..
|
||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0x01, // ................
|
||||
0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................
|
||||
0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x64, // ...........SHDRd
|
||||
0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, // ...@.......Y...F
|
||||
0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // . .........e....
|
||||
0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, // ......e.... ...
|
||||
0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
|
||||
0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6....
|
||||
0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ......F. ......
|
||||
0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ...>...ISGN,....
|
||||
0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ....... ........
|
||||
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S
|
||||
0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x44, // V_POSITION.OSGND
|
||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, // ...........8....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................
|
||||
0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...8............
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA
|
||||
0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x00, 0x00, 0x80, 0x00, // RGET.......
|
||||
};
|
||||
static const uint8_t fs_clear1_mtl[543] =
|
||||
static const uint8_t fs_clear1_mtl[531] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...........us
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...........us
|
||||
0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me
|
||||
0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput {
|
||||
0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput {
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, // Data_0 [[color(0
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, // )]];. half4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_1 [[col
|
||||
0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // or(1)]];.};.stru
|
||||
0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader
|
||||
0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // Uniform {. floa
|
||||
0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // t4 bgfx_clear_co
|
||||
0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, // lor[8];.};.fragm
|
||||
0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // ent xlatMtlShade
|
||||
0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // rOutput xlatMtlM
|
||||
0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ain (xlatMtlShad
|
||||
0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, // erInput _mtl_i [
|
||||
0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, // [stage_in]], con
|
||||
0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // stant xlatMtlSha
|
||||
0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // derUniform& _mtl
|
||||
0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, // _u [[buffer(0)]]
|
||||
0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // ).{. xlatMtlSha
|
||||
0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // derOutput _mtl_o
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // agData_0 = half4
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // (_mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // ar_color[0]);.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_1 = half4(_mt
|
||||
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra
|
||||
0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color(
|
||||
0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, // olor(1)]];.};.st
|
||||
0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ruct xlatMtlShad
|
||||
0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // erUniform {. fl
|
||||
0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // oat4 bgfx_clear_
|
||||
0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, // color[8];.};.fra
|
||||
0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // gment xlatMtlSha
|
||||
0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // derOutput xlatMt
|
||||
0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // lMain (xlatMtlSh
|
||||
0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, // aderInput _mtl_i
|
||||
0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, // [[stage_in]], c
|
||||
0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // onstant xlatMtlS
|
||||
0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, // haderUniform& _m
|
||||
0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, // tl_u [[buffer(0)
|
||||
0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // ]]).{. xlatMtlS
|
||||
0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // haderOutput _mtl
|
||||
0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, // _o;. _mtl_o.gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, // FragData_0 = _mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // olor[1]);. retu
|
||||
0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // rn _mtl_o;.}...
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // olor[0];. _mtl_
|
||||
0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, // o.gl_FragData_1
|
||||
0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // = _mtl_u.bgfx_cl
|
||||
0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[1];.
|
||||
0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, // return _mtl_o;.}
|
||||
0x0a, 0x0a, 0x00, // ...
|
||||
};
|
||||
|
106
3rdparty/bgfx/src/fs_clear2.bin.h
vendored
106
3rdparty/bgfx/src/fs_clear2.bin.h
vendored
@ -33,23 +33,20 @@ static const uint8_t fs_clear2_dx9[228] =
|
||||
0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0xff, // ................
|
||||
0xff, 0x00, 0x00, 0x00, // ....
|
||||
};
|
||||
static const uint8_t fs_clear2_dx11[379] =
|
||||
static const uint8_t fs_clear2_dx11[483] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
|
||||
0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color.....
|
||||
0x00, 0x54, 0x01, 0x44, 0x58, 0x42, 0x43, 0x28, 0xea, 0x41, 0xd6, 0x8b, 0x20, 0x1f, 0x3c, 0x2c, // .T.DXBC(.A.. .<,
|
||||
0x9b, 0xee, 0x43, 0x6d, 0x8a, 0xc1, 0xeb, 0x01, 0x00, 0x00, 0x00, 0x54, 0x01, 0x00, 0x00, 0x03, // ..Cm.......T....
|
||||
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xc4, 0x00, 0x00, 0x00, 0x49, // ...,...`.......I
|
||||
0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
|
||||
0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
|
||||
0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, // ON.OSGN.........
|
||||
0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...P............
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, // ...........P....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
|
||||
0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...P............
|
||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA
|
||||
0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x88, 0x00, 0x00, 0x00, 0x40, // RGET...SHDR....@
|
||||
0x00, 0xbc, 0x01, 0x44, 0x58, 0x42, 0x43, 0x0e, 0x9f, 0x66, 0xdd, 0x1f, 0x67, 0xd6, 0xd1, 0x64, // ...DXBC..f..g..d
|
||||
0xb9, 0x94, 0x61, 0x3d, 0x93, 0x51, 0x1a, 0x01, 0x00, 0x00, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x04, // ..a=.Q..........
|
||||
0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x24, 0x01, 0x00, 0x00, 0x58, // ...0.......$...X
|
||||
0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x5c, 0x00, 0x00, 0x00, 0x5c, 0x00, 0x00, 0x00, 0x00, // ...Aon9.........
|
||||
0x02, 0xff, 0xff, 0x2c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, // ...,...0.....$..
|
||||
0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .0...0...$...0..
|
||||
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0x01, // ................
|
||||
0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................
|
||||
0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, // ................
|
||||
0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x88, 0x00, 0x00, 0x00, 0x40, // .......SHDR....@
|
||||
0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // ..."...Y...F. ..
|
||||
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ...
|
||||
0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e
|
||||
@ -58,48 +55,57 @@ static const uint8_t fs_clear2_dx11[379] =
|
||||
0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
|
||||
0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6....
|
||||
0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // ......F. ......
|
||||
0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // ...>.......
|
||||
0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ...>...ISGN,....
|
||||
0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ....... ........
|
||||
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S
|
||||
0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x5c, // V_POSITION.OSGN.
|
||||
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, // ...........P....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................
|
||||
0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...P............
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x02, // ...........P....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, // ................
|
||||
0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x00, // ...SV_TARGET....
|
||||
0x00, 0x80, 0x00, // ...
|
||||
};
|
||||
static const uint8_t fs_clear2_mtl[639] =
|
||||
static const uint8_t fs_clear2_mtl[621] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH.......p...us
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5e, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH.......^...us
|
||||
0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me
|
||||
0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput {
|
||||
0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput {
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, // Data_0 [[color(0
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, // )]];. half4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_1 [[col
|
||||
0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // or(1)]];. half4
|
||||
0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, // gl_FragData_2 [
|
||||
0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, // [color(2)]];.};.
|
||||
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // struct xlatMtlSh
|
||||
0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, // aderUniform {.
|
||||
0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // float4 bgfx_clea
|
||||
0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, // r_color[8];.};.f
|
||||
0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // ragment xlatMtlS
|
||||
0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // haderOutput xlat
|
||||
0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // MtlMain (xlatMtl
|
||||
0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ShaderInput _mtl
|
||||
0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, // _i [[stage_in]],
|
||||
0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // constant xlatMt
|
||||
0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, // lShaderUniform&
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, // _mtl_u [[buffer(
|
||||
0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // 0)]]).{. xlatMt
|
||||
0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, // lShaderOutput _m
|
||||
0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // tl_o;. _mtl_o.g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x68, // l_FragData_0 = h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // alf4(_mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x29, // _clear_color[0])
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // agData_1 = half4
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // (_mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // ar_color[1]);.
|
||||
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra
|
||||
0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color(
|
||||
0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo
|
||||
0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_
|
||||
0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];.
|
||||
0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // };.struct xlatMt
|
||||
0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, // lShaderUniform {
|
||||
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, // . float4 bgfx_c
|
||||
0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, // lear_color[8];.}
|
||||
0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // ;.fragment xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, // tlShaderOutput x
|
||||
0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, // latMtlMain (xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, // MtlShaderInput _
|
||||
0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, // mtl_i [[stage_in
|
||||
0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, // ]], constant xla
|
||||
0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, // tMtlShaderUnifor
|
||||
0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, // m& _mtl_u [[buff
|
||||
0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, // er(0)]]).{. xla
|
||||
0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, // tMtlShaderOutput
|
||||
0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // _mtl_o;. _mtl_
|
||||
0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, // o.gl_FragData_0
|
||||
0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // = _mtl_u.bgfx_cl
|
||||
0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[0];.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_2 = half4(_mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // olor[2]);. retu
|
||||
0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // rn _mtl_o;.}...
|
||||
0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, // ta_1 = _mtl_u.bg
|
||||
0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, // fx_clear_color[1
|
||||
0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // ];. _mtl_o.gl_F
|
||||
0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ragData_2 = _mtl
|
||||
0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // _u.bgfx_clear_co
|
||||
0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, // lor[2];. return
|
||||
0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // _mtl_o;.}...
|
||||
};
|
||||
|
142
3rdparty/bgfx/src/fs_clear3.bin.h
vendored
142
3rdparty/bgfx/src/fs_clear3.bin.h
vendored
@ -35,83 +35,89 @@ static const uint8_t fs_clear3_dx9[240] =
|
||||
0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, // ................
|
||||
0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ................
|
||||
};
|
||||
static const uint8_t fs_clear3_dx11[439] =
|
||||
static const uint8_t fs_clear3_dx11[555] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
|
||||
0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x12, 0x08, 0x00, 0x00, 0x08, // clear_color.....
|
||||
0x00, 0x90, 0x01, 0x44, 0x58, 0x42, 0x43, 0x12, 0x80, 0x92, 0xa3, 0x15, 0xef, 0x86, 0x85, 0x80, // ...DXBC.........
|
||||
0xb7, 0x87, 0xf9, 0x1f, 0xb5, 0xa2, 0x4a, 0x01, 0x00, 0x00, 0x00, 0x90, 0x01, 0x00, 0x00, 0x03, // ......J.........
|
||||
0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0x60, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x49, // ...,...`.......I
|
||||
0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
|
||||
0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
|
||||
0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, // ON.OSGNt........
|
||||
0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...h............
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x01, // ...........h....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
|
||||
0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...h............
|
||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x03, // ...........h....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, // ................
|
||||
0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S
|
||||
0x48, 0x44, 0x52, 0xac, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x59, // HDR....@...+...Y
|
||||
0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, // ...F. .........e
|
||||
0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
|
||||
0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, // ......e.... ...
|
||||
0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, // ...e.... ......6
|
||||
0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, // .......6.... ...
|
||||
0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
|
||||
0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
|
||||
0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, // .......6.... ...
|
||||
0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, // ...F. .........>
|
||||
0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // .......
|
||||
0x00, 0x04, 0x02, 0x44, 0x58, 0x42, 0x43, 0xd5, 0x4f, 0xed, 0x6d, 0x3f, 0x90, 0xd6, 0xbb, 0x53, // ...DXBC.O.m?...S
|
||||
0x7b, 0xdc, 0x55, 0x0b, 0xda, 0x6f, 0x86, 0x01, 0x00, 0x00, 0x00, 0x04, 0x02, 0x00, 0x00, 0x04, // {.U..o..........
|
||||
0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x00, 0x54, 0x01, 0x00, 0x00, 0x88, // ...0.......T....
|
||||
0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0x68, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, // ...Aon9h...h....
|
||||
0x02, 0xff, 0xff, 0x38, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, // ...8...0.....$..
|
||||
0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, // .0...0...$...0..
|
||||
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0x01, // ................
|
||||
0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, // ................
|
||||
0x08, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, // ................
|
||||
0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, // ................
|
||||
0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0xac, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x2b, // ...SHDR....@...+
|
||||
0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, // ...Y...F. ......
|
||||
0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e
|
||||
0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
|
||||
0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, // ......e.... ...
|
||||
0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
|
||||
0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6....
|
||||
0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ......F. ......
|
||||
0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
|
||||
0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6....
|
||||
0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ......F. ......
|
||||
0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, // ...>...ISGN,....
|
||||
0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ....... ........
|
||||
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, // ...............S
|
||||
0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x74, // V_POSITION.OSGNt
|
||||
0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, // ...........h....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, // ................
|
||||
0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...h............
|
||||
0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x02, // ...........h....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, // ................
|
||||
0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...h............
|
||||
0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA
|
||||
0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x00, 0x00, 0x80, 0x00, // RGET.......
|
||||
};
|
||||
static const uint8_t fs_clear3_mtl[735] =
|
||||
static const uint8_t fs_clear3_mtl[711] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xd0, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...........us
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xb8, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH...........us
|
||||
0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me
|
||||
0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput {
|
||||
0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput {
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, // Data_0 [[color(0
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, // )]];. half4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_1 [[col
|
||||
0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // or(1)]];. half4
|
||||
0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, // gl_FragData_2 [
|
||||
0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, // [color(2)]];. h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // alf4 gl_FragData
|
||||
0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, // _3 [[color(3)]];
|
||||
0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // tlShaderUniform
|
||||
0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, // {. float4 bgfx_
|
||||
0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, // clear_color[8];.
|
||||
0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // };.fragment xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput
|
||||
0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, // xlatMtlMain (xla
|
||||
0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, // tMtlShaderInput
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, // _mtl_i [[stage_i
|
||||
0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, // n]], constant xl
|
||||
0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo
|
||||
0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, // rm& _mtl_u [[buf
|
||||
0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, // fer(0)]]).{. xl
|
||||
0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu
|
||||
0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // t _mtl_o;. _mtl
|
||||
0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, // _o.gl_FragData_0
|
||||
0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // = half4(_mtl_u.
|
||||
0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color
|
||||
0x5b, 0x30, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // [0]);. _mtl_o.g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x68, // l_FragData_1 = h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // alf4(_mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x29, // _clear_color[1])
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // agData_2 = half4
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // (_mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // ar_color[2]);.
|
||||
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra
|
||||
0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color(
|
||||
0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo
|
||||
0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_
|
||||
0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];.
|
||||
0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // float4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, // Data_3 [[color(3
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, // )]];.};.struct x
|
||||
0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, // latMtlShaderUnif
|
||||
0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, // orm {. float4 b
|
||||
0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, // gfx_clear_color[
|
||||
0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, // 8];.};.fragment
|
||||
0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut
|
||||
0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain
|
||||
0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, // (xlatMtlShaderIn
|
||||
0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // put _mtl_i [[sta
|
||||
0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan
|
||||
0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, // t xlatMtlShaderU
|
||||
0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, // niform& _mtl_u [
|
||||
0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, // [buffer(0)]]).{.
|
||||
0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // xlatMtlShaderO
|
||||
0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, // utput _mtl_o;.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_3 = half4(_mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // olor[3]);. retu
|
||||
0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // rn _mtl_o;.}...
|
||||
0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, // ta_0 = _mtl_u.bg
|
||||
0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, // fx_clear_color[0
|
||||
0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // ];. _mtl_o.gl_F
|
||||
0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ragData_1 = _mtl
|
||||
0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // _u.bgfx_clear_co
|
||||
0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // lor[1];. _mtl_o
|
||||
0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, // .gl_FragData_2 =
|
||||
0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // _mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // ar_color[2];. _
|
||||
0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // mtl_o.gl_FragDat
|
||||
0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, // a_3 = _mtl_u.bgf
|
||||
0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, // x_clear_color[3]
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // ;. return _mtl_
|
||||
0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // o;.}...
|
||||
};
|
||||
|
93
3rdparty/bgfx/src/fs_clear4.bin.h
vendored
93
3rdparty/bgfx/src/fs_clear4.bin.h
vendored
@ -73,58 +73,57 @@ static const uint8_t fs_clear4_dx11[499] =
|
||||
0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, // . .........>....
|
||||
0x00, 0x80, 0x00, // ...
|
||||
};
|
||||
static const uint8_t fs_clear4_mtl[831] =
|
||||
static const uint8_t fs_clear4_mtl[801] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x30, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH.......0...us
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x12, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us
|
||||
0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me
|
||||
0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput {
|
||||
0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput {
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, // Data_0 [[color(0
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, // )]];. half4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_1 [[col
|
||||
0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // or(1)]];. half4
|
||||
0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, // gl_FragData_2 [
|
||||
0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, // [color(2)]];. h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // alf4 gl_FragData
|
||||
0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, // _3 [[color(3)]];
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x34, // Data_4 [[color(4
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, // )]];.};.struct x
|
||||
0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, // latMtlShaderUnif
|
||||
0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, // orm {. float4 b
|
||||
0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, // gfx_clear_color[
|
||||
0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, // 8];.};.fragment
|
||||
0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut
|
||||
0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain
|
||||
0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, // (xlatMtlShaderIn
|
||||
0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // put _mtl_i [[sta
|
||||
0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan
|
||||
0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, // t xlatMtlShaderU
|
||||
0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, // niform& _mtl_u [
|
||||
0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, // [buffer(0)]]).{.
|
||||
0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, // xlatMtlShaderO
|
||||
0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, // utput _mtl_o;.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_0 = half4(_mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // olor[0]);. _mtl
|
||||
0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, // _o.gl_FragData_1
|
||||
0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // = half4(_mtl_u.
|
||||
0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color
|
||||
0x5b, 0x31, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // [1]);. _mtl_o.g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x68, // l_FragData_2 = h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // alf4(_mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x29, // _clear_color[2])
|
||||
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra
|
||||
0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color(
|
||||
0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo
|
||||
0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_
|
||||
0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];.
|
||||
0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // float4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, // Data_3 [[color(3
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, // )]];. float4 gl
|
||||
0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, // _FragData_4 [[co
|
||||
0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, // lor(4)]];.};.str
|
||||
0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // uct xlatMtlShade
|
||||
0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // rUniform {. flo
|
||||
0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // at4 bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, // olor[8];.};.frag
|
||||
0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ment xlatMtlShad
|
||||
0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // erOutput xlatMtl
|
||||
0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // Main (xlatMtlSha
|
||||
0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, // derInput _mtl_i
|
||||
0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, // [[stage_in]], co
|
||||
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // nstant xlatMtlSh
|
||||
0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, // aderUniform& _mt
|
||||
0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, // l_u [[buffer(0)]
|
||||
0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // ]).{. xlatMtlSh
|
||||
0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // aderOutput _mtl_
|
||||
0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // o;. _mtl_o.gl_F
|
||||
0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ragData_0 = _mtl
|
||||
0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // _u.bgfx_clear_co
|
||||
0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // lor[0];. _mtl_o
|
||||
0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, // .gl_FragData_1 =
|
||||
0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // _mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // ar_color[1];. _
|
||||
0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // mtl_o.gl_FragDat
|
||||
0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, // a_2 = _mtl_u.bgf
|
||||
0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, // x_clear_color[2]
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // agData_3 = half4
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // (_mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // ar_color[3]);.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_4 = half4(_mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // olor[4]);. retu
|
||||
0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // rn _mtl_o;.}...
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // agData_3 = _mtl_
|
||||
0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // u.bgfx_clear_col
|
||||
0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // or[3];. _mtl_o.
|
||||
0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, // gl_FragData_4 =
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // _mtl_u.bgfx_clea
|
||||
0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, // r_color[4];. re
|
||||
0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, // turn _mtl_o;.}..
|
||||
0x00, // .
|
||||
};
|
||||
|
104
3rdparty/bgfx/src/fs_clear5.bin.h
vendored
104
3rdparty/bgfx/src/fs_clear5.bin.h
vendored
@ -78,64 +78,62 @@ static const uint8_t fs_clear5_dx11[559] =
|
||||
0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
|
||||
0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // .......>.......
|
||||
};
|
||||
static const uint8_t fs_clear5_mtl[927] =
|
||||
static const uint8_t fs_clear5_mtl[891] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x90, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x6c, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH.......l...us
|
||||
0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me
|
||||
0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput {
|
||||
0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput {
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, // Data_0 [[color(0
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, // )]];. half4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_1 [[col
|
||||
0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // or(1)]];. half4
|
||||
0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, // gl_FragData_2 [
|
||||
0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, // [color(2)]];. h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // alf4 gl_FragData
|
||||
0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, // _3 [[color(3)]];
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x34, // Data_4 [[color(4
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, // )]];. half4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_5 [[col
|
||||
0x6f, 0x72, 0x28, 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // or(5)]];.};.stru
|
||||
0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader
|
||||
0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // Uniform {. floa
|
||||
0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // t4 bgfx_clear_co
|
||||
0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, // lor[8];.};.fragm
|
||||
0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // ent xlatMtlShade
|
||||
0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // rOutput xlatMtlM
|
||||
0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ain (xlatMtlShad
|
||||
0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, // erInput _mtl_i [
|
||||
0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, // [stage_in]], con
|
||||
0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // stant xlatMtlSha
|
||||
0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // derUniform& _mtl
|
||||
0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, // _u [[buffer(0)]]
|
||||
0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // ).{. xlatMtlSha
|
||||
0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // derOutput _mtl_o
|
||||
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra
|
||||
0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color(
|
||||
0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo
|
||||
0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_
|
||||
0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];.
|
||||
0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // float4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, // Data_3 [[color(3
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, // )]];. float4 gl
|
||||
0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, // _FragData_4 [[co
|
||||
0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // lor(4)]];. floa
|
||||
0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, // t4 gl_FragData_5
|
||||
0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, // [[color(5)]];.}
|
||||
0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // ;.struct xlatMtl
|
||||
0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, // ShaderUniform {.
|
||||
0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // float4 bgfx_cl
|
||||
0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, // ear_color[8];.};
|
||||
0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // .fragment xlatMt
|
||||
0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, // lShaderOutput xl
|
||||
0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, // atMtlMain (xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, // tlShaderInput _m
|
||||
0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, // tl_i [[stage_in]
|
||||
0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // ], constant xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, // MtlShaderUniform
|
||||
0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, // & _mtl_u [[buffe
|
||||
0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, // r(0)]]).{. xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // _mtl_o;. _mtl_o
|
||||
0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, // .gl_FragData_0 =
|
||||
0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // _mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // ar_color[0];. _
|
||||
0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // mtl_o.gl_FragDat
|
||||
0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, // a_1 = _mtl_u.bgf
|
||||
0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, // x_clear_color[1]
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // agData_0 = half4
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // (_mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // ar_color[0]);.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_1 = half4(_mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // olor[1]);. _mtl
|
||||
0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, // _o.gl_FragData_2
|
||||
0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // = half4(_mtl_u.
|
||||
0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color
|
||||
0x5b, 0x32, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // [2]);. _mtl_o.g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x68, // l_FragData_3 = h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // alf4(_mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x29, // _clear_color[3])
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // agData_4 = half4
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // (_mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // ar_color[4]);.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_5 = half4(_mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x35, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // olor[5]);. retu
|
||||
0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // rn _mtl_o;.}...
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // agData_2 = _mtl_
|
||||
0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // u.bgfx_clear_col
|
||||
0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // or[2];. _mtl_o.
|
||||
0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, // gl_FragData_3 =
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // _mtl_u.bgfx_clea
|
||||
0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, // r_color[3];. _m
|
||||
0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // tl_o.gl_FragData
|
||||
0x5f, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // _4 = _mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, // _clear_color[4];
|
||||
0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . _mtl_o.gl_Fra
|
||||
0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // gData_5 = _mtl_u
|
||||
0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo
|
||||
0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, // r[5];. return _
|
||||
0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // mtl_o;.}...
|
||||
};
|
||||
|
116
3rdparty/bgfx/src/fs_clear6.bin.h
vendored
116
3rdparty/bgfx/src/fs_clear6.bin.h
vendored
@ -85,70 +85,68 @@ static const uint8_t fs_clear6_dx11[619] =
|
||||
0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, // ......F. ......
|
||||
0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // ...>.......
|
||||
};
|
||||
static const uint8_t fs_clear6_mtl[1023] =
|
||||
static const uint8_t fs_clear6_mtl[981] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xf0, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc6, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH...........us
|
||||
0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me
|
||||
0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput {
|
||||
0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput {
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, // Data_0 [[color(0
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, // )]];. half4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_1 [[col
|
||||
0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // or(1)]];. half4
|
||||
0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, // gl_FragData_2 [
|
||||
0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, // [color(2)]];. h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // alf4 gl_FragData
|
||||
0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, // _3 [[color(3)]];
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x34, // Data_4 [[color(4
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, // )]];. half4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_5 [[col
|
||||
0x6f, 0x72, 0x28, 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // or(5)]];. half4
|
||||
0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x5b, // gl_FragData_6 [
|
||||
0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x36, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, // [color(6)]];.};.
|
||||
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // struct xlatMtlSh
|
||||
0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, // aderUniform {.
|
||||
0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // float4 bgfx_clea
|
||||
0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, // r_color[8];.};.f
|
||||
0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, // ragment xlatMtlS
|
||||
0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // haderOutput xlat
|
||||
0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // MtlMain (xlatMtl
|
||||
0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // ShaderInput _mtl
|
||||
0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, // _i [[stage_in]],
|
||||
0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // constant xlatMt
|
||||
0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, // lShaderUniform&
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, // _mtl_u [[buffer(
|
||||
0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, // 0)]]).{. xlatMt
|
||||
0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, // lShaderOutput _m
|
||||
0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // tl_o;. _mtl_o.g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x68, // l_FragData_0 = h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // alf4(_mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x29, // _clear_color[0])
|
||||
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra
|
||||
0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color(
|
||||
0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo
|
||||
0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_
|
||||
0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];.
|
||||
0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // float4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, // Data_3 [[color(3
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, // )]];. float4 gl
|
||||
0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, // _FragData_4 [[co
|
||||
0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // lor(4)]];. floa
|
||||
0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, // t4 gl_FragData_5
|
||||
0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, // [[color(5)]];.
|
||||
0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // float4 gl_FragD
|
||||
0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x36, 0x29, // ata_6 [[color(6)
|
||||
0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, // ]];.};.struct xl
|
||||
0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo
|
||||
0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, // rm {. float4 bg
|
||||
0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, // fx_clear_color[8
|
||||
0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, // ];.};.fragment x
|
||||
0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, // latMtlShaderOutp
|
||||
0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, // ut xlatMtlMain (
|
||||
0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, // xlatMtlShaderInp
|
||||
0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, // ut _mtl_i [[stag
|
||||
0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, // e_in]], constant
|
||||
0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, // xlatMtlShaderUn
|
||||
0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, // iform& _mtl_u [[
|
||||
0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, // buffer(0)]]).{.
|
||||
0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, // xlatMtlShaderOu
|
||||
0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, // tput _mtl_o;. _
|
||||
0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, // mtl_o.gl_FragDat
|
||||
0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, // a_0 = _mtl_u.bgf
|
||||
0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, // x_clear_color[0]
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // agData_1 = half4
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // (_mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // ar_color[1]);.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_2 = half4(_mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // olor[2]);. _mtl
|
||||
0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, // _o.gl_FragData_3
|
||||
0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // = half4(_mtl_u.
|
||||
0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color
|
||||
0x5b, 0x33, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // [3]);. _mtl_o.g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x68, // l_FragData_4 = h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // alf4(_mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x29, // _clear_color[4])
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // agData_5 = half4
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // (_mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x35, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // ar_color[5]);.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_6 = half4(_mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x36, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // olor[6]);. retu
|
||||
0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // rn _mtl_o;.}...
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // agData_1 = _mtl_
|
||||
0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // u.bgfx_clear_col
|
||||
0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // or[1];. _mtl_o.
|
||||
0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, // gl_FragData_2 =
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // _mtl_u.bgfx_clea
|
||||
0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, // r_color[2];. _m
|
||||
0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // tl_o.gl_FragData
|
||||
0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // _3 = _mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x3b, // _clear_color[3];
|
||||
0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . _mtl_o.gl_Fra
|
||||
0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // gData_4 = _mtl_u
|
||||
0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo
|
||||
0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // r[4];. _mtl_o.g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x5f, // l_FragData_5 = _
|
||||
0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, // mtl_u.bgfx_clear
|
||||
0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, // _color[5];. _mt
|
||||
0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // l_o.gl_FragData_
|
||||
0x36, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, // 6 = _mtl_u.bgfx_
|
||||
0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x36, 0x5d, 0x3b, 0x0a, // clear_color[6];.
|
||||
0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, // return _mtl_o;
|
||||
0x0a, 0x7d, 0x0a, 0x0a, 0x00, // .}...
|
||||
};
|
||||
|
123
3rdparty/bgfx/src/fs_clear7.bin.h
vendored
123
3rdparty/bgfx/src/fs_clear7.bin.h
vendored
@ -91,76 +91,73 @@ static const uint8_t fs_clear7_dx11[679] =
|
||||
0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, // ...F. .........>
|
||||
0x00, 0x00, 0x01, 0x00, 0x00, 0x80, 0x00, // .......
|
||||
};
|
||||
static const uint8_t fs_clear7_mtl[1119] =
|
||||
static const uint8_t fs_clear7_mtl[1071] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x50, 0x04, 0x00, 0x00, 0x75, 0x73, // FSH.......P...us
|
||||
0x46, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x20, 0x04, 0x00, 0x00, 0x75, 0x73, // FSH....... ...us
|
||||
0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me
|
||||
0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput {
|
||||
0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, // tlShaderOutput {
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x30, // Data_0 [[color(0
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, // )]];. half4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_1 [[col
|
||||
0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // or(1)]];. half4
|
||||
0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x5b, // gl_FragData_2 [
|
||||
0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, // [color(2)]];. h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // alf4 gl_FragData
|
||||
0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, 0x29, 0x5d, 0x5d, 0x3b, // _3 [[color(3)]];
|
||||
0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // . half4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x34, // Data_4 [[color(4
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, // )]];. half4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_5 [[col
|
||||
0x6f, 0x72, 0x28, 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // or(5)]];. half4
|
||||
0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x5b, // gl_FragData_6 [
|
||||
0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x36, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x68, // [color(6)]];. h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // alf4 gl_FragData
|
||||
0x5f, 0x37, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x37, 0x29, 0x5d, 0x5d, 0x3b, // _7 [[color(7)]];
|
||||
0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, // .};.struct xlatM
|
||||
0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, // tlShaderUniform
|
||||
0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, // {. float4 bgfx_
|
||||
0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, // clear_color[8];.
|
||||
0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // };.fragment xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput
|
||||
0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, // xlatMtlMain (xla
|
||||
0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, // tMtlShaderInput
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, // _mtl_i [[stage_i
|
||||
0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, // n]], constant xl
|
||||
0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo
|
||||
0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, // rm& _mtl_u [[buf
|
||||
0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, // fer(0)]]).{. xl
|
||||
0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu
|
||||
0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // t _mtl_o;. _mtl
|
||||
0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, // _o.gl_FragData_0
|
||||
0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // = half4(_mtl_u.
|
||||
0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color
|
||||
0x5b, 0x30, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // [0]);. _mtl_o.g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x68, // l_FragData_1 = h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // alf4(_mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x29, // _clear_color[1])
|
||||
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . float4 gl_Fra
|
||||
0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, // gData_0 [[color(
|
||||
0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // 0)]];. float4 g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x5b, 0x5b, 0x63, // l_FragData_1 [[c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, // olor(1)]];. flo
|
||||
0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // at4 gl_FragData_
|
||||
0x32, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, // 2 [[color(2)]];.
|
||||
0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // float4 gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x33, // Data_3 [[color(3
|
||||
0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, // )]];. float4 gl
|
||||
0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x5b, 0x5b, 0x63, 0x6f, // _FragData_4 [[co
|
||||
0x6c, 0x6f, 0x72, 0x28, 0x34, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // lor(4)]];. floa
|
||||
0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, // t4 gl_FragData_5
|
||||
0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x35, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, // [[color(5)]];.
|
||||
0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // float4 gl_FragD
|
||||
0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x28, 0x36, 0x29, // ata_6 [[color(6)
|
||||
0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, 0x6c, 0x5f, // ]];. float4 gl_
|
||||
0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x37, 0x20, 0x5b, 0x5b, 0x63, 0x6f, 0x6c, // FragData_7 [[col
|
||||
0x6f, 0x72, 0x28, 0x37, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, // or(7)]];.};.stru
|
||||
0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, // ct xlatMtlShader
|
||||
0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // Uniform {. floa
|
||||
0x74, 0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, // t4 bgfx_clear_co
|
||||
0x6c, 0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, // lor[8];.};.fragm
|
||||
0x65, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // ent xlatMtlShade
|
||||
0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, // rOutput xlatMtlM
|
||||
0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // ain (xlatMtlShad
|
||||
0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, // erInput _mtl_i [
|
||||
0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, // [stage_in]], con
|
||||
0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // stant xlatMtlSha
|
||||
0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // derUniform& _mtl
|
||||
0x5f, 0x75, 0x20, 0x5b, 0x5b, 0x62, 0x75, 0x66, 0x66, 0x65, 0x72, 0x28, 0x30, 0x29, 0x5d, 0x5d, // _u [[buffer(0)]]
|
||||
0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // ).{. xlatMtlSha
|
||||
0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, // derOutput _mtl_o
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x32, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // agData_2 = half4
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // (_mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // ar_color[2]);.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_3 = half4(_mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x33, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, // olor[3]);. _mtl
|
||||
0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, // _o.gl_FragData_4
|
||||
0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // = half4(_mtl_u.
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // agData_0 = _mtl_
|
||||
0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // u.bgfx_clear_col
|
||||
0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, // or[0];. _mtl_o.
|
||||
0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x31, 0x20, 0x3d, 0x20, // gl_FragData_1 =
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // _mtl_u.bgfx_clea
|
||||
0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, // r_color[1];. _m
|
||||
0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // tl_o.gl_FragData
|
||||
0x5f, 0x32, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // _2 = _mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, // _clear_color[2];
|
||||
0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, // . _mtl_o.gl_Fra
|
||||
0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x33, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, // gData_3 = _mtl_u
|
||||
0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // .bgfx_clear_colo
|
||||
0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // r[3];. _mtl_o.g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x34, 0x20, 0x3d, 0x20, 0x5f, // l_FragData_4 = _
|
||||
0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, // mtl_u.bgfx_clear
|
||||
0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, // _color[4];. _mt
|
||||
0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, // l_o.gl_FragData_
|
||||
0x35, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, // 5 = _mtl_u.bgfx_
|
||||
0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, // clear_color[5];.
|
||||
0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, // _mtl_o.gl_Frag
|
||||
0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, // Data_6 = _mtl_u.
|
||||
0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // bgfx_clear_color
|
||||
0x5b, 0x34, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, // [4]);. _mtl_o.g
|
||||
0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x35, 0x20, 0x3d, 0x20, 0x68, // l_FragData_5 = h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, // alf4(_mtl_u.bgfx
|
||||
0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x35, 0x5d, 0x29, // _clear_color[5])
|
||||
0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, // ;. _mtl_o.gl_Fr
|
||||
0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x36, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, // agData_6 = half4
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, // (_mtl_u.bgfx_cle
|
||||
0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x36, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, // ar_color[6]);.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, // _mtl_o.gl_FragDa
|
||||
0x74, 0x61, 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x5f, 0x6d, 0x74, // ta_7 = half4(_mt
|
||||
0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, // l_u.bgfx_clear_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x37, 0x5d, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // olor[7]);. retu
|
||||
0x5b, 0x36, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, // [6];. _mtl_o.gl
|
||||
0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5f, 0x37, 0x20, 0x3d, 0x20, 0x5f, 0x6d, // _FragData_7 = _m
|
||||
0x74, 0x6c, 0x5f, 0x75, 0x2e, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, // tl_u.bgfx_clear_
|
||||
0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x37, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, // color[7];. retu
|
||||
0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // rn _mtl_o;.}...
|
||||
};
|
||||
|
171
3rdparty/bgfx/src/fs_debugfont.bin.h
vendored
171
3rdparty/bgfx/src/fs_debugfont.bin.h
vendored
@ -24,86 +24,103 @@ static const uint8_t fs_debugfont_glsl[354] =
|
||||
0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, // r = tmpvar_1;.}.
|
||||
0x0a, 0x00, // ..
|
||||
};
|
||||
static const uint8_t fs_debugfont_dx9[353] =
|
||||
static const uint8_t fs_debugfont_dx9[370] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0x54, 0x01, 0x00, 0x03, 0xff, 0xff, // FSH..."f..T.....
|
||||
0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, // ..".CTAB....S...
|
||||
0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, 0x00, // ................
|
||||
0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // L...0...........
|
||||
0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // <.......s_texCol
|
||||
0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, // or..............
|
||||
0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
|
||||
0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
|
||||
0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
|
||||
0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, 0x05, // 29.952.3111.Q...
|
||||
0x00, 0x00, 0x0f, 0xa0, 0x81, 0x80, 0x80, 0xbb, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, 0xbf, // ................
|
||||
0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // ................
|
||||
0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x01, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................
|
||||
0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x90, // ................
|
||||
0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0x90, // ....B...........
|
||||
0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x90, // ................
|
||||
0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x81, 0x00, 0x00, 0xe4, 0x90, // ................
|
||||
0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, 0x80, // ................
|
||||
0x01, 0x00, 0xe4, 0x90, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0xff, 0x80, // ................
|
||||
0x00, 0x00, 0x00, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x80, // ....X...........
|
||||
0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x41, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0f, 0x80, // ..U.....A.......
|
||||
0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, 0x00, // ................
|
||||
0x00, // .
|
||||
0x46, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH..."f...s_tex
|
||||
0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x01, 0x00, 0x00, 0x01, 0x00, 0x54, 0x01, 0x00, 0x03, 0xff, // Color0.....T....
|
||||
0xff, 0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, // ...".CTAB....S..
|
||||
0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x91, 0x00, // ................
|
||||
0x00, 0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, // .L...0..........
|
||||
0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // .<.......s_texCo
|
||||
0x6c, 0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, // lor.............
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, // .....ps_3_0.Micr
|
||||
0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, // osoft (R) HLSL S
|
||||
0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, // hader Compiler 9
|
||||
0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, // .29.952.3111.Q..
|
||||
0x05, 0x00, 0x00, 0x0f, 0xa0, 0x81, 0x80, 0x80, 0xbb, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x80, // ................
|
||||
0xbf, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, // ................
|
||||
0x90, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x01, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, // ................
|
||||
0x02, 0x05, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................
|
||||
0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0xe4, // .....B..........
|
||||
0x90, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, // ................
|
||||
0x90, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x81, 0x00, 0x00, 0xe4, // ................
|
||||
0x90, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0xe4, // ................
|
||||
0x80, 0x01, 0x00, 0xe4, 0x90, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, 0x00, 0x00, 0xff, // ................
|
||||
0x80, 0x00, 0x00, 0x00, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, // .....X..........
|
||||
0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x41, 0x00, 0x00, 0x01, 0x01, 0x00, 0x0f, // ...U.....A......
|
||||
0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0xff, 0xff, 0x00, // ................
|
||||
0x00, 0x00, // ..
|
||||
};
|
||||
static const uint8_t fs_debugfont_dx11[520] =
|
||||
static const uint8_t fs_debugfont_dx11[772] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0xf8, 0x01, 0x44, 0x58, 0x42, 0x43, // FSH..."f....DXBC
|
||||
0x5a, 0xd5, 0xe8, 0x3a, 0x43, 0x7d, 0xa8, 0x34, 0xa8, 0x0a, 0x2d, 0x0c, 0xa2, 0xce, 0x50, 0x4f, // Z..:C}.4..-...PO
|
||||
0x01, 0x00, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
||||
0xb8, 0x00, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, // ........ISGN....
|
||||
0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........h.......
|
||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................
|
||||
0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // t...............
|
||||
0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ........t.......
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // ................
|
||||
0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // z...............
|
||||
0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT
|
||||
0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, // ION.COLOR.TEXCOO
|
||||
0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // RD..OSGN,.......
|
||||
0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ...........
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, // ............SV_T
|
||||
0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x04, 0x01, 0x00, 0x00, // ARGET...SHDR....
|
||||
0x40, 0x00, 0x00, 0x00, 0x41, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, // @...A...Z....`..
|
||||
0x00, 0x00, 0x00, 0x00, 0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....X....p......
|
||||
0x55, 0x55, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // UU..b...........
|
||||
0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, // b...........b...
|
||||
0x32, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // 2.......e.... ..
|
||||
0x00, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, // ....h.......E...
|
||||
0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, // ........F.......
|
||||
0x46, 0x7e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // F~.......`......
|
||||
0x00, 0x00, 0x00, 0x08, 0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // ............F...
|
||||
0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ....F...A.......
|
||||
0x32, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, // 2...............
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // ....F.......F...
|
||||
0x02, 0x00, 0x00, 0x00, 0x31, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....1...........
|
||||
0x3a, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x81, 0x80, 0x80, 0x3b, // :........@.....;
|
||||
0x0d, 0x00, 0x04, 0x03, 0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // ............6...
|
||||
0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // . ......F.......
|
||||
0x3e, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // >.......
|
||||
0x46, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0xf4, 0x02, 0x44, 0x58, 0x42, 0x43, // FSH..."f....DXBC
|
||||
0x1d, 0xbb, 0xb2, 0xa8, 0xff, 0x65, 0xcd, 0xa5, 0xf7, 0x85, 0xfd, 0xcb, 0xb6, 0xe1, 0x00, 0xc6, // .....e..........
|
||||
0x01, 0x00, 0x00, 0x00, 0xf4, 0x02, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ............0...
|
||||
0x28, 0x01, 0x00, 0x00, 0x34, 0x02, 0x00, 0x00, 0xc0, 0x02, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, // (...4.......Aon9
|
||||
0xf0, 0x00, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, 0xc8, 0x00, 0x00, 0x00, // ................
|
||||
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x28, 0x00, // (.....(...(...(.
|
||||
0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xff, // ..$...(.........
|
||||
0x51, 0x00, 0x00, 0x05, 0x00, 0x00, 0x0f, 0xa0, 0x81, 0x80, 0x80, 0xbb, 0x00, 0x00, 0x00, 0x80, // Q...............
|
||||
0x00, 0x00, 0x80, 0xbf, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, // ................
|
||||
0x00, 0x00, 0x0f, 0xb0, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0xb0, // ................
|
||||
0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x02, 0x00, 0x03, 0xb0, 0x1f, 0x00, 0x00, 0x02, // ................
|
||||
0x00, 0x00, 0x00, 0x90, 0x00, 0x08, 0x0f, 0xa0, 0x42, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, // ........B.......
|
||||
0x02, 0x00, 0xe4, 0xb0, 0x00, 0x08, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0x80, // ................
|
||||
0x01, 0x00, 0xe4, 0xb0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0x81, // ................
|
||||
0x00, 0x00, 0xe4, 0xb0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x00, 0x00, 0x00, 0x80, // ................
|
||||
0x01, 0x00, 0xe4, 0x80, 0x01, 0x00, 0xe4, 0xb0, 0x02, 0x00, 0x00, 0x03, 0x01, 0x00, 0x01, 0x80, // ................
|
||||
0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0x00, 0xa0, 0x58, 0x00, 0x00, 0x04, 0x01, 0x00, 0x0f, 0x80, // ........X.......
|
||||
0x01, 0x00, 0x00, 0x80, 0x00, 0x00, 0x55, 0xa0, 0x00, 0x00, 0xaa, 0xa0, 0x41, 0x00, 0x00, 0x01, // ......U.....A...
|
||||
0x01, 0x00, 0x0f, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, // ................
|
||||
0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x04, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, // ....SHDR....@...
|
||||
0x41, 0x00, 0x00, 0x00, 0x5a, 0x00, 0x00, 0x03, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // A...Z....`......
|
||||
0x58, 0x18, 0x00, 0x04, 0x00, 0x70, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x55, 0x55, 0x00, 0x00, // X....p......UU..
|
||||
0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, // b...........b...
|
||||
0xf2, 0x10, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0x32, 0x10, 0x10, 0x00, // ........b...2...
|
||||
0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....e.... ......
|
||||
0x68, 0x00, 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x45, 0x00, 0x00, 0x09, 0xf2, 0x00, 0x10, 0x00, // h.......E.......
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x7e, 0x10, 0x00, // ....F.......F~..
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x60, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, // .....`..........
|
||||
0xf2, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ........F.......
|
||||
0x46, 0x1e, 0x10, 0x80, 0x41, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x32, 0x00, 0x00, 0x09, // F...A.......2...
|
||||
0xf2, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||
0x46, 0x0e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // F.......F.......
|
||||
0x31, 0x00, 0x00, 0x07, 0x12, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3a, 0x00, 0x10, 0x00, // 1...........:...
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x81, 0x80, 0x80, 0x3b, 0x0d, 0x00, 0x04, 0x03, // .....@.....;....
|
||||
0x0a, 0x00, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // ........6.... ..
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x0e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>...
|
||||
0x49, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, // ISGN............
|
||||
0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // h...............
|
||||
0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........t.......
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // ................
|
||||
0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // t...............
|
||||
0x02, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........z.......
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, // ................
|
||||
0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, // SV_POSITION.COLO
|
||||
0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, // R.TEXCOORD..OSGN
|
||||
0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ...
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||
0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET...
|
||||
0x00, 0x00, 0x00, 0x00, // ....
|
||||
};
|
||||
static const uint8_t fs_debugfont_mtl[762] =
|
||||
static const uint8_t fs_debugfont_mtl[810] =
|
||||
{
|
||||
0x46, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0xeb, 0x02, 0x00, 0x00, 0x75, 0x73, // FSH..."f......us
|
||||
0x46, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0x1b, 0x03, 0x00, 0x00, 0x75, 0x73, // FSH..."f......us
|
||||
0x69, 0x6e, 0x67, 0x20, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x70, 0x61, 0x63, 0x65, 0x20, 0x6d, 0x65, // ing namespace me
|
||||
0x74, 0x61, 0x6c, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, // tal;.struct xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x7b, // MtlShaderInput {
|
||||
0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . float4 v_colo
|
||||
0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, // r0;. float4 v_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, // olor1;. float2
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, // olor1;. float2
|
||||
0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, // v_texcoord0;.};.
|
||||
0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // struct xlatMtlSh
|
||||
0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x68, // aderOutput {. h
|
||||
0x61, 0x6c, 0x66, 0x34, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, // alf4 gl_FragColo
|
||||
0x72, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, // r;.};.struct xla
|
||||
0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, // tMtlShaderUnifor
|
||||
0x6d, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, // m {.};.fragment
|
||||
0x6d, 0x20, 0x7b, 0x0a, 0x7d, 0x3b, 0x0a, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x20, // m {.};.fragment
|
||||
0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut
|
||||
0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain
|
||||
0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, // put xlatMtlMain
|
||||
0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, // (xlatMtlShaderIn
|
||||
0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, // put _mtl_i [[sta
|
||||
0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, // ge_in]], constan
|
||||
@ -119,22 +136,24 @@ static const uint8_t fs_debugfont_mtl[762] =
|
||||
0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, // atMtlShaderOutpu
|
||||
0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, // t _mtl_o;. half
|
||||
0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, // 4 tmpvar_1;. tm
|
||||
0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x34, // pvar_1 = ((half4
|
||||
0x29, 0x6d, 0x69, 0x78, 0x20, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, // )mix (_mtl_i.v_c
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x2c, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, // olor1, _mtl_i.v_
|
||||
0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x29, // color0, (float4)
|
||||
0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, // s_texColor.sampl
|
||||
0x65, 0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, // e(_mtlsmp_s_texC
|
||||
0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x29, 0x28, 0x5f, // olor, (float2)(_
|
||||
0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, // mtl_i.v_texcoord
|
||||
0x30, 0x29, 0x29, 0x2e, 0x78, 0x78, 0x78, 0x78, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x69, 0x66, // 0)).xxxx));. if
|
||||
0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3c, 0x20, // ((tmpvar_1.w <
|
||||
0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x28, 0x73, // pvar_1 = half4(s
|
||||
0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2e, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, // _texColor.sample
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x73, 0x6d, 0x70, 0x5f, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // (_mtlsmp_s_texCo
|
||||
0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x29, 0x28, 0x5f, 0x6d, // lor, (float2)(_m
|
||||
0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, // tl_i.v_texcoord0
|
||||
0x29, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x20, 0x74, 0x6d, 0x70, // )));. half4 tmp
|
||||
0x76, 0x61, 0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, // var_2;. tmpvar_
|
||||
0x32, 0x20, 0x3d, 0x20, 0x28, 0x28, 0x68, 0x61, 0x6c, 0x66, 0x34, 0x29, 0x6d, 0x69, 0x78, 0x20, // 2 = ((half4)mix
|
||||
0x28, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, // (_mtl_i.v_color1
|
||||
0x2c, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // , _mtl_i.v_color
|
||||
0x30, 0x2c, 0x20, 0x28, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x29, 0x74, 0x6d, 0x70, 0x76, 0x61, // 0, (float4)tmpva
|
||||
0x72, 0x5f, 0x31, 0x2e, 0x78, 0x78, 0x78, 0x78, 0x29, 0x29, 0x3b, 0x0a, 0x20, 0x20, 0x69, 0x66, // r_1.xxxx));. if
|
||||
0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x32, 0x2e, 0x77, 0x20, 0x3c, 0x20, // ((tmpvar_2.w <
|
||||
0x28, 0x68, 0x61, 0x6c, 0x66, 0x29, 0x30, 0x2e, 0x30, 0x30, 0x33, 0x39, 0x32, 0x31, 0x35, 0x36, // (half)0.00392156
|
||||
0x39, 0x29, 0x29, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x20, 0x20, 0x64, 0x69, 0x73, 0x63, 0x61, 0x72, // 9)) {. discar
|
||||
0x64, 0x5f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, // d_fragment();.
|
||||
0x64, 0x5f, 0x66, 0x72, 0x61, 0x67, 0x6d, 0x65, 0x6e, 0x74, 0x28, 0x29, 0x3b, 0x0a, 0x20, 0x20, // d_fragment();.
|
||||
0x7d, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x46, // };. _mtl_o.gl_F
|
||||
0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // ragColor = tmpva
|
||||
0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, // r_1;. return _m
|
||||
0x72, 0x5f, 0x32, 0x3b, 0x0a, 0x20, 0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, // r_2;. return _m
|
||||
0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00, // tl_o;.}...
|
||||
};
|
||||
|
||||
|
8
3rdparty/bgfx/src/glcontext_eagl.h
vendored
8
3rdparty/bgfx/src/glcontext_eagl.h
vendored
@ -15,7 +15,11 @@ namespace bgfx { namespace gl
|
||||
struct GlContext
|
||||
{
|
||||
GlContext()
|
||||
: m_context(0)
|
||||
: m_current(0)
|
||||
, m_context(0)
|
||||
, m_fbo(0)
|
||||
, m_colorRbo(0)
|
||||
, m_depthStencilRbo(0)
|
||||
{
|
||||
}
|
||||
|
||||
@ -41,7 +45,7 @@ namespace bgfx { namespace gl
|
||||
return 0 != m_context;
|
||||
}
|
||||
|
||||
void* m_view;
|
||||
SwapChainGL* m_current;
|
||||
void* m_context;
|
||||
|
||||
GLuint m_fbo;
|
||||
|
184
3rdparty/bgfx/src/glcontext_eagl.mm
vendored
184
3rdparty/bgfx/src/glcontext_eagl.mm
vendored
@ -17,6 +17,140 @@ namespace bgfx { namespace gl
|
||||
|
||||
static void* s_opengles = NULL;
|
||||
|
||||
struct SwapChainGL
|
||||
{
|
||||
SwapChainGL(EAGLContext *_context, CAEAGLLayer *_layer)
|
||||
: m_context(_context)
|
||||
, m_fbo(0)
|
||||
, m_colorRbo(0)
|
||||
, m_depthStencilRbo(0)
|
||||
{
|
||||
_layer.contentsScale = [UIScreen mainScreen].scale;
|
||||
|
||||
_layer.opaque = true;
|
||||
|
||||
_layer.drawableProperties = [NSDictionary dictionaryWithObjectsAndKeys
|
||||
: [NSNumber numberWithBool:false]
|
||||
, kEAGLDrawablePropertyRetainedBacking
|
||||
, kEAGLColorFormatRGBA8
|
||||
, kEAGLDrawablePropertyColorFormat
|
||||
, nil];
|
||||
|
||||
[EAGLContext setCurrentContext:_context];
|
||||
|
||||
GL_CHECK(glGenFramebuffers(1, &m_fbo) );
|
||||
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_fbo) );
|
||||
|
||||
GL_CHECK(glGenRenderbuffers(1, &m_colorRbo) );
|
||||
GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, m_colorRbo) );
|
||||
|
||||
[_context renderbufferStorage:GL_RENDERBUFFER fromDrawable:_layer];
|
||||
GL_CHECK(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, m_colorRbo) );
|
||||
|
||||
GLint width;
|
||||
GLint height;
|
||||
GL_CHECK(glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_WIDTH, &width) );
|
||||
GL_CHECK(glGetRenderbufferParameteriv(GL_RENDERBUFFER, GL_RENDERBUFFER_HEIGHT, &height) );
|
||||
BX_TRACE("Screen size: %d x %d", width, height);
|
||||
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
m_layer = _layer;
|
||||
|
||||
createFrameBuffers(m_width, m_height);
|
||||
}
|
||||
|
||||
~SwapChainGL()
|
||||
{
|
||||
destroyFrameBuffers();
|
||||
}
|
||||
|
||||
void destroyFrameBuffers()
|
||||
{
|
||||
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, 0) );
|
||||
GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, 0) );
|
||||
GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, 0) );
|
||||
if (0 != m_fbo)
|
||||
{
|
||||
GL_CHECK(glDeleteFramebuffers(1, &m_fbo) );
|
||||
m_fbo = 0;
|
||||
}
|
||||
|
||||
if (0 != m_colorRbo)
|
||||
{
|
||||
GL_CHECK(glDeleteRenderbuffers(1, &m_colorRbo) );
|
||||
m_colorRbo = 0;
|
||||
}
|
||||
|
||||
if (0 != m_depthStencilRbo)
|
||||
{
|
||||
GL_CHECK(glDeleteRenderbuffers(1, &m_depthStencilRbo) );
|
||||
m_depthStencilRbo = 0;
|
||||
}
|
||||
}
|
||||
|
||||
void createFrameBuffers(GLint _width, GLint _height)
|
||||
{
|
||||
GL_CHECK(glGenRenderbuffers(1, &m_depthStencilRbo) );
|
||||
GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, m_depthStencilRbo) );
|
||||
GL_CHECK(glRenderbufferStorage(GL_RENDERBUFFER, GL_DEPTH24_STENCIL8_OES, _width, _height) ); // from OES_packed_depth_stencil
|
||||
GL_CHECK(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, m_depthStencilRbo) );
|
||||
GL_CHECK(glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_STENCIL_ATTACHMENT, GL_RENDERBUFFER, m_depthStencilRbo) );
|
||||
|
||||
BX_CHECK(GL_FRAMEBUFFER_COMPLETE == glCheckFramebufferStatus(GL_FRAMEBUFFER)
|
||||
, "glCheckFramebufferStatus failed 0x%08x"
|
||||
, glCheckFramebufferStatus(GL_FRAMEBUFFER)
|
||||
);
|
||||
|
||||
makeCurrent();
|
||||
GL_CHECK(glClearColor(0.0f, 0.0f, 0.0f, 0.0f) );
|
||||
GL_CHECK(glClear(GL_COLOR_BUFFER_BIT) );
|
||||
swapBuffers();
|
||||
GL_CHECK(glClear(GL_COLOR_BUFFER_BIT) );
|
||||
swapBuffers();
|
||||
}
|
||||
|
||||
void makeCurrent()
|
||||
{
|
||||
[EAGLContext setCurrentContext:m_context];
|
||||
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_fbo) );
|
||||
|
||||
GLint newWidth = m_layer.bounds.size.width*[UIScreen mainScreen].scale;
|
||||
GLint newHeight = m_layer.bounds.size.height*[UIScreen mainScreen].scale;
|
||||
resize(newWidth, newHeight);
|
||||
}
|
||||
|
||||
void resize(GLint _width, GLint _height)
|
||||
{
|
||||
if(m_width == _width && m_height == _height)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
destroyFrameBuffers();
|
||||
|
||||
m_width = _width;
|
||||
m_height = _height;
|
||||
|
||||
createFrameBuffers(m_width, m_height);
|
||||
}
|
||||
|
||||
void swapBuffers()
|
||||
{
|
||||
GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, m_colorRbo) );
|
||||
[m_context presentRenderbuffer:GL_RENDERBUFFER];
|
||||
}
|
||||
|
||||
EAGLContext* m_context;
|
||||
|
||||
CAEAGLLayer *m_layer;
|
||||
GLuint m_fbo;
|
||||
GLuint m_colorRbo;
|
||||
GLuint m_depthStencilRbo;
|
||||
GLint m_width;
|
||||
GLint m_height;
|
||||
};
|
||||
|
||||
void GlContext::create(uint32_t _width, uint32_t _height)
|
||||
{
|
||||
s_opengles = bx::dlopen("/System/Library/Frameworks/OpenGLES.framework/OpenGLES");
|
||||
@ -65,6 +199,13 @@ namespace bgfx { namespace gl
|
||||
, glCheckFramebufferStatus(GL_FRAMEBUFFER)
|
||||
);
|
||||
|
||||
makeCurrent();
|
||||
GL_CHECK(glClearColor(0.0f, 0.0f, 0.0f, 0.0f) );
|
||||
GL_CHECK(glClear(GL_COLOR_BUFFER_BIT) );
|
||||
swap(NULL);
|
||||
GL_CHECK(glClear(GL_COLOR_BUFFER_BIT) );
|
||||
swap(NULL);
|
||||
|
||||
import();
|
||||
|
||||
g_internalData.context = m_context;
|
||||
@ -148,30 +289,51 @@ namespace bgfx { namespace gl
|
||||
|
||||
uint64_t GlContext::getCaps() const
|
||||
{
|
||||
return 0;
|
||||
return BGFX_CAPS_SWAP_CHAIN;
|
||||
}
|
||||
|
||||
SwapChainGL* GlContext::createSwapChain(void* /*_nwh*/)
|
||||
SwapChainGL* GlContext::createSwapChain(void* _nwh)
|
||||
{
|
||||
BX_CHECK(false, "Shouldn't be called!");
|
||||
return NULL;
|
||||
return BX_NEW(g_allocator, SwapChainGL)(/*m_display, m_config,*/ (EAGLContext*)m_context, (CAEAGLLayer*)_nwh);
|
||||
}
|
||||
|
||||
void GlContext::destroySwapChain(SwapChainGL* /*_swapChain*/)
|
||||
void GlContext::destroySwapChain(SwapChainGL* _swapChain)
|
||||
{
|
||||
BX_CHECK(false, "Shouldn't be called!");
|
||||
BX_DELETE(g_allocator, _swapChain);
|
||||
}
|
||||
|
||||
void GlContext::swap(SwapChainGL* _swapChain)
|
||||
{
|
||||
BX_CHECK(NULL == _swapChain, "Shouldn't be called!"); BX_UNUSED(_swapChain);
|
||||
GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, m_colorRbo) );
|
||||
EAGLContext* context = (EAGLContext*)m_context;
|
||||
[context presentRenderbuffer:GL_RENDERBUFFER];
|
||||
makeCurrent(_swapChain);
|
||||
|
||||
if (NULL == _swapChain)
|
||||
{
|
||||
GL_CHECK(glBindRenderbuffer(GL_RENDERBUFFER, m_colorRbo) );
|
||||
EAGLContext* context = (EAGLContext*)m_context;
|
||||
[context presentRenderbuffer:GL_RENDERBUFFER];
|
||||
}
|
||||
else
|
||||
{
|
||||
_swapChain->swapBuffers();
|
||||
}
|
||||
}
|
||||
|
||||
void GlContext::makeCurrent(SwapChainGL* /*_swapChain*/)
|
||||
void GlContext::makeCurrent(SwapChainGL* _swapChain)
|
||||
{
|
||||
if (m_current != _swapChain)
|
||||
{
|
||||
m_current = _swapChain;
|
||||
|
||||
if (NULL == _swapChain)
|
||||
{
|
||||
[EAGLContext setCurrentContext:(EAGLContext*)m_context];
|
||||
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, m_fbo) );
|
||||
}
|
||||
else
|
||||
{
|
||||
_swapChain->makeCurrent();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GlContext::import()
|
||||
|
7
3rdparty/bgfx/src/glcontext_nsgl.h
vendored
7
3rdparty/bgfx/src/glcontext_nsgl.h
vendored
@ -15,7 +15,8 @@ namespace bgfx { namespace gl
|
||||
struct GlContext
|
||||
{
|
||||
GlContext()
|
||||
: m_context(0)
|
||||
: m_context(NULL)
|
||||
, m_view(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
@ -33,11 +34,11 @@ namespace bgfx { namespace gl
|
||||
|
||||
bool isValid() const
|
||||
{
|
||||
return 0 != m_context;
|
||||
return NULL != m_context;
|
||||
}
|
||||
|
||||
void* m_view;
|
||||
void* m_context;
|
||||
void* m_view;
|
||||
};
|
||||
} /* namespace gl */ } // namespace bgfx
|
||||
|
||||
|
4
3rdparty/bgfx/src/glcontext_nsgl.mm
vendored
4
3rdparty/bgfx/src/glcontext_nsgl.mm
vendored
@ -127,8 +127,8 @@ namespace bgfx { namespace gl
|
||||
[glView release];
|
||||
}
|
||||
|
||||
m_view = 0;
|
||||
m_context = 0;
|
||||
m_view = NULL;
|
||||
m_context = NULL;
|
||||
bx::dlclose(s_opengl);
|
||||
}
|
||||
|
||||
|
12
3rdparty/bgfx/src/glimports.h
vendored
12
3rdparty/bgfx/src/glimports.h
vendored
@ -333,9 +333,9 @@ GL_IMPORT______(true, PFNGLGETQUERYOBJECTUI64VPROC, glGetQueryObj
|
||||
GL_IMPORT______(false, PFNGLGETSHADERIVPROC, glGetShaderiv);
|
||||
GL_IMPORT______(false, PFNGLGETSHADERINFOLOGPROC, glGetShaderInfoLog);
|
||||
GL_IMPORT______(false, PFNGLGETSTRINGPROC, glGetString);
|
||||
GL_IMPORT______(true, PFNGLGETSTRINGIPROC, glGetStringi);
|
||||
GL_IMPORT______(false, PFNGLGETUNIFORMLOCATIONPROC, glGetUniformLocation);
|
||||
#if BGFX_CONFIG_RENDERER_OPENGL || !(BGFX_CONFIG_RENDERER_OPENGLES < 30)
|
||||
GL_IMPORT______(true, PFNGLGETSTRINGIPROC, glGetStringi);
|
||||
GL_IMPORT______(true, PFNGLINVALIDATEFRAMEBUFFERPROC, glInvalidateFramebuffer);
|
||||
#endif // !(BGFX_CONFIG_RENDERER_OPENGLES < 30)
|
||||
GL_IMPORT______(false, PFNGLLINKPROGRAMPROC, glLinkProgram);
|
||||
@ -469,7 +469,7 @@ GL_IMPORT_KHR__(true, PFNGLGETDEBUGMESSAGELOGPROC, glGetDebugMes
|
||||
GL_IMPORT_____x(true, PFNGLGETCOMPRESSEDTEXIMAGEPROC, glGetCompressedTexImage);
|
||||
GL_IMPORT_____x(true, PFNGLGETTEXIMAGEPROC, glGetTexImage);
|
||||
|
||||
# if BGFX_CONFIG_RENDERER_OPENGLES < 30
|
||||
# if BGFX_CONFIG_RENDERER_OPENGLES && BGFX_CONFIG_RENDERER_OPENGLES < 30
|
||||
GL_IMPORT______(true, PFNGLGETSTRINGIPROC, glGetStringi);
|
||||
|
||||
GL_IMPORT_OES__(true, PFNGLTEXIMAGE3DPROC, glTexImage3D);
|
||||
@ -493,9 +493,15 @@ GL_IMPORT_EXT__(true, PFNGLMULTIDRAWELEMENTSINDIRECTPROC, glMultiDrawEl
|
||||
GL_IMPORT_OES__(true, PFNGLGETPROGRAMBINARYPROC, glGetProgramBinary);
|
||||
GL_IMPORT_OES__(true, PFNGLPROGRAMBINARYPROC, glProgramBinary);
|
||||
|
||||
#if BX_PLATFORM_IOS
|
||||
GL_IMPORT_EXT__(true, PFNGLVERTEXATTRIBDIVISORPROC, glVertexAttribDivisor);
|
||||
GL_IMPORT_EXT__(true, PFNGLDRAWARRAYSINSTANCEDPROC, glDrawArraysInstanced);
|
||||
GL_IMPORT_EXT__(true, PFNGLDRAWELEMENTSINSTANCEDPROC, glDrawElementsInstanced);
|
||||
#else
|
||||
GL_IMPORT_OES__(true, PFNGLVERTEXATTRIBDIVISORPROC, glVertexAttribDivisor);
|
||||
GL_IMPORT_OES__(true, PFNGLDRAWARRAYSINSTANCEDPROC, glDrawArraysInstanced);
|
||||
GL_IMPORT_OES__(true, PFNGLDRAWELEMENTSINSTANCEDPROC, glDrawElementsInstanced);
|
||||
#endif // BX_PLATFORM_IOS
|
||||
|
||||
GL_IMPORT_OES__(true, PFNGLBINDVERTEXARRAYPROC, glBindVertexArray);
|
||||
GL_IMPORT_OES__(true, PFNGLDELETEVERTEXARRAYSPROC, glDeleteVertexArrays);
|
||||
@ -613,7 +619,7 @@ GL_IMPORT______(true, PFNGLMULTIDRAWELEMENTSINDIRECTPROC, glMultiDrawEl
|
||||
|
||||
GL_IMPORT______(true, PFNGLINVALIDATEFRAMEBUFFERPROC, glInvalidateFramebuffer);
|
||||
|
||||
# endif // BGFX_CONFIG_RENDERER_OPENGLES < 30
|
||||
# endif // BGFX_CONFIG_RENDERER_OPENGLES && BGFX_CONFIG_RENDERER_OPENGLES < 30
|
||||
#endif // !BGFX_CONFIG_RENDERER_OPENGL
|
||||
|
||||
#undef GL_IMPORT_TYPEDEFS
|
||||
|
10
3rdparty/bgfx/src/image.cpp
vendored
10
3rdparty/bgfx/src/image.cpp
vendored
@ -2364,6 +2364,16 @@ namespace bgfx
|
||||
|
||||
const Memory* imageAlloc(ImageContainer& _imageContainer, TextureFormat::Enum _format, uint16_t _width, uint16_t _height, uint16_t _depth, bool _cubeMap, bool _generateMips)
|
||||
{
|
||||
const ImageBlockInfo& blockInfo = getBlockInfo(_format);
|
||||
const uint16_t blockWidth = blockInfo.blockWidth;
|
||||
const uint16_t blockHeight = blockInfo.blockHeight;
|
||||
const uint16_t minBlockX = blockInfo.minBlockX;
|
||||
const uint16_t minBlockY = blockInfo.minBlockY;
|
||||
|
||||
_width = bx::uint16_max(blockWidth * minBlockX, ( (_width + blockWidth - 1) / blockWidth)*blockWidth);
|
||||
_height = bx::uint16_max(blockHeight * minBlockY, ( (_height + blockHeight - 1) / blockHeight)*blockHeight);
|
||||
_depth = bx::uint16_max(1, _depth);
|
||||
|
||||
const uint8_t numMips = _generateMips ? imageGetNumMips(_format, _width, _height) : 1;
|
||||
uint32_t size = imageGetSize(_format, _width, _height, 0, false, numMips);
|
||||
const Memory* image = alloc(size);
|
||||
|
74
3rdparty/bgfx/src/makefile
vendored
74
3rdparty/bgfx/src/makefile
vendored
@ -3,7 +3,75 @@
|
||||
# License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||
#
|
||||
|
||||
include ../scripts/shader-embeded.mk
|
||||
THISDIR:=$(dir $(lastword $(MAKEFILE_LIST)))
|
||||
include $(THISDIR)/../scripts/tools.mk
|
||||
|
||||
rebuild:
|
||||
@make -s --no-print-directory clean all
|
||||
SHADER_TMP = $(TEMP)/tmp
|
||||
|
||||
BIN = vs_debugfont.bin.h \
|
||||
fs_debugfont.bin.h \
|
||||
vs_clear.bin.h \
|
||||
fs_clear0.bin.h \
|
||||
fs_clear1.bin.h \
|
||||
fs_clear2.bin.h \
|
||||
fs_clear3.bin.h \
|
||||
fs_clear4.bin.h \
|
||||
fs_clear5.bin.h \
|
||||
fs_clear6.bin.h \
|
||||
fs_clear7.bin.h \
|
||||
|
||||
.PHONY: all
|
||||
all: $(BIN)
|
||||
|
||||
define shader-embedded
|
||||
@echo [$(<)]
|
||||
$(SILENT) $(SHADERC) --type $(1) --platform linux -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_glsl
|
||||
@cat $(SHADER_TMP) > $(@)
|
||||
-$(SILENT) $(SHADERC) --type $(1) --platform windows -p $(2) -O 3 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_dx9
|
||||
-@cat $(SHADER_TMP) >> $(@)
|
||||
-$(SILENT) $(SHADERC) --type $(1) --platform windows -p $(3) -O 3 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_dx11
|
||||
-@cat $(SHADER_TMP) >> $(@)
|
||||
-$(SILENT) $(SHADERC) --type $(1) --platform ios -p metal -O 3 -f $(<) -o $(SHADER_TMP) --bin2c $(basename $(<))_mtl
|
||||
-@cat $(SHADER_TMP) >> $(@)
|
||||
endef
|
||||
|
||||
vs_debugfont.bin.h : vs_debugfont.sc
|
||||
$(call shader-embedded, v, vs_3_0, vs_4_0_level_9_1)
|
||||
|
||||
fs_debugfont.bin.h : fs_debugfont.sc
|
||||
$(call shader-embedded, f, ps_3_0, ps_4_0_level_9_1)
|
||||
|
||||
vs_clear.bin.h : vs_clear.sc
|
||||
$(call shader-embedded, v, vs_3_0, vs_4_0_level_9_1)
|
||||
|
||||
fs_clear0.bin.h : fs_clear0.sc
|
||||
$(call shader-embedded, f, ps_3_0, ps_4_0_level_9_1)
|
||||
|
||||
fs_clear1.bin.h : fs_clear1.sc
|
||||
$(call shader-embedded, f, ps_3_0, ps_4_0_level_9_1)
|
||||
|
||||
fs_clear2.bin.h : fs_clear2.sc
|
||||
$(call shader-embedded, f, ps_3_0, ps_4_0_level_9_1)
|
||||
|
||||
fs_clear3.bin.h : fs_clear3.sc
|
||||
$(call shader-embedded, f, ps_3_0, ps_4_0_level_9_1)
|
||||
|
||||
fs_clear4.bin.h : fs_clear4.sc
|
||||
$(call shader-embedded, f, ps_3_0, ps_4_0)
|
||||
|
||||
fs_clear5.bin.h : fs_clear5.sc
|
||||
$(call shader-embedded, f, ps_3_0, ps_4_0)
|
||||
|
||||
fs_clear6.bin.h : fs_clear6.sc
|
||||
$(call shader-embedded, f, ps_3_0, ps_4_0)
|
||||
|
||||
fs_clear7.bin.h : fs_clear7.sc
|
||||
$(call shader-embedded, f, ps_3_0, ps_4_0)
|
||||
|
||||
.PHONY: clean
|
||||
clean:
|
||||
@echo Cleaning...
|
||||
@-rm -vf $(BIN)
|
||||
|
||||
.PHONY: rebuild
|
||||
rebuild: clean all
|
||||
|
246
3rdparty/bgfx/src/renderer_d3d11.cpp
vendored
246
3rdparty/bgfx/src/renderer_d3d11.cpp
vendored
@ -412,6 +412,9 @@ namespace bgfx { namespace d3d11
|
||||
static const GUID IID_IDXGIDevice1 = { 0x77db970f, 0x6276, 0x48ba, { 0xba, 0x28, 0x07, 0x01, 0x43, 0xb4, 0x39, 0x2c } };
|
||||
static const GUID IID_IDXGIDevice2 = { 0x05008617, 0xfbfd, 0x4051, { 0xa7, 0x90, 0x14, 0x48, 0x84, 0xb4, 0xf6, 0xa9 } };
|
||||
static const GUID IID_IDXGIDevice3 = { 0x6007896c, 0x3244, 0x4afd, { 0xbf, 0x18, 0xa6, 0xd3, 0xbe, 0xda, 0x50, 0x23 } };
|
||||
static const GUID IID_ID3D11Device1 = { 0xa04bfb29, 0x08ef, 0x43d6, { 0xa4, 0x9c, 0xa9, 0xbd, 0xbd, 0xcb, 0xe6, 0x86 } };
|
||||
static const GUID IID_ID3D11Device2 = { 0x9d06dffa, 0xd1e5, 0x4d07, { 0x83, 0xa8, 0x1b, 0xb1, 0x23, 0xf2, 0xf8, 0x41 } };
|
||||
static const GUID IID_ID3D11Device3 = { 0xa05c8c37, 0xd2c6, 0x4732, { 0xb3, 0xa0, 0x9c, 0xe0, 0xb0, 0xdc, 0x9a, 0xe6 } };
|
||||
static const GUID IID_IDXGIAdapter = { 0x2411e7e1, 0x12ac, 0x4ccf, { 0xbd, 0x14, 0x97, 0x98, 0xe8, 0x53, 0x4d, 0xc0 } };
|
||||
static const GUID IID_ID3D11InfoQueue = { 0x6543dbb6, 0x1b48, 0x42f5, { 0xab, 0x82, 0xe9, 0x7e, 0xc7, 0x43, 0x26, 0xf6 } };
|
||||
static const GUID IID_IDXGIDeviceRenderDoc = { 0xa7aa6116, 0x9c8d, 0x4bba, { 0x90, 0x83, 0xb4, 0xd8, 0x16, 0xb7, 0x1b, 0x78 } };
|
||||
@ -422,7 +425,14 @@ namespace bgfx { namespace d3d11
|
||||
D3D11_FORMAT_SUPPORT2_UAV_TYPED_STORE = 0x80,
|
||||
};
|
||||
|
||||
static const GUID s_deviceIIDs[] =
|
||||
static const GUID s_d3dDeviceIIDs[] =
|
||||
{
|
||||
IID_ID3D11Device3,
|
||||
IID_ID3D11Device2,
|
||||
IID_ID3D11Device1,
|
||||
};
|
||||
|
||||
static const GUID s_dxgiDeviceIIDs[] =
|
||||
{
|
||||
IID_IDXGIDevice3,
|
||||
IID_IDXGIDevice2,
|
||||
@ -493,6 +503,31 @@ namespace bgfx { namespace d3d11
|
||||
return false;
|
||||
};
|
||||
|
||||
void resume(ID3D11Device* _device)
|
||||
{
|
||||
BX_UNUSED(_device);
|
||||
}
|
||||
|
||||
void suspend(ID3D11Device* _device)
|
||||
{
|
||||
BX_UNUSED(_device);
|
||||
}
|
||||
|
||||
void trim(ID3D11Device* _device)
|
||||
{
|
||||
#if BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT
|
||||
IDXGIDevice3* device;
|
||||
HRESULT hr = _device->QueryInterface(IID_IDXGIDevice3, (void**)&device);
|
||||
if (SUCCEEDED(hr) )
|
||||
{
|
||||
device->Trim();
|
||||
DX_RELEASE(device, 1);
|
||||
}
|
||||
#else
|
||||
BX_UNUSED(_device);
|
||||
#endif // BX_PLATFORM_WINDOWS || BX_PLATFORM_WINRT
|
||||
}
|
||||
|
||||
// Reference:
|
||||
// https://github.com/GPUOpen-LibrariesAndSDKs/AGS_SDK
|
||||
enum AGS_RETURN_CODE
|
||||
@ -722,10 +757,10 @@ namespace bgfx { namespace d3d11
|
||||
|
||||
#if USE_D3D11_DYNAMIC_LIB
|
||||
m_d3d11dll = bx::dlopen("d3d11.dll");
|
||||
BX_WARN(NULL != m_d3d11dll, "Failed to load d3d11.dll.");
|
||||
|
||||
if (NULL == m_d3d11dll)
|
||||
{
|
||||
BX_TRACE("Failed to load d3d11.dll.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -752,25 +787,25 @@ namespace bgfx { namespace d3d11
|
||||
}
|
||||
|
||||
D3D11CreateDevice = (PFN_D3D11_CREATE_DEVICE)bx::dlsym(m_d3d11dll, "D3D11CreateDevice");
|
||||
BX_WARN(NULL != D3D11CreateDevice, "Function D3D11CreateDevice not found.");
|
||||
if (NULL == D3D11CreateDevice)
|
||||
{
|
||||
BX_TRACE("Function D3D11CreateDevice not found.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
m_dxgidll = bx::dlopen("dxgi.dll");
|
||||
BX_WARN(NULL != m_dxgidll, "Failed to load dxgi.dll.");
|
||||
if (NULL == m_dxgidll)
|
||||
{
|
||||
BX_TRACE("Failed to load dxgi.dll.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
errorState = ErrorState::LoadedDXGI;
|
||||
|
||||
CreateDXGIFactory = (PFN_CREATE_DXGI_FACTORY)bx::dlsym(m_dxgidll, "CreateDXGIFactory");
|
||||
BX_WARN(NULL != CreateDXGIFactory, "Function CreateDXGIFactory not found.");
|
||||
if (NULL == CreateDXGIFactory)
|
||||
{
|
||||
BX_TRACE("Function CreateDXGIFactory not found.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -803,9 +838,9 @@ namespace bgfx { namespace d3d11
|
||||
hr = S_OK;
|
||||
factory = NULL;
|
||||
#endif // BX_PLATFORM_*
|
||||
BX_WARN(SUCCEEDED(hr), "Unable to create DXGI factory.");
|
||||
if (FAILED(hr) )
|
||||
{
|
||||
BX_TRACE("Unable to create DXGI factory.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -881,13 +916,16 @@ namespace bgfx { namespace d3d11
|
||||
|
||||
D3D_FEATURE_LEVEL featureLevel[] =
|
||||
{
|
||||
D3D_FEATURE_LEVEL_12_1,
|
||||
D3D_FEATURE_LEVEL_12_0,
|
||||
D3D_FEATURE_LEVEL_11_1,
|
||||
D3D_FEATURE_LEVEL_11_0,
|
||||
D3D_FEATURE_LEVEL_10_1,
|
||||
D3D_FEATURE_LEVEL_10_0,
|
||||
#if BX_PLATFORM_WINRT
|
||||
D3D_FEATURE_LEVEL_9_3,
|
||||
D3D_FEATURE_LEVEL_9_2,
|
||||
D3D_FEATURE_LEVEL_9_1,
|
||||
#endif // BX_PLATFORM_WINRT
|
||||
};
|
||||
|
||||
for (;;)
|
||||
@ -941,10 +979,10 @@ namespace bgfx { namespace d3d11
|
||||
|
||||
break;
|
||||
}
|
||||
BX_WARN(SUCCEEDED(hr), "Unable to create Direct3D11 device.");
|
||||
|
||||
if (FAILED(hr) )
|
||||
{
|
||||
BX_TRACE("Unable to create Direct3D11 device.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -956,22 +994,35 @@ namespace bgfx { namespace d3d11
|
||||
else
|
||||
{
|
||||
m_device->GetImmediateContext(&m_deviceCtx);
|
||||
BX_WARN(NULL != m_deviceCtx, "Unable to create Direct3D11 device.");
|
||||
|
||||
if (NULL == m_deviceCtx)
|
||||
{
|
||||
BX_TRACE("Unable to create Direct3D11 device.");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
{
|
||||
IDXGIDevice* device = NULL;
|
||||
m_deviceInterfaceVersion = 0;
|
||||
for (uint32_t ii = 0; ii < BX_COUNTOF(s_d3dDeviceIIDs); ++ii)
|
||||
{
|
||||
ID3D11Device* device;
|
||||
hr = m_device->QueryInterface(s_d3dDeviceIIDs[ii], (void**)&device);
|
||||
if (SUCCEEDED(hr) )
|
||||
{
|
||||
device->Release(); // BK - ignore ref count.
|
||||
m_deviceInterfaceVersion = BX_COUNTOF(s_d3dDeviceIIDs)-ii;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
IDXGIDevice* device = NULL;
|
||||
IDXGIAdapter* adapter = NULL;
|
||||
hr = E_FAIL;
|
||||
for (uint32_t ii = 0; ii < BX_COUNTOF(s_deviceIIDs) && FAILED(hr); ++ii)
|
||||
for (uint32_t ii = 0; ii < BX_COUNTOF(s_dxgiDeviceIIDs) && FAILED(hr); ++ii)
|
||||
{
|
||||
hr = m_device->QueryInterface(s_deviceIIDs[ii], (void**)&device);
|
||||
BX_TRACE("D3D device 11.%d, hr %x", BX_COUNTOF(s_deviceIIDs)-1-ii, hr);
|
||||
hr = m_device->QueryInterface(s_dxgiDeviceIIDs[ii], (void**)&device);
|
||||
BX_TRACE("DXGI device 11.%d, hr %x", BX_COUNTOF(s_dxgiDeviceIIDs)-1-ii, hr);
|
||||
|
||||
if (SUCCEEDED(hr) )
|
||||
{
|
||||
@ -985,7 +1036,7 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4530) // warning C4530: C++ exception handler
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
BX_TRACE("Failed to get adapter foro IID_IDXGIDevice%d.", BX_COUNTOF(s_deviceIIDs)-1-ii);
|
||||
BX_TRACE("Failed to get adapter foro IID_IDXGIDevice%d.", BX_COUNTOF(s_dxgiDeviceIIDs)-1-ii);
|
||||
DX_RELEASE(device, 0);
|
||||
hr = E_FAIL;
|
||||
}
|
||||
@ -996,9 +1047,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
}
|
||||
}
|
||||
|
||||
BX_WARN(SUCCEEDED(hr), "Unable to create Direct3D11 device.");
|
||||
if (FAILED(hr) )
|
||||
{
|
||||
BX_TRACE("Unable to create Direct3D11 device.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -1021,9 +1072,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
}
|
||||
|
||||
hr = adapter->GetDesc(&m_adapterDesc);
|
||||
BX_WARN(SUCCEEDED(hr), "Unable to create Direct3D11 device.");
|
||||
if (FAILED(hr) )
|
||||
{
|
||||
BX_TRACE("Unable to create Direct3D11 device.");
|
||||
DX_RELEASE(adapter, 2);
|
||||
goto error;
|
||||
}
|
||||
@ -1038,10 +1089,10 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
{
|
||||
#if !BX_PLATFORM_WINDOWS
|
||||
hr = adapter->GetParent(__uuidof(IDXGIFactory2), (void**)&m_factory);
|
||||
BX_WARN(SUCCEEDED(hr), "Unable to create Direct3D11 device.");
|
||||
DX_RELEASE(adapter, 2);
|
||||
if (FAILED(hr) )
|
||||
{
|
||||
BX_TRACE("Unable to create Direct3D11 device.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -1098,10 +1149,10 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
}
|
||||
#else
|
||||
hr = adapter->GetParent(IID_IDXGIFactory, (void**)&m_factory);
|
||||
BX_WARN(SUCCEEDED(hr), "Unable to create Direct3D11 device.");
|
||||
DX_RELEASE(adapter, 2);
|
||||
if (FAILED(hr) )
|
||||
{
|
||||
BX_TRACE("Unable to create Direct3D11 device.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -1128,9 +1179,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
| DXGI_MWA_NO_ALT_ENTER
|
||||
) );
|
||||
#endif // BX_PLATFORM_*
|
||||
BX_WARN(SUCCEEDED(hr), "Failed to create swap chain.");
|
||||
if (FAILED(hr) )
|
||||
{
|
||||
BX_TRACE("Failed to create swap chain.");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
@ -1191,10 +1242,12 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
| BGFX_CAPS_DRAW_INDIRECT
|
||||
| BGFX_CAPS_TEXTURE_BLIT
|
||||
| BGFX_CAPS_TEXTURE_READ_BACK
|
||||
| BGFX_CAPS_OCCLUSION_QUERY
|
||||
| ( (m_featureLevel >= D3D_FEATURE_LEVEL_9_2) ? BGFX_CAPS_OCCLUSION_QUERY : 0)
|
||||
| BGFX_CAPS_ALPHA_TO_COVERAGE
|
||||
| ( (m_deviceInterfaceVersion >= 3) ? BGFX_CAPS_CONSERVATIVE_RASTER : 0)
|
||||
);
|
||||
|
||||
m_timerQuerySupport = m_featureLevel >= D3D_FEATURE_LEVEL_9_3;
|
||||
m_timerQuerySupport = m_featureLevel >= D3D_FEATURE_LEVEL_10_0;
|
||||
|
||||
if (m_featureLevel <= D3D_FEATURE_LEVEL_9_2)
|
||||
{
|
||||
@ -1497,8 +1550,8 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
DX_RELEASE(m_device, 0);
|
||||
DX_RELEASE(m_factory, 0);
|
||||
|
||||
case ErrorState::LoadedDXGI:
|
||||
#if USE_D3D11_DYNAMIC_LIB
|
||||
case ErrorState::LoadedDXGI:
|
||||
if (NULL != m_dxgidebugdll)
|
||||
{
|
||||
bx::dlclose(m_dxgidebugdll);
|
||||
@ -1513,15 +1566,14 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
||||
bx::dlclose(m_dxgidll);
|
||||
m_dxgidll = NULL;
|
||||
#endif // USE_D3D11_DYNAMIC_LIB
|
||||
|
||||
case ErrorState::LoadedD3D11:
|
||||
#if USE_D3D11_DYNAMIC_LIB
|
||||
bx::dlclose(m_d3d11dll);
|
||||
m_d3d11dll = NULL;
|
||||
#endif // USE_D3D11_DYNAMIC_LIB
|
||||
|
||||
case ErrorState::Default:
|
||||
default:
|
||||
if (NULL != m_ags)
|
||||
{
|
||||
agsDeInit(m_ags);
|
||||
@ -1757,7 +1809,6 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_flags = texture.m_flags;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
@ -1769,7 +1820,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
bx::write(&writer, tc);
|
||||
|
||||
texture.destroy();
|
||||
texture.create(mem, tc.m_flags, 0);
|
||||
texture.create(mem, texture.m_flags, 0);
|
||||
|
||||
release(mem);
|
||||
}
|
||||
@ -1844,9 +1895,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
||||
void saveScreenShot(const char* _filePath) BX_OVERRIDE
|
||||
{
|
||||
BX_WARN(NULL != m_swapChain, "Unable to capture screenshot %s.", _filePath);
|
||||
if (NULL == m_swapChain)
|
||||
{
|
||||
BX_TRACE("Unable to capture screenshot %s.", _filePath);
|
||||
return;
|
||||
}
|
||||
|
||||
@ -2206,9 +2257,30 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
}
|
||||
}
|
||||
|
||||
void updateResolution(const Resolution& _resolution)
|
||||
bool updateResolution(const Resolution& _resolution)
|
||||
{
|
||||
bool recenter = !!(_resolution.m_flags & BGFX_RESET_HMD_RECENTER);
|
||||
const bool suspended = !!( _resolution.m_flags & BGFX_RESET_SUSPEND);
|
||||
const bool wasSuspended = !!(m_resolution.m_flags & BGFX_RESET_SUSPEND);
|
||||
if (suspended && wasSuspended)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else if (suspended)
|
||||
{
|
||||
m_deviceCtx->Flush();
|
||||
m_deviceCtx->ClearState();
|
||||
trim(m_device);
|
||||
suspend(m_device);
|
||||
m_resolution.m_flags |= BGFX_RESET_SUSPEND;
|
||||
return true;
|
||||
}
|
||||
else if (wasSuspended)
|
||||
{
|
||||
resume(m_device);
|
||||
m_resolution.m_flags &= ~BGFX_RESET_SUSPEND;
|
||||
}
|
||||
|
||||
bool recenter = !!(_resolution.m_flags & BGFX_RESET_HMD_RECENTER);
|
||||
|
||||
uint32_t maxAnisotropy = 1;
|
||||
if (!!(_resolution.m_flags & BGFX_RESET_MAXANISOTROPY) )
|
||||
@ -2236,7 +2308,12 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
m_rasterizerStateCache.invalidate();
|
||||
}
|
||||
|
||||
uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY | BGFX_RESET_DEPTH_CLAMP);
|
||||
uint32_t flags = _resolution.m_flags & ~(0
|
||||
| BGFX_RESET_HMD_RECENTER
|
||||
| BGFX_RESET_MAXANISOTROPY
|
||||
| BGFX_RESET_DEPTH_CLAMP
|
||||
| BGFX_RESET_SUSPEND
|
||||
);
|
||||
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
@ -2259,6 +2336,9 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
||||
preReset();
|
||||
|
||||
m_deviceCtx->Flush();
|
||||
m_deviceCtx->ClearState();
|
||||
|
||||
if (NULL == m_swapChain)
|
||||
{
|
||||
// Updated backbuffer if it changed in PlatformData.
|
||||
@ -2267,9 +2347,6 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_deviceCtx->ClearState();
|
||||
m_deviceCtx->Flush();
|
||||
|
||||
if (resize)
|
||||
{
|
||||
m_deviceCtx->OMSetRenderTargets(1, s_zero.m_rtv, NULL);
|
||||
@ -2353,6 +2430,8 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
{
|
||||
m_ovr.recenter();
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void setShaderUniform(uint8_t _flags, uint32_t _regIndex, const void* _val, uint32_t _numRegs)
|
||||
@ -2553,7 +2632,7 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
if (NULL == bs)
|
||||
{
|
||||
D3D11_BLEND_DESC desc;
|
||||
memset(&desc, 0, sizeof(desc) );
|
||||
desc.AlphaToCoverageEnable = !!(BGFX_STATE_BLEND_ALPHA_TO_COVERAGE & _state);
|
||||
desc.IndependentBlendEnable = !!(BGFX_STATE_BLEND_INDEPENDENT & _state);
|
||||
|
||||
D3D11_RENDER_TARGET_BLEND_DESC* drt = &desc.RenderTarget[0];
|
||||
@ -2704,28 +2783,59 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
||||
void setRasterizerState(uint64_t _state, bool _wireframe = false, bool _scissor = false)
|
||||
{
|
||||
_state &= BGFX_STATE_CULL_MASK|BGFX_STATE_MSAA;
|
||||
_state &= 0
|
||||
| BGFX_STATE_CULL_MASK
|
||||
| BGFX_STATE_MSAA
|
||||
| BGFX_STATE_LINEAA
|
||||
| BGFX_STATE_CONSERVATIVE_RASTER
|
||||
;
|
||||
_state |= _wireframe ? BGFX_STATE_PT_LINES : BGFX_STATE_NONE;
|
||||
_state |= _scissor ? BGFX_STATE_RESERVED_MASK : 0;
|
||||
_state &= ~(m_deviceInterfaceVersion >= 3 ? 0 : BGFX_STATE_CONSERVATIVE_RASTER);
|
||||
|
||||
ID3D11RasterizerState* rs = m_rasterizerStateCache.find(_state);
|
||||
if (NULL == rs)
|
||||
{
|
||||
uint32_t cull = (_state&BGFX_STATE_CULL_MASK)>>BGFX_STATE_CULL_SHIFT;
|
||||
|
||||
D3D11_RASTERIZER_DESC desc;
|
||||
desc.FillMode = _wireframe ? D3D11_FILL_WIREFRAME : D3D11_FILL_SOLID;
|
||||
desc.CullMode = s_cullMode[cull];
|
||||
desc.FrontCounterClockwise = false;
|
||||
desc.DepthBias = 0;
|
||||
desc.DepthBiasClamp = 0.0f;
|
||||
desc.SlopeScaledDepthBias = 0.0f;
|
||||
desc.DepthClipEnable = !m_depthClamp;
|
||||
desc.ScissorEnable = _scissor;
|
||||
desc.MultisampleEnable = !!(_state&BGFX_STATE_MSAA);
|
||||
desc.AntialiasedLineEnable = false;
|
||||
if (m_deviceInterfaceVersion >= 3)
|
||||
{
|
||||
D3D11_RASTERIZER_DESC2 desc;
|
||||
desc.FillMode = _wireframe ? D3D11_FILL_WIREFRAME : D3D11_FILL_SOLID;
|
||||
desc.CullMode = s_cullMode[cull];
|
||||
desc.FrontCounterClockwise = false;
|
||||
desc.DepthBias = 0;
|
||||
desc.DepthBiasClamp = 0.0f;
|
||||
desc.SlopeScaledDepthBias = 0.0f;
|
||||
desc.DepthClipEnable = !m_depthClamp;
|
||||
desc.ScissorEnable = _scissor;
|
||||
desc.MultisampleEnable = !!(_state&BGFX_STATE_MSAA);
|
||||
desc.AntialiasedLineEnable = !!(_state&BGFX_STATE_LINEAA);
|
||||
desc.ForcedSampleCount = 0;
|
||||
desc.ConservativeRaster = !!(_state&BGFX_STATE_CONSERVATIVE_RASTER)
|
||||
? D3D11_CONSERVATIVE_RASTERIZATION_MODE_ON
|
||||
: D3D11_CONSERVATIVE_RASTERIZATION_MODE_OFF
|
||||
;
|
||||
|
||||
DX_CHECK(m_device->CreateRasterizerState(&desc, &rs) );
|
||||
ID3D11Device3* device3 = reinterpret_cast<ID3D11Device3*>(m_device);
|
||||
DX_CHECK(device3->CreateRasterizerState2(&desc, reinterpret_cast<ID3D11RasterizerState2**>(&rs) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
D3D11_RASTERIZER_DESC desc;
|
||||
desc.FillMode = _wireframe ? D3D11_FILL_WIREFRAME : D3D11_FILL_SOLID;
|
||||
desc.CullMode = s_cullMode[cull];
|
||||
desc.FrontCounterClockwise = false;
|
||||
desc.DepthBias = 0;
|
||||
desc.DepthBiasClamp = 0.0f;
|
||||
desc.SlopeScaledDepthBias = 0.0f;
|
||||
desc.DepthClipEnable = !m_depthClamp;
|
||||
desc.ScissorEnable = _scissor;
|
||||
desc.MultisampleEnable = !!(_state&BGFX_STATE_MSAA);
|
||||
desc.AntialiasedLineEnable = !!(_state&BGFX_STATE_LINEAA);
|
||||
|
||||
DX_CHECK(m_device->CreateRasterizerState(&desc, &rs) );
|
||||
}
|
||||
|
||||
m_rasterizerStateCache.add(_state, rs);
|
||||
}
|
||||
@ -3391,6 +3501,8 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
TimerQueryD3D11 m_gpuTimer;
|
||||
OcclusionQueryD3D11 m_occlusionQuery;
|
||||
|
||||
uint32_t m_deviceInterfaceVersion;
|
||||
|
||||
ID3D11RenderTargetView* m_backBufferColor;
|
||||
ID3D11DepthStencilView* m_backBufferDepthStencil;
|
||||
ID3D11RenderTargetView* m_currentColor;
|
||||
@ -3471,25 +3583,6 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
s_renderD3D11 = NULL;
|
||||
}
|
||||
|
||||
void trim()
|
||||
{
|
||||
#if BX_PLATFORM_WINRT
|
||||
if (NULL != s_renderD3D11)
|
||||
{
|
||||
if (s_renderD3D11->m_device)
|
||||
{
|
||||
IDXGIDevice3* pDXGIDevice;
|
||||
HRESULT hr = s_renderD3D11->m_device->QueryInterface(__uuidof(IDXGIDevice3),(void **)&pDXGIDevice);
|
||||
if (SUCCEEDED(hr) )
|
||||
{
|
||||
pDXGIDevice->Trim();
|
||||
pDXGIDevice->Release();
|
||||
}
|
||||
}
|
||||
}
|
||||
#endif // BX_PLATFORM_WINRT
|
||||
}
|
||||
|
||||
void stubMultiDrawInstancedIndirect(uint32_t _numDrawIndirect, ID3D11Buffer* _ptr, uint32_t _offset, uint32_t _stride)
|
||||
{
|
||||
ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx;
|
||||
@ -4726,13 +4819,16 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
|
||||
void RendererContextD3D11::submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter)
|
||||
{
|
||||
if (updateResolution(_render->m_resolution) )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
PIX_BEGINEVENT(D3DCOLOR_RGBA(0xff, 0x00, 0x00, 0xff), L"rendererSubmit");
|
||||
BGFX_GPU_PROFILER_BEGIN_DYNAMIC("rendererSubmit");
|
||||
|
||||
ID3D11DeviceContext* deviceCtx = m_deviceCtx;
|
||||
|
||||
updateResolution(_render->m_resolution);
|
||||
|
||||
int64_t elapsed = -bx::getHPCounter();
|
||||
int64_t captureElapsed = 0;
|
||||
|
||||
@ -5266,9 +5362,16 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
| BGFX_STATE_PT_MASK
|
||||
| BGFX_STATE_POINT_SIZE_MASK
|
||||
| BGFX_STATE_MSAA
|
||||
| BGFX_STATE_LINEAA
|
||||
| BGFX_STATE_CONSERVATIVE_RASTER
|
||||
) & changedFlags)
|
||||
{
|
||||
if ( (BGFX_STATE_CULL_MASK|BGFX_STATE_MSAA) & changedFlags)
|
||||
if ( (0
|
||||
| BGFX_STATE_CULL_MASK
|
||||
| BGFX_STATE_MSAA
|
||||
| BGFX_STATE_LINEAA
|
||||
| BGFX_STATE_CONSERVATIVE_RASTER
|
||||
) & changedFlags)
|
||||
{
|
||||
setRasterizerState(newFlags, wireframe, scissorEnabled);
|
||||
}
|
||||
@ -5687,8 +5790,11 @@ BX_PRAGMA_DIAGNOSTIC_POP();
|
||||
tvm.clear();
|
||||
uint16_t pos = 0;
|
||||
tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x89 : 0x8f
|
||||
, " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
|
||||
, " %s.%d (FL %d.%d) / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
|
||||
, getRendererName()
|
||||
, m_deviceInterfaceVersion
|
||||
, (m_featureLevel >> 12) & 0xf
|
||||
, (m_featureLevel >> 8) & 0xf
|
||||
);
|
||||
|
||||
const DXGI_ADAPTER_DESC& desc = m_adapterDesc;
|
||||
|
4
3rdparty/bgfx/src/renderer_d3d11.h
vendored
4
3rdparty/bgfx/src/renderer_d3d11.h
vendored
@ -20,7 +20,8 @@ BX_PRAGMA_DIAGNOSTIC_IGNORED_MSVC(4005) // warning C4005: '' : macro redefinitio
|
||||
#include <sal.h>
|
||||
#define D3D11_NO_HELPERS
|
||||
#if BX_PLATFORM_WINDOWS
|
||||
# include <d3d11.h>
|
||||
# include <d3d11_3.h>
|
||||
# include <dxgi1_3.h>
|
||||
#elif BX_PLATFORM_WINRT
|
||||
# include <d3d11_3.h>
|
||||
#else
|
||||
@ -46,6 +47,7 @@ BX_PRAGMA_DIAGNOSTIC_POP()
|
||||
| BGFX_STATE_BLEND_MASK \
|
||||
| BGFX_STATE_BLEND_EQUATION_MASK \
|
||||
| BGFX_STATE_BLEND_INDEPENDENT \
|
||||
| BGFX_STATE_BLEND_ALPHA_TO_COVERAGE \
|
||||
| BGFX_STATE_ALPHA_WRITE \
|
||||
| BGFX_STATE_RGB_WRITE \
|
||||
)
|
||||
|
99
3rdparty/bgfx/src/renderer_d3d12.cpp
vendored
99
3rdparty/bgfx/src/renderer_d3d12.cpp
vendored
@ -8,10 +8,6 @@
|
||||
#if BGFX_CONFIG_RENDERER_DIRECT3D12
|
||||
# include "renderer_d3d12.h"
|
||||
|
||||
# if !USE_D3D12_DYNAMIC_LIB
|
||||
# pragma comment(lib, "D3D12.lib")
|
||||
# endif // !USE_D3D12_DYNAMIC_LIB
|
||||
|
||||
namespace bgfx { namespace d3d12
|
||||
{
|
||||
static wchar_t s_viewNameW[BGFX_CONFIG_MAX_VIEWS][256];
|
||||
@ -461,7 +457,11 @@ namespace bgfx { namespace d3d12
|
||||
struct RendererContextD3D12 : public RendererContextI
|
||||
{
|
||||
RendererContextD3D12()
|
||||
: m_wireframe(false)
|
||||
: m_d3d12dll(NULL)
|
||||
, m_dxgidll(NULL)
|
||||
, m_renderdocdll(NULL)
|
||||
, m_featureLevel(D3D_FEATURE_LEVEL(0) )
|
||||
, m_wireframe(false)
|
||||
, m_maxAnisotropy(1)
|
||||
, m_depthClamp(false)
|
||||
, m_fsChanges(0)
|
||||
@ -664,12 +664,13 @@ namespace bgfx { namespace d3d12
|
||||
, (featureLevel[ii] >> 12) & 0xf
|
||||
, (featureLevel[ii] >> 8) & 0xf
|
||||
);
|
||||
m_featureLevel = featureLevel[ii];
|
||||
}
|
||||
BX_WARN(SUCCEEDED(hr), "Unable to create Direct3D12 device.");
|
||||
}
|
||||
|
||||
if (FAILED(hr) )
|
||||
{
|
||||
BX_TRACE("Unable to create Direct3D12 device.");
|
||||
goto error;
|
||||
}
|
||||
|
||||
@ -907,6 +908,7 @@ namespace bgfx { namespace d3d12
|
||||
| BGFX_CAPS_TEXTURE_BLIT
|
||||
| BGFX_CAPS_TEXTURE_READ_BACK
|
||||
| BGFX_CAPS_OCCLUSION_QUERY
|
||||
| BGFX_CAPS_ALPHA_TO_COVERAGE
|
||||
);
|
||||
g_caps.maxTextureSize = 16384;
|
||||
g_caps.maxFBAttachments = uint8_t(bx::uint32_min(16, BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS) );
|
||||
@ -1083,6 +1085,7 @@ namespace bgfx { namespace d3d12
|
||||
bx::dlclose(m_kernel32dll);
|
||||
#endif // USE_D3D12_DYNAMIC_LIB
|
||||
case ErrorState::Default:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@ -1374,7 +1377,6 @@ namespace bgfx { namespace d3d12
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_flags = texture.m_flags;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
@ -1386,7 +1388,7 @@ namespace bgfx { namespace d3d12
|
||||
bx::write(&writer, tc);
|
||||
|
||||
texture.destroy();
|
||||
texture.create(mem, tc.m_flags, 0);
|
||||
texture.create(mem, texture.m_flags, 0);
|
||||
|
||||
release(mem);
|
||||
}
|
||||
@ -1770,7 +1772,12 @@ data.NumQualityLevels = 0;
|
||||
m_pipelineStateCache.invalidate();
|
||||
}
|
||||
|
||||
uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY | BGFX_RESET_DEPTH_CLAMP);
|
||||
uint32_t flags = _resolution.m_flags & ~(0
|
||||
| BGFX_RESET_HMD_RECENTER
|
||||
| BGFX_RESET_MAXANISOTROPY
|
||||
| BGFX_RESET_DEPTH_CLAMP
|
||||
| BGFX_RESET_SUSPEND
|
||||
);
|
||||
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
@ -1855,7 +1862,7 @@ data.NumQualityLevels = 0;
|
||||
|
||||
void commitShaderConstants(uint16_t _programIdx, D3D12_GPU_VIRTUAL_ADDRESS& _gpuAddress)
|
||||
{
|
||||
ProgramD3D12& program = m_program[_programIdx];
|
||||
const ProgramD3D12& program = m_program[_programIdx];
|
||||
uint32_t total = bx::strideAlign(0
|
||||
+ program.m_vsh->m_size
|
||||
+ (NULL != program.m_fsh ? program.m_fsh->m_size : 0)
|
||||
@ -1967,7 +1974,7 @@ data.NumQualityLevels = 0;
|
||||
|
||||
void setBlendState(D3D12_BLEND_DESC& _desc, uint64_t _state, uint32_t _rgba = 0)
|
||||
{
|
||||
_desc.AlphaToCoverageEnable = false;
|
||||
_desc.AlphaToCoverageEnable = !!(BGFX_STATE_BLEND_ALPHA_TO_COVERAGE & _state);
|
||||
_desc.IndependentBlendEnable = !!(BGFX_STATE_BLEND_INDEPENDENT & _state);
|
||||
|
||||
D3D12_RENDER_TARGET_BLEND_DESC* drt = &_desc.RenderTarget[0];
|
||||
@ -2052,14 +2059,17 @@ data.NumQualityLevels = 0;
|
||||
;
|
||||
_desc.CullMode = s_cullMode[cull];
|
||||
_desc.FrontCounterClockwise = false;
|
||||
_desc.DepthBias = 0;
|
||||
_desc.DepthBiasClamp = 0.0f;
|
||||
_desc.SlopeScaledDepthBias = 0.0f;
|
||||
_desc.DepthClipEnable = !m_depthClamp;
|
||||
_desc.MultisampleEnable = !!(_state&BGFX_STATE_MSAA);
|
||||
_desc.AntialiasedLineEnable = false;
|
||||
_desc.ForcedSampleCount = 0;
|
||||
_desc.ConservativeRaster = D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF;
|
||||
_desc.DepthBias = 0;
|
||||
_desc.DepthBiasClamp = 0.0f;
|
||||
_desc.SlopeScaledDepthBias = 0.0f;
|
||||
_desc.DepthClipEnable = !m_depthClamp;
|
||||
_desc.MultisampleEnable = !!(_state&BGFX_STATE_MSAA);
|
||||
_desc.AntialiasedLineEnable = !!(_state&BGFX_STATE_LINEAA);
|
||||
_desc.ForcedSampleCount = 0;
|
||||
_desc.ConservativeRaster = !!(_state&BGFX_STATE_CONSERVATIVE_RASTER)
|
||||
? D3D12_CONSERVATIVE_RASTERIZATION_MODE_ON
|
||||
: D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF
|
||||
;
|
||||
}
|
||||
|
||||
void setDepthStencilState(D3D12_DEPTH_STENCIL_DESC& _desc, uint64_t _state, uint64_t _stencil = 0)
|
||||
@ -2204,8 +2214,11 @@ data.NumQualityLevels = 0;
|
||||
| BGFX_STATE_BLEND_MASK
|
||||
| BGFX_STATE_BLEND_EQUATION_MASK
|
||||
| BGFX_STATE_BLEND_INDEPENDENT
|
||||
| BGFX_STATE_BLEND_ALPHA_TO_COVERAGE
|
||||
| BGFX_STATE_CULL_MASK
|
||||
| BGFX_STATE_MSAA
|
||||
| BGFX_STATE_LINEAA
|
||||
| BGFX_STATE_CONSERVATIVE_RASTER
|
||||
| BGFX_STATE_PT_MASK
|
||||
;
|
||||
|
||||
@ -2259,8 +2272,9 @@ data.NumQualityLevels = 0;
|
||||
bx::Error err;
|
||||
read(&rd, dxbc, &err);
|
||||
|
||||
bool patchShader = true;
|
||||
if (BX_ENABLED(BGFX_CONFIG_DEBUG) )
|
||||
bool patchShader = !dxbc.shader.aon9;
|
||||
if (BX_ENABLED(BGFX_CONFIG_DEBUG)
|
||||
&& patchShader)
|
||||
{
|
||||
union { uint32_t offset; void* ptr; } cast = { 0 };
|
||||
filter(dxbc.shader, dxbc.shader, patchCb0, cast.ptr);
|
||||
@ -2305,6 +2319,11 @@ data.NumQualityLevels = 0;
|
||||
desc.PS.pShaderBytecode = temp->data;
|
||||
desc.PS.BytecodeLength = temp->size;
|
||||
}
|
||||
else
|
||||
{
|
||||
desc.PS.pShaderBytecode = program.m_fsh->m_code->data;
|
||||
desc.PS.BytecodeLength = program.m_fsh->m_code->size;
|
||||
}
|
||||
|
||||
desc.DS.pShaderBytecode = NULL;
|
||||
desc.DS.BytecodeLength = 0;
|
||||
@ -2641,6 +2660,9 @@ data.NumQualityLevels = 0;
|
||||
void* m_kernel32dll;
|
||||
void* m_d3d12dll;
|
||||
void* m_dxgidll;
|
||||
void* m_renderdocdll;
|
||||
|
||||
D3D_FEATURE_LEVEL m_featureLevel;
|
||||
|
||||
D3D_DRIVER_TYPE m_driverType;
|
||||
DXGI_ADAPTER_DESC m_adapterDesc;
|
||||
@ -2772,12 +2794,12 @@ data.NumQualityLevels = 0;
|
||||
DX_RELEASE(m_heap, 0);
|
||||
}
|
||||
|
||||
void ScratchBufferD3D12::reset(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle)
|
||||
void ScratchBufferD3D12::reset(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle)
|
||||
{
|
||||
m_pos = 0;
|
||||
m_cpuHandle = m_heap->GetCPUDescriptorHandleForHeapStart();
|
||||
m_gpuHandle = m_heap->GetGPUDescriptorHandleForHeapStart();
|
||||
gpuHandle = m_gpuHandle;
|
||||
_gpuHandle = m_gpuHandle;
|
||||
}
|
||||
|
||||
void* ScratchBufferD3D12::allocCbv(D3D12_GPU_VIRTUAL_ADDRESS& _gpuAddress, uint32_t _size)
|
||||
@ -4721,8 +4743,8 @@ data.NumQualityLevels = 0;
|
||||
box.bottom = blit.m_srcY + height;;
|
||||
box.back = blit.m_srcZ + bx::uint32_imax(1, depth);
|
||||
|
||||
D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ 0 }} };
|
||||
D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ 0 }} };
|
||||
D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{}} };
|
||||
D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{}} };
|
||||
m_commandList->CopyTextureRegion(&dstLocation
|
||||
, blit.m_dstX
|
||||
, blit.m_dstY
|
||||
@ -4734,12 +4756,12 @@ data.NumQualityLevels = 0;
|
||||
else
|
||||
{
|
||||
D3D12_BOX box;
|
||||
box.left = blit.m_srcX;
|
||||
box.top = blit.m_srcY;
|
||||
box.front = 0;
|
||||
box.right = blit.m_srcX + width;
|
||||
box.bottom = blit.m_srcY + height;;
|
||||
box.back = 1;
|
||||
box.left = blit.m_srcX;
|
||||
box.top = blit.m_srcY;
|
||||
box.front = 0;
|
||||
box.right = blit.m_srcX + width;
|
||||
box.bottom = blit.m_srcY + height;;
|
||||
box.back = 1;
|
||||
|
||||
const uint32_t srcZ = TextureD3D12::TextureCube == src.m_type
|
||||
? blit.m_srcZ
|
||||
@ -4750,8 +4772,15 @@ data.NumQualityLevels = 0;
|
||||
: 0
|
||||
;
|
||||
|
||||
D3D12_TEXTURE_COPY_LOCATION dstLocation = { dst.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ dstZ*dst.m_numMips+blit.m_dstMip }} };
|
||||
D3D12_TEXTURE_COPY_LOCATION srcLocation = { src.m_ptr, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, {{ srcZ*src.m_numMips+blit.m_srcMip }} };
|
||||
D3D12_TEXTURE_COPY_LOCATION dstLocation;
|
||||
dstLocation.pResource = dst.m_ptr;
|
||||
dstLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
|
||||
dstLocation.SubresourceIndex = dstZ*dst.m_numMips+blit.m_dstMip;
|
||||
D3D12_TEXTURE_COPY_LOCATION srcLocation;
|
||||
srcLocation.pResource = src.m_ptr;
|
||||
srcLocation.Type = D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX;
|
||||
srcLocation.SubresourceIndex = srcZ*src.m_numMips+blit.m_srcMip;
|
||||
|
||||
bool depthStencil = isDepth(TextureFormat::Enum(src.m_textureFormat) );
|
||||
m_commandList->CopyTextureRegion(&dstLocation
|
||||
, blit.m_dstX
|
||||
@ -5271,8 +5300,10 @@ data.NumQualityLevels = 0;
|
||||
tvm.clear();
|
||||
uint16_t pos = 0;
|
||||
tvm.printf(0, pos++, BGFX_CONFIG_DEBUG ? 0x89 : 0x8f
|
||||
, " %s / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
|
||||
, " %s (FL %d.%d) / " BX_COMPILER_NAME " / " BX_CPU_NAME " / " BX_ARCH_NAME " / " BX_PLATFORM_NAME " "
|
||||
, getRendererName()
|
||||
, (m_featureLevel >> 12) & 0xf
|
||||
, (m_featureLevel >> 8) & 0xf
|
||||
);
|
||||
|
||||
const DXGI_ADAPTER_DESC& desc = m_adapterDesc;
|
||||
|
12
3rdparty/bgfx/src/renderer_d3d12.h
vendored
12
3rdparty/bgfx/src/renderer_d3d12.h
vendored
@ -78,15 +78,15 @@ namespace bgfx { namespace d3d12
|
||||
|
||||
void create(uint32_t _size, uint32_t _maxDescriptors);
|
||||
void destroy();
|
||||
void reset(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle);
|
||||
void reset(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle);
|
||||
|
||||
void* allocCbv(D3D12_GPU_VIRTUAL_ADDRESS& gpuAddress, uint32_t _size);
|
||||
void* allocCbv(D3D12_GPU_VIRTUAL_ADDRESS& _gpuAddress, uint32_t _size);
|
||||
|
||||
void allocSrv(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle, struct TextureD3D12& _texture, uint8_t _mip = 0);
|
||||
void allocSrv(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle, struct BufferD3D12& _buffer);
|
||||
void allocSrv(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle, struct TextureD3D12& _texture, uint8_t _mip = 0);
|
||||
void allocSrv(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle, struct BufferD3D12& _buffer);
|
||||
|
||||
void allocUav(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle, struct TextureD3D12& _texture, uint8_t _mip = 0);
|
||||
void allocUav(D3D12_GPU_DESCRIPTOR_HANDLE& gpuHandle, struct BufferD3D12& _buffer);
|
||||
void allocUav(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle, struct TextureD3D12& _texture, uint8_t _mip = 0);
|
||||
void allocUav(D3D12_GPU_DESCRIPTOR_HANDLE& _gpuHandle, struct BufferD3D12& _buffer);
|
||||
|
||||
ID3D12DescriptorHeap* getHeap()
|
||||
{
|
||||
|
86
3rdparty/bgfx/src/renderer_d3d9.cpp
vendored
86
3rdparty/bgfx/src/renderer_d3d9.cpp
vendored
@ -261,6 +261,7 @@ namespace bgfx { namespace d3d9
|
||||
{ D3DFMT_NULL, D3DUSAGE_RENDERTARGET, D3DRTYPE_SURFACE, false },
|
||||
{ D3DFMT_RESZ, D3DUSAGE_RENDERTARGET, D3DRTYPE_SURFACE, false },
|
||||
{ D3DFMT_RAWZ, D3DUSAGE_DEPTHSTENCIL, D3DRTYPE_SURFACE, false },
|
||||
{ D3DFMT_ATOC, 0, D3DRTYPE_SURFACE, false },
|
||||
};
|
||||
|
||||
static const GUID IID_IDirect3D9 = { 0x81bdcbca, 0x64d4, 0x426d, { 0xae, 0x8d, 0xad, 0x1, 0x47, 0xf4, 0x27, 0x5c } };
|
||||
@ -288,9 +289,10 @@ namespace bgfx { namespace d3d9
|
||||
, m_initialized(false)
|
||||
, m_amd(false)
|
||||
, m_nvidia(false)
|
||||
, m_atocSupport(false)
|
||||
, m_instancingSupport(false)
|
||||
, m_timerQuerySupport(false)
|
||||
, m_occlusionQuerySupport(false)
|
||||
, m_timerQuerySupport(false)
|
||||
, m_rtMsaa(false)
|
||||
{
|
||||
}
|
||||
@ -374,15 +376,18 @@ namespace bgfx { namespace d3d9
|
||||
&& NULL != Direct3DCreate9Ex)
|
||||
{
|
||||
Direct3DCreate9Ex(D3D_SDK_VERSION, &m_d3d9ex);
|
||||
HRESULT hr = m_d3d9ex->QueryInterface(IID_IDirect3D9, (void**)&m_d3d9);
|
||||
if (FAILED(hr) )
|
||||
if (NULL != m_d3d9ex)
|
||||
{
|
||||
BX_TRACE("Failed to query D3D9 interface 0x%08x.", hr);
|
||||
DX_RELEASE(m_d3d9ex, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pool = D3DPOOL_DEFAULT;
|
||||
HRESULT hr = m_d3d9ex->QueryInterface(IID_IDirect3D9, (void**)&m_d3d9);
|
||||
if (FAILED(hr) )
|
||||
{
|
||||
BX_TRACE("Failed to query D3D9 interface 0x%08x.", hr);
|
||||
DX_RELEASE(m_d3d9ex, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pool = D3DPOOL_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -598,6 +603,10 @@ namespace bgfx { namespace d3d9
|
||||
|| (m_caps.VertexShaderVersion >= D3DVS_VERSION(3, 0) )
|
||||
;
|
||||
|
||||
m_atocSupport = false
|
||||
|| s_extendedFormats[ExtendedFormat::Atoc].m_supported
|
||||
;
|
||||
|
||||
if (m_amd
|
||||
&& s_extendedFormats[ExtendedFormat::Inst].m_supported)
|
||||
{ // AMD only
|
||||
@ -613,7 +622,8 @@ namespace bgfx { namespace d3d9
|
||||
s_textureFormat[TextureFormat::BC4].m_fmt = s_extendedFormats[ExtendedFormat::Ati1].m_supported ? D3DFMT_ATI1 : D3DFMT_UNKNOWN;
|
||||
s_textureFormat[TextureFormat::BC5].m_fmt = s_extendedFormats[ExtendedFormat::Ati2].m_supported ? D3DFMT_ATI2 : D3DFMT_UNKNOWN;
|
||||
|
||||
g_caps.supported |= m_instancingSupport ? BGFX_CAPS_INSTANCING : 0;
|
||||
g_caps.supported |= m_instancingSupport ? BGFX_CAPS_INSTANCING : 0;
|
||||
g_caps.supported |= m_atocSupport ? BGFX_CAPS_ALPHA_TO_COVERAGE : 0;
|
||||
}
|
||||
|
||||
for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
|
||||
@ -1004,8 +1014,29 @@ namespace bgfx { namespace d3d9
|
||||
void resizeTexture(TextureHandle _handle, uint16_t _width, uint16_t _height) BX_OVERRIDE
|
||||
{
|
||||
TextureD3D9& texture = m_textures[_handle.idx];
|
||||
texture.m_width = _width;
|
||||
texture.m_height = _height;
|
||||
|
||||
uint32_t size = sizeof(uint32_t) + sizeof(TextureCreate);
|
||||
const Memory* mem = alloc(size);
|
||||
|
||||
bx::StaticMemoryBlockWriter writer(mem->data, mem->size);
|
||||
uint32_t magic = BGFX_CHUNK_MAGIC_TEX;
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
tc.m_depth = 0;
|
||||
tc.m_numMips = 1;
|
||||
tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
|
||||
tc.m_cubeMap = false;
|
||||
tc.m_mem = NULL;
|
||||
bx::write(&writer, tc);
|
||||
|
||||
texture.destroy();
|
||||
texture.create(mem, texture.m_flags, 0);
|
||||
|
||||
release(mem);
|
||||
}
|
||||
|
||||
void overrideInternal(TextureHandle _handle, uintptr_t _ptr) BX_OVERRIDE
|
||||
@ -1260,7 +1291,12 @@ namespace bgfx { namespace d3d9
|
||||
? m_caps.MaxAnisotropy
|
||||
: 1
|
||||
;
|
||||
uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY);
|
||||
uint32_t flags = _resolution.m_flags & ~(0
|
||||
| BGFX_RESET_HMD_RECENTER
|
||||
| BGFX_RESET_MAXANISOTROPY
|
||||
| BGFX_RESET_DEPTH_CLAMP
|
||||
| BGFX_RESET_SUSPEND
|
||||
);
|
||||
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
@ -2040,9 +2076,10 @@ namespace bgfx { namespace d3d9
|
||||
bool m_initialized;
|
||||
bool m_amd;
|
||||
bool m_nvidia;
|
||||
bool m_atocSupport;
|
||||
bool m_instancingSupport;
|
||||
bool m_timerQuerySupport;
|
||||
bool m_occlusionQuerySupport;
|
||||
bool m_timerQuerySupport;
|
||||
|
||||
D3DFORMAT m_fmtDepth;
|
||||
|
||||
@ -3818,6 +3855,11 @@ namespace bgfx { namespace d3d9
|
||||
DX_CHECK(device->SetRenderState(D3DRS_MULTISAMPLEANTIALIAS, (newFlags&BGFX_STATE_MSAA) == BGFX_STATE_MSAA) );
|
||||
}
|
||||
|
||||
if (BGFX_STATE_LINEAA & changedFlags)
|
||||
{
|
||||
DX_CHECK(m_device->SetRenderState(D3DRS_ANTIALIASEDLINEENABLE, !!(newFlags&BGFX_STATE_LINEAA) ) );
|
||||
}
|
||||
|
||||
if ( (BGFX_STATE_ALPHA_WRITE|BGFX_STATE_RGB_WRITE) & changedFlags)
|
||||
{
|
||||
uint32_t writeEnable = (newFlags&BGFX_STATE_ALPHA_WRITE) ? D3DCOLORWRITEENABLE_ALPHA : 0;
|
||||
@ -3825,12 +3867,26 @@ namespace bgfx { namespace d3d9
|
||||
DX_CHECK(device->SetRenderState(D3DRS_COLORWRITEENABLE, writeEnable) );
|
||||
}
|
||||
|
||||
if ( (BGFX_STATE_BLEND_MASK|BGFX_STATE_BLEND_EQUATION_MASK) & changedFlags
|
||||
if ( ( (0
|
||||
| BGFX_STATE_BLEND_MASK
|
||||
| BGFX_STATE_BLEND_EQUATION_MASK
|
||||
| BGFX_STATE_BLEND_ALPHA_TO_COVERAGE
|
||||
) & changedFlags)
|
||||
|| blendFactor != draw.m_rgba)
|
||||
{
|
||||
bool enabled = !!(BGFX_STATE_BLEND_MASK & newFlags);
|
||||
DX_CHECK(device->SetRenderState(D3DRS_ALPHABLENDENABLE, enabled) );
|
||||
|
||||
if (m_atocSupport
|
||||
&& BGFX_STATE_BLEND_ALPHA_TO_COVERAGE & changedFlags)
|
||||
{
|
||||
DX_CHECK(m_device->SetRenderState(D3DRS_ADAPTIVETESS_Y
|
||||
, !!(newFlags&BGFX_STATE_BLEND_ALPHA_TO_COVERAGE)
|
||||
? D3DFMT_ATOC
|
||||
: 0
|
||||
) );
|
||||
}
|
||||
|
||||
if (enabled)
|
||||
{
|
||||
const uint32_t blend = uint32_t( (newFlags&BGFX_STATE_BLEND_MASK)>>BGFX_STATE_BLEND_SHIFT);
|
||||
|
1
3rdparty/bgfx/src/renderer_d3d9.h
vendored
1
3rdparty/bgfx/src/renderer_d3d9.h
vendored
@ -107,6 +107,7 @@ namespace bgfx { namespace d3d9
|
||||
Null,
|
||||
Resz,
|
||||
Rawz,
|
||||
Atoc,
|
||||
|
||||
Count,
|
||||
};
|
||||
|
116
3rdparty/bgfx/src/renderer_gl.cpp
vendored
116
3rdparty/bgfx/src/renderer_gl.cpp
vendored
@ -534,6 +534,8 @@ namespace bgfx { namespace gl
|
||||
EXT_discard_framebuffer,
|
||||
EXT_disjoint_timer_query,
|
||||
EXT_draw_buffers,
|
||||
EXT_draw_instanced,
|
||||
EXT_instanced_arrays,
|
||||
EXT_frag_depth,
|
||||
EXT_framebuffer_blit,
|
||||
EXT_framebuffer_object,
|
||||
@ -583,6 +585,7 @@ namespace bgfx { namespace gl
|
||||
MOZ_WEBGL_compressed_texture_s3tc,
|
||||
MOZ_WEBGL_depth_texture,
|
||||
|
||||
NV_conservative_raster,
|
||||
NV_copy_image,
|
||||
NV_draw_buffers,
|
||||
NV_occlusion_query,
|
||||
@ -739,6 +742,8 @@ namespace bgfx { namespace gl
|
||||
{ "EXT_discard_framebuffer", false, true }, // GLES2 extension.
|
||||
{ "EXT_disjoint_timer_query", false, true }, // GLES2 extension.
|
||||
{ "EXT_draw_buffers", false, true }, // GLES2 extension.
|
||||
{ "EXT_draw_instanced", false, true }, // GLES2 extension.
|
||||
{ "EXT_instanced_arrays", false, true }, // GLES2 extension.
|
||||
{ "EXT_frag_depth", false, true }, // GLES2 extension.
|
||||
{ "EXT_framebuffer_blit", BGFX_CONFIG_RENDERER_OPENGL >= 30, true },
|
||||
{ "EXT_framebuffer_object", BGFX_CONFIG_RENDERER_OPENGL >= 30, true },
|
||||
@ -788,6 +793,7 @@ namespace bgfx { namespace gl
|
||||
{ "MOZ_WEBGL_compressed_texture_s3tc", false, true },
|
||||
{ "MOZ_WEBGL_depth_texture", false, true },
|
||||
|
||||
{ "NV_conservative_raster", false, true },
|
||||
{ "NV_copy_image", false, true },
|
||||
{ "NV_draw_buffers", false, true }, // GLES2 extension.
|
||||
{ "NV_occlusion_query", false, true },
|
||||
@ -1273,6 +1279,8 @@ namespace bgfx { namespace gl
|
||||
, m_depthTextureSupport(false)
|
||||
, m_timerQuerySupport(false)
|
||||
, m_occlusionQuerySupport(false)
|
||||
, m_atocSupport(false)
|
||||
, m_conservativeRasterSupport(false)
|
||||
, m_flip(false)
|
||||
, m_hash( (BX_PLATFORM_WINDOWS<<1) | BX_ARCH_64BIT)
|
||||
, m_backBufferFbo(0)
|
||||
@ -1866,19 +1874,15 @@ namespace bgfx { namespace gl
|
||||
&& NULL != glEndQuery
|
||||
;
|
||||
|
||||
g_caps.supported |= m_occlusionQuerySupport
|
||||
? BGFX_CAPS_OCCLUSION_QUERY
|
||||
: 0
|
||||
;
|
||||
m_atocSupport = s_extension[Extension::ARB_multisample].m_supported;
|
||||
m_conservativeRasterSupport = s_extension[Extension::NV_conservative_raster].m_supported;
|
||||
|
||||
g_caps.supported |= m_depthTextureSupport
|
||||
? BGFX_CAPS_TEXTURE_COMPARE_LEQUAL
|
||||
: 0
|
||||
;
|
||||
|
||||
g_caps.supported |= computeSupport
|
||||
? BGFX_CAPS_COMPUTE
|
||||
: 0
|
||||
g_caps.supported |= 0
|
||||
| (m_atocSupport ? BGFX_CAPS_ALPHA_TO_COVERAGE : 0)
|
||||
| (m_conservativeRasterSupport ? BGFX_CAPS_CONSERVATIVE_RASTER : 0)
|
||||
| (m_occlusionQuerySupport ? BGFX_CAPS_OCCLUSION_QUERY : 0)
|
||||
| (m_depthTextureSupport ? BGFX_CAPS_TEXTURE_COMPARE_LEQUAL : 0)
|
||||
| (computeSupport ? BGFX_CAPS_COMPUTE : 0)
|
||||
;
|
||||
|
||||
g_caps.supported |= m_glctx.getCaps();
|
||||
@ -1921,17 +1925,15 @@ namespace bgfx { namespace gl
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!BX_ENABLED(BX_PLATFORM_IOS) )
|
||||
if (s_extension[Extension::ANGLE_instanced_arrays].m_supported
|
||||
|| s_extension[Extension::ARB_instanced_arrays].m_supported
|
||||
|| s_extension[Extension::EXT_instanced_arrays].m_supported)
|
||||
{
|
||||
if (s_extension[Extension::ARB_instanced_arrays].m_supported
|
||||
|| s_extension[Extension::ANGLE_instanced_arrays].m_supported)
|
||||
if (NULL != glVertexAttribDivisor
|
||||
&& NULL != glDrawArraysInstanced
|
||||
&& NULL != glDrawElementsInstanced)
|
||||
{
|
||||
if (NULL != glVertexAttribDivisor
|
||||
&& NULL != glDrawArraysInstanced
|
||||
&& NULL != glDrawElementsInstanced)
|
||||
{
|
||||
g_caps.supported |= BGFX_CAPS_INSTANCING;
|
||||
}
|
||||
g_caps.supported |= BGFX_CAPS_INSTANCING;
|
||||
}
|
||||
}
|
||||
|
||||
@ -2225,7 +2227,6 @@ namespace bgfx { namespace gl
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_flags = texture.m_flags;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
@ -2237,7 +2238,7 @@ namespace bgfx { namespace gl
|
||||
bx::write(&writer, tc);
|
||||
|
||||
texture.destroy();
|
||||
texture.create(mem, tc.m_flags, 0);
|
||||
texture.create(mem, texture.m_flags, 0);
|
||||
|
||||
release(mem);
|
||||
}
|
||||
@ -2456,7 +2457,12 @@ namespace bgfx { namespace gl
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t flags = _resolution.m_flags & ~(BGFX_RESET_HMD_RECENTER | BGFX_RESET_MAXANISOTROPY | BGFX_RESET_DEPTH_CLAMP);
|
||||
uint32_t flags = _resolution.m_flags & ~(0
|
||||
| BGFX_RESET_HMD_RECENTER
|
||||
| BGFX_RESET_MAXANISOTROPY
|
||||
| BGFX_RESET_DEPTH_CLAMP
|
||||
| BGFX_RESET_SUSPEND
|
||||
);
|
||||
|
||||
if (m_resolution.m_width != _resolution.m_width
|
||||
|| m_resolution.m_height != _resolution.m_height
|
||||
@ -2559,7 +2565,6 @@ namespace bgfx { namespace gl
|
||||
if (UINT16_MAX != frameBuffer.m_denseIdx)
|
||||
{
|
||||
m_glctx.makeCurrent(frameBuffer.m_swapChain);
|
||||
GL_CHECK(glBindFramebuffer(GL_FRAMEBUFFER, 0) );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -3301,6 +3306,8 @@ namespace bgfx { namespace gl
|
||||
bool m_depthTextureSupport;
|
||||
bool m_timerQuerySupport;
|
||||
bool m_occlusionQuerySupport;
|
||||
bool m_atocSupport;
|
||||
bool m_conservativeRasterSupport;
|
||||
bool m_flip;
|
||||
|
||||
uint64_t m_hash;
|
||||
@ -5377,13 +5384,13 @@ namespace bgfx { namespace gl
|
||||
if (0 < _render->m_iboffset)
|
||||
{
|
||||
TransientIndexBuffer* ib = _render->m_transientIb;
|
||||
m_indexBuffers[ib->handle.idx].update(0, _render->m_iboffset, ib->data);
|
||||
m_indexBuffers[ib->handle.idx].update(0, _render->m_iboffset, ib->data, true);
|
||||
}
|
||||
|
||||
if (0 < _render->m_vboffset)
|
||||
{
|
||||
TransientVertexBuffer* vb = _render->m_transientVb;
|
||||
m_vertexBuffers[vb->handle.idx].update(0, _render->m_vboffset, vb->data);
|
||||
m_vertexBuffers[vb->handle.idx].update(0, _render->m_vboffset, vb->data, true);
|
||||
}
|
||||
|
||||
_render->sort();
|
||||
@ -5862,6 +5869,8 @@ namespace bgfx { namespace gl
|
||||
| BGFX_STATE_PT_MASK
|
||||
| BGFX_STATE_POINT_SIZE_MASK
|
||||
| BGFX_STATE_MSAA
|
||||
| BGFX_STATE_LINEAA
|
||||
| BGFX_STATE_CONSERVATIVE_RASTER
|
||||
) & changedFlags)
|
||||
{
|
||||
if (BGFX_STATE_CULL_MASK & changedFlags)
|
||||
@ -5917,14 +5926,27 @@ namespace bgfx { namespace gl
|
||||
|
||||
if (BGFX_STATE_MSAA & changedFlags)
|
||||
{
|
||||
if (BGFX_STATE_MSAA & newFlags)
|
||||
{
|
||||
GL_CHECK(glEnable(GL_MULTISAMPLE) );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL_CHECK(glDisable(GL_MULTISAMPLE) );
|
||||
}
|
||||
GL_CHECK(BGFX_STATE_MSAA & newFlags
|
||||
? glEnable(GL_MULTISAMPLE)
|
||||
: glDisable(GL_MULTISAMPLE)
|
||||
);
|
||||
}
|
||||
|
||||
if (BGFX_STATE_LINEAA & changedFlags)
|
||||
{
|
||||
GL_CHECK(BGFX_STATE_LINEAA & newFlags
|
||||
? glEnable(GL_LINE_SMOOTH)
|
||||
: glDisable(GL_LINE_SMOOTH)
|
||||
);
|
||||
}
|
||||
|
||||
if (m_conservativeRasterSupport
|
||||
&& BGFX_STATE_CONSERVATIVE_RASTER & changedFlags)
|
||||
{
|
||||
GL_CHECK(BGFX_STATE_CONSERVATIVE_RASTER & newFlags
|
||||
? glEnable(GL_CONSERVATIVE_RASTERIZATION_NV)
|
||||
: glDisable(GL_CONSERVATIVE_RASTERIZATION_NV)
|
||||
);
|
||||
}
|
||||
#endif // BGFX_CONFIG_RENDERER_OPENGL
|
||||
|
||||
@ -5935,10 +5957,30 @@ namespace bgfx { namespace gl
|
||||
GL_CHECK(glColorMask(rgb, rgb, rgb, alpha) );
|
||||
}
|
||||
|
||||
if ( (BGFX_STATE_BLEND_MASK|BGFX_STATE_BLEND_EQUATION_MASK|BGFX_STATE_BLEND_INDEPENDENT) & changedFlags
|
||||
if ( ( (0
|
||||
| BGFX_STATE_BLEND_MASK
|
||||
| BGFX_STATE_BLEND_EQUATION_MASK
|
||||
| BGFX_STATE_BLEND_INDEPENDENT
|
||||
| BGFX_STATE_BLEND_ALPHA_TO_COVERAGE
|
||||
) & changedFlags)
|
||||
|| blendFactor != draw.m_rgba)
|
||||
{
|
||||
if ( (BGFX_STATE_BLEND_MASK|BGFX_STATE_BLEND_EQUATION_MASK|BGFX_STATE_BLEND_INDEPENDENT) & newFlags
|
||||
if (m_atocSupport)
|
||||
{
|
||||
if (BGFX_STATE_BLEND_ALPHA_TO_COVERAGE & newFlags)
|
||||
{
|
||||
GL_CHECK(glEnable(GL_SAMPLE_ALPHA_TO_COVERAGE) );
|
||||
}
|
||||
else
|
||||
{
|
||||
GL_CHECK(glDisable(GL_SAMPLE_ALPHA_TO_COVERAGE) );
|
||||
}
|
||||
}
|
||||
|
||||
if ( ( (0
|
||||
| BGFX_STATE_BLEND_MASK
|
||||
| BGFX_STATE_BLEND_EQUATION_MASK
|
||||
| BGFX_STATE_BLEND_INDEPENDENT) & newFlags)
|
||||
|| blendFactor != draw.m_rgba)
|
||||
{
|
||||
const bool enabled = !!(BGFX_STATE_BLEND_MASK & newFlags);
|
||||
|
28
3rdparty/bgfx/src/renderer_gl.h
vendored
28
3rdparty/bgfx/src/renderer_gl.h
vendored
@ -783,6 +783,14 @@ typedef uint64_t GLuint64;
|
||||
# define GL_NUM_EXTENSIONS 0x821D
|
||||
#endif // GL_NUM_EXTENSIONS
|
||||
|
||||
#ifndef GL_SAMPLE_ALPHA_TO_COVERAGE
|
||||
# define GL_SAMPLE_ALPHA_TO_COVERAGE 0x809E
|
||||
#endif // GL_SAMPLE_ALPHA_TO_COVERAGE
|
||||
|
||||
#ifndef GL_CONSERVATIVE_RASTERIZATION_NV
|
||||
# define GL_CONSERVATIVE_RASTERIZATION_NV 0x9346
|
||||
#endif // GL_CONSERVATIVE_RASTERIZATION_NV
|
||||
|
||||
// _KHR or _ARB...
|
||||
#define GL_DEBUG_OUTPUT_SYNCHRONOUS 0x8242
|
||||
#define GL_DEBUG_NEXT_LOGGED_MESSAGE_LENGTH 0x8243
|
||||
@ -1058,9 +1066,17 @@ namespace bgfx { namespace gl
|
||||
GL_CHECK(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0) );
|
||||
}
|
||||
|
||||
void update(uint32_t _offset, uint32_t _size, void* _data)
|
||||
void update(uint32_t _offset, uint32_t _size, void* _data, bool _discard = false)
|
||||
{
|
||||
BX_CHECK(0 != m_id, "Updating invalid index buffer.");
|
||||
|
||||
if (_discard)
|
||||
{
|
||||
// orphan buffer...
|
||||
destroy();
|
||||
create(m_size, NULL, m_flags);
|
||||
}
|
||||
|
||||
GL_CHECK(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, m_id) );
|
||||
GL_CHECK(glBufferSubData(GL_ELEMENT_ARRAY_BUFFER
|
||||
, _offset
|
||||
@ -1104,9 +1120,17 @@ namespace bgfx { namespace gl
|
||||
GL_CHECK(glBindBuffer(m_target, 0) );
|
||||
}
|
||||
|
||||
void update(uint32_t _offset, uint32_t _size, void* _data)
|
||||
void update(uint32_t _offset, uint32_t _size, void* _data, bool _discard = false)
|
||||
{
|
||||
BX_CHECK(0 != m_id, "Updating invalid vertex buffer.");
|
||||
|
||||
if (_discard)
|
||||
{
|
||||
// orphan buffer...
|
||||
destroy();
|
||||
create(m_size, NULL, m_decl, 0);
|
||||
}
|
||||
|
||||
GL_CHECK(glBindBuffer(m_target, m_id) );
|
||||
GL_CHECK(glBufferSubData(m_target
|
||||
, _offset
|
||||
|
3
3rdparty/bgfx/src/renderer_mtl.mm
vendored
3
3rdparty/bgfx/src/renderer_mtl.mm
vendored
@ -661,7 +661,6 @@ namespace bgfx { namespace mtl
|
||||
bx::write(&writer, magic);
|
||||
|
||||
TextureCreate tc;
|
||||
tc.m_flags = texture.m_flags;
|
||||
tc.m_width = _width;
|
||||
tc.m_height = _height;
|
||||
tc.m_sides = 0;
|
||||
@ -673,7 +672,7 @@ namespace bgfx { namespace mtl
|
||||
bx::write(&writer, tc);
|
||||
|
||||
texture.destroy();
|
||||
texture.create(mem, tc.m_flags, 0);
|
||||
texture.create(mem, texture.m_flags, 0);
|
||||
|
||||
release(mem);
|
||||
}
|
||||
|
137
3rdparty/bgfx/src/shader.cpp
vendored
Normal file
137
3rdparty/bgfx/src/shader.cpp
vendored
Normal file
@ -0,0 +1,137 @@
|
||||
/*
|
||||
* Copyright 2011-2016 Branimir Karadzic. All rights reserved.
|
||||
* License: http://www.opensource.org/licenses/BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include "bgfx_p.h"
|
||||
#include "shader_dxbc.h"
|
||||
#include "shader_dx9bc.h"
|
||||
#include "shader_spirv.h"
|
||||
|
||||
namespace bgfx
|
||||
{
|
||||
static bool printAsm(uint32_t, const DxbcInstruction& _instruction, void* _userData)
|
||||
{
|
||||
bx::WriterI* writer = reinterpret_cast<bx::WriterI*>(_userData);
|
||||
char temp[512];
|
||||
toString(temp, sizeof(temp), _instruction);
|
||||
bx::write(writer, temp, (int32_t)strlen(temp) );
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool printAsm(uint32_t, const Dx9bcInstruction& _instruction, void* _userData)
|
||||
{
|
||||
bx::WriterI* writer = reinterpret_cast<bx::WriterI*>(_userData);
|
||||
char temp[512];
|
||||
toString(temp, sizeof(temp), _instruction);
|
||||
bx::write(writer, temp, (int32_t)strlen(temp) );
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool printAsm(uint32_t, const SpvInstruction& _instruction, void* _userData)
|
||||
{
|
||||
bx::WriterI* writer = reinterpret_cast<bx::WriterI*>(_userData);
|
||||
char temp[512];
|
||||
toString(temp, sizeof(temp), _instruction);
|
||||
bx::write(writer, temp, (int32_t)strlen(temp) );
|
||||
return true;
|
||||
}
|
||||
|
||||
void disassembleByteCode(bx::WriterI* _writer, bx::ReaderSeekerI* _reader, bx::Error* _err)
|
||||
{
|
||||
uint32_t magic;
|
||||
bx::peek(_reader, magic);
|
||||
|
||||
if (magic == 0x07230203)
|
||||
{
|
||||
SpirV spirv;
|
||||
read(_reader, spirv, _err);
|
||||
parse(spirv.shader, printAsm, _writer, _err);
|
||||
}
|
||||
else if (magic == BX_MAKEFOURCC('D', 'X', 'B', 'C') )
|
||||
{
|
||||
DxbcContext dxbc;
|
||||
read(_reader, dxbc, _err);
|
||||
parse(dxbc.shader, printAsm, _writer, _err);
|
||||
}
|
||||
else
|
||||
{
|
||||
Dx9bc dx9bc;
|
||||
read(_reader, dx9bc, _err);
|
||||
parse(dx9bc.shader, printAsm, _writer, _err);
|
||||
}
|
||||
}
|
||||
|
||||
void disassemble(bx::WriterI* _writer, bx::ReaderSeekerI* _reader, bx::Error* _err)
|
||||
{
|
||||
BX_ERROR_SCOPE(_err);
|
||||
|
||||
uint32_t magic;
|
||||
bx::peek(_reader, magic);
|
||||
|
||||
if (BGFX_CHUNK_MAGIC_CSH == magic
|
||||
|| BGFX_CHUNK_MAGIC_FSH == magic
|
||||
|| BGFX_CHUNK_MAGIC_VSH == magic)
|
||||
{
|
||||
bx::read(_reader, magic);
|
||||
|
||||
uint32_t iohash;
|
||||
bx::read(_reader, iohash, _err);
|
||||
|
||||
uint16_t count;
|
||||
bx::read(_reader, count, _err);
|
||||
|
||||
if (!_err->isOk() ) { return; }
|
||||
|
||||
for (uint32_t ii = 0; ii < count; ++ii)
|
||||
{
|
||||
uint8_t nameSize;
|
||||
bx::read(_reader, nameSize, _err);
|
||||
|
||||
if (!_err->isOk() ) { return; }
|
||||
|
||||
char name[256];
|
||||
bx::read(_reader, &name, nameSize, _err);
|
||||
name[nameSize] = '\0';
|
||||
|
||||
uint8_t type;
|
||||
bx::read(_reader, type, _err);
|
||||
|
||||
uint8_t num;
|
||||
bx::read(_reader, num, _err);
|
||||
|
||||
uint16_t regIndex;
|
||||
bx::read(_reader, regIndex, _err);
|
||||
|
||||
uint16_t regCount;
|
||||
bx::read(_reader, regCount, _err);
|
||||
}
|
||||
|
||||
uint16_t shaderSize;
|
||||
bx::read(_reader, shaderSize, _err);
|
||||
|
||||
if (!_err->isOk() ) { return; }
|
||||
|
||||
uint8_t* shaderCode = (uint8_t*)BX_ALLOC(g_allocator, shaderSize);
|
||||
bx::read(_reader, shaderCode, shaderSize, _err);
|
||||
|
||||
bx::MemoryReader reader(shaderCode, shaderSize);
|
||||
disassembleByteCode(_writer, &reader, _err);
|
||||
|
||||
bx::write(_writer, '\0', _err);
|
||||
|
||||
BX_FREE(g_allocator, shaderCode);
|
||||
}
|
||||
else
|
||||
{
|
||||
disassembleByteCode(_writer, _reader, _err);
|
||||
}
|
||||
}
|
||||
|
||||
void disassemble(bx::WriterI* _writer, const void* _data, uint32_t _size, bx::Error* _err)
|
||||
{
|
||||
bx::MemoryReader reader(_data, _size);
|
||||
disassemble(_writer, &reader, _err);
|
||||
}
|
||||
|
||||
} // namespace bgfx
|
21
3rdparty/bgfx/src/shader.h
vendored
Normal file
21
3rdparty/bgfx/src/shader.h
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
/*
|
||||
* Copyright 2011-2016 Branimir Karadzic. All rights reserved.
|
||||
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
||||
*/
|
||||
|
||||
#ifndef BGFX_SHADER_H
|
||||
#define BGFX_SHADER_H
|
||||
|
||||
#include <bx/readerwriter.h>
|
||||
|
||||
namespace bgfx
|
||||
{
|
||||
///
|
||||
void disassemble(bx::WriterI* _writer, bx::ReaderSeekerI* _reader, bx::Error* _err = NULL);
|
||||
|
||||
///
|
||||
void disassemble(bx::WriterI* _writer, const void* _data, uint32_t _size, bx::Error* _err = NULL);
|
||||
|
||||
} // namespace bgfx
|
||||
|
||||
#endif // BGFX_SHADER_H
|
6
3rdparty/bgfx/src/shader_dx9bc.cpp
vendored
6
3rdparty/bgfx/src/shader_dx9bc.cpp
vendored
@ -282,9 +282,9 @@ namespace bgfx
|
||||
size += bx::read(_reader, token, _err);
|
||||
|
||||
_subOperand.type = Dx9bcOperandType::Enum( ( (token & UINT32_C(0x70000000) ) >> 28)
|
||||
| ( (token & UINT32_C(0x00001800) ) >> 8) );
|
||||
| ( (token & UINT32_C(0x00001800) ) >> 8) );
|
||||
_subOperand.regIndex = (token & UINT32_C(0x000007ff) );
|
||||
_subOperand.swizzleBits = uint8_t( (token & UINT32_C(0x00ff0000) ) >> 16);
|
||||
_subOperand.swizzleBits = uint8_t( (token & UINT32_C(0x00ff0000) ) >> 16);
|
||||
|
||||
return size;
|
||||
}
|
||||
@ -741,7 +741,7 @@ namespace bgfx
|
||||
|
||||
_fn(instruction, _userData);
|
||||
|
||||
write(&writer, instruction);
|
||||
write(&writer, instruction, _err);
|
||||
|
||||
token += instruction.length;
|
||||
}
|
||||
|
10
3rdparty/bgfx/src/shader_dx9bc.h
vendored
10
3rdparty/bgfx/src/shader_dx9bc.h
vendored
@ -187,6 +187,8 @@ namespace bgfx
|
||||
|
||||
struct Dx9bcSubOperand
|
||||
{
|
||||
Dx9bcSubOperand() { /* not pod */ }
|
||||
|
||||
Dx9bcOperandType::Enum type;
|
||||
uint32_t regIndex;
|
||||
uint8_t swizzleBits;
|
||||
@ -194,6 +196,8 @@ namespace bgfx
|
||||
|
||||
struct Dx9bcOperand
|
||||
{
|
||||
Dx9bcOperand() { /* not pod */ }
|
||||
|
||||
Dx9bcOperandType::Enum type;
|
||||
uint32_t regIndex;
|
||||
|
||||
@ -214,6 +218,8 @@ namespace bgfx
|
||||
|
||||
struct Dx9bcInstruction
|
||||
{
|
||||
Dx9bcInstruction() { /* not pod */ }
|
||||
|
||||
Dx9bcOpcode::Enum opcode;
|
||||
uint16_t length;
|
||||
uint8_t numOperands;
|
||||
@ -232,6 +238,8 @@ namespace bgfx
|
||||
|
||||
struct Dx9bcShader
|
||||
{
|
||||
Dx9bcShader() { /* not pod */ }
|
||||
|
||||
stl::vector<uint8_t> byteCode;
|
||||
};
|
||||
|
||||
@ -240,6 +248,8 @@ namespace bgfx
|
||||
|
||||
struct Dx9bc
|
||||
{
|
||||
Dx9bc() { /* not pod */ }
|
||||
|
||||
uint32_t version;
|
||||
Dx9bcShader shader;
|
||||
};
|
||||
|
16
3rdparty/bgfx/src/shader_dxbc.cpp
vendored
16
3rdparty/bgfx/src/shader_dxbc.cpp
vendored
@ -790,7 +790,7 @@ namespace bgfx
|
||||
case DxbcOperandAddrMode::Reg:
|
||||
{
|
||||
DxbcSubOperand subOperand;
|
||||
size += read(_reader, subOperand);
|
||||
size += read(_reader, subOperand, _err);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -799,7 +799,7 @@ namespace bgfx
|
||||
size += bx::read(_reader, _subOperand.regIndex, _err);
|
||||
|
||||
DxbcSubOperand subOperand;
|
||||
size += read(_reader, subOperand);
|
||||
size += read(_reader, subOperand, _err);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -809,7 +809,7 @@ namespace bgfx
|
||||
size += bx::read(_reader, _subOperand.regIndex, _err);
|
||||
|
||||
DxbcSubOperand subOperand;
|
||||
size += read(_reader, subOperand);
|
||||
size += read(_reader, subOperand, _err);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -843,7 +843,7 @@ namespace bgfx
|
||||
case DxbcOperandAddrMode::Reg:
|
||||
{
|
||||
DxbcSubOperand subOperand;
|
||||
size += write(_writer, subOperand);
|
||||
size += write(_writer, subOperand, _err);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -852,7 +852,7 @@ namespace bgfx
|
||||
size += bx::write(_writer, _subOperand.regIndex, _err);
|
||||
|
||||
DxbcSubOperand subOperand;
|
||||
size += write(_writer, subOperand);
|
||||
size += write(_writer, subOperand, _err);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -862,7 +862,7 @@ namespace bgfx
|
||||
size += bx::write(_writer, _subOperand.regIndex, _err);
|
||||
|
||||
DxbcSubOperand subOperand;
|
||||
size += write(_writer, subOperand);
|
||||
size += write(_writer, subOperand, _err);
|
||||
}
|
||||
break;
|
||||
|
||||
@ -1747,6 +1747,7 @@ namespace bgfx
|
||||
int32_t size = 0;
|
||||
size += bx::read(_reader, _dxbc.header, _err);
|
||||
_dxbc.shader.shex = false;
|
||||
_dxbc.shader.aon9 = false;
|
||||
|
||||
for (uint32_t ii = 0; ii < _dxbc.header.numChunks; ++ii)
|
||||
{
|
||||
@ -1785,6 +1786,9 @@ namespace bgfx
|
||||
break;
|
||||
|
||||
case BX_MAKEFOURCC('A', 'o', 'n', '9'): // Contains DX9BC for feature level 9.x (*s_4_0_level_9_*) shaders.
|
||||
_dxbc.shader.aon9 = true;
|
||||
break;
|
||||
|
||||
case BX_MAKEFOURCC('I', 'F', 'C', 'E'): // Interface.
|
||||
case BX_MAKEFOURCC('R', 'D', 'E', 'F'): // Resource definition.
|
||||
case BX_MAKEFOURCC('S', 'D', 'G', 'B'): // Shader debugging info (old).
|
||||
|
9
3rdparty/bgfx/src/shader_dxbc.h
vendored
9
3rdparty/bgfx/src/shader_dxbc.h
vendored
@ -448,6 +448,8 @@ namespace bgfx
|
||||
|
||||
struct DxbcSubOperand
|
||||
{
|
||||
DxbcSubOperand() { /* not pod */ }
|
||||
|
||||
DxbcOperandType::Enum type;
|
||||
uint8_t mode;
|
||||
uint8_t modeBits;
|
||||
@ -459,6 +461,8 @@ namespace bgfx
|
||||
|
||||
struct DxbcOperand
|
||||
{
|
||||
DxbcOperand() { /* not pod */ }
|
||||
|
||||
DxbcOperandType::Enum type;
|
||||
DxbcOperandMode::Enum mode;
|
||||
uint8_t modeBits;
|
||||
@ -480,6 +484,8 @@ namespace bgfx
|
||||
|
||||
struct DxbcInstruction
|
||||
{
|
||||
DxbcInstruction() { /* not pod */ }
|
||||
|
||||
struct ExtendedType
|
||||
{
|
||||
enum Enum
|
||||
@ -546,6 +552,8 @@ namespace bgfx
|
||||
|
||||
struct DxbcSignature
|
||||
{
|
||||
DxbcSignature() { /* not pod */ }
|
||||
|
||||
struct Element
|
||||
{
|
||||
stl::string name;
|
||||
@ -570,6 +578,7 @@ namespace bgfx
|
||||
uint32_t version;
|
||||
stl::vector<uint8_t> byteCode;
|
||||
bool shex;
|
||||
bool aon9;
|
||||
};
|
||||
|
||||
int32_t read(bx::ReaderSeekerI* _reader, DxbcShader& _shader, bx::Error* _err);
|
||||
|
278
3rdparty/bgfx/src/shader_spirv.cpp
vendored
278
3rdparty/bgfx/src/shader_spirv.cpp
vendored
@ -8,15 +8,6 @@
|
||||
|
||||
namespace bgfx
|
||||
{
|
||||
struct SpvOpcodeInfo
|
||||
{
|
||||
bool hasType;
|
||||
bool hasResult;
|
||||
SpvOperand::Enum operands[8];
|
||||
};
|
||||
|
||||
static const SpvOpcodeInfo s_spvOpcodeInfo[] =
|
||||
{
|
||||
#define SPV_OPERAND_1(_a0) SpvOperand::_a0
|
||||
#define SPV_OPERAND_2(_a0, _a1) SPV_OPERAND_1(_a0), SPV_OPERAND_1(_a1)
|
||||
#define SPV_OPERAND_3(_a0, _a1, _a2) SPV_OPERAND_1(_a0), SPV_OPERAND_2(_a1, _a2)
|
||||
@ -33,6 +24,23 @@ namespace bgfx
|
||||
# define SPV_OPERAND(...) { BX_MACRO_DISPATCHER(SPV_OPERAND_, __VA_ARGS__)(__VA_ARGS__) }
|
||||
#endif // BX_COMPILER_MSVC
|
||||
#define _ Count
|
||||
|
||||
bool isDebug(SpvOpcode::Enum _opcode)
|
||||
{
|
||||
return (SpvOpcode::SourceContinued <= _opcode && SpvOpcode::Line >= _opcode)
|
||||
|| SpvOpcode::NoLine == _opcode
|
||||
;
|
||||
}
|
||||
|
||||
struct SpvOpcodeInfo
|
||||
{
|
||||
bool hasType;
|
||||
bool hasResult;
|
||||
SpvOperand::Enum operands[8];
|
||||
};
|
||||
|
||||
static const SpvOpcodeInfo s_spvOpcodeInfo[] =
|
||||
{
|
||||
{ false, false, /* Nop, // 0 */ SPV_OPERAND(_) },
|
||||
{ true, true, /* Undef, // 1 */ SPV_OPERAND(_) },
|
||||
{ false, false, /* SourceContinued, // 2 */ SPV_OPERAND(_) },
|
||||
@ -61,10 +69,10 @@ namespace bgfx
|
||||
{ false, true, /* TypeImage, // 25 */ SPV_OPERAND(SampledType, Dim, LiteralNumber, LiteralNumber, LiteralNumber, LiteralNumber, ImageFormat, AccessQualifier) },
|
||||
{ false, true, /* TypeSampler, // 26 */ SPV_OPERAND(LiteralNumber) },
|
||||
{ false, true, /* TypeSampledImage, // 27 */ SPV_OPERAND(LiteralNumber) },
|
||||
{ false, true, /* TypeArray, // 28 */ SPV_OPERAND(LiteralNumber) },
|
||||
{ false, true, /* TypeRuntimeArray, // 29 */ SPV_OPERAND(_) },
|
||||
{ false, true, /* TypeStruct, // 30 */ SPV_OPERAND(_) },
|
||||
{ false, true, /* TypeOpaque, // 31 */ SPV_OPERAND(_) },
|
||||
{ false, true, /* TypeArray, // 28 */ SPV_OPERAND(ElementType, LiteralNumber) },
|
||||
{ false, true, /* TypeRuntimeArray, // 29 */ SPV_OPERAND(ElementType) },
|
||||
{ false, true, /* TypeStruct, // 30 */ SPV_OPERAND(IdRep) },
|
||||
{ false, true, /* TypeOpaque, // 31 */ SPV_OPERAND(LiteralString) },
|
||||
{ false, true, /* TypePointer, // 32 */ SPV_OPERAND(StorageClass, Id) },
|
||||
{ false, true, /* TypeFunction, // 33 */ SPV_OPERAND(Id, Id, Id, Id, Id) },
|
||||
{ false, true, /* TypeEvent, // 34 */ SPV_OPERAND(_) },
|
||||
@ -354,8 +362,6 @@ namespace bgfx
|
||||
{ true, true, /* AtomicFlagTestAndSet, // 318 */ SPV_OPERAND(_) },
|
||||
{ false, false, /* AtomicFlagClear, // 319 */ SPV_OPERAND(_) },
|
||||
{ true, true, /* ImageSparseRead, // 320 */ SPV_OPERAND(_) },
|
||||
#undef _
|
||||
#undef SPV_OPERAND
|
||||
};
|
||||
BX_STATIC_ASSERT(BX_COUNTOF(s_spvOpcodeInfo) == SpvOpcode::Count);
|
||||
|
||||
@ -682,18 +688,136 @@ namespace bgfx
|
||||
"AtomicFlagTestAndSet",
|
||||
"AtomicFlagClear",
|
||||
"ImageSparseRead",
|
||||
"",
|
||||
};
|
||||
BX_STATIC_ASSERT(BX_COUNTOF(s_spvOpcode) == SpvOpcode::Count);
|
||||
BX_STATIC_ASSERT(BX_COUNTOF(s_spvOpcode)-1 == SpvOpcode::Count);
|
||||
|
||||
const char* getName(SpvOpcode::Enum _opcode)
|
||||
{
|
||||
BX_WARN(_opcode < SpvOpcode::Count, "Unknown opcode id %d.", _opcode);
|
||||
return _opcode < SpvOpcode::Count
|
||||
BX_WARN(_opcode <= SpvOpcode::Count, "Unknown opcode id %d.", _opcode);
|
||||
return _opcode <= SpvOpcode::Count
|
||||
? s_spvOpcode[_opcode]
|
||||
: "?SpvOpcode?"
|
||||
;
|
||||
}
|
||||
|
||||
struct SpvDecorationInfo
|
||||
{
|
||||
SpvOperand::Enum operands[2];
|
||||
};
|
||||
|
||||
static const SpvDecorationInfo s_spvDecorationInfo[] =
|
||||
{
|
||||
{ /* RelaxedPrecision */ SPV_OPERAND(_) },
|
||||
{ /* SpecId */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* Block */ SPV_OPERAND(_) },
|
||||
{ /* BufferBlock */ SPV_OPERAND(_) },
|
||||
{ /* RowMajor */ SPV_OPERAND(_) },
|
||||
{ /* ColMajor */ SPV_OPERAND(_) },
|
||||
{ /* ArrayStride */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* MatrixStride */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* GLSLShared */ SPV_OPERAND(_) },
|
||||
{ /* GLSLPacked */ SPV_OPERAND(_) },
|
||||
{ /* CPacked */ SPV_OPERAND(_) },
|
||||
{ /* BuiltIn */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* Unknown12 */ SPV_OPERAND(_) },
|
||||
{ /* NoPerspective */ SPV_OPERAND(_) },
|
||||
{ /* Flat */ SPV_OPERAND(_) },
|
||||
{ /* Patch */ SPV_OPERAND(_) },
|
||||
{ /* Centroid */ SPV_OPERAND(_) },
|
||||
{ /* Sample */ SPV_OPERAND(_) },
|
||||
{ /* Invariant */ SPV_OPERAND(_) },
|
||||
{ /* Restrict */ SPV_OPERAND(_) },
|
||||
{ /* Aliased */ SPV_OPERAND(_) },
|
||||
{ /* Volatile */ SPV_OPERAND(_) },
|
||||
{ /* Constant */ SPV_OPERAND(_) },
|
||||
{ /* Coherent */ SPV_OPERAND(_) },
|
||||
{ /* NonWritable */ SPV_OPERAND(_) },
|
||||
{ /* NonReadable */ SPV_OPERAND(_) },
|
||||
{ /* Uniform */ SPV_OPERAND(_) },
|
||||
{ /* Unknown27 */ SPV_OPERAND(_) },
|
||||
{ /* SaturatedConversion */ SPV_OPERAND(_) },
|
||||
{ /* Stream */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* Location */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* Component */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* Index */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* Binding */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* DescriptorSet */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* Offset */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* XfbBuffer */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* XfbStride */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* FuncParamAttr */ SPV_OPERAND(_) },
|
||||
{ /* FPRoundingMode */ SPV_OPERAND(_) },
|
||||
{ /* FPFastMathMode */ SPV_OPERAND(_) },
|
||||
{ /* LinkageAttributes */ SPV_OPERAND(LiteralString, LinkageType) },
|
||||
{ /* NoContraction */ SPV_OPERAND(_) },
|
||||
{ /* InputAttachmentIndex */ SPV_OPERAND(LiteralNumber) },
|
||||
{ /* Alignment */ SPV_OPERAND(LiteralNumber) },
|
||||
};
|
||||
|
||||
static const char* s_spvDecoration[] =
|
||||
{
|
||||
"RelaxedPrecision",
|
||||
"SpecId",
|
||||
"Block",
|
||||
"BufferBlock",
|
||||
"RowMajor",
|
||||
"ColMajor",
|
||||
"ArrayStride",
|
||||
"MatrixStride",
|
||||
"GLSLShared",
|
||||
"GLSLPacked",
|
||||
"CPacked",
|
||||
"BuiltIn",
|
||||
"Unknown12",
|
||||
"NoPerspective",
|
||||
"Flat",
|
||||
"Patch",
|
||||
"Centroid",
|
||||
"Sample",
|
||||
"Invariant",
|
||||
"Restrict",
|
||||
"Aliased",
|
||||
"Volatile",
|
||||
"Constant",
|
||||
"Coherent",
|
||||
"NonWritable",
|
||||
"NonReadable",
|
||||
"Uniform",
|
||||
"Unknown27",
|
||||
"SaturatedConversion",
|
||||
"Stream",
|
||||
"Location",
|
||||
"Component",
|
||||
"Index",
|
||||
"Binding",
|
||||
"DescriptorSet",
|
||||
"Offset",
|
||||
"XfbBuffer",
|
||||
"XfbStride",
|
||||
"FuncParamAttr",
|
||||
"FPRoundingMode",
|
||||
"FPFastMathMode",
|
||||
"LinkageAttributes",
|
||||
"NoContraction",
|
||||
"InputAttachmentIndex",
|
||||
"Alignment",
|
||||
""
|
||||
};
|
||||
BX_STATIC_ASSERT(BX_COUNTOF(s_spvDecoration)-1 == SpvDecoration::Count);
|
||||
|
||||
const char* getName(SpvDecoration::Enum _enum)
|
||||
{
|
||||
BX_CHECK(_enum <= SpvDecoration::Count, "Unknown decoration id %d.", _enum);
|
||||
return _enum <= SpvDecoration::Count
|
||||
? s_spvDecoration[_enum]
|
||||
: "?SpvDecoration?"
|
||||
;
|
||||
}
|
||||
|
||||
#undef _
|
||||
#undef SPV_OPERAND
|
||||
|
||||
static const char* s_spvStorageClass[] =
|
||||
{
|
||||
"UniformConstant",
|
||||
@ -708,18 +832,75 @@ namespace bgfx
|
||||
"PushConstant",
|
||||
"AtomicCounter",
|
||||
"Image",
|
||||
""
|
||||
};
|
||||
BX_STATIC_ASSERT(BX_COUNTOF(s_spvStorageClass) == SpvStorageClass::Count);
|
||||
BX_STATIC_ASSERT(BX_COUNTOF(s_spvStorageClass)-1 == SpvStorageClass::Count);
|
||||
|
||||
const char* getName(SpvStorageClass::Enum _enum)
|
||||
{
|
||||
BX_CHECK(_enum < SpvStorageClass::Count, "Unknown storage class id %d.", _enum);
|
||||
return _enum < SpvStorageClass::Count
|
||||
BX_CHECK(_enum <= SpvStorageClass::Count, "Unknown storage class id %d.", _enum);
|
||||
return _enum <= SpvStorageClass::Count
|
||||
? s_spvStorageClass[_enum]
|
||||
: "?SpvStorageClass?"
|
||||
;
|
||||
}
|
||||
|
||||
static const char* s_spvBuiltin[] =
|
||||
{
|
||||
"Position",
|
||||
"PointSize",
|
||||
"ClipDistance",
|
||||
"CullDistance",
|
||||
"VertexId",
|
||||
"InstanceId",
|
||||
"PrimitiveId",
|
||||
"InvocationId",
|
||||
"Layer",
|
||||
"ViewportIndex",
|
||||
"TessLevelOuter",
|
||||
"TessLevelInner",
|
||||
"TessCoord",
|
||||
"PatchVertices",
|
||||
"FragCoord",
|
||||
"PointCoord",
|
||||
"FrontFacing",
|
||||
"SampleId",
|
||||
"SamplePosition",
|
||||
"SampleMask",
|
||||
"FragDepth",
|
||||
"HelperInvocation",
|
||||
"NumWorkgroups",
|
||||
"WorkgroupSize",
|
||||
"WorkgroupId",
|
||||
"LocalInvocationId",
|
||||
"GlobalInvocationId",
|
||||
"LocalInvocationIndex",
|
||||
"WorkDim",
|
||||
"GlobalSize",
|
||||
"EnqueuedWorkgroupSize",
|
||||
"GlobalOffset",
|
||||
"GlobalLinearId",
|
||||
"SubgroupSize",
|
||||
"SubgroupMaxSize",
|
||||
"NumSubgroups",
|
||||
"NumEnqueuedSubgroups",
|
||||
"SubgroupId",
|
||||
"SubgroupLocalInvocationId",
|
||||
"VertexIndex",
|
||||
"InstanceIndex",
|
||||
"",
|
||||
};
|
||||
BX_STATIC_ASSERT(BX_COUNTOF(s_spvBuiltin)-1 == SpvBuiltin::Count);
|
||||
|
||||
const char* getName(SpvBuiltin::Enum _enum)
|
||||
{
|
||||
BX_CHECK(_enum <= SpvBuiltin::Count, "Unknown builtin id %d.", _enum);
|
||||
return _enum <= SpvBuiltin::Count
|
||||
? s_spvBuiltin[_enum]
|
||||
: "?SpvBuiltin?"
|
||||
;
|
||||
}
|
||||
|
||||
int32_t read(bx::ReaderI* _reader, SpvOperand& _operand, bx::Error* _err)
|
||||
{
|
||||
int32_t size = 0;
|
||||
@ -775,11 +956,19 @@ namespace bgfx
|
||||
{
|
||||
size += read(_reader, _instruction.type, _err);
|
||||
}
|
||||
else
|
||||
{
|
||||
_instruction.type = UINT32_MAX;
|
||||
}
|
||||
|
||||
if (info.hasResult)
|
||||
{
|
||||
size += read(_reader, _instruction.result, _err);
|
||||
}
|
||||
else
|
||||
{
|
||||
_instruction.result = UINT32_MAX;
|
||||
}
|
||||
|
||||
uint16_t currOp = 0;
|
||||
switch (_instruction.opcode)
|
||||
@ -826,10 +1015,21 @@ namespace bgfx
|
||||
|
||||
if (_instruction.hasResult)
|
||||
{
|
||||
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
|
||||
, " %%%d = "
|
||||
, _instruction.result
|
||||
);
|
||||
if (_instruction.hasType)
|
||||
{
|
||||
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
|
||||
, " r%d.t%d = "
|
||||
, _instruction.result
|
||||
, _instruction.type
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
|
||||
, " r%d = "
|
||||
, _instruction.result
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
|
||||
@ -850,6 +1050,14 @@ namespace bgfx
|
||||
);
|
||||
break;
|
||||
|
||||
case SpvOperand::Decoration:
|
||||
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
|
||||
, "%s%s"
|
||||
, 0 == ii ? " " : ", "
|
||||
, getName(SpvDecoration::Enum(operand.data[0]) )
|
||||
);
|
||||
break;
|
||||
|
||||
case SpvOperand::FunctionControl:
|
||||
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
|
||||
, "%s0x%08x"
|
||||
@ -900,7 +1108,7 @@ namespace bgfx
|
||||
|
||||
default:
|
||||
size += bx::snprintf(&_out[size], bx::uint32_imax(0, _size-size)
|
||||
, "%s%%%d"
|
||||
, "%sr%d"
|
||||
, 0 == ii ? " " : ", "
|
||||
, operand.data[0]
|
||||
);
|
||||
@ -961,7 +1169,7 @@ namespace bgfx
|
||||
return size;
|
||||
}
|
||||
|
||||
void parse(const SpvShader& _src, SpirvParseFn _fn, void* _userData, bx::Error* _err)
|
||||
void parse(const SpvShader& _src, SpvParseFn _fn, void* _userData, bx::Error* _err)
|
||||
{
|
||||
BX_ERROR_SCOPE(_err);
|
||||
|
||||
@ -978,12 +1186,16 @@ namespace bgfx
|
||||
return;
|
||||
}
|
||||
|
||||
BX_CHECK(size/4 == instruction.length, "read %d, expected %d, %s"
|
||||
, size/4
|
||||
, instruction.length
|
||||
, getName(instruction.opcode)
|
||||
);
|
||||
BX_UNUSED(size);
|
||||
if (size/4 != instruction.length)
|
||||
{
|
||||
BX_TRACE("read %d, expected %d, %s"
|
||||
, size/4
|
||||
, instruction.length
|
||||
, getName(instruction.opcode)
|
||||
);
|
||||
BX_ERROR_SET(_err, BGFX_SHADER_SPIRV_INVALID_INSTRUCTION, "SPIR-V: Invalid instruction.");
|
||||
return;
|
||||
}
|
||||
|
||||
bool cont = _fn(token * sizeof(uint32_t), instruction, _userData);
|
||||
if (!cont)
|
||||
|
30
3rdparty/bgfx/src/shader_spirv.h
vendored
30
3rdparty/bgfx/src/shader_spirv.h
vendored
@ -345,7 +345,9 @@ namespace bgfx
|
||||
};
|
||||
};
|
||||
|
||||
struct SpirvBuiltin
|
||||
const char* getName(SpvOpcode::Enum _opcode);
|
||||
|
||||
struct SpvBuiltin
|
||||
{
|
||||
enum Enum
|
||||
{
|
||||
@ -395,6 +397,8 @@ namespace bgfx
|
||||
};
|
||||
};
|
||||
|
||||
const char* getName(SpvBuiltin::Enum _enum);
|
||||
|
||||
struct SpvExecutionModel
|
||||
{
|
||||
enum Enum
|
||||
@ -456,6 +460,8 @@ namespace bgfx
|
||||
};
|
||||
};
|
||||
|
||||
const char* getName(SpvStorageClass::Enum _enum);
|
||||
|
||||
struct SpvResourceDim
|
||||
{
|
||||
enum Enum
|
||||
@ -486,6 +492,7 @@ namespace bgfx
|
||||
GLSLPacked,
|
||||
CPacked,
|
||||
BuiltIn,
|
||||
Unknown12,
|
||||
NoPerspective,
|
||||
Flat,
|
||||
Patch,
|
||||
@ -500,6 +507,7 @@ namespace bgfx
|
||||
NonWritable,
|
||||
NonReadable,
|
||||
Uniform,
|
||||
Unknown27,
|
||||
SaturatedConversion,
|
||||
Stream,
|
||||
Location,
|
||||
@ -522,8 +530,12 @@ namespace bgfx
|
||||
};
|
||||
};
|
||||
|
||||
const char* getName(SpvDecoration::Enum _enum);
|
||||
|
||||
struct SpvOperand
|
||||
{
|
||||
SpvOperand() { /* not pod */ }
|
||||
|
||||
enum Enum
|
||||
{
|
||||
AccessQualifier,
|
||||
@ -538,6 +550,7 @@ namespace bgfx
|
||||
Decoration,
|
||||
Dim,
|
||||
Dref,
|
||||
ElementType,
|
||||
ExecutionModel,
|
||||
Function,
|
||||
FunctionControl,
|
||||
@ -545,6 +558,7 @@ namespace bgfx
|
||||
IdRep,
|
||||
ImageFormat,
|
||||
ImageOperands,
|
||||
LinkageType,
|
||||
LiteralNumber,
|
||||
LiteralRep,
|
||||
LiteralString,
|
||||
@ -575,6 +589,8 @@ namespace bgfx
|
||||
|
||||
struct SpvInstruction
|
||||
{
|
||||
SpvInstruction() { /* not pod */ }
|
||||
|
||||
SpvOpcode::Enum opcode;
|
||||
uint16_t length;
|
||||
uint16_t numOperands;
|
||||
@ -593,20 +609,24 @@ namespace bgfx
|
||||
|
||||
struct SpvShader
|
||||
{
|
||||
SpvShader() { /* not pod */ }
|
||||
|
||||
stl::vector<uint8_t> byteCode;
|
||||
};
|
||||
|
||||
int32_t read(bx::ReaderSeekerI* _reader, SpvShader& _shader, bx::Error* _err);
|
||||
int32_t write(bx::WriterI* _writer, const SpvShader& _shader, bx::Error* _err);
|
||||
|
||||
typedef bool (*SpirvParseFn)(uint32_t _offset, const SpvInstruction& _instruction, void* _userData);
|
||||
void parse(const SpvShader& _src, SpirvParseFn _fn, void* _userData, bx::Error* _err = NULL);
|
||||
typedef bool (*SpvParseFn)(uint32_t _offset, const SpvInstruction& _instruction, void* _userData);
|
||||
void parse(const SpvShader& _src, SpvParseFn _fn, void* _userData, bx::Error* _err = NULL);
|
||||
|
||||
typedef void (*SpirvFilterFn)(SpvInstruction& _instruction, void* _userData);
|
||||
void filter(SpvShader& _dst, const SpvShader& _src, SpirvFilterFn _fn, void* _userData, bx::Error* _err = NULL);
|
||||
typedef void (*SpvFilterFn)(SpvInstruction& _instruction, void* _userData);
|
||||
void filter(SpvShader& _dst, const SpvShader& _src, SpvFilterFn _fn, void* _userData, bx::Error* _err = NULL);
|
||||
|
||||
struct SpirV
|
||||
{
|
||||
SpirV() { /* not pod */ }
|
||||
|
||||
struct Header
|
||||
{
|
||||
uint32_t magic;
|
||||
|
49
3rdparty/bgfx/src/vs_clear.bin.h
vendored
49
3rdparty/bgfx/src/vs_clear.bin.h
vendored
@ -27,24 +27,33 @@ static const uint8_t vs_clear_dx9[181] =
|
||||
0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x24, 0x90, 0x00, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x15, 0xa0, // ......$...@.....
|
||||
0xff, 0xff, 0x00, 0x00, 0x00, // .....
|
||||
};
|
||||
static const uint8_t vs_clear_dx11[254] =
|
||||
static const uint8_t vs_clear_dx11[386] =
|
||||
{
|
||||
0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xec, 0x00, 0x44, 0x58, 0x42, 0x43, // VSH.........DXBC
|
||||
0x23, 0xd8, 0xec, 0x20, 0x51, 0x86, 0x8e, 0xd5, 0x59, 0x28, 0x7f, 0x72, 0x54, 0xef, 0x89, 0xca, // #.. Q...Y(.rT...
|
||||
0x01, 0x00, 0x00, 0x00, 0xec, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, // ............,...
|
||||
0x60, 0x00, 0x00, 0x00, 0x94, 0x00, 0x00, 0x00, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, // `.......ISGN,...
|
||||
0x56, 0x53, 0x48, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x70, 0x01, 0x44, 0x58, 0x42, 0x43, // VSH.......p.DXBC
|
||||
0x35, 0x37, 0xf0, 0x90, 0x23, 0xc6, 0x3b, 0x7a, 0xd4, 0x66, 0x38, 0xf5, 0x51, 0x69, 0x19, 0xa8, // 57..#.;z.f8.Qi..
|
||||
0x01, 0x00, 0x00, 0x00, 0x70, 0x01, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, // ....p.......0...
|
||||
0xb0, 0x00, 0x00, 0x00, 0x08, 0x01, 0x00, 0x00, 0x3c, 0x01, 0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, // ........<...Aon9
|
||||
0x78, 0x00, 0x00, 0x00, 0x78, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, 0x50, 0x00, 0x00, 0x00, // x...x.......P...
|
||||
0x28, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, 0x00, 0x00, 0x24, 0x00, // (.....$...$...$.
|
||||
0x00, 0x00, 0x24, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xfe, 0xff, // ..$...$.........
|
||||
0x51, 0x00, 0x00, 0x05, 0x01, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, // Q..........?....
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, // ................
|
||||
0x00, 0x00, 0x0f, 0x90, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, 0x03, 0xc0, 0x00, 0x00, 0xe4, 0x90, // ................
|
||||
0x00, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0xaa, 0x90, // ................
|
||||
0x01, 0x00, 0x44, 0xa0, 0x01, 0x00, 0x14, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x53, 0x48, 0x44, 0x52, // ..D.........SHDR
|
||||
0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // P...@......._...
|
||||
0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, // r.......g.... ..
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, // ........6...r ..
|
||||
0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // ....F.......6...
|
||||
0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, // . .......@.....?
|
||||
0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // >...ISGN,.......
|
||||
0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .... ...........
|
||||
0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x50, 0x4f, 0x53, 0x49, // ............POSI
|
||||
0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, // TION....OSGN,...
|
||||
0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ .......
|
||||
0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, // ................
|
||||
0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // POSITION....OSGN
|
||||
0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ...
|
||||
0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||
0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // ....SV_POSITION.
|
||||
0x53, 0x48, 0x44, 0x52, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00, // SHDRP...@.......
|
||||
0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, // _...r.......g...
|
||||
0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // . ..........6...
|
||||
0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // r ......F.......
|
||||
0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, // 6.... .......@..
|
||||
0x00, 0x00, 0x80, 0x3f, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00, // ...?>.........
|
||||
0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................
|
||||
0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x00, 0x01, 0x01, 0x00, // SV_POSITION.....
|
||||
0x00, 0x00, // ..
|
||||
};
|
||||
static const uint8_t vs_clear_mtl[500] =
|
||||
{
|
||||
@ -56,7 +65,7 @@ static const uint8_t vs_clear_mtl[500] =
|
||||
0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, // tion [[attribute
|
||||
0x28, 0x30, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, // (0)]];.};.struct
|
||||
0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, // xlatMtlShaderOu
|
||||
0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // tput {. float4
|
||||
0x74, 0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, // tput {. float4
|
||||
0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, // gl_Position [[po
|
||||
0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, // sition]];.};.str
|
||||
0x75, 0x63, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, // uct xlatMtlShade
|
||||
@ -64,7 +73,7 @@ static const uint8_t vs_clear_mtl[500] =
|
||||
0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, // rtex xlatMtlShad
|
||||
0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, // erOutput xlatMtl
|
||||
0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, // Main (xlatMtlSha
|
||||
0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, // derInput _mtl_i
|
||||
0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, // derInput _mtl_i
|
||||
0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, 0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, // [[stage_in]], co
|
||||
0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, // nstant xlatMtlSh
|
||||
0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x26, 0x20, 0x5f, 0x6d, 0x74, // aderUniform& _mt
|
||||
@ -75,9 +84,9 @@ static const uint8_t vs_clear_mtl[500] =
|
||||
0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // ar_1;. tmpvar_1
|
||||
0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, // .w = 1.0;. tmpv
|
||||
0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, // ar_1.xyz = _mtl_
|
||||
0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, // i.a_position;.
|
||||
0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, // i.a_position;.
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, // _mtl_o.gl_Positi
|
||||
0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, // on = tmpvar_1;.
|
||||
0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, // on = tmpvar_1;.
|
||||
0x20, 0x72, 0x65, 0x74, 0x75, 0x72, 0x6e, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, // return _mtl_o;.
|
||||
0x7d, 0x0a, 0x0a, 0x00, // }...
|
||||
};
|
||||
|
78
3rdparty/bgfx/src/vs_debugfont.bin.h
vendored
78
3rdparty/bgfx/src/vs_debugfont.bin.h
vendored
@ -61,31 +61,30 @@ static const uint8_t vs_debugfont_dx9[391] =
|
||||
0x0f, 0xe0, 0x01, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x03, 0x00, 0x03, 0xe0, 0x03, 0x00, // ................
|
||||
0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00, // .......
|
||||
};
|
||||
static const uint8_t vs_debugfont_dx11[714] =
|
||||
static const uint8_t vs_debugfont_dx11[974] =
|
||||
{
|
||||
0x56, 0x53, 0x48, 0x04, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0f, 0x75, 0x5f, 0x6d, 0x6f, 0x64, // VSH..."f...u_mod
|
||||
0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, 0x04, 0x00, 0x00, 0x00, 0x04, 0x00, // elViewProj......
|
||||
0x9c, 0x02, 0x44, 0x58, 0x42, 0x43, 0xcf, 0x16, 0xf5, 0x3b, 0x91, 0xcc, 0xae, 0x24, 0x91, 0x6c, // ..DXBC...;...$.l
|
||||
0x08, 0xa4, 0x91, 0x55, 0x2a, 0x0e, 0x01, 0x00, 0x00, 0x00, 0x9c, 0x02, 0x00, 0x00, 0x03, 0x00, // ...U*...........
|
||||
0x00, 0x00, 0x2c, 0x00, 0x00, 0x00, 0xb4, 0x00, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x49, 0x53, // ..,.......@...IS
|
||||
0x47, 0x4e, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, // GN............h.
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||
0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ......h.........
|
||||
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x6e, 0x00, // ..............n.
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................
|
||||
0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......w.........
|
||||
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x43, 0x4f, // ..............CO
|
||||
0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, // LOR.POSITION.TEX
|
||||
0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, // COORD.OSGN......
|
||||
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ......h.........
|
||||
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, // ..............t.
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ................
|
||||
0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ......t.........
|
||||
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x7a, 0x00, // ..............z.
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, // ................
|
||||
0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO
|
||||
0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // N.COLOR.TEXCOORD
|
||||
0x00, 0xab, 0x53, 0x48, 0x44, 0x52, 0x54, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x55, 0x00, // ..SHDRT...@...U.
|
||||
0xa0, 0x03, 0x44, 0x58, 0x42, 0x43, 0x92, 0x16, 0xf8, 0xaa, 0xc4, 0x4c, 0xee, 0x93, 0x22, 0xee, // ..DXBC.....L..".
|
||||
0x2e, 0xcd, 0x17, 0x4a, 0xe5, 0x55, 0x01, 0x00, 0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x04, 0x00, // ...J.U..........
|
||||
0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, 0x8c, 0x02, 0x00, 0x00, 0x14, 0x03, // ..0...0.........
|
||||
0x00, 0x00, 0x41, 0x6f, 0x6e, 0x39, 0xf8, 0x00, 0x00, 0x00, 0xf8, 0x00, 0x00, 0x00, 0x00, 0x02, // ..Aon9..........
|
||||
0xfe, 0xff, 0xc4, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x01, 0x00, 0x24, 0x00, 0x00, 0x00, // ......4.....$...
|
||||
0x30, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x24, 0x00, 0x01, 0x00, 0x30, 0x00, 0x00, 0x00, // 0...0...$...0...
|
||||
0x00, 0x00, 0x04, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // ................
|
||||
0xfe, 0xff, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x1f, 0x00, // ................
|
||||
0x00, 0x02, 0x05, 0x00, 0x01, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, // ................
|
||||
0x02, 0x80, 0x02, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, 0x05, 0x00, 0x03, 0x80, 0x03, 0x00, // ................
|
||||
0x0f, 0x90, 0x05, 0x00, 0x00, 0x03, 0x00, 0x00, 0x0f, 0x80, 0x02, 0x00, 0x55, 0x90, 0x02, 0x00, // ............U...
|
||||
0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x01, 0x00, 0xe4, 0xa0, 0x02, 0x00, // ................
|
||||
0x00, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0x80, 0x03, 0x00, // ................
|
||||
0xe4, 0xa0, 0x02, 0x00, 0xaa, 0x90, 0x00, 0x00, 0xe4, 0x80, 0x02, 0x00, 0x00, 0x03, 0x00, 0x00, // ................
|
||||
0x0f, 0x80, 0x00, 0x00, 0xe4, 0x80, 0x04, 0x00, 0xe4, 0xa0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, // ................
|
||||
0x03, 0xc0, 0x00, 0x00, 0xff, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, // ................
|
||||
0x00, 0x02, 0x00, 0x00, 0x0c, 0xc0, 0x00, 0x00, 0xe4, 0x80, 0x01, 0x00, 0x00, 0x02, 0x00, 0x00, // ................
|
||||
0x0f, 0xe0, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, 0x01, 0x00, // ................
|
||||
0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x02, 0x00, 0x03, 0xe0, 0x03, 0x00, 0xe4, 0x90, 0xff, 0xff, // ................
|
||||
0x00, 0x00, 0x53, 0x48, 0x44, 0x52, 0x54, 0x01, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x55, 0x00, // ..SHDRT...@...U.
|
||||
0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, // ..Y...F. .......
|
||||
0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, // .._..........._.
|
||||
0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, // .........._...r.
|
||||
@ -106,8 +105,25 @@ static const uint8_t vs_debugfont_dx11[714] =
|
||||
0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, // ... ......F.....
|
||||
0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x1e, // ..6.... ......F.
|
||||
0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x32, 0x20, 0x10, 0x00, 0x03, 0x00, // ......6...2 ....
|
||||
0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x00, 0x04, // ..F.......>.....
|
||||
0x05, 0x00, 0x06, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ........@.
|
||||
0x00, 0x00, 0x46, 0x10, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x49, 0x53, // ..F.......>...IS
|
||||
0x47, 0x4e, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, // GN............h.
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
|
||||
0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ......h.........
|
||||
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x6e, 0x00, // ..............n.
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, // ................
|
||||
0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ......w.........
|
||||
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x03, 0x00, 0x00, 0x43, 0x4f, // ..............CO
|
||||
0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0x54, 0x45, 0x58, // LOR.POSITION.TEX
|
||||
0x43, 0x4f, 0x4f, 0x52, 0x44, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x84, 0x00, 0x00, 0x00, 0x04, 0x00, // COORD.OSGN......
|
||||
0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, // ......h.........
|
||||
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, // ..............t.
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, // ................
|
||||
0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x74, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, // ......t.........
|
||||
0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x7a, 0x00, // ..............z.
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, // ................
|
||||
0x00, 0x00, 0x03, 0x0c, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, // ......SV_POSITIO
|
||||
0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x54, 0x45, 0x58, 0x43, 0x4f, 0x4f, 0x52, 0x44, // N.COLOR.TEXCOORD
|
||||
0x00, 0xab, 0x00, 0x04, 0x05, 0x00, 0x06, 0x00, 0x01, 0x00, 0x10, 0x00, 0x40, 0x00, // ............@.
|
||||
};
|
||||
static const uint8_t vs_debugfont_mtl[843] =
|
||||
{
|
||||
@ -121,25 +137,25 @@ static const uint8_t vs_debugfont_mtl[843] =
|
||||
0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, // color1 [[attribu
|
||||
0x74, 0x65, 0x28, 0x31, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // te(1)]];. float
|
||||
0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x61, // 3 a_position [[a
|
||||
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, // ttribute(2)]];.
|
||||
0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, 0x32, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, // ttribute(2)]];.
|
||||
0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x61, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // float2 a_texcoo
|
||||
0x72, 0x64, 0x30, 0x20, 0x5b, 0x5b, 0x61, 0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x28, // rd0 [[attribute(
|
||||
0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, // 3)]];.};.struct
|
||||
0x33, 0x29, 0x5d, 0x5d, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, // 3)]];.};.struct
|
||||
0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, // xlatMtlShaderOut
|
||||
0x70, 0x75, 0x74, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x20, 0x67, // put {. float4 g
|
||||
0x6c, 0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x5b, 0x5b, 0x70, 0x6f, 0x73, // l_Position [[pos
|
||||
0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5d, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, // ition]];. float
|
||||
0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, // 4 v_color0;. fl
|
||||
0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x20, // oat4 v_color1;.
|
||||
0x6f, 0x61, 0x74, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x3b, 0x0a, 0x20, // oat4 v_color1;.
|
||||
0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, // float2 v_texcoo
|
||||
0x72, 0x64, 0x30, 0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x73, 0x74, 0x72, 0x75, 0x63, 0x74, 0x20, 0x78, // rd0;.};.struct x
|
||||
0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, // latMtlShaderUnif
|
||||
0x6f, 0x72, 0x6d, 0x20, 0x7b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, 0x74, 0x34, 0x78, 0x34, // orm {. float4x4
|
||||
0x20, 0x75, 0x5f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x56, 0x69, 0x65, 0x77, 0x50, 0x72, 0x6f, 0x6a, // u_modelViewProj
|
||||
0x3b, 0x0a, 0x7d, 0x3b, 0x0a, 0x76, 0x65, 0x72, 0x74, 0x65, 0x78, 0x20, 0x78, 0x6c, 0x61, 0x74, // ;.};.vertex xlat
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput
|
||||
0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x4f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x20, // MtlShaderOutput
|
||||
0x78, 0x6c, 0x61, 0x74, 0x4d, 0x74, 0x6c, 0x4d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x78, 0x6c, 0x61, // xlatMtlMain (xla
|
||||
0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, // tMtlShaderInput
|
||||
0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x49, 0x6e, 0x70, 0x75, 0x74, 0x20, // tMtlShaderInput
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x20, 0x5b, 0x5b, 0x73, 0x74, 0x61, 0x67, 0x65, 0x5f, 0x69, // _mtl_i [[stage_i
|
||||
0x6e, 0x5d, 0x5d, 0x2c, 0x20, 0x63, 0x6f, 0x6e, 0x73, 0x74, 0x61, 0x6e, 0x74, 0x20, 0x78, 0x6c, // n]], constant xl
|
||||
0x61, 0x74, 0x4d, 0x74, 0x6c, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x55, 0x6e, 0x69, 0x66, 0x6f, // atMtlShaderUnifo
|
||||
@ -149,7 +165,7 @@ static const uint8_t vs_debugfont_mtl[843] =
|
||||
0x74, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x3b, 0x0a, 0x20, 0x20, 0x66, 0x6c, 0x6f, 0x61, // t _mtl_o;. floa
|
||||
0x74, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, // t4 tmpvar_1;. t
|
||||
0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3d, 0x20, 0x31, 0x2e, 0x30, 0x3b, // mpvar_1.w = 1.0;
|
||||
0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, // . tmpvar_1.xyz
|
||||
0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, // . tmpvar_1.xyz
|
||||
0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, // = _mtl_i.a_posit
|
||||
0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x67, 0x6c, // ion;. _mtl_o.gl
|
||||
0x5f, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x28, 0x5f, 0x6d, 0x74, // _Position = (_mt
|
||||
@ -158,7 +174,7 @@ static const uint8_t vs_debugfont_mtl[843] =
|
||||
0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, // . _mtl_o.v_texc
|
||||
0x6f, 0x6f, 0x72, 0x64, 0x30, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, // oord0 = _mtl_i.a
|
||||
0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x5f, 0x6d, // _texcoord0;. _m
|
||||
0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, // tl_o.v_color0 =
|
||||
0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, 0x20, // tl_o.v_color0 =
|
||||
0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, // _mtl_i.a_color0;
|
||||
0x0a, 0x20, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x6f, 0x2e, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, // . _mtl_o.v_colo
|
||||
0x72, 0x31, 0x20, 0x3d, 0x20, 0x5f, 0x6d, 0x74, 0x6c, 0x5f, 0x69, 0x2e, 0x61, 0x5f, 0x63, 0x6f, // r1 = _mtl_i.a_co
|
||||
|
BIN
3rdparty/bgfx/tools/bin/windows/geometryc.exe
vendored
BIN
3rdparty/bgfx/tools/bin/windows/geometryc.exe
vendored
Binary file not shown.
BIN
3rdparty/bgfx/tools/bin/windows/shaderc.exe
vendored
BIN
3rdparty/bgfx/tools/bin/windows/shaderc.exe
vendored
Binary file not shown.
BIN
3rdparty/bgfx/tools/bin/windows/texturec.exe
vendored
BIN
3rdparty/bgfx/tools/bin/windows/texturec.exe
vendored
Binary file not shown.
49
3rdparty/bgfx/tools/shaderc/shaderc.cpp
vendored
49
3rdparty/bgfx/tools/shaderc/shaderc.cpp
vendored
@ -70,6 +70,23 @@ namespace bgfx
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char* s_ARB_gpu_shader5[] =
|
||||
{
|
||||
"bitfieldReverse",
|
||||
"floatBitsToInt",
|
||||
"floatBitsToUint",
|
||||
"intBitsToFloat",
|
||||
"uintBitsToFloat",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char* s_ARB_shading_language_packing[] =
|
||||
{
|
||||
"packHalf2x16",
|
||||
"unpackHalf2x16",
|
||||
NULL
|
||||
};
|
||||
|
||||
static const char* s_130[] =
|
||||
{
|
||||
"uint",
|
||||
@ -1706,7 +1723,9 @@ namespace bgfx
|
||||
{
|
||||
std::string code;
|
||||
|
||||
bool hasTextureLod = NULL != bx::findIdentifierMatch(input, s_ARB_shader_texture_lod /*EXT_shader_texture_lod*/);
|
||||
const bool hasTextureLod = NULL != bx::findIdentifierMatch(input, s_ARB_shader_texture_lod /*EXT_shader_texture_lod*/);
|
||||
const bool hasShader5 = NULL != bx::findIdentifierMatch(input, s_ARB_gpu_shader5);
|
||||
const bool hasShaderPacking = NULL != bx::findIdentifierMatch(input, s_ARB_shading_language_packing);
|
||||
|
||||
if (0 == essl)
|
||||
{
|
||||
@ -1723,6 +1742,20 @@ namespace bgfx
|
||||
bx::stringPrintf(code, "#version %s\n", need130 ? "130" : profile);
|
||||
}
|
||||
|
||||
if (hasShader5)
|
||||
{
|
||||
bx::stringPrintf(code
|
||||
, "#extension GL_ARB_gpu_shader5 : enable\n"
|
||||
);
|
||||
}
|
||||
|
||||
if (hasShaderPacking)
|
||||
{
|
||||
bx::stringPrintf(code
|
||||
, "#extension GL_ARB_shading_language_packing : enable\n"
|
||||
);
|
||||
}
|
||||
|
||||
bx::stringPrintf(code
|
||||
, "#define bgfxShadow2D shadow2D\n"
|
||||
"#define bgfxShadow2DProj shadow2DProj\n"
|
||||
@ -1772,6 +1805,20 @@ namespace bgfx
|
||||
);
|
||||
}
|
||||
|
||||
if (hasShader5)
|
||||
{
|
||||
bx::stringPrintf(code
|
||||
, "#extension GL_ARB_gpu_shader5 : enable\n"
|
||||
);
|
||||
}
|
||||
|
||||
if (hasShaderPacking)
|
||||
{
|
||||
bx::stringPrintf(code
|
||||
, "#extension GL_ARB_shading_language_packing : enable\n"
|
||||
);
|
||||
}
|
||||
|
||||
if (NULL != bx::findIdentifierMatch(input, "gl_FragDepth") )
|
||||
{
|
||||
bx::stringPrintf(code
|
||||
|
39
3rdparty/bgfx/tools/texturec/texturec.cpp
vendored
39
3rdparty/bgfx/tools/texturec/texturec.cpp
vendored
@ -472,7 +472,12 @@ int main(int _argc, const char* _argv[])
|
||||
|
||||
if (normalMap)
|
||||
{
|
||||
uint32_t size = imageGetSize(TextureFormat::RGBA32F, mip.m_width, mip.m_height);
|
||||
output = imageAlloc(imageContainer, format, mip.m_width, mip.m_height, 0, false, mips);
|
||||
|
||||
ImageMip dstMip;
|
||||
imageGetRawData(imageContainer, 0, 0, NULL, 0, dstMip);
|
||||
|
||||
uint32_t size = imageGetSize(TextureFormat::RGBA32F, dstMip.m_width, dstMip.m_height);
|
||||
temp = BX_ALLOC(&allocator, size);
|
||||
float* rgba = (float*)temp;
|
||||
float* rgbaDst = (float*)BX_ALLOC(&allocator, size);
|
||||
@ -502,19 +507,13 @@ int main(int _argc, const char* _argv[])
|
||||
}
|
||||
}
|
||||
|
||||
output = imageAlloc(imageContainer, format, mip.m_width, mip.m_height, 0, false, mips);
|
||||
|
||||
imageRgba32f11to01(rgbaDst, mip.m_width, mip.m_height, mip.m_width*16, rgba);
|
||||
imageEncodeFromRgba32f(&allocator, output->data, rgbaDst, mip.m_width, mip.m_height, format);
|
||||
imageRgba32f11to01(rgbaDst, dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba);
|
||||
imageEncodeFromRgba32f(&allocator, output->data, rgbaDst, dstMip.m_width, dstMip.m_height, format);
|
||||
|
||||
for (uint8_t lod = 1; lod < numMips; ++lod)
|
||||
{
|
||||
imageRgba32fDownsample2x2NormalMap(mip.m_width, mip.m_height, mip.m_width*16, rgba, rgba);
|
||||
imageRgba32f11to01(rgbaDst, mip.m_width, mip.m_height, mip.m_width*16, rgba);
|
||||
mip.m_width = bx::uint32_max(1, mip.m_width >> 1);
|
||||
mip.m_height = bx::uint32_max(1, mip.m_height >> 1);
|
||||
|
||||
ImageMip dstMip;
|
||||
imageRgba32fDownsample2x2NormalMap(dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba, rgba);
|
||||
imageRgba32f11to01(rgbaDst, dstMip.m_width, dstMip.m_height, dstMip.m_width*16, rgba);
|
||||
imageGetRawData(imageContainer, 0, lod, output->data, output->size, dstMip);
|
||||
uint8_t* data = const_cast<uint8_t*>(dstMip.m_data);
|
||||
imageEncodeFromRgba32f(&allocator, data, rgbaDst, dstMip.m_width, dstMip.m_height, format);
|
||||
@ -524,8 +523,14 @@ int main(int _argc, const char* _argv[])
|
||||
}
|
||||
else
|
||||
{
|
||||
uint32_t size = imageGetSize(TextureFormat::RGBA8, mip.m_width, mip.m_height);
|
||||
output = imageAlloc(imageContainer, format, mip.m_width, mip.m_height, 0, false, mips);
|
||||
|
||||
ImageMip dstMip;
|
||||
imageGetRawData(imageContainer, 0, 0, NULL, 0, dstMip);
|
||||
|
||||
uint32_t size = imageGetSize(TextureFormat::RGBA8, dstMip.m_width, dstMip.m_height);
|
||||
temp = BX_ALLOC(&allocator, size);
|
||||
memset(temp, 0, size);
|
||||
uint8_t* rgba = (uint8_t*)temp;
|
||||
|
||||
imageDecodeToRgba8(rgba
|
||||
@ -536,17 +541,11 @@ int main(int _argc, const char* _argv[])
|
||||
, mip.m_format
|
||||
);
|
||||
|
||||
output = imageAlloc(imageContainer, format, mip.m_width, mip.m_height, 0, false, mips);
|
||||
|
||||
imageEncodeFromRgba8(output->data, rgba, mip.m_width, mip.m_height, format);
|
||||
imageEncodeFromRgba8(output->data, rgba, dstMip.m_width, dstMip.m_height, format);
|
||||
|
||||
for (uint8_t lod = 1; lod < numMips; ++lod)
|
||||
{
|
||||
imageRgba8Downsample2x2(mip.m_width, mip.m_height, mip.m_width*4, rgba, rgba);
|
||||
mip.m_width = bx::uint32_max(1, mip.m_width >> 1);
|
||||
mip.m_height = bx::uint32_max(1, mip.m_height >> 1);
|
||||
|
||||
ImageMip dstMip;
|
||||
imageRgba8Downsample2x2(dstMip.m_width, dstMip.m_height, dstMip.m_width*4, rgba, rgba);
|
||||
imageGetRawData(imageContainer, 0, lod, output->data, output->size, dstMip);
|
||||
uint8_t* data = const_cast<uint8_t*>(dstMip.m_data);
|
||||
imageEncodeFromRgba8(data, rgba, dstMip.m_width, dstMip.m_height, format);
|
||||
|
20
3rdparty/bx/include/bx/float4_ni.h
vendored
20
3rdparty/bx/include/bx/float4_ni.h
vendored
@ -177,16 +177,30 @@ namespace bx
|
||||
{
|
||||
const float4_t half = float4_splat(0.5f);
|
||||
const float4_t one = float4_splat(1.0f);
|
||||
const float4_t zero = float4_zero();
|
||||
const float4_t tmp0 = float4_rsqrt_est(_a);
|
||||
const float4_t tmp1 = float4_madd(tmp0, _a, zero);
|
||||
const float4_t tmp2 = float4_madd(tmp1, half, zero);
|
||||
const float4_t tmp1 = float4_mul(tmp0, _a);
|
||||
const float4_t tmp2 = float4_mul(tmp1, half);
|
||||
const float4_t tmp3 = float4_nmsub(tmp0, tmp1, one);
|
||||
const float4_t result = float4_madd(tmp3, tmp2, tmp1);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BX_FLOAT4_INLINE float4_t float4_sqrt_nr1_ni(float4_t _a)
|
||||
{
|
||||
const float4_t half = float4_splat(0.5f);
|
||||
|
||||
float4_t result = _a;
|
||||
for (uint32_t ii = 0; ii < 11; ++ii)
|
||||
{
|
||||
const float4_t tmp1 = float4_div(_a, result);
|
||||
const float4_t tmp2 = float4_add(tmp1, result);
|
||||
result = float4_mul(tmp2, half);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
BX_FLOAT4_INLINE float4_t float4_rsqrt_ni(float4_t _a)
|
||||
{
|
||||
const float4_t one = float4_splat(1.0f);
|
||||
|
29
3rdparty/bx/include/bx/maputil.h
vendored
29
3rdparty/bx/include/bx/maputil.h
vendored
@ -24,6 +24,35 @@ namespace bx
|
||||
typename MapType::value_type pair(_key, _value);
|
||||
return _map.insert(it, pair);
|
||||
}
|
||||
|
||||
template<typename MapType>
|
||||
bool mapRemove(MapType& _map, const typename MapType::value_type::first_type& _first)
|
||||
{
|
||||
typename MapType::const_iterator it = _map.find(_first);
|
||||
if (it != _map.end() )
|
||||
{
|
||||
_map.erase(it);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
template<typename MapType>
|
||||
bool mapRemove(MapType& _map, const typename MapType::value_type::second_type& _second)
|
||||
{
|
||||
for (typename MapType::const_iterator it = _map.begin(), itEnd = _map.end(); it != itEnd; ++it)
|
||||
{
|
||||
if (it->second == _second)
|
||||
{
|
||||
_map.erase(it);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
} // namespace bx
|
||||
|
||||
#endif // BX_MAPUTIL_H_HEADER_GUARD
|
||||
|
6
3rdparty/bx/include/bx/os.h
vendored
6
3rdparty/bx/include/bx/os.h
vendored
@ -136,7 +136,7 @@ namespace bx
|
||||
: 0
|
||||
;
|
||||
#elif BX_PLATFORM_OSX
|
||||
#ifdef MACH_TASK_BASIC_INFO
|
||||
# if defined(MACH_TASK_BASIC_INFO)
|
||||
mach_task_basic_info info;
|
||||
mach_msg_type_number_t infoCount = MACH_TASK_BASIC_INFO_COUNT;
|
||||
|
||||
@ -145,7 +145,7 @@ namespace bx
|
||||
, (task_info_t)&info
|
||||
, &infoCount
|
||||
);
|
||||
#else // MACH_TASK_BASIC_INFO
|
||||
# else // MACH_TASK_BASIC_INFO
|
||||
task_basic_info info;
|
||||
mach_msg_type_number_t infoCount = TASK_BASIC_INFO_COUNT;
|
||||
|
||||
@ -154,7 +154,7 @@ namespace bx
|
||||
, (task_info_t)&info
|
||||
, &infoCount
|
||||
);
|
||||
#endif // MACH_TASK_BASIC_INFO
|
||||
# endif // MACH_TASK_BASIC_INFO
|
||||
if (KERN_SUCCESS != result)
|
||||
{
|
||||
return 0;
|
||||
|
21
3rdparty/bx/include/bx/readerwriter.h
vendored
21
3rdparty/bx/include/bx/readerwriter.h
vendored
@ -77,7 +77,7 @@ namespace bx
|
||||
return _reader->read(_data, _size, _err);
|
||||
}
|
||||
|
||||
/// Write value.
|
||||
/// Read value.
|
||||
template<typename Ty>
|
||||
inline int32_t read(ReaderI* _reader, Ty& _value, Error* _err = NULL)
|
||||
{
|
||||
@ -207,6 +207,25 @@ namespace bx
|
||||
{
|
||||
};
|
||||
|
||||
/// Peek data.
|
||||
inline int32_t peek(ReaderSeekerI* _reader, void* _data, int32_t _size, Error* _err = NULL)
|
||||
{
|
||||
BX_ERROR_SCOPE(_err);
|
||||
int64_t offset = bx::seek(_reader);
|
||||
int32_t size = _reader->read(_data, _size, _err);
|
||||
bx::seek(_reader, offset, bx::Whence::Begin);
|
||||
return size;
|
||||
}
|
||||
|
||||
/// Peek value.
|
||||
template<typename Ty>
|
||||
inline int32_t peek(ReaderSeekerI* _reader, Ty& _value, Error* _err = NULL)
|
||||
{
|
||||
BX_ERROR_SCOPE(_err);
|
||||
BX_STATIC_ASSERT(BX_TYPE_IS_POD(Ty) );
|
||||
return peek(_reader, &_value, sizeof(Ty), _err);
|
||||
}
|
||||
|
||||
struct BX_NO_VTABLE WriterSeekerI : public WriterI, public SeekerI
|
||||
{
|
||||
};
|
||||
|
3
3rdparty/bx/include/tinystl/hash_base.h
vendored
3
3rdparty/bx/include/tinystl/hash_base.h
vendored
@ -33,6 +33,9 @@ namespace tinystl {
|
||||
|
||||
template<typename Key, typename Value>
|
||||
struct pair {
|
||||
typedef Key first_type;
|
||||
typedef Value second_type;
|
||||
|
||||
pair();
|
||||
pair(const Key& key, const Value& value);
|
||||
|
||||
|
12
3rdparty/bx/scripts/toolchain.lua
vendored
12
3rdparty/bx/scripts/toolchain.lua
vendored
@ -47,6 +47,7 @@ function toolchain(_buildDir, _libDir)
|
||||
allowed = {
|
||||
{ "vs2012-clang", "Clang 3.6" },
|
||||
{ "vs2013-clang", "Clang 3.6" },
|
||||
{ "vs2015-clang", "Clang 3.9" },
|
||||
{ "vs2012-xp", "Visual Studio 2012 targeting XP" },
|
||||
{ "vs2013-xp", "Visual Studio 2013 targeting XP" },
|
||||
{ "vs2015-xp", "Visual Studio 2015 targeting XP" },
|
||||
@ -339,7 +340,11 @@ function toolchain(_buildDir, _libDir)
|
||||
elseif _ACTION == "vs2012" or _ACTION == "vs2013" or _ACTION == "vs2015" then
|
||||
|
||||
if (_ACTION .. "-clang") == _OPTIONS["vs"] then
|
||||
premake.vstudio.toolset = ("LLVM-" .. _ACTION)
|
||||
if "vs2015-clang" == _OPTIONS["vs"] then
|
||||
premake.vstudio.toolset = ("LLVM-vs2014")
|
||||
else
|
||||
premake.vstudio.toolset = ("LLVM-" .. _ACTION)
|
||||
end
|
||||
location (path.join(_buildDir, "projects", _ACTION .. "-clang"))
|
||||
|
||||
elseif "winphone8" == _OPTIONS["vs"] then
|
||||
@ -746,10 +751,11 @@ function toolchain(_buildDir, _libDir)
|
||||
objdir (path.join(_buildDir, "android-arm/obj"))
|
||||
libdirs {
|
||||
path.join(_libDir, "lib/android-arm"),
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a",
|
||||
}
|
||||
includedirs {
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.8/libs/armeabi-v7a/include",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/libs/armeabi-v7a/include",
|
||||
"$(ANDROID_NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.9/include",
|
||||
}
|
||||
buildoptions {
|
||||
"--sysroot=" .. path.join("$(ANDROID_NDK_ROOT)/platforms", androidPlatform, "arch-arm"),
|
||||
|
27
3rdparty/bx/tests/float4_t.cpp
vendored
27
3rdparty/bx/tests/float4_t.cpp
vendored
@ -5,6 +5,7 @@
|
||||
|
||||
#include "test.h"
|
||||
#include <bx/float4_t.h>
|
||||
#include <bx/fpumath.h>
|
||||
#include <string.h>
|
||||
|
||||
using namespace bx;
|
||||
@ -70,10 +71,10 @@ void float4_check_float(const char* _str, bx::float4_t _a, float _0, float _1, f
|
||||
, _0, _1, _2, _3
|
||||
);
|
||||
|
||||
CHECK_EQUAL(c.f[0], _0);
|
||||
CHECK_EQUAL(c.f[1], _1);
|
||||
CHECK_EQUAL(c.f[2], _2);
|
||||
CHECK_EQUAL(c.f[3], _3);
|
||||
CHECK(bx::fequal(c.f[0], _0, 0.0001f) );
|
||||
CHECK(bx::fequal(c.f[1], _1, 0.0001f) );
|
||||
CHECK(bx::fequal(c.f[2], _2, 0.0001f) );
|
||||
CHECK(bx::fequal(c.f[3], _3, 0.0001f) );
|
||||
}
|
||||
|
||||
void float4_check_string(const char* _str, bx::float4_t _a)
|
||||
@ -235,6 +236,24 @@ TEST(float4_arithmetic)
|
||||
);
|
||||
}
|
||||
|
||||
TEST(float4_sqrt)
|
||||
{
|
||||
float4_check_float("float4_sqrt"
|
||||
, float4_sqrt(float4_ld(1.0f, 16.0f, 65536.0f, 123456.0f) )
|
||||
, 1.0f, 4.0f, 256.0f, 351.363060096f
|
||||
);
|
||||
|
||||
float4_check_float("float4_sqrt_nr_ni"
|
||||
, float4_sqrt_nr_ni(float4_ld(1.0f, 16.0f, 65536.0f, 123456.0f) )
|
||||
, 1.0f, 4.0f, 256.0f, 351.363060096f
|
||||
);
|
||||
|
||||
float4_check_float("float4_sqrt_nr1_ni"
|
||||
, float4_sqrt_nr1_ni(float4_ld(1.0f, 16.0f, 65536.0f, 123456.0f) )
|
||||
, 1.0f, 4.0f, 256.0f, 351.363060096f
|
||||
);
|
||||
}
|
||||
|
||||
TEST(float4)
|
||||
{
|
||||
const float4_t isplat = float4_isplat(0x80000001);
|
||||
|
BIN
3rdparty/bx/tools/bin/darwin/genie
vendored
BIN
3rdparty/bx/tools/bin/darwin/genie
vendored
Binary file not shown.
BIN
3rdparty/bx/tools/bin/linux/genie
vendored
BIN
3rdparty/bx/tools/bin/linux/genie
vendored
Binary file not shown.
BIN
3rdparty/bx/tools/bin/windows/genie.exe
vendored
BIN
3rdparty/bx/tools/bin/windows/genie.exe
vendored
Binary file not shown.
308
3rdparty/compat/winsdk-override/wrl/client.h
vendored
Normal file
308
3rdparty/compat/winsdk-override/wrl/client.h
vendored
Normal file
@ -0,0 +1,308 @@
|
||||
/**
|
||||
* This file has no copyright assigned and is placed in the Public Domain.
|
||||
* This file is part of the mingw-w64 runtime package.
|
||||
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
|
||||
*/
|
||||
|
||||
#ifndef _WRL_CLIENT_H_
|
||||
#define _WRL_CLIENT_H_
|
||||
|
||||
#include <stddef.h>
|
||||
#include <unknwn.h>
|
||||
/* #include <weakreference.h> */
|
||||
#include <roapi.h>
|
||||
|
||||
/* #include <wrl/def.h> */
|
||||
#include <wrl/internal.h>
|
||||
|
||||
namespace Microsoft {
|
||||
namespace WRL {
|
||||
namespace Details {
|
||||
template <typename T> class ComPtrRefBase {
|
||||
protected:
|
||||
T* ptr_;
|
||||
|
||||
public:
|
||||
typedef typename T::InterfaceType InterfaceType;
|
||||
|
||||
#ifndef __WRL_CLASSIC_COM__
|
||||
operator IInspectable**() const throw() {
|
||||
static_assert(__is_base_of(IInspectable, InterfaceType), "Invalid cast");
|
||||
return reinterpret_cast<IInspectable**>(ptr_->ReleaseAndGetAddressOf());
|
||||
}
|
||||
#endif
|
||||
|
||||
operator IUnknown**() const throw() {
|
||||
static_assert(__is_base_of(IUnknown, InterfaceType), "Invalid cast");
|
||||
return reinterpret_cast<IUnknown**>(ptr_->ReleaseAndGetAddressOf());
|
||||
}
|
||||
};
|
||||
|
||||
template <typename T> class ComPtrRef : public Details::ComPtrRefBase<T> {
|
||||
public:
|
||||
ComPtrRef(T *ptr) throw() {
|
||||
ComPtrRefBase<T>::ptr_ = ptr;
|
||||
}
|
||||
|
||||
operator void**() const throw() {
|
||||
return reinterpret_cast<void**>(ComPtrRefBase<T>::ptr_->ReleaseAndGetAddressOf());
|
||||
}
|
||||
|
||||
operator T*() throw() {
|
||||
*ComPtrRefBase<T>::ptr_ = nullptr;
|
||||
return ComPtrRefBase<T>::ptr_;
|
||||
}
|
||||
|
||||
operator typename ComPtrRefBase<T>::InterfaceType**() throw() {
|
||||
return ComPtrRefBase<T>::ptr_->ReleaseAndGetAddressOf();
|
||||
}
|
||||
|
||||
typename ComPtrRefBase<T>::InterfaceType *operator*() throw() {
|
||||
return ComPtrRefBase<T>::ptr_->Get();
|
||||
}
|
||||
|
||||
typename ComPtrRefBase<T>::InterfaceType *const *GetAddressOf() const throw() {
|
||||
return ComPtrRefBase<T>::ptr_->GetAddressOf();
|
||||
}
|
||||
|
||||
typename ComPtrRefBase<T>::InterfaceType **ReleaseAndGetAddressOf() throw() {
|
||||
return ComPtrRefBase<T>::ptr_->ReleaseAndGetAddressOf();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
template<typename T> class ComPtr {
|
||||
public:
|
||||
typedef T InterfaceType;
|
||||
|
||||
ComPtr() throw() : ptr_(nullptr) {}
|
||||
ComPtr(decltype(nullptr)) throw() : ptr_(nullptr) {}
|
||||
|
||||
template<class U> ComPtr(U *other) throw() : ptr_(other.ptr_) {
|
||||
InternalAddRef();
|
||||
}
|
||||
|
||||
ComPtr(const ComPtr &other) throw() : ptr_(other.ptr_) {
|
||||
InternalAddRef();
|
||||
}
|
||||
|
||||
template<class U>
|
||||
ComPtr(const ComPtr<U> &other) throw() : ptr_(other.ptr_) {
|
||||
InternalAddRef();
|
||||
}
|
||||
|
||||
ComPtr(ComPtr &&other) throw() : ptr_(nullptr) {
|
||||
if(this != reinterpret_cast<ComPtr*>(&reinterpret_cast<unsigned char&>(other)))
|
||||
Swap(other);
|
||||
}
|
||||
|
||||
template<class U>
|
||||
ComPtr(ComPtr<U>&& other) throw() : ptr_(other.ptr_) {
|
||||
other.ptr_ = nullptr;
|
||||
}
|
||||
|
||||
~ComPtr() throw() {
|
||||
InternalRelease();
|
||||
}
|
||||
|
||||
ComPtr &operator=(decltype(nullptr)) throw() {
|
||||
InternalRelease();
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComPtr &operator=(InterfaceType *other) throw() {
|
||||
if (ptr_ != other) {
|
||||
InternalRelease();
|
||||
ptr_ = other;
|
||||
InternalAddRef();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
ComPtr &operator=(U *other) throw() {
|
||||
if (ptr_ != other) {
|
||||
InternalRelease();
|
||||
ptr_ = other;
|
||||
InternalAddRef();
|
||||
}
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComPtr& operator=(const ComPtr &other) throw() {
|
||||
if (ptr_ != other.ptr_)
|
||||
ComPtr(other).Swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class U>
|
||||
ComPtr &operator=(const ComPtr<U> &other) throw() {
|
||||
ComPtr(other).Swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
ComPtr& operator=(ComPtr &&other) throw() {
|
||||
ComPtr(other).Swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
template<class U>
|
||||
ComPtr& operator=(ComPtr<U> &&other) throw() {
|
||||
ComPtr(other).Swap(*this);
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Swap(ComPtr &&r) throw() {
|
||||
InterfaceType *tmp = ptr_;
|
||||
ptr_ = r.ptr_;
|
||||
r.ptr_ = tmp;
|
||||
}
|
||||
|
||||
void Swap(ComPtr &r) throw() {
|
||||
InterfaceType *tmp = ptr_;
|
||||
ptr_ = r.ptr_;
|
||||
r.ptr_ = tmp;
|
||||
}
|
||||
|
||||
operator Details::BoolType() const throw() {
|
||||
return Get() != nullptr ? &Details::BoolStruct::Member : nullptr;
|
||||
}
|
||||
|
||||
InterfaceType *Get() const throw() {
|
||||
return ptr_;
|
||||
}
|
||||
|
||||
InterfaceType *operator->() const throw() {
|
||||
return ptr_;
|
||||
}
|
||||
|
||||
Details::ComPtrRef<ComPtr<T>> operator&() throw() {
|
||||
return Details::ComPtrRef<ComPtr<T>>(this);
|
||||
}
|
||||
|
||||
const Details::ComPtrRef<const ComPtr<T>> operator&() const throw() {
|
||||
return Details::ComPtrRef<const ComPtr<T>>(this);
|
||||
}
|
||||
|
||||
InterfaceType *const *GetAddressOf() const throw() {
|
||||
return &ptr_;
|
||||
}
|
||||
|
||||
InterfaceType **GetAddressOf() throw() {
|
||||
return &ptr_;
|
||||
}
|
||||
|
||||
InterfaceType **ReleaseAndGetAddressOf() throw() {
|
||||
InternalRelease();
|
||||
return &ptr_;
|
||||
}
|
||||
|
||||
InterfaceType *Detach() throw() {
|
||||
T* ptr = ptr_;
|
||||
ptr_ = nullptr;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
void Attach(InterfaceType *other) throw() {
|
||||
if (ptr_ != other) {
|
||||
InternalRelease();
|
||||
ptr_ = other;
|
||||
InternalAddRef();
|
||||
}
|
||||
}
|
||||
|
||||
unsigned long Reset() {
|
||||
return InternalRelease();
|
||||
}
|
||||
|
||||
HRESULT CopyTo(InterfaceType **ptr) const throw() {
|
||||
InternalAddRef();
|
||||
*ptr = ptr_;
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
HRESULT CopyTo(REFIID riid, void **ptr) const throw() {
|
||||
return ptr_->QueryInterface(riid, ptr);
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
HRESULT CopyTo(U **ptr) const throw() {
|
||||
return ptr_->QueryInterface(__uuidof(U), reinterpret_cast<void**>(ptr));
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
HRESULT As(Details::ComPtrRef<ComPtr<U>> p) const throw() {
|
||||
return ptr_->QueryInterface(__uuidof(U), p);
|
||||
}
|
||||
|
||||
template<typename U>
|
||||
HRESULT As(ComPtr<U> *p) const throw() {
|
||||
return ptr_->QueryInterface(__uuidof(U), reinterpret_cast<void**>(p->ReleaseAndGetAddressOf()));
|
||||
}
|
||||
|
||||
HRESULT AsIID(REFIID riid, ComPtr<IUnknown> *p) const throw() {
|
||||
return ptr_->QueryInterface(riid, reinterpret_cast<void**>(p->ReleaseAndGetAddressOf()));
|
||||
}
|
||||
|
||||
/*
|
||||
HRESULT AsWeak(WeakRef *pWeakRef) const throw() {
|
||||
return ::Microsoft::WRL::AsWeak(ptr_, pWeakRef);
|
||||
}
|
||||
*/
|
||||
protected:
|
||||
InterfaceType *ptr_;
|
||||
|
||||
void InternalAddRef() const throw() {
|
||||
if(ptr_)
|
||||
ptr_->AddRef();
|
||||
}
|
||||
|
||||
unsigned long InternalRelease() throw() {
|
||||
InterfaceType *tmp = ptr_;
|
||||
if(!tmp)
|
||||
return 0;
|
||||
ptr_ = nullptr;
|
||||
return tmp->Release();
|
||||
}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
void **IID_PPV_ARGS_Helper(::Microsoft::WRL::Details::ComPtrRef<T> pp) throw() {
|
||||
static_assert(__is_base_of(IUnknown, typename T::InterfaceType), "Expected COM interface");
|
||||
return pp;
|
||||
}
|
||||
|
||||
namespace Windows {
|
||||
namespace Foundation {
|
||||
template<typename T>
|
||||
inline HRESULT ActivateInstance(HSTRING classid, ::Microsoft::WRL::Details::ComPtrRef<T> instance) throw() {
|
||||
return ActivateInstance(classid, instance.ReleaseAndGetAddressOf());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline HRESULT GetActivationFactory(HSTRING classid, ::Microsoft::WRL::Details::ComPtrRef<T> factory) throw() {
|
||||
return RoGetActivationFactory(classid, IID_INS_ARGS(factory.ReleaseAndGetAddressOf()));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
namespace ABI {
|
||||
namespace Windows {
|
||||
namespace Foundation {
|
||||
template<typename T>
|
||||
inline HRESULT ActivateInstance(HSTRING classid, ::Microsoft::WRL::Details::ComPtrRef<T> instance) throw() {
|
||||
return ActivateInstance(classid, instance.ReleaseAndGetAddressOf());
|
||||
}
|
||||
|
||||
template<typename T>
|
||||
inline HRESULT GetActivationFactory(HSTRING classid, ::Microsoft::WRL::Details::ComPtrRef<T> factory) throw() {
|
||||
return RoGetActivationFactory(classid, IID_INS_ARGS(factory.ReleaseAndGetAddressOf()));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
@ -7,9 +7,9 @@ A couple of comments about the 6k/8k images:
|
||||
- game code occupies 6k, but there can be different chips inside the actual carts:
|
||||
1x8k eprom, 2x4k eproms or 1x2k + 1x4k eproms. In the 1x8k case, the console
|
||||
actually accesses only the first 2k and the final 4k.
|
||||
There have been found carts where the remaining part is empty, and carts where the lower
|
||||
2k are repeated (see the Alt dumps below), but the dumps are basically the same and
|
||||
a Creativision would not see the difference between them.
|
||||
Carts were found where the remaining part is empty, and carts were found where the
|
||||
lower 2k are repeated (see the Alt dumps below), but the dumps are basically the
|
||||
same and a Creativision would not see the difference between them.
|
||||
|
||||
-->
|
||||
|
||||
@ -475,7 +475,7 @@ time! Hence, this is not a situation of usage of "Alt PCB" for these carts.
|
||||
<!-- Reminder: Tennis 8k got found both in PCB with 2 chips (4k+4k) and in PCB with 1 chip (8k)... split accordingly! -->
|
||||
<software name="tennisa" cloneof="tennis">
|
||||
<description>Tennis (Wimbledon, 8k Cart)</description>
|
||||
<year>1981</year>
|
||||
<year>1982</year>
|
||||
<publisher>Video Technology Ltd.</publisher>
|
||||
<info name="serial" value="8004" />
|
||||
<part name="cart" interface="crvision_cart">
|
||||
@ -488,7 +488,7 @@ time! Hence, this is not a situation of usage of "Alt PCB" for these carts.
|
||||
|
||||
<software name="tennisb" cloneof="tennis">
|
||||
<description>Tennis (Wimbledon, 8k Cart, Alt ROM config)</description>
|
||||
<year>1981</year>
|
||||
<year>1982</year>
|
||||
<publisher>Video Technology Ltd.</publisher>
|
||||
<info name="serial" value="8004" />
|
||||
<part name="cart" interface="crvision_cart">
|
||||
@ -513,9 +513,23 @@ time! Hence, this is not a situation of usage of "Alt PCB" for these carts.
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="tennisd" cloneof="tennis">
|
||||
<description>Tennis (Dick Smith, 6k Cart)</description>
|
||||
<year>1981</year>
|
||||
<software name="tennisd1" cloneof="tennis">
|
||||
<description>Tennis (Dick Smith, earlier, 6k Cart)</description>
|
||||
<year>1982</year>
|
||||
<publisher>Video Technology Ltd.</publisher>
|
||||
<info name="serial" value="Y-1620" />
|
||||
<part name="cart" interface="crvision_cart">
|
||||
<feature name="slot" value="crv_rom6k" />
|
||||
<dataarea name="rom" size="6144">
|
||||
<rom name="tnb.bin" size="4096" crc="709adc2b" sha1="f196fcfb1f2debafb46e2f93bc2ab481614d8a3f" offset="0x0000" />
|
||||
<rom name="tea.bin" size="2048" crc="d669020b" sha1="523bf43e6c237d04e9649bf7beb1da278a346752" offset="0x1000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="tennisd2" cloneof="tennis">
|
||||
<description>Tennis (Dick Smith, later, 6k Cart)</description>
|
||||
<year>1982</year>
|
||||
<publisher>Video Technology Ltd.</publisher>
|
||||
<info name="serial" value="Y-1620" />
|
||||
<part name="cart" interface="crvision_cart">
|
||||
@ -528,9 +542,9 @@ time! Hence, this is not a situation of usage of "Alt PCB" for these carts.
|
||||
</software>
|
||||
|
||||
<!-- Reminder: Tennis 8k got found both in PCB with 2 chips (4k+4k) and in PCB with 1 chip (8k)... split accordingly! -->
|
||||
<software name="tennisda" cloneof="tennis">
|
||||
<software name="tennisd2a" cloneof="tennis">
|
||||
<description>Tennis (Dick Smith, 8k Cart)</description>
|
||||
<year>1981</year>
|
||||
<year>1982</year>
|
||||
<publisher>Video Technology Ltd.</publisher>
|
||||
<info name="serial" value="Y-1620" />
|
||||
<part name="cart" interface="crvision_cart">
|
||||
|
@ -520,6 +520,18 @@ C1066 - ??
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="gprace" supported="no">
|
||||
<description>GP Race</description>
|
||||
<year>1992</year>
|
||||
<publisher>Bit Corporation</publisher>
|
||||
<info name="serial" value="C1056" />
|
||||
<part name="cart" interface="gamate_cart">
|
||||
<dataarea name="rom" size="131072">
|
||||
<rom name="c1-056.bin" size="131072" crc="447595e4" sha1="1b471f8ac8ffb107c62ec3b765c43e268d90b73a" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="fanttrav" supported="no">
|
||||
<description>Fantasy Travel</description>
|
||||
<year>1993</year>
|
||||
|
@ -9993,14 +9993,14 @@ a certain item) -->
|
||||
</software>
|
||||
|
||||
<software name="mgear">
|
||||
<description>Master Gear Adapter</description>
|
||||
<description>Master Gear Converter</description>
|
||||
<year>1991</year>
|
||||
<publisher>Sega</publisher>
|
||||
<part name="cart" interface="gamegear_cart">
|
||||
<feature name="slot" value="mgear" />
|
||||
<feature name="pin_42" value="sms_mode" />
|
||||
<dataarea name="rom" size="1">
|
||||
<!-- this cartridge is just an adapted -->
|
||||
<!-- this cartridge is just an adapter -->
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
22
hash/sms.xml
22
hash/sms.xml
@ -2376,17 +2376,6 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="felipe" cloneof="teddyboy">
|
||||
<description>Felipe em Acao (Bra)</description>
|
||||
<year>19??</year>
|
||||
<publisher>Tec Toy</publisher>
|
||||
<part name="cart" interface="sms_cart">
|
||||
<dataarea name="rom" size="32768">
|
||||
<rom name="felipe em acao (b).bin" size="32768" crc="ccb2cab4" sha1="b7601ff0116490b85c9bd50109db175ce2dd9104" offset="000000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="ferias">
|
||||
<description>Férias Frustradas do Pica-Pau (Bra)</description>
|
||||
<year>1996</year>
|
||||
@ -6720,17 +6709,6 @@
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="treinam">
|
||||
<description>Treinamento Do Mymo (Bra)</description>
|
||||
<year>19??</year>
|
||||
<publisher>Tec Toy</publisher>
|
||||
<part name="cart" interface="sms_cart">
|
||||
<dataarea name="rom" size="262144">
|
||||
<rom name="treinamento do mymo (b).bin" size="262144" crc="e94784f2" sha1="327c3518363ee060b681ff34c0b2eea3ffea27e4" offset="000000" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<software name="trivial">
|
||||
<description>Trivial Pursuit - Genus Edition (Euro)</description>
|
||||
<year>1992</year>
|
||||
|
@ -17,13 +17,11 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
|
||||
<year>1983</year>
|
||||
<publisher>Spectravideo</publisher>
|
||||
<info name="serial" value="SD291C" />
|
||||
|
||||
<part name="cart" interface="svi318_cart">
|
||||
<dataarea name="rom" size="32768">
|
||||
<rom name="flipper slipper.rom" size="32768" crc="f0c51214" sha1="7acd00c9053fbf7f7d698485759d170a483b123d" offset="0x0000" />
|
||||
<rom name="flipper slipper.rom" size="32768" crc="f0c51214" sha1="7acd00c9053fbf7f7d698485759d170a483b123d" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
|
||||
</software>
|
||||
|
||||
<software name="ffreddy">
|
||||
@ -34,10 +32,9 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
|
||||
|
||||
<part name="cart" interface="svi318_cart">
|
||||
<dataarea name="rom" size="32768">
|
||||
<rom name="frantic freddy.rom" size="32768" crc="cb553ee5" sha1="60adadb294d5492dfe6ada4b0710c5c31ef3e69c" offset="0x0000" />
|
||||
<rom name="frantic freddy.rom" size="32768" crc="cb553ee5" sha1="60adadb294d5492dfe6ada4b0710c5c31ef3e69c" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
|
||||
</software>
|
||||
|
||||
<!-- According to the SVI Official Catalog this was released as a tape only, But a cart dump does exist
|
||||
@ -45,13 +42,11 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
|
||||
<description>Music Mentor</description>
|
||||
<year>1983</year>
|
||||
<publisher>Spectravideo</publisher>
|
||||
|
||||
<part name="cart" interface="svi318_cart">
|
||||
<dataarea name="rom" size="32768">
|
||||
<rom name="music mentor.rom" size="32768" crc="ba0c3d3c" sha1="0ebb91dcc99c0c361d8855387079bc62a41d05d8" offset="0x0000" />
|
||||
<rom name="music mentor.rom" size="32768" crc="ba0c3d3c" sha1="0ebb91dcc99c0c361d8855387079bc62a41d05d8" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
|
||||
</software>
|
||||
-->
|
||||
|
||||
@ -60,13 +55,11 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
|
||||
<year>1983</year>
|
||||
<publisher>Spectravideo</publisher>
|
||||
<info name="serial" value="SD220C" />
|
||||
|
||||
<part name="cart" interface="svi318_cart">
|
||||
<dataarea name="rom" size="32768">
|
||||
<rom name="sector alpha.rom" size="32768" crc="015f29ff" sha1="c48266a71e940b903d446561f629b58f3fc9cc8c" offset="0x0000" />
|
||||
<rom name="sector alpha.rom" size="32768" crc="015f29ff" sha1="c48266a71e940b903d446561f629b58f3fc9cc8c" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
|
||||
</software>
|
||||
|
||||
<software name="supxfrce">
|
||||
@ -74,13 +67,23 @@ Amoured Assault SD233C // Was availible on Cartridge and/or Tape
|
||||
<year>1983</year>
|
||||
<publisher>Spectravideo</publisher>
|
||||
<info name="serial" value="SD237C" />
|
||||
|
||||
<part name="cart" interface="svi318_cart">
|
||||
<dataarea name="rom" size="32768">
|
||||
<rom name="supercross.rom" size="32768" crc="8d9d1db3" sha1="73f750d454b32d7bf6bb1c966135a022ce1de92a" offset="0x0000" />
|
||||
<rom name="supercross.rom" size="32768" crc="8d9d1db3" sha1="73f750d454b32d7bf6bb1c966135a022ce1de92a" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
</software>
|
||||
|
||||
<!-- http://www.pouet.net/prod.php?which=65911 -->
|
||||
<software name="prerelea">
|
||||
<description>Pre-Release</description>
|
||||
<year>2015</year>
|
||||
<publisher>Five Finger Punch</publisher>
|
||||
<part name="cart" interface="svi318_cart">
|
||||
<dataarea name="rom" size="65536">
|
||||
<rom name="pre-release.rom" size="65536" crc="fa90692e" sha1="5b5fbc309ffe2608b2fed2a4fba8ef73ad68733d" offset="0" />
|
||||
</dataarea>
|
||||
</part>
|
||||
|
||||
</software>
|
||||
|
||||
</softwarelist>
|
||||
|
@ -11,7 +11,7 @@ msgstr ""
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2016-03-18 22:01+0100\n"
|
||||
"PO-Revision-Date: 2016-03-05 13:02+0100\n"
|
||||
"Last-Translator: Ismael Ferreras Morezuelas <swyterzone+mame@gmail.com>\n"
|
||||
"Last-Translator: aviloria\n"
|
||||
"Language-Team: Español; Castellano <>\n"
|
||||
"Language: es\n"
|
||||
"MIME-Version: 1.0\n"
|
||||
@ -329,7 +329,7 @@ msgstr "Ajustes de color de interfaz"
|
||||
#: src/emu/ui/custui.cpp:568
|
||||
#, c-format
|
||||
msgid "Double click or press %1$s to change the color value"
|
||||
msgstr ""
|
||||
msgstr "Haz doble clic o pulsa %1$s para cambiar el color"
|
||||
|
||||
#: src/emu/ui/custui.cpp:594
|
||||
msgid "Menu Preview"
|
||||
@ -447,7 +447,7 @@ msgstr "Puntuación MAME"
|
||||
|
||||
#: src/emu/ui/datmenu.cpp:289 src/emu/ui/selgame.cpp:43
|
||||
msgid "Command"
|
||||
msgstr "Órden"
|
||||
msgstr "Orden"
|
||||
|
||||
#: src/emu/ui/dirmenu.cpp:31
|
||||
msgid "ROMs"
|
||||
@ -487,7 +487,7 @@ msgstr "Capturas"
|
||||
|
||||
#: src/emu/ui/dirmenu.cpp:41 src/emu/ui/menu.cpp:44
|
||||
msgid "Cabinets"
|
||||
msgstr "Cajas arcade"
|
||||
msgstr "Cabinas arcade"
|
||||
|
||||
#: src/emu/ui/dirmenu.cpp:42 src/emu/ui/menu.cpp:47
|
||||
msgid "Flyers"
|
||||
@ -499,7 +499,7 @@ msgstr "Títulos"
|
||||
|
||||
#: src/emu/ui/dirmenu.cpp:44 src/emu/ui/menu.cpp:49
|
||||
msgid "Ends"
|
||||
msgstr "Extremos"
|
||||
msgstr "Finales"
|
||||
|
||||
#: src/emu/ui/dirmenu.cpp:45 src/emu/ui/menu.cpp:46
|
||||
msgid "PCBs"
|
||||
@ -507,7 +507,7 @@ msgstr "Circuitos impresos"
|
||||
|
||||
#: src/emu/ui/dirmenu.cpp:46 src/emu/ui/menu.cpp:58 src/emu/ui/videoopt.cpp:223
|
||||
msgid "Marquees"
|
||||
msgstr "Marcos"
|
||||
msgstr "Marquesinas"
|
||||
|
||||
#: src/emu/ui/dirmenu.cpp:47
|
||||
msgid "Controls Panels"
|
||||
@ -590,7 +590,7 @@ msgstr "Añadir carpeta %1$s - Buscar: %2$s_"
|
||||
|
||||
#: src/emu/ui/dirmenu.cpp:534
|
||||
msgid "Press TAB to set"
|
||||
msgstr "Pulsa TAB para fijar"
|
||||
msgstr "Pulsa TAB para establecer"
|
||||
|
||||
#: src/emu/ui/dirmenu.cpp:640
|
||||
#, c-format
|
||||
@ -688,7 +688,7 @@ msgstr "Crear"
|
||||
|
||||
#: src/emu/ui/filesel.cpp:314
|
||||
msgid "Please enter a file extension too"
|
||||
msgstr "Es necesario que el nombre también tenga una extensión"
|
||||
msgstr "Por favor, introduzca también la extensión del fichero"
|
||||
|
||||
#: src/emu/ui/filesel.cpp:502 src/emu/ui/swlist.cpp:65
|
||||
msgid "[empty slot]"
|
||||
@ -736,7 +736,7 @@ msgid ""
|
||||
"Please select a different one."
|
||||
msgstr ""
|
||||
"Al software elegido le falta una o varias imágenes CHD o ROM necesarias. "
|
||||
"Prueba eligiendo otro distinto."
|
||||
"Por favor elige otro distinto."
|
||||
|
||||
#: src/emu/ui/info.cpp:98
|
||||
msgid "Not supported"
|
||||
@ -1109,7 +1109,7 @@ msgstr "Lista de selección - Buscar: "
|
||||
#: src/emu/ui/selector.cpp:194
|
||||
#, c-format
|
||||
msgid "Double click or press %1$s to select"
|
||||
msgstr ""
|
||||
msgstr "Haz doble clic o pulsa %1$s para elegir"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:38
|
||||
msgid "General Info"
|
||||
@ -1141,10 +1141,10 @@ msgid ""
|
||||
"\n"
|
||||
"Press any key (except ESC) to continue."
|
||||
msgstr ""
|
||||
"Falta la máquina seleccionada o una o más de sus ROM o imágenes CHD. Prueba "
|
||||
"eligiendo otra máquina.\n"
|
||||
"Falta la máquina seleccionada o una o más de sus ROM o imágenes CHD. "
|
||||
"Por favor, elige otra máquina.\n"
|
||||
"\n"
|
||||
"Pulsa cualquier tecla menos ESC para continuar."
|
||||
"Pulsa cualquier tecla (menos ESC) para continuar."
|
||||
|
||||
#: src/emu/ui/selgame.cpp:648 src/emu/ui/simpleselgame.cpp:262
|
||||
msgid "Configure Options"
|
||||
@ -1220,7 +1220,7 @@ msgstr "Gráficos: Aceptables, "
|
||||
|
||||
#: src/emu/ui/selgame.cpp:920 src/emu/ui/selsoft.cpp:774
|
||||
msgid "Sound: Unimplemented"
|
||||
msgstr "Sonido: Por hacer"
|
||||
msgstr "Sonido: Sin implementar"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:922 src/emu/ui/selsoft.cpp:776
|
||||
msgid "Sound: Imperfect"
|
||||
@ -1316,7 +1316,7 @@ msgstr "Gráficos: Aceptables\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1606
|
||||
msgid "Sound: Unimplemented\n"
|
||||
msgstr "Sonido: Por hacer\n"
|
||||
msgstr "Sonido: Sin implementar\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1608
|
||||
msgid "Sound: Imperfect\n"
|
||||
@ -1339,12 +1339,12 @@ msgstr "El juego es mecánico: %1$s\n"
|
||||
#: src/emu/ui/selgame.cpp:1614
|
||||
#, c-format
|
||||
msgid "Requires Artwork: %1$s\n"
|
||||
msgstr "Necesita arte: %1$s\n"
|
||||
msgstr "Requiere arte: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1615
|
||||
#, c-format
|
||||
msgid "Requires Clickable Artwork: %1$s\n"
|
||||
msgstr "Necesita arte clicable: %1$s\n"
|
||||
msgstr "Requiere arte clicable: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1616
|
||||
#, c-format
|
||||
@ -1381,31 +1381,31 @@ msgstr "Necesita CHD: %1$s\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1640
|
||||
msgid "Roms Audit Pass: OK\n"
|
||||
msgstr "Cumple con la auditoría de ROMs: SÍ\n"
|
||||
msgstr "Auditoría de ROMs: CORRECTA\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1642
|
||||
msgid "Roms Audit Pass: BAD\n"
|
||||
msgstr "Cumple con la auditoría de ROMs: NO\n"
|
||||
msgstr "Auditoría de ROMs: INCORRECTA\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1645
|
||||
msgid "Samples Audit Pass: None Needed\n"
|
||||
msgstr "Cumple con la auditoría de las muestras: Innecesaria\n"
|
||||
msgstr "Auditoría de las muestras: No Necesaria\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1647
|
||||
msgid "Samples Audit Pass: OK\n"
|
||||
msgstr "Cumple con la auditoría de las muestras: BIEN\n"
|
||||
msgstr "Auditoría de las muestras: CORRECTA\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1649
|
||||
msgid "Samples Audit Pass: BAD\n"
|
||||
msgstr "Cumple con la auditoría de las muestras: MAL\n"
|
||||
msgstr "Auditoría de las muestras: INCORRECTA\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:1652
|
||||
msgid ""
|
||||
"Roms Audit Pass: Disabled\n"
|
||||
"Samples Audit Pass: Disabled\n"
|
||||
msgstr ""
|
||||
"Cumple con la auditoría de las ROMs: Desactivado\n"
|
||||
"Cumple con la auditoría de las muestras: Desactivado\n"
|
||||
"Auditoría de las ROMs: Desactivado\n"
|
||||
"Auditoría de las muestras: Desactivado\n"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:2089 src/emu/ui/selgame.cpp:2250
|
||||
#: src/emu/ui/selsoft.cpp:1657
|
||||
@ -1414,7 +1414,7 @@ msgstr "No hay información disponible"
|
||||
|
||||
#: src/emu/ui/selgame.cpp:2202 src/emu/ui/selsoft.cpp:1604
|
||||
msgid "Usage"
|
||||
msgstr "Uso"
|
||||
msgstr "Utilización"
|
||||
|
||||
#: src/emu/ui/selsoft.cpp:109
|
||||
msgid " (default)"
|
||||
@ -1427,10 +1427,10 @@ msgid ""
|
||||
"\n"
|
||||
"Press any key (except ESC) to continue."
|
||||
msgstr ""
|
||||
"Al software elegido le falta uno o varios archivos necesarios. Elige otro "
|
||||
"software.\n"
|
||||
"Al software elegido le falta uno o varios archivos necesarios. Por favor, "
|
||||
"elige otro software.\n"
|
||||
"\n"
|
||||
"Pulsa cualquier tecla menos ESC para continuar."
|
||||
"Pulsa cualquier tecla (menos ESC) para continuar."
|
||||
|
||||
#: src/emu/ui/selsoft.cpp:682
|
||||
#, c-format
|
||||
@ -1497,8 +1497,8 @@ msgstr ""
|
||||
"No se ha encontrado ninguna máquina. Comprueba el «rompath» en el archivo "
|
||||
"%1$s.ini.\n"
|
||||
"\n"
|
||||
"Si es la primera vez que utilizas %2$s échale un vistazo al archivo «config."
|
||||
"txt» en la carpeta «docs» para informarte de cómo configurar %2$s."
|
||||
"Si es la primera vez que utilizas %2$s, por favor, échale un vistazo al archivo "
|
||||
"«config.txt» de la carpeta «docs» para informarte sobre cómo configurar %2$s."
|
||||
|
||||
#: src/emu/ui/simpleselgame.cpp:287
|
||||
#, c-format
|
||||
@ -1524,7 +1524,7 @@ msgstr "Aceptable"
|
||||
|
||||
#: src/emu/ui/simpleselgame.cpp:345
|
||||
msgid "Unimplemented"
|
||||
msgstr "Por hacer"
|
||||
msgstr "No implementado"
|
||||
|
||||
#: src/emu/ui/simpleselgame.cpp:351
|
||||
#, c-format
|
||||
@ -1629,8 +1629,8 @@ msgid ""
|
||||
"\n"
|
||||
"Otherwise, type OK or move the joystick left then right to continue"
|
||||
msgstr ""
|
||||
"El uso de emuladores en ROMs que no poseas legalmente suele estar prohibido "
|
||||
"por leyes de propiedad intelectual en varios paises.\n"
|
||||
"El uso de emuladores junto con ROMs que no poseas legalmente está prohibido "
|
||||
"por las leyes de propiedad intelectual.\n"
|
||||
"\n"
|
||||
"SI NO TIENES PERMISO PARA JUGAR A «%1$s» PULSA ESC.\n"
|
||||
"\n"
|
||||
@ -1641,8 +1641,8 @@ msgid ""
|
||||
"One or more ROMs/CHDs for this machine are incorrect. The machine may not "
|
||||
"run correctly.\n"
|
||||
msgstr ""
|
||||
"Uno o más ROMs/CHDs de esta máquina son incorrectos, por lo que la máquina "
|
||||
"podría no funcionar correctamente.\n"
|
||||
"Uno o más ROMs/CHDs de esta máquina son incorrectos. La máquina podría "
|
||||
"no funcionar correctamente.\n"
|
||||
|
||||
#: src/emu/ui/ui.cpp:1094
|
||||
msgid ""
|
||||
@ -1691,7 +1691,7 @@ msgstr "Voltear la pantalla en modo cóctel no está soportado.\n"
|
||||
|
||||
#: src/emu/ui/ui.cpp:1119
|
||||
msgid "The machine requires external artwork files\n"
|
||||
msgstr "La máquina requiere necesita datos gráficos externos\n"
|
||||
msgstr "La máquina requiere ficheros de arte externos\n"
|
||||
|
||||
#: src/emu/ui/ui.cpp:1124
|
||||
msgid ""
|
||||
@ -1706,12 +1706,12 @@ msgid ""
|
||||
"This machine has no sound hardware, MAME will produce no sounds, this is "
|
||||
"expected behaviour.\n"
|
||||
msgstr ""
|
||||
"Esta máquina no soporta sonido, por lo que MAME no reproducirá audio, no te "
|
||||
"sorprendas si no escuchas nada.\n"
|
||||
"Esta máquina no soporta sonido, por lo que MAME no reproducirá audio, este "
|
||||
"es el comportamiento esperado.\n"
|
||||
|
||||
#: src/emu/ui/ui.cpp:1137
|
||||
msgid "The machine has protection which isn't fully emulated.\n"
|
||||
msgstr "La máquina todavía no emula del todo el sistema de protección.\n"
|
||||
msgstr "La máquina todavía no emula completamente el sistema de protección.\n"
|
||||
|
||||
#: src/emu/ui/ui.cpp:1140
|
||||
msgid ""
|
||||
|
34
makefile
34
makefile
@ -844,6 +844,7 @@ FULLTARGET := $(TARGET)$(SUBTARGET)
|
||||
endif
|
||||
PROJECTDIR := $(BUILDDIR)/projects/$(OSD)/$(FULLTARGET)
|
||||
PROJECTDIR_MINI := $(BUILDDIR)/projects/osdmini/$(FULLTARGET)
|
||||
PROJECTDIR_SDL := $(BUILDDIR)/projects/sdl/$(FULLTARGET)
|
||||
PROJECTDIR_WIN := $(BUILDDIR)/projects/windows/$(FULLTARGET)
|
||||
|
||||
.PHONY: all clean regenie generate
|
||||
@ -1296,16 +1297,40 @@ endif
|
||||
$(SILENT) $(GENIE) $(PARAMS) $(TARGET_PARAMS) --gcc=steamlink --gcc_version=$(GCC_VERSION) --NO_OPENGL=1 --NO_USE_MIDI=1 --NO_X11=1 --NOASM=1 --SDL_INSTALL_ROOT=$(MARVELL_ROOTFS)/usr gmake
|
||||
|
||||
.PHONY: steamlink
|
||||
steamlink: generate $(PROJECTDIR)/gmake-steamlink/Makefile
|
||||
ifndef MARVELL_SDK_PATH
|
||||
$(error MARVELL_SDK_PATH is not set)
|
||||
endif
|
||||
ifndef MARVELL_ROOTFS
|
||||
$(error MARVELL_ROOTFS is not set)
|
||||
endif
|
||||
steamlink: generate $(PROJECTDIR)/gmake-steamlink/Makefile
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG) precompile
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR)/gmake-steamlink config=$(CONFIG)
|
||||
|
||||
#-------------------------------------------------
|
||||
# gmake-rpi
|
||||
#-------------------------------------------------
|
||||
|
||||
$(PROJECTDIR_SDL)/gmake-rpi/Makefile: makefile $(SCRIPTS) $(GENIE)
|
||||
ifndef RASPBERRY_SDK_PATH
|
||||
$(error RASPBERRY_SDK_PATH is not set)
|
||||
endif
|
||||
ifndef RASPBERRY_SYSROOT
|
||||
$(error RASPBERRY_SYSROOT is not set)
|
||||
endif
|
||||
$(SILENT) $(GENIE) $(PARAMS) --gcc=rpi --gcc_version=4.9.2 --osd=sdl --targetos=rpi --targetos=rpi --NO_USE_MIDI=1 --PLATFORM=arm --NOASM=1 --USE_QTDEBUG=0 --SDL_INSTALL_ROOT=$(RASPBERRY_SYSROOT)/usr gmake
|
||||
|
||||
.PHONY: rpi
|
||||
rpi: generate $(PROJECTDIR_SDL)/gmake-rpi/Makefile
|
||||
ifndef RASPBERRY_SDK_PATH
|
||||
$(error RASPBERRY_SDK_PATH is not set)
|
||||
endif
|
||||
ifndef RASPBERRY_SYSROOT
|
||||
$(error RASPBERRY_SYSROOT is not set)
|
||||
endif
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_SDL)/gmake-rpi config=$(CONFIG) precompile
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C $(PROJECTDIR_SDL)/gmake-rpi config=$(CONFIG)
|
||||
|
||||
#-------------------------------------------------
|
||||
# cmake
|
||||
#-------------------------------------------------
|
||||
@ -1486,9 +1511,12 @@ cppcheck:
|
||||
# BGFX shaders
|
||||
#-------------------------------------------------
|
||||
|
||||
.PHONY: shaders
|
||||
.PHONY: shaders bgfx-tools
|
||||
|
||||
shaders:
|
||||
bgfx-tools:
|
||||
$(SILENT) $(MAKE) $(MAKEPARAMS) -C 3rdparty/bgfx -f makefile dist-$(GENIEOS)
|
||||
|
||||
shaders: bgfx-tools
|
||||
$(SILENT) $(MAKE) -C $(SRC)/osd/modules/render/bgfx rebuild
|
||||
|
||||
#-------------------------------------------------
|
||||
|
Binary file not shown.
@ -114,6 +114,7 @@ newoption {
|
||||
{ "haiku", "Haiku" },
|
||||
{ "solaris", "Solaris SunOS" },
|
||||
{ "steamlink", "Steam Link" },
|
||||
{ "rpi", "Raspberry Pi" },
|
||||
},
|
||||
}
|
||||
|
||||
@ -574,7 +575,9 @@ configuration { "Debug" }
|
||||
defines {
|
||||
"MAME_DEBUG",
|
||||
"MAME_PROFILER",
|
||||
"BGFX_CONFIG_DEBUG=1",
|
||||
}
|
||||
|
||||
if _OPTIONS["FASTDEBUG"]=="1" then
|
||||
defines {
|
||||
"MAME_DEBUG_FAST"
|
||||
@ -1098,7 +1101,7 @@ configuration { "pnacl" }
|
||||
}
|
||||
archivesplit_size "20"
|
||||
|
||||
configuration { "linux-*" }
|
||||
configuration { "linux-* or rpi"}
|
||||
links {
|
||||
"dl",
|
||||
"rt",
|
||||
@ -1123,6 +1126,19 @@ configuration { "steamlink" }
|
||||
"EGL_API_FB",
|
||||
}
|
||||
|
||||
configuration { "rpi" }
|
||||
links {
|
||||
"SDL2",
|
||||
"fontconfig",
|
||||
"X11",
|
||||
"GLESv2",
|
||||
"EGL",
|
||||
"bcm_host",
|
||||
"vcos",
|
||||
"vchiq_arm",
|
||||
"pthread",
|
||||
}
|
||||
|
||||
configuration { "osx* or xcode4" }
|
||||
links {
|
||||
"pthread",
|
||||
|
@ -726,6 +726,14 @@ end
|
||||
"-Wno-uninitialized",
|
||||
"-Wno-unused-function",
|
||||
}
|
||||
configuration { "rpi" }
|
||||
buildoptions {
|
||||
"-Wno-unused-but-set-variable",
|
||||
"-Wno-unused-variable",
|
||||
}
|
||||
defines {
|
||||
"__STDC_VERSION__=199901L",
|
||||
}
|
||||
|
||||
configuration { }
|
||||
|
||||
@ -769,6 +777,7 @@ end
|
||||
MAME_DIR .. "3rdparty/bgfx/src/renderer_null.cpp",
|
||||
MAME_DIR .. "3rdparty/bgfx/src/renderer_vk.cpp",
|
||||
MAME_DIR .. "3rdparty/bgfx/src/renderdoc.cpp",
|
||||
MAME_DIR .. "3rdparty/bgfx/src/shader.cpp",
|
||||
MAME_DIR .. "3rdparty/bgfx/src/shader_dxbc.cpp",
|
||||
MAME_DIR .. "3rdparty/bgfx/src/shader_dx9bc.cpp",
|
||||
MAME_DIR .. "3rdparty/bgfx/src/shader_spirv.cpp",
|
||||
|
@ -2601,6 +2601,8 @@ if (BUSES["SVI_EXPANDER"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/modules.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/sv601.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/sv601.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/sv602.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/expander/sv602.h",
|
||||
}
|
||||
end
|
||||
|
||||
@ -2617,6 +2619,8 @@ if (BUSES["SVI_SLOT"]~=null) then
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/cards.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv801.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv801.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv802.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv802.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv803.cpp",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv803.h",
|
||||
MAME_DIR .. "src/devices/bus/svi3x8/slot/sv805.cpp",
|
||||
|
@ -412,15 +412,9 @@ dependency {
|
||||
|
||||
}
|
||||
|
||||
if (_OPTIONS["targetos"]=="asmjs") then
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/emu/uismall.png" , GEN_DIR .. "emu/uismall.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uismall.png...", PYTHON .. " $(1) $(<) temp.bdc", PYTHON .. " $(2) temp.bdc $(@) font_uismall UINT8" }},
|
||||
}
|
||||
else
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "scripts/font/NotoSans-Bold.bdc", GEN_DIR .. "emu/uismall.fh", { MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting NotoSans-Bold.bdc...", PYTHON .. " $(1) $(<) $(@) font_uismall UINT8" }},
|
||||
}
|
||||
end
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "scripts/font/NotoSans-Bold.bdc", GEN_DIR .. "emu/uismall.fh", { MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting NotoSans-Bold.bdc...", PYTHON .. " $(1) $(<) $(@) font_uismall UINT8" }},
|
||||
}
|
||||
|
||||
custombuildtask {
|
||||
{ MAME_DIR .. "src/emu/ui/uicmd14.png" , GEN_DIR .. "emu/ui/uicmd14.fh", { MAME_DIR.. "scripts/build/png2bdc.py", MAME_DIR .. "scripts/build/file2str.py" }, {"@echo Converting uicmd14.png...", PYTHON .. " $(1) $(<) temp_cmd.bdc", PYTHON .. " $(2) temp_cmd.bdc $(@) font_uicmd14 UINT8" }},
|
||||
|
@ -103,6 +103,9 @@ end
|
||||
configuration { "mingw*" or "vs*" }
|
||||
targetextension ".exe"
|
||||
|
||||
configuration { "rpi" }
|
||||
targetextension ""
|
||||
|
||||
configuration { "asmjs" }
|
||||
targetextension ".bc"
|
||||
if os.getenv("EMSCRIPTEN") then
|
||||
|
@ -91,6 +91,12 @@ function osdmodulesbuild()
|
||||
MAME_DIR .. "3rdparty/winpcap/Include",
|
||||
MAME_DIR .. "3rdparty/compat/mingw",
|
||||
}
|
||||
|
||||
if _OPTIONS["MODERN_WIN_API"]~="1" then
|
||||
includedirs {
|
||||
MAME_DIR .. "3rdparty/compat/winsdk-override",
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
if _OPTIONS["NO_OPENGL"]=="1" then
|
||||
|
@ -1314,3 +1314,14 @@ if (SOUNDS["VRC6"]~=null) then
|
||||
}
|
||||
end
|
||||
|
||||
---------------------------------------------------
|
||||
-- AD1848
|
||||
--@src/devices/sound/ad1848.h,SOUNDS["AD1848"] = true
|
||||
---------------------------------------------------
|
||||
|
||||
if (SOUNDS["AD1848"]~=null) then
|
||||
files {
|
||||
MAME_DIR .. "src/devices/sound/ad1848.cpp",
|
||||
MAME_DIR .. "src/devices/sound/ad1848.h",
|
||||
}
|
||||
end
|
||||
|
@ -257,6 +257,7 @@ SOUNDS["SB0400"] = true
|
||||
SOUNDS["AC97"] = true
|
||||
SOUNDS["ES1373"] = true
|
||||
SOUNDS["L7A1045"] = true
|
||||
SOUNDS["AD1848"] = true
|
||||
|
||||
--------------------------------------------------
|
||||
-- specify available video cores
|
||||
|
@ -245,6 +245,16 @@ function toolchain(_buildDir, _subDir)
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-steamlink")
|
||||
end
|
||||
|
||||
if "rpi" == _OPTIONS["gcc"] then
|
||||
if not os.getenv("RASPBERRY_SDK_PATH") then
|
||||
print("Set RASPBERRY_SDK_PATH envrionment variable.")
|
||||
end
|
||||
premake.gcc.cc = "$(RASPBERRY_SDK_PATH)/bin/arm-linux-gnueabihf-gcc"
|
||||
premake.gcc.cxx = "$(RASPBERRY_SDK_PATH)/bin/arm-linux-gnueabihf-g++"
|
||||
premake.gcc.ar = "$(RASPBERRY_SDK_PATH)/bin/arm-linux-gnueabihf-ar"
|
||||
location (_buildDir .. "projects/" .. _subDir .. "/".. _ACTION .. "-rpi")
|
||||
end
|
||||
|
||||
if "mingw32-gcc" == _OPTIONS["gcc"] then
|
||||
if not os.getenv("MINGW32") then
|
||||
print("Set MINGW32 envrionment variable.")
|
||||
@ -511,6 +521,37 @@ function toolchain(_buildDir, _subDir)
|
||||
configuration { "steamlink", "Debug" }
|
||||
targetdir (_buildDir .. "steamlink/bin/Debug")
|
||||
|
||||
configuration { "rpi" }
|
||||
objdir ( _buildDir .. "rpi/obj")
|
||||
libdirs {
|
||||
"$(RASPBERRY_SYSROOT)/opt/vc/lib",
|
||||
}
|
||||
includedirs {
|
||||
"$(RASPBERRY_SYSROOT)/opt/vc/include",
|
||||
"$(RASPBERRY_SYSROOT)/opt/vc/include/interface/vcos/pthreads",
|
||||
"$(RASPBERRY_SYSROOT)/opt/vc/include/interface/vmcs_host/linux",
|
||||
}
|
||||
defines {
|
||||
"__VCCOREVER__=0x04000000", -- There is no special prefedined compiler symbol to detect RaspberryPi, faking it.
|
||||
}
|
||||
linkoptions {
|
||||
"-Wl,--gc-sections",
|
||||
}
|
||||
buildoptions {
|
||||
"--sysroot=$(RASPBERRY_SYSROOT)",
|
||||
}
|
||||
linkoptions {
|
||||
"-static-libgcc",
|
||||
"-static-libstdc++",
|
||||
"--sysroot=$(RASPBERRY_SYSROOT)",
|
||||
}
|
||||
|
||||
configuration { "rpi", "Release" }
|
||||
targetdir (_buildDir .. "rpi/bin/Release")
|
||||
|
||||
configuration { "rpi", "Debug" }
|
||||
targetdir (_buildDir .. "rpi/bin/Debug")
|
||||
|
||||
configuration { "mingw-clang" }
|
||||
linkoptions {
|
||||
"-Wl,--allow-multiple-definition",
|
||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user