summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/src/renderer_d3d9.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/src/renderer_d3d9.cpp')
-rw-r--r--3rdparty/bgfx/src/renderer_d3d9.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/3rdparty/bgfx/src/renderer_d3d9.cpp b/3rdparty/bgfx/src/renderer_d3d9.cpp
index 81e53cecba1..be388785ada 100644
--- a/3rdparty/bgfx/src/renderer_d3d9.cpp
+++ b/3rdparty/bgfx/src/renderer_d3d9.cpp
@@ -1031,14 +1031,14 @@ namespace bgfx { namespace d3d9
bx::write(&writer, magic);
TextureCreate tc;
- tc.m_width = _width;
- tc.m_height = _height;
- tc.m_sides = 0;
- tc.m_depth = 0;
- tc.m_numMips = _numMips;
- tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
- tc.m_cubeMap = false;
- tc.m_mem = NULL;
+ tc.m_width = _width;
+ tc.m_height = _height;
+ tc.m_depth = 0;
+ tc.m_numLayers = 1;
+ tc.m_numMips = _numMips;
+ tc.m_format = TextureFormat::Enum(texture.m_requestedFormat);
+ tc.m_cubeMap = false;
+ tc.m_mem = NULL;
bx::write(&writer, tc);
texture.destroy(true);
@@ -1191,7 +1191,7 @@ namespace bgfx { namespace d3d9
uint32_t size = _size*sizeof(wchar_t);
wchar_t* name = (wchar_t*)alloca(size);
mbstowcs(name, _marker, size-2);
- PIX_SETMARKER(D3DCOLOR_RGBA(0xff, 0xff, 0xff, 0xff), name);
+ PIX_SETMARKER(D3DCOLOR_MARKER, name);
#endif // BGFX_CONFIG_DEBUG_PIX
BX_UNUSED(_marker, _size);
}
@@ -2393,23 +2393,23 @@ namespace bgfx { namespace d3d9
{
for (uint32_t ii = 0; ii < count; ++ii)
{
- uint8_t nameSize;
+ uint8_t nameSize = 0;
bx::read(&reader, nameSize);
- char name[256];
+ char name[256] = {};
bx::read(&reader, &name, nameSize);
name[nameSize] = '\0';
- uint8_t type;
+ uint8_t type = 0;
bx::read(&reader, type);
- uint8_t num;
+ uint8_t num = 0;
bx::read(&reader, num);
- uint16_t regIndex;
+ uint16_t regIndex = 0;
bx::read(&reader, regIndex);
- uint16_t regCount;
+ uint16_t regCount = 0;
bx::read(&reader, regCount);
const char* kind = "invalid";
@@ -3522,7 +3522,7 @@ namespace bgfx { namespace d3d9
{
IDirect3DDevice9* device = m_device;
- PIX_BEGINEVENT(D3DCOLOR_RGBA(0xff, 0x00, 0x00, 0xff), L"rendererSubmit");
+ PIX_BEGINEVENT(D3DCOLOR_FRAME, L"rendererSubmit");
updateResolution(_render->m_resolution);
@@ -3633,7 +3633,7 @@ namespace bgfx { namespace d3d9
currentState.m_stencil = newStencil;
PIX_ENDEVENT();
- PIX_BEGINEVENT(D3DCOLOR_RGBA(0xff, 0x00, 0x00, 0xff), s_viewNameW[key.m_view]);
+ PIX_BEGINEVENT(D3DCOLOR_VIEW, s_viewNameW[key.m_view]);
if (item > 0)
{
BGFX_PROFILER_END();
@@ -4224,7 +4224,7 @@ namespace bgfx { namespace d3d9
if (_render->m_debug & (BGFX_DEBUG_IFH|BGFX_DEBUG_STATS) )
{
- PIX_BEGINEVENT(D3DCOLOR_RGBA(0x40, 0x40, 0x40, 0xff), L"debugstats");
+ PIX_BEGINEVENT(D3DCOLOR_FRAME, L"debugstats");
TextVideoMem& tvm = m_textVideoMem;
@@ -4314,7 +4314,7 @@ namespace bgfx { namespace d3d9
}
else if (_render->m_debug & BGFX_DEBUG_TEXT)
{
- PIX_BEGINEVENT(D3DCOLOR_RGBA(0x40, 0x40, 0x40, 0xff), L"debugtext");
+ PIX_BEGINEVENT(D3DCOLOR_FRAME, L"debugtext");
blit(this, _textVideoMemBlitter, _render->m_textVideoMem);