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 | |
parent | e7c3c46e8902a214c12f2cba70790646a6fcfda6 (diff) |
GPUTexture: Unlock GL_R16I format.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_texture.h | 2 | ||||
-rw-r--r-- | source/blender/gpu/intern/gpu_texture.c | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/gpu/GPU_texture.h b/source/blender/gpu/GPU_texture.h index 486af0a8a74..0fde0edcf2b 100644 --- a/source/blender/gpu/GPU_texture.h +++ b/source/blender/gpu/GPU_texture.h @@ -70,6 +70,7 @@ typedef enum GPUTextureFormat { GPU_RG16I, GPU_R32F, GPU_R16F, + GPU_R16I, GPU_RG8, GPU_R8, #if 0 @@ -88,7 +89,6 @@ typedef enum GPUTextureFormat { GPU_RG8UI, GPU_R32I, GPU_R32UI, - GPU_R16I, GPU_R16UI, GPU_R16, GPU_R8I, 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 */ |