Enabled 2D array textures
- Implemented mipmap generation and completeness checks for
Texture2DArray.
- Fixed texture parameters setters and getters along with
mipmap generation functions to use the proper 2D array
texture instead of the 3D texture for 2D array textures.
- Enabled the same path as 3D texture for 2D array textures
in the sampler.
- Added an address function for the w component, which
simply clamps the rounded value for 2D array textures and
adapted SamplerCore::computeIndices to this new behavior.
Change-Id: Ida0659afac75330bfd9af4052cfd2625c729f9ef
Reviewed-on: https://swiftshader-review.googlesource.com/4310
Tested-by: Alexis Hétu <sugoi@google.com>
Reviewed-by: Nicolas Capens <capn@google.com>
diff --git a/src/Renderer/Sampler.cpp b/src/Renderer/Sampler.cpp
index 5859b56..3de645c 100644
--- a/src/Renderer/Sampler.cpp
+++ b/src/Renderer/Sampler.cpp
@@ -368,7 +368,7 @@
bool Sampler::hasVolumeTexture() const
{
- return textureType == TEXTURE_3D;
+ return textureType == TEXTURE_3D || textureType == TEXTURE_2D_ARRAY;
}
const Texture &Sampler::getTextureData()