Previous 199869 Revisions Next

r36260 Thursday 5th March, 2015 at 06:36:12 UTC by Alex Marshall
Add Daioh loctest and remove hacked Daioh set.

Add Daioh (location test version) [CoolMod, trap15]
Remove Daioh (set 1) and replace with Daioh (set 2).
Set 1 was a hack and probably should not have been accepted.
[3rdparty/bgfx/examples/common/entry]entry_osx.mm entry_windows.cpp entry_x11.cpp
[3rdparty/bgfx/include]bgfx.c99.h bgfx.h bgfxdefines.h
[3rdparty/bgfx/src]bgfx.cpp bgfx_compute.sh renderer_d3d11.cpp renderer_d3d9.cpp renderer_gl.cpp renderer_gl.h
[3rdparty/bx/3rdparty/CL]cl_platform.h
[3rdparty/bx/include/bx]uint32_t.h
[3rdparty/bx/tools/bin/darwin]genie
[3rdparty/bx/tools/bin/linux]genie
[3rdparty/bx/tools/bin/windows]genie.exe
[3rdparty/genie]README.md scripting-reference.md*
[3rdparty/genie/docs]scripting-reference.md
[3rdparty/genie/src/actions/make]make_cpp.lua
[3rdparty/genie/src/base]api.lua path.lua
[3rdparty/genie/src/host]scripts.c
[3rdparty/mongoose]mongoose.c
[3rdparty/mongoose/docs]Embed.md
[src/build]file2str.py makelist.py png2bdc.py verinfo.py
[src/emu]info.c
[src/emu/cpu/arcompact]arcompact_make.py
[src/emu/cpu/h8]h8make.py
[src/emu/cpu/hmcs40]hmcs40.h hmcs40d.c
[src/emu/cpu/m6809]m6809make.py
[src/emu/cpu/mcs96]mcs96make.py
[src/emu/cpu/tms57002]tmsmake.py
[src/lib]lib.mak
[src/mame]mame.lst
[src/mame/drivers]seta.c
[src/regtests/jedutil]jedtest.py
[src/tools]unidasm.c

trunk/3rdparty/bgfx/examples/common/entry/entry_osx.mm
r244771r244772
1616#include <bx/os.h>
1717#include <bx/handlealloc.h>
1818
19#define DEFAULT_WIDTH 1280
20#define DEFAULT_HEIGHT 720
21
1922@interface AppDelegate : NSObject<NSApplicationDelegate>
2023{
2124   bool terminated;
r244771r244772
7780   struct Context
7881   {
7982      Context()
80         : m_scroll(0)
81         , m_exit(false)
83         : m_exit(false)
8284      {
8385         s_translateKey[27]             = Key::Esc;
8486         s_translateKey[13]             = Key::Return;
r244771r244772
104106
105107         for (char ch = 'a'; ch <= 'z'; ++ch)
106108         {
107            s_translateKey[uint8_t(ch)]       =
109            s_translateKey[uint8_t(ch)]             =
108110            s_translateKey[uint8_t(ch - ' ')] = Key::KeyA + (ch - 'a');
109111         }
110112      }
r244771r244772
234236               case NSMouseMoved:
235237               case NSLeftMouseDragged:
236238               case NSRightMouseDragged:
237               case NSOtherMouseDragged:
238239               {
239240                  int x, y;
240241                  getMousePos(&x, &y);
241                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll);
242                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, 0);
242243                  break;
243244               }
244245
r244771r244772
246247               {
247248                  int x, y;
248249                  getMousePos(&x, &y);
249                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Left, true);
250                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, 0, MouseButton::Left, true);
250251                  break;
251252               }
252253
r244771r244772
254255               {
255256                  int x, y;
256257                  getMousePos(&x, &y);
257                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Left, false);
258                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, 0, MouseButton::Left, false);
258259                  break;
259260               }
260261
r244771r244772
262263               {
263264                  int x, y;
264265                  getMousePos(&x, &y);
265                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Right, true);
266                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, 0, MouseButton::Right, true);
266267                  break;
267268               }
268269
r244771r244772
270271               {
271272                  int x, y;
272273                  getMousePos(&x, &y);
273                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Right, false);
274                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, 0, MouseButton::Right, false);
274275                  break;
275276               }
276277
277               case NSOtherMouseDown:
278               {
279                  int x, y;
280                  getMousePos(&x, &y);
281                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Middle, true);
282                  break;
283               }
284
285               case NSOtherMouseUp:
286               {
287                  int x, y;
288                  getMousePos(&x, &y);
289                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Middle, false);
290                  break;
291               }
292
293               case NSScrollWheel:
294               {
295                  int x, y;
296                  getMousePos(&x, &y);
297                  m_scroll += ([event deltaY] > 0.0f) ? 1 : -1;
298                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll);
299                  break;
300               }
301
302278               case NSKeyDown:
303279               {
304280                  uint8_t modifiers = 0;
r244771r244772
388364         [NSApp setMainMenu:menubar];
389365
390366         m_windowAlloc.alloc();
391         NSRect rect = NSMakeRect(0, 0, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT);
367         NSRect rect = NSMakeRect(0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT);
392368         NSWindow* window = [[NSWindow alloc]
393369            initWithContentRect:rect
394370            styleMask:0
r244771r244772
443419      bx::HandleAllocT<ENTRY_CONFIG_MAX_WINDOWS> m_windowAlloc;
444420      NSWindow* m_window[ENTRY_CONFIG_MAX_WINDOWS];
445421
446      int32_t m_scroll;
447422      bool m_exit;
448423   };
449424
trunk/3rdparty/bgfx/examples/common/entry/entry_windows.cpp
r244771r244772
706706                  ScreenToClient(_hwnd, &pt);
707707                  int32_t mx = pt.x;
708708                  int32_t my = pt.y;
709                  m_mz += GET_WHEEL_DELTA_WPARAM(_wparam)/WHEEL_DELTA;
709                  m_mz += GET_WHEEL_DELTA_WPARAM(_wparam);
710710                  m_eventQueue.postMouseEvent(findHandle(_hwnd), mx, my, m_mz);
711711               }
712712               break;
trunk/3rdparty/bgfx/examples/common/entry/entry_x11.cpp
r244771r244772
267267         initTranslateKey('x',             Key::KeyX);
268268         initTranslateKey('y',             Key::KeyY);
269269         initTranslateKey('z',             Key::KeyZ);
270
271         m_mx = 0;
272         m_my = 0;
273         m_mz = 0;
274270      }
275271
276272      int32_t run(int _argc, char** _argv)
r244771r244772
371367                  case ButtonRelease:
372368                     {
373369                        const XButtonEvent& xbutton = event.xbutton;
374                        MouseButton::Enum mb = MouseButton::None;
370                        MouseButton::Enum mb;
375371                        switch (xbutton.button)
376372                        {
377373                           case Button1: mb = MouseButton::Left;   break;
378374                           case Button2: mb = MouseButton::Middle; break;
379375                           case Button3: mb = MouseButton::Right;  break;
380                           case Button4: ++m_mz; break;
381                           case Button5: --m_mz; break;
376                           default:      mb = MouseButton::None;   break;
382377                        }
383378
384                        WindowHandle handle = findHandle(xbutton.window);
385379                        if (MouseButton::None != mb)
386380                        {
381                           WindowHandle handle = findHandle(xbutton.window);
387382                           m_eventQueue.postMouseEvent(handle
388383                              , xbutton.x
389384                              , xbutton.y
r244771r244772
392387                              , event.type == ButtonPress
393388                              );
394389                        }
395                        else
396                        {
397                           m_eventQueue.postMouseEvent(handle
398                                 , m_mx
399                                 , m_my
400                                 , m_mz
401                                 );
402                        }
403390                     }
404391                     break;
405392
r244771r244772
407394                     {
408395                        const XMotionEvent& xmotion = event.xmotion;
409396                        WindowHandle handle = findHandle(xmotion.window);
410
411                        m_mx = xmotion.x;
412                        m_my = xmotion.y;
413
414397                        m_eventQueue.postMouseEvent(handle
415                              , m_mx
416                              , m_my
417                              , m_mz
398                              , xmotion.x
399                              , xmotion.y
400                              , 0
418401                              );
419402                     }
420403                     break;
r244771r244772
560543      uint8_t m_modifiers;
561544      bool m_exit;
562545
563      int32_t m_mx;
564      int32_t m_my;
565      int32_t m_mz;
566
567546      EventQueue m_eventQueue;
568547      bx::LwMutex m_lock;
569548      bx::HandleAllocT<ENTRY_CONFIG_MAX_WINDOWS> m_windowAlloc;
trunk/3rdparty/bgfx/include/bgfx.c99.h
r244771r244772
293293
294294    /**
295295     *  Supported texture formats.
296     *   `BGFX_CAPS_FORMAT_TEXTURE_NONE` - not supported
297     *   `BGFX_CAPS_FORMAT_TEXTURE_COLOR` - supported
298     *   `BGFX_CAPS_FORMAT_TEXTURE_EMULATED` - emulated
299     *   `BGFX_CAPS_FORMAT_TEXTURE_VERTEX` - supported vertex texture
296     *    0 - not supported
297     *    1 - supported
298     *    2 - emulated
300299     */
301300    uint8_t formats[BGFX_TEXTURE_FORMAT_COUNT];
302301
trunk/3rdparty/bgfx/include/bgfx.h
r244771r244772
315315      uint8_t  maxFBAttachments; ///< Maximum frame buffer attachments.
316316
317317      /// Supported texture formats.
318      ///   - `BGFX_CAPS_FORMAT_TEXTURE_NONE` - not supported
319      ///   - `BGFX_CAPS_FORMAT_TEXTURE_COLOR` - supported
320      ///   - `BGFX_CAPS_FORMAT_TEXTURE_EMULATED` - emulated
321      ///   - `BGFX_CAPS_FORMAT_TEXTURE_VERTEX` - supported vertex texture
318      ///   - 0 - not supported
319      ///   - 1 - supported
320      ///   - 2 - emulated
322321      uint8_t formats[TextureFormat::Count];
323322   };
324323
trunk/3rdparty/bgfx/include/bgfxdefines.h
r244771r244772
318318#define BGFX_CAPS_HMD                    UINT64_C(0x0000000000000800)
319319
320320///
321#define BGFX_CAPS_FORMAT_TEXTURE_NONE     UINT8_C(0x00)
322#define BGFX_CAPS_FORMAT_TEXTURE_COLOR    UINT8_C(0x01)
323#define BGFX_CAPS_FORMAT_TEXTURE_EMULATED UINT8_C(0x02)
324#define BGFX_CAPS_FORMAT_TEXTURE_VERTEX   UINT8_C(0x04)
325
326///
327321#define BGFX_VIEW_NONE   UINT8_C(0x00)
328322#define BGFX_VIEW_STEREO UINT8_C(0x01)
329323
trunk/3rdparty/bgfx/src/bgfx.cpp
r244771r244772
902902      }
903903
904904      BX_TRACE("Supported texture formats:");
905      BX_TRACE("\t +------ x = supported / * = emulated");
906      BX_TRACE("\t |+----- vertex format");
907      BX_TRACE("\t ||  +-- name");
908905      for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
909906      {
910907         if (TextureFormat::Unknown != ii
911908         &&  TextureFormat::UnknownDepth != ii)
912909         {
913910            uint8_t flags = g_caps.formats[ii];
914            BX_TRACE("\t[%c%c] %s"
915               , flags&BGFX_CAPS_FORMAT_TEXTURE_COLOR  ? 'x' : flags&BGFX_CAPS_FORMAT_TEXTURE_EMULATED ? '*' : ' '
916               , flags&BGFX_CAPS_FORMAT_TEXTURE_VERTEX ? 'v' : ' '
911            BX_TRACE("\t[%c] %s"
912               , flags&1 ? 'x' : flags&2 ? '*' : ' '
917913               , getName(TextureFormat::Enum(ii) )
918914               );
919915            BX_UNUSED(flags);
r244771r244772
942938   {
943939      BX_CHECK(!m_rendererInitialized, "Already initialized?");
944940
945      m_exit   = false;
941      m_exit = false;
946942      m_frames = 0;
947943      m_render = &m_frame[0];
948944      m_submit = &m_frame[1];
949      m_debug = BGFX_DEBUG_NONE;
945      m_debug = BGFX_DEBUG_NONE;
950946
951947      m_submit->create();
952948      m_render->create();
r244771r244772
10061002
10071003      for (uint32_t ii = 0; ii < BX_COUNTOF(s_emulatedFormats); ++ii)
10081004      {
1009         if (0 == (g_caps.formats[s_emulatedFormats[ii] ] & BGFX_CAPS_FORMAT_TEXTURE_COLOR) )
1005         if (0 == g_caps.formats[s_emulatedFormats[ii] ])
10101006         {
1011            g_caps.formats[s_emulatedFormats[ii] ] |= BGFX_CAPS_FORMAT_TEXTURE_EMULATED;
1007            g_caps.formats[s_emulatedFormats[ii] ] = 2;
10121008         }
10131009      }
10141010
trunk/3rdparty/bgfx/src/bgfx_compute.sh
r244771r244772
5454
5555#define NUM_THREADS(_x, _y, _z) [numthreads(_x, _y, _z)]
5656
57#define __IMAGE_IMPL(_textureType, _storeComponents, _type, _loadComponents) \
58         _type imageLoad(Texture2D<_textureType> _image, ivec2 _uv) \
59         { \
60            return _image[_uv]._loadComponents; \
61         } \
62         \
63         void imageStore(RWTexture2D<_textureType> _image, ivec2 _uv, _type _value) \
64         { \
65            _image[_uv] = _value._storeComponents; \
66         }
57vec4 imageLoad(Texture2D _image, ivec2 _uv)
58{
59   return _image.Load(uint3(_uv.xy, 0) );
60}
6761
68__IMAGE_IMPL(float, x,    vec4,  xxxx)
69__IMAGE_IMPL(vec2,  xy,   vec4,  xyyy)
70__IMAGE_IMPL(vec3,  xyz,  vec4,  xyzz)
71__IMAGE_IMPL(vec4,  xyzw, vec4,  xyzw)
72__IMAGE_IMPL(uint,  x,    uvec4, xxxx)
73__IMAGE_IMPL(uvec2, xy,   uvec4, xyyy)
74__IMAGE_IMPL(uvec3, xyz,  uvec4, xyzz)
75__IMAGE_IMPL(uvec4, xyzw, uvec4, xyzw)
76__IMAGE_IMPL(int,   x,    ivec4, xxxx)
77__IMAGE_IMPL(ivec2, xy,   ivec4, xyyy)
78__IMAGE_IMPL(ivec3, xyz,  ivec4, xyzz)
79__IMAGE_IMPL(ivec4, xyzw, ivec4, xyzw)
62uint4 imageLoad(Texture2D<uint> _image, ivec2 _uv)
63{
64   uint rr = _image.Load(uint3(_uv.xy, 0) );
65   return uint4(rr, rr, rr, rr);
66}
8067
8168uint4 imageLoad(RWTexture2D<uint> _image, ivec2 _uv)
8269{
r244771r244772
10592   return result;
10693}
10794
95void imageStore(RWTexture2D<float4> _image, ivec2 _uv, vec4 _rgba)
96{
97   _image[_uv] = _rgba;
98}
99
100void imageStore(RWTexture2D<uint> _image, ivec2 _uv, uvec4 _r)
101{
102   _image[_uv] = _r.x;
103}
104
108105#define __ATOMIC_IMPL_TYPE(_genType, _glFunc, _dxFunc) \
109106         _genType _glFunc(_genType _mem, _genType _data) \
110107         { \
r244771r244772
156153#define __IMAGE2D_XX(_name, _reg, _access) \
157154         layout(rgba8, binding=_reg) _access uniform highp image2D _name
158155
159#define readwrite
160156#define IMAGE2D_RO(_name, _reg) __IMAGE2D_XX(_name, _reg, readonly)
161157#define IMAGE2D_RW(_name, _reg) __IMAGE2D_XX(_name, _reg, readwrite)
162158#define IMAGE2D_WR(_name, _reg) __IMAGE2D_XX(_name, _reg, writeonly)
trunk/3rdparty/bgfx/src/renderer_d3d11.cpp
r244771r244772
17861786
17871787      void commitTextureStage()
17881788      {
1789         m_deviceCtx->VSSetShaderResources(0, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, m_textureStage.m_srv);
1790         m_deviceCtx->VSSetSamplers(0, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, m_textureStage.m_sampler);
1791
17921789         m_deviceCtx->PSSetShaderResources(0, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, m_textureStage.m_srv);
17931790         m_deviceCtx->PSSetSamplers(0, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, m_textureStage.m_sampler);
17941791      }
r244771r244772
23722369      ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx;
23732370      BX_CHECK(m_dynamic, "Must be dynamic!");
23742371
2375#if 1
2376      BX_UNUSED(_discard);
2377      ID3D11Device* device = s_renderD3D11->m_device;
2378
2379      D3D11_BUFFER_DESC desc;
2380      desc.ByteWidth = _size;
2381      desc.Usage     = D3D11_USAGE_STAGING;
2382      desc.BindFlags = 0;
2383      desc.MiscFlags = 0;
2384      desc.CPUAccessFlags = D3D11_CPU_ACCESS_WRITE;
2385      desc.StructureByteStride = 0;
2386
2387      D3D11_SUBRESOURCE_DATA srd;
2388      srd.pSysMem     = _data;
2389      srd.SysMemPitch = 0;
2390      srd.SysMemSlicePitch = 0;
2391
2392      ID3D11Buffer* ptr;
2393      DX_CHECK(device->CreateBuffer(&desc, &srd, &ptr) );
2394
2395      D3D11_BOX box;
2396      box.left   = 0;
2397      box.top    = 0;
2398      box.front  = 0;
2399      box.right  = _size;
2400      box.bottom = 1;
2401      box.back   = 1;
2402
2403      deviceCtx->CopySubresourceRegion(m_ptr
2404         , 0
2405         , _offset
2406         , 0
2407         , 0
2408         , ptr
2409         , 0
2410         , &box
2411         );
2412
2413      DX_RELEASE(ptr, 0);
2414#else
24152372      D3D11_MAPPED_SUBRESOURCE mapped;
24162373      BX_UNUSED(_discard);
24172374      D3D11_MAP type = D3D11_MAP_WRITE_DISCARD;
24182375      DX_CHECK(deviceCtx->Map(m_ptr, 0, type, 0, &mapped));
2419      memcpy( (uint8_t*)mapped.pData + _offset, _data, _size);
2376      memcpy((uint8_t*)mapped.pData + _offset, _data, _size);
24202377      deviceCtx->Unmap(m_ptr, 0);
2421#endif // 0
24222378   }
24232379
24242380   void VertexBufferD3D11::create(uint32_t _size, void* _data, VertexDeclHandle _declHandle, uint8_t _flags)
trunk/3rdparty/bgfx/src/renderer_d3d9.cpp
r244771r244772
498498
499499            for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
500500            {
501               uint8_t support = SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter
501               g_caps.formats[ii] = SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter
502502                  , m_deviceType
503503                  , adapterFormat
504504                  , 0
505505                  , D3DRTYPE_TEXTURE
506506                  , s_textureFormat[ii].m_fmt
507                  ) ) ? BGFX_CAPS_FORMAT_TEXTURE_COLOR : BGFX_CAPS_FORMAT_TEXTURE_NONE;
508
509               support |= SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter
510                  , m_deviceType
511                  , adapterFormat
512                  , D3DUSAGE_QUERY_VERTEXTEXTURE
513                  , D3DRTYPE_TEXTURE
514                  , s_textureFormat[ii].m_fmt
515                  ) ) ? BGFX_CAPS_FORMAT_TEXTURE_VERTEX : BGFX_CAPS_FORMAT_TEXTURE_NONE;
516
517               g_caps.formats[ii] = support;
507                  ) ) ? 1 : 0;
518508            }
519509         }
520510
r244771r244772
12461236      {
12471237         for (uint32_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage)
12481238         {
1249            m_samplerFlags[stage][0] = UINT32_MAX;
1250            m_samplerFlags[stage][1] = UINT32_MAX;
1239            m_samplerFlags[stage] = UINT32_MAX;
12511240         }
12521241      }
12531242
1254      void setSamplerState(uint8_t _stage, uint32_t _flags, bool _vertex = false)
1243      void setSamplerState(uint8_t _stage, uint32_t _flags)
12551244      {
12561245         const uint32_t flags = _flags&( (~BGFX_TEXTURE_RESERVED_MASK) | BGFX_TEXTURE_SAMPLER_BITS_MASK);
1257         BX_CHECK(_stage < BX_COUNTOF(m_samplerFlags), "");
1258         if (m_samplerFlags[_stage][_vertex] != flags)
1246         if (m_samplerFlags[_stage] != flags)
12591247         {
1260            m_samplerFlags[_stage][_vertex] = flags;
1248            m_samplerFlags[_stage] = flags;
12611249            IDirect3DDevice9* device = m_device;
12621250            D3DTEXTUREADDRESS tau = s_textureAddress[(_flags&BGFX_TEXTURE_U_MASK)>>BGFX_TEXTURE_U_SHIFT];
12631251            D3DTEXTUREADDRESS tav = s_textureAddress[(_flags&BGFX_TEXTURE_V_MASK)>>BGFX_TEXTURE_V_SHIFT];
r244771r244772
12651253            D3DTEXTUREFILTERTYPE minFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MIN_MASK)>>BGFX_TEXTURE_MIN_SHIFT];
12661254            D3DTEXTUREFILTERTYPE magFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MAG_MASK)>>BGFX_TEXTURE_MAG_SHIFT];
12671255            D3DTEXTUREFILTERTYPE mipFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MIP_MASK)>>BGFX_TEXTURE_MIP_SHIFT];
1268
1269            DWORD stage = (_vertex ? D3DVERTEXTEXTURESAMPLER0 : 0) + _stage;
1270
1271            DX_CHECK(device->SetSamplerState(stage, D3DSAMP_ADDRESSU,  tau) );
1272            DX_CHECK(device->SetSamplerState(stage, D3DSAMP_ADDRESSV,  tav) );
1273            DX_CHECK(device->SetSamplerState(stage, D3DSAMP_ADDRESSW,  taw) );
1274            DX_CHECK(device->SetSamplerState(stage, D3DSAMP_MINFILTER, minFilter) );
1275            DX_CHECK(device->SetSamplerState(stage, D3DSAMP_MAGFILTER, magFilter) );
1276            DX_CHECK(device->SetSamplerState(stage, D3DSAMP_MIPFILTER, mipFilter) );
1277            DX_CHECK(device->SetSamplerState(stage, D3DSAMP_MAXANISOTROPY, m_maxAnisotropy) );
1256            DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_ADDRESSU,  tau) );
1257            DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_ADDRESSV,  tav) );
1258            DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_ADDRESSW,  taw) );
1259            DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_MINFILTER, minFilter) );
1260            DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_MAGFILTER, magFilter) );
1261            DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_MIPFILTER, mipFilter) );
1262            DX_CHECK(device->SetSamplerState(_stage, D3DSAMP_MAXANISOTROPY, m_maxAnisotropy) );
12781263         }
12791264      }
12801265
r244771r244772
17141699      UniformRegistry m_uniformReg;
17151700      void* m_uniforms[BGFX_CONFIG_MAX_UNIFORMS];
17161701
1717      uint32_t m_samplerFlags[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS][1];
1702      uint32_t m_samplerFlags[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS];
17181703
17191704      TextureD3D9* m_updateTexture;
17201705      uint8_t* m_updateTextureBits;
r244771r244772
25292514   {
25302515      s_renderD3D9->setSamplerState(_stage, 0 == (BGFX_SAMPLER_DEFAULT_FLAGS & _flags) ? _flags : m_flags);
25312516      DX_CHECK(s_renderD3D9->m_device->SetTexture(_stage, m_ptr) );
2532
2533//       s_renderD3D9->setSamplerState(_stage, 0 == (BGFX_SAMPLER_DEFAULT_FLAGS & _flags) ? _flags : m_flags, true);
2534//       DX_CHECK(s_renderD3D9->m_device->SetTexture(D3DVERTEXTEXTURESAMPLER0 + _stage, m_ptr) );
25352517   }
25362518
25372519   void TextureD3D9::resolve() const
trunk/3rdparty/bgfx/src/renderer_gl.cpp
r244771r244772
236236   };
237237   BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_textureFormat) );
238238
239   static GLenum s_rboFormat[] =
240   {
241      GL_ZERO,               // BC1
242      GL_ZERO,               // BC2
243      GL_ZERO,               // BC3
244      GL_ZERO,               // BC4
245      GL_ZERO,               // BC5
246      GL_ZERO,               // BC6H
247      GL_ZERO,               // BC7
248      GL_ZERO,               // ETC1
249      GL_ZERO,               // ETC2
250      GL_ZERO,               // ETC2A
251      GL_ZERO,               // ETC2A1
252      GL_ZERO,               // PTC12
253      GL_ZERO,               // PTC14
254      GL_ZERO,               // PTC12A
255      GL_ZERO,               // PTC14A
256      GL_ZERO,               // PTC22
257      GL_ZERO,               // PTC24
258      GL_ZERO,               // Unknown
259      GL_ZERO,               // R1
260      GL_R8,                 // R8
261      GL_R16,                // R16
262      GL_R16F,               // R16F
263      GL_R32UI,              // R32
264      GL_R32F,               // R32F
265      GL_RG8,                // RG8
266      GL_RG16,               // RG16
267      GL_RG16F,              // RG16F
268      GL_RG32UI,             // RG32
269      GL_RG32F,              // RG32F
270      GL_RGBA8,              // BGRA8
271      GL_RGBA16,             // RGBA16
272      GL_RGBA16F,            // RGBA16F
273      GL_RGBA32UI,           // RGBA32
274      GL_RGBA32F,            // RGBA32F
275      GL_RGB565,             // R5G6B5
276      GL_RGBA4,              // RGBA4
277      GL_RGB5_A1,            // RGB5A1
278      GL_RGB10_A2,           // RGB10A2
279      GL_R11F_G11F_B10F,     // R11G11B10F
280      GL_ZERO,               // UnknownDepth
281      GL_DEPTH_COMPONENT16,  // D16
282      GL_DEPTH_COMPONENT24,  // D24
283      GL_DEPTH24_STENCIL8,   // D24S8
284      GL_DEPTH_COMPONENT32,  // D32
285      GL_DEPTH_COMPONENT32F, // D16F
286      GL_DEPTH_COMPONENT32F, // D24F
287      GL_DEPTH_COMPONENT32F, // D32F
288      GL_STENCIL_INDEX8,     // D0S8
289   };
290   BX_STATIC_ASSERT(TextureFormat::Count == BX_COUNTOF(s_rboFormat) );
291
292239   static GLenum s_imageFormat[] =
293240   {
294241      GL_ZERO,           // BC1
r244771r244772
11681115         {
11691116            setTextureFormat(TextureFormat::D32, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT);
11701117
1171            if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES < 30) )
1118            if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) )
11721119            {
1120               setTextureFormat(TextureFormat::R16,    GL_R16UI,    GL_RED_INTEGER,  GL_UNSIGNED_SHORT);
1121               setTextureFormat(TextureFormat::RGBA16, GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT);
1122            }
1123            else
1124            {
11731125               setTextureFormat(TextureFormat::RGBA16F, GL_RGBA, GL_RGBA, GL_HALF_FLOAT);
11741126
11751127               if (BX_ENABLED(BX_PLATFORM_IOS) )
r244771r244772
11801132            }
11811133         }
11821134
1183         if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGL)
1184         ||  BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) )
1185         {
1186            setTextureFormat(TextureFormat::R16,    GL_R16UI,    GL_RED_INTEGER,  GL_UNSIGNED_SHORT);
1187            setTextureFormat(TextureFormat::RG16,   GL_RG16UI,   GL_RG_INTEGER,   GL_UNSIGNED_SHORT);
1188            setTextureFormat(TextureFormat::RGBA16, GL_RGBA16UI, GL_RGBA_INTEGER, GL_UNSIGNED_SHORT);
1189            setTextureFormat(TextureFormat::R32,    GL_R32UI,    GL_RED_INTEGER,  GL_UNSIGNED_INT);
1190            setTextureFormat(TextureFormat::RG32,   GL_RG32UI,   GL_RG_INTEGER,   GL_UNSIGNED_INT);
1191            setTextureFormat(TextureFormat::RGBA32, GL_RGBA32UI, GL_RGBA_INTEGER, GL_UNSIGNED_INT);
1192         }
1193
11941135         if (s_extension[Extension::EXT_texture_format_BGRA8888  ].m_supported
11951136         ||  s_extension[Extension::EXT_bgra                     ].m_supported
11961137         ||  s_extension[Extension::IMG_texture_format_BGRA8888  ].m_supported
r244771r244772
31993140            if (0 == msaaQuality)
32003141            {
32013142               GL_CHECK(glRenderbufferStorage(GL_RENDERBUFFER
3202                  , s_rboFormat[m_textureFormat]
3143                  , s_textureFormat[m_textureFormat].m_internalFmt
32033144                  , _width
32043145                  , _height
32053146                  ) );
r244771r244772
32083149            {
32093150               GL_CHECK(glRenderbufferStorageMultisample(GL_RENDERBUFFER
32103151                  , msaaQuality
3211                  , s_rboFormat[m_textureFormat]
3152                  , s_textureFormat[m_textureFormat].m_internalFmt
32123153                  , _width
32133154                  , _height
32143155                  ) );
trunk/3rdparty/bgfx/src/renderer_gl.h
r244771r244772
143143#   define GL_RG16 0x822C
144144#endif // GL_RG16
145145
146#ifndef GL_RG16UI
147#   define GL_RG16UI 0x823A
148#endif // GL_RG16UI
149
150146#ifndef GL_RG16F
151147#   define GL_RG16F 0x822F
152148#endif // GL_RG16F
r244771r244772
187183#   define GL_RG 0x8227
188184#endif // GL_RG
189185
190#ifndef GL_RG_INTEGER
191#   define GL_RG_INTEGER 0x8228
192#endif // GL_RG_INTEGER
193
194186#ifndef GL_GREEN
195187#   define GL_GREEN 0x1904
196188#endif // GL_GREEN
trunk/3rdparty/bx/3rdparty/CL/cl_platform.h
r244771r244772
9292            #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated))
9393            #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED   
9494        #endif
95    #elif defined(_WIN32)
95    #elif _WIN32
9696        #ifdef CL_USE_DEPRECATED_OPENCL_1_0_APIS
9797            #define CL_EXT_SUFFIX__VERSION_1_0_DEPRECATED   
9898            #define CL_EXT_PREFIX__VERSION_1_0_DEPRECATED   
trunk/3rdparty/bx/include/bx/uint32_t.h
r244771r244772
669669   inline uint64_t uint64_cnttz(uint64_t _val)
670670   {
671671#if BX_COMPILER_GCC || BX_COMPILER_CLANG
672      return __builtin_ctzl(_val);
672      return __builtin_ctz(_val);
673673#elif BX_COMPILER_MSVC && BX_PLATFORM_WINDOWS && BX_ARCH_64BIT
674674      unsigned long index;
675675      _BitScanForward64(&index, _val);
trunk/3rdparty/bx/tools/bin/darwin/genie
r244771r244772
Previous 199869 Revisions Next


© 1997-2024 The MAME Team