|
@@ -1059,7 +1059,7 @@ namespace bgfx { namespace gl
|
|
|
while (pos < end)
|
|
while (pos < end)
|
|
|
{
|
|
{
|
|
|
uint32_t len;
|
|
uint32_t len;
|
|
|
- const char* space = bx::strFind(pos, INT32_MAX, ' ');
|
|
|
|
|
|
|
+ const char* space = bx::strFind(pos, ' ');
|
|
|
if (NULL != space)
|
|
if (NULL != space)
|
|
|
{
|
|
{
|
|
|
len = bx::uint32_min(sizeof(name), (uint32_t)(space - pos) );
|
|
len = bx::uint32_min(sizeof(name), (uint32_t)(space - pos) );
|
|
@@ -1862,7 +1862,7 @@ namespace bgfx { namespace gl
|
|
|
|
|
|
|
|
if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 31)
|
|
if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES >= 31)
|
|
|
&& 0 == bx::strCmp(m_vendor, "Imagination Technologies")
|
|
&& 0 == bx::strCmp(m_vendor, "Imagination Technologies")
|
|
|
- && NULL != bx::strFind(m_version, INT32_MAX, "(SDK 3.5@3510720)") )
|
|
|
|
|
|
|
+ && NULL != bx::strFind(m_version, "(SDK 3.5@3510720)") )
|
|
|
{
|
|
{
|
|
|
// Skip initializing extensions that are broken in emulator.
|
|
// Skip initializing extensions that are broken in emulator.
|
|
|
s_extension[Extension::ARB_program_interface_query ].m_initialize =
|
|
s_extension[Extension::ARB_program_interface_query ].m_initialize =
|
|
@@ -1871,7 +1871,7 @@ namespace bgfx { namespace gl
|
|
|
|
|
|
|
|
if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES)
|
|
if (BX_ENABLED(BGFX_CONFIG_RENDERER_OPENGLES)
|
|
|
&& 0 == bx::strCmp(m_vendor, "Imagination Technologies")
|
|
&& 0 == bx::strCmp(m_vendor, "Imagination Technologies")
|
|
|
- && NULL != bx::strFind(m_version, INT32_MAX, "1.8@905891") )
|
|
|
|
|
|
|
+ && NULL != bx::strFind(m_version, "1.8@905891") )
|
|
|
{
|
|
{
|
|
|
m_workaround.m_detachShader = false;
|
|
m_workaround.m_detachShader = false;
|
|
|
}
|
|
}
|
|
@@ -1889,7 +1889,7 @@ namespace bgfx { namespace gl
|
|
|
while (pos < end)
|
|
while (pos < end)
|
|
|
{
|
|
{
|
|
|
uint32_t len;
|
|
uint32_t len;
|
|
|
- const char* space = bx::strFind(pos, INT32_MAX, ' ');
|
|
|
|
|
|
|
+ const char* space = bx::strFind(pos, ' ');
|
|
|
if (NULL != space)
|
|
if (NULL != space)
|
|
|
{
|
|
{
|
|
|
len = bx::uint32_min(sizeof(name), (uint32_t)(space - pos) );
|
|
len = bx::uint32_min(sizeof(name), (uint32_t)(space - pos) );
|
|
@@ -4587,13 +4587,13 @@ namespace bgfx { namespace gl
|
|
|
num = bx::uint32_max(num, 1);
|
|
num = bx::uint32_max(num, 1);
|
|
|
|
|
|
|
|
int offset = 0;
|
|
int offset = 0;
|
|
|
- char* array = const_cast<char*>(bx::strFind(name, INT32_MAX, '[') );
|
|
|
|
|
|
|
+ char* array = const_cast<char*>(bx::strFind(name, '[') );
|
|
|
if (NULL != array)
|
|
if (NULL != array)
|
|
|
{
|
|
{
|
|
|
BX_TRACE("--- %s", name);
|
|
BX_TRACE("--- %s", name);
|
|
|
*array = '\0';
|
|
*array = '\0';
|
|
|
array++;
|
|
array++;
|
|
|
- char* end = const_cast<char*>(bx::strFind(array, INT32_MAX, ']') );
|
|
|
|
|
|
|
+ char* end = const_cast<char*>(bx::strFind(array, ']') );
|
|
|
if (NULL != end)
|
|
if (NULL != end)
|
|
|
{ // Some devices (Amazon Fire) might not return terminating brace.
|
|
{ // Some devices (Amazon Fire) might not return terminating brace.
|
|
|
*end = '\0';
|
|
*end = '\0';
|
|
@@ -5754,10 +5754,10 @@ namespace bgfx { namespace gl
|
|
|
|
|
|
|
|
if (insertFragDepth)
|
|
if (insertFragDepth)
|
|
|
{
|
|
{
|
|
|
- const char* entry = bx::strFind(temp, INT32_MAX, "void main ()");
|
|
|
|
|
|
|
+ const char* entry = bx::strFind(temp, "void main ()");
|
|
|
if (NULL != entry)
|
|
if (NULL != entry)
|
|
|
{
|
|
{
|
|
|
- char* brace = const_cast<char*>(bx::strFind(entry, INT32_MAX, "{") );
|
|
|
|
|
|
|
+ char* brace = const_cast<char*>(bx::strFind(entry, "{") );
|
|
|
if (NULL != brace)
|
|
if (NULL != brace)
|
|
|
{
|
|
{
|
|
|
const char* end = bx::strmb(brace, '{', '}');
|
|
const char* end = bx::strmb(brace, '{', '}');
|
|
@@ -5885,7 +5885,7 @@ namespace bgfx { namespace gl
|
|
|
{
|
|
{
|
|
|
char tmpFragData[16];
|
|
char tmpFragData[16];
|
|
|
bx::snprintf(tmpFragData, BX_COUNTOF(tmpFragData), "gl_FragData[%d]", ii);
|
|
bx::snprintf(tmpFragData, BX_COUNTOF(tmpFragData), "gl_FragData[%d]", ii);
|
|
|
- fragData = bx::uint32_max(fragData, NULL == bx::strFind(code, INT32_MAX, tmpFragData) ? 0 : ii+1);
|
|
|
|
|
|
|
+ fragData = bx::uint32_max(fragData, NULL == bx::strFind(code, tmpFragData) ? 0 : ii+1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
BGFX_FATAL(0 != fragData, Fatal::InvalidShader, "Unable to find and patch gl_FragData!");
|
|
BGFX_FATAL(0 != fragData, Fatal::InvalidShader, "Unable to find and patch gl_FragData!");
|
|
@@ -5978,7 +5978,7 @@ namespace bgfx { namespace gl
|
|
|
{
|
|
{
|
|
|
char tmpFragData[16];
|
|
char tmpFragData[16];
|
|
|
bx::snprintf(tmpFragData, BX_COUNTOF(tmpFragData), "gl_FragData[%d]", ii);
|
|
bx::snprintf(tmpFragData, BX_COUNTOF(tmpFragData), "gl_FragData[%d]", ii);
|
|
|
- fragData = bx::uint32_max(fragData, NULL == bx::strFind(code, INT32_MAX, tmpFragData) ? 0 : ii+1);
|
|
|
|
|
|
|
+ fragData = bx::uint32_max(fragData, NULL == bx::strFind(code, tmpFragData) ? 0 : ii+1);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
BGFX_FATAL(0 != fragData, Fatal::InvalidShader, "Unable to find and patch gl_FragData!");
|
|
BGFX_FATAL(0 != fragData, Fatal::InvalidShader, "Unable to find and patch gl_FragData!");
|