summaryrefslogtreecommitdiff
path: root/indra/llrender/llglslshader.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llrender/llglslshader.cpp')
-rw-r--r--indra/llrender/llglslshader.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/indra/llrender/llglslshader.cpp b/indra/llrender/llglslshader.cpp
index 880b491253..439cf46684 100644
--- a/indra/llrender/llglslshader.cpp
+++ b/indra/llrender/llglslshader.cpp
@@ -190,7 +190,7 @@ void LLGLSLShader::dumpStats()
tris_sec /= seconds;
F32 pct_samples = (F32)((F64)mSamplesDrawn / (F64)sTotalSamplesDrawn) * 100.f;
- F32 samples_sec = (F32)mSamplesDrawn / 1000000000.0;
+ F32 samples_sec = (F32)(mSamplesDrawn / 1000000000.0);
samples_sec /= seconds;
F32 pct_binds = (F32)mBinds / (F32)sTotalBinds * 100.f;
@@ -1304,7 +1304,7 @@ void LLGLSLShader::uniform1i(U32 index, GLint x)
if (iter == mValue.end() || iter->second.mV[0] != x)
{
glUniform1i(mUniform[index], x);
- mValue[mUniform[index]] = LLVector4(x, 0.f, 0.f, 0.f);
+ mValue[mUniform[index]] = LLVector4((F32)x, 0.f, 0.f, 0.f);
}
}
}
@@ -1444,7 +1444,7 @@ void LLGLSLShader::uniform1iv(U32 index, U32 count, const GLint* v)
if (mUniform[index] >= 0)
{
const auto& iter = mValue.find(mUniform[index]);
- LLVector4 vec(v[0], 0.f, 0.f, 0.f);
+ LLVector4 vec((F32)v[0], 0.f, 0.f, 0.f);
if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
{
glUniform1iv(mUniform[index], count, v);
@@ -1471,7 +1471,7 @@ void LLGLSLShader::uniform4iv(U32 index, U32 count, const GLint* v)
if (mUniform[index] >= 0)
{
const auto& iter = mValue.find(mUniform[index]);
- LLVector4 vec(v[0], v[1], v[2], v[3]);
+ LLVector4 vec((F32)v[0], (F32)v[1], (F32)v[2], (F32)v[3]);
if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
{
glUniform1iv(mUniform[index], count, v);
@@ -1741,7 +1741,7 @@ void LLGLSLShader::uniform1i(const LLStaticHashedString& uniform, GLint v)
if (location >= 0)
{
const auto& iter = mValue.find(location);
- LLVector4 vec(v, 0.f, 0.f, 0.f);
+ LLVector4 vec((F32)v, 0.f, 0.f, 0.f);
if (iter == mValue.end() || shouldChange(iter->second, vec))
{
glUniform1i(location, v);
@@ -1757,7 +1757,7 @@ void LLGLSLShader::uniform1iv(const LLStaticHashedString& uniform, U32 count, co
if (location >= 0)
{
- LLVector4 vec(v[0], 0, 0, 0);
+ LLVector4 vec((F32)v[0], 0.f, 0.f, 0.f);
const auto& iter = mValue.find(location);
if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
{
@@ -1775,7 +1775,7 @@ void LLGLSLShader::uniform4iv(const LLStaticHashedString& uniform, U32 count, co
if (location >= 0)
{
- LLVector4 vec(v[0], v[1], v[2], v[3]);
+ LLVector4 vec((F32)v[0], (F32)v[1], (F32)v[2], (F32)v[3]);
const auto& iter = mValue.find(location);
if (iter == mValue.end() || shouldChange(iter->second, vec) || count != 1)
{
@@ -1794,7 +1794,7 @@ void LLGLSLShader::uniform2i(const LLStaticHashedString& uniform, GLint i, GLint
if (location >= 0)
{
const auto& iter = mValue.find(location);
- LLVector4 vec(i, j, 0.f, 0.f);
+ LLVector4 vec((F32)i, (F32)j, 0.f, 0.f);
if (iter == mValue.end() || shouldChange(iter->second, vec))
{
glUniform2i(location, i, j);