From 493c964423d2d5ba62f6ac1c6557e6abad5008b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 6 Oct 2014 19:21:08 -0700 Subject: [PATCH] Cleanup. --- scripts/bgfx.lua | 1 + scripts/genie.lua | 1 - src/renderer_d3d11.cpp | 5 ++--- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/scripts/bgfx.lua b/scripts/bgfx.lua index b008ab8a..6b6e8bba 100644 --- a/scripts/bgfx.lua +++ b/scripts/bgfx.lua @@ -43,6 +43,7 @@ function bgfxProject(_name, _kind, _defines) configuration { "windows" } links { "gdi32", + "psapi", } configuration { "xcode4 or osx or ios*" } diff --git a/scripts/genie.lua b/scripts/genie.lua index 01ca6342..07cd1d0c 100644 --- a/scripts/genie.lua +++ b/scripts/genie.lua @@ -77,7 +77,6 @@ function exampleProject(_name) } links { -- this is needed only for testing with GLES2/3 on Windows with VS2008 "DelayImp", - "psapi", } configuration { "vs201*" } diff --git a/src/renderer_d3d11.cpp b/src/renderer_d3d11.cpp index 1515cf00..92a56ff5 100644 --- a/src/renderer_d3d11.cpp +++ b/src/renderer_d3d11.cpp @@ -1426,7 +1426,7 @@ RENDERDOC_IMPORT { curr = &vertexElements[jj]; if (0 == strcmp(curr->SemanticName, "TEXCOORD") - && curr->SemanticIndex == index) + && curr->SemanticIndex == index) { break; } @@ -2287,8 +2287,7 @@ RENDERDOC_IMPORT else if (BGFX_CHUNK_MAGIC_VSH == magic) { m_hash = bx::hashMurmur2A(code, shaderSize); - m_code = alloc(shaderSize); - memcpy(m_code->data, code, shaderSize); + m_code = copy(code, shaderSize); DX_CHECK(s_renderD3D11->m_device->CreateVertexShader(code, shaderSize, NULL, &m_vertexShader) ); BGFX_FATAL(NULL != m_ptr, bgfx::Fatal::InvalidShader, "Failed to create vertex shader.");