Commit 2ec386bb by Geoff Lang

Rename IsSampler to IsSamplerType.

BUG=angle:733 Change-Id: I62aece16c11aefdbf13c0b5faf83040fdb8555e6 Reviewed-on: https://chromium-review.googlesource.com/232960Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org> Tested-by: 's avatarGeoff Lang <geofflang@chromium.org>
parent 59723541
...@@ -254,7 +254,7 @@ int VariableColumnCount(GLenum type) ...@@ -254,7 +254,7 @@ int VariableColumnCount(GLenum type)
return 0; return 0;
} }
bool IsSampler(GLenum type) bool IsSamplerType(GLenum type)
{ {
switch (type) switch (type)
{ {
......
...@@ -24,7 +24,7 @@ size_t VariableExternalSize(GLenum type); ...@@ -24,7 +24,7 @@ size_t VariableExternalSize(GLenum type);
GLenum VariableBoolVectorType(GLenum type); GLenum VariableBoolVectorType(GLenum type);
int VariableRowCount(GLenum type); int VariableRowCount(GLenum type);
int VariableColumnCount(GLenum type); int VariableColumnCount(GLenum type);
bool IsSampler(GLenum type); bool IsSamplerType(GLenum type);
bool IsMatrixType(GLenum type); bool IsMatrixType(GLenum type);
GLenum TransposeMatrixType(GLenum type); GLenum TransposeMatrixType(GLenum type);
int VariableRegisterCount(GLenum type); int VariableRegisterCount(GLenum type);
......
...@@ -105,7 +105,7 @@ unsigned int UniformHLSL::declareUniformAndAssignRegister(const TType &type, con ...@@ -105,7 +105,7 @@ unsigned int UniformHLSL::declareUniformAndAssignRegister(const TType &type, con
unsigned int registerCount = HLSLVariableRegisterCount(*uniform, mOutputType); unsigned int registerCount = HLSLVariableRegisterCount(*uniform, mOutputType);
if (gl::IsSampler(uniform->type)) if (gl::IsSamplerType(uniform->type))
{ {
mSamplerRegister += registerCount; mSamplerRegister += registerCount;
} }
......
...@@ -77,7 +77,7 @@ size_t LinkedUniform::dataSize() const ...@@ -77,7 +77,7 @@ size_t LinkedUniform::dataSize() const
bool LinkedUniform::isSampler() const bool LinkedUniform::isSampler() const
{ {
return IsSampler(type); return IsSamplerType(type);
} }
UniformBlock::UniformBlock(const std::string &name, unsigned int elementIndex, unsigned int dataSize) UniformBlock::UniformBlock(const std::string &name, unsigned int elementIndex, unsigned int dataSize)
......
...@@ -277,7 +277,7 @@ void ProgramD3D::updateSamplerMapping() ...@@ -277,7 +277,7 @@ void ProgramD3D::updateSamplerMapping()
if (targetUniform->dirty) if (targetUniform->dirty)
{ {
if (gl::IsSampler(targetUniform->type)) if (gl::IsSamplerType(targetUniform->type))
{ {
int count = targetUniform->elementCount(); int count = targetUniform->elementCount();
GLint (*v)[4] = reinterpret_cast<GLint(*)[4]>(targetUniform->data); GLint (*v)[4] = reinterpret_cast<GLint(*)[4]>(targetUniform->data);
...@@ -1052,7 +1052,7 @@ void ProgramD3D::initializeUniformStorage() ...@@ -1052,7 +1052,7 @@ void ProgramD3D::initializeUniformStorage()
{ {
const gl::LinkedUniform &uniform = *mUniforms[uniformIndex]; const gl::LinkedUniform &uniform = *mUniforms[uniformIndex];
if (!gl::IsSampler(uniform.type)) if (!gl::IsSamplerType(uniform.type))
{ {
if (uniform.isReferencedByVertexShader()) if (uniform.isReferencedByVertexShader())
{ {
...@@ -1498,7 +1498,7 @@ void ProgramD3D::setUniform(GLint location, GLsizei count, const T* v, GLenum ta ...@@ -1498,7 +1498,7 @@ void ProgramD3D::setUniform(GLint location, GLsizei count, const T* v, GLenum ta
} }
} }
} }
else if (gl::IsSampler(targetUniform->type)) else if (gl::IsSamplerType(targetUniform->type))
{ {
ASSERT(targetUniformType == GL_INT); ASSERT(targetUniformType == GL_INT);
...@@ -1834,7 +1834,7 @@ bool ProgramD3D::assignSamplers(unsigned int startSamplerIndex, ...@@ -1834,7 +1834,7 @@ bool ProgramD3D::assignSamplers(unsigned int startSamplerIndex,
bool ProgramD3D::indexSamplerUniform(const gl::LinkedUniform &uniform, gl::InfoLog &infoLog, const gl::Caps &caps) bool ProgramD3D::indexSamplerUniform(const gl::LinkedUniform &uniform, gl::InfoLog &infoLog, const gl::Caps &caps)
{ {
ASSERT(gl::IsSampler(uniform.type)); ASSERT(gl::IsSamplerType(uniform.type));
ASSERT(uniform.vsRegisterIndex != GL_INVALID_INDEX || uniform.psRegisterIndex != GL_INVALID_INDEX); ASSERT(uniform.vsRegisterIndex != GL_INVALID_INDEX || uniform.psRegisterIndex != GL_INVALID_INDEX);
if (uniform.vsRegisterIndex != GL_INVALID_INDEX) if (uniform.vsRegisterIndex != GL_INVALID_INDEX)
...@@ -1884,7 +1884,7 @@ bool ProgramD3D::indexUniforms(gl::InfoLog &infoLog, const gl::Caps &caps) ...@@ -1884,7 +1884,7 @@ bool ProgramD3D::indexUniforms(gl::InfoLog &infoLog, const gl::Caps &caps)
{ {
const gl::LinkedUniform &uniform = *mUniforms[uniformIndex]; const gl::LinkedUniform &uniform = *mUniforms[uniformIndex];
if (gl::IsSampler(uniform.type)) if (gl::IsSamplerType(uniform.type))
{ {
if (!indexSamplerUniform(uniform, infoLog, caps)) if (!indexSamplerUniform(uniform, infoLog, caps))
{ {
......
...@@ -1107,7 +1107,7 @@ bool ValidateUniform(gl::Context *context, GLenum uniformType, GLint location, G ...@@ -1107,7 +1107,7 @@ bool ValidateUniform(gl::Context *context, GLenum uniformType, GLint location, G
} }
GLenum targetBoolType = VariableBoolVectorType(uniformType); GLenum targetBoolType = VariableBoolVectorType(uniformType);
bool samplerUniformCheck = (IsSampler(uniform->type) && uniformType == GL_INT); bool samplerUniformCheck = (IsSamplerType(uniform->type) && uniformType == GL_INT);
if (!samplerUniformCheck && uniformType != uniform->type && targetBoolType != uniform->type) if (!samplerUniformCheck && uniformType != uniform->type && targetBoolType != uniform->type)
{ {
context->recordError(Error(GL_INVALID_OPERATION)); context->recordError(Error(GL_INVALID_OPERATION));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment