diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-03-14 00:36:24 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-03-14 14:41:00 +0300 |
commit | f7f3b08977490e5ed2da93e46a1fce90a0630cff (patch) | |
tree | dd7e9b7c53ab47589294bb72251148991c8a8075 /source/blender/gpu/intern | |
parent | e7c3c46e8902a214c12f2cba70790646a6fcfda6 (diff) |
GPUTexture: Unlock GL_R16I format.
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 4 |
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 */ |