Previous 199869 Revisions Next

r36479 Friday 20th March, 2015 at 01:11:07 UTC by Jonathan Gevaryahu
tms6100.c: add the tms6125 4KiB VSM pinout [Lord Nightmare, plgdavid]
[3rdparty/bgfx]README.md
[3rdparty/bgfx/3rdparty/ocornut-imgui]imgui.cpp
[3rdparty/bgfx/examples/25-c99]helloworld.c
[3rdparty/bgfx/scripts]genie.lua
[3rdparty/bgfx/src]bgfx_shader.sh renderer_d3d11.cpp renderer_gl.cpp vertexdecl.cpp
[3rdparty/bgfx/tools/shaderc]shaderc.cpp
[3rdparty/bx/scripts]toolchain.lua
[3rdparty/bx/tools/bin/darwin]genie
[3rdparty/bx/tools/bin/linux]genie
[3rdparty/bx/tools/bin/windows]genie.exe
[3rdparty/genie]README.md
[3rdparty/genie/src/actions/make]make_cpp.lua
[3rdparty/genie/src/base]bake.lua
[3rdparty/genie/src/host]scripts.c
[src/emu/cpu/hmcs40]hmcs40.c
[src/emu/machine]tms6100.c
[src/mame]mame.lst
[src/mame/audio]hng64.c
[src/mame/drivers]twins.c
[src/mess/drivers]hh_hmcs40.c

trunk/3rdparty/bgfx/3rdparty/ocornut-imgui/imgui.cpp
r244990r244991
353353#endif
354354#ifdef __GNUC__
355355#pragma GCC diagnostic ignored "-Wunused-function"          // warning: 'xxxx' defined but not used
356#pragma GCC diagnostic ignored "-Wunused-parameter"         // warning: unused parameter ‘xxxx’
357#pragma GCC diagnostic ignored "-Wtype-limits"              // warning: comparison is always true due to limited range of data type
358#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"      // warning: ‘xxxx’ may be used uninitialized in this function
359356#endif
360357
361358//-------------------------------------------------------------------------
trunk/3rdparty/bgfx/README.md
r244990r244991
44What is it?
55-----------
66
7Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style
8rendering library.
7Cross-platform rendering library.
98
109Supported rendering backends:
1110
trunk/3rdparty/bgfx/scripts/genie.lua
r244990r244991
8484   end
8585
8686   includedirs {
87      path.join(BX_DIR,   "include"),
87      path.join(BX_DIR, "include"),
8888      path.join(BGFX_DIR, "include"),
8989      path.join(BGFX_DIR, "3rdparty"),
9090      path.join(BGFX_DIR, "examples/common"),
9191   }
9292
9393   files {
94      path.join(BGFX_DIR, "examples", _name, "**.c"),
9594      path.join(BGFX_DIR, "examples", _name, "**.cpp"),
9695      path.join(BGFX_DIR, "examples", _name, "**.h"),
9796   }
r244990r244991
309308exampleProject("22-windows")
310309exampleProject("23-vectordisplay")
311310exampleProject("24-nbody")
312exampleProject("25-c99")
313311
314312if _OPTIONS["with-shared-lib"] then
315313   group "libs"
trunk/3rdparty/bgfx/src/bgfx_shader.sh
r244990r244991
7474   Texture3D m_texture;
7575};
7676
77struct BgfxISampler3D
78{
79   Texture3D<ivec4> m_texture;
80};
81
82struct BgfxUSampler3D
83{
84   Texture3D<uvec4> m_texture;
85};
86
8777vec4 bgfxTexture3D(BgfxSampler3D _sampler, vec3 _coord)
8878{
8979   return _sampler.m_texture.Sample(_sampler.m_sampler, _coord);
r244990r244991
9484   return _sampler.m_texture.SampleLevel(_sampler.m_sampler, _coord, _level);
9585}
9686
97ivec4 bgfxTexture3D(BgfxISampler3D _sampler, vec3 _coord)
98{
99   ivec3 size;
100   _sampler.m_texture.GetDimensions(size.x, size.y, size.z);
101   return _sampler.m_texture.Load(ivec4(_coord * size, 0) );
102}
103
104uvec4 bgfxTexture3D(BgfxUSampler3D _sampler, vec3 _coord)
105{
106   uvec3 size;
107   _sampler.m_texture.GetDimensions(size.x, size.y, size.z);
108   return _sampler.m_texture.Load(uvec4(_coord * size, 0) );
109}
110
11187struct BgfxSamplerCube
11288{
11389   SamplerState m_sampler;
r244990r244991
145121         uniform SamplerState _name ## Sampler : register(s[_reg]); \
146122         uniform Texture3D _name ## Texture : register(t[_reg]); \
147123         static BgfxSampler3D _name = { _name ## Sampler, _name ## Texture }
148#      define ISAMPLER3D(_name, _reg) \
149         uniform Texture3D<ivec4> _name ## Texture : register(t[_reg]); \
150         static BgfxISampler3D _name = { _name ## Texture }
151#      define USAMPLER3D(_name, _reg) \
152         uniform Texture3D<uvec4> _name ## Texture : register(t[_reg]); \
153         static BgfxUSampler3D _name = { _name ## Texture }
154124#      define sampler3D BgfxSampler3D
155125#      define texture3D(_sampler, _coord) bgfxTexture3D(_sampler, _coord)
156126#      define texture3DLod(_sampler, _coord, _level) bgfxTexture3DLod(_sampler, _coord, _level)
r244990r244991
277247#   define uvec3_splat(_x) uvec3(_x)
278248#   define uvec4_splat(_x) uvec4(_x)
279249
280#   if BGFX_SHADER_LANGUAGE_GLSL >= 130
281#      define ISAMPLER3D(_name, _reg) uniform isampler3D _name
282#      define USAMPLER3D(_name, _reg) uniform usampler3D _name
283ivec4 texture3D(isampler3D _sampler, vec3 _coord) { return texture(_sampler, _coord); }
284uvec4 texture3D(usampler3D _sampler, vec3 _coord) { return texture(_sampler, _coord); }
285#   endif // BGFX_SHADER_LANGUAGE_GLSL >= 130
286
287250vec3 instMul(vec3 _vec, mat3 _mtx) { return mul(_vec, _mtx); }
288251vec3 instMul(mat3 _mtx, vec3 _vec) { return mul(_mtx, _vec); }
289252vec4 instMul(vec4 _vec, mat4 _mtx) { return mul(_vec, _mtx); }
trunk/3rdparty/bgfx/src/renderer_d3d11.cpp
r244990r244991
203203      { DXGI_FORMAT_UNKNOWN,            DXGI_FORMAT_UNKNOWN,               DXGI_FORMAT_UNKNOWN           }, // Unknown
204204      { DXGI_FORMAT_R1_UNORM,           DXGI_FORMAT_R1_UNORM,              DXGI_FORMAT_UNKNOWN           }, // R1
205205      { DXGI_FORMAT_R8_UNORM,           DXGI_FORMAT_R8_UNORM,              DXGI_FORMAT_UNKNOWN           }, // R8
206      { DXGI_FORMAT_R16_UINT,          DXGI_FORMAT_R16_UINT,              DXGI_FORMAT_UNKNOWN           }, // R16
206      { DXGI_FORMAT_R16_UNORM,          DXGI_FORMAT_R16_UNORM,             DXGI_FORMAT_UNKNOWN           }, // R16
207207      { DXGI_FORMAT_R16_FLOAT,          DXGI_FORMAT_R16_FLOAT,             DXGI_FORMAT_UNKNOWN           }, // R16F
208208      { DXGI_FORMAT_R32_UINT,           DXGI_FORMAT_R32_UINT,              DXGI_FORMAT_UNKNOWN           }, // R32
209209      { DXGI_FORMAT_R32_FLOAT,          DXGI_FORMAT_R32_FLOAT,             DXGI_FORMAT_UNKNOWN           }, // R32F
trunk/3rdparty/bgfx/src/renderer_gl.cpp
r244990r244991
721721      "usampler3D",
722722      "isamplerCube",
723723      "usamplerCube",
724      NULL
725724   };
726725
727726   static void GL_APIENTRY stubVertexAttribDivisor(GLuint /*_index*/, GLuint /*_divisor*/)
trunk/3rdparty/bgfx/src/vertexdecl.cpp
r244990r244991
4141
4242   static const uint8_t (*s_attribTypeSize[])[AttribType::Count][4] =
4343   {
44      &s_attribTypeSizeDx9,  // Null
44#if BGFX_CONFIG_RENDERER_DIRECT3D9
45      &s_attribTypeSizeDx9,
46#elif BGFX_CONFIG_RENDERER_DIRECT3D11 || BGFX_CONFIG_RENDERER_DIRECT3D12
47      &s_attribTypeSizeDx1x,
48#elif BGFX_CONFIG_RENDERER_OPENGL || BGFX_CONFIG_RENDERER_OPENGLES || BGFX_CONFIG_RENDERER_VULKAN
49      &s_attribTypeSizeGl,
50#else
51      &s_attribTypeSizeDx9,
52#endif // BGFX_CONFIG_RENDERER_
4553      &s_attribTypeSizeDx9,  // Direct3D9
4654      &s_attribTypeSizeDx1x, // Direct3D11
4755      &s_attribTypeSizeDx1x, // Direct3D12
4856      &s_attribTypeSizeGl,   // OpenGLES
4957      &s_attribTypeSizeGl,   // OpenGL
5058      &s_attribTypeSizeGl,   // Vulkan
51      &s_attribTypeSizeDx9,  // Count
5259   };
53   BX_STATIC_ASSERT(BX_COUNTOF(s_attribTypeSize) == RendererType::Count+1);
60   BX_STATIC_ASSERT(BX_COUNTOF(s_attribTypeSize) == bgfx::RendererType::Count);
5461
5562   void initAttribTypeSizeTable(RendererType::Enum _type)
5663   {
57      s_attribTypeSize[0]                   = s_attribTypeSize[_type];
58      s_attribTypeSize[RendererType::Count] = s_attribTypeSize[_type];
64      s_attribTypeSize[0] = s_attribTypeSize[_type];
5965   }
6066
6167   void dbgPrintfVargs(const char* _format, va_list _argList)
trunk/3rdparty/bgfx/tools/shaderc/shaderc.cpp
r244990r244991
751751
752752   bool raw = cmdLine.hasArg('\0', "raw");
753753
754   uint32_t glsl = 0;
755   uint32_t essl = 0;
754   uint32_t gles = 0;
756755   uint32_t hlsl = 2;
757756   uint32_t d3d  = 11;
758757   const char* profile = cmdLine.findOption('p', "profile");
r244990r244991
775774      {
776775         hlsl = 5;
777776      }
778      else
779      {
780         glsl = atoi(profile);
781      }
782777   }
783778   else
784779   {
785      essl = 2;
780      gles = 2;
786781   }
787782
788783   const char* bin2c = NULL;
r244990r244991
816811   bool preprocessOnly = cmdLine.hasArg("preprocess");
817812   const char* includeDir = cmdLine.findOption('i');
818813
819   Preprocessor preprocessor(filePath, 0 != essl, includeDir);
814   Preprocessor preprocessor(filePath, 0 != gles, includeDir);
820815
821816   std::string dir;
822817   {
r244990r244991
844839   preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_FRAGMENT");
845840   preprocessor.setDefaultDefine("BGFX_SHADER_TYPE_VERTEX");
846841
847   char glslDefine[128];
848   bx::snprintf(glslDefine, BX_COUNTOF(glslDefine), "BGFX_SHADER_LANGUAGE_GLSL=%d", glsl);
842   bool glsl = false;
849843
850844   if (0 == bx::stricmp(platform, "android") )
851845   {
852846      preprocessor.setDefine("BX_PLATFORM_ANDROID=1");
853847      preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
848      glsl = true;
854849   }
855850   else if (0 == bx::stricmp(platform, "asm.js") )
856851   {
857852      preprocessor.setDefine("BX_PLATFORM_EMSCRIPTEN=1");
858853      preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
854      glsl = true;
859855   }
860856   else if (0 == bx::stricmp(platform, "ios") )
861857   {
862858      preprocessor.setDefine("BX_PLATFORM_IOS=1");
863859      preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
860      glsl = true;
864861   }
865862   else if (0 == bx::stricmp(platform, "linux") )
866863   {
867864      preprocessor.setDefine("BX_PLATFORM_LINUX=1");
868      preprocessor.setDefine(glslDefine);
865      preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
866      glsl = true;
869867   }
870868   else if (0 == bx::stricmp(platform, "nacl") )
871869   {
872870      preprocessor.setDefine("BX_PLATFORM_NACL=1");
873871      preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
872      glsl = true;
874873   }
875874   else if (0 == bx::stricmp(platform, "osx") )
876875   {
877876      preprocessor.setDefine("BX_PLATFORM_OSX=1");
878      preprocessor.setDefine(glslDefine);
877      preprocessor.setDefine("BGFX_SHADER_LANGUAGE_GLSL=1");
878      glsl = true;
879879   }
880880   else if (0 == bx::stricmp(platform, "windows") )
881881   {
r244990r244991
11201120            bx::write(writer, outputHash);
11211121         }
11221122
1123         if (0 != glsl)
1123         if (glsl)
11241124         {
11251125            bx::write(writer, uint16_t(0) );
11261126
r244990r244991
11551155         }
11561156         else
11571157         {
1158            if (0 != glsl)
1158            if (glsl)
11591159            {
11601160            }
11611161            else
r244990r244991
12691269                  bx::write(writer, BGFX_CHUNK_MAGIC_CSH);
12701270                  bx::write(writer, outputHash);
12711271
1272                  if (0 != glsl)
1272                  if (glsl)
12731273                  {
12741274                     std::string code;
12751275
1276                     if (essl)
1276                     if (gles)
12771277                     {
12781278                        bx::stringPrintf(code, "#version 310 es\n");
12791279                     }
12801280                     else
12811281                     {
1282                        bx::stringPrintf(code, "#version %d\n", glsl == 0 ? 430 : glsl);
1282                        int32_t version = atoi(profile);
1283                        bx::stringPrintf(code, "#version %d\n", version == 0 ? 430 : version);
12831284                     }
12841285
12851286                     code += preprocessor.m_preprocessed;
r244990r244991
12931294
12941295                     compiled = true;
12951296#else
1296                     compiled = compileGLSLShader(cmdLine, essl, code, writer);
1297                     compiled = compileGLSLShader(cmdLine, gles, code, writer);
12971298#endif // 0
12981299                  }
12991300                  else
r244990r244991
13381339         }
13391340         else
13401341         {
1341            if (0 != glsl)
1342            if (glsl)
13421343            {
1343               if (120 == glsl
1344               ||  essl)
1345               {
1346                  preprocessor.writef(
1347                     "#define ivec2 vec2\n"
1348                     "#define ivec3 vec3\n"
1349                     "#define ivec4 vec4\n"
1350                     );
1351               }
1344               preprocessor.writef(
1345                  "#define ivec2 vec2\n"
1346                  "#define ivec3 vec3\n"
1347                  "#define ivec4 vec4\n"
1348                  );
13521349
1353               if (0 == essl)
1350               if (0 == gles)
13541351               {
13551352                  // bgfx shadow2D/Proj behave like EXT_shadow_samplers
13561353                  // not as GLSL language 1.2 specs shadow2D/Proj.
r244990r244991
16481645                     return EXIT_FAILURE;
16491646                  }
16501647
1651                  if (0 != glsl)
1648                  if (glsl)
16521649                  {
16531650                     const char* profile = cmdLine.findOption('p', "profile");
16541651                     if (NULL == profile)
r244990r244991
17001697                     bx::write(writer, outputHash);
17011698                  }
17021699
1703                  if (0 != glsl)
1700                  if (glsl)
17041701                  {
17051702                     std::string code;
17061703
17071704                     bool hasTextureLod = NULL != bx::findIdentifierMatch(input, s_ARB_shader_texture_lod /*EXT_shader_texture_lod*/);
17081705
1709                     if (0 == essl)
1706                     if (0 == gles)
17101707                     {
17111708                        bx::stringPrintf(code, "#version %s\n", profile);
1709                        int32_t version = atoi(profile);
17121710
17131711                        bx::stringPrintf(code
17141712                           , "#define bgfxShadow2D shadow2D\n"
r244990r244991
17161714                           );
17171715
17181716                        if (hasTextureLod
1719                        &&  130 > glsl)
1717                        &&  130 > version)
17201718                        {
17211719                           bx::stringPrintf(code
17221720                              , "#extension GL_ARB_shader_texture_lod : enable\n"
r244990r244991
17691767                     }
17701768
17711769                     code += preprocessor.m_preprocessed;
1772                     compiled = compileGLSLShader(cmdLine, essl, code, writer);
1770                     compiled = compileGLSLShader(cmdLine, gles, code, writer);
17731771                  }
17741772                  else
17751773                  {
trunk/3rdparty/bx/scripts/toolchain.lua
r244990r244991
298298         premake.vstudio.toolset = ("v110_xp")
299299         location (path.join(_buildDir, "projects", _ACTION .. "-xp"))
300300      end
301
301     
302302      if ("vs2013-xp") == _OPTIONS["vs"] then
303303         premake.vstudio.toolset = ("v120_xp")
304304         location (path.join(_buildDir, "projects", _ACTION .. "-xp"))
305305      end
306
306     
307307   elseif _ACTION == "xcode4" then
308308
309309      if "osx" == _OPTIONS["xcode"] then
r244990r244991
414414      defines { "WIN32" }
415415      includedirs { path.join(bxDir, "include/compat/mingw") }
416416      buildoptions {
417         "-std=c++11",
417418         "-Wunused-value",
418419         "-fdata-sections",
419420         "-ffunction-sections",
r244990r244991
421422         "-Wunused-value",
422423         "-Wundef",
423424      }
424      buildoptions_cpp {
425         "-std=c++0x",
426      }
427425      linkoptions {
428426         "-Wl,--gc-sections",
429427         "-static-libgcc",
r244990r244991
488486
489487   configuration { "linux-*" }
490488      buildoptions {
489         "-std=c++0x",
491490         "-msse2",
492491         "-Wunused-value",
493492         "-Wundef",
494493      }
495      buildoptions_cpp {
496         "-std=c++0x",
497      }     
498494      links {
499495         "rt",
500496         "dl",
r244990r244991
849845         "__STDC_VERSION__=199901L",
850846      }
851847      buildoptions {
848         "-std=c++0x",
852849         "-Wunused-value",
853850         "-Wundef",
854851      }
855      buildoptions_cpp {
856         "-std=c++0x",
857      }
858852      includedirs {
859853         "/opt/vc/include",
860854         "/opt/vc/include/interface/vcos/pthreads",
trunk/3rdparty/bx/tools/bin/darwin/genie
r244990r244991
Previous 199869 Revisions Next


© 1997-2024 The MAME Team