Commit c4d04467 by Alexis Hetu Committed by Alexis Hétu

Sending magnification filter info to the sampler

Currently, the magnification filter information is ignored by SwiftShader. In order to fix it, the 1st step is simply to make the sampler aware of this information. After this, a subsequent cl using the duvdxy computed in computeLod will choose which filter to use (if they are different). Change-Id: Idc8636c3d981c944815094f23e443725bed4cf27 Reviewed-on: https://swiftshader-review.googlesource.com/4382Tested-by: 's avatarAlexis Hétu <sugoi@google.com> Reviewed-by: 's avatarNicolas Capens <capn@google.com>
parent d9a2e7bf
...@@ -2096,21 +2096,15 @@ void Context::applyTextures(sw::SamplerType samplerType) ...@@ -2096,21 +2096,15 @@ void Context::applyTextures(sw::SamplerType samplerType)
{ {
GLenum wrapS = texture->getWrapS(); GLenum wrapS = texture->getWrapS();
GLenum wrapT = texture->getWrapT(); GLenum wrapT = texture->getWrapT();
GLenum texFilter = texture->getMinFilter(); GLenum minFilter = texture->getMinFilter();
GLenum magFilter = texture->getMagFilter(); GLenum magFilter = texture->getMagFilter();
GLfloat maxAnisotropy = texture->getMaxAnisotropy(); GLfloat maxAnisotropy = texture->getMaxAnisotropy();
device->setAddressingModeU(samplerType, samplerIndex, es2sw::ConvertTextureWrap(wrapS)); device->setAddressingModeU(samplerType, samplerIndex, es2sw::ConvertTextureWrap(wrapS));
device->setAddressingModeV(samplerType, samplerIndex, es2sw::ConvertTextureWrap(wrapT)); device->setAddressingModeV(samplerType, samplerIndex, es2sw::ConvertTextureWrap(wrapT));
sw::FilterType minFilter; device->setTextureFilter(samplerType, samplerIndex, es2sw::ConvertTextureFilter(minFilter, magFilter, maxAnisotropy));
sw::MipmapType mipFilter; device->setMipmapFilter(samplerType, samplerIndex, es2sw::ConvertMipMapFilter(minFilter));
es2sw::ConvertMinFilter(texFilter, &minFilter, &mipFilter, maxAnisotropy);
// ASSERT(minFilter == es2sw::ConvertMagFilter(magFilter));
device->setTextureFilter(samplerType, samplerIndex, minFilter);
// device->setTextureFilter(samplerType, samplerIndex, es2sw::ConvertMagFilter(magFilter));
device->setMipmapFilter(samplerType, samplerIndex, mipFilter);
device->setMaxAnisotropy(samplerType, samplerIndex, maxAnisotropy); device->setMaxAnisotropy(samplerType, samplerIndex, maxAnisotropy);
applyTexture(samplerType, samplerIndex, texture); applyTexture(samplerType, samplerIndex, texture);
......
...@@ -591,55 +591,56 @@ namespace es2sw ...@@ -591,55 +591,56 @@ namespace es2sw
(alpha ? 0x00000008 : 0); (alpha ? 0x00000008 : 0);
} }
sw::FilterType ConvertMagFilter(GLenum magFilter) sw::MipmapType ConvertMipMapFilter(GLenum minFilter)
{ {
switch(magFilter) switch(minFilter)
{
case GL_NEAREST: return sw::FILTER_POINT;
case GL_LINEAR: return sw::FILTER_LINEAR;
default: UNREACHABLE(magFilter);
}
return sw::FILTER_POINT;
}
void ConvertMinFilter(GLenum texFilter, sw::FilterType *minFilter, sw::MipmapType *mipFilter, float maxAnisotropy)
{
switch(texFilter)
{ {
case GL_NEAREST: case GL_NEAREST:
*minFilter = sw::FILTER_POINT;
*mipFilter = sw::MIPMAP_NONE;
break;
case GL_LINEAR: case GL_LINEAR:
*minFilter = sw::FILTER_LINEAR; return sw::MIPMAP_NONE;
*mipFilter = sw::MIPMAP_NONE;
break; break;
case GL_NEAREST_MIPMAP_NEAREST: case GL_NEAREST_MIPMAP_NEAREST:
*minFilter = sw::FILTER_POINT;
*mipFilter = sw::MIPMAP_POINT;
break;
case GL_LINEAR_MIPMAP_NEAREST: case GL_LINEAR_MIPMAP_NEAREST:
*minFilter = sw::FILTER_LINEAR; return sw::MIPMAP_POINT;
*mipFilter = sw::MIPMAP_POINT;
break; break;
case GL_NEAREST_MIPMAP_LINEAR: case GL_NEAREST_MIPMAP_LINEAR:
*minFilter = sw::FILTER_POINT;
*mipFilter = sw::MIPMAP_LINEAR;
break;
case GL_LINEAR_MIPMAP_LINEAR: case GL_LINEAR_MIPMAP_LINEAR:
*minFilter = sw::FILTER_LINEAR; return sw::MIPMAP_LINEAR;
*mipFilter = sw::MIPMAP_LINEAR;
break; break;
default: default:
*minFilter = sw::FILTER_POINT; UNREACHABLE(minFilter);
*mipFilter = sw::MIPMAP_NONE; return sw::MIPMAP_NONE;
UNREACHABLE(texFilter);
} }
}
sw::FilterType ConvertTextureFilter(GLenum minFilter, GLenum magFilter, float maxAnisotropy)
{
if(maxAnisotropy > 1.0f) if(maxAnisotropy > 1.0f)
{ {
*minFilter = sw::FILTER_ANISOTROPIC; return sw::FILTER_ANISOTROPIC;
}
sw::FilterType magFilterType = sw::FILTER_POINT;
switch(magFilter)
{
case GL_NEAREST: magFilterType = sw::FILTER_POINT; break;
case GL_LINEAR: magFilterType = sw::FILTER_LINEAR; break;
default: UNREACHABLE(magFilter);
}
switch(minFilter)
{
case GL_NEAREST:
case GL_NEAREST_MIPMAP_NEAREST:
case GL_NEAREST_MIPMAP_LINEAR:
return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_POINT : sw::FILTER_MIN_POINT_MAG_LINEAR;
case GL_LINEAR:
case GL_LINEAR_MIPMAP_NEAREST:
case GL_LINEAR_MIPMAP_LINEAR:
return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_MIN_LINEAR_MAG_POINT : sw::FILTER_LINEAR;
default:
UNREACHABLE(minFilter);
return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_POINT : sw::FILTER_MIN_POINT_MAG_LINEAR;
} }
} }
......
...@@ -66,8 +66,8 @@ namespace es2sw ...@@ -66,8 +66,8 @@ namespace es2sw
sw::AddressingMode ConvertTextureWrap(GLenum wrap); sw::AddressingMode ConvertTextureWrap(GLenum wrap);
sw::CullMode ConvertCullMode(GLenum cullFace, GLenum frontFace); sw::CullMode ConvertCullMode(GLenum cullFace, GLenum frontFace);
unsigned int ConvertColorMask(bool red, bool green, bool blue, bool alpha); unsigned int ConvertColorMask(bool red, bool green, bool blue, bool alpha);
sw::FilterType ConvertMagFilter(GLenum magFilter); sw::MipmapType ConvertMipMapFilter(GLenum minFilter);
void ConvertMinFilter(GLenum texFilter, sw::FilterType *minFilter, sw::MipmapType *mipFilter, float maxAnisotropy); sw::FilterType ConvertTextureFilter(GLenum minFilter, GLenum magFilter, float maxAnisotropy);
bool ConvertPrimitiveType(GLenum primitiveType, GLsizei elementCount, gl::PrimitiveType &swPrimitiveType, int &primitiveCount); bool ConvertPrimitiveType(GLenum primitiveType, GLsizei elementCount, gl::PrimitiveType &swPrimitiveType, int &primitiveCount);
sw::Format ConvertRenderbufferFormat(GLenum format); sw::Format ConvertRenderbufferFormat(GLenum format);
} }
......
...@@ -2063,21 +2063,15 @@ void Context::applyTextures() ...@@ -2063,21 +2063,15 @@ void Context::applyTextures()
GLenum wrapS = texture->getWrapS(); GLenum wrapS = texture->getWrapS();
GLenum wrapT = texture->getWrapT(); GLenum wrapT = texture->getWrapT();
GLenum texFilter = texture->getMinFilter(); GLenum minFilter = texture->getMinFilter();
GLenum magFilter = texture->getMagFilter(); GLenum magFilter = texture->getMagFilter();
GLfloat maxAnisotropy = texture->getMaxAnisotropy(); GLfloat maxAnisotropy = texture->getMaxAnisotropy();
device->setAddressingModeU(sw::SAMPLER_PIXEL, unit, es2sw::ConvertTextureWrap(wrapS)); device->setAddressingModeU(sw::SAMPLER_PIXEL, unit, es2sw::ConvertTextureWrap(wrapS));
device->setAddressingModeV(sw::SAMPLER_PIXEL, unit, es2sw::ConvertTextureWrap(wrapT)); device->setAddressingModeV(sw::SAMPLER_PIXEL, unit, es2sw::ConvertTextureWrap(wrapT));
sw::FilterType minFilter; device->setTextureFilter(sw::SAMPLER_PIXEL, unit, es2sw::ConvertTextureFilter(minFilter, magFilter, maxAnisotropy));
sw::MipmapType mipFilter; device->setMipmapFilter(sw::SAMPLER_PIXEL, unit, es2sw::ConvertMipMapFilter(minFilter));
es2sw::ConvertMinFilter(texFilter, &minFilter, &mipFilter, maxAnisotropy);
// ASSERT(minFilter == es2sw::ConvertMagFilter(magFilter));
device->setTextureFilter(sw::SAMPLER_PIXEL, unit, minFilter);
// device->setTextureFilter(sw::SAMPLER_PIXEL, unit, es2sw::ConvertMagFilter(magFilter));
device->setMipmapFilter(sw::SAMPLER_PIXEL, unit, mipFilter);
device->setMaxAnisotropy(sw::SAMPLER_PIXEL, unit, maxAnisotropy); device->setMaxAnisotropy(sw::SAMPLER_PIXEL, unit, maxAnisotropy);
applyTexture(unit, texture); applyTexture(unit, texture);
......
...@@ -381,55 +381,56 @@ namespace es2sw ...@@ -381,55 +381,56 @@ namespace es2sw
(alpha ? 0x00000008 : 0); (alpha ? 0x00000008 : 0);
} }
sw::FilterType ConvertMagFilter(GLenum magFilter) sw::MipmapType ConvertMipMapFilter(GLenum minFilter)
{ {
switch(magFilter) switch(minFilter)
{
case GL_NEAREST: return sw::FILTER_POINT;
case GL_LINEAR: return sw::FILTER_LINEAR;
default: UNREACHABLE(magFilter);
}
return sw::FILTER_POINT;
}
void ConvertMinFilter(GLenum texFilter, sw::FilterType *minFilter, sw::MipmapType *mipFilter, float maxAnisotropy)
{
switch(texFilter)
{ {
case GL_NEAREST: case GL_NEAREST:
*minFilter = sw::FILTER_POINT;
*mipFilter = sw::MIPMAP_NONE;
break;
case GL_LINEAR: case GL_LINEAR:
*minFilter = sw::FILTER_LINEAR; return sw::MIPMAP_NONE;
*mipFilter = sw::MIPMAP_NONE;
break; break;
case GL_NEAREST_MIPMAP_NEAREST: case GL_NEAREST_MIPMAP_NEAREST:
*minFilter = sw::FILTER_POINT;
*mipFilter = sw::MIPMAP_POINT;
break;
case GL_LINEAR_MIPMAP_NEAREST: case GL_LINEAR_MIPMAP_NEAREST:
*minFilter = sw::FILTER_LINEAR; return sw::MIPMAP_POINT;
*mipFilter = sw::MIPMAP_POINT;
break; break;
case GL_NEAREST_MIPMAP_LINEAR: case GL_NEAREST_MIPMAP_LINEAR:
*minFilter = sw::FILTER_POINT;
*mipFilter = sw::MIPMAP_LINEAR;
break;
case GL_LINEAR_MIPMAP_LINEAR: case GL_LINEAR_MIPMAP_LINEAR:
*minFilter = sw::FILTER_LINEAR; return sw::MIPMAP_LINEAR;
*mipFilter = sw::MIPMAP_LINEAR;
break; break;
default: default:
*minFilter = sw::FILTER_POINT; UNREACHABLE(minFilter);
*mipFilter = sw::MIPMAP_NONE; return sw::MIPMAP_NONE;
UNREACHABLE(texFilter);
} }
}
sw::FilterType ConvertTextureFilter(GLenum minFilter, GLenum magFilter, float maxAnisotropy)
{
if(maxAnisotropy > 1.0f) if(maxAnisotropy > 1.0f)
{ {
*minFilter = sw::FILTER_ANISOTROPIC; return sw::FILTER_ANISOTROPIC;
}
sw::FilterType magFilterType = sw::FILTER_POINT;
switch(magFilter)
{
case GL_NEAREST: magFilterType = sw::FILTER_POINT; break;
case GL_LINEAR: magFilterType = sw::FILTER_LINEAR; break;
default: UNREACHABLE(magFilter);
}
switch(minFilter)
{
case GL_NEAREST:
case GL_NEAREST_MIPMAP_NEAREST:
case GL_NEAREST_MIPMAP_LINEAR:
return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_POINT : sw::FILTER_MIN_POINT_MAG_LINEAR;
case GL_LINEAR:
case GL_LINEAR_MIPMAP_NEAREST:
case GL_LINEAR_MIPMAP_LINEAR:
return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_MIN_LINEAR_MAG_POINT : sw::FILTER_LINEAR;
default:
UNREACHABLE(minFilter);
return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_POINT : sw::FILTER_MIN_POINT_MAG_LINEAR;
} }
} }
......
...@@ -57,9 +57,9 @@ namespace es2sw ...@@ -57,9 +57,9 @@ namespace es2sw
sw::AddressingMode ConvertTextureWrap(GLenum wrap); sw::AddressingMode ConvertTextureWrap(GLenum wrap);
sw::CullMode ConvertCullMode(GLenum cullFace, GLenum frontFace); sw::CullMode ConvertCullMode(GLenum cullFace, GLenum frontFace);
unsigned int ConvertColorMask(bool red, bool green, bool blue, bool alpha); unsigned int ConvertColorMask(bool red, bool green, bool blue, bool alpha);
sw::FilterType ConvertMagFilter(GLenum magFilter); sw::MipmapType ConvertMipMapFilter(GLenum minFilter);
void ConvertMinFilter(GLenum texFilter, sw::FilterType *minFilter, sw::MipmapType *mipFilter, float maxAnisotropy); sw::FilterType ConvertTextureFilter(GLenum minFilter, GLenum magFilter, float maxAnisotropy);
bool ConvertPrimitiveType(GLenum primitiveType, GLsizei elementCount, es1::PrimitiveType &swPrimitiveType, int &primitiveCount); bool ConvertPrimitiveType(GLenum primitiveType, GLsizei elementCount, es1::PrimitiveType &swPrimitiveType, int &primitiveCount);
sw::Format ConvertRenderbufferFormat(GLenum format); sw::Format ConvertRenderbufferFormat(GLenum format);
sw::TextureStage::StageOperation ConvertCombineOperation(GLenum operation); sw::TextureStage::StageOperation ConvertCombineOperation(GLenum operation);
sw::TextureStage::SourceArgument ConvertSourceArgument(GLenum argument); sw::TextureStage::SourceArgument ConvertSourceArgument(GLenum argument);
......
...@@ -3078,7 +3078,7 @@ void Context::applyTextures(sw::SamplerType samplerType) ...@@ -3078,7 +3078,7 @@ void Context::applyTextures(sw::SamplerType samplerType)
if(texture->isSamplerComplete()) if(texture->isSamplerComplete())
{ {
GLenum wrapS, wrapT, wrapR, texFilter, magFilter; GLenum wrapS, wrapT, wrapR, minFilter, magFilter;
Sampler *samplerObject = mState.sampler[textureUnit]; Sampler *samplerObject = mState.sampler[textureUnit];
if(samplerObject) if(samplerObject)
...@@ -3086,7 +3086,7 @@ void Context::applyTextures(sw::SamplerType samplerType) ...@@ -3086,7 +3086,7 @@ void Context::applyTextures(sw::SamplerType samplerType)
wrapS = samplerObject->getWrapS(); wrapS = samplerObject->getWrapS();
wrapT = samplerObject->getWrapT(); wrapT = samplerObject->getWrapT();
wrapR = samplerObject->getWrapR(); wrapR = samplerObject->getWrapR();
texFilter = samplerObject->getMinFilter(); minFilter = samplerObject->getMinFilter();
magFilter = samplerObject->getMagFilter(); magFilter = samplerObject->getMagFilter();
} }
else else
...@@ -3094,7 +3094,7 @@ void Context::applyTextures(sw::SamplerType samplerType) ...@@ -3094,7 +3094,7 @@ void Context::applyTextures(sw::SamplerType samplerType)
wrapS = texture->getWrapS(); wrapS = texture->getWrapS();
wrapT = texture->getWrapT(); wrapT = texture->getWrapT();
wrapR = texture->getWrapR(); wrapR = texture->getWrapR();
texFilter = texture->getMinFilter(); minFilter = texture->getMinFilter();
magFilter = texture->getMagFilter(); magFilter = texture->getMagFilter();
} }
GLfloat maxAnisotropy = texture->getMaxAnisotropy(); GLfloat maxAnisotropy = texture->getMaxAnisotropy();
...@@ -3112,15 +3112,9 @@ void Context::applyTextures(sw::SamplerType samplerType) ...@@ -3112,15 +3112,9 @@ void Context::applyTextures(sw::SamplerType samplerType)
device->setSwizzleB(samplerType, samplerIndex, es2sw::ConvertSwizzleType(swizzleB)); device->setSwizzleB(samplerType, samplerIndex, es2sw::ConvertSwizzleType(swizzleB));
device->setSwizzleA(samplerType, samplerIndex, es2sw::ConvertSwizzleType(swizzleA)); device->setSwizzleA(samplerType, samplerIndex, es2sw::ConvertSwizzleType(swizzleA));
sw::FilterType minFilter; device->setTextureFilter(samplerType, samplerIndex, es2sw::ConvertTextureFilter(minFilter, magFilter, maxAnisotropy));
sw::MipmapType mipFilter; device->setMipmapFilter(samplerType, samplerIndex, es2sw::ConvertMipMapFilter(minFilter));
es2sw::ConvertMinFilter(texFilter, &minFilter, &mipFilter, maxAnisotropy); device->setMaxAnisotropy(samplerType, samplerIndex, maxAnisotropy);
// ASSERT(minFilter == es2sw::ConvertMagFilter(magFilter));
device->setTextureFilter(samplerType, samplerIndex, minFilter);
// device->setTextureFilter(samplerType, samplerIndex, es2sw::ConvertMagFilter(magFilter));
device->setMipmapFilter(samplerType, samplerIndex, mipFilter);
device->setMaxAnisotropy(samplerType, samplerIndex, maxAnisotropy);
applyTexture(samplerType, samplerIndex, texture); applyTexture(samplerType, samplerIndex, texture);
} }
......
...@@ -1181,55 +1181,56 @@ namespace es2sw ...@@ -1181,55 +1181,56 @@ namespace es2sw
(alpha ? 0x00000008 : 0); (alpha ? 0x00000008 : 0);
} }
sw::FilterType ConvertMagFilter(GLenum magFilter) sw::MipmapType ConvertMipMapFilter(GLenum minFilter)
{ {
switch(magFilter) switch(minFilter)
{
case GL_NEAREST: return sw::FILTER_POINT;
case GL_LINEAR: return sw::FILTER_LINEAR;
default: UNREACHABLE(magFilter);
}
return sw::FILTER_POINT;
}
void ConvertMinFilter(GLenum texFilter, sw::FilterType *minFilter, sw::MipmapType *mipFilter, float maxAnisotropy)
{
switch(texFilter)
{ {
case GL_NEAREST: case GL_NEAREST:
*minFilter = sw::FILTER_POINT;
*mipFilter = sw::MIPMAP_NONE;
break;
case GL_LINEAR: case GL_LINEAR:
*minFilter = sw::FILTER_LINEAR; return sw::MIPMAP_NONE;
*mipFilter = sw::MIPMAP_NONE;
break; break;
case GL_NEAREST_MIPMAP_NEAREST: case GL_NEAREST_MIPMAP_NEAREST:
*minFilter = sw::FILTER_POINT;
*mipFilter = sw::MIPMAP_POINT;
break;
case GL_LINEAR_MIPMAP_NEAREST: case GL_LINEAR_MIPMAP_NEAREST:
*minFilter = sw::FILTER_LINEAR; return sw::MIPMAP_POINT;
*mipFilter = sw::MIPMAP_POINT;
break; break;
case GL_NEAREST_MIPMAP_LINEAR: case GL_NEAREST_MIPMAP_LINEAR:
*minFilter = sw::FILTER_POINT;
*mipFilter = sw::MIPMAP_LINEAR;
break;
case GL_LINEAR_MIPMAP_LINEAR: case GL_LINEAR_MIPMAP_LINEAR:
*minFilter = sw::FILTER_LINEAR; return sw::MIPMAP_LINEAR;
*mipFilter = sw::MIPMAP_LINEAR;
break; break;
default: default:
*minFilter = sw::FILTER_POINT; UNREACHABLE(minFilter);
*mipFilter = sw::MIPMAP_NONE; return sw::MIPMAP_NONE;
UNREACHABLE(texFilter);
} }
}
sw::FilterType ConvertTextureFilter(GLenum minFilter, GLenum magFilter, float maxAnisotropy)
{
if(maxAnisotropy > 1.0f) if(maxAnisotropy > 1.0f)
{ {
*minFilter = sw::FILTER_ANISOTROPIC; return sw::FILTER_ANISOTROPIC;
}
sw::FilterType magFilterType = sw::FILTER_POINT;
switch(magFilter)
{
case GL_NEAREST: magFilterType = sw::FILTER_POINT; break;
case GL_LINEAR: magFilterType = sw::FILTER_LINEAR; break;
default: UNREACHABLE(magFilter);
}
switch(minFilter)
{
case GL_NEAREST:
case GL_NEAREST_MIPMAP_NEAREST:
case GL_NEAREST_MIPMAP_LINEAR:
return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_POINT : sw::FILTER_MIN_POINT_MAG_LINEAR;
case GL_LINEAR:
case GL_LINEAR_MIPMAP_NEAREST:
case GL_LINEAR_MIPMAP_LINEAR:
return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_MIN_LINEAR_MAG_POINT : sw::FILTER_LINEAR;
default:
UNREACHABLE(minFilter);
return (magFilterType == sw::FILTER_POINT) ? sw::FILTER_POINT : sw::FILTER_MIN_POINT_MAG_LINEAR;
} }
} }
......
...@@ -75,8 +75,8 @@ namespace es2sw ...@@ -75,8 +75,8 @@ namespace es2sw
sw::SwizzleType ConvertSwizzleType(GLenum swizzleType); sw::SwizzleType ConvertSwizzleType(GLenum swizzleType);
sw::CullMode ConvertCullMode(GLenum cullFace, GLenum frontFace); sw::CullMode ConvertCullMode(GLenum cullFace, GLenum frontFace);
unsigned int ConvertColorMask(bool red, bool green, bool blue, bool alpha); unsigned int ConvertColorMask(bool red, bool green, bool blue, bool alpha);
sw::FilterType ConvertMagFilter(GLenum magFilter); sw::MipmapType ConvertMipMapFilter(GLenum minFilter);
void ConvertMinFilter(GLenum texFilter, sw::FilterType *minFilter, sw::MipmapType *mipFilter, float maxAnisotropy); sw::FilterType ConvertTextureFilter(GLenum minFilter, GLenum magFilter, float maxAnisotropy);
bool ConvertPrimitiveType(GLenum primitiveType, GLsizei elementCount, es2::PrimitiveType &swPrimitiveType, int &primitiveCount); bool ConvertPrimitiveType(GLenum primitiveType, GLsizei elementCount, es2::PrimitiveType &swPrimitiveType, int &primitiveCount);
sw::Format ConvertRenderbufferFormat(GLenum format); sw::Format ConvertRenderbufferFormat(GLenum format);
} }
......
...@@ -87,6 +87,8 @@ namespace sw ...@@ -87,6 +87,8 @@ namespace sw
{ {
FILTER_POINT, FILTER_POINT,
FILTER_GATHER, FILTER_GATHER,
FILTER_MIN_POINT_MAG_LINEAR,
FILTER_MIN_LINEAR_MAG_POINT,
FILTER_LINEAR, FILTER_LINEAR,
FILTER_ANISOTROPIC, FILTER_ANISOTROPIC,
......
...@@ -770,7 +770,7 @@ namespace sw ...@@ -770,7 +770,7 @@ namespace sw
address(uuuu, u, state.addressingModeU); address(uuuu, u, state.addressingModeU);
address(vvvv, v, state.addressingModeV); address(vvvv, v, state.addressingModeV);
if(state.textureFilter == FILTER_POINT) if(state.textureFilter == FILTER_POINT || state.textureFilter == FILTER_MIN_POINT_MAG_LINEAR)
{ {
sampleTexel(c, uuuu, vvvv, vvvv, mipmap, buffer); sampleTexel(c, uuuu, vvvv, vvvv, mipmap, buffer);
} }
...@@ -979,7 +979,7 @@ namespace sw ...@@ -979,7 +979,7 @@ namespace sw
address(vvvv, v_, state.addressingModeV); address(vvvv, v_, state.addressingModeV);
addressW(wwww, w_, mipmap); addressW(wwww, w_, mipmap);
if(state.textureFilter <= FILTER_POINT) if(state.textureFilter <= FILTER_POINT || state.textureFilter == FILTER_MIN_POINT_MAG_LINEAR)
{ {
sampleTexel(c_, uuuu, vvvv, wwww, mipmap, buffer); sampleTexel(c_, uuuu, vvvv, wwww, mipmap, buffer);
} }
...@@ -1255,7 +1255,7 @@ namespace sw ...@@ -1255,7 +1255,7 @@ namespace sw
address(uuuu, u, state.addressingModeU); address(uuuu, u, state.addressingModeU);
address(vvvv, v, state.addressingModeV); address(vvvv, v, state.addressingModeV);
if(state.textureFilter == FILTER_POINT) if(state.textureFilter == FILTER_POINT || state.textureFilter == FILTER_MIN_POINT_MAG_LINEAR)
{ {
sampleTexel(c, uuuu, vvvv, vvvv, z, mipmap, buffer); sampleTexel(c, uuuu, vvvv, vvvv, z, mipmap, buffer);
} }
...@@ -1325,7 +1325,7 @@ namespace sw ...@@ -1325,7 +1325,7 @@ namespace sw
address(vvvv, v, state.addressingModeV); address(vvvv, v, state.addressingModeV);
addressW(wwww, w, mipmap); addressW(wwww, w, mipmap);
if(state.textureFilter <= FILTER_POINT) if(state.textureFilter <= FILTER_POINT || state.textureFilter == FILTER_MIN_POINT_MAG_LINEAR)
{ {
sampleTexel(c, uuuu, vvvv, wwww, w, mipmap, buffer); sampleTexel(c, uuuu, vvvv, wwww, w, mipmap, buffer);
} }
......
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