VS: Fixing L4 warnings.
This commit is contained in:
Родитель
37cb5f3b1f
Коммит
46ec8d3ca4
|
@ -120,7 +120,7 @@ void setOffsets4x4Lum(bgfx::UniformHandle _handle, uint32_t _width, uint32_t _he
|
|||
float du = 1.0f/_width;
|
||||
float dv = 1.0f/_height;
|
||||
|
||||
uint32_t num = 0;
|
||||
uint16_t num = 0;
|
||||
for (uint32_t yy = 0; yy < 4; ++yy)
|
||||
{
|
||||
for (uint32_t xx = 0; xx < 4; ++xx)
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
-- License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
|
||||
--
|
||||
|
||||
group "tools/shaderc"
|
||||
|
||||
local GLSL_OPTIMIZER = path.join(BGFX_DIR, "3rdparty/glsl-optimizer")
|
||||
local FCPP_DIR = path.join(BGFX_DIR, "3rdparty/fcpp")
|
||||
|
||||
|
@ -276,3 +278,5 @@ project "shaderc"
|
|||
configuration {}
|
||||
|
||||
strip()
|
||||
|
||||
group "tools"
|
||||
|
|
|
@ -579,7 +579,7 @@ namespace bgfx
|
|||
static void fppOutput(int _ch, void* _userData)
|
||||
{
|
||||
Preprocessor* thisClass = (Preprocessor*)_userData;
|
||||
thisClass->m_preprocessed += _ch;
|
||||
thisClass->m_preprocessed += char(_ch);
|
||||
}
|
||||
|
||||
static void fppError(void* /*_userData*/, char* _format, va_list _vargs)
|
||||
|
@ -992,7 +992,7 @@ namespace bgfx
|
|||
|
||||
preprocessor.setDefine("M_PI=3.1415926535897932384626433832795");
|
||||
|
||||
char shaderType = tolower(type[0]);
|
||||
char shaderType = bx::toLower(type[0]);
|
||||
switch (shaderType)
|
||||
{
|
||||
case 'c':
|
||||
|
|
|
@ -214,8 +214,8 @@ namespace bgfx { namespace glsl
|
|||
bx::strlcpy(uniformName, name, array-name+1);
|
||||
|
||||
char arraySize[32];
|
||||
const char* end = bx::strnstr(array, "]", eol-array);
|
||||
bx::strlcpy(arraySize, array+1, end-array);
|
||||
const char* arrayEnd = bx::strnstr(array, "]", eol-array);
|
||||
bx::strlcpy(arraySize, array+1, arrayEnd-array);
|
||||
num = uint8_t(atoi(arraySize) );
|
||||
}
|
||||
else
|
||||
|
@ -251,7 +251,7 @@ namespace bgfx { namespace glsl
|
|||
uint8_t nameSize = (uint8_t)un.name.size();
|
||||
bx::write(_writer, nameSize);
|
||||
bx::write(_writer, un.name.c_str(), nameSize);
|
||||
uint8_t uniformType = un.type;
|
||||
uint8_t uniformType = uint8_t(un.type);
|
||||
bx::write(_writer, uniformType);
|
||||
bx::write(_writer, un.num);
|
||||
bx::write(_writer, un.regIndex);
|
||||
|
|
|
@ -421,7 +421,7 @@ namespace bgfx { namespace hlsl
|
|||
, spd.Register
|
||||
);
|
||||
|
||||
const RemapInputSemantic& ris = findInputSemantic(spd.SemanticName, spd.SemanticIndex);
|
||||
const RemapInputSemantic& ris = findInputSemantic(spd.SemanticName, uint8_t(spd.SemanticIndex) );
|
||||
if (ris.m_attr != bgfx::Attrib::Count)
|
||||
{
|
||||
_attrs[_numAttrs] = bgfx::attribToId(ris.m_attr);
|
||||
|
@ -475,8 +475,8 @@ namespace bgfx { namespace hlsl
|
|||
Uniform un;
|
||||
un.name = varDesc.Name;
|
||||
un.type = uniformType;
|
||||
un.num = constDesc.Elements;
|
||||
un.regIndex = varDesc.StartOffset;
|
||||
un.num = uint8_t(constDesc.Elements);
|
||||
un.regIndex = uint16_t(varDesc.StartOffset);
|
||||
un.regCount = BX_ALIGN_16(varDesc.Size) / 16;
|
||||
_uniforms.push_back(un);
|
||||
|
||||
|
@ -527,8 +527,8 @@ namespace bgfx { namespace hlsl
|
|||
un.name.assign(bindDesc.Name, (end - bindDesc.Name) );
|
||||
un.type = UniformType::Enum(BGFX_UNIFORM_SAMPLERBIT | UniformType::Int1);
|
||||
un.num = 1;
|
||||
un.regIndex = bindDesc.BindPoint;
|
||||
un.regCount = bindDesc.BindCount;
|
||||
un.regIndex = uint16_t(bindDesc.BindPoint);
|
||||
un.regCount = uint16_t(bindDesc.BindCount);
|
||||
_uniforms.push_back(un);
|
||||
}
|
||||
}
|
||||
|
@ -714,7 +714,7 @@ namespace bgfx { namespace hlsl
|
|||
uint8_t nameSize = (uint8_t)un.name.size();
|
||||
bx::write(_writer, nameSize);
|
||||
bx::write(_writer, un.name.c_str(), nameSize);
|
||||
uint8_t type = un.type | fragmentBit;
|
||||
uint8_t type = uint8_t(un.type | fragmentBit);
|
||||
bx::write(_writer, type);
|
||||
bx::write(_writer, un.num);
|
||||
bx::write(_writer, un.regIndex);
|
||||
|
|
|
@ -673,14 +673,14 @@ namespace bgfx { namespace spirv
|
|||
un.type = UniformType::End;
|
||||
break;
|
||||
}
|
||||
un.num = program->getUniformArraySize(ii);
|
||||
un.num = uint8_t(program->getUniformArraySize(ii) );
|
||||
un.regIndex = 0;
|
||||
un.regCount = un.num;
|
||||
|
||||
uint8_t nameSize = (uint8_t)un.name.size();
|
||||
bx::write(_writer, nameSize);
|
||||
bx::write(_writer, un.name.c_str(), nameSize);
|
||||
uint8_t type = un.type | fragmentBit;
|
||||
uint8_t type = uint8_t(un.type | fragmentBit);
|
||||
bx::write(_writer, type);
|
||||
bx::write(_writer, un.num);
|
||||
bx::write(_writer, un.regIndex);
|
||||
|
|
|
@ -759,8 +759,8 @@ int _main_(int _argc, char** _argv)
|
|||
| (mouseState.m_buttons[entry::MouseButton::Right ] ? IMGUI_MBUT_RIGHT : 0)
|
||||
| (mouseState.m_buttons[entry::MouseButton::Middle] ? IMGUI_MBUT_MIDDLE : 0)
|
||||
, mouseState.m_mz
|
||||
, width
|
||||
, height
|
||||
, uint16_t(width)
|
||||
, uint16_t(height)
|
||||
);
|
||||
|
||||
static bool help = false;
|
||||
|
@ -878,7 +878,7 @@ int _main_(int _argc, char** _argv)
|
|||
float ortho[16];
|
||||
bx::mtxOrtho(ortho, 0.0f, (float)width, (float)height, 0.0f, 0.0f, 1000.0f);
|
||||
bgfx::setViewTransform(0, NULL, ortho);
|
||||
bgfx::setViewRect(0, 0, 0, width, height);
|
||||
bgfx::setViewRect(0, 0, 0, uint16_t(width), uint16_t(height) );
|
||||
bgfx::touch(0);
|
||||
|
||||
bgfx::dbgTextClear();
|
||||
|
|
Загрузка…
Ссылка в новой задаче