Previous 199869 Revisions Next

r36262 Thursday 5th March, 2015 at 16:44:35 UTC by David Haywood
Merge pull request #147 from trap15/master

Add Daioh loctest and remove hacked Daioh set.
[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/regtests/jedutil]jedtest.py
[src/tools]unidasm.c

trunk/3rdparty/bgfx/examples/common/entry/entry_osx.mm
r244773r244774
1616#include <bx/os.h>
1717#include <bx/handlealloc.h>
1818
19#define DEFAULT_WIDTH 1280
20#define DEFAULT_HEIGHT 720
21
2219@interface AppDelegate : NSObject<NSApplicationDelegate>
2320{
2421   bool terminated;
r244773r244774
8077   struct Context
8178   {
8279      Context()
83         : m_exit(false)
80         : m_scroll(0)
81         , m_exit(false)
8482      {
8583         s_translateKey[27]             = Key::Esc;
8684         s_translateKey[13]             = Key::Return;
r244773r244774
106104
107105         for (char ch = 'a'; ch <= 'z'; ++ch)
108106         {
109            s_translateKey[uint8_t(ch)]             =
107            s_translateKey[uint8_t(ch)]       =
110108            s_translateKey[uint8_t(ch - ' ')] = Key::KeyA + (ch - 'a');
111109         }
112110      }
r244773r244774
236234               case NSMouseMoved:
237235               case NSLeftMouseDragged:
238236               case NSRightMouseDragged:
237               case NSOtherMouseDragged:
239238               {
240239                  int x, y;
241240                  getMousePos(&x, &y);
242                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, 0);
241                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll);
243242                  break;
244243               }
245244
r244773r244774
247246               {
248247                  int x, y;
249248                  getMousePos(&x, &y);
250                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, 0, MouseButton::Left, true);
249                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Left, true);
251250                  break;
252251               }
253252
r244773r244774
255254               {
256255                  int x, y;
257256                  getMousePos(&x, &y);
258                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, 0, MouseButton::Left, false);
257                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Left, false);
259258                  break;
260259               }
261260
r244773r244774
263262               {
264263                  int x, y;
265264                  getMousePos(&x, &y);
266                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, 0, MouseButton::Right, true);
265                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Right, true);
267266                  break;
268267               }
269268
r244773r244774
271270               {
272271                  int x, y;
273272                  getMousePos(&x, &y);
274                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, 0, MouseButton::Right, false);
273                  m_eventQueue.postMouseEvent(s_defaultWindow, x, y, m_scroll, MouseButton::Right, false);
275274                  break;
276275               }
277276
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
278302               case NSKeyDown:
279303               {
280304                  uint8_t modifiers = 0;
r244773r244774
364388         [NSApp setMainMenu:menubar];
365389
366390         m_windowAlloc.alloc();
367         NSRect rect = NSMakeRect(0, 0, DEFAULT_WIDTH, DEFAULT_HEIGHT);
391         NSRect rect = NSMakeRect(0, 0, ENTRY_DEFAULT_WIDTH, ENTRY_DEFAULT_HEIGHT);
368392         NSWindow* window = [[NSWindow alloc]
369393            initWithContentRect:rect
370394            styleMask:0
r244773r244774
419443      bx::HandleAllocT<ENTRY_CONFIG_MAX_WINDOWS> m_windowAlloc;
420444      NSWindow* m_window[ENTRY_CONFIG_MAX_WINDOWS];
421445
446      int32_t m_scroll;
422447      bool m_exit;
423448   };
424449
trunk/3rdparty/bgfx/examples/common/entry/entry_windows.cpp
r244773r244774
706706                  ScreenToClient(_hwnd, &pt);
707707                  int32_t mx = pt.x;
708708                  int32_t my = pt.y;
709                  m_mz += GET_WHEEL_DELTA_WPARAM(_wparam);
709                  m_mz += GET_WHEEL_DELTA_WPARAM(_wparam)/WHEEL_DELTA;
710710                  m_eventQueue.postMouseEvent(findHandle(_hwnd), mx, my, m_mz);
711711               }
712712               break;
trunk/3rdparty/bgfx/examples/common/entry/entry_x11.cpp
r244773r244774
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;
270274      }
271275
272276      int32_t run(int _argc, char** _argv)
r244773r244774
367371                  case ButtonRelease:
368372                     {
369373                        const XButtonEvent& xbutton = event.xbutton;
370                        MouseButton::Enum mb;
374                        MouseButton::Enum mb = MouseButton::None;
371375                        switch (xbutton.button)
372376                        {
373377                           case Button1: mb = MouseButton::Left;   break;
374378                           case Button2: mb = MouseButton::Middle; break;
375379                           case Button3: mb = MouseButton::Right;  break;
376                           default:      mb = MouseButton::None;   break;
380                           case Button4: ++m_mz; break;
381                           case Button5: --m_mz; break;
377382                        }
378383
384                        WindowHandle handle = findHandle(xbutton.window);
379385                        if (MouseButton::None != mb)
380386                        {
381                           WindowHandle handle = findHandle(xbutton.window);
382387                           m_eventQueue.postMouseEvent(handle
383388                              , xbutton.x
384389                              , xbutton.y
r244773r244774
387392                              , event.type == ButtonPress
388393                              );
389394                        }
395                        else
396                        {
397                           m_eventQueue.postMouseEvent(handle
398                                 , m_mx
399                                 , m_my
400                                 , m_mz
401                                 );
402                        }
390403                     }
391404                     break;
392405
r244773r244774
394407                     {
395408                        const XMotionEvent& xmotion = event.xmotion;
396409                        WindowHandle handle = findHandle(xmotion.window);
410
411                        m_mx = xmotion.x;
412                        m_my = xmotion.y;
413
397414                        m_eventQueue.postMouseEvent(handle
398                              , xmotion.x
399                              , xmotion.y
400                              , 0
415                              , m_mx
416                              , m_my
417                              , m_mz
401418                              );
402419                     }
403420                     break;
r244773r244774
543560      uint8_t m_modifiers;
544561      bool m_exit;
545562
563      int32_t m_mx;
564      int32_t m_my;
565      int32_t m_mz;
566
546567      EventQueue m_eventQueue;
547568      bx::LwMutex m_lock;
548569      bx::HandleAllocT<ENTRY_CONFIG_MAX_WINDOWS> m_windowAlloc;
trunk/3rdparty/bgfx/include/bgfx.c99.h
r244773r244774
293293
294294    /**
295295     *  Supported texture formats.
296     *    0 - not supported
297     *    1 - supported
298     *    2 - emulated
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
299300     */
300301    uint8_t formats[BGFX_TEXTURE_FORMAT_COUNT];
301302
trunk/3rdparty/bgfx/include/bgfx.h
r244773r244774
315315      uint8_t  maxFBAttachments; ///< Maximum frame buffer attachments.
316316
317317      /// Supported texture formats.
318      ///   - 0 - not supported
319      ///   - 1 - supported
320      ///   - 2 - emulated
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
321322      uint8_t formats[TextureFormat::Count];
322323   };
323324
trunk/3rdparty/bgfx/include/bgfxdefines.h
r244773r244774
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///
321327#define BGFX_VIEW_NONE   UINT8_C(0x00)
322328#define BGFX_VIEW_STEREO UINT8_C(0x01)
323329
trunk/3rdparty/bgfx/src/bgfx.cpp
r244773r244774
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");
905908      for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
906909      {
907910         if (TextureFormat::Unknown != ii
908911         &&  TextureFormat::UnknownDepth != ii)
909912         {
910913            uint8_t flags = g_caps.formats[ii];
911            BX_TRACE("\t[%c] %s"
912               , flags&1 ? 'x' : flags&2 ? '*' : ' '
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' : ' '
913917               , getName(TextureFormat::Enum(ii) )
914918               );
915919            BX_UNUSED(flags);
r244773r244774
938942   {
939943      BX_CHECK(!m_rendererInitialized, "Already initialized?");
940944
941      m_exit = false;
945      m_exit   = false;
942946      m_frames = 0;
943947      m_render = &m_frame[0];
944948      m_submit = &m_frame[1];
945      m_debug = BGFX_DEBUG_NONE;
949      m_debug = BGFX_DEBUG_NONE;
946950
947951      m_submit->create();
948952      m_render->create();
r244773r244774
10021006
10031007      for (uint32_t ii = 0; ii < BX_COUNTOF(s_emulatedFormats); ++ii)
10041008      {
1005         if (0 == g_caps.formats[s_emulatedFormats[ii] ])
1009         if (0 == (g_caps.formats[s_emulatedFormats[ii] ] & BGFX_CAPS_FORMAT_TEXTURE_COLOR) )
10061010         {
1007            g_caps.formats[s_emulatedFormats[ii] ] = 2;
1011            g_caps.formats[s_emulatedFormats[ii] ] |= BGFX_CAPS_FORMAT_TEXTURE_EMULATED;
10081012         }
10091013      }
10101014
trunk/3rdparty/bgfx/src/bgfx_compute.sh
r244773r244774
5454
5555#define NUM_THREADS(_x, _y, _z) [numthreads(_x, _y, _z)]
5656
57vec4 imageLoad(Texture2D _image, ivec2 _uv)
58{
59   return _image.Load(uint3(_uv.xy, 0) );
60}
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         }
6167
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}
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)
6780
6881uint4 imageLoad(RWTexture2D<uint> _image, ivec2 _uv)
6982{
r244773r244774
92105   return result;
93106}
94107
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
105108#define __ATOMIC_IMPL_TYPE(_genType, _glFunc, _dxFunc) \
106109         _genType _glFunc(_genType _mem, _genType _data) \
107110         { \
r244773r244774
153156#define __IMAGE2D_XX(_name, _reg, _access) \
154157         layout(rgba8, binding=_reg) _access uniform highp image2D _name
155158
159#define readwrite
156160#define IMAGE2D_RO(_name, _reg) __IMAGE2D_XX(_name, _reg, readonly)
157161#define IMAGE2D_RW(_name, _reg) __IMAGE2D_XX(_name, _reg, readwrite)
158162#define IMAGE2D_WR(_name, _reg) __IMAGE2D_XX(_name, _reg, writeonly)
trunk/3rdparty/bgfx/src/renderer_d3d11.cpp
r244773r244774
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
17891792         m_deviceCtx->PSSetShaderResources(0, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, m_textureStage.m_srv);
17901793         m_deviceCtx->PSSetSamplers(0, BGFX_CONFIG_MAX_TEXTURE_SAMPLERS, m_textureStage.m_sampler);
17911794      }
r244773r244774
23692372      ID3D11DeviceContext* deviceCtx = s_renderD3D11->m_deviceCtx;
23702373      BX_CHECK(m_dynamic, "Must be dynamic!");
23712374
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
23722415      D3D11_MAPPED_SUBRESOURCE mapped;
23732416      BX_UNUSED(_discard);
23742417      D3D11_MAP type = D3D11_MAP_WRITE_DISCARD;
23752418      DX_CHECK(deviceCtx->Map(m_ptr, 0, type, 0, &mapped));
2376      memcpy((uint8_t*)mapped.pData + _offset, _data, _size);
2419      memcpy( (uint8_t*)mapped.pData + _offset, _data, _size);
23772420      deviceCtx->Unmap(m_ptr, 0);
2421#endif // 0
23782422   }
23792423
23802424   void VertexBufferD3D11::create(uint32_t _size, void* _data, VertexDeclHandle _declHandle, uint8_t _flags)
trunk/3rdparty/bgfx/src/renderer_d3d9.cpp
r244773r244774
498498
499499            for (uint32_t ii = 0; ii < TextureFormat::Count; ++ii)
500500            {
501               g_caps.formats[ii] = SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter
501               uint8_t support = SUCCEEDED(m_d3d9->CheckDeviceFormat(m_adapter
502502                  , m_deviceType
503503                  , adapterFormat
504504                  , 0
505505                  , D3DRTYPE_TEXTURE
506506                  , s_textureFormat[ii].m_fmt
507                  ) ) ? 1 : 0;
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;
508518            }
509519         }
510520
r244773r244774
12361246      {
12371247         for (uint32_t stage = 0; stage < BGFX_CONFIG_MAX_TEXTURE_SAMPLERS; ++stage)
12381248         {
1239            m_samplerFlags[stage] = UINT32_MAX;
1249            m_samplerFlags[stage][0] = UINT32_MAX;
1250            m_samplerFlags[stage][1] = UINT32_MAX;
12401251         }
12411252      }
12421253
1243      void setSamplerState(uint8_t _stage, uint32_t _flags)
1254      void setSamplerState(uint8_t _stage, uint32_t _flags, bool _vertex = false)
12441255      {
12451256         const uint32_t flags = _flags&( (~BGFX_TEXTURE_RESERVED_MASK) | BGFX_TEXTURE_SAMPLER_BITS_MASK);
1246         if (m_samplerFlags[_stage] != flags)
1257         BX_CHECK(_stage < BX_COUNTOF(m_samplerFlags), "");
1258         if (m_samplerFlags[_stage][_vertex] != flags)
12471259         {
1248            m_samplerFlags[_stage] = flags;
1260            m_samplerFlags[_stage][_vertex] = flags;
12491261            IDirect3DDevice9* device = m_device;
12501262            D3DTEXTUREADDRESS tau = s_textureAddress[(_flags&BGFX_TEXTURE_U_MASK)>>BGFX_TEXTURE_U_SHIFT];
12511263            D3DTEXTUREADDRESS tav = s_textureAddress[(_flags&BGFX_TEXTURE_V_MASK)>>BGFX_TEXTURE_V_SHIFT];
r244773r244774
12531265            D3DTEXTUREFILTERTYPE minFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MIN_MASK)>>BGFX_TEXTURE_MIN_SHIFT];
12541266            D3DTEXTUREFILTERTYPE magFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MAG_MASK)>>BGFX_TEXTURE_MAG_SHIFT];
12551267            D3DTEXTUREFILTERTYPE mipFilter = s_textureFilter[(_flags&BGFX_TEXTURE_MIP_MASK)>>BGFX_TEXTURE_MIP_SHIFT];
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) );
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) );
12631278         }
12641279      }
12651280
r244773r244774
16991714      UniformRegistry m_uniformReg;
17001715      void* m_uniforms[BGFX_CONFIG_MAX_UNIFORMS];
17011716
1702      uint32_t m_samplerFlags[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS];
1717      uint32_t m_samplerFlags[BGFX_CONFIG_MAX_TEXTURE_SAMPLERS][1];
17031718
17041719      TextureD3D9* m_updateTexture;
17051720      uint8_t* m_updateTextureBits;
r244773r244774
25142529   {
25152530      s_renderD3D9->setSamplerState(_stage, 0 == (BGFX_SAMPLER_DEFAULT_FLAGS & _flags) ? _flags : m_flags);
25162531      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) );
25172535   }
25182536
25192537   void TextureD3D9::resolve() const
trunk/3rdparty/bgfx/src/renderer_gl.cpp
r244773r244774
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
239292   static GLenum s_imageFormat[] =
240293   {
241294      GL_ZERO,           // BC1
r244773r244774
11151168         {
11161169            setTextureFormat(TextureFormat::D32, GL_DEPTH_COMPONENT, GL_DEPTH_COMPONENT, GL_UNSIGNED_INT);
11171170
1118            if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 30) )
1171            if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES < 30) )
11191172            {
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            {
11251173               setTextureFormat(TextureFormat::RGBA16F, GL_RGBA, GL_RGBA, GL_HALF_FLOAT);
11261174
11271175               if (BX_ENABLED(BX_PLATFORM_IOS) )
r244773r244774
11321180            }
11331181         }
11341182
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
11351194         if (s_extension[Extension::EXT_texture_format_BGRA8888  ].m_supported
11361195         ||  s_extension[Extension::EXT_bgra                     ].m_supported
11371196         ||  s_extension[Extension::IMG_texture_format_BGRA8888  ].m_supported
r244773r244774
31403199            if (0 == msaaQuality)
31413200            {
31423201               GL_CHECK(glRenderbufferStorage(GL_RENDERBUFFER
3143                  , s_textureFormat[m_textureFormat].m_internalFmt
3202                  , s_rboFormat[m_textureFormat]
31443203                  , _width
31453204                  , _height
31463205                  ) );
r244773r244774
31493208            {
31503209               GL_CHECK(glRenderbufferStorageMultisample(GL_RENDERBUFFER
31513210                  , msaaQuality
3152                  , s_textureFormat[m_textureFormat].m_internalFmt
3211                  , s_rboFormat[m_textureFormat]
31533212                  , _width
31543213                  , _height
31553214                  ) );
trunk/3rdparty/bgfx/src/renderer_gl.h
r244773r244774
143143#   define GL_RG16 0x822C
144144#endif // GL_RG16
145145
146#ifndef GL_RG16UI
147#   define GL_RG16UI 0x823A
148#endif // GL_RG16UI
149
146150#ifndef GL_RG16F
147151#   define GL_RG16F 0x822F
148152#endif // GL_RG16F
r244773r244774
183187#   define GL_RG 0x8227
184188#endif // GL_RG
185189
190#ifndef GL_RG_INTEGER
191#   define GL_RG_INTEGER 0x8228
192#endif // GL_RG_INTEGER
193
186194#ifndef GL_GREEN
187195#   define GL_GREEN 0x1904
188196#endif // GL_GREEN
trunk/3rdparty/bx/3rdparty/CL/cl_platform.h
r244773r244774
9292            #define CL_EXT_SUFFIX__VERSION_1_1_DEPRECATED __attribute__((deprecated))
9393            #define CL_EXT_PREFIX__VERSION_1_1_DEPRECATED   
9494        #endif
95    #elif _WIN32
95    #elif defined(_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
r244773r244774
669669   inline uint64_t uint64_cnttz(uint64_t _val)
670670   {
671671#if BX_COMPILER_GCC || BX_COMPILER_CLANG
672      return __builtin_ctz(_val);
672      return __builtin_ctzl(_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
r244773r244774
Previous 199869 Revisions Next


© 1997-2024 The MAME Team