Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-04 03:36:56 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-05 18:49:14 +0300
commitb100b77fda0667d78cac0f219e0f6208d6b8f854 (patch)
treeb33d85d887e43d712fe7797b99ed6b6b150af4d0 /source/blender/gpu/intern/gpu_texture_private.hh
parent31c77a14af7cac2bc52ecaffde1bae9775dc47ae (diff)
GLTexture: Add back texture proxy check
Cleanup the feature itself: - Check 3D textures size against the correct limit. - Add check for compressed textures.
Diffstat (limited to 'source/blender/gpu/intern/gpu_texture_private.hh')
-rw-r--r--source/blender/gpu/intern/gpu_texture_private.hh13
1 files changed, 13 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_texture_private.hh b/source/blender/gpu/intern/gpu_texture_private.hh
index 7b5aed9562e..e3872c4d4b5 100644
--- a/source/blender/gpu/intern/gpu_texture_private.hh
+++ b/source/blender/gpu/intern/gpu_texture_private.hh
@@ -188,6 +188,19 @@ class Texture {
return 3;
}
}
+ /* Return number of array layer (or face layer) for texture array or 1 for the others. */
+ int layer_count(void) const
+ {
+ switch (type_) {
+ case GPU_TEXTURE_1D_ARRAY:
+ return h_;
+ case GPU_TEXTURE_2D_ARRAY:
+ case GPU_TEXTURE_CUBE_ARRAY:
+ return d_;
+ default:
+ return 1;
+ }
+ }
eGPUTextureFormat format_get(void) const
{