Handle new sampler types.
TRAC #23472
Signed-off-by: Geoff Lang
Signed-off-by: Shannon Woods
Author: Nicolas Capens
diff --git a/src/libGLESv2/ProgramBinary.cpp b/src/libGLESv2/ProgramBinary.cpp
index 54766b9..f70e22d 100644
--- a/src/libGLESv2/ProgramBinary.cpp
+++ b/src/libGLESv2/ProgramBinary.cpp
@@ -21,6 +21,7 @@
#include "libGLESv2/Program.h"
#include "libGLESv2/renderer/Renderer.h"
#include "libGLESv2/renderer/VertexDataManager.h"
+#include "libGLESv2/Context.h"
#include "libGLESv2/Buffer.h"
#undef near
@@ -642,9 +643,7 @@
count = std::min(elementCount - (int)mUniformIndex[location].element, count);
- if (targetUniform->type == GL_INT ||
- targetUniform->type == GL_SAMPLER_2D ||
- targetUniform->type == GL_SAMPLER_CUBE)
+ if (targetUniform->type == GL_INT || IsSampler(targetUniform->type))
{
GLint *target = (GLint*)targetUniform->data + mUniformIndex[location].element * 4;
@@ -837,8 +836,7 @@
if (targetUniform->dirty)
{
- if (targetUniform->type == GL_SAMPLER_2D ||
- targetUniform->type == GL_SAMPLER_CUBE)
+ if (IsSampler(targetUniform->type))
{
int count = targetUniform->elementCount();
GLint (*v)[4] = (GLint(*)[4])targetUniform->data;
@@ -2308,8 +2306,7 @@
return true;
}
- if (constant.type == GL_SAMPLER_2D ||
- constant.type == GL_SAMPLER_CUBE)
+ if (IsSampler(constant.type))
{
unsigned int samplerIndex = constant.registerIndex;