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>2018-03-14 00:36:24 +0300
committerClément Foucault <foucault.clem@gmail.com>2018-03-14 14:41:00 +0300
commitf7f3b08977490e5ed2da93e46a1fce90a0630cff (patch)
treedd7e9b7c53ab47589294bb72251148991c8a8075 /source/blender/gpu/intern
parente7c3c46e8902a214c12f2cba70790646a6fcfda6 (diff)
GPUTexture: Unlock GL_R16I format.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r--source/blender/gpu/intern/gpu_texture.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/intern/gpu_texture.c b/source/blender/gpu/intern/gpu_texture.c
index 651cbda00e8..bd25dd03f13 100644
--- a/source/blender/gpu/intern/gpu_texture.c
+++ b/source/blender/gpu/intern/gpu_texture.c
@@ -136,7 +136,7 @@ static GLenum gpu_texture_get_format(
*is_stencil = false;
/* Integer formats */
- if (ELEM(data_type, GPU_RG16I)) {
+ if (ELEM(data_type, GPU_RG16I, GPU_R16I)) {
*data_format = GL_INT;
switch (components) {
@@ -185,6 +185,7 @@ static GLenum gpu_texture_get_format(
break;
case GPU_DEPTH_COMPONENT16:
case GPU_R16F:
+ case GPU_R16I:
case GPU_RG8:
*bytesize = 2;
break;
@@ -209,6 +210,7 @@ static GLenum gpu_texture_get_format(
case GPU_RGBA8: return GL_RGBA8;
case GPU_R32F: return GL_R32F;
case GPU_R16F: return GL_R16F;
+ case GPU_R16I: return GL_R16I;
case GPU_RG8: return GL_RG8;
case GPU_R8: return GL_R8;
/* Special formats texture & renderbuffer */