Previous 199869 Revisions Next

r31874 Tuesday 2nd September, 2014 at 13:01:00 UTC by Miodrag Milanović
(OSD BRANCH) Updated BGFX to latest
[/branches/osd/src/lib/bgfx]bgfx.cpp bgfx_p.h charset.h config.h fs_clear0.bin.h fs_clear0.sc fs_clear1.bin.h fs_clear1.sc fs_clear2.bin.h fs_clear2.sc fs_clear3.bin.h fs_clear3.sc fs_clear4.bin.h* fs_clear4.sc* fs_clear5.bin.h* fs_clear5.sc* fs_clear6.bin.h* fs_clear6.sc* fs_clear7.bin.h* fs_clear7.sc* fs_debugfont.bin.h fs_debugfont.sc glcontext_wgl.cpp glimports.h image.cpp renderer_d3d11.cpp renderer_d3d11.h renderer_d3d9.cpp renderer_d3d9.h renderer_gl.cpp renderer_gl.h vs_clear.bin.h vs_clear.sc
[/branches/osd/src/lib/bgfx/common/nanovg]nanovg_bgfx.cpp
[/branches/osd/src/lib/bgfx/include]bgfx.c99.h bgfx.h
[/branches/osd/src/lib/bx]handlealloc.h string.h uint32_t.h

branches/osd/src/lib/bx/uint32_t.h
r31873r31874
321321   /// Count number of bits set.
322322   inline uint32_t uint32_cntbits(uint32_t _val)
323323   {
324#if BX_COMPILER_GCC
324#if BX_COMPILER_GCC || BX_COMPILER_CLANG
325325      return __builtin_popcount(_val);
326326#elif BX_COMPILER_MSVC && BX_PLATFORM_WINDOWS
327327      return __popcnt(_val);
328328#else
329329      return uint32_cntbits_ref(_val);
330#endif // BX_COMPILER_GCC
330#endif // BX_COMPILER_
331331   }
332332
333333   inline uint32_t uint32_cntlz_ref(uint32_t _val)
r31873r31874
351351   /// Count number of leading zeros.
352352   inline uint32_t uint32_cntlz(uint32_t _val)
353353   {
354#if BX_COMPILER_GCC
354#if BX_COMPILER_GCC || BX_COMPILER_CLANG
355355      return __builtin_clz(_val);
356356#elif BX_COMPILER_MSVC && BX_PLATFORM_WINDOWS
357357      unsigned long index;
r31873r31874
374374
375375   inline uint32_t uint32_cnttz(uint32_t _val)
376376   {
377#if BX_COMPILER_GCC
377#if BX_COMPILER_GCC || BX_COMPILER_CLANG
378378      return __builtin_ctz(_val);
379379#elif BX_COMPILER_MSVC && BX_PLATFORM_WINDOWS
380380      unsigned long index;
r31873r31874
624624   /// Count number of leading zeros.
625625   inline uint64_t uint64_cntlz(uint64_t _val)
626626   {
627#if BX_COMPILER_GCC
627#if BX_COMPILER_GCC || BX_COMPILER_CLANG
628628      return __builtin_clz(_val);
629629#elif BX_COMPILER_MSVC && BX_PLATFORM_WINDOWS && BX_ARCH_64BIT
630630      unsigned long index;
r31873r31874
645645
646646   inline uint64_t uint64_cnttz(uint64_t _val)
647647   {
648#if BX_COMPILER_GCC
648#if BX_COMPILER_GCC || BX_COMPILER_CLANG
649649      return __builtin_ctz(_val);
650650#elif BX_COMPILER_MSVC && BX_PLATFORM_WINDOWS && BX_ARCH_64BIT
651651      unsigned long index;
branches/osd/src/lib/bx/string.h
r31873r31874
311311      return _filePath;
312312   }
313313
314   /// Convert size in bytes to human readable string.
315   inline void prettify(char* _out, size_t _count, uint64_t _size)
316   {
317      uint8_t idx = 0;
318      double size = double(_size);
319      while (_size != (_size&0x7ff)
320      &&     idx < 9)
321      {
322         _size >>= 10;
323         size *= 1.0/1024.0;
324         ++idx;
325      }
326
327      snprintf(_out, _count, "%0.2f %c%c", size, "BkMGTPEZY"[idx], idx > 0 ? 'B' : '\0');
328   }
329
314330   /*
315331    * Copyright (c) 1998 Todd C. Miller <Todd.Miller@courtesan.com>
316332    *
branches/osd/src/lib/bx/handlealloc.h
r31873r31874
6868
6969      void free(uint16_t _handle)
7070      {
71         BX_CHECK(0 < m_numHandles, "Freeing invalid handle %d.", _handle);
7172         uint16_t* sparse = &m_handles[MaxHandlesT];
7273         uint16_t index = sparse[_handle];
7374         --m_numHandles;
branches/osd/src/lib/bgfx/fs_clear4.sc
r0r31874
1/*
2 * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
3 * License: http://www.opensource.org/licenses/BSD-2-Clause
4 */
5
6uniform vec4 bgfx_clear_color[8];
7
8void main()
9{
10   gl_FragData[0] = bgfx_clear_color[0];
11   gl_FragData[1] = bgfx_clear_color[1];
12   gl_FragData[2] = bgfx_clear_color[2];
13   gl_FragData[3] = bgfx_clear_color[3];
14   gl_FragData[4] = bgfx_clear_color[4];
15}
Property changes on: branches/osd/src/lib/bgfx/fs_clear4.sc
Added: svn:eol-style
   + native
Added: svn:mime-type
   + text/plain
branches/osd/src/lib/bgfx/glimports.h
r31873r31874
5959typedef void           (GL_APIENTRYP PFNGLBUFFERSUBDATAPROC) (GLenum target, GLintptr offset, GLsizeiptr size, const void *data);
6060typedef GLenum         (GL_APIENTRYP PFNGLCHECKFRAMEBUFFERSTATUSPROC) (GLenum target);
6161typedef void           (GL_APIENTRYP PFNGLCLEARPROC) (GLbitfield mask);
62typedef void           (GL_APIENTRYP PFNGLCLEARBUFFERFVPROC) (GLenum buffer, GLint drawbuffer, const GLfloat *value);
6263typedef void           (GL_APIENTRYP PFNGLCLEARCOLORPROC) (GLfloat red, GLfloat green, GLfloat blue, GLfloat alpha);
6364typedef void           (GL_APIENTRYP PFNGLCLEARDEPTHPROC) (GLdouble d);
6465typedef void           (GL_APIENTRYP PFNGLCLEARDEPTHFPROC) (GLfloat d);
r31873r31874
228229GL_IMPORT______(false, PFNGLBUFFERSUBDATAPROC,                     glBufferSubData);
229230GL_IMPORT______(true,  PFNGLCHECKFRAMEBUFFERSTATUSPROC,            glCheckFramebufferStatus);
230231GL_IMPORT______(false, PFNGLCLEARPROC,                             glClear);
232GL_IMPORT______(false, PFNGLCLEARBUFFERFVPROC,                     glClearBufferfv);
231233GL_IMPORT______(false, PFNGLCLEARCOLORPROC,                        glClearColor);
232234GL_IMPORT______(false, PFNGLCLEARSTENCILPROC,                      glClearStencil);
233235GL_IMPORT______(false, PFNGLCOLORMASKPROC,                         glColorMask);
branches/osd/src/lib/bgfx/bgfx.cpp
r31873r31874
492492   {
493493      BGFX_CHECK_MAIN_THREAD();
494494
495      if (BX_ENABLED(BGFX_CONFIG_CLEAR_QUAD)
496      &&  RendererType::OpenGLES  != g_caps.rendererType
497      &&  RendererType::Direct3D9 != g_caps.rendererType
498      &&  RendererType::Null      != g_caps.rendererType)
495      if (RendererType::Null != g_caps.rendererType)
499496      {
500497         m_decl
501498            .begin()
502499            .add(Attrib::Position, 3, AttribType::Float)
503            .add(Attrib::Color0,   4, AttribType::Uint8, true)
504500            .end();
505501
506502         ShaderHandle vsh = BGFX_INVALID_HANDLE;
507503         
504         struct Mem
505         {
506            const void*  data;
507            const size_t size;
508         };
509
508510         const Memory* fragMem[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS];
509         if (RendererType::Direct3D11 == g_caps.rendererType)
511         if (RendererType::Direct3D9 == g_caps.rendererType)
510512         {
513            vsh = createShader(makeRef(vs_clear_dx9, sizeof(vs_clear_dx9) ) );
514
515            const Mem mem[] =
516            {
517               { fs_clear0_dx9, sizeof(fs_clear0_dx9) },
518               { fs_clear1_dx9, sizeof(fs_clear1_dx9) },
519               { fs_clear2_dx9, sizeof(fs_clear2_dx9) },
520               { fs_clear3_dx9, sizeof(fs_clear3_dx9) },
521               { fs_clear4_dx9, sizeof(fs_clear4_dx9) },
522               { fs_clear5_dx9, sizeof(fs_clear5_dx9) },
523               { fs_clear6_dx9, sizeof(fs_clear6_dx9) },
524               { fs_clear7_dx9, sizeof(fs_clear7_dx9) },
525            };
526
527            for (uint32_t ii = 0, num = g_caps.maxFBAttachments; ii < num; ++ii)
528            {
529               fragMem[ii] = makeRef(mem[ii].data, mem[ii].size);
530            }
531         }
532         else if (RendererType::Direct3D11 == g_caps.rendererType)
533         {
511534            vsh = createShader(makeRef(vs_clear_dx11, sizeof(vs_clear_dx11) ) );
512            fragMem[0] = makeRef(fs_clear0_dx11, sizeof(fs_clear0_dx11) );
513            fragMem[1] = makeRef(fs_clear1_dx11, sizeof(fs_clear1_dx11) );
514            fragMem[2] = makeRef(fs_clear2_dx11, sizeof(fs_clear2_dx11) );
515            fragMem[3] = makeRef(fs_clear3_dx11, sizeof(fs_clear3_dx11) );
535
536            const Mem mem[] =
537            {
538               { fs_clear0_dx11, sizeof(fs_clear0_dx11) },
539               { fs_clear1_dx11, sizeof(fs_clear1_dx11) },
540               { fs_clear2_dx11, sizeof(fs_clear2_dx11) },
541               { fs_clear3_dx11, sizeof(fs_clear3_dx11) },
542               { fs_clear4_dx11, sizeof(fs_clear4_dx11) },
543               { fs_clear5_dx11, sizeof(fs_clear5_dx11) },
544               { fs_clear6_dx11, sizeof(fs_clear6_dx11) },
545               { fs_clear7_dx11, sizeof(fs_clear7_dx11) },
546            };
547
548            for (uint32_t ii = 0, num = g_caps.maxFBAttachments; ii < num; ++ii)
549            {
550               fragMem[ii] = makeRef(mem[ii].data, mem[ii].size);
551            }
516552         }
517         else if (RendererType::OpenGL == g_caps.rendererType)
553         else if (RendererType::OpenGLES == g_caps.rendererType
554             ||  RendererType::OpenGL   == g_caps.rendererType)
518555         {
519556            vsh = createShader(makeRef(vs_clear_glsl, sizeof(vs_clear_glsl) ) );
520            fragMem[0] = makeRef(fs_clear0_glsl, sizeof(fs_clear0_glsl) );
521            fragMem[1] = makeRef(fs_clear1_glsl, sizeof(fs_clear1_glsl) );
522            fragMem[2] = makeRef(fs_clear2_glsl, sizeof(fs_clear2_glsl) );
523            fragMem[3] = makeRef(fs_clear3_glsl, sizeof(fs_clear3_glsl) );
557
558            const Mem mem[] =
559            {
560               { fs_clear0_glsl, sizeof(fs_clear0_glsl) },
561               { fs_clear1_glsl, sizeof(fs_clear1_glsl) },
562               { fs_clear2_glsl, sizeof(fs_clear2_glsl) },
563               { fs_clear3_glsl, sizeof(fs_clear3_glsl) },
564               { fs_clear4_glsl, sizeof(fs_clear4_glsl) },
565               { fs_clear5_glsl, sizeof(fs_clear5_glsl) },
566               { fs_clear6_glsl, sizeof(fs_clear6_glsl) },
567               { fs_clear7_glsl, sizeof(fs_clear7_glsl) },
568            };
569
570            for (uint32_t ii = 0, num = g_caps.maxFBAttachments; ii < num; ++ii)
571            {
572               fragMem[ii] = makeRef(mem[ii].data, mem[ii].size);
573            }
524574         }
525575
526576         for (uint32_t ii = 0, num = g_caps.maxFBAttachments; ii < num; ++ii)
527577         {
528578            ShaderHandle fsh = createShader(fragMem[ii]);
529579            m_program[ii] = createProgram(vsh, fsh);
580            BX_CHECK(isValid(m_program[ii]), "Failed to create clear quad program.");
530581            destroyShader(fsh);
531582         }
532583
533584         destroyShader(vsh);
534585
535586         m_vb = s_ctx->createTransientVertexBuffer(4*m_decl.m_stride, &m_decl);
536
537         const Memory* mem = alloc(6*sizeof(uint16_t) );
538         uint16_t* indices = (uint16_t*)mem->data;
539         indices[0] = 0;
540         indices[1] = 1;
541         indices[2] = 2;
542         indices[3] = 2;
543         indices[4] = 3;
544         indices[5] = 0;
545         m_ib = s_ctx->createIndexBuffer(mem);
546587      }
547588   }
548589
r31873r31874
550591   {
551592      BGFX_CHECK_MAIN_THREAD();
552593
553      if (BX_ENABLED(BGFX_CONFIG_CLEAR_QUAD)
554      &&  RendererType::OpenGLES  != g_caps.rendererType
555      &&  RendererType::Direct3D9 != g_caps.rendererType
556      &&  RendererType::Null      != g_caps.rendererType)
594      if (RendererType::Null != g_caps.rendererType)
557595      {
558         for (uint32_t ii = 0; ii < BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS; ++ii)
596         for (uint32_t ii = 0, num = g_caps.maxFBAttachments; ii < num; ++ii)
559597         {
560598            if (isValid(m_program[ii]) )
561599            {
r31873r31874
563601               m_program[ii].idx = invalidHandle;
564602            }
565603         }
566         destroyIndexBuffer(m_ib);
604
567605         s_ctx->destroyTransientVertexBuffer(m_vb);
568606      }
569607   }
r31873r31874
944982         m_rect[ii].m_height = 1;
945983      }
946984
985      for (uint32_t ii = 0; ii < BX_COUNTOF(m_clearColor); ++ii)
986      {
987         m_clearColor[ii][0] = 0.0f;
988         m_clearColor[ii][1] = 0.0f;
989         m_clearColor[ii][2] = 0.0f;
990         m_clearColor[ii][3] = 1.0f;
991      }
992
947993      m_declRef.init();
948994
949995      CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::RendererInit);
r31873r31874
11391185      memcpy(m_submit->m_scissor, m_scissor, sizeof(m_scissor) );
11401186      memcpy(m_submit->m_view, m_view, sizeof(m_view) );
11411187      memcpy(m_submit->m_proj, m_proj, sizeof(m_proj) );
1188      if (m_clearColorDirty > 0)
1189      {
1190         --m_clearColorDirty;
1191         memcpy(m_submit->m_clearColor, m_clearColor, sizeof(m_clearColor) );
1192      }
11421193      m_submit->finish();
11431194
11441195      Frame* temp = m_render;
r31873r31874
24402491      s_ctx->destroyUniform(_handle);
24412492   }
24422493
2494   void setClearColor(uint8_t _index, uint32_t _rgba)
2495   {
2496      BGFX_CHECK_MAIN_THREAD();
2497
2498      const uint8_t rr = _rgba>>24;
2499      const uint8_t gg = _rgba>>16;
2500      const uint8_t bb = _rgba>> 8;
2501      const uint8_t aa = _rgba>> 0;
2502
2503      float rgba[4] =
2504      {
2505         rr * 1.0f/255.0f,
2506         gg * 1.0f/255.0f,
2507         bb * 1.0f/255.0f,
2508         aa * 1.0f/255.0f,
2509      };
2510      s_ctx->setClearColor(_index, rgba);
2511   }
2512
2513   void setClearColor(uint8_t _index, float _r, float _g, float _b, float _a)
2514   {
2515      BGFX_CHECK_MAIN_THREAD();
2516      float rgba[4] = { _r, _g, _b, _a };
2517      s_ctx->setClearColor(_index, rgba);
2518   }
2519
2520   void setClearColor(uint8_t _index, const float _rgba[4])
2521   {
2522      BGFX_CHECK_MAIN_THREAD();
2523      s_ctx->setClearColor(_index, _rgba);
2524   }
2525
24432526   void setViewName(uint8_t _id, const char* _name)
24442527   {
24452528      BGFX_CHECK_MAIN_THREAD();
r31873r31874
24762559      s_ctx->setViewClear(_id, _flags, _rgba, _depth, _stencil);
24772560   }
24782561
2562   void setViewClear(uint8_t _id, uint8_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7)
2563   {
2564      BGFX_CHECK_MAIN_THREAD();
2565      s_ctx->setViewClear(_id, _flags, _depth, _stencil, _0, _1, _2, _3, _4, _5, _6, _7);
2566   }
2567
24792568   void setViewClearMask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil)
24802569   {
24812570      BGFX_CHECK_MAIN_THREAD();
r31873r31874
30963185   bgfx::destroyUniform(handle.cpp);
30973186}
30983187
3188BGFX_C_API void bgfx_clear_color(uint8_t _index, const float _rgba[4])
3189{
3190   bgfx::setClearColor(_index, _rgba);
3191}
3192
30993193BGFX_C_API void bgfx_set_view_name(uint8_t _id, const char* _name)
31003194{
31013195   bgfx::setViewName(_id, _name);
r31873r31874
31263220   bgfx::setViewClear(_id, _flags, _rgba, _depth, _stencil);
31273221}
31283222
3223BGFX_C_API void bgfx_set_view_clear_mrt7(uint8_t _id, uint8_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7)
3224{
3225   bgfx::setViewClear(_id, _flags, _depth, _stencil, _0, _1, _2, _3, _4, _5, _6, _7);
3226}
3227
31293228BGFX_C_API void bgfx_set_view_clear_mask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil)
31303229{
31313230   bgfx::setViewClearMask(_viewMask, _flags, _rgba, _depth, _stencil);
branches/osd/src/lib/bgfx/fs_clear6.sc
r0r31874
1/*
2 * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
3 * License: http://www.opensource.org/licenses/BSD-2-Clause
4 */
5
6uniform vec4 bgfx_clear_color[8];
7
8void main()
9{
10   gl_FragData[0] = bgfx_clear_color[0];
11   gl_FragData[1] = bgfx_clear_color[1];
12   gl_FragData[2] = bgfx_clear_color[2];
13   gl_FragData[3] = bgfx_clear_color[3];
14   gl_FragData[4] = bgfx_clear_color[4];
15   gl_FragData[5] = bgfx_clear_color[5];
16   gl_FragData[6] = bgfx_clear_color[6];
17}
Property changes on: branches/osd/src/lib/bgfx/fs_clear6.sc
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
branches/osd/src/lib/bgfx/fs_debugfont.sc
r31873r31874
77
88#include "bgfx_shader.sh"
99
10SAMPLER2D(u_texColor, 0);
10SAMPLER2D(s_texColor, 0);
1111
1212void main()
1313{
14   vec4 color = mix(v_color1, v_color0, texture2D(u_texColor, v_texcoord0).xxxx);
14   vec4 color = mix(v_color1, v_color0, texture2D(s_texColor, v_texcoord0).xxxx);
1515   if (color.w < 1.0/255.0)
1616   {
1717      discard;
branches/osd/src/lib/bgfx/renderer_gl.cpp
r31873r31874
180180
181181   static TextureFormatInfo s_textureFormat[] =
182182   {
183      { GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,            GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,            GL_ZERO,                        false }, // BC1
184      { GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,            GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,            GL_ZERO,                        false }, // BC2
185      { GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,            GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,            GL_ZERO,                        false }, // BC3
186      { GL_COMPRESSED_LUMINANCE_LATC1_EXT,           GL_COMPRESSED_LUMINANCE_LATC1_EXT,           GL_ZERO,                        false }, // BC4
187      { GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT,     GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT,     GL_ZERO,                        false }, // BC5
188      { GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB,     GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB,     GL_ZERO,                        false }, // BC6H
189      { GL_COMPRESSED_RGBA_BPTC_UNORM_ARB,           GL_COMPRESSED_RGBA_BPTC_UNORM_ARB,           GL_ZERO,                        false }, // BC7
190      { GL_ETC1_RGB8_OES,                            GL_ETC1_RGB8_OES,                            GL_ZERO,                        false }, // ETC1
191      { GL_COMPRESSED_RGB8_ETC2,                     GL_COMPRESSED_RGB8_ETC2,                     GL_ZERO,                        false }, // ETC2
192      { GL_COMPRESSED_RGBA8_ETC2_EAC,                GL_COMPRESSED_RGBA8_ETC2_EAC,                GL_ZERO,                        false }, // ETC2A
193      { GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_ZERO,                        false }, // ETC2A1
194      { GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG,          GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG,          GL_ZERO,                        false }, // PTC12
195      { GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG,          GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG,          GL_ZERO,                        false }, // PTC14
196      { GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,         GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,         GL_ZERO,                        false }, // PTC12A
197      { GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,         GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,         GL_ZERO,                        false }, // PTC14A
198      { GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG,         GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG,         GL_ZERO,                        false }, // PTC22
199      { GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG,         GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG,         GL_ZERO,                        false }, // PTC24
200      { GL_ZERO,                                     GL_ZERO,                                     GL_ZERO,                        true  }, // Unknown
201      { GL_ZERO,                                     GL_ZERO,                                     GL_ZERO,                        true  }, // R1
202      { GL_LUMINANCE,                                GL_LUMINANCE,                                GL_UNSIGNED_BYTE,               true  }, // R8
203      { GL_R16,                                      GL_RED,                                      GL_UNSIGNED_SHORT,              true  }, // R16
204      { GL_R16F,                                     GL_RED,                                      GL_HALF_FLOAT,                  true  }, // R16F
205      { GL_R32UI,                                    GL_RED,                                      GL_UNSIGNED_INT,                true  }, // R32
206      { GL_R32F,                                     GL_RED,                                      GL_FLOAT,                       true  }, // R32F
207      { GL_RG8,                                      GL_RG,                                       GL_UNSIGNED_BYTE,               true  }, // RG8
208      { GL_RG16,                                     GL_RG,                                       GL_UNSIGNED_SHORT,              true  }, // RG16
209      { GL_RG16F,                                    GL_RG,                                       GL_FLOAT,                       true  }, // RG16F
210      { GL_RG32UI,                                   GL_RG,                                       GL_UNSIGNED_INT,                true  }, // RG32
211      { GL_RG32F,                                    GL_RG,                                       GL_FLOAT,                       true  }, // RG32F
212      { GL_RGBA,                                     GL_RGBA,                                     GL_UNSIGNED_BYTE,               true  }, // BGRA8
213      { GL_RGBA16,                                   GL_RGBA,                                     GL_UNSIGNED_BYTE,               true  }, // RGBA16
214      { GL_RGBA16F,                                  GL_RGBA,                                     GL_HALF_FLOAT,                  true  }, // RGBA16F
215      { GL_RGBA32UI,                                 GL_RGBA,                                     GL_UNSIGNED_INT,                true  }, // RGBA32
216      { GL_RGBA32F,                                  GL_RGBA,                                     GL_FLOAT,                       true  }, // RGBA32F
217      { GL_RGB565,                                   GL_RGB,                                      GL_UNSIGNED_SHORT_5_6_5,        true  }, // R5G6B5
218      { GL_RGBA4,                                    GL_RGBA,                                     GL_UNSIGNED_SHORT_4_4_4_4,      true  }, // RGBA4
219      { GL_RGB5_A1,                                  GL_RGBA,                                     GL_UNSIGNED_SHORT_5_5_5_1,      true  }, // RGB5A1
220      { GL_RGB10_A2,                                 GL_RGBA,                                     GL_UNSIGNED_INT_2_10_10_10_REV, true  }, // RGB10A2
221      { GL_ZERO,                                     GL_ZERO,                                     GL_ZERO,                        true  }, // UnknownDepth
222      { GL_DEPTH_COMPONENT16,                        GL_DEPTH_COMPONENT,                          GL_UNSIGNED_SHORT,              false }, // D16
223      { GL_DEPTH_COMPONENT24,                        GL_DEPTH_COMPONENT,                          GL_UNSIGNED_INT,                false }, // D24
224      { GL_DEPTH24_STENCIL8,                         GL_DEPTH_STENCIL,                            GL_UNSIGNED_INT_24_8,           false }, // D24S8
225      { GL_DEPTH_COMPONENT32,                        GL_DEPTH_COMPONENT,                          GL_UNSIGNED_INT,                false }, // D32
226      { GL_DEPTH_COMPONENT32F,                       GL_DEPTH_COMPONENT,                          GL_FLOAT,                       false }, // D16F
227      { GL_DEPTH_COMPONENT32F,                       GL_DEPTH_COMPONENT,                          GL_FLOAT,                       false }, // D24F
228      { GL_DEPTH_COMPONENT32F,                       GL_DEPTH_COMPONENT,                          GL_FLOAT,                       false }, // D32F
229      { GL_STENCIL_INDEX8,                           GL_DEPTH_STENCIL,                            GL_UNSIGNED_BYTE,               false }, // D0S8
183      { GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,            GL_COMPRESSED_RGBA_S3TC_DXT1_EXT,            GL_ZERO,                         false }, // BC1
184      { GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,            GL_COMPRESSED_RGBA_S3TC_DXT3_EXT,            GL_ZERO,                         false }, // BC2
185      { GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,            GL_COMPRESSED_RGBA_S3TC_DXT5_EXT,            GL_ZERO,                         false }, // BC3
186      { GL_COMPRESSED_LUMINANCE_LATC1_EXT,           GL_COMPRESSED_LUMINANCE_LATC1_EXT,           GL_ZERO,                         false }, // BC4
187      { GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT,     GL_COMPRESSED_LUMINANCE_ALPHA_LATC2_EXT,     GL_ZERO,                         false }, // BC5
188      { GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB,     GL_COMPRESSED_RGB_BPTC_SIGNED_FLOAT_ARB,     GL_ZERO,                         false }, // BC6H
189      { GL_COMPRESSED_RGBA_BPTC_UNORM_ARB,           GL_COMPRESSED_RGBA_BPTC_UNORM_ARB,           GL_ZERO,                         false }, // BC7
190      { GL_ETC1_RGB8_OES,                            GL_ETC1_RGB8_OES,                            GL_ZERO,                         false }, // ETC1
191      { GL_COMPRESSED_RGB8_ETC2,                     GL_COMPRESSED_RGB8_ETC2,                     GL_ZERO,                         false }, // ETC2
192      { GL_COMPRESSED_RGBA8_ETC2_EAC,                GL_COMPRESSED_RGBA8_ETC2_EAC,                GL_ZERO,                         false }, // ETC2A
193      { GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2, GL_ZERO,                         false }, // ETC2A1
194      { GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG,          GL_COMPRESSED_RGB_PVRTC_2BPPV1_IMG,          GL_ZERO,                         false }, // PTC12
195      { GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG,          GL_COMPRESSED_RGB_PVRTC_4BPPV1_IMG,          GL_ZERO,                         false }, // PTC14
196      { GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,         GL_COMPRESSED_RGBA_PVRTC_2BPPV1_IMG,         GL_ZERO,                         false }, // PTC12A
197      { GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,         GL_COMPRESSED_RGBA_PVRTC_4BPPV1_IMG,         GL_ZERO,                         false }, // PTC14A
198      { GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG,         GL_COMPRESSED_RGBA_PVRTC_2BPPV2_IMG,         GL_ZERO,                         false }, // PTC22
199      { GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG,         GL_COMPRESSED_RGBA_PVRTC_4BPPV2_IMG,         GL_ZERO,                         false }, // PTC24
200      { GL_ZERO,                                     GL_ZERO,                                     GL_ZERO,                         true  }, // Unknown
201      { GL_ZERO,                                     GL_ZERO,                                     GL_ZERO,                         true  }, // R1
202      { GL_LUMINANCE,                                GL_LUMINANCE,                                GL_UNSIGNED_BYTE,                true  }, // R8
203      { GL_R16,                                      GL_RED,                                      GL_UNSIGNED_SHORT,               true  }, // R16
204      { GL_R16F,                                     GL_RED,                                      GL_HALF_FLOAT,                   true  }, // R16F
205      { GL_R32UI,                                    GL_RED,                                      GL_UNSIGNED_INT,                 true  }, // R32
206      { GL_R32F,                                     GL_RED,                                      GL_FLOAT,                        true  }, // R32F
207      { GL_RG8,                                      GL_RG,                                       GL_UNSIGNED_BYTE,                true  }, // RG8
208      { GL_RG16,                                     GL_RG,                                       GL_UNSIGNED_SHORT,               true  }, // RG16
209      { GL_RG16F,                                    GL_RG,                                       GL_FLOAT,                        true  }, // RG16F
210      { GL_RG32UI,                                   GL_RG,                                       GL_UNSIGNED_INT,                 true  }, // RG32
211      { GL_RG32F,                                    GL_RG,                                       GL_FLOAT,                        true  }, // RG32F
212      { GL_RGBA,                                     GL_RGBA,                                     GL_UNSIGNED_BYTE,                true  }, // BGRA8
213      { GL_RGBA16,                                   GL_RGBA,                                     GL_UNSIGNED_BYTE,                true  }, // RGBA16
214      { GL_RGBA16F,                                  GL_RGBA,                                     GL_HALF_FLOAT,                   true  }, // RGBA16F
215      { GL_RGBA32UI,                                 GL_RGBA,                                     GL_UNSIGNED_INT,                 true  }, // RGBA32
216      { GL_RGBA32F,                                  GL_RGBA,                                     GL_FLOAT,                        true  }, // RGBA32F
217      { GL_RGB565,                                   GL_RGB,                                      GL_UNSIGNED_SHORT_5_6_5,         true  }, // R5G6B5
218      { GL_RGBA4,                                    GL_RGBA,                                     GL_UNSIGNED_SHORT_4_4_4_4,       true  }, // RGBA4
219      { GL_RGB5_A1,                                  GL_RGBA,                                     GL_UNSIGNED_SHORT_5_5_5_1,       true  }, // RGB5A1
220      { GL_RGB10_A2,                                 GL_RGBA,                                     GL_UNSIGNED_INT_2_10_10_10_REV,  true  }, // RGB10A2
221      { GL_R11F_G11F_B10F,                           GL_RGB,                                      GL_UNSIGNED_INT_10F_11F_11F_REV, true  }, // R11G11B10F
222      { GL_ZERO,                                     GL_ZERO,                                     GL_ZERO,                         true  }, // UnknownDepth
223      { GL_DEPTH_COMPONENT16,                        GL_DEPTH_COMPONENT,                          GL_UNSIGNED_SHORT,               false }, // D16
224      { GL_DEPTH_COMPONENT24,                        GL_DEPTH_COMPONENT,                          GL_UNSIGNED_INT,                 false }, // D24
225      { GL_DEPTH24_STENCIL8,                         GL_DEPTH_STENCIL,                            GL_UNSIGNED_INT_24_8,            false }, // D24S8
226      { GL_DEPTH_COMPONENT32,                        GL_DEPTH_COMPONENT,                          GL_UNSIGNED_INT,                 false }, // D32
227      { GL_DEPTH_COMPONENT32F,                       GL_DEPTH_COMPONENT,                          GL_FLOAT,                        false }, // D16F
228      { GL_DEPTH_COMPONENT32F,                       GL_DEPTH_COMPONENT,                          GL_FLOAT,                        false }, // D24F
229      { GL_DEPTH_COMPONENT32F,                       GL_DEPTH_COMPONENT,                          GL_FLOAT,                        false }, // D32F
230      { GL_STENCIL_INDEX8,                           GL_DEPTH_STENCIL,                            GL_UNSIGNED_BYTE,                false }, // D0S8
230231   };
231232   BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_textureFormat) );
232233
233234   static GLenum s_imageFormat[] =
234235   {
235      GL_ZERO,     // BC1
236      GL_ZERO,     // BC2
237      GL_ZERO,     // BC3
238      GL_ZERO,     // BC4
239      GL_ZERO,     // BC5
240      GL_ZERO,     // BC6H
241      GL_ZERO,     // BC7
242      GL_ZERO,     // ETC1
243      GL_ZERO,     // ETC2
244      GL_ZERO,     // ETC2A
245      GL_ZERO,     // ETC2A1
246      GL_ZERO,     // PTC12
247      GL_ZERO,     // PTC14
248      GL_ZERO,     // PTC12A
249      GL_ZERO,     // PTC14A
250      GL_ZERO,     // PTC22
251      GL_ZERO,     // PTC24
252      GL_ZERO,     // Unknown
253      GL_ZERO,     // R1
254      GL_R8,       // R8
255      GL_R16,      // R16
256      GL_R16F,     // R16F
257      GL_R32UI,    // R32
258      GL_R32F,     // R32F
259      GL_RG8,      // RG8
260      GL_RG16,     // RG16
261      GL_RG16F,    // RG16F
262      GL_RG32UI,   // RG32
263      GL_RG32F,    // RG32F
264      GL_RGBA8,    // BGRA8
265      GL_RGBA16,   // RGBA16
266      GL_RGBA16F,  // RGBA16F
267      GL_RGBA32UI, // RGBA32
268      GL_RGBA32F,  // RGBA32F
269      GL_RGB565,   // R5G6B5
270      GL_RGBA4,    // RGBA4
271      GL_RGB5_A1,  // RGB5A1
272      GL_RGB10_A2, // RGB10A2
273      GL_ZERO,     // UnknownDepth
274      GL_ZERO,     // D16
275      GL_ZERO,     // D24
276      GL_ZERO,     // D24S8
277      GL_ZERO,     // D32
278      GL_ZERO,     // D16F
279      GL_ZERO,     // D24F
280      GL_ZERO,     // D32F
281      GL_ZERO,     // D0S8
236      GL_ZERO,           // BC1
237      GL_ZERO,           // BC2
238      GL_ZERO,           // BC3
239      GL_ZERO,           // BC4
240      GL_ZERO,           // BC5
241      GL_ZERO,           // BC6H
242      GL_ZERO,           // BC7
243      GL_ZERO,           // ETC1
244      GL_ZERO,           // ETC2
245      GL_ZERO,           // ETC2A
246      GL_ZERO,           // ETC2A1
247      GL_ZERO,           // PTC12
248      GL_ZERO,           // PTC14
249      GL_ZERO,           // PTC12A
250      GL_ZERO,           // PTC14A
251      GL_ZERO,           // PTC22
252      GL_ZERO,           // PTC24
253      GL_ZERO,           // Unknown
254      GL_ZERO,           // R1
255      GL_R8,             // R8
256      GL_R16,            // R16
257      GL_R16F,           // R16F
258      GL_R32UI,          // R32
259      GL_R32F,           // R32F
260      GL_RG8,            // RG8
261      GL_RG16,           // RG16
262      GL_RG16F,          // RG16F
263      GL_RG32UI,         // RG32
264      GL_RG32F,          // RG32F
265      GL_RGBA8,          // BGRA8
266      GL_RGBA16,         // RGBA16
267      GL_RGBA16F,        // RGBA16F
268      GL_RGBA32UI,       // RGBA32
269      GL_RGBA32F,        // RGBA32F
270      GL_RGB565,         // R5G6B5
271      GL_RGBA4,          // RGBA4
272      GL_RGB5_A1,        // RGB5A1
273      GL_RGB10_A2,       // RGB10A2
274      GL_R11F_G11F_B10F, // R11G11B10F
275      GL_ZERO,           // UnknownDepth
276      GL_ZERO,           // D16
277      GL_ZERO,           // D24
278      GL_ZERO,           // D24S8
279      GL_ZERO,           // D32
280      GL_ZERO,           // D16F
281      GL_ZERO,           // D24F
282      GL_ZERO,           // D32F
283      GL_ZERO,           // D0S8
282284   };
283285   BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_imageFormat) );
284286
r31873r31874
286288   {
287289      enum Enum
288290      {
291         AMD_conservative_depth,
292
289293         ANGLE_depth_texture,
290294         ANGLE_framebuffer_blit,
291295         ANGLE_framebuffer_multisample,
r31873r31874
299303         APPLE_texture_max_level,
300304
301305         ARB_compute_shader,
306         ARB_conservative_depth,
302307         ARB_debug_label,
303308         ARB_debug_output,
309         ARB_depth_buffer_float,
304310         ARB_depth_clamp,
305311         ARB_draw_buffers_blend,
312         ARB_draw_instanced,
306313         ARB_ES3_compatibility,
307314         ARB_framebuffer_object,
308315         ARB_framebuffer_sRGB,
r31873r31874
312319         ARB_instanced_arrays,
313320         ARB_map_buffer_range,
314321         ARB_multisample,
322         ARB_occlusion_query,
323         ARB_occlusion_query2,
315324         ARB_program_interface_query,
316325         ARB_sampler_objects,
317326         ARB_seamless_cube_map,
327         ARB_shader_bit_encoding,
318328         ARB_shader_image_load_store,
319329         ARB_shader_storage_buffer_object,
320330         ARB_shader_texture_lod,
r31873r31874
351361         EXT_framebuffer_object,
352362         EXT_framebuffer_sRGB,
353363         EXT_occlusion_query_boolean,
364         EXT_packed_float,
354365         EXT_read_format_bgra,
355366         EXT_shader_image_load_store,
356367         EXT_shader_texture_lod,
r31873r31874
432443
433444   static Extension s_extension[Extension::Count] =
434445   {
446      { "AMD_conservative_depth",                false,                             true  },
447
435448      { "ANGLE_depth_texture",                   false,                             true  },
436449      { "ANGLE_framebuffer_blit",                false,                             true  },
437450      { "ANGLE_framebuffer_multisample",         false,                             false },
r31873r31874
445458      { "APPLE_texture_max_level",               false,                             true  },
446459
447460      { "ARB_compute_shader",                    BGFX_CONFIG_RENDERER_OPENGL >= 43, true  },
461      { "ARB_conservative_depth",                BGFX_CONFIG_RENDERER_OPENGL >= 42, true  },
448462      { "ARB_debug_label",                       false,                             true  },
449463      { "ARB_debug_output",                      BGFX_CONFIG_RENDERER_OPENGL >= 43, true  },
464      { "ARB_depth_buffer_float",                BGFX_CONFIG_RENDERER_OPENGL >= 33, true  },
450465      { "ARB_depth_clamp",                       BGFX_CONFIG_RENDERER_OPENGL >= 32, true  },
451466      { "ARB_draw_buffers_blend",                BGFX_CONFIG_RENDERER_OPENGL >= 40, true  },
467      { "ARB_draw_instanced",                    BGFX_CONFIG_RENDERER_OPENGL >= 33, true  },
452468      { "ARB_ES3_compatibility",                 BGFX_CONFIG_RENDERER_OPENGL >= 43, true  },
453469      { "ARB_framebuffer_object",                BGFX_CONFIG_RENDERER_OPENGL >= 30, true  },
454470      { "ARB_framebuffer_sRGB",                  BGFX_CONFIG_RENDERER_OPENGL >= 30, true  },
r31873r31874
458474      { "ARB_instanced_arrays",                  BGFX_CONFIG_RENDERER_OPENGL >= 33, true  },
459475      { "ARB_map_buffer_range",                  BGFX_CONFIG_RENDERER_OPENGL >= 30, true  },
460476      { "ARB_multisample",                       false,                             true  },
477      { "ARB_occlusion_query",                   BGFX_CONFIG_RENDERER_OPENGL >= 33, true  },
478      { "ARB_occlusion_query2",                  BGFX_CONFIG_RENDERER_OPENGL >= 33, true  },
461479      { "ARB_program_interface_query",           BGFX_CONFIG_RENDERER_OPENGL >= 43, true  },
462480      { "ARB_sampler_objects",                   BGFX_CONFIG_RENDERER_OPENGL >= 33, true  },
463481      { "ARB_seamless_cube_map",                 BGFX_CONFIG_RENDERER_OPENGL >= 32, true  },
482      { "ARB_shader_bit_encoding",               BGFX_CONFIG_RENDERER_OPENGL >= 33, true  },
464483      { "ARB_shader_image_load_store",           BGFX_CONFIG_RENDERER_OPENGL >= 42, true  },
465484      { "ARB_shader_storage_buffer_object",      BGFX_CONFIG_RENDERER_OPENGL >= 43, true  },
466485      { "ARB_shader_texture_lod",                BGFX_CONFIG_RENDERER_OPENGL >= 30, true  },
r31873r31874
497516      { "EXT_framebuffer_object",                BGFX_CONFIG_RENDERER_OPENGL >= 30, true  },
498517      { "EXT_framebuffer_sRGB",                  BGFX_CONFIG_RENDERER_OPENGL >= 30, true  },
499518      { "EXT_occlusion_query_boolean",           false,                             true  },
519      { "EXT_packed_float",                      BGFX_CONFIG_RENDERER_OPENGL >= 33, true  },
500520      { "EXT_read_format_bgra",                  false,                             true  },
501521      { "EXT_shader_image_load_store",           false,                             true  },
502522      { "EXT_shader_texture_lod",                false,                             true  }, // GLES2 extension.
r31873r31874
818838         , m_programBinarySupport(false)
819839         , m_textureSwizzleSupport(false)
820840         , m_depthTextureSupport(false)
821         , m_useClearQuad(!!BGFX_CONFIG_RENDERER_OPENGL)
822841         , m_flip(false)
823842         , m_hash( (BX_PLATFORM_WINDOWS<<1) | BX_ARCH_64BIT)
824843         , m_backBufferFbo(0)
r31873r31874
20172036         }
20182037      }
20192038
2020      void clearQuad(ClearQuad& _clearQuad, const Rect& _rect, const Clear& _clear, uint32_t _height)
2039      void clearQuad(ClearQuad& _clearQuad, const Rect& _rect, const Clear& _clear, uint32_t _height, const float _palette[][4])
20212040      {
2022         if (BX_ENABLED(BGFX_CONFIG_CLEAR_QUAD)
2023         &&  m_useClearQuad)
2041         uint32_t numMrt = 1;
2042         FrameBufferHandle fbh = m_fbh;
2043         if (isValid(fbh) )
20242044         {
2045            const FrameBufferGL& fb = m_frameBuffers[fbh.idx];
2046            numMrt = bx::uint32_max(1, fb.m_num);
2047         }
2048
2049         if (1 == numMrt)
2050         {
2051            GLuint flags = 0;
2052            if (BGFX_CLEAR_COLOR_BIT & _clear.m_flags)
2053            {
2054               if (BGFX_CLEAR_COLOR_USE_PALETTE_BIT & _clear.m_flags)
2055               {
2056                  uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE-1, _clear.m_index[0]);
2057                  const float* rgba = _palette[index];
2058                  const float rr = rgba[0];
2059                  const float gg = rgba[1];
2060                  const float bb = rgba[2];
2061                  const float aa = rgba[3];
2062                  GL_CHECK(glClearColor(rr, gg, bb, aa) );
2063               }
2064               else
2065               {
2066                  float rr = _clear.m_index[0]*1.0f/255.0f;
2067                  float gg = _clear.m_index[1]*1.0f/255.0f;
2068                  float bb = _clear.m_index[2]*1.0f/255.0f;
2069                  float aa = _clear.m_index[3]*1.0f/255.0f;
2070                  GL_CHECK(glClearColor(rr, gg, bb, aa) );
2071               }
2072
2073               flags |= GL_COLOR_BUFFER_BIT;
2074               GL_CHECK(glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE) );
2075            }
2076
2077            if (BGFX_CLEAR_DEPTH_BIT & _clear.m_flags)
2078            {
2079               flags |= GL_DEPTH_BUFFER_BIT;
2080               GL_CHECK(glClearDepth(_clear.m_depth) );
2081               GL_CHECK(glDepthMask(GL_TRUE) );
2082            }
2083
2084            if (BGFX_CLEAR_STENCIL_BIT & _clear.m_flags)
2085            {
2086               flags |= GL_STENCIL_BUFFER_BIT;
2087               GL_CHECK(glClearStencil(_clear.m_stencil) );
2088            }
2089
2090            if (0 != flags)
2091            {
2092               GL_CHECK(glEnable(GL_SCISSOR_TEST) );
2093               GL_CHECK(glScissor(_rect.m_x, _height-_rect.m_height-_rect.m_y, _rect.m_width, _rect.m_height) );
2094               GL_CHECK(glClear(flags) );
2095               GL_CHECK(glDisable(GL_SCISSOR_TEST) );
2096            }
2097         }
2098         else
2099         {
20252100            const GLuint defaultVao = m_vao;
20262101            if (0 != defaultVao)
20272102            {
r31873r31874
20662141                  float m_x;
20672142                  float m_y;
20682143                  float m_z;
2069                  uint32_t m_abgr;
2070               } * vertex = (Vertex*)_clearQuad.m_vb->data;
2144               };
2145               
2146               Vertex* vertex = (Vertex*)_clearQuad.m_vb->data;
20712147               BX_CHECK(vertexDecl.m_stride == sizeof(Vertex), "Stride/Vertex mismatch (stride %d, sizeof(Vertex) %d)", vertexDecl.m_stride, sizeof(Vertex) );
20722148
2073               const uint32_t abgr = bx::endianSwap(_clear.m_rgba);
20742149               const float depth = _clear.m_depth;
20752150
20762151               vertex->m_x = -1.0f;
20772152               vertex->m_y = -1.0f;
20782153               vertex->m_z = depth;
2079               vertex->m_abgr = abgr;
20802154               vertex++;
20812155               vertex->m_x =  1.0f;
20822156               vertex->m_y = -1.0f;
20832157               vertex->m_z = depth;
2084               vertex->m_abgr = abgr;
20852158               vertex++;
2086               vertex->m_x = 1.0f;
2159               vertex->m_x = -1.0f;
20872160               vertex->m_y =  1.0f;
20882161               vertex->m_z = depth;
2089               vertex->m_abgr = abgr;
20902162               vertex++;
2091               vertex->m_x = -1.0f;
2163               vertex->m_x = 1.0f;
20922164               vertex->m_y =  1.0f;
20932165               vertex->m_z = depth;
2094               vertex->m_abgr = abgr;
20952166            }
20962167
2097            m_vertexBuffers[_clearQuad.m_vb->handle.idx].update(0, 4*_clearQuad.m_decl.m_stride, _clearQuad.m_vb->data);
2168            vb.update(0, 4*_clearQuad.m_decl.m_stride, _clearQuad.m_vb->data);
20982169
20992170            GL_CHECK(glBindBuffer(GL_ARRAY_BUFFER, vb.m_id) );
21002171
2101            IndexBufferGL& ib = m_indexBuffers[_clearQuad.m_ib.idx];
2102            GL_CHECK(glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, ib.m_id) );
2103
2104            uint32_t numMrt = 0;
2105            FrameBufferHandle fbh = m_fbh;
2106            if (isValid(fbh) )
2107            {
2108               const FrameBufferGL& fb = m_frameBuffers[fbh.idx];
2109               numMrt = bx::uint32_max(1, fb.m_num)-1;
2110            }
2111
2112            ProgramGL& program = m_program[_clearQuad.m_program[numMrt].idx];
2172            ProgramGL& program = m_program[_clearQuad.m_program[numMrt-1].idx];
21132173            GL_CHECK(glUseProgram(program.m_id) );
21142174            program.bindAttributes(vertexDecl, 0);
21152175
2116            GL_CHECK(glDrawElements(GL_TRIANGLES
2117               , 6
2118               , GL_UNSIGNED_SHORT
2119               , (void*)0
2120               ) );
2121         }
2122         else
2123         {
2124            GLuint flags = 0;
2125            if (BGFX_CLEAR_COLOR_BIT & _clear.m_flags)
2176            if (BGFX_CLEAR_COLOR_USE_PALETTE_BIT & _clear.m_flags)
21262177            {
2127               flags |= GL_COLOR_BUFFER_BIT;
2128               uint32_t rgba = _clear.m_rgba;
2129               float rr = (rgba>>24)/255.0f;
2130               float gg = ( (rgba>>16)&0xff)/255.0f;
2131               float bb = ( (rgba>>8)&0xff)/255.0f;
2132               float aa = (rgba&0xff)/255.0f;
2133               GL_CHECK(glClearColor(rr, gg, bb, aa) );
2134               GL_CHECK(glColorMask(GL_TRUE, GL_TRUE, GL_TRUE, GL_TRUE) );
2135            }
2178               float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
2179               for (uint32_t ii = 0; ii < numMrt; ++ii)
2180               {
2181                  uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE-1, _clear.m_index[ii]);
2182                  memcpy(mrtClear[ii], _palette[index], 16);
2183               }
21362184
2137            if (BGFX_CLEAR_DEPTH_BIT & _clear.m_flags)
2138            {
2139               flags |= GL_DEPTH_BUFFER_BIT;
2140               GL_CHECK(glClearDepth(_clear.m_depth) );
2141               GL_CHECK(glDepthMask(GL_TRUE) );
2185               GL_CHECK(glUniform4fv(0, numMrt, mrtClear[0]) );
21422186            }
2143
2144            if (BGFX_CLEAR_STENCIL_BIT & _clear.m_flags)
2187            else
21452188            {
2146               flags |= GL_STENCIL_BUFFER_BIT;
2147               GL_CHECK(glClearStencil(_clear.m_stencil) );
2189               float rgba[4] =
2190               {
2191                  _clear.m_index[0]*1.0f/255.0f,
2192                  _clear.m_index[1]*1.0f/255.0f,
2193                  _clear.m_index[2]*1.0f/255.0f,
2194                  _clear.m_index[3]*1.0f/255.0f,
2195               };
2196               GL_CHECK(glUniform4fv(0, 1, rgba) );
21482197            }
21492198
2150            if (0 != flags)
2151            {
2152               GL_CHECK(glEnable(GL_SCISSOR_TEST) );
2153               GL_CHECK(glScissor(_rect.m_x, _height-_rect.m_height-_rect.m_y, _rect.m_width, _rect.m_height) );
2154               GL_CHECK(glClear(flags) );
2155               GL_CHECK(glDisable(GL_SCISSOR_TEST) );
2156            }
2199            GL_CHECK(glDrawArrays(GL_TRIANGLE_STRIP
2200               , 0
2201               , 4
2202               ) );
21572203         }
21582204      }
21592205
r31873r31874
21882234      bool m_programBinarySupport;
21892235      bool m_textureSwizzleSupport;
21902236      bool m_depthTextureSupport;
2191      bool m_useClearQuad;
21922237      bool m_flip;
21932238
21942239      uint64_t m_hash;
r31873r31874
35423587
35433588                  if (!!bx::findIdentifierMatch(code, "gl_FragData") )
35443589                  {
3545                     using namespace bx;
3546                     fragData = uint32_max(fragData, NULL == strstr(code, "gl_FragData[0]") ? 0 : 1);
3547                     fragData = uint32_max(fragData, NULL == strstr(code, "gl_FragData[1]") ? 0 : 2);
3548                     fragData = uint32_max(fragData, NULL == strstr(code, "gl_FragData[2]") ? 0 : 3);
3549                     fragData = uint32_max(fragData, NULL == strstr(code, "gl_FragData[3]") ? 0 : 4);
3590                     for (uint32_t ii = 0, num = g_caps.maxFBAttachments; ii < num; ++ii)
3591                     {
3592                        char temp[16];
3593                        bx::snprintf(temp, BX_COUNTOF(temp), "gl_FragData[%d]", ii);
3594                        fragData = bx::uint32_max(fragData, NULL == strstr(code, temp) ? 0 : ii+1);
3595                     }
35503596
35513597                     BGFX_FATAL(0 != fragData, Fatal::InvalidShader, "Unable to find and patch gl_FragData!");
35523598                  }
r31873r31874
39083954
39093955               if (BGFX_CLEAR_NONE != clear.m_flags)
39103956               {
3911                  clearQuad(_clearQuad, rect, clear, height);
3957                  clearQuad(_clearQuad, rect, clear, height, _render->m_clearColor);
39123958               }
39133959
39143960               GL_CHECK(glDisable(GL_STENCIL_TEST) );
r31873r31874
47814827
47824828               pos++;
47834829               tvm.printf(10, pos++, 0x8c, " -------------|    free|  free b|     aux|  aux fb");
4784               tvm.printf(10, pos++, 0x8e, "           VBO: %7d, %7d, %7d, %7d", vboFree[0], vboFree[1], vboFree[2], vboFree[3]);
4785               tvm.printf(10, pos++, 0x8e, "       Texture: %7d, %7d, %7d, %7d", texFree[0], texFree[1], texFree[2], texFree[3]);
4786               tvm.printf(10, pos++, 0x8e, " Render Buffer: %7d, %7d, %7d, %7d", rbfFree[0], rbfFree[1], rbfFree[2], rbfFree[3]);
4830
4831               char tmp0[16];
4832               char tmp1[16];
4833               char tmp2[16];
4834               char tmp3[16];
4835
4836               bx::prettify(tmp0, BX_COUNTOF(tmp0), vboFree[0]);
4837               bx::prettify(tmp1, BX_COUNTOF(tmp1), vboFree[1]);
4838               bx::prettify(tmp2, BX_COUNTOF(tmp2), vboFree[2]);
4839               bx::prettify(tmp3, BX_COUNTOF(tmp3), vboFree[3]);
4840               tvm.printf(10, pos++, 0x8e, "           VBO: %10s, %10s, %10s, %10s", tmp0, tmp1, tmp2, tmp3);
4841
4842               bx::prettify(tmp0, BX_COUNTOF(tmp0), texFree[0]);
4843               bx::prettify(tmp1, BX_COUNTOF(tmp1), texFree[1]);
4844               bx::prettify(tmp2, BX_COUNTOF(tmp2), texFree[2]);
4845               bx::prettify(tmp3, BX_COUNTOF(tmp3), texFree[3]);
4846               tvm.printf(10, pos++, 0x8e, "       Texture: %10s, %10s, %10s, %10s", tmp0, tmp1, tmp2, tmp3);
4847
4848               bx::prettify(tmp0, BX_COUNTOF(tmp0), rbfFree[0]);
4849               bx::prettify(tmp1, BX_COUNTOF(tmp1), rbfFree[1]);
4850               bx::prettify(tmp2, BX_COUNTOF(tmp2), rbfFree[2]);
4851               bx::prettify(tmp3, BX_COUNTOF(tmp3), rbfFree[3]);
4852               tvm.printf(10, pos++, 0x8e, " Render Buffer: %10s, %10s, %10s, %10s", tmp0, tmp1, tmp2, tmp3);
47874853            }
47884854            else if (s_extension[Extension::NVX_gpu_memory_info].m_supported)
47894855            {
r31873r31874
47924858
47934859               GLint totalAvail;
47944860               GL_CHECK(glGetIntegerv(GL_GPU_MEMORY_INFO_TOTAL_AVAILABLE_MEMORY_NVX, &totalAvail) );
4795
47964861               GLint currAvail;
47974862               GL_CHECK(glGetIntegerv(GL_GPU_MEMORY_INFO_CURRENT_AVAILABLE_VIDMEM_NVX, &currAvail) );
47984863
r31873r31874
48024867               GLint evictedMemory;
48034868               GL_CHECK(glGetIntegerv(GL_GPU_MEMORY_INFO_EVICTED_MEMORY_NVX, &evictedMemory) );
48044869
4805               pos++;
4806               tvm.printf(10, pos++, 0x8c, "----------|");
4807               tvm.printf(10, pos++, 0x8e, " Dedicated: %7d", dedicated);
4808               tvm.printf(10, pos++, 0x8e, " Available: %7d (%7d)", currAvail, totalAvail);
4809               tvm.printf(10, pos++, 0x8e, "  Eviction: %7d / %7d", evictedCount, evictedMemory);
4870               pos += 2;
4871
4872               char tmp0[16];
4873               char tmp1[16];
4874
4875               bx::prettify(tmp0, BX_COUNTOF(tmp0), dedicated);
4876               tvm.printf(10, pos++, 0x8e, " Dedicated: %10s", tmp0);
4877
4878               bx::prettify(tmp0, BX_COUNTOF(tmp0), currAvail);
4879               bx::prettify(tmp1, BX_COUNTOF(tmp1), totalAvail);
4880               tvm.printf(10, pos++, 0x8e, " Available: %10s / %10s", tmp0, tmp1);
4881
4882               bx::prettify(tmp0, BX_COUNTOF(tmp0), evictedCount);
4883               bx::prettify(tmp1, BX_COUNTOF(tmp1), evictedMemory);
4884               tvm.printf(10, pos++, 0x8e, "  Eviction: %10s / %10s", tmp0, tmp1);
48104885            }
48114886#endif // BGFX_CONFIG_RENDERER_OPENGL
48124887
branches/osd/src/lib/bgfx/renderer_d3d9.cpp
r31873r31874
2626      { D3DPT_TRIANGLESTRIP, 3, 1, 2 },
2727      { D3DPT_LINELIST,      2, 2, 0 },
2828      { D3DPT_POINTLIST,     1, 1, 0 },
29      { D3DPRIMITIVETYPE(0), 0, 0, 0 },
2930   };
3031
3132   static const char* s_primName[] =
r31873r31874
3536      "Line",
3637      "Point",
3738   };
39   BX_STATIC_ASSERT(BX_COUNTOF(s_primInfo) == BX_COUNTOF(s_primName)+1);
3840
3941   static const D3DMULTISAMPLE_TYPE s_checkMsaa[] =
4042   {
r31873r31874
223225      { D3DFMT_A4R4G4B4      }, // RGBA4
224226      { D3DFMT_A1R5G5B5      }, // RGB5A1
225227      { D3DFMT_A2B10G10R10   }, // RGB10A2
228      { D3DFMT_UNKNOWN       }, // R11G11B10F
226229      { D3DFMT_UNKNOWN       }, // UnknownDepth
227230      { D3DFMT_D16           }, // D16 
228231      { D3DFMT_D24X8         }, // D24 
r31873r31874
773776            , m_params.BackBufferHeight
774777            , rect.Pitch
775778            , &data[point.y*rect.Pitch+point.x*bytesPerPixel]
776         , m_params.BackBufferHeight*rect.Pitch
779            , m_params.BackBufferHeight*rect.Pitch
777780            , false
778781            );
779782
r31873r31874
837840         DX_CHECK(device->SetPixelShader(program.m_fsh->m_pixelShader) );
838841
839842         VertexBufferD3D9& vb = m_vertexBuffers[_blitter.m_vb->handle.idx];
840         VertexDeclaration& vertexDecl = m_vertexDecls[_blitter.m_vb->decl.idx];
843         VertexDeclD3D9& vertexDecl = m_vertexDecls[_blitter.m_vb->decl.idx];
841844         DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, vertexDecl.m_decl.m_stride) );
842845         DX_CHECK(device->SetVertexDeclaration(vertexDecl.m_ptr) );
843846
r31873r31874
857860      void blitRender(TextVideoMemBlitter& _blitter, uint32_t _numIndices) BX_OVERRIDE
858861      {
859862         uint32_t numVertices = _numIndices*4/6;
860         m_indexBuffers[_blitter.m_ib->handle.idx].update(0, _numIndices*2, _blitter.m_ib->data, true);
863         m_indexBuffers [_blitter.m_ib->handle.idx].update(0, _numIndices*2, _blitter.m_ib->data, true);
861864         m_vertexBuffers[_blitter.m_vb->handle.idx].update(0, numVertices*_blitter.m_decl.m_stride, _blitter.m_vb->data, true);
862865
863866         DX_CHECK(m_device->DrawIndexedPrimitive(D3DPT_TRIANGLELIST
r31873r31874
13581361            }
13591362
13601363#undef CASE_IMPLEMENT_UNIFORM
1364         }
1365      }
13611366
1367      void clearQuad(ClearQuad& _clearQuad, const Rect& _rect, const Clear& _clear, const float _palette[][4])
1368      {
1369         IDirect3DDevice9* device = m_device;
1370
1371         uint32_t numMrt = 1;
1372         FrameBufferHandle fbh = m_fbh;
1373         if (isValid(fbh) )
1374         {
1375            const FrameBufferD3D9& fb = m_frameBuffers[fbh.idx];
1376            numMrt = bx::uint32_max(1, fb.m_num);
13621377         }
1378
1379         if (1 == numMrt)
1380         {
1381            D3DCOLOR color = 0;
1382            DWORD flags    = 0;
1383
1384            if (BGFX_CLEAR_COLOR_BIT & _clear.m_flags)
1385            {
1386               if (BGFX_CLEAR_COLOR_USE_PALETTE_BIT & _clear.m_flags)
1387               {
1388                  uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE-1, _clear.m_index[0]);
1389                  const float* rgba = _palette[index];
1390                  const float rr = rgba[0];
1391                  const float gg = rgba[1];
1392                  const float bb = rgba[2];
1393                  const float aa = rgba[3];
1394                  color = D3DCOLOR_COLORVALUE(rr, gg, bb, aa);
1395               }
1396               else
1397               {
1398                  color = D3DCOLOR_RGBA(_clear.m_index[0], _clear.m_index[1], _clear.m_index[2], _clear.m_index[3]);
1399               }
1400
1401               flags |= D3DCLEAR_TARGET;
1402               DX_CHECK(device->SetRenderState(D3DRS_COLORWRITEENABLE
1403                  , D3DCOLORWRITEENABLE_RED
1404                  | D3DCOLORWRITEENABLE_GREEN
1405                  | D3DCOLORWRITEENABLE_BLUE
1406                  | D3DCOLORWRITEENABLE_ALPHA
1407                  ) );
1408            }
1409
1410            if (BGFX_CLEAR_DEPTH_BIT & _clear.m_flags)
1411            {
1412               flags |= D3DCLEAR_ZBUFFER;
1413               DX_CHECK(device->SetRenderState(D3DRS_ZWRITEENABLE, TRUE) );
1414            }
1415
1416            if (BGFX_CLEAR_STENCIL_BIT & _clear.m_flags)
1417            {
1418               flags |= D3DCLEAR_STENCIL;
1419            }
1420
1421            if (0 != flags)
1422            {
1423               RECT rc;
1424               rc.left   = _rect.m_x;
1425               rc.top    = _rect.m_y;
1426               rc.right  = _rect.m_x + _rect.m_width;
1427               rc.bottom = _rect.m_y + _rect.m_height;
1428               DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE) );
1429               DX_CHECK(device->SetScissorRect(&rc) );
1430               DX_CHECK(device->Clear(0, NULL, flags, color, _clear.m_depth, _clear.m_stencil) );
1431               DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE) );
1432            }
1433         }
1434         else
1435         {
1436            DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE) );
1437            DX_CHECK(device->SetRenderState(D3DRS_CULLMODE, D3DCULL_NONE) );
1438            DX_CHECK(device->SetRenderState(D3DRS_ALPHABLENDENABLE, FALSE) );
1439
1440            if (BGFX_CLEAR_DEPTH_BIT & _clear.m_flags)
1441            {
1442               DX_CHECK(device->SetRenderState(D3DRS_ZWRITEENABLE, TRUE) );
1443               DX_CHECK(device->SetRenderState(D3DRS_COLORWRITEENABLE
1444                  , D3DCOLORWRITEENABLE_RED
1445                  | D3DCOLORWRITEENABLE_GREEN
1446                  | D3DCOLORWRITEENABLE_BLUE
1447                  | D3DCOLORWRITEENABLE_ALPHA
1448                  ) );
1449               DX_CHECK(device->SetRenderState(D3DRS_ZENABLE, TRUE) );
1450               DX_CHECK(device->SetRenderState(D3DRS_ZFUNC, D3DCMP_ALWAYS) );
1451            }
1452            else
1453            {
1454               DX_CHECK(device->SetRenderState(D3DRS_ZWRITEENABLE, FALSE) );
1455               DX_CHECK(device->SetRenderState(D3DRS_COLORWRITEENABLE, 0) );
1456               DX_CHECK(device->SetRenderState(D3DRS_ZENABLE, FALSE) );
1457            }
1458
1459            if (BGFX_CLEAR_STENCIL_BIT & _clear.m_flags)
1460            {
1461               DX_CHECK(device->SetRenderState(D3DRS_STENCILENABLE, TRUE) );
1462               DX_CHECK(device->SetRenderState(D3DRS_TWOSIDEDSTENCILMODE, TRUE) );
1463               DX_CHECK(device->SetRenderState(D3DRS_STENCILREF, _clear.m_stencil) );
1464               DX_CHECK(device->SetRenderState(D3DRS_STENCILMASK, 0xff) );
1465               DX_CHECK(device->SetRenderState(D3DRS_STENCILFUNC,  D3DCMP_ALWAYS) );
1466               DX_CHECK(device->SetRenderState(D3DRS_STENCILFAIL,  D3DSTENCILOP_REPLACE) );
1467               DX_CHECK(device->SetRenderState(D3DRS_STENCILZFAIL, D3DSTENCILOP_REPLACE) );
1468               DX_CHECK(device->SetRenderState(D3DRS_STENCILPASS,  D3DSTENCILOP_REPLACE) );
1469            }
1470            else
1471            {
1472               DX_CHECK(device->SetRenderState(D3DRS_STENCILENABLE, FALSE) );
1473            }
1474
1475            VertexBufferD3D9& vb = m_vertexBuffers[_clearQuad.m_vb->handle.idx];
1476            VertexDeclD3D9& vertexDecl = m_vertexDecls[_clearQuad.m_vb->decl.idx];
1477            uint32_t stride = _clearQuad.m_decl.m_stride;
1478
1479            {
1480               struct Vertex
1481               {
1482                  float m_x;
1483                  float m_y;
1484                  float m_z;
1485               };
1486
1487               Vertex* vertex = (Vertex*)_clearQuad.m_vb->data;
1488               BX_CHECK(stride == sizeof(Vertex), "Stride/Vertex mismatch (stride %d, sizeof(Vertex) %d)", stride, sizeof(Vertex) );
1489
1490               const float depth = _clear.m_depth;
1491
1492               vertex->m_x = -1.0f;
1493               vertex->m_y = -1.0f;
1494               vertex->m_z = depth;
1495               vertex++;
1496               vertex->m_x =  1.0f;
1497               vertex->m_y = -1.0f;
1498               vertex->m_z = depth;
1499               vertex++;
1500               vertex->m_x = -1.0f;
1501               vertex->m_y =  1.0f;
1502               vertex->m_z = depth;
1503               vertex++;
1504               vertex->m_x =  1.0f;
1505               vertex->m_y =  1.0f;
1506               vertex->m_z = depth;
1507            }
1508
1509            vb.update(0, 4*stride, _clearQuad.m_vb->data);
1510
1511            ProgramD3D9& program = m_program[_clearQuad.m_program[numMrt-1].idx];
1512            device->SetVertexShader(program.m_vsh->m_vertexShader);
1513            device->SetPixelShader(program.m_fsh->m_pixelShader);
1514
1515            if (BGFX_CLEAR_COLOR_USE_PALETTE_BIT & _clear.m_flags)
1516            {
1517               float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
1518               for (uint32_t ii = 0; ii < numMrt; ++ii)
1519               {
1520                  uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE-1, _clear.m_index[ii]);
1521                  memcpy(mrtClear[ii], _palette[index], 16);
1522               }
1523
1524               DX_CHECK(m_device->SetPixelShaderConstantF(0, mrtClear[0], numMrt) );
1525            }
1526            else
1527            {
1528               float rgba[4] =
1529               {
1530                  _clear.m_index[0]*1.0f/255.0f,
1531                  _clear.m_index[1]*1.0f/255.0f,
1532                  _clear.m_index[2]*1.0f/255.0f,
1533                  _clear.m_index[3]*1.0f/255.0f,
1534               };
1535
1536               DX_CHECK(m_device->SetPixelShaderConstantF(0, rgba, 1) );
1537            }
1538
1539            DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, stride) );
1540            DX_CHECK(device->SetStreamSourceFreq(0, 1) );
1541            DX_CHECK(device->SetStreamSource(1, NULL, 0, 0) );
1542            DX_CHECK(device->SetVertexDeclaration(vertexDecl.m_ptr) );
1543            DX_CHECK(device->SetIndices(NULL) );
1544            DX_CHECK(device->DrawPrimitive(D3DPT_TRIANGLESTRIP
1545               , 0
1546               , 2
1547               ) );
1548         }
13631549      }
13641550
13651551#if BX_PLATFORM_WINDOWS
r31873r31874
14101596      ShaderD3D9 m_shaders[BGFX_CONFIG_MAX_SHADERS];
14111597      ProgramD3D9 m_program[BGFX_CONFIG_MAX_PROGRAMS];
14121598      TextureD3D9 m_textures[BGFX_CONFIG_MAX_TEXTURES];
1413      VertexDeclaration m_vertexDecls[BGFX_CONFIG_MAX_VERTEX_DECLS];
1599      VertexDeclD3D9 m_vertexDecls[BGFX_CONFIG_MAX_VERTEX_DECLS];
14141600      FrameBufferD3D9 m_frameBuffers[BGFX_CONFIG_MAX_FRAME_BUFFERS];
14151601      UniformRegistry m_uniformReg;
14161602      void* m_uniforms[BGFX_CONFIG_MAX_UNIFORMS];
r31873r31874
16411827      return ptr;
16421828   }
16431829
1644   void VertexDeclaration::create(const VertexDecl& _decl)
1830   void VertexDeclD3D9::create(const VertexDecl& _decl)
16451831   {
16461832      memcpy(&m_decl, &_decl, sizeof(VertexDecl) );
16471833      dump(m_decl);
r31873r31874
17751961      if (isDepth(fmt) )
17761962      {
17771963         usage = D3DUSAGE_DEPTHSTENCIL;
1778         pool = D3DPOOL_DEFAULT;
1964         pool = D3DPOOL_DEFAULT;
17791965      }
17801966      else if (renderTarget)
17811967      {
17821968         usage = D3DUSAGE_RENDERTARGET;
1783         pool = D3DPOOL_DEFAULT;
1969         pool = D3DPOOL_DEFAULT;
17841970      }
17851971
17861972      if (renderTarget)
r31873r31874
24392625         ) );
24402626   }
24412627
2442   void RendererContextD3D9::submit(Frame* _render, ClearQuad& /*_clearQuad*/, TextVideoMemBlitter& _textVideoMemBlitter)
2628   void RendererContextD3D9::submit(Frame* _render, ClearQuad& _clearQuad, TextVideoMemBlitter& _textVideoMemBlitter)
24432629   {
24442630      IDirect3DDevice9* device = m_device;
24452631
r31873r31874
25682754
25692755               if (BGFX_CLEAR_NONE != clear.m_flags)
25702756               {
2571                  D3DCOLOR color = 0;
2572                  DWORD flags = 0;
2573
2574                  if (BGFX_CLEAR_COLOR_BIT & clear.m_flags)
2575                  {
2576                     flags |= D3DCLEAR_TARGET;
2577                     uint32_t rgba = clear.m_rgba;
2578                     color = D3DCOLOR_RGBA(rgba>>24, (rgba>>16)&0xff, (rgba>>8)&0xff, rgba&0xff);
2579                     DX_CHECK(device->SetRenderState(D3DRS_COLORWRITEENABLE, D3DCOLORWRITEENABLE_RED|D3DCOLORWRITEENABLE_GREEN|D3DCOLORWRITEENABLE_BLUE|D3DCOLORWRITEENABLE_ALPHA) );
2580                  }
2581
2582                  if (BGFX_CLEAR_DEPTH_BIT & clear.m_flags)
2583                  {
2584                     flags |= D3DCLEAR_ZBUFFER;
2585                     DX_CHECK(device->SetRenderState(D3DRS_ZWRITEENABLE, TRUE) );
2586                  }
2587
2588                  if (BGFX_CLEAR_STENCIL_BIT & clear.m_flags)
2589                  {
2590                     flags |= D3DCLEAR_STENCIL;
2591                  }
2592
2593                  if (0 != flags)
2594                  {
2595                     RECT rc;
2596                     rc.left = rect.m_x;
2597                     rc.top = rect.m_y;
2598                     rc.right = rect.m_x + rect.m_width;
2599                     rc.bottom = rect.m_y + rect.m_height;
2600                     DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, TRUE) );
2601                     DX_CHECK(device->SetScissorRect(&rc) );
2602                     DX_CHECK(device->Clear(0, NULL, flags, color, clear.m_depth, clear.m_stencil) );
2603                     DX_CHECK(device->SetRenderState(D3DRS_SCISSORTESTENABLE, FALSE) );
2604                  }
2757                  clearQuad(_clearQuad, rect, clear, _render->m_clearColor);
2758                  prim = s_primInfo[BX_COUNTOF(s_primName)]; // Force primitive type update after clear quad.
26052759               }
26062760
26072761               DX_CHECK(device->SetRenderState(D3DRS_STENCILENABLE, FALSE) );
r31873r31874
30153169                  const VertexBufferD3D9& vb = m_vertexBuffers[handle];
30163170
30173171                  uint16_t decl = !isValid(vb.m_decl) ? draw.m_vertexDecl.idx : vb.m_decl.idx;
3018                  const VertexDeclaration& vertexDecl = m_vertexDecls[decl];
3172                  const VertexDeclD3D9& vertexDecl = m_vertexDecls[decl];
30193173                  DX_CHECK(device->SetStreamSource(0, vb.m_ptr, 0, vertexDecl.m_decl.m_stride) );
30203174
30213175                  if (isValid(draw.m_instanceDataBuffer)
r31873r31874
30673221               {
30683222                  const VertexBufferD3D9& vb = m_vertexBuffers[currentState.m_vertexBuffer.idx];
30693223                  uint16_t decl = !isValid(vb.m_decl) ? draw.m_vertexDecl.idx : vb.m_decl.idx;
3070                  const VertexDeclaration& vertexDecl = m_vertexDecls[decl];
3224                  const VertexDeclD3D9& vertexDecl = m_vertexDecls[decl];
30713225                  numVertices = vb.m_size/vertexDecl.m_decl.m_stride;
30723226               }
30733227
r31873r31874
31943348               , _render->m_num
31953349               , elapsedCpuMs
31963350               );
3197            for (uint32_t ii = 0; ii < BX_COUNTOF(s_primInfo); ++ii)
3351            for (uint32_t ii = 0; ii < BX_COUNTOF(s_primName); ++ii)
31983352            {
31993353               tvm.printf(10, pos++, 0x8e, "    %8s: %7d (#inst: %5d), submitted: %7d"
32003354                  , s_primName[ii]
branches/osd/src/lib/bgfx/renderer_d3d11.cpp
r31873r31874
2626      { D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP, 3, 1, 2 },
2727      { D3D11_PRIMITIVE_TOPOLOGY_LINELIST,      2, 2, 0 },
2828      { D3D11_PRIMITIVE_TOPOLOGY_POINTLIST,     1, 1, 0 },
29      { D3D10_PRIMITIVE_TOPOLOGY_UNDEFINED,     0, 0, 0 },
2930   };
3031
3132   static const char* s_primName[] =
r31873r31874
3536      "Line",
3637      "Point",
3738   };
39   BX_STATIC_ASSERT(BX_COUNTOF(s_primInfo) == BX_COUNTOF(s_primName)+1);
3840
3941   static const uint32_t s_checkMsaa[] =
4042   {
r31873r31874
237239      { DXGI_FORMAT_B4G4R4A4_UNORM,     DXGI_FORMAT_B4G4R4A4_UNORM,        DXGI_FORMAT_UNKNOWN           }, // RGBA4
238240      { DXGI_FORMAT_B5G5R5A1_UNORM,     DXGI_FORMAT_B5G5R5A1_UNORM,        DXGI_FORMAT_UNKNOWN           }, // RGB5A1
239241      { DXGI_FORMAT_R10G10B10A2_UNORM,  DXGI_FORMAT_R10G10B10A2_UNORM,     DXGI_FORMAT_UNKNOWN           }, // RGB10A2
242      { DXGI_FORMAT_R11G11B10_FLOAT,    DXGI_FORMAT_R11G11B10_FLOAT,       DXGI_FORMAT_UNKNOWN           }, // R11G11B10F
240243      { DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_UNKNOWN,               DXGI_FORMAT_UNKNOWN           }, // UnknownDepth
241244      { DXGI_FORMAT_R16_TYPELESS,       DXGI_FORMAT_R16_UNORM,             DXGI_FORMAT_D16_UNORM         }, // D16
242245      { DXGI_FORMAT_R24G8_TYPELESS,     DXGI_FORMAT_R24_UNORM_X8_TYPELESS, DXGI_FORMAT_D24_UNORM_S8_UINT }, // D24
r31873r31874
954957      {
955958         ID3D11DeviceContext* deviceCtx = m_deviceCtx;
956959
957         IndexBufferD3D11& ib = m_indexBuffers[_blitter.m_ib->handle.idx];
958         ib.update(0, _numIndices*2, _blitter.m_ib->data);
959
960960         uint32_t numVertices = _numIndices*4/6;
961         m_vertexBuffers[_blitter.m_vb->handle.idx].update(0, numVertices*_blitter.m_decl.m_stride, _blitter.m_vb->data);
961         m_indexBuffers [_blitter.m_ib->handle.idx].update(0, _numIndices*2, _blitter.m_ib->data);
962         m_vertexBuffers[_blitter.m_vb->handle.idx].update(0, numVertices*_blitter.m_decl.m_stride, _blitter.m_vb->data, true);
962963
963964         deviceCtx->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
964965         deviceCtx->DrawIndexed(_numIndices, 0, 0);
r31873r31874
11641165         m_rtMsaa = _msaa;
11651166      }
11661167
1167      void clear(const Clear& _clear)
1168      void clear(const Clear& _clear, const float _palette[][4])
11681169      {
11691170         if (isValid(m_fbh) )
11701171         {
11711172            FrameBufferD3D11& frameBuffer = m_frameBuffers[m_fbh.idx];
1172            frameBuffer.clear(_clear);
1173            frameBuffer.clear(_clear, _palette);
11731174         }
11741175         else
11751176         {
11761177            if (NULL != m_currentColor
11771178            &&  BGFX_CLEAR_COLOR_BIT & _clear.m_flags)
11781179            {
1179               uint32_t rgba = _clear.m_rgba;
1180               float frgba[4] = { (rgba>>24)/255.0f, ( (rgba>>16)&0xff)/255.0f, ( (rgba>>8)&0xff)/255.0f, (rgba&0xff)/255.0f };
1181               m_deviceCtx->ClearRenderTargetView(m_currentColor, frgba);
1180               if (BGFX_CLEAR_COLOR_USE_PALETTE_BIT & _clear.m_flags)
1181               {
1182                  uint8_t index = _clear.m_index[0];
1183                  if (UINT8_MAX != index)
1184                  {
1185                     m_deviceCtx->ClearRenderTargetView(m_currentColor, _palette[index]);
1186                  }
1187               }
1188               else
1189               {
1190                  float frgba[4] =
1191                  {
1192                     _clear.m_index[0]*1.0f/255.0f,
1193                     _clear.m_index[1]*1.0f/255.0f,
1194                     _clear.m_index[2]*1.0f/255.0f,
1195                     _clear.m_index[3]*1.0f/255.0f,
1196                  };
1197                  m_deviceCtx->ClearRenderTargetView(m_currentColor, frgba);
1198               }
11821199            }
11831200
11841201            if (NULL != m_currentDepthStencil
r31873r31874
16641681         }
16651682      }
16661683
1667      void clearQuad(ClearQuad& _clearQuad, const Rect& _rect, const Clear& _clear, uint32_t _height = 0)
1684      void clearQuad(ClearQuad& _clearQuad, const Rect& _rect, const Clear& _clear, const float _palette[][4])
16681685      {
1669         BX_UNUSED(_height);
16701686         uint32_t width  = m_scd.BufferDesc.Width;
16711687         uint32_t height = m_scd.BufferDesc.Height;
16721688
1673         if (0 == _rect.m_x
1674         &&  0 == _rect.m_y
1675         &&  width == _rect.m_width
1689         if (0      == _rect.m_x
1690         &&  0      == _rect.m_y
1691         &&  width  == _rect.m_width
16761692         &&  height == _rect.m_height)
16771693         {
1678            clear(_clear);
1694            clear(_clear, _palette);
16791695         }
16801696         else
16811697         {
r31873r31874
17001716            setDepthStencilState(state, stencil);
17011717            setRasterizerState(state);
17021718
1703            uint32_t numMrt = 0;
1719            uint32_t numMrt = 1;
17041720            FrameBufferHandle fbh = m_fbh;
17051721            if (isValid(fbh) )
17061722            {
17071723               const FrameBufferD3D11& fb = m_frameBuffers[fbh.idx];
1708               numMrt = bx::uint32_max(1, fb.m_num)-1;
1724               numMrt = bx::uint32_max(1, fb.m_num);
17091725            }
17101726
1711            ProgramD3D11& program = m_program[_clearQuad.m_program[numMrt].idx];
1727            ProgramD3D11& program = m_program[_clearQuad.m_program[numMrt-1].idx];
17121728            m_currentProgram = &program;
17131729            deviceCtx->VSSetShader(program.m_vsh->m_vertexShader, NULL, 0);
17141730            deviceCtx->VSSetConstantBuffers(0, 0, NULL);
17151731            if (NULL != m_currentColor)
17161732            {
1717               deviceCtx->PSSetShader(program.m_fsh->m_pixelShader, NULL, 0);
1718               deviceCtx->PSSetConstantBuffers(0, 0, NULL);
1733               const ShaderD3D11* fsh = program.m_fsh;
1734               deviceCtx->PSSetShader(fsh->m_pixelShader, NULL, 0);
1735               deviceCtx->PSSetConstantBuffers(0, 1, &fsh->m_buffer);
1736
1737               if (BGFX_CLEAR_COLOR_USE_PALETTE_BIT & _clear.m_flags)
1738               {
1739                  float mrtClear[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS][4];
1740                  for (uint32_t ii = 0; ii < numMrt; ++ii)
1741                  {
1742                     uint8_t index = (uint8_t)bx::uint32_min(BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE-1, _clear.m_index[ii]);
1743                     memcpy(mrtClear[ii], _palette[index], 16);
1744                  }
1745
1746                  deviceCtx->UpdateSubresource(fsh->m_buffer, 0, 0, mrtClear, 0, 0);
1747               }
1748               else
1749               {
1750                  float rgba[4] =
1751                  {
1752                     _clear.m_index[0]*1.0f/255.0f,
1753                     _clear.m_index[1]*1.0f/255.0f,
1754                     _clear.m_index[2]*1.0f/255.0f,
1755                     _clear.m_index[3]*1.0f/255.0f,
1756                  };
1757                  deviceCtx->UpdateSubresource(fsh->m_buffer, 0, 0, rgba, 0, 0);
1758               }
17191759            }
17201760            else
17211761            {
r31873r31874
17231763            }
17241764
17251765            VertexBufferD3D11& vb = m_vertexBuffers[_clearQuad.m_vb->handle.idx];
1726            VertexDecl& vertexDecl = m_vertexDecls[_clearQuad.m_vb->decl.idx];
1727            uint32_t stride = vertexDecl.m_stride;
1728            uint32_t offset = 0;
1766            const VertexDecl& vertexDecl = m_vertexDecls[_clearQuad.m_vb->decl.idx];
1767            const uint32_t stride = vertexDecl.m_stride;
1768            const uint32_t offset = 0;
17291769
17301770            {
17311771               struct Vertex
r31873r31874
17331773                  float m_x;
17341774                  float m_y;
17351775                  float m_z;
1736                  uint32_t m_abgr;
1737               } * vertex = (Vertex*)_clearQuad.m_vb->data;
1776               };
1777               
1778               Vertex* vertex = (Vertex*)_clearQuad.m_vb->data;
17381779               BX_CHECK(stride == sizeof(Vertex), "Stride/Vertex mismatch (stride %d, sizeof(Vertex) %d)", stride, sizeof(Vertex) );
17391780
1740               const uint32_t abgr = bx::endianSwap(_clear.m_rgba);
17411781               const float depth = _clear.m_depth;
17421782
17431783               vertex->m_x = -1.0f;
17441784               vertex->m_y = -1.0f;
17451785               vertex->m_z = depth;
1746               vertex->m_abgr = abgr;
17471786               vertex++;
17481787               vertex->m_x =  1.0f;
17491788               vertex->m_y = -1.0f;
17501789               vertex->m_z = depth;
1751               vertex->m_abgr = abgr;
17521790               vertex++;
1753               vertex->m_x = 1.0f;
1791               vertex->m_x = -1.0f;
17541792               vertex->m_y =  1.0f;
17551793               vertex->m_z = depth;
1756               vertex->m_abgr = abgr;
17571794               vertex++;
1758               vertex->m_x = -1.0f;
1795               vertex->m_x = 1.0f;
17591796               vertex->m_y =  1.0f;
17601797               vertex->m_z = depth;
1761               vertex->m_abgr = abgr;
17621798            }
17631799
17641800            m_vertexBuffers[_clearQuad.m_vb->handle.idx].update(0, 4*_clearQuad.m_decl.m_stride, _clearQuad.m_vb->data);
17651801            deviceCtx->IASetVertexBuffers(0, 1, &vb.m_ptr, &stride, &offset);
17661802            setInputLayout(vertexDecl, program, 0);
17671803
1768            IndexBufferD3D11& ib = m_indexBuffers[_clearQuad.m_ib.idx];
1769            deviceCtx->IASetIndexBuffer(ib.m_ptr, DXGI_FORMAT_R16_UINT, 0);
1770
1771            deviceCtx->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLELIST);
1772            deviceCtx->DrawIndexed(6, 0, 0);
1804            deviceCtx->IASetPrimitiveTopology(D3D11_PRIMITIVE_TOPOLOGY_TRIANGLESTRIP);
1805            deviceCtx->Draw(4, 0);
17731806         }
17741807      }
17751808
r31873r31874
19411974      }
19421975   }
19431976
1944   void VertexBufferD3D11::update(uint32_t _offset, uint32_t _size, void* _data)
1977   void VertexBufferD3D11::update(uint32_t _offset, uint32_t _size, void* _data, bool _discard)
19451978   {
19461979      ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx;
19471980      BX_CHECK(m_dynamic, "Must be dynamic!");
19481981
19491982      D3D11_MAPPED_SUBRESOURCE mapped;
1950      D3D11_MAP type = m_dynamic && 0 == _offset && m_size == _size ? D3D11_MAP_WRITE_DISCARD : D3D11_MAP_WRITE_NO_OVERWRITE;
1983      D3D11_MAP type = m_dynamic && ( (0 == _offset && m_size == _size) || _discard) ? D3D11_MAP_WRITE_DISCARD : D3D11_MAP_WRITE_NO_OVERWRITE;
19511984      DX_CHECK(deviceCtx->Map(m_ptr, 0, type, 0, &mapped) );
19521985      memcpy( (uint8_t*)mapped.pData + _offset, _data, _size);
19531986      deviceCtx->Unmap(m_ptr, 0);
r31873r31874
24592492   {
24602493   }
24612494
2462   void FrameBufferD3D11::clear(const Clear& _clear)
2495   void FrameBufferD3D11::clear(const Clear& _clear, const float _palette[][4])
24632496   {
24642497      ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx;
24652498
24662499      if (BGFX_CLEAR_COLOR_BIT & _clear.m_flags)
24672500      {
2468         uint32_t rgba = _clear.m_rgba;
2469         float frgba[4] = { (rgba>>24)/255.0f, ( (rgba>>16)&0xff)/255.0f, ( (rgba>>8)&0xff)/255.0f, (rgba&0xff)/255.0f };
2470         for (uint32_t ii = 0, num = m_num; ii < num; ++ii)
2501         if (BGFX_CLEAR_COLOR_USE_PALETTE_BIT & _clear.m_flags)
24712502         {
2472            if (NULL != m_rtv[ii])
2503            for (uint32_t ii = 0, num = m_num; ii < num; ++ii)
24732504            {
2474               deviceCtx->ClearRenderTargetView(m_rtv[ii], frgba);
2505               uint8_t index = _clear.m_index[ii];
2506               if (NULL != m_rtv[ii]
2507               &&  UINT8_MAX != index)
2508               {
2509                  deviceCtx->ClearRenderTargetView(m_rtv[ii], _palette[index]);
2510               }
24752511            }
24762512         }
2513         else
2514         {
2515            float frgba[4] =
2516            {
2517               _clear.m_index[0]*1.0f/255.0f,
2518               _clear.m_index[1]*1.0f/255.0f,
2519               _clear.m_index[2]*1.0f/255.0f,
2520               _clear.m_index[3]*1.0f/255.0f,
2521            };
2522            for (uint32_t ii = 0, num = m_num; ii < num; ++ii)
2523            {
2524               if (NULL != m_rtv[ii])
2525               {
2526                  deviceCtx->ClearRenderTargetView(m_rtv[ii], frgba);
2527               }
2528            }
2529         }
24772530      }
24782531
24792532      if (NULL != m_dsv
r31873r31874
25942647
25952648               if (BGFX_CLEAR_NONE != clear.m_flags)
25962649               {
2597                  clearQuad(_clearQuad, rect, clear);
2650                  clearQuad(_clearQuad, rect, clear, _render->m_clearColor);
2651                  prim = s_primInfo[BX_COUNTOF(s_primName)]; // Force primitive type update after clear quad.
25982652               }
25992653            }
26002654
r31873r31874
32123266            char description[BX_COUNTOF(desc.Description)];
32133267            wcstombs(description, desc.Description, BX_COUNTOF(desc.Description) );
32143268            tvm.printf(0, pos++, 0x0f, " Device: %s", description);
3215            tvm.printf(0, pos++, 0x0f, " Memory: %" PRIi64 " (video), %" PRIi64 " (system), %" PRIi64 " (shared)"
3216               , desc.DedicatedVideoMemory
3217               , desc.DedicatedSystemMemory
3218               , desc.SharedSystemMemory
3269
3270            char dedicatedVideo[16];
3271            bx::prettify(dedicatedVideo, BX_COUNTOF(dedicatedVideo), desc.DedicatedVideoMemory);
3272
3273            char dedicatedSystem[16];
3274            bx::prettify(dedicatedSystem, BX_COUNTOF(dedicatedSystem), desc.DedicatedSystemMemory);
3275
3276            char sharedSystem[16];
3277            bx::prettify(sharedSystem, BX_COUNTOF(sharedSystem), desc.SharedSystemMemory);
3278           
3279            tvm.printf(0, pos++, 0x0f, " Memory: %s (video), %s (system), %s (shared)"
3280               , dedicatedVideo
3281               , dedicatedSystem
3282               , sharedSystem
32193283               );
32203284
32213285            pos = 10;
r31873r31874
32383302               , _render->m_num
32393303               , elapsedCpuMs
32403304               );
3241            for (uint32_t ii = 0; ii < BX_COUNTOF(s_primInfo); ++ii)
3305            for (uint32_t ii = 0; ii < BX_COUNTOF(s_primName); ++ii)
32423306            {
32433307               tvm.printf(10, pos++, 0x8e, "    %8s: %7d (#inst: %5d), submitted: %7d"
32443308                  , s_primName[ii]
branches/osd/src/lib/bgfx/common/nanovg/nanovg_bgfx.cpp
r31873r31874
271271         .add(bgfx::Attrib::TexCoord0, 2, bgfx::AttribType::Float)
272272         .end();
273273
274      int align = 1;
274      int align = 16;
275275      gl->fragSize = sizeof(struct GLNVGfragUniforms) + align - sizeof(struct GLNVGfragUniforms) % align;
276276
277277      return 1;
branches/osd/src/lib/bgfx/bgfx_p.h
r31873r31874
8686#define BGFX_CHUNK_MAGIC_TEX BX_MAKEFOURCC('T', 'E', 'X', 0x0)
8787#define BGFX_CHUNK_MAGIC_VSH BX_MAKEFOURCC('V', 'S', 'H', 0x3)
8888
89#define BGFX_CLEAR_COLOR_USE_PALETTE_BIT UINT8_C(0x80)
90
8991#include <list> // mingw wants it to be before tr1/unordered_*...
9092
9193#if BGFX_CONFIG_USE_TINYSTL
r31873r31874
140142#define BGFX_RENDERER_NULL_NAME "NULL"
141143
142144#if BGFX_CONFIG_RENDERER_OPENGL
143#   if BGFX_CONFIG_RENDERER_OPENGL >= 31
144#      define BGFX_RENDERER_OPENGL_NAME "OpenGL 3.1"
145#   if BGFX_CONFIG_RENDERER_OPENGL >= 31 && BGFX_CONFIG_RENDERER_OPENGL <= 33
146#      if BGFX_CONFIG_RENDERER_OPENGL == 31
147#         define BGFX_RENDERER_OPENGL_NAME "OpenGL 3.1"
148#      elif BGFX_CONFIG_RENDERER_OPENGL == 32
149#         define BGFX_RENDERER_OPENGL_NAME "OpenGL 3.2"
150#      else
151#         define BGFX_RENDERER_OPENGL_NAME "OpenGL 3.3"
152#      endif // 31+
153#   elif BGFX_CONFIG_RENDERER_OPENGL >= 40 && BGFX_CONFIG_RENDERER_OPENGL <= 45
154#      if BGFX_CONFIG_RENDERER_OPENGL == 40
155#         define BGFX_RENDERER_OPENGL_NAME "OpenGL 4.0"
156#      elif BGFX_CONFIG_RENDERER_OPENGL == 41
157#         define BGFX_RENDERER_OPENGL_NAME "OpenGL 4.1"
158#      elif BGFX_CONFIG_RENDERER_OPENGL == 42
159#         define BGFX_RENDERER_OPENGL_NAME "OpenGL 4.2"
160#      elif BGFX_CONFIG_RENDERER_OPENGL == 43
161#         define BGFX_RENDERER_OPENGL_NAME "OpenGL 4.3"
162#      elif BGFX_CONFIG_RENDERER_OPENGL == 44
163#         define BGFX_RENDERER_OPENGL_NAME "OpenGL 4.4"
164#      else
165#         define BGFX_RENDERER_OPENGL_NAME "OpenGL 4.5"
166#      endif // 40+
145167#   else
146168#      define BGFX_RENDERER_OPENGL_NAME "OpenGL 2.1"
147169#   endif // BGFX_CONFIG_RENDERER_OPENGL
r31873r31874
171193
172194   struct Clear
173195   {
174      uint32_t m_rgba;
175      float m_depth;
196      uint8_t m_index[8];
197      float   m_depth;
176198      uint8_t m_stencil;
177199      uint8_t m_flags;
178200   };
r31873r31874
463485      void shutdown();
464486
465487      TransientVertexBuffer* m_vb;
466      IndexBufferHandle m_ib;
467488      VertexDecl m_decl;
468489      ProgramHandle m_program[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS];
469490   };
r31873r31874
14151436
14161437      FrameBufferHandle m_fb[BGFX_CONFIG_MAX_VIEWS];
14171438      Clear m_clear[BGFX_CONFIG_MAX_VIEWS];
1439      float m_clearColor[BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE][4];
14181440      Rect m_rect[BGFX_CONFIG_MAX_VIEWS];
14191441      Rect m_scissor[BGFX_CONFIG_MAX_VIEWS];
14201442      Matrix4 m_view[BGFX_CONFIG_MAX_VIEWS];
r31873r31874
17051727         , m_submit(&m_frame[1])
17061728         , m_numFreeDynamicIndexBufferHandles(0)
17071729         , m_numFreeDynamicVertexBufferHandles(0)
1730         , m_clearColorDirty(0)
17081731         , m_instBufferCount(0)
17091732         , m_frames(0)
17101733         , m_debug(BGFX_DEBUG_NONE)
r31873r31874
25672590         cmdbuf.write(_filePath, len);
25682591      }
25692592
2593      BGFX_API_FUNC(void setClearColor(uint8_t _index, const float _rgba[4]) )
2594      {
2595         BX_CHECK(_index < BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE, "Clear color palette index out of bounds %d (max: %d)."
2596            , _index
2597            , BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE
2598            );
2599         memcpy(&m_clearColor[_index][0], _rgba, 16);
2600         m_clearColorDirty = 2;
2601      }
2602
25702603      BGFX_API_FUNC(void setViewName(uint8_t _id, const char* _name) )
25712604      {
25722605         CommandBuffer& cmdbuf = getCommandBuffer(CommandBuffer::UpdateViewName);
r31873r31874
26202653      {
26212654         Clear& clear = m_clear[_id];
26222655         clear.m_flags = _flags;
2623         clear.m_rgba = _rgba;
2624         clear.m_depth = _depth;
2625         clear.m_stencil = _stencil;
2656         clear.m_index[0] = _rgba>>24;
2657         clear.m_index[1] = _rgba>>16;
2658         clear.m_index[2] = _rgba>> 8;
2659         clear.m_index[3] = _rgba>> 0;
2660         clear.m_depth    = _depth;
2661         clear.m_stencil  = _stencil;
26262662      }
26272663
2664      BGFX_API_FUNC(void setViewClear(uint8_t _id, uint8_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7) )
2665      {
2666         Clear& clear = m_clear[_id];
2667         clear.m_flags = (_flags & ~BGFX_CLEAR_COLOR_BIT)
2668            | (0xff != (_0&_1&_2&_3&_4&_5&_6&_7) ? BGFX_CLEAR_COLOR_BIT|BGFX_CLEAR_COLOR_USE_PALETTE_BIT : 0)
2669            ;
2670         clear.m_index[0] = _0;
2671         clear.m_index[1] = _1;
2672         clear.m_index[2] = _2;
2673         clear.m_index[3] = _3;
2674         clear.m_index[4] = _4;
2675         clear.m_index[5] = _5;
2676         clear.m_index[6] = _6;
2677         clear.m_index[7] = _7;
2678         clear.m_depth    = _depth;
2679         clear.m_stencil  = _stencil;
2680      }
2681
26282682      BGFX_API_FUNC(void setViewClearMask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil) )
26292683      {
26302684         for (uint32_t view = 0, viewMask = _viewMask, ntz = bx::uint32_cnttz(_viewMask); 0 != viewMask; viewMask >>= 1, view += 1, ntz = bx::uint32_cnttz(viewMask) )
r31873r31874
29743028
29753029      FrameBufferHandle m_fb[BGFX_CONFIG_MAX_VIEWS];
29763030      Clear m_clear[BGFX_CONFIG_MAX_VIEWS];
3031
3032      float m_clearColor[BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE][4];
29773033      Rect m_rect[BGFX_CONFIG_MAX_VIEWS];
29783034      Rect m_scissor[BGFX_CONFIG_MAX_VIEWS];
29793035      Matrix4 m_view[BGFX_CONFIG_MAX_VIEWS];
r31873r31874
29813037      uint16_t m_seq[BGFX_CONFIG_MAX_VIEWS];
29823038      uint16_t m_seqMask[BGFX_CONFIG_MAX_VIEWS];
29833039
3040      uint8_t m_clearColorDirty;
3041
29843042      Resolution m_resolution;
29853043      int32_t  m_instBufferCount;
29863044      uint32_t m_frames;
branches/osd/src/lib/bgfx/vs_clear.bin.h
r31873r31874
1static const uint8_t vs_clear_glsl[255] =
1static const uint8_t vs_clear_glsl[168] =
22{
3   0x56, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x61, 0x74, // VSH....I......at
3   0x56, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x99, 0x00, 0x00, 0x00, 0x61, 0x74, // VSH...........at
44   0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, // tribute mediump
5   0x76, 0x65, 0x63, 0x34, 0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x61, // vec4 a_color0;.a
6   0x74, 0x74, 0x72, 0x69, 0x62, 0x75, 0x74, 0x65, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, // ttribute mediump
7   0x20, 0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, //  vec3 a_position
8   0x3b, 0x0a, 0x76, 0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, // ;.varying medium
9   0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, // p vec4 v_color0;
5   0x76, 0x65, 0x63, 0x33, 0x20, 0x61, 0x5f, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, // vec3 a_position;
106   0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, // .void main ().{.
117   0x20, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, //   mediump vec4 t
128   0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, // mpvar_1;.  tmpva
r31873r31874
1410   0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x2e, 0x78, 0x79, 0x7a, 0x20, 0x3d, 0x20, 0x61, 0x5f, // mpvar_1.xyz = a_
1511   0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x50, // position;.  gl_P
1612   0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x20, 0x3d, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // osition = tmpvar
17   0x5f, 0x31, 0x3b, 0x0a, 0x20, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x20, 0x3d, // _1;.  v_color0 =
18   0x20, 0x61, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00,       //  a_color0;.}...
13   0x5f, 0x31, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00,                                                 // _1;.}...
1914};
20static const uint8_t vs_clear_dx9[217] =
15static const uint8_t vs_clear_dx9[181] =
2116{
22   0x56, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xcc, 0x00, 0x00, 0x03, 0xfe, 0xff, // VSH....I........
17   0x56, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xa8, 0x00, 0x00, 0x03, 0xfe, 0xff, // VSH.............
2318   0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
2419   0x00, 0x03, 0xfe, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, // ................
2520   0x1c, 0x00, 0x00, 0x00, 0x76, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....vs_3_0.Micro
r31873r31874
2722   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
2823   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x51, 0x00, 0x00, 0x05, // 29.952.3111.Q...
2924   0x00, 0x00, 0x0f, 0xa0, 0x00, 0x00, 0x80, 0x3f, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // .......?........
30   0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // ................
31   0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x01, 0x00, 0x0f, 0x90, 0x1f, 0x00, 0x00, 0x02, // ................
32   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x1f, 0x00, 0x00, 0x02, 0x0a, 0x00, 0x00, 0x80, // ................
33   0x01, 0x00, 0x0f, 0xe0, 0x04, 0x00, 0x00, 0x04, 0x00, 0x00, 0x0f, 0xe0, 0x01, 0x00, 0x24, 0x90, // ..............$.
34   0x00, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x15, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x00, 0x0f, 0xe0, // ..@.............
35   0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00,                                           // .........
25   0x00, 0x00, 0x00, 0x00, 0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, // ................
26   0x1f, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0xe0, 0x04, 0x00, 0x00, 0x04, // ................
27   0x00, 0x00, 0x0f, 0xe0, 0x00, 0x00, 0x24, 0x90, 0x00, 0x00, 0x40, 0xa0, 0x00, 0x00, 0x15, 0xa0, // ......$...@.....
28   0xff, 0xff, 0x00, 0x00, 0x00,                                                                   // .....
3629};
37static const uint8_t vs_clear_dx11[580] =
30static const uint8_t vs_clear_dx11[474] =
3831{
39   0x56, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x30, 0x02, 0x44, 0x58, 0x42, 0x43, // VSH....I..0.DXBC
40   0x04, 0xac, 0x6e, 0xb3, 0xfa, 0xa6, 0xc0, 0x40, 0x10, 0xce, 0x75, 0xe7, 0xa0, 0x24, 0xd6, 0x56, // ..n....@..u..$.V
41   0x01, 0x00, 0x00, 0x00, 0x30, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // ....0.......4...
42   0x8c, 0x00, 0x00, 0x00, 0xdc, 0x00, 0x00, 0x00, 0x30, 0x01, 0x00, 0x00, 0xb4, 0x01, 0x00, 0x00, // ........0.......
32   0x56, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xc8, 0x01, 0x44, 0x58, 0x42, 0x43, // VSH.........DXBC
33   0x57, 0x20, 0x79, 0xb7, 0x44, 0x3d, 0x33, 0xc3, 0xcb, 0xcd, 0xa1, 0xfb, 0x77, 0xc4, 0xdf, 0xf4, // W y.D=3.....w...
34   0x01, 0x00, 0x00, 0x00, 0xc8, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // ............4...
35   0x8c, 0x00, 0x00, 0x00, 0xc0, 0x00, 0x00, 0x00, 0xf4, 0x00, 0x00, 0x00, 0x4c, 0x01, 0x00, 0x00, // ............L...
4336   0x52, 0x44, 0x45, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // RDEFP...........
4437   0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xfe, 0xff, 0x00, 0x91, 0x00, 0x00, // ................
4538   0x1c, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, // ....Microsoft (R
4639   0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, // ) HLSL Shader Co
4740   0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, // mpiler 9.29.952.
48   0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x48, 0x00, 0x00, 0x00, // 3111....ISGNH...
49   0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8.......
50   0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, // ................
51   0x3e, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // >...............
52   0x01, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0x50, 0x4f, // ........COLOR.PO
53   0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0x4f, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // SITION..OSGNL...
54   0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8.......
55   0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................
56   0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // D...............
57   0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT
58   0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, // ION.COLOR...SHDR
59   0x7c, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x1f, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, // |...@......._...
60   0xf2, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, // ........_...r...
61   0x01, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....g.... ......
62   0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....e.... ......
63   0x36, 0x00, 0x00, 0x05, 0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, // 6...r ......F...
64   0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....6.... ......
65   0x01, 0x40, 0x00, 0x00, 0x00, 0x00, 0x80, 0x3f, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // .@.....?6.... ..
66   0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>...
67   0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // STATt...........
68   0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
69   0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
41   0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, // 3111....ISGN,...
42   0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........ .......
43   0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x07, 0x00, 0x00, // ................
44   0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, 0xab, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // POSITION....OSGN
45   0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ...
46   0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
47   0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, 0x4f, 0x4e, 0x00, // ....SV_POSITION.
48   0x53, 0x48, 0x44, 0x52, 0x50, 0x00, 0x00, 0x00, 0x40, 0x00, 0x01, 0x00, 0x14, 0x00, 0x00, 0x00, // SHDRP...@.......
49   0x5f, 0x00, 0x00, 0x03, 0x72, 0x10, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x67, 0x00, 0x00, 0x04, // _...r.......g...
50   0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // . ..........6...
51   0x72, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x12, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // r ......F.......
52   0x36, 0x00, 0x00, 0x05, 0x82, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x40, 0x00, 0x00, // 6.... .......@..
53   0x00, 0x00, 0x80, 0x3f, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, // ...?>...STATt...
54   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................
55   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
7056   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
7157   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
72   0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
58   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................
7359   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
74   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x05, 0x00, // ................
75   0x01, 0x00, 0x00, 0x00,                                                                         // ....
60   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
61   0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x01, 0x00, 0x00, 0x00,                                     // ..........
7662};
branches/osd/src/lib/bgfx/glcontext_wgl.cpp
r31873r31874
192192            int32_t contextAttrs[9] =
193193            {
194194#if BGFX_CONFIG_RENDERER_OPENGL >= 31
195               WGL_CONTEXT_MAJOR_VERSION_ARB, 3,
196               WGL_CONTEXT_MINOR_VERSION_ARB, 1,
195               WGL_CONTEXT_MAJOR_VERSION_ARB, BGFX_CONFIG_RENDERER_OPENGL / 10,
196               WGL_CONTEXT_MINOR_VERSION_ARB, BGFX_CONFIG_RENDERER_OPENGL % 10,
197197               WGL_CONTEXT_FLAGS_ARB, flags,
198198               WGL_CONTEXT_PROFILE_MASK_ARB, WGL_CONTEXT_CORE_PROFILE_BIT_ARB,
199199#else
branches/osd/src/lib/bgfx/vs_clear.sc
r31873r31874
1$input a_position, a_color0
2$output v_color0
1$input a_position
32
43/*
54 * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
r31873r31874
1110void main()
1211{
1312   gl_Position = vec4(a_position, 1.0);
14   v_color0 = a_color0;
1513}
branches/osd/src/lib/bgfx/fs_debugfont.bin.h
r31873r31874
11static const uint8_t fs_debugfont_glsl[359] =
22{
3   0x46, 0x53, 0x48, 0x03, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0a, 0x75, 0x5f, 0x74, 0x65, 0x78, // FSH..."f...u_tex
3   0x46, 0x53, 0x48, 0x03, 0xb8, 0xbe, 0x22, 0x66, 0x01, 0x00, 0x0a, 0x73, 0x5f, 0x74, 0x65, 0x78, // FSH..."f...s_tex
44   0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0x01, 0x00, 0x00, 0x01, 0x00, 0x47, 0x01, 0x00, 0x00, 0x76, // Color......G...v
55   0x61, 0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, // arying mediump v
66   0x65, 0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x61, // ec4 v_color0;.va
r31873r31874
99   0x79, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, 0x63, // ying mediump vec
1010   0x32, 0x20, 0x76, 0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x3b, 0x0a, 0x75, // 2 v_texcoord0;.u
1111   0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x73, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x32, 0x44, // niform sampler2D
12   0x20, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, //  u_texColor;.voi
12   0x20, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x3b, 0x0a, 0x76, 0x6f, 0x69, //  s_texColor;.voi
1313   0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x6c, 0x6f, // d main ().{.  lo
1414   0x77, 0x70, 0x20, 0x76, 0x65, 0x63, 0x34, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, // wp vec4 tmpvar_1
1515   0x3b, 0x0a, 0x20, 0x20, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, 0x5f, 0x31, 0x20, 0x3d, 0x20, 0x6d, // ;.  tmpvar_1 = m
1616   0x69, 0x78, 0x20, 0x28, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x31, 0x2c, 0x20, 0x76, 0x5f, // ix (v_color1, v_
1717   0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x2c, 0x20, 0x74, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x32, // color0, texture2
18   0x44, 0x20, 0x28, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, // D (u_texColor, v
18   0x44, 0x20, 0x28, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x2c, 0x20, 0x76, // D (s_texColor, v
1919   0x5f, 0x74, 0x65, 0x78, 0x63, 0x6f, 0x6f, 0x72, 0x64, 0x30, 0x29, 0x2e, 0x78, 0x78, 0x78, 0x78, // _texcoord0).xxxx
2020   0x29, 0x3b, 0x0a, 0x20, 0x20, 0x69, 0x66, 0x20, 0x28, 0x28, 0x74, 0x6d, 0x70, 0x76, 0x61, 0x72, // );.  if ((tmpvar
2121   0x5f, 0x31, 0x2e, 0x77, 0x20, 0x3c, 0x20, 0x30, 0x2e, 0x30, 0x30, 0x33, 0x39, 0x32, 0x31, 0x35, // _1.w < 0.0039215
r31873r31874
3030   0xfe, 0xff, 0x22, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x53, 0x00, 0x00, 0x00, // ..".CTAB....S...
3131   0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, // ................
3232   0x4c, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x02, 0x00, // L...0...........
33   0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // <.......u_texCol
33   0x3c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, // <.......s_texCol
3434   0x6f, 0x72, 0x00, 0xab, 0x04, 0x00, 0x0c, 0x00, 0x01, 0x00, 0x01, 0x00, 0x01, 0x00, 0x00, 0x00, // or..............
3535   0x00, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
3636   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
r31873r31874
5353static const uint8_t fs_debugfont_dx11[856] =
5454{
5555   0x46, 0x53, 0x48, 0x03, 0xb8, 0xbe, 0x22, 0x66, 0x00, 0x00, 0x48, 0x03, 0x44, 0x58, 0x42, 0x43, // FSH..."f..H.DXBC
56   0xa5, 0x4a, 0xda, 0x47, 0x04, 0x25, 0xa7, 0xd3, 0xbb, 0x09, 0x30, 0x0f, 0x56, 0xae, 0xf7, 0xbe, // .J.G.%....0.V...
56   0x38, 0x48, 0x7e, 0xf5, 0x2d, 0x94, 0x99, 0x42, 0x10, 0xd8, 0xfb, 0x0c, 0xb8, 0x88, 0x50, 0x85, // 8H~.-..B......P.
5757   0x01, 0x00, 0x00, 0x00, 0x48, 0x03, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // ....H.......4...
5858   0x00, 0x01, 0x00, 0x00, 0x8c, 0x01, 0x00, 0x00, 0xc0, 0x01, 0x00, 0x00, 0xcc, 0x02, 0x00, 0x00, // ................
5959   0x52, 0x44, 0x45, 0x46, 0xc4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // RDEF............
r31873r31874
6262   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
6363   0x01, 0x00, 0x00, 0x00, 0x77, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ....w...........
6464   0x04, 0x00, 0x00, 0x00, 0xff, 0xff, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
65   0x0d, 0x00, 0x00, 0x00, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x75, 0x5f, // ....u_texColoru_
66   0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x75, // texColorampler.u
67   0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x75, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // _texColoru_texCo
65   0x0d, 0x00, 0x00, 0x00, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x5f, // ....s_texColors_
66   0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x61, 0x6d, 0x70, 0x6c, 0x65, 0x72, 0x00, 0x73, // texColorampler.s
67   0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x73, 0x5f, 0x74, 0x65, 0x78, 0x43, 0x6f, // _texColors_texCo
6868   0x6c, 0x6f, 0x72, 0x65, 0x78, 0x74, 0x75, 0x72, 0x65, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // lorexture.Micros
6969   0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha
7070   0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2
branches/osd/src/lib/bgfx/fs_clear1.sc
r31873r31874
1$input v_color0
2
31/*
42 * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
53 * License: http://www.opensource.org/licenses/BSD-2-Clause
64 */
75
8#include "bgfx_shader.sh"
6uniform vec4 bgfx_clear_color[8];
97
108void main()
119{
12   gl_FragData[0] = v_color0;
13   gl_FragData[1] = v_color0;
10   gl_FragData[0] = bgfx_clear_color[0];
11   gl_FragData[1] = bgfx_clear_color[1];
1412}
branches/osd/src/lib/bgfx/fs_clear3.sc
r31873r31874
1$input v_color0
2
31/*
42 * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
53 * License: http://www.opensource.org/licenses/BSD-2-Clause
64 */
75
8#include "bgfx_shader.sh"
6uniform vec4 bgfx_clear_color[8];
97
108void main()
119{
12   gl_FragData[0] = v_color0;
13   gl_FragData[1] = v_color0;
14   gl_FragData[2] = v_color0;
15   gl_FragData[3] = v_color0;
10   gl_FragData[0] = bgfx_clear_color[0];
11   gl_FragData[1] = bgfx_clear_color[1];
12   gl_FragData[2] = bgfx_clear_color[2];
13   gl_FragData[3] = bgfx_clear_color[3];
1614}
branches/osd/src/lib/bgfx/fs_clear5.sc
r0r31874
1/*
2 * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
3 * License: http://www.opensource.org/licenses/BSD-2-Clause
4 */
5
6uniform vec4 bgfx_clear_color[8];
7
8void main()
9{
10   gl_FragData[0] = bgfx_clear_color[0];
11   gl_FragData[1] = bgfx_clear_color[1];
12   gl_FragData[2] = bgfx_clear_color[2];
13   gl_FragData[3] = bgfx_clear_color[3];
14   gl_FragData[4] = bgfx_clear_color[4];
15   gl_FragData[5] = bgfx_clear_color[5];
16}
Property changes on: branches/osd/src/lib/bgfx/fs_clear5.sc
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
branches/osd/src/lib/bgfx/fs_clear7.sc
r0r31874
1/*
2 * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
3 * License: http://www.opensource.org/licenses/BSD-2-Clause
4 */
5
6uniform vec4 bgfx_clear_color[8];
7
8void main()
9{
10   gl_FragData[0] = bgfx_clear_color[0];
11   gl_FragData[1] = bgfx_clear_color[1];
12   gl_FragData[2] = bgfx_clear_color[2];
13   gl_FragData[3] = bgfx_clear_color[3];
14   gl_FragData[4] = bgfx_clear_color[4];
15   gl_FragData[5] = bgfx_clear_color[5];
16   gl_FragData[6] = bgfx_clear_color[6];
17   gl_FragData[7] = bgfx_clear_color[7];
18}
Property changes on: branches/osd/src/lib/bgfx/fs_clear7.sc
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
branches/osd/src/lib/bgfx/renderer_gl.h
r31873r31874
191191#   define GL_RGBA16UI 0x8D76
192192#endif // GL_RGBA16UI
193193
194#ifndef GL_R11F_G11F_B10F
195#   define GL_R11F_G11F_B10F 0x8C3A
196#endif // GL_R11F_G11F_B10F
197
198#ifndef GL_UNSIGNED_INT_10F_11F_11F_REV
199#   define GL_UNSIGNED_INT_10F_11F_11F_REV 0x8C3B
200#endif // GL_UNSIGNED_INT_10F_11F_11F_REV
201
194202#ifndef GL_COMPRESSED_RGB_S3TC_DXT1_EXT
195203#   define GL_COMPRESSED_RGB_S3TC_DXT1_EXT 0x83F0
196204#endif // GL_COMPRESSED_RGB_S3TC_DXT1_EXT
branches/osd/src/lib/bgfx/renderer_d3d9.h
r31873r31874
202202      bool m_dynamic;
203203   };
204204
205   struct VertexDeclaration
205   struct VertexDeclD3D9
206206   {
207      VertexDeclaration()
207      VertexDeclD3D9()
208208         : m_ptr(NULL)
209209      {
210210      }
branches/osd/src/lib/bgfx/charset.h
r31873r31874
531531#include "fs_clear1.bin.h"
532532#include "fs_clear2.bin.h"
533533#include "fs_clear3.bin.h"
534#include "fs_clear4.bin.h"
535#include "fs_clear5.bin.h"
536#include "fs_clear6.bin.h"
537#include "fs_clear7.bin.h"
branches/osd/src/lib/bgfx/include/bgfx.h
r31873r31874
144144         RGBA4,
145145         RGB5A1,
146146         RGB10A2,
147         R11G11B10F,
147148
148149         UnknownDepth, // depth formats below
149150
r31873r31874
857858   /// Destroy shader uniform parameter.
858859   void destroyUniform(UniformHandle _handle);
859860
861   /// Set clear color palette value.
862   ///
863   /// @param _index Index into palette.
864   /// @param _rgba Packed 32-bit RGBA value.
865   ///
866   void setClearColor(uint8_t _index, uint32_t _rgba);
867
868   /// Set clear color palette value.
869   ///
870   /// @param _index Index into palette.
871   /// @param _r, _g, _b, _a RGBA floating point values.
872   ///
873   void setClearColor(uint8_t _index, float _r, float _g, float _b, float _a);
874
875   /// Set clear color palette value.
876   ///
877   /// @param _index Index into palette.
878   /// @param _rgba RGBA floating point value.
879   ///
880   void setClearColor(uint8_t _index, const float _rgba[4]);
881
860882   /// Set view name.
861883   ///
862884   /// @param _id View id.
r31873r31874
920942   ///
921943   void setViewClear(uint8_t _id, uint8_t _flags, uint32_t _rgba = 0x000000ff, float _depth = 1.0f, uint8_t _stencil = 0);
922944
945   /// Set view clear flags with different clear color for each
946   /// frame buffer texture. Must use setClearColor to setup clear color
947   /// palette.
948   ///
949   /// @param _id View id.
950   /// @param _flags Clear flags. Use BGFX_CLEAR_NONE to remove any clear
951   ///   operation. See: BGFX_CLEAR_*.
952   /// @param _depth Depth clear value.
953   /// @param _stencil Stencil clear value.
954   ///
955   void setViewClear(uint8_t _id, uint8_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);
956
923957   /// Set view clear flags for multiple views.
924958   void setViewClearMask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba = 0x000000ff, float _depth = 1.0f, uint8_t _stencil = 0);
925959
branches/osd/src/lib/bgfx/include/bgfx.c99.h
r31873r31874
112112    BGFX_TEXTURE_FORMAT_RGBA4,
113113    BGFX_TEXTURE_FORMAT_RGB5A1,
114114    BGFX_TEXTURE_FORMAT_RGB10A2,
115    BGFX_TEXTURE_FORMAT_R11G11B10F,
115116
116117    BGFX_TEXTURE_FORMAT_UNKNOWN_DEPTH,
117118
r31873r31874
10191020BGFX_C_API void bgfx_destroy_uniform(bgfx_uniform_handle_t _handle);
10201021
10211022/**
1023 *  Set clear color palette value.
1024 *
1025 *  @param _index Index into palette.
1026 *  @param _rgba RGBA floating point value.
1027 */
1028BGFX_C_API void bgfx_set_clear_color(uint8_t _index, const float _rgba[4]);
1029
1030/**
10221031 *  Set view name.
10231032 *
10241033 *  @param _id View id.
r31873r31874
10881097BGFX_C_API void bgfx_set_view_clear(uint8_t _id, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil);
10891098
10901099/**
1100 *  Set view clear flags with different clear color for each
1101 *  frame buffer texture. Must use setClearColor to setup clear color
1102 *  palette.
1103
1104 *  @param _id View id.
1105 *  @param _flags Clear flags. Use BGFX_CLEAR_NONE to remove any clear
1106 *  operation. See: BGFX_CLEAR_*.
1107 *  @param _depth Depth clear value.
1108 *  @param _stencil Stencil clear value.
1109 */
1110BGFX_C_API void bgfx_set_view_clear_mrt7(uint8_t _id, uint8_t _flags, float _depth, uint8_t _stencil, uint8_t _0, uint8_t _1, uint8_t _2, uint8_t _3, uint8_t _4, uint8_t _5, uint8_t _6, uint8_t _7);
1111
1112/**
10911113 *  Set view clear flags for multiple views.
10921114 */
10931115BGFX_C_API void bgfx_set_view_clear_mask(uint32_t _viewMask, uint8_t _flags, uint32_t _rgba, float _depth, uint8_t _stencil);
branches/osd/src/lib/bgfx/renderer_d3d11.h
r31873r31874
1414#endif // !USE_D3D11_DYNAMIC_LIB
1515
1616#define D3D11_NO_HELPERS
17#include <d3d11.h>
17#if BX_COMPILER_MSVC
18#   pragma warning(push)
19//  winerror.h and dxgitypes.h both define DXGI_ERRORs.
20#   pragma warning(disable:4005) // warning C4005: '' : macro redefinition
21#   include <d3d11.h>
22#   pragma warning(pop)
23#else
24#   include <d3d11.h>
25#endif // BX_COMPILER_MSVC
1826#include "renderer_d3d.h"
1927
2028#define D3DCOLOR_ARGB(_a, _r, _g, _b) ( (DWORD)( ( ( (_a)&0xff)<<24)|( ( (_r)&0xff)<<16)|( ( (_g)&0xff)<<8)|( (_b)&0xff) ) )
r31873r31874
105113      }
106114
107115      void create(uint32_t _size, void* _data, VertexDeclHandle _declHandle);
108      void update(uint32_t _offset, uint32_t _size, void* _data);
116      void update(uint32_t _offset, uint32_t _size, void* _data, bool _discard = false);
109117
110118      void destroy()
111119      {
r31873r31874
272280      void create(uint8_t _num, const TextureHandle* _handles);
273281      void destroy();
274282      void resolve();
275      void clear(const Clear& _clear);
283      void clear(const Clear& _clear, const float _palette[][4]);
276284
277285      ID3D11RenderTargetView* m_rtv[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS-1];
278286      ID3D11ShaderResourceView* m_srv[BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS-1];
branches/osd/src/lib/bgfx/config.h
r31873r31874
195195#endif // BGFX_CONFIG_MAX_FRAME_BUFFERS
196196
197197#ifndef BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS
198#   define BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS 4
198#   define BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS 8
199199#endif // BGFX_CONFIG_MAX_FRAME_BUFFER_ATTACHMENTS
200200
201201#ifndef BGFX_CONFIG_MAX_UNIFORMS
r31873r31874
226226#   define BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT 5
227227#endif // BGFX_CONFIG_MAX_INSTANCE_DATA_COUNT
228228
229#ifndef BGFX_CONFIG_CLEAR_QUAD
230#   define BGFX_CONFIG_CLEAR_QUAD (BGFX_CONFIG_RENDERER_DIRECT3D11|BGFX_CONFIG_RENDERER_OPENGL)
231#endif // BGFX_CONFIG_CLEAR_QUAD
229#ifndef BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE
230#   define BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE 16
231#endif // BGFX_CONFIG_MAX_CLEAR_COLOR_PALETTE
232232
233233#endif // BGFX_CONFIG_H_HEADER_GUARD
branches/osd/src/lib/bgfx/fs_clear0.bin.h
r31873r31874
1static const uint8_t fs_clear0_glsl[91] =
1static const uint8_t fs_clear0_glsl[130] =
22{
3   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x4c, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I..L...va
4   0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, // rying mediump ve
5   0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, // c4 v_color0;.voi
6   0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, // d main ().{.  gl
7   0x5f, 0x46, 0x72, 0x61, 0x67, 0x43, 0x6f, 0x6c, 0x6f, 0x72, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, // _FragColor = v_c
8   0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00,                               // olor0;.}...
3   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
4   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x07, 0x08, 0x00, 0x00, 0x08, // clear_color.....
5   0x00, 0x5c, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .....uniform vec
6   0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col
7   0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // or[8];.void main
8   0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, //  ().{.  gl_FragD
9   0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[0] = bgfx_cl
10   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, // ear_color[0];.}.
11   0x0a, 0x00,                                                                                     // ..
912};
10static const uint8_t fs_clear0_dx9[137] =
13static const uint8_t fs_clear0_dx9[204] =
1114{
12   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x7c, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I..|.....
13   0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
14   0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, // ................
15   0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
16   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
17   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
18   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, // 29.952.3111.....
19   0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, // ................
20   0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00,                                           // .........
15   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
16   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x01, // clear_color.....
17   0x00, 0xa8, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........$.CTAB.
18   0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............
19   0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0....
20   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b
21   0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color.
22   0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................
23   0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros
24   0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha
25   0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2
26   0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, // 9.952.3111......
27   0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00,                         // ............
2128};
22static const uint8_t fs_clear0_dx11[480] =
29static const uint8_t fs_clear0_dx11[607] =
2330{
24   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xd0, 0x01, 0x44, 0x58, 0x42, 0x43, // FSH....I....DXBC
25   0xa9, 0x98, 0xd1, 0xdb, 0x4a, 0xa2, 0x9c, 0xfe, 0x9c, 0xf1, 0xe4, 0xd0, 0x2c, 0xa5, 0xd6, 0xb6, // ....J.......,...
26   0x01, 0x00, 0x00, 0x00, 0xd0, 0x01, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // ............4...
27   0x8c, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x14, 0x01, 0x00, 0x00, 0x54, 0x01, 0x00, 0x00, // ............T...
28   0x52, 0x44, 0x45, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // RDEFP...........
29   0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, // ................
30   0x1c, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, // ....Microsoft (R
31   0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, // ) HLSL Shader Co
32   0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, // mpiler 9.29.952.
33   0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // 3111....ISGNL...
34   0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8.......
35   0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................
36   0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // D...............
37   0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT
38   0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // ION.COLOR...OSGN
39   0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, // ,........... ...
40   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
41   0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET...
42   0x53, 0x48, 0x44, 0x52, 0x38, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x0e, 0x00, 0x00, 0x00, // SHDR8...@.......
43   0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, // b...........e...
44   0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // . ......6.... ..
45   0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>...
46   0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // STATt...........
47   0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
48   0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
31   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
32   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x08, // clear_color.....
33   0x00, 0x38, 0x02, 0x44, 0x58, 0x42, 0x43, 0x69, 0x80, 0xef, 0x6f, 0xd0, 0x54, 0x8e, 0x60, 0xf8, // .8.DXBCi..o.T.`.
34   0xc6, 0x2b, 0x40, 0xf5, 0xaf, 0xa8, 0x14, 0x01, 0x00, 0x00, 0x00, 0x38, 0x02, 0x00, 0x00, 0x05, // .+@........8....
35   0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x74, // ...4.......@...t
36   0x01, 0x00, 0x00, 0xbc, 0x01, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xd0, 0x00, 0x00, 0x00, 0x01, // .......RDEF.....
37   0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ...H............
38   0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, // ...........<....
4939   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
40   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, // ...........$Glob
41   0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, // als....<.......`
42   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // ...............x
43   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8c, // ................
44   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // .......bgfx_clea
45   0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, // r_color.........
46   0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ...........Micro
47   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
48   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
49   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, // 29.952.3111....I
50   0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
51   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
52   0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
53   0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, // ON.OSGN,........
54   0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ... ............
55   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA
56   0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x40, 0x00, 0x00, 0x00, 0x40, // RGET...SHDR@...@
57   0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // .......Y...F. ..
58   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ...
59   0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
60   0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, // . .........>...S
61   0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // TATt............
62   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
63   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
5064   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
51   0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
5265   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
66   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
5367   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
68   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,       // ...............
5469};
branches/osd/src/lib/bgfx/fs_clear1.bin.h
r31873r31874
1static const uint8_t fs_clear1_glsl[122] =
1static const uint8_t fs_clear1_glsl[170] =
22{
3   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x6b, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I..k...va
4   0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, // rying mediump ve
5   0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, // c4 v_color0;.voi
6   0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, // d main ().{.  gl
7   0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x76, // _FragData[0] = v
8   0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // _color0;.  gl_Fr
9   0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x31, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, // agData[1] = v_co
10   0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00,                                     // lor0;.}...
3   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
4   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x07, 0x08, 0x00, 0x00, 0x08, // clear_color.....
5   0x00, 0x84, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .....uniform vec
6   0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col
7   0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // or[8];.void main
8   0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, //  ().{.  gl_FragD
9   0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[0] = bgfx_cl
10   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[0];. 
11   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x31, 0x5d, 0x20, 0x3d, // gl_FragData[1] =
12   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
13   0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00,                                     // r[1];.}...
1114};
12static const uint8_t fs_clear1_dx9[149] =
15static const uint8_t fs_clear1_dx9[216] =
1316{
14   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x88, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I........
15   0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
16   0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, // ................
17   0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
18   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
19   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
20   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, // 29.952.3111.....
21   0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, // ................
22   0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, // ................
23   0xff, 0xff, 0x00, 0x00, 0x00,                                                                   // .....
17   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
18   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x02, // clear_color.....
19   0x00, 0xb4, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........$.CTAB.
20   0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............
21   0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0....
22   0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b
23   0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color.
24   0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................
25   0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros
26   0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha
27   0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2
28   0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, // 9.952.3111......
29   0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, // ................
30   0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00,                                                 // ........
2431};
25static const uint8_t fs_clear1_dx11[536] =
32static const uint8_t fs_clear1_dx11[667] =
2633{
27   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x08, 0x02, 0x44, 0x58, 0x42, 0x43, // FSH....I....DXBC
28   0x07, 0x29, 0x65, 0xce, 0x1c, 0xcc, 0xcb, 0x0a, 0x31, 0xfd, 0xe4, 0xfc, 0xc8, 0x95, 0x4a, 0x88, // .)e.....1.....J.
29   0x01, 0x00, 0x00, 0x00, 0x08, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // ............4...
30   0x8c, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x2c, 0x01, 0x00, 0x00, 0x8c, 0x01, 0x00, 0x00, // ........,.......
31   0x52, 0x44, 0x45, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // RDEFP...........
32   0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, // ................
33   0x1c, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, // ....Microsoft (R
34   0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, // ) HLSL Shader Co
35   0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, // mpiler 9.29.952.
36   0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // 3111....ISGNL...
37   0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8.......
38   0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................
39   0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // D...............
40   0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT
41   0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // ION.COLOR...OSGN
42   0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, // D...........8...
43   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
44   0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....8...........
45   0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, // ............SV_T
46   0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x58, 0x00, 0x00, 0x00, // ARGET...SHDRX...
47   0x40, 0x00, 0x00, 0x00, 0x16, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, // @.......b.......
48   0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....e.... ......
49   0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // e.... ......6...
50   0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // . ......F.......
51   0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F...
52   0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, // ....>...STATt...
53   0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // ................
54   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
34   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
35   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x08, // clear_color.....
36   0x00, 0x74, 0x02, 0x44, 0x58, 0x42, 0x43, 0x5e, 0x43, 0xcd, 0xdc, 0x9e, 0x83, 0xb7, 0x99, 0x9b, // .t.DXBC^C.......
37   0x10, 0x35, 0x0e, 0xb5, 0x20, 0x97, 0xd2, 0x01, 0x00, 0x00, 0x00, 0x74, 0x02, 0x00, 0x00, 0x05, // .5.. ......t....
38   0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x8c, // ...4.......@....
39   0x01, 0x00, 0x00, 0xf8, 0x01, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xd0, 0x00, 0x00, 0x00, 0x01, // .......RDEF.....
40   0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ...H............
41   0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, // ...........<....
5542   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
43   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, // ...........$Glob
44   0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, // als....<.......`
45   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // ...............x
46   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8c, // ................
47   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // .......bgfx_clea
48   0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, // r_color.........
49   0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ...........Micro
50   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
51   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
52   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, // 29.952.3111....I
53   0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
54   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
55   0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
56   0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x44, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x08, // ON.OSGND........
57   0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...8............
58   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x01, // ...........8....
59   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
60   0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S
61   0x48, 0x44, 0x52, 0x64, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x19, 0x00, 0x00, 0x00, 0x59, // HDRd...@.......Y
62   0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, // ...F. .........e
63   0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
64   0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, //  ......6.... ...
65   0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
66   0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
67   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, // .......>...STATt
68   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // ................
69   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ................
5670   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
57   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................
5871   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
72   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, // ................
5973   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
60   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                 // ........
74   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
75   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,                               // ...........
6176};
branches/osd/src/lib/bgfx/fs_clear2.bin.h
r31873r31874
1static const uint8_t fs_clear2_glsl[151] =
1static const uint8_t fs_clear2_glsl[210] =
22{
3   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x88, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I......va
4   0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, // rying mediump ve
5   0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, // c4 v_color0;.voi
6   0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, // d main ().{.  gl
7   0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x76, // _FragData[0] = v
8   0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // _color0;.  gl_Fr
9   0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x31, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, // agData[1] = v_co
10   0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // lor0;.  gl_FragD
11   0x61, 0x74, 0x61, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ata[2] = v_color
12   0x30, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00,                                                       // 0;.}...
3   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
4   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x07, 0x08, 0x00, 0x00, 0x08, // clear_color.....
5   0x00, 0xac, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .....uniform vec
6   0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col
7   0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // or[8];.void main
8   0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, //  ().{.  gl_FragD
9   0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[0] = bgfx_cl
10   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[0];. 
11   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x31, 0x5d, 0x20, 0x3d, // gl_FragData[1] =
12   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
13   0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[1];.  gl_FragD
14   0x61, 0x74, 0x61, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[2] = bgfx_cl
15   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, // ear_color[2];.}.
16   0x0a, 0x00,                                                                                     // ..
1317};
14static const uint8_t fs_clear2_dx9[161] =
18static const uint8_t fs_clear2_dx9[228] =
1519{
16   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x94, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I........
17   0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
18   0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, // ................
19   0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
20   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
21   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
22   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, // 29.952.3111.....
23   0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, // ................
24   0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, // ................
25   0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, // ................
26   0x00,                                                                                           // .
20   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
21   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x03, // clear_color.....
22   0x00, 0xc0, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........$.CTAB.
23   0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............
24   0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0....
25   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b
26   0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color.
27   0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................
28   0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros
29   0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha
30   0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2
31   0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, // 9.952.3111......
32   0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, // ................
33   0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0xff, // ................
34   0xff, 0x00, 0x00, 0x00,                                                                         // ....
2735};
28static const uint8_t fs_clear2_dx11[592] =
36static const uint8_t fs_clear2_dx11[727] =
2937{
30   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x40, 0x02, 0x44, 0x58, 0x42, 0x43, // FSH....I..@.DXBC
31   0xdf, 0xef, 0x73, 0x33, 0x5f, 0x1a, 0xe9, 0x7a, 0xc5, 0xf8, 0x6b, 0x15, 0x61, 0x87, 0xb5, 0x29, // ..s3_..z..k.a..)
32   0x01, 0x00, 0x00, 0x00, 0x40, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // ....@.......4...
33   0x8c, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x44, 0x01, 0x00, 0x00, 0xc4, 0x01, 0x00, 0x00, // ........D.......
34   0x52, 0x44, 0x45, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // RDEFP...........
35   0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, // ................
36   0x1c, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, // ....Microsoft (R
37   0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, // ) HLSL Shader Co
38   0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, // mpiler 9.29.952.
39   0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // 3111....ISGNL...
40   0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8.......
41   0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................
42   0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // D...............
43   0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT
44   0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // ION.COLOR...OSGN
45   0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, // ............P...
46   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
47   0x0f, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....P...........
48   0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, // ............P...
49   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................
50   0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, // ....SV_TARGET...
51   0x53, 0x48, 0x44, 0x52, 0x78, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x1e, 0x00, 0x00, 0x00, // SHDRx...@.......
52   0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, // b...........e...
53   0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // . ......e.... ..
54   0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, // ....e.... ......
55   0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F...
56   0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // ....6.... ......
57   0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // F.......6.... ..
58   0x02, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, // ....F.......>...
59   0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // STATt...........
60   0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
61   0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
38   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
39   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x08, // clear_color.....
40   0x00, 0xb0, 0x02, 0x44, 0x58, 0x42, 0x43, 0xa5, 0x0c, 0xb3, 0x39, 0xa8, 0x21, 0xc4, 0x89, 0xbd, // ...DXBC...9.!...
41   0xea, 0xb5, 0x9a, 0x23, 0xdf, 0xf9, 0x7c, 0x01, 0x00, 0x00, 0x00, 0xb0, 0x02, 0x00, 0x00, 0x05, // ...#..|.........
42   0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xa4, // ...4.......@....
43   0x01, 0x00, 0x00, 0x34, 0x02, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xd0, 0x00, 0x00, 0x00, 0x01, // ...4...RDEF.....
44   0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ...H............
45   0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, // ...........<....
6246   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
47   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, // ...........$Glob
48   0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, // als....<.......`
49   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // ...............x
50   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8c, // ................
51   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // .......bgfx_clea
52   0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, // r_color.........
53   0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ...........Micro
54   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
55   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
56   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, // 29.952.3111....I
57   0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
58   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
59   0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
60   0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x5c, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x08, // ON.OSGN.........
61   0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...P............
62   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x01, // ...........P....
63   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
64   0x00, 0x00, 0x00, 0x50, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...P............
65   0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA
66   0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x88, 0x00, 0x00, 0x00, 0x40, // RGET...SHDR....@
67   0x00, 0x00, 0x00, 0x22, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // ..."...Y...F. ..
68   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ...
69   0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e
70   0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // .... ......6....
71   0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //  ......F. ......
72   0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
73   0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6....
74   0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, //  ......F. ......
75   0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x04, // ...>...STATt....
76   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
77   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ................
6378   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
64   0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
6579   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
80   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
6681   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
82   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
83   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,                                                       // .......
6784};
branches/osd/src/lib/bgfx/fs_clear3.bin.h
r31873r31874
1static const uint8_t fs_clear3_glsl[180] =
1static const uint8_t fs_clear3_glsl[250] =
22{
3   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xa5, 0x00, 0x00, 0x00, 0x76, 0x61, // FSH....I......va
4   0x72, 0x79, 0x69, 0x6e, 0x67, 0x20, 0x6d, 0x65, 0x64, 0x69, 0x75, 0x6d, 0x70, 0x20, 0x76, 0x65, // rying mediump ve
5   0x63, 0x34, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x76, 0x6f, 0x69, // c4 v_color0;.voi
6   0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, 0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, // d main ().{.  gl
7   0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x76, // _FragData[0] = v
8   0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, // _color0;.  gl_Fr
9   0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x31, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, // agData[1] = v_co
10   0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // lor0;.  gl_FragD
11   0x61, 0x74, 0x61, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, // ata[2] = v_color
12   0x30, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, // 0;.  gl_FragData
13   0x5b, 0x33, 0x5d, 0x20, 0x3d, 0x20, 0x76, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x30, 0x3b, 0x0a, // [3] = v_color0;.
14   0x7d, 0x0a, 0x0a, 0x00,                                                                         // }...
3   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
4   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x07, 0x08, 0x00, 0x00, 0x08, // clear_color.....
5   0x00, 0xd4, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .....uniform vec
6   0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col
7   0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // or[8];.void main
8   0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, //  ().{.  gl_FragD
9   0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[0] = bgfx_cl
10   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[0];. 
11   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x31, 0x5d, 0x20, 0x3d, // gl_FragData[1] =
12   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
13   0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[1];.  gl_FragD
14   0x61, 0x74, 0x61, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[2] = bgfx_cl
15   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[2];. 
16   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x33, 0x5d, 0x20, 0x3d, // gl_FragData[3] =
17   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
18   0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00,                                     // r[3];.}...
1519};
16static const uint8_t fs_clear3_dx9[173] =
20static const uint8_t fs_clear3_dx9[240] =
1721{
18   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0xa0, 0x00, 0x00, 0x03, 0xff, 0xff, // FSH....I........
19   0xfe, 0xff, 0x16, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, 0x00, 0x00, 0x00, 0x23, 0x00, 0x00, 0x00, // ....CTAB....#...
20   0x00, 0x03, 0xff, 0xff, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, // ................
21   0x1c, 0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ....ps_3_0.Micro
22   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
23   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
24   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x1f, 0x00, 0x00, 0x02, // 29.952.3111.....
25   0x0a, 0x00, 0x00, 0x80, 0x00, 0x00, 0x0f, 0x90, 0x01, 0x00, 0x00, 0x02, 0x00, 0x08, 0x0f, 0x80, // ................
26   0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, // ................
27   0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0x01, 0x00, 0x00, 0x02, // ................
28   0x03, 0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0x90, 0xff, 0xff, 0x00, 0x00, 0x00,                   // .............
22   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
23   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x04, // clear_color.....
24   0x00, 0xcc, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........$.CTAB.
25   0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............
26   0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0....
27   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b
28   0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color.
29   0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................
30   0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros
31   0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha
32   0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2
33   0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, // 9.952.3111......
34   0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, // ................
35   0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, // ................
36   0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ................
2937};
30static const uint8_t fs_clear3_dx11[648] =
38static const uint8_t fs_clear3_dx11[787] =
3139{
32   0x46, 0x53, 0x48, 0x03, 0xa4, 0x8b, 0xef, 0x49, 0x00, 0x00, 0x78, 0x02, 0x44, 0x58, 0x42, 0x43, // FSH....I..x.DXBC
33   0xec, 0x65, 0x4d, 0xe1, 0x28, 0x13, 0xaf, 0x45, 0xea, 0x5d, 0x5d, 0xcc, 0x29, 0xb7, 0xa4, 0x45, // .eM.(..E.]].)..E
34   0x01, 0x00, 0x00, 0x00, 0x78, 0x02, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, // ....x.......4...
35   0x8c, 0x00, 0x00, 0x00, 0xe0, 0x00, 0x00, 0x00, 0x5c, 0x01, 0x00, 0x00, 0xfc, 0x01, 0x00, 0x00, // ................
36   0x52, 0x44, 0x45, 0x46, 0x50, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // RDEFP...........
37   0x00, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, 0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, // ................
38   0x1c, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, // ....Microsoft (R
39   0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, // ) HLSL Shader Co
40   0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, // mpiler 9.29.952.
41   0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, 0x53, 0x47, 0x4e, 0x4c, 0x00, 0x00, 0x00, // 3111....ISGNL...
42   0x02, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x38, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ........8.......
43   0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, // ................
44   0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, // D...............
45   0x01, 0x00, 0x00, 0x00, 0x0f, 0x0f, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, // ........SV_POSIT
46   0x49, 0x4f, 0x4e, 0x00, 0x43, 0x4f, 0x4c, 0x4f, 0x52, 0x00, 0xab, 0xab, 0x4f, 0x53, 0x47, 0x4e, // ION.COLOR...OSGN
47   0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, // t...........h...
48   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
49   0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....h...........
50   0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, // ............h...
51   0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, // ................
52   0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ....h...........
53   0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, // ............SV_T
54   0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x98, 0x00, 0x00, 0x00, // ARGET...SHDR....
55   0x40, 0x00, 0x00, 0x00, 0x26, 0x00, 0x00, 0x00, 0x62, 0x10, 0x00, 0x03, 0xf2, 0x10, 0x10, 0x00, // @...&...b.......
56   0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....e.... ......
57   0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, // e.... ......e...
58   0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, // . ......e.... ..
59   0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, // ....6.... ......
60   0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, // F.......6.... ..
61   0x01, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x05, // ....F.......6...
62   0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, // . ......F.......
63   0x36, 0x00, 0x00, 0x05, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x1e, 0x10, 0x00, // 6.... ......F...
64   0x01, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, // ....>...STATt...
65   0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, // ................
66   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, // ................
40   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
41   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x08, // clear_color.....
42   0x00, 0xec, 0x02, 0x44, 0x58, 0x42, 0x43, 0xf7, 0xac, 0x69, 0x7e, 0xb5, 0x9d, 0x1e, 0x99, 0x16, // ...DXBC..i~.....
43   0xb5, 0x9d, 0xdf, 0xcb, 0x2f, 0xba, 0xe0, 0x01, 0x00, 0x00, 0x00, 0xec, 0x02, 0x00, 0x00, 0x05, // ..../...........
44   0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xbc, // ...4.......@....
45   0x01, 0x00, 0x00, 0x70, 0x02, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xd0, 0x00, 0x00, 0x00, 0x01, // ...p...RDEF.....
46   0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ...H............
47   0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, // ...........<....
6748   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
49   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, // ...........$Glob
50   0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, // als....<.......`
51   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // ...............x
52   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8c, // ................
53   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // .......bgfx_clea
54   0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, // r_color.........
55   0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ...........Micro
56   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
57   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
58   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, // 29.952.3111....I
59   0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
60   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
61   0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
62   0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x74, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x08, // ON.OSGNt........
63   0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...h............
64   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x01, // ...........h....
65   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
66   0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ...h............
67   0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x68, 0x00, 0x00, 0x00, 0x03, // ...........h....
68   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, // ................
69   0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S
70   0x48, 0x44, 0x52, 0xac, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x2b, 0x00, 0x00, 0x00, 0x59, // HDR....@...+...Y
71   0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, // ...F. .........e
72   0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
73   0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, //  ......e.... ...
74   0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, // ...e.... ......6
75   0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
76   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, // .......6.... ...
77   0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
78   0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
79   0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, // .......6.... ...
80   0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x3e, // ...F. .........>
81   0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, // ...STATt........
82   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
83   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
6884   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
69   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, // ................
7085   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
86   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
7187   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
72   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,                                                 // ........
88   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
89   0x00, 0x80, 0x00,                                                                               // ...
7390};
branches/osd/src/lib/bgfx/fs_clear4.bin.h
r0r31874
1static const uint8_t fs_clear4_glsl[290] =
2{
3   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
4   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x07, 0x08, 0x00, 0x00, 0x08, // clear_color.....
5   0x00, 0xfc, 0x00, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .....uniform vec
6   0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col
7   0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // or[8];.void main
8   0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, //  ().{.  gl_FragD
9   0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[0] = bgfx_cl
10   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[0];. 
11   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x31, 0x5d, 0x20, 0x3d, // gl_FragData[1] =
12   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
13   0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[1];.  gl_FragD
14   0x61, 0x74, 0x61, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[2] = bgfx_cl
15   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[2];. 
16   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x33, 0x5d, 0x20, 0x3d, // gl_FragData[3] =
17   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
18   0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[3];.  gl_FragD
19   0x61, 0x74, 0x61, 0x5b, 0x34, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[4] = bgfx_cl
20   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, // ear_color[4];.}.
21   0x0a, 0x00,                                                                                     // ..
22};
23static const uint8_t fs_clear4_dx9[240] =
24{
25   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
26   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x04, // clear_color.....
27   0x00, 0xcc, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........$.CTAB.
28   0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............
29   0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0....
30   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b
31   0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color.
32   0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................
33   0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros
34   0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha
35   0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2
36   0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, // 9.952.3111......
37   0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, // ................
38   0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, // ................
39   0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ................
40};
41static const uint8_t fs_clear4_dx11[847] =
42{
43   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
44   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x08, // clear_color.....
45   0x00, 0x28, 0x03, 0x44, 0x58, 0x42, 0x43, 0x47, 0xd8, 0xca, 0x4e, 0x36, 0x2e, 0xbe, 0x94, 0x9f, // .(.DXBCG..N6....
46   0x4f, 0x06, 0xa2, 0x85, 0xb9, 0xc5, 0xfc, 0x01, 0x00, 0x00, 0x00, 0x28, 0x03, 0x00, 0x00, 0x05, // O..........(....
47   0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xd4, // ...4.......@....
48   0x01, 0x00, 0x00, 0xac, 0x02, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xd0, 0x00, 0x00, 0x00, 0x01, // .......RDEF.....
49   0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ...H............
50   0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, // ...........<....
51   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
52   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, // ...........$Glob
53   0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, // als....<.......`
54   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // ...............x
55   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8c, // ................
56   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // .......bgfx_clea
57   0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, // r_color.........
58   0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ...........Micro
59   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
60   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
61   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, // 29.952.3111....I
62   0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
63   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
64   0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
65   0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0x8c, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x08, // ON.OSGN.........
66   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
67   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x01, // ................
68   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
69   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
70   0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x03, // ................
71   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, // ................
72   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
73   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA
74   0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0xd0, 0x00, 0x00, 0x00, 0x40, // RGET...SHDR....@
75   0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...4...Y...F. ..
76   0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ...
77   0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e
78   0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
79   0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x04, //  ......e.... ...
80   0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
81   0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6....
82   0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, //  ......F. ......
83   0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
84   0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6....
85   0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, //  ......F. ......
86   0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
87   0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, // . .........>...S
88   0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // TATt............
89   0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
90   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
91   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
92   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
93   0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
94   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
95   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,       // ...............
96};
Property changes on: branches/osd/src/lib/bgfx/fs_clear4.bin.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
branches/osd/src/lib/bgfx/fs_clear5.bin.h
r0r31874
1static const uint8_t fs_clear5_glsl[330] =
2{
3   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
4   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x07, 0x08, 0x00, 0x00, 0x08, // clear_color.....
5   0x00, 0x24, 0x01, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .$...uniform vec
6   0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col
7   0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // or[8];.void main
8   0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, //  ().{.  gl_FragD
9   0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[0] = bgfx_cl
10   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[0];. 
11   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x31, 0x5d, 0x20, 0x3d, // gl_FragData[1] =
12   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
13   0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[1];.  gl_FragD
14   0x61, 0x74, 0x61, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[2] = bgfx_cl
15   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[2];. 
16   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x33, 0x5d, 0x20, 0x3d, // gl_FragData[3] =
17   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
18   0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[3];.  gl_FragD
19   0x61, 0x74, 0x61, 0x5b, 0x34, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[4] = bgfx_cl
20   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[4];. 
21   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x35, 0x5d, 0x20, 0x3d, // gl_FragData[5] =
22   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
23   0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00,                                     // r[5];.}...
24};
25static const uint8_t fs_clear5_dx9[240] =
26{
27   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
28   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x04, // clear_color.....
29   0x00, 0xcc, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........$.CTAB.
30   0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............
31   0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0....
32   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b
33   0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color.
34   0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................
35   0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros
36   0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha
37   0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2
38   0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, // 9.952.3111......
39   0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, // ................
40   0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, // ................
41   0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ................
42};
43static const uint8_t fs_clear5_dx11[907] =
44{
45   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
46   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x08, // clear_color.....
47   0x00, 0x64, 0x03, 0x44, 0x58, 0x42, 0x43, 0x9a, 0xcb, 0x63, 0x53, 0x10, 0x0d, 0xd9, 0x68, 0xeb, // .d.DXBC..cS...h.
48   0xfd, 0x18, 0x1e, 0xb7, 0xf0, 0xd5, 0x2b, 0x01, 0x00, 0x00, 0x00, 0x64, 0x03, 0x00, 0x00, 0x05, // ......+....d....
49   0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0xec, // ...4.......@....
50   0x01, 0x00, 0x00, 0xe8, 0x02, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xd0, 0x00, 0x00, 0x00, 0x01, // .......RDEF.....
51   0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ...H............
52   0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, // ...........<....
53   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
54   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, // ...........$Glob
55   0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, // als....<.......`
56   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // ...............x
57   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8c, // ................
58   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // .......bgfx_clea
59   0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, // r_color.........
60   0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ...........Micro
61   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
62   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
63   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, // 29.952.3111....I
64   0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
65   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
66   0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
67   0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0xa4, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x08, // ON.OSGN.........
68   0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
69   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x01, // ................
70   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
71   0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
72   0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x03, // ................
73   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, // ................
74   0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
75   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x98, 0x00, 0x00, 0x00, 0x05, // ................
76   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0f, // ................
77   0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S
78   0x48, 0x44, 0x52, 0xf4, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x3d, 0x00, 0x00, 0x00, 0x59, // HDR....@...=...Y
79   0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x65, // ...F. .........e
80   0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
81   0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, //  ......e.... ...
82   0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e
83   0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
84   0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, //  ......6.... ...
85   0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
86   0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
87   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, // .......6.... ...
88   0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
89   0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
90   0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x04, // .......6.... ...
91   0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
92   0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
93   0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, // .......>...STATt
94   0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, // ................
95   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, // ................
96   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
97   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
98   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, // ................
99   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
100   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
101   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,                               // ...........
102};
Property changes on: branches/osd/src/lib/bgfx/fs_clear5.bin.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
branches/osd/src/lib/bgfx/fs_clear6.bin.h
r0r31874
1static const uint8_t fs_clear6_glsl[370] =
2{
3   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
4   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x07, 0x08, 0x00, 0x00, 0x08, // clear_color.....
5   0x00, 0x4c, 0x01, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .L...uniform vec
6   0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col
7   0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // or[8];.void main
8   0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, //  ().{.  gl_FragD
9   0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[0] = bgfx_cl
10   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[0];. 
11   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x31, 0x5d, 0x20, 0x3d, // gl_FragData[1] =
12   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
13   0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[1];.  gl_FragD
14   0x61, 0x74, 0x61, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[2] = bgfx_cl
15   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[2];. 
16   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x33, 0x5d, 0x20, 0x3d, // gl_FragData[3] =
17   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
18   0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[3];.  gl_FragD
19   0x61, 0x74, 0x61, 0x5b, 0x34, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[4] = bgfx_cl
20   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[4];. 
21   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x35, 0x5d, 0x20, 0x3d, // gl_FragData[5] =
22   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
23   0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[5];.  gl_FragD
24   0x61, 0x74, 0x61, 0x5b, 0x36, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[6] = bgfx_cl
25   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x36, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, // ear_color[6];.}.
26   0x0a, 0x00,                                                                                     // ..
27};
28static const uint8_t fs_clear6_dx9[240] =
29{
30   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
31   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x04, // clear_color.....
32   0x00, 0xcc, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........$.CTAB.
33   0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............
34   0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0....
35   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b
36   0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color.
37   0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................
38   0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros
39   0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha
40   0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2
41   0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, // 9.952.3111......
42   0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, // ................
43   0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, // ................
44   0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ................
45};
46static const uint8_t fs_clear6_dx11[967] =
47{
48   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
49   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x08, // clear_color.....
50   0x00, 0xa0, 0x03, 0x44, 0x58, 0x42, 0x43, 0xff, 0xf5, 0x10, 0x9a, 0x40, 0xad, 0x68, 0x1d, 0x9d, // ...DXBC....@.h..
51   0xf8, 0x25, 0x1d, 0x09, 0x74, 0x78, 0x23, 0x01, 0x00, 0x00, 0x00, 0xa0, 0x03, 0x00, 0x00, 0x05, // .%..tx#.........
52   0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x04, // ...4.......@....
53   0x02, 0x00, 0x00, 0x24, 0x03, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xd0, 0x00, 0x00, 0x00, 0x01, // ...$...RDEF.....
54   0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ...H............
55   0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, // ...........<....
56   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
57   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, // ...........$Glob
58   0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, // als....<.......`
59   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // ...............x
60   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8c, // ................
61   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // .......bgfx_clea
62   0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, // r_color.........
63   0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ...........Micro
64   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
65   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
66   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, // 29.952.3111....I
67   0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
68   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
69   0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
70   0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0xbc, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x08, // ON.OSGN.........
71   0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
72   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x01, // ................
73   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
74   0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
75   0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x03, // ................
76   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, // ................
77   0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
78   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x05, // ................
79   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0f, // ................
80   0x00, 0x00, 0x00, 0xb0, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
81   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, // ...........SV_TA
82   0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, 0x48, 0x44, 0x52, 0x18, 0x01, 0x00, 0x00, 0x40, // RGET...SHDR....@
83   0x00, 0x00, 0x00, 0x46, 0x00, 0x00, 0x00, 0x59, 0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, // ...F...Y...F. ..
84   0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, // .......e.... ...
85   0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e
86   0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
87   0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x04, //  ......e.... ...
88   0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e
89   0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // .... ......6....
90   0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, //  ......F. ......
91   0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
92   0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6....
93   0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, //  ......F. ......
94   0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
95   0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6....
96   0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, //  ......F. ......
97   0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x46, // ...6.... ......F
98   0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, // . .........6....
99   0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x06, //  ......F. ......
100   0x00, 0x00, 0x00, 0x3e, 0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x08, // ...>...STATt....
101   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, // ................
102   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, // ................
103   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
104   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
105   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x00, // ................
106   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
107   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
108   0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00,                                                       // .......
109};
Property changes on: branches/osd/src/lib/bgfx/fs_clear6.bin.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
branches/osd/src/lib/bgfx/fs_clear0.sc
r31873r31874
1$input v_color0
2
31/*
42 * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
53 * License: http://www.opensource.org/licenses/BSD-2-Clause
64 */
75
8#include "bgfx_shader.sh"
6uniform vec4 bgfx_clear_color[8];
97
108void main()
119{
12   gl_FragColor = v_color0;
10   gl_FragData[0] = bgfx_clear_color[0];
1311}
branches/osd/src/lib/bgfx/fs_clear7.bin.h
r0r31874
1static const uint8_t fs_clear7_glsl[410] =
2{
3   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
4   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x07, 0x08, 0x00, 0x00, 0x08, // clear_color.....
5   0x00, 0x74, 0x01, 0x00, 0x00, 0x75, 0x6e, 0x69, 0x66, 0x6f, 0x72, 0x6d, 0x20, 0x76, 0x65, 0x63, // .t...uniform vec
6   0x34, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, // 4 bgfx_clear_col
7   0x6f, 0x72, 0x5b, 0x38, 0x5d, 0x3b, 0x0a, 0x76, 0x6f, 0x69, 0x64, 0x20, 0x6d, 0x61, 0x69, 0x6e, // or[8];.void main
8   0x20, 0x28, 0x29, 0x0a, 0x7b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, //  ().{.  gl_FragD
9   0x61, 0x74, 0x61, 0x5b, 0x30, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[0] = bgfx_cl
10   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x30, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[0];. 
11   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x31, 0x5d, 0x20, 0x3d, // gl_FragData[1] =
12   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
13   0x72, 0x5b, 0x31, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[1];.  gl_FragD
14   0x61, 0x74, 0x61, 0x5b, 0x32, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[2] = bgfx_cl
15   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x32, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[2];. 
16   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x33, 0x5d, 0x20, 0x3d, // gl_FragData[3] =
17   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
18   0x72, 0x5b, 0x33, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[3];.  gl_FragD
19   0x61, 0x74, 0x61, 0x5b, 0x34, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[4] = bgfx_cl
20   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x34, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[4];. 
21   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x35, 0x5d, 0x20, 0x3d, // gl_FragData[5] =
22   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
23   0x72, 0x5b, 0x35, 0x5d, 0x3b, 0x0a, 0x20, 0x20, 0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, // r[5];.  gl_FragD
24   0x61, 0x74, 0x61, 0x5b, 0x36, 0x5d, 0x20, 0x3d, 0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, // ata[6] = bgfx_cl
25   0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x5b, 0x36, 0x5d, 0x3b, 0x0a, 0x20, 0x20, // ear_color[6];. 
26   0x67, 0x6c, 0x5f, 0x46, 0x72, 0x61, 0x67, 0x44, 0x61, 0x74, 0x61, 0x5b, 0x37, 0x5d, 0x20, 0x3d, // gl_FragData[7] =
27   0x20, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, //  bgfx_clear_colo
28   0x72, 0x5b, 0x37, 0x5d, 0x3b, 0x0a, 0x7d, 0x0a, 0x0a, 0x00,                                     // r[7];.}...
29};
30static const uint8_t fs_clear7_dx9[240] =
31{
32   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
33   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x04, // clear_color.....
34   0x00, 0xcc, 0x00, 0x00, 0x03, 0xff, 0xff, 0xfe, 0xff, 0x24, 0x00, 0x43, 0x54, 0x41, 0x42, 0x1c, // .........$.CTAB.
35   0x00, 0x00, 0x00, 0x5b, 0x00, 0x00, 0x00, 0x00, 0x03, 0xff, 0xff, 0x01, 0x00, 0x00, 0x00, 0x1c, // ...[............
36   0x00, 0x00, 0x00, 0x00, 0x81, 0x00, 0x00, 0x54, 0x00, 0x00, 0x00, 0x30, 0x00, 0x00, 0x00, 0x02, // .......T...0....
37   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x44, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, // .......D.......b
38   0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, // gfx_clear_color.
39   0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, // ................
40   0x00, 0x00, 0x00, 0x70, 0x73, 0x5f, 0x33, 0x5f, 0x30, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, 0x73, // ...ps_3_0.Micros
41   0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, 0x61, // oft (R) HLSL Sha
42   0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, 0x32, // der Compiler 9.2
43   0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0x01, 0x00, 0x00, 0x02, 0x00, // 9.952.3111......
44   0x08, 0x0f, 0x80, 0x00, 0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x01, 0x08, 0x0f, 0x80, 0x01, // ................
45   0x00, 0xe4, 0xa0, 0x01, 0x00, 0x00, 0x02, 0x02, 0x08, 0x0f, 0x80, 0x02, 0x00, 0xe4, 0xa0, 0x01, // ................
46   0x00, 0x00, 0x02, 0x03, 0x08, 0x0f, 0x80, 0x03, 0x00, 0xe4, 0xa0, 0xff, 0xff, 0x00, 0x00, 0x00, // ................
47};
48static const uint8_t fs_clear7_dx11[1027] =
49{
50   0x46, 0x53, 0x48, 0x03, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x10, 0x62, 0x67, 0x66, 0x78, 0x5f, // FSH........bgfx_
51   0x63, 0x6c, 0x65, 0x61, 0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x15, 0x08, 0x00, 0x00, 0x08, // clear_color.....
52   0x00, 0xdc, 0x03, 0x44, 0x58, 0x42, 0x43, 0xe8, 0xce, 0x0f, 0xa5, 0xe8, 0x1d, 0xad, 0xe4, 0x06, // ...DXBC.........
53   0x9c, 0x68, 0x8b, 0xa9, 0x74, 0x19, 0x97, 0x01, 0x00, 0x00, 0x00, 0xdc, 0x03, 0x00, 0x00, 0x05, // .h..t...........
54   0x00, 0x00, 0x00, 0x34, 0x00, 0x00, 0x00, 0x0c, 0x01, 0x00, 0x00, 0x40, 0x01, 0x00, 0x00, 0x1c, // ...4.......@....
55   0x02, 0x00, 0x00, 0x60, 0x03, 0x00, 0x00, 0x52, 0x44, 0x45, 0x46, 0xd0, 0x00, 0x00, 0x00, 0x01, // ...`...RDEF.....
56   0x00, 0x00, 0x00, 0x48, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x1c, 0x00, 0x00, 0x00, 0x00, // ...H............
57   0x04, 0xff, 0xff, 0x00, 0x91, 0x00, 0x00, 0x9c, 0x00, 0x00, 0x00, 0x3c, 0x00, 0x00, 0x00, 0x00, // ...........<....
58   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
59   0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x24, 0x47, 0x6c, 0x6f, 0x62, // ...........$Glob
60   0x61, 0x6c, 0x73, 0x00, 0xab, 0xab, 0xab, 0x3c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x60, // als....<.......`
61   0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x78, // ...............x
62   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x80, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x8c, // ................
63   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x62, 0x67, 0x66, 0x78, 0x5f, 0x63, 0x6c, 0x65, 0x61, // .......bgfx_clea
64   0x72, 0x5f, 0x63, 0x6f, 0x6c, 0x6f, 0x72, 0x00, 0xab, 0xab, 0xab, 0x01, 0x00, 0x03, 0x00, 0x01, // r_color.........
65   0x00, 0x04, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x4d, 0x69, 0x63, 0x72, 0x6f, // ...........Micro
66   0x73, 0x6f, 0x66, 0x74, 0x20, 0x28, 0x52, 0x29, 0x20, 0x48, 0x4c, 0x53, 0x4c, 0x20, 0x53, 0x68, // soft (R) HLSL Sh
67   0x61, 0x64, 0x65, 0x72, 0x20, 0x43, 0x6f, 0x6d, 0x70, 0x69, 0x6c, 0x65, 0x72, 0x20, 0x39, 0x2e, // ader Compiler 9.
68   0x32, 0x39, 0x2e, 0x39, 0x35, 0x32, 0x2e, 0x33, 0x31, 0x31, 0x31, 0x00, 0xab, 0xab, 0xab, 0x49, // 29.952.3111....I
69   0x53, 0x47, 0x4e, 0x2c, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x20, // SGN,...........
70   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, // ................
71   0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x50, 0x4f, 0x53, 0x49, 0x54, 0x49, // .......SV_POSITI
72   0x4f, 0x4e, 0x00, 0x4f, 0x53, 0x47, 0x4e, 0xd4, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x08, // ON.OSGN.........
73   0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
74   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x01, // ................
75   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x0f, // ................
76   0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
77   0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x03, // ................
78   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x0f, // ................
79   0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
80   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x05, // ................
81   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x0f, // ................
82   0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, // ................
83   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x0f, 0x00, 0x00, 0x00, 0xc8, 0x00, 0x00, 0x00, 0x07, // ................
84   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x0f, // ................
85   0x00, 0x00, 0x00, 0x53, 0x56, 0x5f, 0x54, 0x41, 0x52, 0x47, 0x45, 0x54, 0x00, 0xab, 0xab, 0x53, // ...SV_TARGET...S
86   0x48, 0x44, 0x52, 0x3c, 0x01, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x4f, 0x00, 0x00, 0x00, 0x59, // HDR<...@...O...Y
87   0x00, 0x00, 0x04, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x65, // ...F. .........e
88   0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
89   0x20, 0x10, 0x00, 0x01, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x02, //  ......e.... ...
90   0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x03, 0x00, 0x00, 0x00, 0x65, // ...e.... ......e
91   0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, // .... ......e....
92   0x20, 0x10, 0x00, 0x05, 0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x06, //  ......e.... ...
93   0x00, 0x00, 0x00, 0x65, 0x00, 0x00, 0x03, 0xf2, 0x20, 0x10, 0x00, 0x07, 0x00, 0x00, 0x00, 0x36, // ...e.... ......6
94   0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x00, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
95   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x01, // .......6.... ...
96   0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
97   0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x02, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
98   0x00, 0x00, 0x00, 0x02, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x03, // .......6.... ...
99   0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
100   0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x04, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
101   0x00, 0x00, 0x00, 0x04, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x05, // .......6.... ...
102   0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x05, 0x00, 0x00, 0x00, 0x36, // ...F. .........6
103   0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x06, 0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, // .... ......F. ..
104   0x00, 0x00, 0x00, 0x06, 0x00, 0x00, 0x00, 0x36, 0x00, 0x00, 0x06, 0xf2, 0x20, 0x10, 0x00, 0x07, // .......6.... ...
105   0x00, 0x00, 0x00, 0x46, 0x8e, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07, 0x00, 0x00, 0x00, 0x3e, // ...F. .........>
106   0x00, 0x00, 0x01, 0x53, 0x54, 0x41, 0x54, 0x74, 0x00, 0x00, 0x00, 0x09, 0x00, 0x00, 0x00, 0x00, // ...STATt........
107   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
108   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
109   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
110   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
111   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
112   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
113   0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, // ................
114   0x00, 0x80, 0x00,                                                                               // ...
115};
Property changes on: branches/osd/src/lib/bgfx/fs_clear7.bin.h
Added: svn:mime-type
   + text/plain
Added: svn:eol-style
   + native
branches/osd/src/lib/bgfx/image.cpp
r31873r31874
5050      {  16, 1, 1,  2 }, // RGBA4
5151      {  16, 1, 1,  2 }, // RGB5A1
5252      {  32, 1, 1,  4 }, // RGB10A2
53      {  32, 1, 1,  4 }, // R11G11B10F
5354      {   0, 0, 0,  0 }, // UnknownDepth
5455      {  16, 1, 1,  2 }, // D16
5556      {  24, 1, 1,  3 }, // D24
r31873r31874
6465
6566   static const char* s_textureFormatName[] =
6667   {
67      "BC1",       // BC1
68      "BC2",       // BC2
69      "BC3",       // BC3
70      "BC4",       // BC4
71      "BC5",       // BC5
72      "BC6H",      // BC6H
73      "BC7",       // BC7
74      "ETC1",      // ETC1
75      "ETC2",      // ETC2
76      "ETC2A",     // ETC2A
77      "ETC2A1",    // ETC2A1
78      "PTC12",     // PTC12
79      "PTC14",     // PTC14
80      "PTC12A",    // PTC12A
81      "PTC14A",    // PTC14A
82      "PTC22",     // PTC22
83      "PTC24",     // PTC24
84      "<unknown>", // Unknown
85      "R1",        // R1
86      "R8",        // R8
87      "R16",       // R16
88      "R16F",      // R16F
89      "R32",       // R32
90      "R32F",      // R32F
91      "RG8",       // RG8
92      "RG16",      // RG16
93      "RG16F",     // RG16F
94      "RG32",      // RG32
95      "RG32F",     // RG32F
96      "BGRA8",     // BGRA8
97      "RGBA16",    // RGBA16
98      "RGBA16F",   // RGBA16F
99      "RGBA32",    // RGBA32
100      "RGBA32F",   // RGBA32F
101      "R5G6B5",    // R5G6B5
102      "RGBA4",     // RGBA4
103      "RGB5A1",    // RGB5A1
104      "RGB10A2",   // RGB10A2
105      "<unknown>", // UnknownDepth
106      "D16",       // D16
107      "D24",       // D24
108      "D24S8",     // D24S8
109      "D32",       // D32
110      "D16F",      // D16F
111      "D24F",      // D24F
112      "D32F",      // D32F
113      "D0S8",      // D0S8
68      "BC1",        // BC1
69      "BC2",        // BC2
70      "BC3",        // BC3
71      "BC4",        // BC4
72      "BC5",        // BC5
73      "BC6H",       // BC6H
74      "BC7",        // BC7
75      "ETC1",       // ETC1
76      "ETC2",       // ETC2
77      "ETC2A",      // ETC2A
78      "ETC2A1",     // ETC2A1
79      "PTC12",      // PTC12
80      "PTC14",      // PTC14
81      "PTC12A",     // PTC12A
82      "PTC14A",     // PTC14A
83      "PTC22",      // PTC22
84      "PTC24",      // PTC24
85      "<unknown>",  // Unknown
86      "R1",         // R1
87      "R8",         // R8
88      "R16",        // R16
89      "R16F",       // R16F
90      "R32",        // R32
91      "R32F",       // R32F
92      "RG8",        // RG8
93      "RG16",       // RG16
94      "RG16F",      // RG16F
95      "RG32",       // RG32
96      "RG32F",      // RG32F
97      "BGRA8",      // BGRA8
98      "RGBA16",     // RGBA16
99      "RGBA16F",    // RGBA16F
100      "RGBA32",     // RGBA32
101      "RGBA32F",    // RGBA32F
102      "R5G6B5",     // R5G6B5
103      "RGBA4",      // RGBA4
104      "RGB5A1",     // RGB5A1
105      "RGB10A2",    // RGB10A2
106      "R11G11B10F", // R11G11B10F
107      "<unknown>",  // UnknownDepth
108      "D16",        // D16
109      "D24",        // D24
110      "D24S8",      // D24S8
111      "D32",        // D32
112      "D16F",       // D16F
113      "D24F",       // D24F
114      "D32F",       // D32F
115      "D0S8",       // D0S8
114116   };
115117   BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_textureFormatName) );
116118
branches/osd/src/lib/bgfx/fs_clear2.sc
r31873r31874
1$input v_color0
2
31/*
42 * Copyright 2011-2014 Branimir Karadzic. All rights reserved.
53 * License: http://www.opensource.org/licenses/BSD-2-Clause
64 */
75
8#include "bgfx_shader.sh"
6uniform vec4 bgfx_clear_color[8];
97
108void main()
119{
12   gl_FragData[0] = v_color0;
13   gl_FragData[1] = v_color0;
14   gl_FragData[2] = v_color0;
10   gl_FragData[0] = bgfx_clear_color[0];
11   gl_FragData[1] = bgfx_clear_color[1];
12   gl_FragData[2] = bgfx_clear_color[2];
1513}

Previous 199869 Revisions Next


© 1997-2024 The MAME Team