Retrieve the texture serial from the incomplete texture when sampler-incomplete.

TRAC #23127 Signed-off-by: Geoff Lang Signed-off-by: Jamie Madill Author: Nicolas Capens git-svn-id: https://angleproject.googlecode.com/svn/trunk@2209 736b8ea6-26fd-11df-bfd4-992fa37f6226
parent 0c3f31cb
#define MAJOR_VERSION 1
#define MINOR_VERSION 0
#define BUILD_VERSION 0
#define BUILD_REVISION 2208
#define BUILD_REVISION 2209
#define STRINGIFY(x) #x
#define MACRO_STRINGIFY(x) STRINGIFY(x)
......
//
// Copyright (c) 2002-2012 The ANGLE Project Authors. All rights reserved.
// Copyright (c) 2002-2013 The ANGLE Project Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
......@@ -2436,14 +2436,18 @@ void Context::applyTextures(SamplerType type)
TextureType textureType = programBinary->getSamplerTextureType(type, samplerIndex);
Texture *texture = getSamplerTexture(textureUnit, textureType);
if (!texture->isSamplerComplete())
{
texture = getIncompleteTexture(textureType);
}
unsigned int texSerial = texture->getTextureSerial();
if (appliedTextureSerial[samplerIndex] != texSerial || texture->hasDirtyParameters() || texture->hasDirtyImages())
{
IDirect3DBaseTexture9 *d3dTexture = texture->getTexture();
if (d3dTexture)
{
if (appliedTextureSerial[samplerIndex] != texSerial || texture->hasDirtyParameters())
{
GLenum wrapS = texture->getWrapS();
......@@ -2472,11 +2476,6 @@ void Context::applyTextures(SamplerType type)
{
mDevice->SetTexture(d3dSampler, d3dTexture);
}
}
else
{
mDevice->SetTexture(d3dSampler, getIncompleteTexture(textureType)->getTexture());
}
appliedTextureSerial[samplerIndex] = texSerial;
texture->resetDirty();
......
......@@ -1535,11 +1535,6 @@ bool Texture::subImageCompressed(GLint xoffset, GLint yoffset, GLsizei width, GL
IDirect3DBaseTexture9 *Texture::getTexture()
{
if (!isSamplerComplete())
{
return NULL;
}
// ensure the underlying texture is created
if (getStorage(false) == NULL)
{
......
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