Commit ab9b3650 by Ping-Hao Wu Committed by Nicolas Capens

Add missing external texture type to the sampler uniforms.

Change-Id: I6954c992401bca495df3808603fba1bb5ecb8a60 Reviewed-on: https://swiftshader-review.googlesource.com/2740Reviewed-by: 's avatarNicolas Capens <capn@google.com> Tested-by: 's avatarNicolas Capens <capn@google.com>
parent 51eede9c
......@@ -1328,17 +1328,16 @@ namespace es2
if(index < MAX_VERTEX_TEXTURE_IMAGE_UNITS)
{
samplersVS[index].active = true;
switch(type) {
case GL_SAMPLER_CUBE:
samplersVS[index].textureType = TEXTURE_CUBE;
break;
case GL_SAMPLER_3D_OES:
samplersVS[index].textureType = TEXTURE_3D;
break;
default:
samplersVS[index].textureType = TEXTURE_2D;
break;
switch(type)
{
default: UNREACHABLE();
case GL_SAMPLER_2D: samplersVS[index].textureType = TEXTURE_2D; break;
case GL_SAMPLER_CUBE: samplersVS[index].textureType = TEXTURE_CUBE; break;
case GL_SAMPLER_3D_OES: samplersVS[index].textureType = TEXTURE_3D; break;
case GL_SAMPLER_EXTERNAL_OES: samplersVS[index].textureType = TEXTURE_EXTERNAL; break;
}
samplersVS[index].logicalTextureUnit = 0;
}
else
......@@ -1352,17 +1351,16 @@ namespace es2
if(index < MAX_TEXTURE_IMAGE_UNITS)
{
samplersPS[index].active = true;
switch(type) {
case GL_SAMPLER_CUBE:
samplersPS[index].textureType = TEXTURE_CUBE;
break;
case GL_SAMPLER_3D_OES:
samplersPS[index].textureType = TEXTURE_3D;
break;
default:
samplersPS[index].textureType = TEXTURE_2D;
break;
switch(type)
{
default: UNREACHABLE();
case GL_SAMPLER_2D: samplersPS[index].textureType = TEXTURE_2D; break;
case GL_SAMPLER_CUBE: samplersPS[index].textureType = TEXTURE_CUBE; break;
case GL_SAMPLER_3D_OES: samplersPS[index].textureType = TEXTURE_3D; break;
case GL_SAMPLER_EXTERNAL_OES: samplersPS[index].textureType = TEXTURE_EXTERNAL; break;
}
samplersPS[index].logicalTextureUnit = 0;
}
else
......
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