LOD Base level and Max level to sampler state
Plumbing to send the LOD base level and max level from the Sampler
object in the Context to the Renderer's texture's state.
Change-Id: I5a9571f58a0cbaea8cedfb98da159672673eed94
Reviewed-on: https://swiftshader-review.googlesource.com/5501
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Shader/VertexProgram.cpp b/src/Shader/VertexProgram.cpp
index 7868074..b986122 100644
--- a/src/Shader/VertexProgram.cpp
+++ b/src/Shader/VertexProgram.cpp
@@ -1577,8 +1577,8 @@
void VertexProgram::TEXSIZE(Vector4f &dst, Float4 &lod, const Src &src1)
{
- Pointer<Byte> textureMipmap = data + OFFSET(DrawData, mipmap[16]) + src1.index * sizeof(Texture) + OFFSET(Texture, mipmap);
- sampler[src1.index]->textureSize(textureMipmap, dst, lod);
+ Pointer<Byte> texture = data + OFFSET(DrawData, mipmap[16]) + src1.index * sizeof(Texture);
+ sampler[src1.index]->textureSize(texture, dst, lod);
}
void VertexProgram::sampleTexture(Vector4f &c, const Src &s, Float4 &u, Float4 &v, Float4 &w, Float4 &q, Vector4f &dsx, Vector4f &dsy, Vector4f &offset, SamplerMethod method, bool hasOffset)